@onesignal/node-onesignal 2.0.1-beta1 → 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 (308) hide show
  1. package/DefaultApi.md +452 -707
  2. package/apis/DefaultApi.ts +998 -1004
  3. package/auth/auth.ts +14 -14
  4. package/configuration.ts +6 -6
  5. package/dist/apis/DefaultApi.d.ts +39 -63
  6. package/dist/apis/DefaultApi.js +1149 -1022
  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/{ExportPlayersSuccessResponse.d.ts → ExportEventsSuccessResponse.d.ts} +1 -1
  24. package/dist/models/ExportEventsSuccessResponse.js +22 -0
  25. package/dist/models/ExportEventsSuccessResponse.js.map +1 -0
  26. package/dist/models/{ExportPlayersRequestBody.d.ts → ExportSubscriptionsRequestBody.d.ts} +1 -1
  27. package/dist/models/ExportSubscriptionsRequestBody.js +34 -0
  28. package/dist/models/ExportSubscriptionsRequestBody.js.map +1 -0
  29. package/dist/models/{DeletePlayerNotFoundResponse.d.ts → ExportSubscriptionsSuccessResponse.d.ts} +2 -2
  30. package/dist/models/ExportSubscriptionsSuccessResponse.js +22 -0
  31. package/dist/models/ExportSubscriptionsSuccessResponse.js.map +1 -0
  32. package/dist/models/Filter.d.ts +6 -2
  33. package/dist/models/Filter.js +24 -0
  34. package/dist/models/Filter.js.map +1 -1
  35. package/dist/models/FilterExpression.d.ts +27 -0
  36. package/dist/models/FilterExpression.js +70 -0
  37. package/dist/models/FilterExpression.js.map +1 -0
  38. package/dist/models/{CancelNotificationSuccessResponse.d.ts → GenericError.d.ts} +3 -1
  39. package/dist/models/GenericError.js +34 -0
  40. package/dist/models/GenericError.js.map +1 -0
  41. package/dist/models/{IdentifyUserConflictResponseErrorsInner.d.ts → GenericErrorErrorsInner.d.ts} +1 -1
  42. package/dist/models/GenericErrorErrorsInner.js +28 -0
  43. package/dist/models/GenericErrorErrorsInner.js.map +1 -0
  44. package/dist/models/{DeletePlayerSuccessResponse.d.ts → GenericSuccessBoolResponse.d.ts} +1 -1
  45. package/dist/models/GenericSuccessBoolResponse.js +22 -0
  46. package/dist/models/GenericSuccessBoolResponse.js.map +1 -0
  47. package/dist/models/{GetNotificationRequestBody.d.ts → GetNotificationHistoryRequestBody.d.ts} +3 -3
  48. package/dist/models/GetNotificationHistoryRequestBody.js +34 -0
  49. package/dist/models/GetNotificationHistoryRequestBody.js.map +1 -0
  50. package/dist/models/{PlayerSlice.d.ts → GetSegmentsSuccessResponse.d.ts} +3 -3
  51. package/dist/models/GetSegmentsSuccessResponse.js +40 -0
  52. package/dist/models/GetSegmentsSuccessResponse.js.map +1 -0
  53. package/dist/models/InvalidIdentifierError.d.ts +1 -1
  54. package/dist/models/InvalidIdentifierError.js +2 -2
  55. package/dist/models/InvalidIdentifierError.js.map +1 -1
  56. package/dist/models/{StringMap.d.ts → LanguageStringMap.d.ts} +1 -1
  57. package/dist/models/{StringMap.js → LanguageStringMap.js} +10 -10
  58. package/dist/models/LanguageStringMap.js.map +1 -0
  59. package/dist/models/Notification.d.ts +14 -12
  60. package/dist/models/Notification.js +20 -20
  61. package/dist/models/Notification.js.map +1 -1
  62. package/dist/models/NotificationTarget.d.ts +4 -4
  63. package/dist/models/NotificationTarget.js +3 -9
  64. package/dist/models/NotificationTarget.js.map +1 -1
  65. package/dist/models/NotificationWithMeta.d.ts +14 -12
  66. package/dist/models/NotificationWithMeta.js +20 -20
  67. package/dist/models/NotificationWithMeta.js.map +1 -1
  68. package/dist/models/ObjectSerializer.d.ts +17 -33
  69. package/dist/models/ObjectSerializer.js +56 -105
  70. package/dist/models/ObjectSerializer.js.map +1 -1
  71. package/dist/models/{InlineResponse202.d.ts → PropertiesBody.d.ts} +1 -1
  72. package/dist/models/PropertiesBody.js +22 -0
  73. package/dist/models/PropertiesBody.js.map +1 -0
  74. package/dist/models/{BadRequestError.d.ts → RateLimitError.d.ts} +2 -1
  75. package/dist/models/RateLimitError.js +28 -0
  76. package/dist/models/RateLimitError.js.map +1 -0
  77. package/dist/models/RateLimiterError.d.ts +18 -0
  78. package/dist/models/RateLimiterError.js +22 -0
  79. package/dist/models/RateLimiterError.js.map +1 -0
  80. package/dist/models/Segment.d.ts +2 -2
  81. package/dist/models/Segment.js +1 -1
  82. package/dist/models/Segment.js.map +1 -1
  83. package/dist/models/{CreatePlayerSuccessResponse.d.ts → SegmentData.d.ts} +7 -2
  84. package/dist/models/SegmentData.js +58 -0
  85. package/dist/models/SegmentData.js.map +1 -0
  86. package/dist/models/{SubscriptionObject.d.ts → Subscription.d.ts} +3 -3
  87. package/dist/models/{SubscriptionObject.js → Subscription.js} +11 -11
  88. package/dist/models/Subscription.js.map +1 -0
  89. package/dist/models/{BeginLiveActivityRequest.d.ts → SubscriptionBody.d.ts} +3 -3
  90. package/dist/models/SubscriptionBody.js +22 -0
  91. package/dist/models/SubscriptionBody.js.map +1 -0
  92. package/dist/models/{PlayerNotificationTarget.d.ts → SubscriptionNotificationTarget.d.ts} +7 -7
  93. package/dist/models/{PlayerNotificationTarget.js → SubscriptionNotificationTarget.js} +14 -20
  94. package/dist/models/SubscriptionNotificationTarget.js.map +1 -0
  95. package/dist/models/TransferSubscriptionRequestBody.d.ts +1 -1
  96. package/dist/models/TransferSubscriptionRequestBody.js +1 -1
  97. package/dist/models/TransferSubscriptionRequestBody.js.map +1 -1
  98. package/dist/models/UpdateLiveActivityRequest.d.ts +8 -3
  99. package/dist/models/UpdateLiveActivityRequest.js +33 -3
  100. package/dist/models/UpdateLiveActivityRequest.js.map +1 -1
  101. package/dist/models/UpdateLiveActivitySuccessResponse.d.ts +1 -3
  102. package/dist/models/UpdateLiveActivitySuccessResponse.js +2 -8
  103. package/dist/models/UpdateLiveActivitySuccessResponse.js.map +1 -1
  104. package/dist/models/User.d.ts +3 -5
  105. package/dist/models/User.js +2 -8
  106. package/dist/models/User.js.map +1 -1
  107. package/dist/models/{InlineResponse200.d.ts → UserIdentityBody.d.ts} +2 -2
  108. package/dist/models/UserIdentityBody.js +22 -0
  109. package/dist/models/UserIdentityBody.js.map +1 -0
  110. package/dist/models/{CreateNotificationBadRequestResponse.d.ts → WebButton.d.ts} +5 -2
  111. package/dist/models/WebButton.js +40 -0
  112. package/dist/models/WebButton.js.map +1 -0
  113. package/dist/models/all.d.ts +17 -33
  114. package/dist/models/all.js +17 -33
  115. package/dist/models/all.js.map +1 -1
  116. package/dist/servers.js +1 -1
  117. package/dist/servers.js.map +1 -1
  118. package/dist/types/ObjectParamAPI.d.ts +56 -100
  119. package/dist/types/ObjectParamAPI.js +28 -46
  120. package/dist/types/ObjectParamAPI.js.map +1 -1
  121. package/dist/types/ObservableAPI.d.ts +27 -45
  122. package/dist/types/ObservableAPI.js +82 -226
  123. package/dist/types/ObservableAPI.js.map +1 -1
  124. package/dist/types/PromiseAPI.d.ts +27 -45
  125. package/dist/types/PromiseAPI.js +34 -58
  126. package/dist/types/PromiseAPI.js.map +1 -1
  127. package/models/App.ts +1 -1
  128. package/models/BasicNotification.ts +49 -46
  129. package/models/BasicNotificationAllOf.ts +34 -23
  130. package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
  131. package/models/Button.ts +1 -1
  132. package/models/CreateNotificationSuccessResponse.ts +5 -13
  133. package/models/CreateSegmentConflictResponse.ts +1 -1
  134. package/models/CreateSegmentSuccessResponse.ts +1 -1
  135. package/models/CreateUserConflictResponse.ts +1 -1
  136. package/models/CreateUserConflictResponseErrorsInner.ts +1 -1
  137. package/models/CreateUserConflictResponseErrorsItemsMeta.ts +1 -1
  138. package/models/DeliveryData.ts +1 -1
  139. package/models/{ExportPlayersSuccessResponse.ts → ExportEventsSuccessResponse.ts} +3 -3
  140. package/models/{ExportPlayersRequestBody.ts → ExportSubscriptionsRequestBody.ts} +3 -3
  141. package/models/{CancelNotificationSuccessResponse.ts → ExportSubscriptionsSuccessResponse.ts} +7 -7
  142. package/models/Filter.ts +45 -5
  143. package/models/FilterExpression.ts +120 -0
  144. package/models/{CreateSegmentBadRequestResponse.ts → GenericError.ts} +14 -7
  145. package/models/{IdentifyUserConflictResponseErrorsInner.ts → GenericErrorErrorsInner.ts} +3 -3
  146. package/models/{DeletePlayerNotFoundResponse.ts → GenericSuccessBoolResponse.ts} +3 -3
  147. package/models/{GetNotificationRequestBody.ts → GetNotificationHistoryRequestBody.ts} +6 -6
  148. package/models/{PlayerSlice.ts → GetSegmentsSuccessResponse.ts} +20 -8
  149. package/models/InvalidIdentifierError.ts +6 -6
  150. package/models/{StringMap.ts → LanguageStringMap.ts} +3 -3
  151. package/models/Notification.ts +49 -46
  152. package/models/NotificationAllOf.ts +1 -1
  153. package/models/NotificationHistorySuccessResponse.ts +1 -1
  154. package/models/NotificationSlice.ts +1 -1
  155. package/models/NotificationTarget.ts +17 -25
  156. package/models/NotificationWithMeta.ts +49 -46
  157. package/models/NotificationWithMetaAllOf.ts +1 -1
  158. package/models/ObjectSerializer.ts +63 -112
  159. package/models/Operator.ts +1 -1
  160. package/models/OutcomeData.ts +1 -1
  161. package/models/OutcomesData.ts +1 -1
  162. package/models/PlatformDeliveryData.ts +1 -1
  163. package/models/PlatformDeliveryDataEmailAllOf.ts +1 -1
  164. package/models/PlatformDeliveryDataSmsAllOf.ts +1 -1
  165. package/models/{InlineResponse202.ts → PropertiesBody.ts} +3 -3
  166. package/models/PropertiesDeltas.ts +1 -1
  167. package/models/PropertiesObject.ts +1 -1
  168. package/models/Purchase.ts +1 -1
  169. package/models/{NotificationHistoryBadRequestResponse.ts → RateLimitError.ts} +10 -10
  170. package/models/{BadRequestError.ts → RateLimiterError.ts} +6 -5
  171. package/models/Segment.ts +4 -4
  172. package/models/SegmentData.ts +94 -0
  173. package/models/SegmentNotificationTarget.ts +1 -1
  174. package/models/{SubscriptionObject.ts → Subscription.ts} +6 -6
  175. package/models/{InlineResponse201.ts → SubscriptionBody.ts} +6 -6
  176. package/models/{PlayerNotificationTarget.ts → SubscriptionNotificationTarget.ts} +21 -29
  177. package/models/TransferSubscriptionRequestBody.ts +3 -3
  178. package/models/UpdateLiveActivityRequest.ts +56 -9
  179. package/models/UpdateLiveActivitySuccessResponse.ts +4 -12
  180. package/models/UpdateUserRequest.ts +1 -1
  181. package/models/User.ts +6 -14
  182. package/models/{InlineResponse200.ts → UserIdentityBody.ts} +5 -5
  183. package/models/{CreatePlayerSuccessResponse.ts → WebButton.ts} +24 -10
  184. package/models/all.ts +17 -33
  185. package/package.json +2 -2
  186. package/servers.ts +1 -1
  187. package/types/ObjectParamAPI.ts +174 -345
  188. package/types/ObservableAPI.ts +117 -284
  189. package/types/PromiseAPI.ts +97 -180
  190. package/dist/models/BadRequestError.js +0 -22
  191. package/dist/models/BadRequestError.js.map +0 -1
  192. package/dist/models/BeginLiveActivityRequest.js +0 -28
  193. package/dist/models/BeginLiveActivityRequest.js.map +0 -1
  194. package/dist/models/CancelNotificationSuccessResponse.js +0 -22
  195. package/dist/models/CancelNotificationSuccessResponse.js.map +0 -1
  196. package/dist/models/CreateNotificationBadRequestResponse.js +0 -22
  197. package/dist/models/CreateNotificationBadRequestResponse.js.map +0 -1
  198. package/dist/models/CreatePlayerSuccessResponse.js +0 -28
  199. package/dist/models/CreatePlayerSuccessResponse.js.map +0 -1
  200. package/dist/models/CreateSegmentBadRequestResponse.d.ts +0 -18
  201. package/dist/models/CreateSegmentBadRequestResponse.js +0 -28
  202. package/dist/models/CreateSegmentBadRequestResponse.js.map +0 -1
  203. package/dist/models/CreateSubscriptionRequestBody.d.ts +0 -19
  204. package/dist/models/CreateSubscriptionRequestBody.js +0 -28
  205. package/dist/models/CreateSubscriptionRequestBody.js.map +0 -1
  206. package/dist/models/DeletePlayerBadRequestResponse.d.ts +0 -17
  207. package/dist/models/DeletePlayerBadRequestResponse.js +0 -22
  208. package/dist/models/DeletePlayerBadRequestResponse.js.map +0 -1
  209. package/dist/models/DeletePlayerNotFoundResponse.js +0 -22
  210. package/dist/models/DeletePlayerNotFoundResponse.js.map +0 -1
  211. package/dist/models/DeletePlayerSuccessResponse.js +0 -22
  212. package/dist/models/DeletePlayerSuccessResponse.js.map +0 -1
  213. package/dist/models/DeleteSegmentBadRequestResponse.d.ts +0 -17
  214. package/dist/models/DeleteSegmentBadRequestResponse.js +0 -22
  215. package/dist/models/DeleteSegmentBadRequestResponse.js.map +0 -1
  216. package/dist/models/DeleteSegmentNotFoundResponse.d.ts +0 -17
  217. package/dist/models/DeleteSegmentNotFoundResponse.js +0 -22
  218. package/dist/models/DeleteSegmentNotFoundResponse.js.map +0 -1
  219. package/dist/models/DeleteSegmentSuccessResponse.d.ts +0 -17
  220. package/dist/models/DeleteSegmentSuccessResponse.js +0 -22
  221. package/dist/models/DeleteSegmentSuccessResponse.js.map +0 -1
  222. package/dist/models/ExportPlayersRequestBody.js +0 -34
  223. package/dist/models/ExportPlayersRequestBody.js.map +0 -1
  224. package/dist/models/ExportPlayersSuccessResponse.js +0 -22
  225. package/dist/models/ExportPlayersSuccessResponse.js.map +0 -1
  226. package/dist/models/FilterExpressions.d.ts +0 -23
  227. package/dist/models/FilterExpressions.js +0 -46
  228. package/dist/models/FilterExpressions.js.map +0 -1
  229. package/dist/models/FilterNotificationTarget.d.ts +0 -28
  230. package/dist/models/FilterNotificationTarget.js +0 -88
  231. package/dist/models/FilterNotificationTarget.js.map +0 -1
  232. package/dist/models/GetNotificationRequestBody.js +0 -34
  233. package/dist/models/GetNotificationRequestBody.js.map +0 -1
  234. package/dist/models/IdentifyUserConflictResponse.d.ts +0 -18
  235. package/dist/models/IdentifyUserConflictResponse.js +0 -22
  236. package/dist/models/IdentifyUserConflictResponse.js.map +0 -1
  237. package/dist/models/IdentifyUserConflictResponseErrorsInner.js +0 -28
  238. package/dist/models/IdentifyUserConflictResponseErrorsInner.js.map +0 -1
  239. package/dist/models/InlineResponse200.js +0 -22
  240. package/dist/models/InlineResponse200.js.map +0 -1
  241. package/dist/models/InlineResponse2003.d.ts +0 -17
  242. package/dist/models/InlineResponse2003.js +0 -22
  243. package/dist/models/InlineResponse2003.js.map +0 -1
  244. package/dist/models/InlineResponse201.d.ts +0 -18
  245. package/dist/models/InlineResponse201.js +0 -22
  246. package/dist/models/InlineResponse201.js.map +0 -1
  247. package/dist/models/InlineResponse202.js +0 -22
  248. package/dist/models/InlineResponse202.js.map +0 -1
  249. package/dist/models/Notification200Errors.d.ts +0 -18
  250. package/dist/models/Notification200Errors.js +0 -28
  251. package/dist/models/Notification200Errors.js.map +0 -1
  252. package/dist/models/NotificationHistoryBadRequestResponse.d.ts +0 -18
  253. package/dist/models/NotificationHistoryBadRequestResponse.js +0 -28
  254. package/dist/models/NotificationHistoryBadRequestResponse.js.map +0 -1
  255. package/dist/models/Player.d.ts +0 -43
  256. package/dist/models/Player.js +0 -178
  257. package/dist/models/Player.js.map +0 -1
  258. package/dist/models/PlayerNotificationTarget.js.map +0 -1
  259. package/dist/models/PlayerNotificationTargetIncludeAliases.d.ts +0 -17
  260. package/dist/models/PlayerNotificationTargetIncludeAliases.js +0 -22
  261. package/dist/models/PlayerNotificationTargetIncludeAliases.js.map +0 -1
  262. package/dist/models/PlayerSlice.js +0 -40
  263. package/dist/models/PlayerSlice.js.map +0 -1
  264. package/dist/models/StringMap.js.map +0 -1
  265. package/dist/models/SubscriptionObject.js.map +0 -1
  266. package/dist/models/UpdatePlayerSuccessResponse.d.ts +0 -17
  267. package/dist/models/UpdatePlayerSuccessResponse.js +0 -22
  268. package/dist/models/UpdatePlayerSuccessResponse.js.map +0 -1
  269. package/dist/models/UpdatePlayerTagsRequestBody.d.ts +0 -17
  270. package/dist/models/UpdatePlayerTagsRequestBody.js +0 -22
  271. package/dist/models/UpdatePlayerTagsRequestBody.js.map +0 -1
  272. package/dist/models/UpdatePlayerTagsSuccessResponse.d.ts +0 -17
  273. package/dist/models/UpdatePlayerTagsSuccessResponse.js +0 -22
  274. package/dist/models/UpdatePlayerTagsSuccessResponse.js.map +0 -1
  275. package/dist/models/UpdateSubscriptionRequestBody.d.ts +0 -18
  276. package/dist/models/UpdateSubscriptionRequestBody.js +0 -22
  277. package/dist/models/UpdateSubscriptionRequestBody.js.map +0 -1
  278. package/dist/models/UserIdentityRequestBody.d.ts +0 -19
  279. package/dist/models/UserIdentityRequestBody.js +0 -22
  280. package/dist/models/UserIdentityRequestBody.js.map +0 -1
  281. package/dist/models/UserIdentityResponse.d.ts +0 -19
  282. package/dist/models/UserIdentityResponse.js +0 -22
  283. package/dist/models/UserIdentityResponse.js.map +0 -1
  284. package/dist/models/UserSubscriptionOptions.d.ts +0 -17
  285. package/dist/models/UserSubscriptionOptions.js +0 -22
  286. package/dist/models/UserSubscriptionOptions.js.map +0 -1
  287. package/models/BeginLiveActivityRequest.ts +0 -38
  288. package/models/CreateNotificationBadRequestResponse.ts +0 -31
  289. package/models/CreateSubscriptionRequestBody.ts +0 -39
  290. package/models/DeletePlayerBadRequestResponse.ts +0 -31
  291. package/models/DeletePlayerSuccessResponse.ts +0 -31
  292. package/models/DeleteSegmentBadRequestResponse.ts +0 -31
  293. package/models/DeleteSegmentNotFoundResponse.ts +0 -31
  294. package/models/DeleteSegmentSuccessResponse.ts +0 -31
  295. package/models/FilterExpressions.ts +0 -80
  296. package/models/FilterNotificationTarget.ts +0 -144
  297. package/models/IdentifyUserConflictResponse.ts +0 -32
  298. package/models/InlineResponse2003.ts +0 -31
  299. package/models/Notification200Errors.ts +0 -45
  300. package/models/Player.ts +0 -291
  301. package/models/PlayerNotificationTargetIncludeAliases.ts +0 -31
  302. package/models/UpdatePlayerSuccessResponse.ts +0 -31
  303. package/models/UpdatePlayerTagsRequestBody.ts +0 -34
  304. package/models/UpdatePlayerTagsSuccessResponse.ts +0 -31
  305. package/models/UpdateSubscriptionRequestBody.ts +0 -32
  306. package/models/UserIdentityRequestBody.ts +0 -31
  307. package/models/UserIdentityResponse.ts +0 -31
  308. package/models/UserSubscriptionOptions.ts +0 -31
