@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
@@ -7,37 +7,26 @@ import { App } from '../models/App';
7
7
  import { BasicNotification } from '../models/BasicNotification';
8
8
  import { BasicNotificationAllOf } from '../models/BasicNotificationAllOf';
9
9
  import { BasicNotificationAllOfAndroidBackgroundLayout } from '../models/BasicNotificationAllOfAndroidBackgroundLayout';
10
- import { BeginLiveActivityRequest } from '../models/BeginLiveActivityRequest';
11
10
  import { Button } from '../models/Button';
12
- import { CancelNotificationSuccessResponse } from '../models/CancelNotificationSuccessResponse';
13
11
  import { CreateNotificationSuccessResponse } from '../models/CreateNotificationSuccessResponse';
14
- import { CreatePlayerSuccessResponse } from '../models/CreatePlayerSuccessResponse';
15
12
  import { CreateSegmentConflictResponse } from '../models/CreateSegmentConflictResponse';
16
13
  import { CreateSegmentSuccessResponse } from '../models/CreateSegmentSuccessResponse';
17
- import { CreateSubscriptionRequestBody } from '../models/CreateSubscriptionRequestBody';
18
14
  import { CreateUserConflictResponse } from '../models/CreateUserConflictResponse';
19
15
  import { CreateUserConflictResponseErrorsInner } from '../models/CreateUserConflictResponseErrorsInner';
20
16
  import { CreateUserConflictResponseErrorsItemsMeta } from '../models/CreateUserConflictResponseErrorsItemsMeta';
21
- import { DeletePlayerNotFoundResponse } from '../models/DeletePlayerNotFoundResponse';
22
- import { DeletePlayerSuccessResponse } from '../models/DeletePlayerSuccessResponse';
23
- import { DeleteSegmentNotFoundResponse } from '../models/DeleteSegmentNotFoundResponse';
24
- import { DeleteSegmentSuccessResponse } from '../models/DeleteSegmentSuccessResponse';
25
17
  import { DeliveryData } from '../models/DeliveryData';
26
18
  import { ExportEventsSuccessResponse } from '../models/ExportEventsSuccessResponse';
27
- import { ExportPlayersRequestBody } from '../models/ExportPlayersRequestBody';
28
- import { ExportPlayersSuccessResponse } from '../models/ExportPlayersSuccessResponse';
19
+ import { ExportSubscriptionsRequestBody } from '../models/ExportSubscriptionsRequestBody';
20
+ import { ExportSubscriptionsSuccessResponse } from '../models/ExportSubscriptionsSuccessResponse';
29
21
  import { Filter } from '../models/Filter';
30
- import { FilterExpressions } from '../models/FilterExpressions';
22
+ import { FilterExpression } from '../models/FilterExpression';
31
23
  import { GenericError } from '../models/GenericError';
32
- import { GenericErrorErrorsInner } from '../models/GenericErrorErrorsInner';
33
- import { GetNotificationRequestBody } from '../models/GetNotificationRequestBody';
34
- import { InlineResponse200 } from '../models/InlineResponse200';
35
- import { InlineResponse2003 } from '../models/InlineResponse2003';
36
- import { InlineResponse201 } from '../models/InlineResponse201';
37
- import { InlineResponse202 } from '../models/InlineResponse202';
24
+ import { GenericSuccessBoolResponse } from '../models/GenericSuccessBoolResponse';
25
+ import { GetNotificationHistoryRequestBody } from '../models/GetNotificationHistoryRequestBody';
26
+ import { GetSegmentsSuccessResponse } from '../models/GetSegmentsSuccessResponse';
38
27
  import { InvalidIdentifierError } from '../models/InvalidIdentifierError';
28
+ import { LanguageStringMap } from '../models/LanguageStringMap';
39
29
  import { Notification } from '../models/Notification';
40
- import { Notification200Errors } from '../models/Notification200Errors';
41
30
  import { NotificationAllOf } from '../models/NotificationAllOf';
42
31
  import { NotificationHistorySuccessResponse } from '../models/NotificationHistorySuccessResponse';
43
32
  import { NotificationSlice } from '../models/NotificationSlice';
@@ -50,30 +39,24 @@ import { OutcomesData } from '../models/OutcomesData';
50
39
  import { PlatformDeliveryData } from '../models/PlatformDeliveryData';
51
40
  import { PlatformDeliveryDataEmailAllOf } from '../models/PlatformDeliveryDataEmailAllOf';