@@ -3,40 +3,29 @@ import * as models from '../models/all';
3
3
  import { Configuration} from '../configuration'
4
4
 
5
5
  import { App } from '../models/App';
6
- import { BadRequestError } from '../models/BadRequestError';
7
6
  import { BasicNotification } from '../models/BasicNotification';
8
7
  import { BasicNotificationAllOf } from '../models/BasicNotificationAllOf';
9
8
  import { BasicNotificationAllOfAndroidBackgroundLayout } from '../models/BasicNotificationAllOfAndroidBackgroundLayout';
10
- import { BeginLiveActivityRequest } from '../models/BeginLiveActivityRequest';
11
9
  import { Button } from '../models/Button';
12
- import { CancelNotificationSuccessResponse } from '../models/CancelNotificationSuccessResponse';
13
10
  import { CreateNotificationSuccessResponse } from '../models/CreateNotificationSuccessResponse';
14
- import { CreatePlayerSuccessResponse } from '../models/CreatePlayerSuccessResponse';
15
11
  import { CreateSegmentConflictResponse } from '../models/CreateSegmentConflictResponse';
16
12
  import { CreateSegmentSuccessResponse } from '../models/CreateSegmentSuccessResponse';
17
- import { CreateSubscriptionRequestBody } from '../models/CreateSubscriptionRequestBody';
18
13
  import { CreateUserConflictResponse } from '../models/CreateUserConflictResponse';