52
41
  import { PlatformDeliveryDataSmsAllOf } from '../models/PlatformDeliveryDataSmsAllOf';
53
- import { Player } from '../models/Player';
54
- import { PlayerNotificationTarget } from '../models/PlayerNotificationTarget';
55
- import { PlayerNotificationTargetIncludeAliases } from '../models/PlayerNotificationTargetIncludeAliases';
56
- import { PlayerSlice } from '../models/PlayerSlice';
42
+ import { PropertiesBody } from '../models/PropertiesBody';
57
43
  import { PropertiesDeltas } from '../models/PropertiesDeltas';
58
44
  import { PropertiesObject } from '../models/PropertiesObject';
59
45
  import { Purchase } from '../models/Purchase';
60
- import { RateLimiterError } from '../models/RateLimiterError';
46
+ import { RateLimitError } from '../models/RateLimitError';
61
47
  import { Segment } from '../models/Segment';
48
+ import { SegmentData } from '../models/SegmentData';
62
49
  import { SegmentNotificationTarget } from '../models/SegmentNotificationTarget';
63
- import { StringMap } from '../models/StringMap';
64
- import { SubscriptionObject } from '../models/SubscriptionObject';
50
+ import { Subscription } from '../models/Subscription';
51
+ import { SubscriptionBody } from '../models/SubscriptionBody';
52
+ import { SubscriptionNotificationTarget } from '../models/SubscriptionNotificationTarget';
65
53
  import { TransferSubscriptionRequestBody } from '../models/TransferSubscriptionRequestBody';
66
54
  import { UpdateLiveActivityRequest } from '../models/UpdateLiveActivityRequest';
67
55
  import { UpdateLiveActivitySuccessResponse } from '../models/UpdateLiveActivitySuccessResponse';
68
- import { UpdatePlayerSuccessResponse } from '../models/UpdatePlayerSuccessResponse';
69
- import { UpdatePlayerTagsRequestBody } from '../models/UpdatePlayerTagsRequestBody';
70
- import { UpdatePlayerTagsSuccessResponse } from '../models/UpdatePlayerTagsSuccessResponse';
71
- import { UpdateSubscriptionRequestBody } from '../models/UpdateSubscriptionRequestBody';
72
56
  import { UpdateUserRequest } from '../models/UpdateUserRequest';
73
57
  import { User } from '../models/User';
74
- import { UserIdentityRequestBody } from '../models/UserIdentityRequestBody';
75
- import { UserIdentityResponse } from '../models/UserIdentityResponse';
76
- import { UserSubscriptionOptions } from '../models/UserSubscriptionOptions';
58
+ import { UserIdentityBody } from '../models/UserIdentityBody';
59
+ import { WebButton } from '../models/WebButton';
77
60
 
78
61
  import { DefaultApiRequestFactory, DefaultApiResponseProcessor} from "../apis/DefaultApi";
79
62
  export class ObservableDefaultApi {
@@ -92,14 +75,13 @@ export class ObservableDefaultApi {
92
75
  }
93
76
 
94
77
  /**
95
- * Starts a Live Activity
96
- * Start Live Activity
97
- * @param appId The OneSignal App ID for your app. Available in Keys & IDs.
98
- * @param activityId Live Activity record ID
99
- * @param beginLiveActivityRequest
78
+ * Used to stop a scheduled or currently outgoing notification
79
+ * Stop a scheduled or currently outgoing notification
80
+ * @param appId
81
+ * @param notificationId
100
82
  */
101
- public beginLiveActivity(appId: string, activityId: string, beginLiveActivityRequest: BeginLiveActivityRequest, _options?: Configuration): Observable<void> {
102
- const requestContextPromise = this.requestFactory.beginLiveActivity(appId, activityId, beginLiveActivityRequest, _options);
83
+ public cancelNotification(appId: string, notificationId: string, _options?: Configuration): Observable<GenericSuccessBoolResponse> {
84
+ const requestContextPromise = this.requestFactory.cancelNotification(appId, notificationId, _options);
103
85
 
104
86
  // build promise chain
105
87
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -113,18 +95,19 @@ export class ObservableDefaultApi {
113
95
  for (let middleware of this.configuration.middleware) {
114
96
  middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
115
97
  }
116
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.beginLiveActivity(rsp)));
98
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.cancelNotification(rsp)));
117
99
  }));
118
100
  }
119
101
 
120
102
  /**
121
- * Used to stop a scheduled or currently outgoing notification
122
- * Stop a scheduled or currently outgoing notification
103
+ * Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
123
104
  * @param appId
124
- * @param notificationId
105
+ * @param aliasLabel
106
+ * @param aliasId
107
+ * @param userIdentityBody
125
108
  */
126
- public cancelNotification(appId: string, notificationId: string, _options?: Configuration): Observable<CancelNotificationSuccessResponse> {
127
- const requestContextPromise = this.requestFactory.cancelNotification(appId, notificationId, _options);
109
+ public createAlias(appId: string, aliasLabel: string, aliasId: string, userIdentityBody: UserIdentityBody, _options?: Configuration): Observable<UserIdentityBody> {
110
+ const requestContextPromise = this.requestFactory.createAlias(appId, aliasLabel, aliasId, userIdentityBody, _options);
128
111
 
129
112
  // build promise chain
130
113
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -138,17 +121,18 @@ export class ObservableDefaultApi {
138
121
  for (let middleware of this.configuration.middleware) {
139
122
  middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
140
123
  }
141
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.cancelNotification(rsp)));
124
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createAlias(rsp)));
142
125
  }));
143
126
  }
144
127
 
145
128
  /**
146
- * Creates a new OneSignal app
147
- * Create an app
148
- * @param app
129
+ * Upserts one or more Aliases for the User identified by :subscription_id.
130
+ * @param appId
131
+ * @param subscriptionId
132
+ * @param userIdentityBody
149
133
  */
150
- public createApp(app: App, _options?: Configuration): Observable<App> {
151
- const requestContextPromise = this.requestFactory.createApp(app, _options);
134
+ public createAliasBySubscription(appId: string, subscriptionId: string, userIdentityBody: UserIdentityBody, _options?: Configuration): Observable<UserIdentityBody> {
135
+ const requestContextPromise = this.requestFactory.createAliasBySubscription(appId, subscriptionId, userIdentityBody, _options);
152
136
 
153
137
  // build promise chain
154
138
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -162,17 +146,17 @@ export class ObservableDefaultApi {
162
146
  for (let middleware of this.configuration.middleware) {
163
147
  middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
164
148
  }
165
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createApp(rsp)));
149
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createAliasBySubscription(rsp)));
166
150
  }));
167
151
  }
168
152
 
169
153
  /**
170
- * Sends notifications to your users
171
- * Create notification
172
- * @param notification
154
+ * Creates a new OneSignal app
155
+ * Create an app
156
+ * @param app
173
157
  */
174
- public createNotification(notification: Notification, _options?: Configuration): Observable<CreateNotificationSuccessResponse> {
175
- const requestContextPromise = this.requestFactory.createNotification(notification, _options);
158
+ public createApp(app: App, _options?: Configuration): Observable<App> {
159
+ const requestContextPromise = this.requestFactory.createApp(app, _options);
176
160
 
177
161
  // build promise chain
178
162
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -186,17 +170,17 @@ export class ObservableDefaultApi {
186
170
  for (let middleware of this.configuration.middleware) {
187
171
  middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
188
172
  }
189
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNotification(rsp)));
173
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createApp(rsp)));
190
174
  }));
191
175
  }
192
176
 
193
177
  /**
194
- * 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.
195
- * Add a device
196
- * @param player
178
+ * Sends notifications to your users
179
+ * Create notification
180
+ * @param notification
197
181
  */
198
- public createPlayer(player: Player, _options?: Configuration): Observable<CreatePlayerSuccessResponse> {
199
- const requestContextPromise = this.requestFactory.createPlayer(player, _options);
182
+ public createNotification(notification: Notification, _options?: Configuration): Observable<CreateNotificationSuccessResponse> {
183
+ const requestContextPromise = this.requestFactory.createNotification(notification, _options);
200
184
 
201
185
  // build promise chain
202
186
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -210,18 +194,18 @@ export class ObservableDefaultApi {
210
194
  for (let middleware of this.configuration.middleware) {
211
195
  middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
212
196
  }
213
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createPlayer(rsp)));
197
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNotification(rsp)));
214
198
  }));
215
199
  }
216
200
 
217
201
  /**
218
- * 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.
219
- * Create Segments
202
+ * 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.
203
+ * Create Segment
220
204
  * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
221
205
  * @param segment
222
206
  */