19
14
  import { CreateUserConflictResponseErrorsInner } from '../models/CreateUserConflictResponseErrorsInner';
20
15
  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
16
  import { DeliveryData } from '../models/DeliveryData';
26
- import { ExportPlayersRequestBody } from '../models/ExportPlayersRequestBody';
27
- import { ExportPlayersSuccessResponse } from '../models/ExportPlayersSuccessResponse';
17
+ import { ExportEventsSuccessResponse } from '../models/ExportEventsSuccessResponse';
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';
30
- import { GetNotificationRequestBody } from '../models/GetNotificationRequestBody';
31
- import { IdentifyUserConflictResponse } from '../models/IdentifyUserConflictResponse';
32
- import { IdentifyUserConflictResponseErrorsInner } from '../models/IdentifyUserConflictResponseErrorsInner';
33
- import { InlineResponse200 } from '../models/InlineResponse200';
34
- import { InlineResponse2003 } from '../models/InlineResponse2003';
35
- import { InlineResponse201 } from '../models/InlineResponse201';
36
- import { InlineResponse202 } from '../models/InlineResponse202';
21
+ import { FilterExpression } from '../models/FilterExpression';
22
+ import { GenericError } from '../models/GenericError';
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,29 +38,24 @@ 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';
45
+ import { RateLimitError } from '../models/RateLimitError';
59
46
  import { Segment } from '../models/Segment';
47
+ import { SegmentData } from '../models/SegmentData';
60
48
  import { SegmentNotificationTarget } from '../models/SegmentNotificationTarget';
61
- import { StringMap } from '../models/StringMap';
62
- import { SubscriptionObject } from '../models/SubscriptionObject';
49
+ import { Subscription } from '../models/Subscription';
50
+ import { SubscriptionBody } from '../models/SubscriptionBody';
51
+ import { SubscriptionNotificationTarget } from '../models/SubscriptionNotificationTarget';
63
52
  import { TransferSubscriptionRequestBody } from '../models/TransferSubscriptionRequestBody';
64
53
  import { UpdateLiveActivityRequest } from '../models/UpdateLiveActivityRequest';
65
54
  import { UpdateLiveActivitySuccessResponse } from '../models/UpdateLiveActivitySuccessResponse';
66
- import { UpdatePlayerSuccessResponse } from '../models/UpdatePlayerSuccessResponse';
67
- import { UpdatePlayerTagsRequestBody } from '../models/UpdatePlayerTagsRequestBody';
68
- import { UpdatePlayerTagsSuccessResponse } from '../models/UpdatePlayerTagsSuccessResponse';
69
- import { UpdateSubscriptionRequestBody } from '../models/UpdateSubscriptionRequestBody';
70
55
  import { UpdateUserRequest } from '../models/UpdateUserRequest';
71
56
  import { User } from '../models/User';
72
- import { UserIdentityRequestBody } from '../models/UserIdentityRequestBody';
73
- import { UserIdentityResponse } from '../models/UserIdentityResponse';
74
- import { UserSubscriptionOptions } from '../models/UserSubscriptionOptions';
57
+ import { UserIdentityBody } from '../models/UserIdentityBody';
58
+ import { WebButton } from '../models/WebButton';
75
59
  import { ObservableDefaultApi } from './ObservableAPI';
76
60
 
77
61
  import { DefaultApiRequestFactory, DefaultApiResponseProcessor} from "../apis/DefaultApi";
@@ -87,25 +71,36 @@ export class PromiseDefaultApi {
87
71
  }