223
- public createSegments(appId: string, segment?: Segment, _options?: Configuration): Observable<CreateSegmentSuccessResponse> {
224
- const requestContextPromise = this.requestFactory.createSegments(appId, segment, _options);
207
+ public createSegment(appId: string, segment?: Segment, _options?: Configuration): Observable<CreateSegmentSuccessResponse> {
208
+ const requestContextPromise = this.requestFactory.createSegment(appId, segment, _options);
225
209
 
226
210
  // build promise chain
227
211
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -235,7 +219,7 @@ export class ObservableDefaultApi {
235
219
  for (let middleware of this.configuration.middleware) {
236
220
  middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
237
221
  }
238
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createSegments(rsp)));
222
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createSegment(rsp)));
239
223
  }));
240
224
  }
241
225
 
@@ -244,10 +228,10 @@ export class ObservableDefaultApi {
244
228
  * @param appId
245
229
  * @param aliasLabel
246
230
  * @param aliasId
247
- * @param createSubscriptionRequestBody
231
+ * @param subscriptionBody
248
232
  */
249
- public createSubscription(appId: string, aliasLabel: string, aliasId: string, createSubscriptionRequestBody: CreateSubscriptionRequestBody, _options?: Configuration): Observable<InlineResponse201> {
250
- const requestContextPromise = this.requestFactory.createSubscription(appId, aliasLabel, aliasId, createSubscriptionRequestBody, _options);
233
+ public createSubscription(appId: string, aliasLabel: string, aliasId: string, subscriptionBody: SubscriptionBody, _options?: Configuration): Observable<SubscriptionBody> {
234
+ const requestContextPromise = this.requestFactory.createSubscription(appId, aliasLabel, aliasId, subscriptionBody, _options);
251
235
 
252
236
  // build promise chain
253
237
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -296,7 +280,7 @@ export class ObservableDefaultApi {
296
280
  * @param aliasId
297
281
  * @param aliasLabelToDelete
298
282
  */
299
- public deleteAlias(appId: string, aliasLabel: string, aliasId: string, aliasLabelToDelete: string, _options?: Configuration): Observable<InlineResponse200> {
283
+ public deleteAlias(appId: string, aliasLabel: string, aliasId: string, aliasLabelToDelete: string, _options?: Configuration): Observable<UserIdentityBody> {
300
284
  const requestContextPromise = this.requestFactory.deleteAlias(appId, aliasLabel, aliasId, aliasLabelToDelete, _options);
301
285
 
302
286
  // build promise chain
@@ -316,38 +300,13 @@ export class ObservableDefaultApi {
316
300
  }
317
301
 
318
302
  /**
319
- * Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
320
- * Delete a user record
321
- * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
322
- * @param playerId The OneSignal player_id
323
- */
324
- public deletePlayer(appId: string, playerId: string, _options?: Configuration): Observable<DeletePlayerSuccessResponse> {
325
- const requestContextPromise = this.requestFactory.deletePlayer(appId, playerId, _options);
326
-
327
- // build promise chain
328
- let middlewarePreObservable = from<RequestContext>(requestContextPromise);
329
- for (let middleware of this.configuration.middleware) {
330
- middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
331
- }
332
-
333
- return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
334
- pipe(mergeMap((response: ResponseContext) => {
335
- let middlewarePostObservable = of(response);
336
- for (let middleware of this.configuration.middleware) {
337
- middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
338
- }
339
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deletePlayer(rsp)));
340
- }));
341
- }
342
-
343
- /**
344
- * 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.
345
- * Delete Segments
303
+ * 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.
304
+ * Delete Segment
346
305
  * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
347
306
  * @param segmentId The segment_id can be found in the URL of the segment when viewing it in the dashboard.
348
307
  */
349
- public deleteSegments(appId: string, segmentId: string, _options?: Configuration): Observable<DeleteSegmentSuccessResponse> {
350
- const requestContextPromise = this.requestFactory.deleteSegments(appId, segmentId, _options);
308
+ public deleteSegment(appId: string, segmentId: string, _options?: Configuration): Observable<GenericSuccessBoolResponse> {
309
+ const requestContextPromise = this.requestFactory.deleteSegment(appId, segmentId, _options);
351
310
 
352
311
  // build promise chain
353
312
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -361,7 +320,7 @@ export class ObservableDefaultApi {
361
320
  for (let middleware of this.configuration.middleware) {
362
321
  middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
363
322
  }
364
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteSegments(rsp)));
323
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteSegment(rsp)));
365
324
  }));
366
325
  }
367
326
 
@@ -414,32 +373,6 @@ export class ObservableDefaultApi {
414
373
  }));
415
374
  }
416
375
 
417
- /**
418
- * Stops a Live Activity
419
- * Stop Live Activity
420
- * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
421
- * @param activityId Live Activity record ID
422
- * @param subscriptionId Subscription ID
423
- */
424
- public endLiveActivity(appId: string, activityId: string, subscriptionId: string, _options?: Configuration): Observable<void> {
425
- const requestContextPromise = this.requestFactory.endLiveActivity(appId, activityId, subscriptionId, _options);
426
-
427
- // build promise chain
428
- let middlewarePreObservable = from<RequestContext>(requestContextPromise);
429
- for (let middleware of this.configuration.middleware) {
430
- middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
431
- }
432
-
433
- return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
434
- pipe(mergeMap((response: ResponseContext) => {
435
- let middlewarePostObservable = of(response);
436
- for (let middleware of this.configuration.middleware) {
437
- middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
438
- }
439
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.endLiveActivity(rsp)));
440
- }));
441
- }
442
-
443
376
  /**
444
377
  * 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.
445
378
  * Export CSV of Events
@@ -467,12 +400,12 @@ export class ObservableDefaultApi {
467
400
 
468
401
  /**
469
402
  * 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. |
470
- * Export CSV of Players
403
+ * Export CSV of Subscriptions
471
404
  * @param appId The app ID that you want to export devices from
472
- * @param exportPlayersRequestBody
405
+ * @param exportSubscriptionsRequestBody
473
406
  */
474
- public exportPlayers(appId: string, exportPlayersRequestBody?: ExportPlayersRequestBody, _options?: Configuration): Observable<ExportPlayersSuccessResponse> {
475
- const requestContextPromise = this.requestFactory.exportPlayers(appId, exportPlayersRequestBody, _options);
407
+ public exportSubscriptions(appId: string, exportSubscriptionsRequestBody?: ExportSubscriptionsRequestBody, _options?: Configuration): Observable<ExportSubscriptionsSuccessResponse> {
408
+ const requestContextPromise = this.requestFactory.exportSubscriptions(appId, exportSubscriptionsRequestBody, _options);
476
409
 
477
410
  // build promise chain
478
411
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -486,42 +419,18 @@ export class ObservableDefaultApi {
486
419
  for (let middleware of this.configuration.middleware) {
487
420
  middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
488
421
  }
489
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.exportPlayers(rsp)));
422
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.exportSubscriptions(rsp)));
490
423
  }));
491
424
  }
492
425
 
493
426
  /**
494
- * Lists all Aliases for the User identified by :subscription_id.
495
- * @param appId
496
- * @param subscriptionId
497
- */
498
- public fetchAliases(appId: string, subscriptionId: string, _options?: Configuration): Observable<UserIdentityResponse> {
499
- const requestContextPromise = this.requestFactory.fetchAliases(appId, subscriptionId, _options);
500
-
501
- // build promise chain
502
- let middlewarePreObservable = from<RequestContext>(requestContextPromise);
503
- for (let middleware of this.configuration.middleware) {
504
- middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
505
- }
506
-
507
- return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
508
- pipe(mergeMap((response: ResponseContext) => {
509
- let middlewarePostObservable = of(response);
510
- for (let middleware of this.configuration.middleware) {
511
- middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
512
- }
513
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchAliases(rsp)));
514
- }));
515
- }
516
-
517
- /**
518
- * Returns the User’s properties, Aliases, and Subscriptions.
427
+ * Lists all Aliases for the User identified by (:alias_label, :alias_id).
519
428
  * @param appId
520
429
  * @param aliasLabel
521
430
  * @param aliasId
522
431
  */
523
- public fetchUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Observable<User> {
524
- const requestContextPromise = this.requestFactory.fetchUser(appId, aliasLabel, aliasId, _options);
432
+ public getAliases(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Observable<UserIdentityBody> {
433
+ const requestContextPromise = this.requestFactory.getAliases(appId, aliasLabel, aliasId, _options);
525
434
 
526
435
  // build promise chain
527
436
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -535,18 +444,17 @@ export class ObservableDefaultApi {
535
444
  for (let middleware of this.configuration.middleware) {
536
445
  middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
537
446
  }
538
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchUser(rsp)));
447
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAliases(rsp)));
539
448
  }));
540
449
  }
541
450
 