88
72
 
89
73
  /**
90
- * Starts a Live Activity
91
- * Start Live Activity
92
- * @param appId The OneSignal App ID for your app. Available in Keys & IDs.
93
- * @param activityId Live Activity record ID
94
- * @param beginLiveActivityRequest
74
+ * Used to stop a scheduled or currently outgoing notification
75
+ * Stop a scheduled or currently outgoing notification
76
+ * @param appId
77
+ * @param notificationId
95
78
  */
96
- public beginLiveActivity(appId: string, activityId: string, beginLiveActivityRequest: BeginLiveActivityRequest, _options?: Configuration): Promise<void> {
97
- const result = this.api.beginLiveActivity(appId, activityId, beginLiveActivityRequest, _options);
79
+ public cancelNotification(appId: string, notificationId: string, _options?: Configuration): Promise<GenericSuccessBoolResponse> {
80
+ const result = this.api.cancelNotification(appId, notificationId, _options);
98
81
  return result.toPromise();
99
82
  }
100
83
 
101
84
  /**
102
- * Used to stop a scheduled or currently outgoing notification
103
- * Stop a scheduled or currently outgoing notification
85
+ * Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
104
86
  * @param appId
105
- * @param notificationId
87
+ * @param aliasLabel
88
+ * @param aliasId
89
+ * @param userIdentityBody
106
90
  */
107
- public cancelNotification(appId: string, notificationId: string, _options?: Configuration): Promise<CancelNotificationSuccessResponse> {
108
- const result = this.api.cancelNotification(appId, notificationId, _options);
91
+ public createAlias(appId: string, aliasLabel: string, aliasId: string, userIdentityBody: UserIdentityBody, _options?: Configuration): Promise<UserIdentityBody> {
92
+ const result = this.api.createAlias(appId, aliasLabel, aliasId, userIdentityBody, _options);
93
+ return result.toPromise();
94
+ }
95
+
96
+ /**
97
+ * Upserts one or more Aliases for the User identified by :subscription_id.
98
+ * @param appId
99
+ * @param subscriptionId
100
+ * @param userIdentityBody
101
+ */
102
+ public createAliasBySubscription(appId: string, subscriptionId: string, userIdentityBody: UserIdentityBody, _options?: Configuration): Promise<UserIdentityBody> {
103
+ const result = this.api.createAliasBySubscription(appId, subscriptionId, userIdentityBody, _options);
109
104
  return result.toPromise();
110
105
  }
111
106
 
@@ -130,23 +125,13 @@ export class PromiseDefaultApi {
130
125
  }
131
126
 
132
127
  /**
133
- * 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.
134
- * Add a device
135
- * @param player
136
- */
137
- public createPlayer(player: Player, _options?: Configuration): Promise<CreatePlayerSuccessResponse> {
138
- const result = this.api.createPlayer(player, _options);
139
- return result.toPromise();
140
- }
141
-
142
- /**
143
- * 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.
144
- * Create Segments
128
+ * 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.
129
+ * Create Segment
145
130
  * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
146
131
  * @param segment
147
132
  */
148
- public createSegments(appId: string, segment?: Segment, _options?: Configuration): Promise<CreateSegmentSuccessResponse> {
149
- const result = this.api.createSegments(appId, segment, _options);
133
+ public createSegment(appId: string, segment?: Segment, _options?: Configuration): Promise<CreateSegmentSuccessResponse> {
134
+ const result = this.api.createSegment(appId, segment, _options);
150
135
  return result.toPromise();
151
136
  }
152
137
 
@@ -155,10 +140,10 @@ export class PromiseDefaultApi {
155
140
  * @param appId
156
141
  * @param aliasLabel
157
142
  * @param aliasId
158
- * @param createSubscriptionRequestBody
143
+ * @param subscriptionBody
159
144
  */
160
- public createSubscription(appId: string, aliasLabel: string, aliasId: string, createSubscriptionRequestBody: CreateSubscriptionRequestBody, _options?: Configuration): Promise<InlineResponse201> {
161
- const result = this.api.createSubscription(appId, aliasLabel, aliasId, createSubscriptionRequestBody, _options);
145
+ public createSubscription(appId: string, aliasLabel: string, aliasId: string, subscriptionBody: SubscriptionBody, _options?: Configuration): Promise<SubscriptionBody> {
146
+ const result = this.api.createSubscription(appId, aliasLabel, aliasId, subscriptionBody, _options);
162
147
  return result.toPromise();
163
148
  }
164
149
 
@@ -179,30 +164,19 @@ export class PromiseDefaultApi {
179
164
  * @param aliasId
180
165
  * @param aliasLabelToDelete
181
166
  */
182
- public deleteAlias(appId: string, aliasLabel: string, aliasId: string, aliasLabelToDelete: string, _options?: Configuration): Promise<InlineResponse200> {
167
+ public deleteAlias(appId: string, aliasLabel: string, aliasId: string, aliasLabelToDelete: string, _options?: Configuration): Promise<UserIdentityBody> {
183
168
  const result = this.api.deleteAlias(appId, aliasLabel, aliasId, aliasLabelToDelete, _options);
184
169
  return result.toPromise();
185
170
  }
186
171
 
187
172
  /**
188
- * Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
189
- * Delete a user record
190
- * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
191
- * @param playerId The OneSignal player_id
192
- */
193
- public deletePlayer(appId: string, playerId: string, _options?: Configuration): Promise<DeletePlayerSuccessResponse> {
194
- const result = this.api.deletePlayer(appId, playerId, _options);
195
- return result.toPromise();
196
- }
197
-
198
- /**
199
- * 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.
200
- * Delete Segments
173
+ * 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.
174
+ * Delete Segment
201
175
  * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
202
176
  * @param segmentId The segment_id can be found in the URL of the segment when viewing it in the dashboard.
203
177
  */
204
- public deleteSegments(appId: string, segmentId: string, _options?: Configuration): Promise<DeleteSegmentSuccessResponse> {
205
- const result = this.api.deleteSegments(appId, segmentId, _options);
178
+ public deleteSegment(appId: string, segmentId: string, _options?: Configuration): Promise<GenericSuccessBoolResponse> {
179
+ const result = this.api.deleteSegment(appId, segmentId, _options);
206
180
  return result.toPromise();
207
181
  }
208
182
 
@@ -228,57 +202,45 @@ export class PromiseDefaultApi {
228
202
  }
229
203
 
230
204
  /**
231
- * Stops a Live Activity
232
- * Stop Live Activity
233
- * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
234
- * @param activityId Live Activity record ID
235
- * @param subscriptionId Subscription ID
205
+ * 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.
206
+ * Export CSV of Events
207
+ * @param notificationId The ID of the notification to export events from.
208
+ * @param appId The ID of the app that the notification belongs to.
236
209
  */
237
- public endLiveActivity(appId: string, activityId: string, subscriptionId: string, _options?: Configuration): Promise<void> {
238
- const result = this.api.endLiveActivity(appId, activityId, subscriptionId, _options);
210
+ public exportEvents(notificationId: string, appId: string, _options?: Configuration): Promise<ExportEventsSuccessResponse> {
211
+ const result = this.api.exportEvents(notificationId, appId, _options);
239
212
  return result.toPromise();
240
213
  }
241
214
 
242
215
  /**
243
216
  * 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. |
244
- * CSV export
217
+ * Export CSV of Subscriptions
245
218
  * @param appId The app ID that you want to export devices from
246
- * @param exportPlayersRequestBody
247
- */
248
- public exportPlayers(appId: string, exportPlayersRequestBody?: ExportPlayersRequestBody, _options?: Configuration): Promise<ExportPlayersSuccessResponse> {
249
- const result = this.api.exportPlayers(appId, exportPlayersRequestBody, _options);
250
- return result.toPromise();
251
- }
252
-
253
- /**
254
- * Lists all Aliases for the User identified by :subscription_id.
255
- * @param appId
256
- * @param subscriptionId
219
+ * @param exportSubscriptionsRequestBody
257
220
  */
258
- public fetchAliases(appId: string, subscriptionId: string, _options?: Configuration): Promise<UserIdentityResponse> {
259
- const result = this.api.fetchAliases(appId, subscriptionId, _options);
221
+ public exportSubscriptions(appId: string, exportSubscriptionsRequestBody?: ExportSubscriptionsRequestBody, _options?: Configuration): Promise<ExportSubscriptionsSuccessResponse> {
222
+ const result = this.api.exportSubscriptions(appId, exportSubscriptionsRequestBody, _options);
260
223
  return result.toPromise();
261
224
  }
262
225
 
263
226
  /**
264
- * Returns the User’s properties, Aliases, and Subscriptions.
227
+ * Lists all Aliases for the User identified by (:alias_label, :alias_id).
265
228
  * @param appId
266
229
  * @param aliasLabel
267
230
  * @param aliasId
268
231
  */
269
- public fetchUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<User> {
270
- const result = this.api.fetchUser(appId, aliasLabel, aliasId, _options);
232
+ public getAliases(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<UserIdentityBody> {
233
+ const result = this.api.getAliases(appId, aliasLabel, aliasId, _options);
271
234
  return result.toPromise();
272
235
  }
273
236
 
274
237
  /**
275
- * Lists all Aliases for the User identified by (:alias_label, :alias_id).
238
+ * Lists all Aliases for the User identified by :subscription_id.
276
239
  * @param appId
277
- * @param aliasLabel
278
- * @param aliasId
240
+ * @param subscriptionId
279
241
  */
280
- public fetchUserIdentity(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<InlineResponse200> {
281
- const result = this.api.fetchUserIdentity(appId, aliasLabel, aliasId, _options);
242
+ public getAliasesBySubscription(appId: string, subscriptionId: string, _options?: Configuration): Promise<UserIdentityBody> {
243
+ const result = this.api.getAliasesBySubscription(appId, subscriptionId, _options);
282
244
  return result.toPromise();
283
245
  }
284
246
 
@@ -301,16 +263,6 @@ export class PromiseDefaultApi {
301
263
  return result.toPromise();
302
264
  }
303
265
 
304
- /**
305
- * Manifest of In-App Messages the Subscription is eligible to display by the SDK.
306
- * @param appId
307
- * @param subscriptionId
308
- */
309
- public getEligibleIams(appId: string, subscriptionId: string, _options?: Configuration): Promise<InlineResponse2003> {
310
- const result = this.api.getEligibleIams(appId, subscriptionId, _options);
311
- return result.toPromise();
312
- }
313
-
314
266
  /**
315
267
  * View the details of a single notification and outcomes associated with it
316
268
  * View notification
@@ -326,10 +278,10 @@ export class PromiseDefaultApi {
326
278
  * -> 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.
327
279
  * Notification History
328
280
  * @param notificationId The \&quot;id\&quot; of the message found in the Notification object
329
- * @param getNotificationRequestBody
281
+ * @param getNotificationHistoryRequestBody
330
282
  */
331
- public getNotificationHistory(notificationId: string, getNotificationRequestBody: GetNotificationRequestBody, _options?: Configuration): Promise<NotificationHistorySuccessResponse> {
332
- const result = this.api.getNotificationHistory(notificationId, getNotificationRequestBody, _options);
283
+ public getNotificationHistory(notificationId: string, getNotificationHistoryRequestBody: GetNotificationHistoryRequestBody, _options?: Configuration): Promise<NotificationHistorySuccessResponse> {
284
+ const result = this.api.getNotificationHistory(notificationId, getNotificationHistoryRequestBody, _options);
333
285
  return result.toPromise();
334
286
  }
335
287
 
@@ -362,60 +314,48 @@ export class PromiseDefaultApi {
362
314
  }
363
315
 
364
316
  /**
365
- * View the details of an existing device in one of your OneSignal apps
366
- * View device
367
- * @param appId Your app_id for this device
368
- * @param playerId Player\&#39;s OneSignal ID
369
- * @param emailAuthHash Email - Only required if you have enabled Identity Verification and device_type is email (11).
370
- */
371
- public getPlayer(appId: string, playerId: string, emailAuthHash?: string, _options?: Configuration): Promise<Player> {
372
- const result = this.api.getPlayer(appId, playerId, emailAuthHash, _options);
373
- return result.toPromise();
374
- }
375
-
376
- /**
377
- * 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.
378
- * View devices
379
- * @param appId The app ID that you want to view players from
380
- * @param limit How many devices to return. Max is 300. Default is 300
381
- * @param offset Result offset. Default is 0. Results are sorted by id;
317
+ * Returns an array of segments from an app.
318
+ * Get Segments
319
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
320
+ * @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.
321
+ * @param limit The amount of Segments in the response. Maximum 300.
382
322
  */
383
- public getPlayers(appId: string, limit?: number, offset?: number, _options?: Configuration): Promise<PlayerSlice> {
384
- const result = this.api.getPlayers(appId, limit, offset, _options);
323
+ public getSegments(appId: string, offset?: number, limit?: number, _options?: Configuration): Promise<GetSegmentsSuccessResponse> {
324
+ const result = this.api.getSegments(appId, offset, limit, _options);
385
325
  return result.toPromise();
386
326
  }
387
327
 
388
328
  /**
389
- * Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
329
+ * Returns the User’s properties, Aliases, and Subscriptions.
390
330
  * @param appId
391
331
  * @param aliasLabel
392
332
  * @param aliasId
393
- * @param userIdentityRequestBody
394
333
  */
395
- public identifyUserByAlias(appId: string, aliasLabel: string, aliasId: string, userIdentityRequestBody: UserIdentityRequestBody, _options?: Configuration): Promise<InlineResponse200> {
396
- const result = this.api.identifyUserByAlias(appId, aliasLabel, aliasId, userIdentityRequestBody, _options);
334
+ public getUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<User> {
335
+ const result = this.api.getUser(appId, aliasLabel, aliasId, _options);
397
336
  return result.toPromise();
398
337
  }
399
338
 
400
339
  /**
401
- * Upserts one or more Aliases for the User identified by :subscription_id.
340
+ * Transfers this Subscription to the User identified by the identity in the payload.
402
341
  * @param appId
403
342
  * @param subscriptionId
404
- * @param userIdentityRequestBody
343
+ * @param transferSubscriptionRequestBody
405
344
  */
406
- public identifyUserBySubscriptionId(appId: string, subscriptionId: string, userIdentityRequestBody: UserIdentityRequestBody, _options?: Configuration): Promise<UserIdentityResponse> {
407
- const result = this.api.identifyUserBySubscriptionId(appId, subscriptionId, userIdentityRequestBody, _options);
345
+ public transferSubscription(appId: string, subscriptionId: string, transferSubscriptionRequestBody: TransferSubscriptionRequestBody, _options?: Configuration): Promise<UserIdentityBody> {
346
+ const result = this.api.transferSubscription(appId, subscriptionId, transferSubscriptionRequestBody, _options);
408
347
  return result.toPromise();
409
348
  }
410
349
 
411
350
  /**
412
- * Transfers this Subscription to the User identified by the identity in the payload.
413
- * @param appId
414
- * @param subscriptionId
415
- * @param transferSubscriptionRequestBody
351
+ * Unsubscribe an email with a token when using your own custom email unsubscribe landing page
352
+ * Unsubscribe with token
353
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
354
+ * @param notificationId The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report.
355
+ * @param token The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email.
416
356
  */
417
- public transferSubscription(appId: string, subscriptionId: string, transferSubscriptionRequestBody: TransferSubscriptionRequestBody, _options?: Configuration): Promise<UserIdentityResponse> {
418
- const result = this.api.transferSubscription(appId, subscriptionId, transferSubscriptionRequestBody, _options);
357
+ public unsubscribeEmailWithToken(appId: string, notificationId: string, token: string, _options?: Configuration): Promise<GenericSuccessBoolResponse> {
358
+ const result = this.api.unsubscribeEmailWithToken(appId, notificationId, token, _options);
419
359
  return result.toPromise();
420
360
  }
421
361
 
@@ -442,37 +382,14 @@ export class PromiseDefaultApi {
442
382
  return result.toPromise();
443
383
  }
444
384
 
445
- /**
446
- * Update an existing device in one of your OneSignal apps
447
- * Edit device
448
- * @param playerId Player\&#39;s OneSignal ID
449
- * @param player
450
- */
451
- public updatePlayer(playerId: string, player: Player, _options?: Configuration): Promise<UpdatePlayerSuccessResponse> {
452
- const result = this.api.updatePlayer(playerId, player, _options);
453
- return result.toPromise();
454
- }
455
-
456
- /**
457
- * 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\" }
458
- * Edit tags with external user id
459
- * @param appId The OneSignal App ID the user record is found under.
460
- * @param externalUserId The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated.
461
- * @param updatePlayerTagsRequestBody
462
- */
463
- public updatePlayerTags(appId: string, externalUserId: string, updatePlayerTagsRequestBody?: UpdatePlayerTagsRequestBody, _options?: Configuration): Promise<UpdatePlayerTagsSuccessResponse> {
464
- const result = this.api.updatePlayerTags(appId, externalUserId, updatePlayerTagsRequestBody, _options);
465
- return result.toPromise();
466
- }
467
-
468
385
  /**
469
386
  * Updates an existing Subscription’s properties.
470
387
  * @param appId
471
388
  * @param subscriptionId
472
- * @param updateSubscriptionRequestBody
389
+ * @param subscriptionBody
473
390
  */
474
- public updateSubscription(appId: string, subscriptionId: string, updateSubscriptionRequestBody: UpdateSubscriptionRequestBody, _options?: Configuration): Promise<void> {
475
- const result = this.api.updateSubscription(appId, subscriptionId, updateSubscriptionRequestBody, _options);
391
+ public updateSubscription(appId: string, subscriptionId: string, subscriptionBody: SubscriptionBody, _options?: Configuration): Promise<void> {
392
+ const result = this.api.updateSubscription(appId, subscriptionId, subscriptionBody, _options);
476
393
  return result.toPromise();
477
394
  }
478
395
 
@@ -483,7 +400,7 @@ export class PromiseDefaultApi {
483
400
  * @param aliasId
484
401
  * @param updateUserRequest
485
402
  */
486
- public updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise<InlineResponse202> {
403
+ public updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise<PropertiesBody> {
487
404
  const result = this.api.updateUser(appId, aliasLabel, aliasId, updateUserRequest, _options);
488
405
  return result.toPromise();
489
406
  }
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BadRequestError = void 0;
4
- var BadRequestError = (function () {
5
- function BadRequestError() {
6
- }
7
- BadRequestError.getAttributeTypeMap = function () {
8
- return BadRequestError.attributeTypeMap;
9
- };
10
- BadRequestError.discriminator = undefined;
11
- BadRequestError.attributeTypeMap = [
12
- {
13
- "name": "errors",
14
- "baseName": "errors",
15
- "type": "Array<string>",
16
- "format": ""
17
- }
18
- ];
19
- return BadRequestError;
20
- }());
21
- exports.BadRequestError = BadRequestError;
22
- //# sourceMappingURL=BadRequestError.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BadRequestError.js","sourceRoot":"","sources":["../../models/BadRequestError.ts"],"names":[],"mappings":";;;AAUA;IAiBI;IACA,CAAC;IALM,mCAAmB,GAA1B;QACI,OAAO,eAAe,CAAC,gBAAgB,CAAC;IAC5C,CAAC;IAZe,6BAAa,GAAuB,SAAS,CAAC;IAE9C,gCAAgB,GAA0E;QACtG;YACI,MAAM,EAAE,QAAQ;YAChB,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,eAAe;YACvB,QAAQ,EAAE,EAAE;SACf;KAAK,CAAC;IAQf,sBAAC;CAAA,AAnBD,IAmBC;AAnBY,0CAAe"}
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BeginLiveActivityRequest = void 0;
4
- var BeginLiveActivityRequest = (function () {
5
- function BeginLiveActivityRequest() {
6
- }
7
- BeginLiveActivityRequest.getAttributeTypeMap = function () {
8
- return BeginLiveActivityRequest.attributeTypeMap;
9
- };
10
- BeginLiveActivityRequest.discriminator = undefined;
11
- BeginLiveActivityRequest.attributeTypeMap = [
12
- {
13
- "name": "push_token",
14
- "baseName": "push_token",
15
- "type": "string",
16
- "format": ""
17
- },
18
- {
19
- "name": "subscription_id",
20
- "baseName": "subscription_id",
21
- "type": "string",
22
- "format": ""
23
- }
24
- ];
25
- return BeginLiveActivityRequest;
26
- }());
27
- exports.BeginLiveActivityRequest = BeginLiveActivityRequest;
28
- //# sourceMappingURL=BeginLiveActivityRequest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BeginLiveActivityRequest.js","sourceRoot":"","sources":["../../models/BeginLiveActivityRequest.ts"],"names":[],"mappings":";;;AAUA;IAwBI;IACA,CAAC;IALM,4CAAmB,GAA1B;QACI,OAAO,wBAAwB,CAAC,gBAAgB,CAAC;IACrD,CAAC;IAlBe,sCAAa,GAAuB,SAAS,CAAC;IAE9C,yCAAgB,GAA0E;QACtG;YACI,MAAM,EAAE,YAAY;YACpB,UAAU,EAAE,YAAY;YACxB,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,EAAE;SACf;QACD;YACI,MAAM,EAAE,iBAAiB;YACzB,UAAU,EAAE,iBAAiB;YAC7B,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,EAAE;SACf;KAAK,CAAC;IAQf,+BAAC;CAAA,AA1BD,IA0BC;AA1BY,4DAAwB"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CancelNotificationSuccessResponse = void 0;
4
- var CancelNotificationSuccessResponse = (function () {
5
- function CancelNotificationSuccessResponse() {
6
- }
7
- CancelNotificationSuccessResponse.getAttributeTypeMap = function () {
8
- return CancelNotificationSuccessResponse.attributeTypeMap;
9
- };
10
- CancelNotificationSuccessResponse.discriminator = undefined;
11
- CancelNotificationSuccessResponse.attributeTypeMap = [
12
- {
13
- "name": "success",
14
- "baseName": "success",
15
- "type": "boolean",
16
- "format": ""
17
- }
18
- ];
19
- return CancelNotificationSuccessResponse;
20
- }());
21
- exports.CancelNotificationSuccessResponse = CancelNotificationSuccessResponse;
22
- //# sourceMappingURL=CancelNotificationSuccessResponse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CancelNotificationSuccessResponse.js","sourceRoot":"","sources":["../../models/CancelNotificationSuccessResponse.ts"],"names":[],"mappings":";;;AAUA;IAiBI;IACA,CAAC;IALM,qDAAmB,GAA1B;QACI,OAAO,iCAAiC,CAAC,gBAAgB,CAAC;IAC9D,CAAC;IAZe,+CAAa,GAAuB,SAAS,CAAC;IAE9C,kDAAgB,GAA0E;QACtG;YACI,MAAM,EAAE,SAAS;YACjB,UAAU,EAAE,SAAS;YACrB,MAAM,EAAE,SAAS;YACjB,QAAQ,EAAE,EAAE;SACf;KAAK,CAAC;IAQf,wCAAC;CAAA,AAnBD,IAmBC;AAnBY,8EAAiC"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateNotificationBadRequestResponse = void 0;
4
- var CreateNotificationBadRequestResponse = (function () {
5
- function CreateNotificationBadRequestResponse() {
6
- }
7
- CreateNotificationBadRequestResponse.getAttributeTypeMap = function () {
8
- return CreateNotificationBadRequestResponse.attributeTypeMap;
9
- };
10
- CreateNotificationBadRequestResponse.discriminator = undefined;
11
- CreateNotificationBadRequestResponse.attributeTypeMap = [
12
- {
13
- "name": "errors",
14
- "baseName": "errors",
15
- "type": "Array<string>",
16
- "format": ""
17
- }
18
- ];
19
- return CreateNotificationBadRequestResponse;
20
- }());
21
- exports.CreateNotificationBadRequestResponse = CreateNotificationBadRequestResponse;
22
- //# sourceMappingURL=CreateNotificationBadRequestResponse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreateNotificationBadRequestResponse.js","sourceRoot":"","sources":["../../models/CreateNotificationBadRequestResponse.ts"],"names":[],"mappings":";;;AAUA;IAiBI;IACA,CAAC;IALM,wDAAmB,GAA1B;QACI,OAAO,oCAAoC,CAAC,gBAAgB,CAAC;IACjE,CAAC;IAZe,kDAAa,GAAuB,SAAS,CAAC;IAE9C,qDAAgB,GAA0E;QACtG;YACI,MAAM,EAAE,QAAQ;YAChB,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,eAAe;YACvB,QAAQ,EAAE,EAAE;SACf;KAAK,CAAC;IAQf,2CAAC;CAAA,AAnBD,IAmBC;AAnBY,oFAAoC"}
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreatePlayerSuccessResponse = void 0;
4
- var CreatePlayerSuccessResponse = (function () {
5
- function CreatePlayerSuccessResponse() {
6
- }
7
- CreatePlayerSuccessResponse.getAttributeTypeMap = function () {
8
- return CreatePlayerSuccessResponse.attributeTypeMap;
9
- };
10
- CreatePlayerSuccessResponse.discriminator = undefined;
11
- CreatePlayerSuccessResponse.attributeTypeMap = [
12
- {
13
- "name": "success",
14
- "baseName": "success",
15
- "type": "boolean",
16
- "format": ""
17
- },
18
- {
19
- "name": "id",
20
- "baseName": "id",
21
- "type": "string",
22
- "format": ""
23
- }
24
- ];
25
- return CreatePlayerSuccessResponse;
26
- }());
27
- exports.CreatePlayerSuccessResponse = CreatePlayerSuccessResponse;
28
- //# sourceMappingURL=CreatePlayerSuccessResponse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreatePlayerSuccessResponse.js","sourceRoot":"","sources":["../../models/CreatePlayerSuccessResponse.ts"],"names":[],"mappings":";;;AAUA;IAwBI;IACA,CAAC;IALM,+CAAmB,GAA1B;QACI,OAAO,2BAA2B,CAAC,gBAAgB,CAAC;IACxD,CAAC;IAlBe,yCAAa,GAAuB,SAAS,CAAC;IAE9C,4CAAgB,GAA0E;QACtG;YACI,MAAM,EAAE,SAAS;YACjB,UAAU,EAAE,SAAS;YACrB,MAAM,EAAE,SAAS;YACjB,QAAQ,EAAE,EAAE;SACf;QACD;YACI,MAAM,EAAE,IAAI;YACZ,UAAU,EAAE,IAAI;YAChB,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,EAAE;SACf;KAAK,CAAC;IAQf,kCAAC;CAAA,AA1BD,IA0BC;AA1BY,kEAA2B"}