542
451
  /**
543
- * Lists all Aliases for the User identified by (:alias_label, :alias_id).
452
+ * Lists all Aliases for the User identified by :subscription_id.
544
453
  * @param appId
545
- * @param aliasLabel
546
- * @param aliasId
454
+ * @param subscriptionId
547
455
  */
548
- public fetchUserIdentity(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Observable<InlineResponse200> {
549
- const requestContextPromise = this.requestFactory.fetchUserIdentity(appId, aliasLabel, aliasId, _options);
456
+ public getAliasesBySubscription(appId: string, subscriptionId: string, _options?: Configuration): Observable<UserIdentityBody> {
457
+ const requestContextPromise = this.requestFactory.getAliasesBySubscription(appId, subscriptionId, _options);
550
458
 
551
459
  // build promise chain
552
460
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -560,7 +468,7 @@ export class ObservableDefaultApi {
560
468
  for (let middleware of this.configuration.middleware) {
561
469
  middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
562
470
  }
563
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchUserIdentity(rsp)));
471
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAliasesBySubscription(rsp)));
564
472
  }));
565
473
  }
566
474
 
@@ -611,30 +519,6 @@ export class ObservableDefaultApi {
611
519
  }));
612
520
  }
613
521
 
614
- /**
615
- * Manifest of In-App Messages the Subscription is eligible to display by the SDK.
616
- * @param appId
617
- * @param subscriptionId
618
- */
619
- public getEligibleIams(appId: string, subscriptionId: string, _options?: Configuration): Observable<InlineResponse2003> {
620
- const requestContextPromise = this.requestFactory.getEligibleIams(appId, subscriptionId, _options);
621
-
622
- // build promise chain
623
- let middlewarePreObservable = from<RequestContext>(requestContextPromise);
624
- for (let middleware of this.configuration.middleware) {
625
- middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
626
- }
627
-
628
- return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
629
- pipe(mergeMap((response: ResponseContext) => {
630
- let middlewarePostObservable = of(response);
631
- for (let middleware of this.configuration.middleware) {
632
- middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
633
- }
634
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getEligibleIams(rsp)));
635
- }));
636
- }
637
-
638
522
  /**
639
523
  * View the details of a single notification and outcomes associated with it
640
524
  * View notification
@@ -664,10 +548,10 @@ export class ObservableDefaultApi {
664
548
  * -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App\'s REST API Key, available in Keys & IDs.
665
549
  * Notification History
666
550
  * @param notificationId The \&quot;id\&quot; of the message found in the Notification object
667
- * @param getNotificationRequestBody
551
+ * @param getNotificationHistoryRequestBody
668
552
  */
669
- public getNotificationHistory(notificationId: string, getNotificationRequestBody: GetNotificationRequestBody, _options?: Configuration): Observable<NotificationHistorySuccessResponse> {
670
- const requestContextPromise = this.requestFactory.getNotificationHistory(notificationId, getNotificationRequestBody, _options);
553
+ public getNotificationHistory(notificationId: string, getNotificationHistoryRequestBody: GetNotificationHistoryRequestBody, _options?: Configuration): Observable<NotificationHistorySuccessResponse> {
554
+ const requestContextPromise = this.requestFactory.getNotificationHistory(notificationId, getNotificationHistoryRequestBody, _options);
671
555
 
672
556
  // build promise chain
673
557
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -742,40 +626,14 @@ export class ObservableDefaultApi {
742
626
  }
743
627
 
744
628
  /**
745
- * View the details of an existing device in one of your OneSignal apps
746
- * View device
747
- * @param appId Your app_id for this device
748
- * @param playerId Player\&#39;s OneSignal ID
749
- * @param emailAuthHash Email - Only required if you have enabled Identity Verification and device_type is email (11).
750
- */
751
- public getPlayer(appId: string, playerId: string, emailAuthHash?: string, _options?: Configuration): Observable<Player> {
752
- const requestContextPromise = this.requestFactory.getPlayer(appId, playerId, emailAuthHash, _options);
753
-
754
- // build promise chain
755
- let middlewarePreObservable = from<RequestContext>(requestContextPromise);
756
- for (let middleware of this.configuration.middleware) {
757
- middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
758
- }
759
-
760
- return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
761
- pipe(mergeMap((response: ResponseContext) => {
762
- let middlewarePostObservable = of(response);
763
- for (let middleware of this.configuration.middleware) {
764
- middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
765
- }
766
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getPlayer(rsp)));
767
- }));
768
- }
769
-
770
- /**
771
- * 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.
772
- * View devices
773
- * @param appId The app ID that you want to view players from
774
- * @param limit How many devices to return. Max is 300. Default is 300
775
- * @param offset Result offset. Default is 0. Results are sorted by id;
629
+ * Returns an array of segments from an app.
630
+ * Get Segments
631
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
632
+ * @param offset 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.
633
+ * @param limit The amount of Segments in the response. Maximum 300.
776
634
  */
777
- public getPlayers(appId: string, limit?: number, offset?: number, _options?: Configuration): Observable<PlayerSlice> {
778
- const requestContextPromise = this.requestFactory.getPlayers(appId, limit, offset, _options);
635
+ public getSegments(appId: string, offset?: number, limit?: number, _options?: Configuration): Observable<GetSegmentsSuccessResponse> {
636
+ const requestContextPromise = this.requestFactory.getSegments(appId, offset, limit, _options);
779
637
 
780
638
  // build promise chain
781
639
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -789,19 +647,18 @@ export class ObservableDefaultApi {
789
647
  for (let middleware of this.configuration.middleware) {
790
648
  middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
791
649
  }
792
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getPlayers(rsp)));
650
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getSegments(rsp)));
793
651
  }));
794
652
  }
795
653
 
796
654
  /**
797
- * Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
655
+ * Returns the User’s properties, Aliases, and Subscriptions.
798
656
  * @param appId
799
657
  * @param aliasLabel
800
658
  * @param aliasId
801
- * @param userIdentityRequestBody
802
659
  */
803
- public identifyUserByAlias(appId: string, aliasLabel: string, aliasId: string, userIdentityRequestBody: UserIdentityRequestBody, _options?: Configuration): Observable<InlineResponse200> {
804
- const requestContextPromise = this.requestFactory.identifyUserByAlias(appId, aliasLabel, aliasId, userIdentityRequestBody, _options);
660
+ public getUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Observable<User> {
661
+ const requestContextPromise = this.requestFactory.getUser(appId, aliasLabel, aliasId, _options);
805
662
 
806
663
  // build promise chain
807
664
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -815,18 +672,18 @@ export class ObservableDefaultApi {
815
672
  for (let middleware of this.configuration.middleware) {
816
673
  middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
817
674
  }
818
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.identifyUserByAlias(rsp)));
675
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getUser(rsp)));
819
676
  }));
820
677
  }
821
678
 
822
679
  /**
823
- * Upserts one or more Aliases for the User identified by :subscription_id.
680
+ * Transfers this Subscription to the User identified by the identity in the payload.
824
681
  * @param appId
825
682
  * @param subscriptionId
826
- * @param userIdentityRequestBody
683
+ * @param transferSubscriptionRequestBody
827
684
  */
828
- public identifyUserBySubscriptionId(appId: string, subscriptionId: string, userIdentityRequestBody: UserIdentityRequestBody, _options?: Configuration): Observable<UserIdentityResponse> {
829
- const requestContextPromise = this.requestFactory.identifyUserBySubscriptionId(appId, subscriptionId, userIdentityRequestBody, _options);
685
+ public transferSubscription(appId: string, subscriptionId: string, transferSubscriptionRequestBody: TransferSubscriptionRequestBody, _options?: Configuration): Observable<UserIdentityBody> {
686
+ const requestContextPromise = this.requestFactory.transferSubscription(appId, subscriptionId, transferSubscriptionRequestBody, _options);
830
687
 
831
688
  // build promise chain
832
689
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -840,18 +697,19 @@ export class ObservableDefaultApi {
840
697
  for (let middleware of this.configuration.middleware) {
841
698
  middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
842
699
  }
843
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.identifyUserBySubscriptionId(rsp)));
700
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.transferSubscription(rsp)));
844
701
  }));
845
702
  }
846
703
 
847
704
  /**
848
- * Transfers this Subscription to the User identified by the identity in the payload.
849
- * @param appId
850
- * @param subscriptionId
851
- * @param transferSubscriptionRequestBody
705
+ * Unsubscribe an email with a token when using your own custom email unsubscribe landing page
706
+ * Unsubscribe with token
707
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
708
+ * @param notificationId The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report.
709
+ * @param token The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email.
852
710
  */
853
- public transferSubscription(appId: string, subscriptionId: string, transferSubscriptionRequestBody: TransferSubscriptionRequestBody, _options?: Configuration): Observable<UserIdentityResponse> {
854
- const requestContextPromise = this.requestFactory.transferSubscription(appId, subscriptionId, transferSubscriptionRequestBody, _options);
711
+ public unsubscribeEmailWithToken(appId: string, notificationId: string, token: string, _options?: Configuration): Observable<GenericSuccessBoolResponse> {
712
+ const requestContextPromise = this.requestFactory.unsubscribeEmailWithToken(appId, notificationId, token, _options);
855
713
 
856
714
  // build promise chain
857
715
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -865,7 +723,7 @@ export class ObservableDefaultApi {
865
723
  for (let middleware of this.configuration.middleware) {
866
724
  middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
867
725
  }
868
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.transferSubscription(rsp)));
726
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.unsubscribeEmailWithToken(rsp)));
869
727
  }));
870
728
  }
871
729
 
@@ -920,65 +778,14 @@ export class ObservableDefaultApi {
920
778
  }));
921
779
  }
922
780
 
923
- /**
924
- * Update an existing device in one of your OneSignal apps
925
- * Edit device
926
- * @param playerId Player\&#39;s OneSignal ID
927
- * @param player
928
- */
929
- public updatePlayer(playerId: string, player: Player, _options?: Configuration): Observable<UpdatePlayerSuccessResponse> {
930
- const requestContextPromise = this.requestFactory.updatePlayer(playerId, player, _options);
931
-
932
- // build promise chain
933
- let middlewarePreObservable = from<RequestContext>(requestContextPromise);
934
- for (let middleware of this.configuration.middleware) {
935
- middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
936
- }
937
-
938
- return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
939
- pipe(mergeMap((response: ResponseContext) => {
940
- let middlewarePostObservable = of(response);
941
- for (let middleware of this.configuration.middleware) {
942
- middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
943
- }
944
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePlayer(rsp)));
945
- }));
946
- }
947
-
948
- /**
949
- * 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\" }
950
- * Edit tags with external user id
951
- * @param appId The OneSignal App ID the user record is found under.
952
- * @param externalUserId The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated.
953
- * @param updatePlayerTagsRequestBody
954
- */
955
- public updatePlayerTags(appId: string, externalUserId: string, updatePlayerTagsRequestBody?: UpdatePlayerTagsRequestBody, _options?: Configuration): Observable<UpdatePlayerTagsSuccessResponse> {
956
- const requestContextPromise = this.requestFactory.updatePlayerTags(appId, externalUserId, updatePlayerTagsRequestBody, _options);
957
-
958
- // build promise chain
959
- let middlewarePreObservable = from<RequestContext>(requestContextPromise);
960
- for (let middleware of this.configuration.middleware) {
961
- middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
962
- }
963
-
964
- return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
965
- pipe(mergeMap((response: ResponseContext) => {
966
- let middlewarePostObservable = of(response);
967
- for (let middleware of this.configuration.middleware) {
968
- middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
969
- }
970
- return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePlayerTags(rsp)));
971
- }));
972
- }
973
-
974
781
  /**
975
782
  * Updates an existing Subscription’s properties.
976
783
  * @param appId
977
784
  * @param subscriptionId
978
- * @param updateSubscriptionRequestBody
785
+ * @param subscriptionBody
979
786
  */
980
- public updateSubscription(appId: string, subscriptionId: string, updateSubscriptionRequestBody: UpdateSubscriptionRequestBody, _options?: Configuration): Observable<void> {
981
- const requestContextPromise = this.requestFactory.updateSubscription(appId, subscriptionId, updateSubscriptionRequestBody, _options);
787
+ public updateSubscription(appId: string, subscriptionId: string, subscriptionBody: SubscriptionBody, _options?: Configuration): Observable<void> {
788
+ const requestContextPromise = this.requestFactory.updateSubscription(appId, subscriptionId, subscriptionBody, _options);
982
789
 
983
790
  // build promise chain
984
791
  let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -1003,7 +810,7 @@ export class ObservableDefaultApi {
1003
810
  * @param aliasId
1004
811
  * @param updateUserRequest
1005
812
  */
1006
- public updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Observable<InlineResponse202> {
813
+ public updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Observable<PropertiesBody> {
1007
814
  const requestContextPromise = this.requestFactory.updateUser(appId, aliasLabel, aliasId, updateUserRequest, _options);
1008
815
 
1009
816
  // build promise chain