@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
@@ -11,46 +11,32 @@ import {SecurityAuthentication} from '../auth/auth';
11
11
 
12
12
 
13
13
  import { App } from '../models/App';
14
- import { BadRequestError } from '../models/BadRequestError';
15
- import { BeginLiveActivityRequest } from '../models/BeginLiveActivityRequest';
16
- import { CancelNotificationSuccessResponse } from '../models/CancelNotificationSuccessResponse';
17
14
  import { CreateNotificationSuccessResponse } from '../models/CreateNotificationSuccessResponse';
18
- import { CreatePlayerSuccessResponse } from '../models/CreatePlayerSuccessResponse';
19
15
  import { CreateSegmentConflictResponse } from '../models/CreateSegmentConflictResponse';
20
16
  import { CreateSegmentSuccessResponse } from '../models/CreateSegmentSuccessResponse';
21
- import { CreateSubscriptionRequestBody } from '../models/CreateSubscriptionRequestBody';
22
17
  import { CreateUserConflictResponse } from '../models/CreateUserConflictResponse';
23
- import { DeletePlayerNotFoundResponse } from '../models/DeletePlayerNotFoundResponse';
24
- import { DeletePlayerSuccessResponse } from '../models/DeletePlayerSuccessResponse';
25
- import { DeleteSegmentNotFoundResponse } from '../models/DeleteSegmentNotFoundResponse';
26
- import { DeleteSegmentSuccessResponse } from '../models/DeleteSegmentSuccessResponse';
27
- import { ExportPlayersRequestBody } from '../models/ExportPlayersRequestBody';
28
- import { ExportPlayersSuccessResponse } from '../models/ExportPlayersSuccessResponse';
29
- import { GetNotificationRequestBody } from '../models/GetNotificationRequestBody';
30
- import { IdentifyUserConflictResponse } from '../models/IdentifyUserConflictResponse';
31
- import { InlineResponse200 } from '../models/InlineResponse200';
32
- import { InlineResponse2003 } from '../models/InlineResponse2003';
33
- import { InlineResponse201 } from '../models/InlineResponse201';
34
- import { InlineResponse202 } from '../models/InlineResponse202';
18
+ import { ExportEventsSuccessResponse } from '../models/ExportEventsSuccessResponse';
19
+ import { ExportSubscriptionsRequestBody } from '../models/ExportSubscriptionsRequestBody';
20
+ import { ExportSubscriptionsSuccessResponse } from '../models/ExportSubscriptionsSuccessResponse';
21
+ import { GenericError } from '../models/GenericError';
22
+ import { GenericSuccessBoolResponse } from '../models/GenericSuccessBoolResponse';
23
+ import { GetNotificationHistoryRequestBody } from '../models/GetNotificationHistoryRequestBody';
24
+ import { GetSegmentsSuccessResponse } from '../models/GetSegmentsSuccessResponse';
35
25
  import { Notification } from '../models/Notification';
36
26
  import { NotificationHistorySuccessResponse } from '../models/NotificationHistorySuccessResponse';
37
27
  import { NotificationSlice } from '../models/NotificationSlice';
38
28
  import { NotificationWithMeta } from '../models/NotificationWithMeta';
39
29
  import { OutcomesData } from '../models/OutcomesData';
40
- import { Player } from '../models/Player';
41
- import { PlayerSlice } from '../models/PlayerSlice';
30
+ import { PropertiesBody } from '../models/PropertiesBody';
31
+ import { RateLimitError } from '../models/RateLimitError';
42
32
  import { Segment } from '../models/Segment';
33
+ import { SubscriptionBody } from '../models/SubscriptionBody';
43
34
  import { TransferSubscriptionRequestBody } from '../models/TransferSubscriptionRequestBody';
44
35
  import { UpdateLiveActivityRequest } from '../models/UpdateLiveActivityRequest';
45
36
  import { UpdateLiveActivitySuccessResponse } from '../models/UpdateLiveActivitySuccessResponse';
46
- import { UpdatePlayerSuccessResponse } from '../models/UpdatePlayerSuccessResponse';
47
- import { UpdatePlayerTagsRequestBody } from '../models/UpdatePlayerTagsRequestBody';
48
- import { UpdatePlayerTagsSuccessResponse } from '../models/UpdatePlayerTagsSuccessResponse';
49
- import { UpdateSubscriptionRequestBody } from '../models/UpdateSubscriptionRequestBody';
50
37
  import { UpdateUserRequest } from '../models/UpdateUserRequest';
51
38
  import { User } from '../models/User';
52
- import { UserIdentityRequestBody } from '../models/UserIdentityRequestBody';
53
- import { UserIdentityResponse } from '../models/UserIdentityResponse';
39
+ import { UserIdentityBody } from '../models/UserIdentityBody';
54
40
 
55
41
  /**
56
42
  * no description
@@ -58,57 +44,46 @@ import { UserIdentityResponse } from '../models/UserIdentityResponse';
58
44
  export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
59
45
 
60
46
  /**
61
- * Starts a Live Activity
62
- * Start Live Activity
63
- * @param appId The OneSignal App ID for your app. Available in Keys & IDs.
64
- * @param activityId Live Activity record ID
65
- * @param beginLiveActivityRequest
47
+ * Used to stop a scheduled or currently outgoing notification
48
+ * Stop a scheduled or currently outgoing notification
49
+ * @param appId
50
+ * @param notificationId
66
51
  */
67
- public async beginLiveActivity(appId: string, activityId: string, beginLiveActivityRequest: BeginLiveActivityRequest, _options?: Configuration): Promise<RequestContext> {
52
+ public async cancelNotification(appId: string, notificationId: string, _options?: Configuration): Promise<RequestContext> {
68
53
  let _config = _options || this.configuration;
69
54
 
70
55
  // verify required parameter 'appId' is not null or undefined
71
56
  if (appId === null || appId === undefined) {
72
- throw new RequiredError("DefaultApi", "beginLiveActivity", "appId");
73
- }
74
-
75
-
76
- // verify required parameter 'activityId' is not null or undefined
77
- if (activityId === null || activityId === undefined) {
78
- throw new RequiredError("DefaultApi", "beginLiveActivity", "activityId");
57
+ throw new RequiredError("DefaultApi", "cancelNotification", "appId");
79
58
  }
80
59
 
81
60
 
82
- // verify required parameter 'beginLiveActivityRequest' is not null or undefined
83
- if (beginLiveActivityRequest === null || beginLiveActivityRequest === undefined) {
84
- throw new RequiredError("DefaultApi", "beginLiveActivity", "beginLiveActivityRequest");
61
+ // verify required parameter 'notificationId' is not null or undefined
62
+ if (notificationId === null || notificationId === undefined) {
63
+ throw new RequiredError("DefaultApi", "cancelNotification", "notificationId");
85
64
  }
86
65
 
87
66
 
88
67
  // Path Params
89
- const localVarPath = '/apps/{app_id}/live_activities/{activity_id}/token'
90
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
91
- .replace('{' + 'activity_id' + '}', encodeURIComponent(String(activityId)));
68
+ const localVarPath = '/notifications/{notification_id}'
69
+ .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
92
70
 
93
71
  // Make Request Context
94
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
72
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
95
73
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
96
74
 
75
+ // Always add the One Signal telemetry to the request.
76
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
77
+
78
+ // Query Params
79
+ if (appId !== undefined) {
80
+ requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
81
+ }
97
82
 
98
- // Body Params
99
- const contentType = ObjectSerializer.getPreferredMediaType([
100
- "application/json"
101
- ]);
102
- requestContext.setHeaderParam("Content-Type", contentType);
103
- const serializedBody = ObjectSerializer.stringify(
104
- ObjectSerializer.serialize(beginLiveActivityRequest, "BeginLiveActivityRequest", ""),
105
- contentType
106
- );
107
- requestContext.setBody(serializedBody);
108
83
 
109
84
  let authMethod: SecurityAuthentication | undefined;
110
85
  // Apply auth methods
111
- authMethod = _config.authMethods["app_key"]
86
+ authMethod = _config.authMethods["rest_api_key"]
112
87
  if (authMethod?.applySecurityAuthentication) {
113
88
  await authMethod?.applySecurityAuthentication(requestContext);
114
89
  }
@@ -122,43 +97,67 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
122
97
  }
123
98
 
124
99
  /**
125
- * Used to stop a scheduled or currently outgoing notification
126
- * Stop a scheduled or currently outgoing notification
100
+ * Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
127
101
  * @param appId
128
- * @param notificationId
102
+ * @param aliasLabel
103
+ * @param aliasId
104
+ * @param userIdentityBody
129
105
  */
130
- public async cancelNotification(appId: string, notificationId: string, _options?: Configuration): Promise<RequestContext> {
106
+ public async createAlias(appId: string, aliasLabel: string, aliasId: string, userIdentityBody: UserIdentityBody, _options?: Configuration): Promise<RequestContext> {
131
107
  let _config = _options || this.configuration;
132
108
 
133
109
  // verify required parameter 'appId' is not null or undefined
134
110
  if (appId === null || appId === undefined) {
135
- throw new RequiredError("DefaultApi", "cancelNotification", "appId");
111
+ throw new RequiredError("DefaultApi", "createAlias", "appId");
136
112
  }
137
113
 
138
114
 
139
- // verify required parameter 'notificationId' is not null or undefined
140
- if (notificationId === null || notificationId === undefined) {
141
- throw new RequiredError("DefaultApi", "cancelNotification", "notificationId");
115
+ // verify required parameter 'aliasLabel' is not null or undefined
116
+ if (aliasLabel === null || aliasLabel === undefined) {
117
+ throw new RequiredError("DefaultApi", "createAlias", "aliasLabel");
118
+ }
119
+
120
+
121
+ // verify required parameter 'aliasId' is not null or undefined
122
+ if (aliasId === null || aliasId === undefined) {
123
+ throw new RequiredError("DefaultApi", "createAlias", "aliasId");
124
+ }
125
+
126
+
127
+ // verify required parameter 'userIdentityBody' is not null or undefined
128
+ if (userIdentityBody === null || userIdentityBody === undefined) {
129
+ throw new RequiredError("DefaultApi", "createAlias", "userIdentityBody");
142
130
  }
143
131
 
144
132
 
145
133
  // Path Params
146
- const localVarPath = '/notifications/{notification_id}'
147
- .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
134
+ const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity'
135
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
136
+ .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
137
+ .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
148
138
 
149
139
  // Make Request Context
150
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
140
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
151
141
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
152
142
 
153
- // Query Params
154
- if (appId !== undefined) {
155
- requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
156
- }
143
+ // Always add the One Signal telemetry to the request.
144
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
145
+
157
146
 
147
+ // Body Params
148
+ const contentType = ObjectSerializer.getPreferredMediaType([
149
+ "application/json"
150
+ ]);
151
+ requestContext.setHeaderParam("Content-Type", contentType);
152
+ const serializedBody = ObjectSerializer.stringify(
153
+ ObjectSerializer.serialize(userIdentityBody, "UserIdentityBody", ""),
154
+ contentType
155
+ );
156
+ requestContext.setBody(serializedBody);
158
157
 
159
158
  let authMethod: SecurityAuthentication | undefined;
160
159
  // Apply auth methods
161
- authMethod = _config.authMethods["app_key"]
160
+ authMethod = _config.authMethods["rest_api_key"]
162
161
  if (authMethod?.applySecurityAuthentication) {
163
162
  await authMethod?.applySecurityAuthentication(requestContext);
164
163
  }
@@ -172,26 +171,44 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
172
171
  }
173
172
 
174
173
  /**
175
- * Creates a new OneSignal app
176
- * Create an app
177
- * @param app
174
+ * Upserts one or more Aliases for the User identified by :subscription_id.
175
+ * @param appId
176
+ * @param subscriptionId
177
+ * @param userIdentityBody
178
178
  */
179
- public async createApp(app: App, _options?: Configuration): Promise<RequestContext> {
179
+ public async createAliasBySubscription(appId: string, subscriptionId: string, userIdentityBody: UserIdentityBody, _options?: Configuration): Promise<RequestContext> {
180
180
  let _config = _options || this.configuration;
181
181
 
182
- // verify required parameter 'app' is not null or undefined
183
- if (app === null || app === undefined) {
184
- throw new RequiredError("DefaultApi", "createApp", "app");
182
+ // verify required parameter 'appId' is not null or undefined
183
+ if (appId === null || appId === undefined) {
184
+ throw new RequiredError("DefaultApi", "createAliasBySubscription", "appId");
185
+ }
186
+
187
+
188
+ // verify required parameter 'subscriptionId' is not null or undefined
189
+ if (subscriptionId === null || subscriptionId === undefined) {
190
+ throw new RequiredError("DefaultApi", "createAliasBySubscription", "subscriptionId");
191
+ }
192
+
193
+
194
+ // verify required parameter 'userIdentityBody' is not null or undefined
195
+ if (userIdentityBody === null || userIdentityBody === undefined) {
196
+ throw new RequiredError("DefaultApi", "createAliasBySubscription", "userIdentityBody");
185
197
  }
186
198
 
187
199
 
188
200
  // Path Params
189
- const localVarPath = '/apps';
201
+ const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/user/identity'
202
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
203
+ .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
190
204
 
191
205
  // Make Request Context
192
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
206
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
193
207
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
194
208
 
209
+ // Always add the One Signal telemetry to the request.
210
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
211
+
195
212
 
196
213
  // Body Params
197
214
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -199,14 +216,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
199
216
  ]);
200
217
  requestContext.setHeaderParam("Content-Type", contentType);
201
218
  const serializedBody = ObjectSerializer.stringify(
202
- ObjectSerializer.serialize(app, "App", ""),
219
+ ObjectSerializer.serialize(userIdentityBody, "UserIdentityBody", ""),
203
220
  contentType
204
221
  );
205
222
  requestContext.setBody(serializedBody);
206
223
 
207
224
  let authMethod: SecurityAuthentication | undefined;
208
225
  // Apply auth methods
209
- authMethod = _config.authMethods["user_key"]
226
+ authMethod = _config.authMethods["rest_api_key"]
210
227
  if (authMethod?.applySecurityAuthentication) {
211
228
  await authMethod?.applySecurityAuthentication(requestContext);
212
229
  }
@@ -220,26 +237,29 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
220
237
  }
221
238
 
222
239
  /**
223
- * Sends notifications to your users
224
- * Create notification
225
- * @param notification
240
+ * Creates a new OneSignal app
241
+ * Create an app
242
+ * @param app
226
243
  */
227
- public async createNotification(notification: Notification, _options?: Configuration): Promise<RequestContext> {
244
+ public async createApp(app: App, _options?: Configuration): Promise<RequestContext> {
228
245
  let _config = _options || this.configuration;
229
246
 
230
- // verify required parameter 'notification' is not null or undefined
231
- if (notification === null || notification === undefined) {
232
- throw new RequiredError("DefaultApi", "createNotification", "notification");
247
+ // verify required parameter 'app' is not null or undefined
248
+ if (app === null || app === undefined) {
249
+ throw new RequiredError("DefaultApi", "createApp", "app");
233
250
  }
234
251
 
235
252
 
236
253
  // Path Params
237
- const localVarPath = '/notifications';
254
+ const localVarPath = '/apps';
238
255
 
239
256
  // Make Request Context
240
257
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
241
258
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
242
259
 
260
+ // Always add the One Signal telemetry to the request.
261
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
262
+
243
263
 
244
264
  // Body Params
245
265
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -247,14 +267,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
247
267
  ]);
248
268
  requestContext.setHeaderParam("Content-Type", contentType);
249
269
  const serializedBody = ObjectSerializer.stringify(
250
- ObjectSerializer.serialize(notification, "Notification", ""),
270
+ ObjectSerializer.serialize(app, "App", ""),
251
271
  contentType
252
272
  );
253
273
  requestContext.setBody(serializedBody);
254
274
 
255
275
  let authMethod: SecurityAuthentication | undefined;
256
276
  // Apply auth methods
257
- authMethod = _config.authMethods["app_key"]
277
+ authMethod = _config.authMethods["user_auth_key"]
258
278
  if (authMethod?.applySecurityAuthentication) {
259
279
  await authMethod?.applySecurityAuthentication(requestContext);
260
280
  }
@@ -268,26 +288,29 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
268
288
  }
269
289
 
270
290
  /**
271
- * 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.
272
- * Add a device
273
- * @param player
291
+ * Sends notifications to your users
292
+ * Create notification
293
+ * @param notification
274
294
  */
275
- public async createPlayer(player: Player, _options?: Configuration): Promise<RequestContext> {
295
+ public async createNotification(notification: Notification, _options?: Configuration): Promise<RequestContext> {
276
296
  let _config = _options || this.configuration;
277
297
 
278
- // verify required parameter 'player' is not null or undefined
279
- if (player === null || player === undefined) {
280
- throw new RequiredError("DefaultApi", "createPlayer", "player");
298
+ // verify required parameter 'notification' is not null or undefined
299
+ if (notification === null || notification === undefined) {
300
+ throw new RequiredError("DefaultApi", "createNotification", "notification");
281
301
  }
282
302
 
283
303
 
284
304
  // Path Params
285
- const localVarPath = '/players';
305
+ const localVarPath = '/notifications';
286
306
 
287
307
  // Make Request Context
288
308
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
289
309
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
290
310
 
311
+ // Always add the One Signal telemetry to the request.
312
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
313
+
291
314
 
292
315
  // Body Params
293
316
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -295,14 +318,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
295
318
  ]);
296
319
  requestContext.setHeaderParam("Content-Type", contentType);
297
320
  const serializedBody = ObjectSerializer.stringify(
298
- ObjectSerializer.serialize(player, "Player", ""),
321
+ ObjectSerializer.serialize(notification, "Notification", ""),
299
322
  contentType
300
323
  );
301
324
  requestContext.setBody(serializedBody);
302
325
 
303
326
  let authMethod: SecurityAuthentication | undefined;
304
327
  // Apply auth methods
305
- authMethod = _config.authMethods["app_key"]
328
+ authMethod = _config.authMethods["rest_api_key"]
306
329
  if (authMethod?.applySecurityAuthentication) {
307
330
  await authMethod?.applySecurityAuthentication(requestContext);
308
331
  }
@@ -316,17 +339,17 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
316
339
  }
317
340
 
318
341
  /**
319
- * 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.
320
- * Create Segments
342
+ * 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.
343
+ * Create Segment
321
344
  * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
322
345
  * @param segment
323
346
  */
324
- public async createSegments(appId: string, segment?: Segment, _options?: Configuration): Promise<RequestContext> {
347
+ public async createSegment(appId: string, segment?: Segment, _options?: Configuration): Promise<RequestContext> {
325
348
  let _config = _options || this.configuration;
326
349
 
327
350
  // verify required parameter 'appId' is not null or undefined
328
351
  if (appId === null || appId === undefined) {
329
- throw new RequiredError("DefaultApi", "createSegments", "appId");
352
+ throw new RequiredError("DefaultApi", "createSegment", "appId");
330
353
  }
331
354
 
332
355
 
@@ -339,6 +362,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
339
362
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
340
363
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
341
364
 
365
+ // Always add the One Signal telemetry to the request.
366
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
367
+
342
368
 
343
369
  // Body Params
344
370
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -353,7 +379,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
353
379
 
354
380
  let authMethod: SecurityAuthentication | undefined;
355
381
  // Apply auth methods
356
- authMethod = _config.authMethods["app_key"]
382
+ authMethod = _config.authMethods["rest_api_key"]
357
383
  if (authMethod?.applySecurityAuthentication) {
358
384
  await authMethod?.applySecurityAuthentication(requestContext);
359
385
  }
@@ -371,9 +397,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
371
397
  * @param appId
372
398
  * @param aliasLabel
373
399
  * @param aliasId
374
- * @param createSubscriptionRequestBody
400
+ * @param subscriptionBody
375
401
  */
376
- public async createSubscription(appId: string, aliasLabel: string, aliasId: string, createSubscriptionRequestBody: CreateSubscriptionRequestBody, _options?: Configuration): Promise<RequestContext> {
402
+ public async createSubscription(appId: string, aliasLabel: string, aliasId: string, subscriptionBody: SubscriptionBody, _options?: Configuration): Promise<RequestContext> {
377
403
  let _config = _options || this.configuration;
378
404
 
379
405
  // verify required parameter 'appId' is not null or undefined
@@ -394,9 +420,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
394
420
  }
395
421
 
396
422
 
397
- // verify required parameter 'createSubscriptionRequestBody' is not null or undefined
398
- if (createSubscriptionRequestBody === null || createSubscriptionRequestBody === undefined) {
399
- throw new RequiredError("DefaultApi", "createSubscription", "createSubscriptionRequestBody");
423
+ // verify required parameter 'subscriptionBody' is not null or undefined
424
+ if (subscriptionBody === null || subscriptionBody === undefined) {
425
+ throw new RequiredError("DefaultApi", "createSubscription", "subscriptionBody");
400
426
  }
401
427
 
402
428
 
@@ -410,6 +436,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
410
436
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
411
437
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
412
438
 
439
+ // Always add the One Signal telemetry to the request.
440
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
441
+
413
442
 
414
443
  // Body Params
415
444
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -417,14 +446,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
417
446
  ]);
418
447
  requestContext.setHeaderParam("Content-Type", contentType);
419
448
  const serializedBody = ObjectSerializer.stringify(
420
- ObjectSerializer.serialize(createSubscriptionRequestBody, "CreateSubscriptionRequestBody", ""),
449
+ ObjectSerializer.serialize(subscriptionBody, "SubscriptionBody", ""),
421
450
  contentType
422
451
  );
423
452
  requestContext.setBody(serializedBody);
424
453
 
425
454
  let authMethod: SecurityAuthentication | undefined;
426
455
  // Apply auth methods
427
- authMethod = _config.authMethods["app_key"]
456
+ authMethod = _config.authMethods["rest_api_key"]
428
457
  if (authMethod?.applySecurityAuthentication) {
429
458
  await authMethod?.applySecurityAuthentication(requestContext);
430
459
  }
@@ -465,6 +494,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
465
494
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
466
495
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
467
496
 
497
+ // Always add the One Signal telemetry to the request.
498
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
499
+
468
500
 
469
501
  // Body Params
470
502
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -479,7 +511,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
479
511
 
480
512
  let authMethod: SecurityAuthentication | undefined;
481
513
  // Apply auth methods
482
- authMethod = _config.authMethods["app_key"]
514
+ authMethod = _config.authMethods["rest_api_key"]
483
515
  if (authMethod?.applySecurityAuthentication) {
484
516
  await authMethod?.applySecurityAuthentication(requestContext);
485
517
  }
@@ -537,60 +569,13 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
537
569
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
538
570
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
539
571
 
540
-
541
- let authMethod: SecurityAuthentication | undefined;
542
- // Apply auth methods
543
- authMethod = _config.authMethods["app_key"]
544
- if (authMethod?.applySecurityAuthentication) {
545
- await authMethod?.applySecurityAuthentication(requestContext);
546
- }
547
-
548
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
549
- if (defaultAuth?.applySecurityAuthentication) {
550
- await defaultAuth?.applySecurityAuthentication(requestContext);
551
- }
552
-
553
- return requestContext;
554
- }
555
-
556
- /**
557
- * Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
558
- * Delete a user record
559
- * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
560
- * @param playerId The OneSignal player_id
561
- */
562
- public async deletePlayer(appId: string, playerId: string, _options?: Configuration): Promise<RequestContext> {
563
- let _config = _options || this.configuration;
564
-
565
- // verify required parameter 'appId' is not null or undefined
566
- if (appId === null || appId === undefined) {
567
- throw new RequiredError("DefaultApi", "deletePlayer", "appId");
568
- }
569
-
570
-
571
- // verify required parameter 'playerId' is not null or undefined
572
- if (playerId === null || playerId === undefined) {
573
- throw new RequiredError("DefaultApi", "deletePlayer", "playerId");
574
- }
575
-
576
-
577
- // Path Params
578
- const localVarPath = '/players/{player_id}'
579
- .replace('{' + 'player_id' + '}', encodeURIComponent(String(playerId)));
580
-
581
- // Make Request Context
582
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
583
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
584
-
585
- // Query Params
586
- if (appId !== undefined) {
587
- requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
588
- }
572
+ // Always add the One Signal telemetry to the request.
573
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
589
574
 
590
575
 
591
576
  let authMethod: SecurityAuthentication | undefined;
592
577
  // Apply auth methods
593
- authMethod = _config.authMethods["app_key"]
578
+ authMethod = _config.authMethods["rest_api_key"]
594
579
  if (authMethod?.applySecurityAuthentication) {
595
580
  await authMethod?.applySecurityAuthentication(requestContext);
596
581
  }
@@ -604,23 +589,23 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
604
589
  }
605
590
 
606
591
  /**
607
- * 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.
608
- * Delete Segments
592
+ * 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.
593
+ * Delete Segment
609
594
  * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
610
595
  * @param segmentId The segment_id can be found in the URL of the segment when viewing it in the dashboard.
611
596
  */
612
- public async deleteSegments(appId: string, segmentId: string, _options?: Configuration): Promise<RequestContext> {
597
+ public async deleteSegment(appId: string, segmentId: string, _options?: Configuration): Promise<RequestContext> {
613
598
  let _config = _options || this.configuration;
614
599
 
615
600
  // verify required parameter 'appId' is not null or undefined
616
601
  if (appId === null || appId === undefined) {
617
- throw new RequiredError("DefaultApi", "deleteSegments", "appId");
602
+ throw new RequiredError("DefaultApi", "deleteSegment", "appId");
618
603
  }
619
604
 
620
605
 
621
606
  // verify required parameter 'segmentId' is not null or undefined
622
607
  if (segmentId === null || segmentId === undefined) {
623
- throw new RequiredError("DefaultApi", "deleteSegments", "segmentId");
608
+ throw new RequiredError("DefaultApi", "deleteSegment", "segmentId");
624
609
  }
625
610
 
626
611
 
@@ -633,10 +618,13 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
633
618
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
634
619
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
635
620
 
621
+ // Always add the One Signal telemetry to the request.
622
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
623
+
636
624
 
637
625
  let authMethod: SecurityAuthentication | undefined;
638
626
  // Apply auth methods
639
- authMethod = _config.authMethods["app_key"]
627
+ authMethod = _config.authMethods["rest_api_key"]
640
628
  if (authMethod?.applySecurityAuthentication) {
641
629
  await authMethod?.applySecurityAuthentication(requestContext);
642
630
  }
@@ -678,10 +666,13 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
678
666
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
679
667
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
680
668
 
669
+ // Always add the One Signal telemetry to the request.
670
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
671
+
681
672
 
682
673
  let authMethod: SecurityAuthentication | undefined;
683
674
  // Apply auth methods
684
- authMethod = _config.authMethods["app_key"]
675
+ authMethod = _config.authMethods["rest_api_key"]
685
676
  if (authMethod?.applySecurityAuthentication) {
686
677
  await authMethod?.applySecurityAuthentication(requestContext);
687
678
  }
@@ -731,6 +722,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
731
722
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
732
723
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
733
724
 
725
+ // Always add the One Signal telemetry to the request.
726
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
727
+
734
728
 
735
729
 
736
730
  const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
@@ -742,47 +736,46 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
742
736
  }
743
737
 
744
738
  /**
745
- * Stops a Live Activity
746
- * Stop Live Activity
747
- * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
748
- * @param activityId Live Activity record ID
749
- * @param subscriptionId Subscription ID
739
+ * 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.
740
+ * Export CSV of Events
741
+ * @param notificationId The ID of the notification to export events from.
742
+ * @param appId The ID of the app that the notification belongs to.
750
743
  */
751
- public async endLiveActivity(appId: string, activityId: string, subscriptionId: string, _options?: Configuration): Promise<RequestContext> {
744
+ public async exportEvents(notificationId: string, appId: string, _options?: Configuration): Promise<RequestContext> {
752
745
  let _config = _options || this.configuration;
753
746
 
754
- // verify required parameter 'appId' is not null or undefined
755
- if (appId === null || appId === undefined) {
756
- throw new RequiredError("DefaultApi", "endLiveActivity", "appId");
757
- }
758
-
759
-
760
- // verify required parameter 'activityId' is not null or undefined
761
- if (activityId === null || activityId === undefined) {
762
- throw new RequiredError("DefaultApi", "endLiveActivity", "activityId");
747
+ // verify required parameter 'notificationId' is not null or undefined
748
+ if (notificationId === null || notificationId === undefined) {
749
+ throw new RequiredError("DefaultApi", "exportEvents", "notificationId");
763
750
  }
764
751
 
765
752
 
766
- // verify required parameter 'subscriptionId' is not null or undefined
767
- if (subscriptionId === null || subscriptionId === undefined) {
768
- throw new RequiredError("DefaultApi", "endLiveActivity", "subscriptionId");
753
+ // verify required parameter 'appId' is not null or undefined
754
+ if (appId === null || appId === undefined) {
755
+ throw new RequiredError("DefaultApi", "exportEvents", "appId");
769
756
  }
770
757
 
771
758
 
772
759
  // Path Params
773
- const localVarPath = '/apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}'
774
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
775
- .replace('{' + 'activity_id' + '}', encodeURIComponent(String(activityId)))
776
- .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
760
+ const localVarPath = '/notifications/{notification_id}/export_events?app_id={app_id}'
761
+ .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
777
762
 
778
763
  // Make Request Context
779
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
764
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
780
765
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
781
766
 
767
+ // Always add the One Signal telemetry to the request.
768
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
769
+
770
+ // Query Params
771
+ if (appId !== undefined) {
772
+ requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
773
+ }
774
+
782
775
 
783
776
  let authMethod: SecurityAuthentication | undefined;
784
777
  // Apply auth methods
785
- authMethod = _config.authMethods["app_key"]
778
+ authMethod = _config.authMethods["rest_api_key"]
786
779
  if (authMethod?.applySecurityAuthentication) {
787
780
  await authMethod?.applySecurityAuthentication(requestContext);
788
781
  }
@@ -797,16 +790,16 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
797
790
 
798
791
  /**
799
792
  * 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. |
800
- * CSV export
793
+ * Export CSV of Subscriptions
801
794
  * @param appId The app ID that you want to export devices from
802
- * @param exportPlayersRequestBody
795
+ * @param exportSubscriptionsRequestBody
803
796
  */
804
- public async exportPlayers(appId: string, exportPlayersRequestBody?: ExportPlayersRequestBody, _options?: Configuration): Promise<RequestContext> {
797
+ public async exportSubscriptions(appId: string, exportSubscriptionsRequestBody?: ExportSubscriptionsRequestBody, _options?: Configuration): Promise<RequestContext> {
805
798
  let _config = _options || this.configuration;
806
799
 
807
800
  // verify required parameter 'appId' is not null or undefined
808
801
  if (appId === null || appId === undefined) {
809
- throw new RequiredError("DefaultApi", "exportPlayers", "appId");
802
+ throw new RequiredError("DefaultApi", "exportSubscriptions", "appId");
810
803
  }
811
804
 
812
805
 
@@ -819,6 +812,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
819
812
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
820
813
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
821
814
 
815
+ // Always add the One Signal telemetry to the request.
816
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
817
+
822
818
 
823
819
  // Body Params
824
820
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -826,14 +822,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
826
822
  ]);
827
823
  requestContext.setHeaderParam("Content-Type", contentType);
828
824
  const serializedBody = ObjectSerializer.stringify(
829
- ObjectSerializer.serialize(exportPlayersRequestBody, "ExportPlayersRequestBody", ""),
825
+ ObjectSerializer.serialize(exportSubscriptionsRequestBody, "ExportSubscriptionsRequestBody", ""),
830
826
  contentType
831
827
  );
832
828
  requestContext.setBody(serializedBody);
833
829
 
834
830
  let authMethod: SecurityAuthentication | undefined;
835
831
  // Apply auth methods
836
- authMethod = _config.authMethods["app_key"]
832
+ authMethod = _config.authMethods["rest_api_key"]
837
833
  if (authMethod?.applySecurityAuthentication) {
838
834
  await authMethod?.applySecurityAuthentication(requestContext);
839
835
  }
@@ -847,38 +843,49 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
847
843
  }
848
844
 
849
845
  /**
850
- * Lists all Aliases for the User identified by :subscription_id.
846
+ * Lists all Aliases for the User identified by (:alias_label, :alias_id).
851
847
  * @param appId
852
- * @param subscriptionId
848
+ * @param aliasLabel
849
+ * @param aliasId
853
850
  */
854
- public async fetchAliases(appId: string, subscriptionId: string, _options?: Configuration): Promise<RequestContext> {
851
+ public async getAliases(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<RequestContext> {
855
852
  let _config = _options || this.configuration;
856
853
 
857
854
  // verify required parameter 'appId' is not null or undefined
858
855
  if (appId === null || appId === undefined) {
859
- throw new RequiredError("DefaultApi", "fetchAliases", "appId");
856
+ throw new RequiredError("DefaultApi", "getAliases", "appId");
860
857
  }
861
858
 
862
859
 
863
- // verify required parameter 'subscriptionId' is not null or undefined
864
- if (subscriptionId === null || subscriptionId === undefined) {
865
- throw new RequiredError("DefaultApi", "fetchAliases", "subscriptionId");
860
+ // verify required parameter 'aliasLabel' is not null or undefined
861
+ if (aliasLabel === null || aliasLabel === undefined) {
862
+ throw new RequiredError("DefaultApi", "getAliases", "aliasLabel");
863
+ }
864
+
865
+
866
+ // verify required parameter 'aliasId' is not null or undefined
867
+ if (aliasId === null || aliasId === undefined) {
868
+ throw new RequiredError("DefaultApi", "getAliases", "aliasId");
866
869
  }
867
870
 
868
871
 
869
872
  // Path Params
870
- const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/user/identity'
873
+ const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity'
871
874
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
872
- .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
875
+ .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
876
+ .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
873
877
 
874
878
  // Make Request Context
875
879
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
876
880
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
877
881
 
882
+ // Always add the One Signal telemetry to the request.
883
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
884
+
878
885
 
879
886
  let authMethod: SecurityAuthentication | undefined;
880
887
  // Apply auth methods
881
- authMethod = _config.authMethods["app_key"]
888
+ authMethod = _config.authMethods["rest_api_key"]
882
889
  if (authMethod?.applySecurityAuthentication) {
883
890
  await authMethod?.applySecurityAuthentication(requestContext);
884
891
  }
@@ -892,46 +899,41 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
892
899
  }
893
900
 
894
901
  /**
895
- * Returns the User’s properties, Aliases, and Subscriptions.
902
+ * Lists all Aliases for the User identified by :subscription_id.
896
903
  * @param appId
897
- * @param aliasLabel
898
- * @param aliasId
904
+ * @param subscriptionId
899
905
  */
900
- public async fetchUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<RequestContext> {
906
+ public async getAliasesBySubscription(appId: string, subscriptionId: string, _options?: Configuration): Promise<RequestContext> {
901
907
  let _config = _options || this.configuration;
902
908
 
903
909
  // verify required parameter 'appId' is not null or undefined
904
910
  if (appId === null || appId === undefined) {
905
- throw new RequiredError("DefaultApi", "fetchUser", "appId");
911
+ throw new RequiredError("DefaultApi", "getAliasesBySubscription", "appId");
906
912
  }
907
913
 
908
914
 
909
- // verify required parameter 'aliasLabel' is not null or undefined
910
- if (aliasLabel === null || aliasLabel === undefined) {
911
- throw new RequiredError("DefaultApi", "fetchUser", "aliasLabel");
912
- }
913
-
914
-
915
- // verify required parameter 'aliasId' is not null or undefined
916
- if (aliasId === null || aliasId === undefined) {
917
- throw new RequiredError("DefaultApi", "fetchUser", "aliasId");
915
+ // verify required parameter 'subscriptionId' is not null or undefined
916
+ if (subscriptionId === null || subscriptionId === undefined) {
917
+ throw new RequiredError("DefaultApi", "getAliasesBySubscription", "subscriptionId");
918
918
  }
919
919
 
920
920
 
921
921
  // Path Params
922
- const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}'
922
+ const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/user/identity'
923
923
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
924
- .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
925
- .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
924
+ .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
926
925
 
927
926
  // Make Request Context
928
927
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
929
928
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
930
929
 
930
+ // Always add the One Signal telemetry to the request.
931
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
932
+
931
933
 
932
934
  let authMethod: SecurityAuthentication | undefined;
933
935
  // Apply auth methods
934
- authMethod = _config.authMethods["app_key"]
936
+ authMethod = _config.authMethods["rest_api_key"]
935
937
  if (authMethod?.applySecurityAuthentication) {
936
938
  await authMethod?.applySecurityAuthentication(requestContext);
937
939
  }
@@ -945,69 +947,16 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
945
947
  }
946
948
 
947
949
  /**
948
- * Lists all Aliases for the User identified by (:alias_label, :alias_id).
949
- * @param appId
950
- * @param aliasLabel
951
- * @param aliasId
950
+ * View the details of a single OneSignal app
951
+ * View an app
952
+ * @param appId An app id
952
953
  */
953
- public async fetchUserIdentity(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<RequestContext> {
954
+ public async getApp(appId: string, _options?: Configuration): Promise<RequestContext> {
954
955
  let _config = _options || this.configuration;
955
956
 
956
957
  // verify required parameter 'appId' is not null or undefined
957
958
  if (appId === null || appId === undefined) {
958
- throw new RequiredError("DefaultApi", "fetchUserIdentity", "appId");
959
- }
960
-
961
-
962
- // verify required parameter 'aliasLabel' is not null or undefined
963
- if (aliasLabel === null || aliasLabel === undefined) {
964
- throw new RequiredError("DefaultApi", "fetchUserIdentity", "aliasLabel");
965
- }
966
-
967
-
968
- // verify required parameter 'aliasId' is not null or undefined
969
- if (aliasId === null || aliasId === undefined) {
970
- throw new RequiredError("DefaultApi", "fetchUserIdentity", "aliasId");
971
- }
972
-
973
-
974
- // Path Params
975
- const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity'
976
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
977
- .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
978
- .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
979
-
980
- // Make Request Context
981
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
982
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
983
-
984
-
985
- let authMethod: SecurityAuthentication | undefined;
986
- // Apply auth methods
987
- authMethod = _config.authMethods["app_key"]
988
- if (authMethod?.applySecurityAuthentication) {
989
- await authMethod?.applySecurityAuthentication(requestContext);
990
- }
991
-
992
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
993
- if (defaultAuth?.applySecurityAuthentication) {
994
- await defaultAuth?.applySecurityAuthentication(requestContext);
995
- }
996
-
997
- return requestContext;
998
- }
999
-
1000
- /**
1001
- * View the details of a single OneSignal app
1002
- * View an app
1003
- * @param appId An app id
1004
- */
1005
- public async getApp(appId: string, _options?: Configuration): Promise<RequestContext> {
1006
- let _config = _options || this.configuration;
1007
-
1008
- // verify required parameter 'appId' is not null or undefined
1009
- if (appId === null || appId === undefined) {
1010
- throw new RequiredError("DefaultApi", "getApp", "appId");
959
+ throw new RequiredError("DefaultApi", "getApp", "appId");
1011
960
  }
1012
961
 
1013
962
 
@@ -1019,10 +968,13 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1019
968
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1020
969
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1021
970
 
971
+ // Always add the One Signal telemetry to the request.
972
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
973
+
1022
974
 
1023
975
  let authMethod: SecurityAuthentication | undefined;
1024
976
  // Apply auth methods
1025
- authMethod = _config.authMethods["user_key"]
977
+ authMethod = _config.authMethods["user_auth_key"]
1026
978
  if (authMethod?.applySecurityAuthentication) {
1027
979
  await authMethod?.applySecurityAuthentication(requestContext);
1028
980
  }
@@ -1049,55 +1001,13 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1049
1001
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1050
1002
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1051
1003
 
1052
-
1053
- let authMethod: SecurityAuthentication | undefined;
1054
- // Apply auth methods
1055
- authMethod = _config.authMethods["user_key"]
1056
- if (authMethod?.applySecurityAuthentication) {
1057
- await authMethod?.applySecurityAuthentication(requestContext);
1058
- }
1059
-
1060
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1061
- if (defaultAuth?.applySecurityAuthentication) {
1062
- await defaultAuth?.applySecurityAuthentication(requestContext);
1063
- }
1064
-
1065
- return requestContext;
1066
- }
1067
-
1068
- /**
1069
- * Manifest of In-App Messages the Subscription is eligible to display by the SDK.
1070
- * @param appId
1071
- * @param subscriptionId
1072
- */
1073
- public async getEligibleIams(appId: string, subscriptionId: string, _options?: Configuration): Promise<RequestContext> {
1074
- let _config = _options || this.configuration;
1075
-
1076
- // verify required parameter 'appId' is not null or undefined
1077
- if (appId === null || appId === undefined) {
1078
- throw new RequiredError("DefaultApi", "getEligibleIams", "appId");
1079
- }
1080
-
1081
-
1082
- // verify required parameter 'subscriptionId' is not null or undefined
1083
- if (subscriptionId === null || subscriptionId === undefined) {
1084
- throw new RequiredError("DefaultApi", "getEligibleIams", "subscriptionId");
1085
- }
1086
-
1087
-
1088
- // Path Params
1089
- const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/iams'
1090
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1091
- .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
1092
-
1093
- // Make Request Context
1094
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1095
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1004
+ // Always add the One Signal telemetry to the request.
1005
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
1096
1006
 
1097
1007
 
1098
1008
  let authMethod: SecurityAuthentication | undefined;
1099
1009
  // Apply auth methods
1100
- authMethod = _config.authMethods["app_key"]
1010
+ authMethod = _config.authMethods["user_auth_key"]
1101
1011
  if (authMethod?.applySecurityAuthentication) {
1102
1012
  await authMethod?.applySecurityAuthentication(requestContext);
1103
1013
  }
@@ -1139,6 +1049,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1139
1049
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1140
1050
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1141
1051
 
1052
+ // Always add the One Signal telemetry to the request.
1053
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
1054
+
1142
1055
  // Query Params
1143
1056
  if (appId !== undefined) {
1144
1057
  requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
@@ -1147,7 +1060,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1147
1060
 
1148
1061
  let authMethod: SecurityAuthentication | undefined;
1149
1062
  // Apply auth methods
1150
- authMethod = _config.authMethods["app_key"]
1063
+ authMethod = _config.authMethods["rest_api_key"]
1151
1064
  if (authMethod?.applySecurityAuthentication) {
1152
1065
  await authMethod?.applySecurityAuthentication(requestContext);
1153
1066
  }
@@ -1164,9 +1077,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1164
1077
  * -> 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.
1165
1078
  * Notification History
1166
1079
  * @param notificationId The \&quot;id\&quot; of the message found in the Notification object
1167
- * @param getNotificationRequestBody
1080
+ * @param getNotificationHistoryRequestBody
1168
1081
  */
1169
- public async getNotificationHistory(notificationId: string, getNotificationRequestBody: GetNotificationRequestBody, _options?: Configuration): Promise<RequestContext> {
1082
+ public async getNotificationHistory(notificationId: string, getNotificationHistoryRequestBody: GetNotificationHistoryRequestBody, _options?: Configuration): Promise<RequestContext> {
1170
1083
  let _config = _options || this.configuration;
1171
1084
 
1172
1085
  // verify required parameter 'notificationId' is not null or undefined
@@ -1175,9 +1088,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1175
1088
  }
1176
1089
 
1177
1090
 
1178
- // verify required parameter 'getNotificationRequestBody' is not null or undefined
1179
- if (getNotificationRequestBody === null || getNotificationRequestBody === undefined) {
1180
- throw new RequiredError("DefaultApi", "getNotificationHistory", "getNotificationRequestBody");
1091
+ // verify required parameter 'getNotificationHistoryRequestBody' is not null or undefined
1092
+ if (getNotificationHistoryRequestBody === null || getNotificationHistoryRequestBody === undefined) {
1093
+ throw new RequiredError("DefaultApi", "getNotificationHistory", "getNotificationHistoryRequestBody");
1181
1094
  }
1182
1095
 
1183
1096
 
@@ -1189,6 +1102,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1189
1102
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
1190
1103
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1191
1104
 
1105
+ // Always add the One Signal telemetry to the request.
1106
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
1107
+
1192
1108
 
1193
1109
  // Body Params
1194
1110
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -1196,14 +1112,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1196
1112
  ]);
1197
1113
  requestContext.setHeaderParam("Content-Type", contentType);
1198
1114
  const serializedBody = ObjectSerializer.stringify(
1199
- ObjectSerializer.serialize(getNotificationRequestBody, "GetNotificationRequestBody", ""),
1115
+ ObjectSerializer.serialize(getNotificationHistoryRequestBody, "GetNotificationHistoryRequestBody", ""),
1200
1116
  contentType
1201
1117
  );
1202
1118
  requestContext.setBody(serializedBody);
1203
1119
 
1204
1120
  let authMethod: SecurityAuthentication | undefined;
1205
1121
  // Apply auth methods
1206
- authMethod = _config.authMethods["app_key"]
1122
+ authMethod = _config.authMethods["rest_api_key"]
1207
1123
  if (authMethod?.applySecurityAuthentication) {
1208
1124
  await authMethod?.applySecurityAuthentication(requestContext);
1209
1125
  }
@@ -1243,6 +1159,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1243
1159
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1244
1160
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1245
1161
 
1162
+ // Always add the One Signal telemetry to the request.
1163
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
1164
+
1246
1165
  // Query Params
1247
1166
  if (appId !== undefined) {
1248
1167
  requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
@@ -1266,7 +1185,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1266
1185
 
1267
1186
  let authMethod: SecurityAuthentication | undefined;
1268
1187
  // Apply auth methods
1269
- authMethod = _config.authMethods["app_key"]
1188
+ authMethod = _config.authMethods["rest_api_key"]
1270
1189
  if (authMethod?.applySecurityAuthentication) {
1271
1190
  await authMethod?.applySecurityAuthentication(requestContext);
1272
1191
  }
@@ -1316,6 +1235,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1316
1235
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1317
1236
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1318
1237
 
1238
+ // Always add the One Signal telemetry to the request.
1239
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
1240
+
1319
1241
  // Query Params
1320
1242
  if (outcomeNames !== undefined) {
1321
1243
  requestContext.setQueryParam("outcome_names", ObjectSerializer.serialize(outcomeNames, "string", ""));
@@ -1344,7 +1266,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1344
1266
 
1345
1267
  let authMethod: SecurityAuthentication | undefined;
1346
1268
  // Apply auth methods
1347
- authMethod = _config.authMethods["app_key"]
1269
+ authMethod = _config.authMethods["rest_api_key"]
1348
1270
  if (authMethod?.applySecurityAuthentication) {
1349
1271
  await authMethod?.applySecurityAuthentication(requestContext);
1350
1272
  }
@@ -1358,90 +1280,37 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1358
1280
  }
1359
1281
 
1360
1282
  /**
1361
- * View the details of an existing device in one of your OneSignal apps
1362
- * View device
1363
- * @param appId Your app_id for this device
1364
- * @param playerId Player\&#39;s OneSignal ID
1365
- * @param emailAuthHash Email - Only required if you have enabled Identity Verification and device_type is email (11).
1283
+ * Returns an array of segments from an app.
1284
+ * Get Segments
1285
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
1286
+ * @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.
1287
+ * @param limit The amount of Segments in the response. Maximum 300.
1366
1288
  */
1367
- public async getPlayer(appId: string, playerId: string, emailAuthHash?: string, _options?: Configuration): Promise<RequestContext> {
1289
+ public async getSegments(appId: string, offset?: number, limit?: number, _options?: Configuration): Promise<RequestContext> {
1368
1290
  let _config = _options || this.configuration;
1369
1291
 
1370
1292
  // verify required parameter 'appId' is not null or undefined
1371
1293
  if (appId === null || appId === undefined) {
1372
- throw new RequiredError("DefaultApi", "getPlayer", "appId");
1294
+ throw new RequiredError("DefaultApi", "getSegments", "appId");
1373
1295
  }
1374
1296
 
1375
1297
 
1376
- // verify required parameter 'playerId' is not null or undefined
1377
- if (playerId === null || playerId === undefined) {
1378
- throw new RequiredError("DefaultApi", "getPlayer", "playerId");
1379
- }
1380
-
1381
1298
 
1382
1299
 
1383
1300
  // Path Params
1384
- const localVarPath = '/players/{player_id}'
1385
- .replace('{' + 'player_id' + '}', encodeURIComponent(String(playerId)));
1301
+ const localVarPath = '/apps/{app_id}/segments'
1302
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
1386
1303
 
1387
1304
  // Make Request Context
1388
1305
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1389
1306
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1390
1307
 
1391
- // Query Params
1392
- if (appId !== undefined) {
1393
- requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
1394
- }
1395
-
1396
- // Query Params
1397
- if (emailAuthHash !== undefined) {
1398
- requestContext.setQueryParam("email_auth_hash", ObjectSerializer.serialize(emailAuthHash, "string", ""));
1399
- }
1400
-
1401
-
1402
- let authMethod: SecurityAuthentication | undefined;
1403
- // Apply auth methods
1404
- authMethod = _config.authMethods["app_key"]
1405
- if (authMethod?.applySecurityAuthentication) {
1406
- await authMethod?.applySecurityAuthentication(requestContext);
1407
- }
1408
-
1409
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1410
- if (defaultAuth?.applySecurityAuthentication) {
1411
- await defaultAuth?.applySecurityAuthentication(requestContext);
1412
- }
1413
-
1414
- return requestContext;
1415
- }
1416
-
1417
- /**
1418
- * 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.
1419
- * View devices
1420
- * @param appId The app ID that you want to view players from
1421
- * @param limit How many devices to return. Max is 300. Default is 300
1422
- * @param offset Result offset. Default is 0. Results are sorted by id;
1423
- */
1424
- public async getPlayers(appId: string, limit?: number, offset?: number, _options?: Configuration): Promise<RequestContext> {
1425
- let _config = _options || this.configuration;
1426
-
1427
- // verify required parameter 'appId' is not null or undefined
1428
- if (appId === null || appId === undefined) {
1429
- throw new RequiredError("DefaultApi", "getPlayers", "appId");
1430
- }
1431
-
1432
-
1433
-
1434
-
1435
- // Path Params
1436
- const localVarPath = '/players';
1437
-
1438
- // Make Request Context
1439
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1440
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1308
+ // Always add the One Signal telemetry to the request.
1309
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
1441
1310
 
1442
1311
  // Query Params
1443
- if (appId !== undefined) {
1444
- requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
1312
+ if (offset !== undefined) {
1313
+ requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", ""));
1445
1314
  }
1446
1315
 
1447
1316
  // Query Params
@@ -1449,15 +1318,10 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1449
1318
  requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", ""));
1450
1319
  }
1451
1320
 
1452
- // Query Params
1453
- if (offset !== undefined) {
1454
- requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", ""));
1455
- }
1456
-
1457
1321
 
1458
1322
  let authMethod: SecurityAuthentication | undefined;
1459
1323
  // Apply auth methods
1460
- authMethod = _config.authMethods["app_key"]
1324
+ authMethod = _config.authMethods["rest_api_key"]
1461
1325
  if (authMethod?.applySecurityAuthentication) {
1462
1326
  await authMethod?.applySecurityAuthentication(requestContext);
1463
1327
  }
@@ -1471,64 +1335,49 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1471
1335
  }
1472
1336
 
1473
1337
  /**
1474
- * Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
1338
+ * Returns the User’s properties, Aliases, and Subscriptions.
1475
1339
  * @param appId
1476
1340
  * @param aliasLabel
1477
1341
  * @param aliasId
1478
- * @param userIdentityRequestBody
1479
1342
  */
1480
- public async identifyUserByAlias(appId: string, aliasLabel: string, aliasId: string, userIdentityRequestBody: UserIdentityRequestBody, _options?: Configuration): Promise<RequestContext> {
1343
+ public async getUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<RequestContext> {
1481
1344
  let _config = _options || this.configuration;
1482
1345
 
1483
1346
  // verify required parameter 'appId' is not null or undefined
1484
1347
  if (appId === null || appId === undefined) {
1485
- throw new RequiredError("DefaultApi", "identifyUserByAlias", "appId");
1348
+ throw new RequiredError("DefaultApi", "getUser", "appId");
1486
1349
  }
1487
1350
 
1488
1351
 
1489
1352
  // verify required parameter 'aliasLabel' is not null or undefined
1490
1353
  if (aliasLabel === null || aliasLabel === undefined) {
1491
- throw new RequiredError("DefaultApi", "identifyUserByAlias", "aliasLabel");
1354
+ throw new RequiredError("DefaultApi", "getUser", "aliasLabel");
1492
1355
  }
1493
1356
 
1494
1357
 
1495
1358
  // verify required parameter 'aliasId' is not null or undefined
1496
1359
  if (aliasId === null || aliasId === undefined) {
1497
- throw new RequiredError("DefaultApi", "identifyUserByAlias", "aliasId");
1498
- }
1499
-
1500
-
1501
- // verify required parameter 'userIdentityRequestBody' is not null or undefined
1502
- if (userIdentityRequestBody === null || userIdentityRequestBody === undefined) {
1503
- throw new RequiredError("DefaultApi", "identifyUserByAlias", "userIdentityRequestBody");
1360
+ throw new RequiredError("DefaultApi", "getUser", "aliasId");
1504
1361
  }
1505
1362
 
1506
1363
 
1507
1364
  // Path Params
1508
- const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity'
1365
+ const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}'
1509
1366
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1510
1367
  .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
1511
1368
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
1512
1369
 
1513
1370
  // Make Request Context
1514
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
1371
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1515
1372
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1516
1373
 
1374
+ // Always add the One Signal telemetry to the request.
1375
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
1517
1376
 
1518
- // Body Params
1519
- const contentType = ObjectSerializer.getPreferredMediaType([
1520
- "application/json"
1521
- ]);
1522
- requestContext.setHeaderParam("Content-Type", contentType);
1523
- const serializedBody = ObjectSerializer.stringify(
1524
- ObjectSerializer.serialize(userIdentityRequestBody, "UserIdentityRequestBody", ""),
1525
- contentType
1526
- );
1527
- requestContext.setBody(serializedBody);
1528
1377
 
1529
1378
  let authMethod: SecurityAuthentication | undefined;
1530
1379
  // Apply auth methods
1531
- authMethod = _config.authMethods["app_key"]
1380
+ authMethod = _config.authMethods["rest_api_key"]
1532
1381
  if (authMethod?.applySecurityAuthentication) {
1533
1382
  await authMethod?.applySecurityAuthentication(requestContext);
1534
1383
  }
@@ -1542,34 +1391,34 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1542
1391
  }
1543
1392
 
1544
1393
  /**
1545
- * Upserts one or more Aliases for the User identified by :subscription_id.
1394
+ * Transfers this Subscription to the User identified by the identity in the payload.
1546
1395
  * @param appId
1547
1396
  * @param subscriptionId
1548
- * @param userIdentityRequestBody
1397
+ * @param transferSubscriptionRequestBody
1549
1398
  */
1550
- public async identifyUserBySubscriptionId(appId: string, subscriptionId: string, userIdentityRequestBody: UserIdentityRequestBody, _options?: Configuration): Promise<RequestContext> {
1399
+ public async transferSubscription(appId: string, subscriptionId: string, transferSubscriptionRequestBody: TransferSubscriptionRequestBody, _options?: Configuration): Promise<RequestContext> {
1551
1400
  let _config = _options || this.configuration;
1552
1401
 
1553
1402
  // verify required parameter 'appId' is not null or undefined
1554
1403
  if (appId === null || appId === undefined) {
1555
- throw new RequiredError("DefaultApi", "identifyUserBySubscriptionId", "appId");
1404
+ throw new RequiredError("DefaultApi", "transferSubscription", "appId");
1556
1405
  }
1557
1406
 
1558
1407
 
1559
1408
  // verify required parameter 'subscriptionId' is not null or undefined
1560
1409
  if (subscriptionId === null || subscriptionId === undefined) {
1561
- throw new RequiredError("DefaultApi", "identifyUserBySubscriptionId", "subscriptionId");
1410
+ throw new RequiredError("DefaultApi", "transferSubscription", "subscriptionId");
1562
1411
  }
1563
1412
 
1564
1413
 
1565
- // verify required parameter 'userIdentityRequestBody' is not null or undefined
1566
- if (userIdentityRequestBody === null || userIdentityRequestBody === undefined) {
1567
- throw new RequiredError("DefaultApi", "identifyUserBySubscriptionId", "userIdentityRequestBody");
1414
+ // verify required parameter 'transferSubscriptionRequestBody' is not null or undefined
1415
+ if (transferSubscriptionRequestBody === null || transferSubscriptionRequestBody === undefined) {
1416
+ throw new RequiredError("DefaultApi", "transferSubscription", "transferSubscriptionRequestBody");
1568
1417
  }
1569
1418
 
1570
1419
 
1571
1420
  // Path Params
1572
- const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/user/identity'
1421
+ const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/owner'
1573
1422
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1574
1423
  .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
1575
1424
 
@@ -1577,6 +1426,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1577
1426
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
1578
1427
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1579
1428
 
1429
+ // Always add the One Signal telemetry to the request.
1430
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
1431
+
1580
1432
 
1581
1433
  // Body Params
1582
1434
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -1584,14 +1436,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1584
1436
  ]);
1585
1437
  requestContext.setHeaderParam("Content-Type", contentType);
1586
1438
  const serializedBody = ObjectSerializer.stringify(
1587
- ObjectSerializer.serialize(userIdentityRequestBody, "UserIdentityRequestBody", ""),
1439
+ ObjectSerializer.serialize(transferSubscriptionRequestBody, "TransferSubscriptionRequestBody", ""),
1588
1440
  contentType
1589
1441
  );
1590
1442
  requestContext.setBody(serializedBody);
1591
1443
 
1592
1444
  let authMethod: SecurityAuthentication | undefined;
1593
1445
  // Apply auth methods
1594
- authMethod = _config.authMethods["app_key"]
1446
+ authMethod = _config.authMethods["rest_api_key"]
1595
1447
  if (authMethod?.applySecurityAuthentication) {
1596
1448
  await authMethod?.applySecurityAuthentication(requestContext);
1597
1449
  }
@@ -1605,56 +1457,54 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1605
1457
  }
1606
1458
 
1607
1459
  /**
1608
- * Transfers this Subscription to the User identified by the identity in the payload.
1609
- * @param appId
1610
- * @param subscriptionId
1611
- * @param transferSubscriptionRequestBody
1460
+ * Unsubscribe an email with a token when using your own custom email unsubscribe landing page
1461
+ * Unsubscribe with token
1462
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
1463
+ * @param notificationId The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report.
1464
+ * @param token The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email.
1612
1465
  */
1613
- public async transferSubscription(appId: string, subscriptionId: string, transferSubscriptionRequestBody: TransferSubscriptionRequestBody, _options?: Configuration): Promise<RequestContext> {
1466
+ public async unsubscribeEmailWithToken(appId: string, notificationId: string, token: string, _options?: Configuration): Promise<RequestContext> {
1614
1467
  let _config = _options || this.configuration;
1615
1468
 
1616
1469
  // verify required parameter 'appId' is not null or undefined
1617
1470
  if (appId === null || appId === undefined) {
1618
- throw new RequiredError("DefaultApi", "transferSubscription", "appId");
1471
+ throw new RequiredError("DefaultApi", "unsubscribeEmailWithToken", "appId");
1619
1472
  }
1620
1473
 
1621
1474
 
1622
- // verify required parameter 'subscriptionId' is not null or undefined
1623
- if (subscriptionId === null || subscriptionId === undefined) {
1624
- throw new RequiredError("DefaultApi", "transferSubscription", "subscriptionId");
1475
+ // verify required parameter 'notificationId' is not null or undefined
1476
+ if (notificationId === null || notificationId === undefined) {
1477
+ throw new RequiredError("DefaultApi", "unsubscribeEmailWithToken", "notificationId");
1625
1478
  }
1626
1479
 
1627
1480
 
1628
- // verify required parameter 'transferSubscriptionRequestBody' is not null or undefined
1629
- if (transferSubscriptionRequestBody === null || transferSubscriptionRequestBody === undefined) {
1630
- throw new RequiredError("DefaultApi", "transferSubscription", "transferSubscriptionRequestBody");
1481
+ // verify required parameter 'token' is not null or undefined
1482
+ if (token === null || token === undefined) {
1483
+ throw new RequiredError("DefaultApi", "unsubscribeEmailWithToken", "token");
1631
1484
  }
1632
1485
 
1633
1486
 
1634
1487
  // Path Params
1635
- const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/owner'
1488
+ const localVarPath = '/apps/{app_id}/notifications/{notification_id}/unsubscribe'
1636
1489
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1637
- .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
1490
+ .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
1638
1491
 
1639
1492
  // Make Request Context
1640
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
1493
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
1641
1494
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1642
1495
 
1496
+ // Always add the One Signal telemetry to the request.
1497
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
1498
+
1499
+ // Query Params
1500
+ if (token !== undefined) {
1501
+ requestContext.setQueryParam("token", ObjectSerializer.serialize(token, "string", ""));
1502
+ }
1643
1503
 
1644
- // Body Params
1645
- const contentType = ObjectSerializer.getPreferredMediaType([
1646
- "application/json"
1647
- ]);
1648
- requestContext.setHeaderParam("Content-Type", contentType);
1649
- const serializedBody = ObjectSerializer.stringify(
1650
- ObjectSerializer.serialize(transferSubscriptionRequestBody, "TransferSubscriptionRequestBody", ""),
1651
- contentType
1652
- );
1653
- requestContext.setBody(serializedBody);
1654
1504
 
1655
1505
  let authMethod: SecurityAuthentication | undefined;
1656
1506
  // Apply auth methods
1657
- authMethod = _config.authMethods["app_key"]
1507
+ authMethod = _config.authMethods["rest_api_key"]
1658
1508
  if (authMethod?.applySecurityAuthentication) {
1659
1509
  await authMethod?.applySecurityAuthentication(requestContext);
1660
1510
  }
@@ -1696,6 +1546,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1696
1546
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1697
1547
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1698
1548
 
1549
+ // Always add the One Signal telemetry to the request.
1550
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
1551
+
1699
1552
 
1700
1553
  // Body Params
1701
1554
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -1710,7 +1563,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1710
1563
 
1711
1564
  let authMethod: SecurityAuthentication | undefined;
1712
1565
  // Apply auth methods
1713
- authMethod = _config.authMethods["user_key"]
1566
+ authMethod = _config.authMethods["user_auth_key"]
1714
1567
  if (authMethod?.applySecurityAuthentication) {
1715
1568
  await authMethod?.applySecurityAuthentication(requestContext);
1716
1569
  }
@@ -1760,61 +1613,8 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1760
1613
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
1761
1614
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1762
1615
 
1763
-
1764
- // Body Params
1765
- const contentType = ObjectSerializer.getPreferredMediaType([
1766
- "application/json"
1767
- ]);
1768
- requestContext.setHeaderParam("Content-Type", contentType);
1769
- const serializedBody = ObjectSerializer.stringify(
1770
- ObjectSerializer.serialize(updateLiveActivityRequest, "UpdateLiveActivityRequest", ""),
1771
- contentType
1772
- );
1773
- requestContext.setBody(serializedBody);
1774
-
1775
- let authMethod: SecurityAuthentication | undefined;
1776
- // Apply auth methods
1777
- authMethod = _config.authMethods["app_key"]
1778
- if (authMethod?.applySecurityAuthentication) {
1779
- await authMethod?.applySecurityAuthentication(requestContext);
1780
- }
1781
-
1782
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1783
- if (defaultAuth?.applySecurityAuthentication) {
1784
- await defaultAuth?.applySecurityAuthentication(requestContext);
1785
- }
1786
-
1787
- return requestContext;
1788
- }
1789
-
1790
- /**
1791
- * Update an existing device in one of your OneSignal apps
1792
- * Edit device
1793
- * @param playerId Player\&#39;s OneSignal ID
1794
- * @param player
1795
- */
1796
- public async updatePlayer(playerId: string, player: Player, _options?: Configuration): Promise<RequestContext> {
1797
- let _config = _options || this.configuration;
1798
-
1799
- // verify required parameter 'playerId' is not null or undefined
1800
- if (playerId === null || playerId === undefined) {
1801
- throw new RequiredError("DefaultApi", "updatePlayer", "playerId");
1802
- }
1803
-
1804
-
1805
- // verify required parameter 'player' is not null or undefined
1806
- if (player === null || player === undefined) {
1807
- throw new RequiredError("DefaultApi", "updatePlayer", "player");
1808
- }
1809
-
1810
-
1811
- // Path Params
1812
- const localVarPath = '/players/{player_id}'
1813
- .replace('{' + 'player_id' + '}', encodeURIComponent(String(playerId)));
1814
-
1815
- // Make Request Context
1816
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1817
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1616
+ // Always add the One Signal telemetry to the request.
1617
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
1818
1618
 
1819
1619
 
1820
1620
  // Body Params
@@ -1823,73 +1623,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1823
1623
  ]);
1824
1624
  requestContext.setHeaderParam("Content-Type", contentType);
1825
1625
  const serializedBody = ObjectSerializer.stringify(
1826
- ObjectSerializer.serialize(player, "Player", ""),
1827
- contentType
1828
- );
1829
- requestContext.setBody(serializedBody);
1830
-
1831
- let authMethod: SecurityAuthentication | undefined;
1832
- // Apply auth methods
1833
- authMethod = _config.authMethods["app_key"]
1834
- if (authMethod?.applySecurityAuthentication) {
1835
- await authMethod?.applySecurityAuthentication(requestContext);
1836
- }
1837
-
1838
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1839
- if (defaultAuth?.applySecurityAuthentication) {
1840
- await defaultAuth?.applySecurityAuthentication(requestContext);
1841
- }
1842
-
1843
- return requestContext;
1844
- }
1845
-
1846
- /**
1847
- * 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\" }
1848
- * Edit tags with external user id
1849
- * @param appId The OneSignal App ID the user record is found under.
1850
- * @param externalUserId The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated.
1851
- * @param updatePlayerTagsRequestBody
1852
- */
1853
- public async updatePlayerTags(appId: string, externalUserId: string, updatePlayerTagsRequestBody?: UpdatePlayerTagsRequestBody, _options?: Configuration): Promise<RequestContext> {
1854
- let _config = _options || this.configuration;
1855
-
1856
- // verify required parameter 'appId' is not null or undefined
1857
- if (appId === null || appId === undefined) {
1858
- throw new RequiredError("DefaultApi", "updatePlayerTags", "appId");
1859
- }
1860
-
1861
-
1862
- // verify required parameter 'externalUserId' is not null or undefined
1863
- if (externalUserId === null || externalUserId === undefined) {
1864
- throw new RequiredError("DefaultApi", "updatePlayerTags", "externalUserId");
1865
- }
1866
-
1867
-
1868
-
1869
- // Path Params
1870
- const localVarPath = '/apps/{app_id}/users/{external_user_id}'
1871
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1872
- .replace('{' + 'external_user_id' + '}', encodeURIComponent(String(externalUserId)));
1873
-
1874
- // Make Request Context
1875
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1876
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1877
-
1878
-
1879
- // Body Params
1880
- const contentType = ObjectSerializer.getPreferredMediaType([
1881
- "application/json"
1882
- ]);
1883
- requestContext.setHeaderParam("Content-Type", contentType);
1884
- const serializedBody = ObjectSerializer.stringify(
1885
- ObjectSerializer.serialize(updatePlayerTagsRequestBody, "UpdatePlayerTagsRequestBody", ""),
1626
+ ObjectSerializer.serialize(updateLiveActivityRequest, "UpdateLiveActivityRequest", ""),
1886
1627
  contentType
1887
1628
  );
1888
1629
  requestContext.setBody(serializedBody);
1889
1630
 
1890
1631
  let authMethod: SecurityAuthentication | undefined;
1891
1632
  // Apply auth methods
1892
- authMethod = _config.authMethods["app_key"]
1633
+ authMethod = _config.authMethods["rest_api_key"]
1893
1634
  if (authMethod?.applySecurityAuthentication) {
1894
1635
  await authMethod?.applySecurityAuthentication(requestContext);
1895
1636
  }
@@ -1906,9 +1647,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1906
1647
  * Updates an existing Subscription’s properties.
1907
1648
  * @param appId
1908
1649
  * @param subscriptionId
1909
- * @param updateSubscriptionRequestBody
1650
+ * @param subscriptionBody
1910
1651
  */
1911
- public async updateSubscription(appId: string, subscriptionId: string, updateSubscriptionRequestBody: UpdateSubscriptionRequestBody, _options?: Configuration): Promise<RequestContext> {
1652
+ public async updateSubscription(appId: string, subscriptionId: string, subscriptionBody: SubscriptionBody, _options?: Configuration): Promise<RequestContext> {
1912
1653
  let _config = _options || this.configuration;
1913
1654
 
1914
1655
  // verify required parameter 'appId' is not null or undefined
@@ -1923,9 +1664,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1923
1664
  }
1924
1665
 
1925
1666
 
1926
- // verify required parameter 'updateSubscriptionRequestBody' is not null or undefined
1927
- if (updateSubscriptionRequestBody === null || updateSubscriptionRequestBody === undefined) {
1928
- throw new RequiredError("DefaultApi", "updateSubscription", "updateSubscriptionRequestBody");
1667
+ // verify required parameter 'subscriptionBody' is not null or undefined
1668
+ if (subscriptionBody === null || subscriptionBody === undefined) {
1669
+ throw new RequiredError("DefaultApi", "updateSubscription", "subscriptionBody");
1929
1670
  }
1930
1671
 
1931
1672
 
@@ -1938,6 +1679,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1938
1679
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
1939
1680
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1940
1681
 
1682
+ // Always add the One Signal telemetry to the request.
1683
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
1684
+
1941
1685
 
1942
1686
  // Body Params
1943
1687
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -1945,14 +1689,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1945
1689
  ]);
1946
1690
  requestContext.setHeaderParam("Content-Type", contentType);
1947
1691
  const serializedBody = ObjectSerializer.stringify(
1948
- ObjectSerializer.serialize(updateSubscriptionRequestBody, "UpdateSubscriptionRequestBody", ""),
1692
+ ObjectSerializer.serialize(subscriptionBody, "SubscriptionBody", ""),
1949
1693
  contentType
1950
1694
  );
1951
1695
  requestContext.setBody(serializedBody);
1952
1696
 
1953
1697
  let authMethod: SecurityAuthentication | undefined;
1954
1698
  // Apply auth methods
1955
- authMethod = _config.authMethods["app_key"]
1699
+ authMethod = _config.authMethods["rest_api_key"]
1956
1700
  if (authMethod?.applySecurityAuthentication) {
1957
1701
  await authMethod?.applySecurityAuthentication(requestContext);
1958
1702
  }
@@ -2009,6 +1753,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
2009
1753
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
2010
1754
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
2011
1755
 
1756
+ // Always add the One Signal telemetry to the request.
1757
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.0-alpha-01");
1758
+
2012
1759
 
2013
1760
  // Body Params
2014
1761
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -2023,7 +1770,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
2023
1770
 
2024
1771
  let authMethod: SecurityAuthentication | undefined;
2025
1772
  // Apply auth methods
2026
- authMethod = _config.authMethods["app_key"]
1773
+ authMethod = _config.authMethods["rest_api_key"]
2027
1774
  if (authMethod?.applySecurityAuthentication) {
2028
1775
  await authMethod?.applySecurityAuthentication(requestContext);
2029
1776
  }
@@ -2044,28 +1791,46 @@ export class DefaultApiResponseProcessor {
2044
1791
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2045
1792
  * to the expected objects
2046
1793
  *
2047
- * @params response Response returned by the server for a request to beginLiveActivity
1794
+ * @params response Response returned by the server for a request to cancelNotification
2048
1795
  * @throws ApiException if the response code was not in [200, 299]
2049
1796
  */
2050
- public async beginLiveActivity(response: ResponseContext): Promise<void > {
1797
+ public async cancelNotification(response: ResponseContext): Promise<GenericSuccessBoolResponse > {
2051
1798
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2052
- if (isCodeInRange("204", response.httpStatusCode)) {
2053
- return;
1799
+ if (isCodeInRange("200", response.httpStatusCode)) {
1800
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
1801
+ ObjectSerializer.parse(await response.body.text(), contentType),
1802
+ "GenericSuccessBoolResponse", ""
1803
+ ) as GenericSuccessBoolResponse;
1804
+ return body;
2054
1805
  }
2055
1806
  if (isCodeInRange("400", response.httpStatusCode)) {
2056
- const body: BadRequestError = ObjectSerializer.deserialize(
1807
+ const body: GenericError = ObjectSerializer.deserialize(
1808
+ ObjectSerializer.parse(await response.body.text(), contentType),
1809
+ "GenericError", ""
1810
+ ) as GenericError;
1811
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
1812
+ }
1813
+ if (isCodeInRange("404", response.httpStatusCode)) {
1814
+ const body: GenericError = ObjectSerializer.deserialize(
2057
1815
  ObjectSerializer.parse(await response.body.text(), contentType),
2058
- "BadRequestError", ""
2059
- ) as BadRequestError;
2060
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
1816
+ "GenericError", ""
1817
+ ) as GenericError;
1818
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
1819
+ }
1820
+ if (isCodeInRange("429", response.httpStatusCode)) {
1821
+ const body: RateLimitError = ObjectSerializer.deserialize(
1822
+ ObjectSerializer.parse(await response.body.text(), contentType),
1823
+ "RateLimitError", ""
1824
+ ) as RateLimitError;
1825
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2061
1826
  }
2062
1827
 
2063
1828
  // Work around for missing responses in specification, e.g. for petstore.yaml
2064
1829
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2065
- const body: void = ObjectSerializer.deserialize(
1830
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
2066
1831
  ObjectSerializer.parse(await response.body.text(), contentType),
2067
- "void", ""
2068
- ) as void;
1832
+ "GenericSuccessBoolResponse", ""
1833
+ ) as GenericSuccessBoolResponse;
2069
1834
  return body;
2070
1835
  }
2071
1836
 
@@ -2076,32 +1841,53 @@ export class DefaultApiResponseProcessor {
2076
1841
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2077
1842
  * to the expected objects
2078
1843
  *
2079
- * @params response Response returned by the server for a request to cancelNotification
1844
+ * @params response Response returned by the server for a request to createAlias
2080
1845
  * @throws ApiException if the response code was not in [200, 299]
2081
1846
  */
2082
- public async cancelNotification(response: ResponseContext): Promise<CancelNotificationSuccessResponse > {
1847
+ public async createAlias(response: ResponseContext): Promise<UserIdentityBody > {
2083
1848
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2084
1849
  if (isCodeInRange("200", response.httpStatusCode)) {
2085
- const body: CancelNotificationSuccessResponse = ObjectSerializer.deserialize(
1850
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2086
1851
  ObjectSerializer.parse(await response.body.text(), contentType),
2087
- "CancelNotificationSuccessResponse", ""
2088
- ) as CancelNotificationSuccessResponse;
1852
+ "UserIdentityBody", ""
1853
+ ) as UserIdentityBody;
2089
1854
  return body;
2090
1855
  }
2091
1856
  if (isCodeInRange("400", response.httpStatusCode)) {
2092
- const body: BadRequestError = ObjectSerializer.deserialize(
1857
+ const body: GenericError = ObjectSerializer.deserialize(
1858
+ ObjectSerializer.parse(await response.body.text(), contentType),
1859
+ "GenericError", ""
1860
+ ) as GenericError;
1861
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
1862
+ }
1863
+ if (isCodeInRange("404", response.httpStatusCode)) {
1864
+ const body: GenericError = ObjectSerializer.deserialize(
1865
+ ObjectSerializer.parse(await response.body.text(), contentType),
1866
+ "GenericError", ""
1867
+ ) as GenericError;
1868
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
1869
+ }
1870
+ if (isCodeInRange("409", response.httpStatusCode)) {
1871
+ const body: GenericError = ObjectSerializer.deserialize(
1872
+ ObjectSerializer.parse(await response.body.text(), contentType),
1873
+ "GenericError", ""
1874
+ ) as GenericError;
1875
+ throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
1876
+ }
1877
+ if (isCodeInRange("429", response.httpStatusCode)) {
1878
+ const body: RateLimitError = ObjectSerializer.deserialize(
2093
1879
  ObjectSerializer.parse(await response.body.text(), contentType),
2094
- "BadRequestError", ""
2095
- ) as BadRequestError;
2096
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
1880
+ "RateLimitError", ""
1881
+ ) as RateLimitError;
1882
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2097
1883
  }
2098
1884
 
2099
1885
  // Work around for missing responses in specification, e.g. for petstore.yaml
2100
1886
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2101
- const body: CancelNotificationSuccessResponse = ObjectSerializer.deserialize(
1887
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2102
1888
  ObjectSerializer.parse(await response.body.text(), contentType),
2103
- "CancelNotificationSuccessResponse", ""
2104
- ) as CancelNotificationSuccessResponse;
1889
+ "UserIdentityBody", ""
1890
+ ) as UserIdentityBody;
2105
1891
  return body;
2106
1892
  }
2107
1893
 
@@ -2112,32 +1898,53 @@ export class DefaultApiResponseProcessor {
2112
1898
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2113
1899
  * to the expected objects
2114
1900
  *
2115
- * @params response Response returned by the server for a request to createApp
1901
+ * @params response Response returned by the server for a request to createAliasBySubscription
2116
1902
  * @throws ApiException if the response code was not in [200, 299]
2117
1903
  */
2118
- public async createApp(response: ResponseContext): Promise<App > {
1904
+ public async createAliasBySubscription(response: ResponseContext): Promise<UserIdentityBody > {
2119
1905
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2120
1906
  if (isCodeInRange("200", response.httpStatusCode)) {
2121
- const body: App = ObjectSerializer.deserialize(
1907
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2122
1908
  ObjectSerializer.parse(await response.body.text(), contentType),
2123
- "App", ""
2124
- ) as App;
1909
+ "UserIdentityBody", ""
1910
+ ) as UserIdentityBody;
2125
1911
  return body;
2126
1912
  }
2127
1913
  if (isCodeInRange("400", response.httpStatusCode)) {
2128
- const body: BadRequestError = ObjectSerializer.deserialize(
1914
+ const body: GenericError = ObjectSerializer.deserialize(
1915
+ ObjectSerializer.parse(await response.body.text(), contentType),
1916
+ "GenericError", ""
1917
+ ) as GenericError;
1918
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
1919
+ }
1920
+ if (isCodeInRange("404", response.httpStatusCode)) {
1921
+ const body: GenericError = ObjectSerializer.deserialize(
2129
1922
  ObjectSerializer.parse(await response.body.text(), contentType),
2130
- "BadRequestError", ""
2131
- ) as BadRequestError;
2132
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
1923
+ "GenericError", ""
1924
+ ) as GenericError;
1925
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
1926
+ }
1927
+ if (isCodeInRange("409", response.httpStatusCode)) {
1928
+ const body: GenericError = ObjectSerializer.deserialize(
1929
+ ObjectSerializer.parse(await response.body.text(), contentType),
1930
+ "GenericError", ""
1931
+ ) as GenericError;
1932
+ throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
1933
+ }
1934
+ if (isCodeInRange("429", response.httpStatusCode)) {
1935
+ const body: RateLimitError = ObjectSerializer.deserialize(
1936
+ ObjectSerializer.parse(await response.body.text(), contentType),
1937
+ "RateLimitError", ""
1938
+ ) as RateLimitError;
1939
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2133
1940
  }
2134
1941
 
2135
1942
  // Work around for missing responses in specification, e.g. for petstore.yaml
2136
1943
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2137
- const body: App = ObjectSerializer.deserialize(
1944
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2138
1945
  ObjectSerializer.parse(await response.body.text(), contentType),
2139
- "App", ""
2140
- ) as App;
1946
+ "UserIdentityBody", ""
1947
+ ) as UserIdentityBody;
2141
1948
  return body;
2142
1949
  }
2143
1950
 
@@ -2148,32 +1955,39 @@ export class DefaultApiResponseProcessor {
2148
1955
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2149
1956
  * to the expected objects
2150
1957
  *
2151
- * @params response Response returned by the server for a request to createNotification
1958
+ * @params response Response returned by the server for a request to createApp
2152
1959
  * @throws ApiException if the response code was not in [200, 299]
2153
1960
  */
2154
- public async createNotification(response: ResponseContext): Promise<CreateNotificationSuccessResponse > {
1961
+ public async createApp(response: ResponseContext): Promise<App > {
2155
1962
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2156
1963
  if (isCodeInRange("200", response.httpStatusCode)) {
2157
- const body: CreateNotificationSuccessResponse = ObjectSerializer.deserialize(
1964
+ const body: App = ObjectSerializer.deserialize(
2158
1965
  ObjectSerializer.parse(await response.body.text(), contentType),
2159
- "CreateNotificationSuccessResponse", ""
2160
- ) as CreateNotificationSuccessResponse;
1966
+ "App", ""
1967
+ ) as App;
2161
1968
  return body;
2162
1969
  }
2163
1970
  if (isCodeInRange("400", response.httpStatusCode)) {
2164
- const body: BadRequestError = ObjectSerializer.deserialize(
1971
+ const body: GenericError = ObjectSerializer.deserialize(
2165
1972
  ObjectSerializer.parse(await response.body.text(), contentType),
2166
- "BadRequestError", ""
2167
- ) as BadRequestError;
2168
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
1973
+ "GenericError", ""
1974
+ ) as GenericError;
1975
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
1976
+ }
1977
+ if (isCodeInRange("429", response.httpStatusCode)) {
1978
+ const body: RateLimitError = ObjectSerializer.deserialize(
1979
+ ObjectSerializer.parse(await response.body.text(), contentType),
1980
+ "RateLimitError", ""
1981
+ ) as RateLimitError;
1982
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2169
1983
  }
2170
1984
 
2171
1985
  // Work around for missing responses in specification, e.g. for petstore.yaml
2172
1986
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2173
- const body: CreateNotificationSuccessResponse = ObjectSerializer.deserialize(
1987
+ const body: App = ObjectSerializer.deserialize(
2174
1988
  ObjectSerializer.parse(await response.body.text(), contentType),
2175
- "CreateNotificationSuccessResponse", ""
2176
- ) as CreateNotificationSuccessResponse;
1989
+ "App", ""
1990
+ ) as App;
2177
1991
  return body;
2178
1992
  }
2179
1993
 
@@ -2184,32 +1998,39 @@ export class DefaultApiResponseProcessor {
2184
1998
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2185
1999
  * to the expected objects
2186
2000
  *
2187
- * @params response Response returned by the server for a request to createPlayer
2001
+ * @params response Response returned by the server for a request to createNotification
2188
2002
  * @throws ApiException if the response code was not in [200, 299]
2189
2003
  */
2190
- public async createPlayer(response: ResponseContext): Promise<CreatePlayerSuccessResponse > {
2004
+ public async createNotification(response: ResponseContext): Promise<CreateNotificationSuccessResponse > {
2191
2005
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2192
2006
  if (isCodeInRange("200", response.httpStatusCode)) {
2193
- const body: CreatePlayerSuccessResponse = ObjectSerializer.deserialize(
2007
+ const body: CreateNotificationSuccessResponse = ObjectSerializer.deserialize(
2194
2008
  ObjectSerializer.parse(await response.body.text(), contentType),
2195
- "CreatePlayerSuccessResponse", ""
2196
- ) as CreatePlayerSuccessResponse;
2009
+ "CreateNotificationSuccessResponse", ""
2010
+ ) as CreateNotificationSuccessResponse;
2197
2011
  return body;
2198
2012
  }
2199
2013
  if (isCodeInRange("400", response.httpStatusCode)) {
2200
- const body: BadRequestError = ObjectSerializer.deserialize(
2014
+ const body: GenericError = ObjectSerializer.deserialize(
2201
2015
  ObjectSerializer.parse(await response.body.text(), contentType),
2202
- "BadRequestError", ""
2203
- ) as BadRequestError;
2204
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
2016
+ "GenericError", ""
2017
+ ) as GenericError;
2018
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2019
+ }
2020
+ if (isCodeInRange("429", response.httpStatusCode)) {
2021
+ const body: RateLimitError = ObjectSerializer.deserialize(
2022
+ ObjectSerializer.parse(await response.body.text(), contentType),
2023
+ "RateLimitError", ""
2024
+ ) as RateLimitError;
2025
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2205
2026
  }
2206
2027
 
2207
2028
  // Work around for missing responses in specification, e.g. for petstore.yaml
2208
2029
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2209
- const body: CreatePlayerSuccessResponse = ObjectSerializer.deserialize(
2030
+ const body: CreateNotificationSuccessResponse = ObjectSerializer.deserialize(
2210
2031
  ObjectSerializer.parse(await response.body.text(), contentType),
2211
- "CreatePlayerSuccessResponse", ""
2212
- ) as CreatePlayerSuccessResponse;
2032
+ "CreateNotificationSuccessResponse", ""
2033
+ ) as CreateNotificationSuccessResponse;
2213
2034
  return body;
2214
2035
  }
2215
2036
 
@@ -2220,10 +2041,10 @@ export class DefaultApiResponseProcessor {
2220
2041
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2221
2042
  * to the expected objects
2222
2043
  *
2223
- * @params response Response returned by the server for a request to createSegments
2044
+ * @params response Response returned by the server for a request to createSegment
2224
2045
  * @throws ApiException if the response code was not in [200, 299]
2225
2046
  */
2226
- public async createSegments(response: ResponseContext): Promise<CreateSegmentSuccessResponse > {
2047
+ public async createSegment(response: ResponseContext): Promise<CreateSegmentSuccessResponse > {
2227
2048
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2228
2049
  if (isCodeInRange("201", response.httpStatusCode)) {
2229
2050
  const body: CreateSegmentSuccessResponse = ObjectSerializer.deserialize(
@@ -2233,11 +2054,11 @@ export class DefaultApiResponseProcessor {
2233
2054
  return body;
2234
2055
  }
2235
2056
  if (isCodeInRange("400", response.httpStatusCode)) {
2236
- const body: BadRequestError = ObjectSerializer.deserialize(
2057
+ const body: GenericError = ObjectSerializer.deserialize(
2237
2058
  ObjectSerializer.parse(await response.body.text(), contentType),
2238
- "BadRequestError", ""
2239
- ) as BadRequestError;
2240
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
2059
+ "GenericError", ""
2060
+ ) as GenericError;
2061
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2241
2062
  }
2242
2063
  if (isCodeInRange("409", response.httpStatusCode)) {
2243
2064
  const body: CreateSegmentConflictResponse = ObjectSerializer.deserialize(
@@ -2246,6 +2067,13 @@ export class DefaultApiResponseProcessor {
2246
2067
  ) as CreateSegmentConflictResponse;
2247
2068
  throw new ApiException<CreateSegmentConflictResponse>(409, "Conflict", body, response.headers);
2248
2069
  }
2070
+ if (isCodeInRange("429", response.httpStatusCode)) {
2071
+ const body: RateLimitError = ObjectSerializer.deserialize(
2072
+ ObjectSerializer.parse(await response.body.text(), contentType),
2073
+ "RateLimitError", ""
2074
+ ) as RateLimitError;
2075
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2076
+ }
2249
2077
 
2250
2078
  // Work around for missing responses in specification, e.g. for petstore.yaml
2251
2079
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
@@ -2266,29 +2094,57 @@ export class DefaultApiResponseProcessor {
2266
2094
  * @params response Response returned by the server for a request to createSubscription
2267
2095
  * @throws ApiException if the response code was not in [200, 299]
2268
2096
  */
2269
- public async createSubscription(response: ResponseContext): Promise<InlineResponse201 > {
2097
+ public async createSubscription(response: ResponseContext): Promise<SubscriptionBody > {
2270
2098
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2271
2099
  if (isCodeInRange("201", response.httpStatusCode)) {
2272
- const body: InlineResponse201 = ObjectSerializer.deserialize(
2100
+ const body: SubscriptionBody = ObjectSerializer.deserialize(
2273
2101
  ObjectSerializer.parse(await response.body.text(), contentType),
2274
- "InlineResponse201", ""
2275
- ) as InlineResponse201;
2102
+ "SubscriptionBody", ""
2103
+ ) as SubscriptionBody;
2276
2104
  return body;
2277
2105
  }
2278
2106
  if (isCodeInRange("202", response.httpStatusCode)) {
2279
- const body: InlineResponse201 = ObjectSerializer.deserialize(
2107
+ const body: SubscriptionBody = ObjectSerializer.deserialize(
2280
2108
  ObjectSerializer.parse(await response.body.text(), contentType),
2281
- "InlineResponse201", ""
2282
- ) as InlineResponse201;
2109
+ "SubscriptionBody", ""
2110
+ ) as SubscriptionBody;
2283
2111
  return body;
2284
2112
  }
2113
+ if (isCodeInRange("400", response.httpStatusCode)) {
2114
+ const body: GenericError = ObjectSerializer.deserialize(
2115
+ ObjectSerializer.parse(await response.body.text(), contentType),
2116
+ "GenericError", ""
2117
+ ) as GenericError;
2118
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2119
+ }
2120
+ if (isCodeInRange("404", response.httpStatusCode)) {
2121
+ const body: GenericError = ObjectSerializer.deserialize(
2122
+ ObjectSerializer.parse(await response.body.text(), contentType),
2123
+ "GenericError", ""
2124
+ ) as GenericError;
2125
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2126
+ }
2127
+ if (isCodeInRange("409", response.httpStatusCode)) {
2128
+ const body: GenericError = ObjectSerializer.deserialize(
2129
+ ObjectSerializer.parse(await response.body.text(), contentType),
2130
+ "GenericError", ""
2131
+ ) as GenericError;
2132
+ throw new ApiException<GenericError>(409, "Operation is not permitted due to user having the maximum number of subscriptions assigned", body, response.headers);
2133
+ }
2134
+ if (isCodeInRange("429", response.httpStatusCode)) {
2135
+ const body: RateLimitError = ObjectSerializer.deserialize(
2136
+ ObjectSerializer.parse(await response.body.text(), contentType),
2137
+ "RateLimitError", ""
2138
+ ) as RateLimitError;
2139
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2140
+ }
2285
2141
 
2286
2142
  // Work around for missing responses in specification, e.g. for petstore.yaml
2287
2143
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2288
- const body: InlineResponse201 = ObjectSerializer.deserialize(
2144
+ const body: SubscriptionBody = ObjectSerializer.deserialize(
2289
2145
  ObjectSerializer.parse(await response.body.text(), contentType),
2290
- "InlineResponse201", ""
2291
- ) as InlineResponse201;
2146
+ "SubscriptionBody", ""
2147
+ ) as SubscriptionBody;
2292
2148
  return body;
2293
2149
  }
2294
2150
 
@@ -2304,6 +2160,13 @@ export class DefaultApiResponseProcessor {
2304
2160
  */
2305
2161
  public async createUser(response: ResponseContext): Promise<User > {
2306
2162
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2163
+ if (isCodeInRange("200", response.httpStatusCode)) {
2164
+ const body: User = ObjectSerializer.deserialize(
2165
+ ObjectSerializer.parse(await response.body.text(), contentType),
2166
+ "User", ""
2167
+ ) as User;
2168
+ return body;
2169
+ }
2307
2170
  if (isCodeInRange("201", response.httpStatusCode)) {
2308
2171
  const body: User = ObjectSerializer.deserialize(
2309
2172
  ObjectSerializer.parse(await response.body.text(), contentType),
@@ -2318,6 +2181,13 @@ export class DefaultApiResponseProcessor {
2318
2181
  ) as User;
2319
2182
  return body;
2320
2183
  }
2184
+ if (isCodeInRange("400", response.httpStatusCode)) {
2185
+ const body: GenericError = ObjectSerializer.deserialize(
2186
+ ObjectSerializer.parse(await response.body.text(), contentType),
2187
+ "GenericError", ""
2188
+ ) as GenericError;
2189
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2190
+ }
2321
2191
  if (isCodeInRange("409", response.httpStatusCode)) {
2322
2192
  const body: CreateUserConflictResponse = ObjectSerializer.deserialize(
2323
2193
  ObjectSerializer.parse(await response.body.text(), contentType),
@@ -2325,6 +2195,13 @@ export class DefaultApiResponseProcessor {
2325
2195
  ) as CreateUserConflictResponse;
2326
2196
  throw new ApiException<CreateUserConflictResponse>(409, "Multiple User Identity Conflict", body, response.headers);
2327
2197
  }
2198
+ if (isCodeInRange("429", response.httpStatusCode)) {
2199
+ const body: RateLimitError = ObjectSerializer.deserialize(
2200
+ ObjectSerializer.parse(await response.body.text(), contentType),
2201
+ "RateLimitError", ""
2202
+ ) as RateLimitError;
2203
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2204
+ }
2328
2205
 
2329
2206
  // Work around for missing responses in specification, e.g. for petstore.yaml
2330
2207
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
@@ -2345,65 +2222,50 @@ export class DefaultApiResponseProcessor {
2345
2222
  * @params response Response returned by the server for a request to deleteAlias
2346
2223
  * @throws ApiException if the response code was not in [200, 299]
2347
2224
  */
2348
- public async deleteAlias(response: ResponseContext): Promise<InlineResponse200 > {
2225
+ public async deleteAlias(response: ResponseContext): Promise<UserIdentityBody > {
2349
2226
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2350
2227
  if (isCodeInRange("200", response.httpStatusCode)) {
2351
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2228
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2352
2229
  ObjectSerializer.parse(await response.body.text(), contentType),
2353
- "InlineResponse200", ""
2354
- ) as InlineResponse200;
2230
+ "UserIdentityBody", ""
2231
+ ) as UserIdentityBody;
2355
2232
  return body;
2356
2233
  }
2357
-
2358
- // Work around for missing responses in specification, e.g. for petstore.yaml
2359
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2360
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2234
+ if (isCodeInRange("400", response.httpStatusCode)) {
2235
+ const body: GenericError = ObjectSerializer.deserialize(
2361
2236
  ObjectSerializer.parse(await response.body.text(), contentType),
2362
- "InlineResponse200", ""
2363
- ) as InlineResponse200;
2364
- return body;
2237
+ "GenericError", ""
2238
+ ) as GenericError;
2239
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2365
2240
  }
2366
-
2367
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2368
- }
2369
-
2370
- /**
2371
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2372
- * to the expected objects
2373
- *
2374
- * @params response Response returned by the server for a request to deletePlayer
2375
- * @throws ApiException if the response code was not in [200, 299]
2376
- */
2377
- public async deletePlayer(response: ResponseContext): Promise<DeletePlayerSuccessResponse > {
2378
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2379
- if (isCodeInRange("200", response.httpStatusCode)) {
2380
- const body: DeletePlayerSuccessResponse = ObjectSerializer.deserialize(
2241
+ if (isCodeInRange("404", response.httpStatusCode)) {
2242
+ const body: GenericError = ObjectSerializer.deserialize(
2381
2243
  ObjectSerializer.parse(await response.body.text(), contentType),
2382
- "DeletePlayerSuccessResponse", ""
2383
- ) as DeletePlayerSuccessResponse;
2384
- return body;
2244
+ "GenericError", ""
2245
+ ) as GenericError;
2246
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2385
2247
  }
2386
- if (isCodeInRange("400", response.httpStatusCode)) {
2387
- const body: BadRequestError = ObjectSerializer.deserialize(
2248
+ if (isCodeInRange("409", response.httpStatusCode)) {
2249
+ const body: GenericError = ObjectSerializer.deserialize(
2388
2250
  ObjectSerializer.parse(await response.body.text(), contentType),
2389
- "BadRequestError", ""
2390
- ) as BadRequestError;
2391
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
2251
+ "GenericError", ""
2252
+ ) as GenericError;
2253
+ throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2392
2254
  }
2393
- if (isCodeInRange("404", response.httpStatusCode)) {
2394
- const body: DeletePlayerNotFoundResponse = ObjectSerializer.deserialize(
2255
+ if (isCodeInRange("429", response.httpStatusCode)) {
2256
+ const body: RateLimitError = ObjectSerializer.deserialize(
2395
2257
  ObjectSerializer.parse(await response.body.text(), contentType),
2396
- "DeletePlayerNotFoundResponse", ""
2397
- ) as DeletePlayerNotFoundResponse;
2398
- throw new ApiException<DeletePlayerNotFoundResponse>(404, "Not Found", body, response.headers);
2258
+ "RateLimitError", ""
2259
+ ) as RateLimitError;
2260
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2399
2261
  }
2400
2262
 
2401
2263
  // Work around for missing responses in specification, e.g. for petstore.yaml
2402
2264
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2403
- const body: DeletePlayerSuccessResponse = ObjectSerializer.deserialize(
2265
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2404
2266
  ObjectSerializer.parse(await response.body.text(), contentType),
2405
- "DeletePlayerSuccessResponse", ""
2406
- ) as DeletePlayerSuccessResponse;
2267
+ "UserIdentityBody", ""
2268
+ ) as UserIdentityBody;
2407
2269
  return body;
2408
2270
  }
2409
2271
 
@@ -2414,39 +2276,46 @@ export class DefaultApiResponseProcessor {
2414
2276
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2415
2277
  * to the expected objects
2416
2278
  *
2417
- * @params response Response returned by the server for a request to deleteSegments
2279
+ * @params response Response returned by the server for a request to deleteSegment
2418
2280
  * @throws ApiException if the response code was not in [200, 299]
2419
2281
  */
2420
- public async deleteSegments(response: ResponseContext): Promise<DeleteSegmentSuccessResponse > {
2282
+ public async deleteSegment(response: ResponseContext): Promise<GenericSuccessBoolResponse > {
2421
2283
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2422
2284
  if (isCodeInRange("200", response.httpStatusCode)) {
2423
- const body: DeleteSegmentSuccessResponse = ObjectSerializer.deserialize(
2285
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
2424
2286
  ObjectSerializer.parse(await response.body.text(), contentType),
2425
- "DeleteSegmentSuccessResponse", ""
2426
- ) as DeleteSegmentSuccessResponse;
2287
+ "GenericSuccessBoolResponse", ""
2288
+ ) as GenericSuccessBoolResponse;
2427
2289
  return body;
2428
2290
  }
2429
2291
  if (isCodeInRange("400", response.httpStatusCode)) {
2430
- const body: BadRequestError = ObjectSerializer.deserialize(
2292
+ const body: GenericError = ObjectSerializer.deserialize(
2431
2293
  ObjectSerializer.parse(await response.body.text(), contentType),
2432
- "BadRequestError", ""
2433
- ) as BadRequestError;
2434
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
2294
+ "GenericError", ""
2295
+ ) as GenericError;
2296
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2435
2297
  }
2436
2298
  if (isCodeInRange("404", response.httpStatusCode)) {
2437
- const body: DeleteSegmentNotFoundResponse = ObjectSerializer.deserialize(
2299
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
2300
+ ObjectSerializer.parse(await response.body.text(), contentType),
2301
+ "GenericSuccessBoolResponse", ""
2302
+ ) as GenericSuccessBoolResponse;
2303
+ throw new ApiException<GenericSuccessBoolResponse>(404, "Not Found", body, response.headers);
2304
+ }
2305
+ if (isCodeInRange("429", response.httpStatusCode)) {
2306
+ const body: RateLimitError = ObjectSerializer.deserialize(
2438
2307
  ObjectSerializer.parse(await response.body.text(), contentType),
2439
- "DeleteSegmentNotFoundResponse", ""
2440
- ) as DeleteSegmentNotFoundResponse;
2441
- throw new ApiException<DeleteSegmentNotFoundResponse>(404, "Not Found", body, response.headers);
2308
+ "RateLimitError", ""
2309
+ ) as RateLimitError;
2310
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2442
2311
  }
2443
2312
 
2444
2313
  // Work around for missing responses in specification, e.g. for petstore.yaml
2445
2314
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2446
- const body: DeleteSegmentSuccessResponse = ObjectSerializer.deserialize(
2315
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
2447
2316
  ObjectSerializer.parse(await response.body.text(), contentType),
2448
- "DeleteSegmentSuccessResponse", ""
2449
- ) as DeleteSegmentSuccessResponse;
2317
+ "GenericSuccessBoolResponse", ""
2318
+ ) as GenericSuccessBoolResponse;
2450
2319
  return body;
2451
2320
  }
2452
2321
 
@@ -2465,6 +2334,34 @@ export class DefaultApiResponseProcessor {
2465
2334
  if (isCodeInRange("202", response.httpStatusCode)) {
2466
2335
  return;
2467
2336
  }
2337
+ if (isCodeInRange("400", response.httpStatusCode)) {
2338
+ const body: GenericError = ObjectSerializer.deserialize(
2339
+ ObjectSerializer.parse(await response.body.text(), contentType),
2340
+ "GenericError", ""
2341
+ ) as GenericError;
2342
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2343
+ }
2344
+ if (isCodeInRange("404", response.httpStatusCode)) {
2345
+ const body: GenericError = ObjectSerializer.deserialize(
2346
+ ObjectSerializer.parse(await response.body.text(), contentType),
2347
+ "GenericError", ""
2348
+ ) as GenericError;
2349
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2350
+ }
2351
+ if (isCodeInRange("409", response.httpStatusCode)) {
2352
+ const body: GenericError = ObjectSerializer.deserialize(
2353
+ ObjectSerializer.parse(await response.body.text(), contentType),
2354
+ "GenericError", ""
2355
+ ) as GenericError;
2356
+ throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2357
+ }
2358
+ if (isCodeInRange("429", response.httpStatusCode)) {
2359
+ const body: RateLimitError = ObjectSerializer.deserialize(
2360
+ ObjectSerializer.parse(await response.body.text(), contentType),
2361
+ "RateLimitError", ""
2362
+ ) as RateLimitError;
2363
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2364
+ }
2468
2365
 
2469
2366
  // Work around for missing responses in specification, e.g. for petstore.yaml
2470
2367
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
@@ -2490,37 +2387,26 @@ export class DefaultApiResponseProcessor {
2490
2387
  if (isCodeInRange("200", response.httpStatusCode)) {
2491
2388
  return;
2492
2389
  }
2493
-
2494
- // Work around for missing responses in specification, e.g. for petstore.yaml
2495
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2496
- const body: void = ObjectSerializer.deserialize(
2390
+ if (isCodeInRange("400", response.httpStatusCode)) {
2391
+ const body: GenericError = ObjectSerializer.deserialize(
2497
2392
  ObjectSerializer.parse(await response.body.text(), contentType),
2498
- "void", ""
2499
- ) as void;
2500
- return body;
2393
+ "GenericError", ""
2394
+ ) as GenericError;
2395
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2501
2396
  }
2502
-
2503
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2504
- }
2505
-
2506
- /**
2507
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2508
- * to the expected objects
2509
- *
2510
- * @params response Response returned by the server for a request to endLiveActivity
2511
- * @throws ApiException if the response code was not in [200, 299]
2512
- */
2513
- public async endLiveActivity(response: ResponseContext): Promise<void > {
2514
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2515
- if (isCodeInRange("204", response.httpStatusCode)) {
2516
- return;
2397
+ if (isCodeInRange("409", response.httpStatusCode)) {
2398
+ const body: GenericError = ObjectSerializer.deserialize(
2399
+ ObjectSerializer.parse(await response.body.text(), contentType),
2400
+ "GenericError", ""
2401
+ ) as GenericError;
2402
+ throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2517
2403
  }
2518
- if (isCodeInRange("400", response.httpStatusCode)) {
2519
- const body: BadRequestError = ObjectSerializer.deserialize(
2404
+ if (isCodeInRange("429", response.httpStatusCode)) {
2405
+ const body: RateLimitError = ObjectSerializer.deserialize(
2520
2406
  ObjectSerializer.parse(await response.body.text(), contentType),
2521
- "BadRequestError", ""
2522
- ) as BadRequestError;
2523
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
2407
+ "RateLimitError", ""
2408
+ ) as RateLimitError;
2409
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2524
2410
  }
2525
2411
 
2526
2412
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2539,32 +2425,46 @@ export class DefaultApiResponseProcessor {
2539
2425
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2540
2426
  * to the expected objects
2541
2427
  *
2542
- * @params response Response returned by the server for a request to exportPlayers
2428
+ * @params response Response returned by the server for a request to exportEvents
2543
2429
  * @throws ApiException if the response code was not in [200, 299]
2544
2430
  */
2545
- public async exportPlayers(response: ResponseContext): Promise<ExportPlayersSuccessResponse > {
2431
+ public async exportEvents(response: ResponseContext): Promise<ExportEventsSuccessResponse > {
2546
2432
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2547
2433
  if (isCodeInRange("200", response.httpStatusCode)) {
2548
- const body: ExportPlayersSuccessResponse = ObjectSerializer.deserialize(
2434
+ const body: ExportEventsSuccessResponse = ObjectSerializer.deserialize(
2549
2435
  ObjectSerializer.parse(await response.body.text(), contentType),
2550
- "ExportPlayersSuccessResponse", ""
2551
- ) as ExportPlayersSuccessResponse;
2436
+ "ExportEventsSuccessResponse", ""
2437
+ ) as ExportEventsSuccessResponse;
2552
2438
  return body;
2553
2439
  }
2554
2440
  if (isCodeInRange("400", response.httpStatusCode)) {
2555
- const body: BadRequestError = ObjectSerializer.deserialize(
2441
+ const body: GenericError = ObjectSerializer.deserialize(
2442
+ ObjectSerializer.parse(await response.body.text(), contentType),
2443
+ "GenericError", ""
2444
+ ) as GenericError;
2445
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2446
+ }
2447
+ if (isCodeInRange("404", response.httpStatusCode)) {
2448
+ const body: GenericError = ObjectSerializer.deserialize(
2556
2449
  ObjectSerializer.parse(await response.body.text(), contentType),
2557
- "BadRequestError", ""
2558
- ) as BadRequestError;
2559
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
2450
+ "GenericError", ""
2451
+ ) as GenericError;
2452
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2453
+ }
2454
+ if (isCodeInRange("429", response.httpStatusCode)) {
2455
+ const body: RateLimitError = ObjectSerializer.deserialize(
2456
+ ObjectSerializer.parse(await response.body.text(), contentType),
2457
+ "RateLimitError", ""
2458
+ ) as RateLimitError;
2459
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2560
2460
  }
2561
2461
 
2562
2462
  // Work around for missing responses in specification, e.g. for petstore.yaml
2563
2463
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2564
- const body: ExportPlayersSuccessResponse = ObjectSerializer.deserialize(
2464
+ const body: ExportEventsSuccessResponse = ObjectSerializer.deserialize(
2565
2465
  ObjectSerializer.parse(await response.body.text(), contentType),
2566
- "ExportPlayersSuccessResponse", ""
2567
- ) as ExportPlayersSuccessResponse;
2466
+ "ExportEventsSuccessResponse", ""
2467
+ ) as ExportEventsSuccessResponse;
2568
2468
  return body;
2569
2469
  }
2570
2470
 
@@ -2575,25 +2475,39 @@ export class DefaultApiResponseProcessor {
2575
2475
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2576
2476
  * to the expected objects
2577
2477
  *
2578
- * @params response Response returned by the server for a request to fetchAliases
2478
+ * @params response Response returned by the server for a request to exportSubscriptions
2579
2479
  * @throws ApiException if the response code was not in [200, 299]
2580
2480
  */
2581
- public async fetchAliases(response: ResponseContext): Promise<UserIdentityResponse > {
2481
+ public async exportSubscriptions(response: ResponseContext): Promise<ExportSubscriptionsSuccessResponse > {
2582
2482
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2583
2483
  if (isCodeInRange("200", response.httpStatusCode)) {
2584
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
2484
+ const body: ExportSubscriptionsSuccessResponse = ObjectSerializer.deserialize(
2585
2485
  ObjectSerializer.parse(await response.body.text(), contentType),
2586
- "UserIdentityResponse", ""
2587
- ) as UserIdentityResponse;
2486
+ "ExportSubscriptionsSuccessResponse", ""
2487
+ ) as ExportSubscriptionsSuccessResponse;
2588
2488
  return body;
2589
2489
  }
2490
+ if (isCodeInRange("400", response.httpStatusCode)) {
2491
+ const body: GenericError = ObjectSerializer.deserialize(
2492
+ ObjectSerializer.parse(await response.body.text(), contentType),
2493
+ "GenericError", ""
2494
+ ) as GenericError;
2495
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2496
+ }
2497
+ if (isCodeInRange("429", response.httpStatusCode)) {
2498
+ const body: RateLimitError = ObjectSerializer.deserialize(
2499
+ ObjectSerializer.parse(await response.body.text(), contentType),
2500
+ "RateLimitError", ""
2501
+ ) as RateLimitError;
2502
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2503
+ }
2590
2504
 
2591
2505
  // Work around for missing responses in specification, e.g. for petstore.yaml
2592
2506
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2593
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
2507
+ const body: ExportSubscriptionsSuccessResponse = ObjectSerializer.deserialize(
2594
2508
  ObjectSerializer.parse(await response.body.text(), contentType),
2595
- "UserIdentityResponse", ""
2596
- ) as UserIdentityResponse;
2509
+ "ExportSubscriptionsSuccessResponse", ""
2510
+ ) as ExportSubscriptionsSuccessResponse;
2597
2511
  return body;
2598
2512
  }
2599
2513
 
@@ -2604,25 +2518,46 @@ export class DefaultApiResponseProcessor {
2604
2518
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2605
2519
  * to the expected objects
2606
2520
  *
2607
- * @params response Response returned by the server for a request to fetchUser
2521
+ * @params response Response returned by the server for a request to getAliases
2608
2522
  * @throws ApiException if the response code was not in [200, 299]
2609
2523
  */
2610
- public async fetchUser(response: ResponseContext): Promise<User > {
2524
+ public async getAliases(response: ResponseContext): Promise<UserIdentityBody > {
2611
2525
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2612
2526
  if (isCodeInRange("200", response.httpStatusCode)) {
2613
- const body: User = ObjectSerializer.deserialize(
2527
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2614
2528
  ObjectSerializer.parse(await response.body.text(), contentType),
2615
- "User", ""
2616
- ) as User;
2529
+ "UserIdentityBody", ""
2530
+ ) as UserIdentityBody;
2617
2531
  return body;
2618
2532
  }
2533
+ if (isCodeInRange("400", response.httpStatusCode)) {
2534
+ const body: GenericError = ObjectSerializer.deserialize(
2535
+ ObjectSerializer.parse(await response.body.text(), contentType),
2536
+ "GenericError", ""
2537
+ ) as GenericError;
2538
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2539
+ }
2540
+ if (isCodeInRange("404", response.httpStatusCode)) {
2541
+ const body: GenericError = ObjectSerializer.deserialize(
2542
+ ObjectSerializer.parse(await response.body.text(), contentType),
2543
+ "GenericError", ""
2544
+ ) as GenericError;
2545
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2546
+ }
2547
+ if (isCodeInRange("429", response.httpStatusCode)) {
2548
+ const body: RateLimitError = ObjectSerializer.deserialize(
2549
+ ObjectSerializer.parse(await response.body.text(), contentType),
2550
+ "RateLimitError", ""
2551
+ ) as RateLimitError;
2552
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2553
+ }
2619
2554
 
2620
2555
  // Work around for missing responses in specification, e.g. for petstore.yaml
2621
2556
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2622
- const body: User = ObjectSerializer.deserialize(
2557
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2623
2558
  ObjectSerializer.parse(await response.body.text(), contentType),
2624
- "User", ""
2625
- ) as User;
2559
+ "UserIdentityBody", ""
2560
+ ) as UserIdentityBody;
2626
2561
  return body;
2627
2562
  }
2628
2563
 
@@ -2633,25 +2568,39 @@ export class DefaultApiResponseProcessor {
2633
2568
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2634
2569
  * to the expected objects
2635
2570
  *
2636
- * @params response Response returned by the server for a request to fetchUserIdentity
2571
+ * @params response Response returned by the server for a request to getAliasesBySubscription
2637
2572
  * @throws ApiException if the response code was not in [200, 299]
2638
2573
  */
2639
- public async fetchUserIdentity(response: ResponseContext): Promise<InlineResponse200 > {
2574
+ public async getAliasesBySubscription(response: ResponseContext): Promise<UserIdentityBody > {
2640
2575
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2641
2576
  if (isCodeInRange("200", response.httpStatusCode)) {
2642
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2577
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2643
2578
  ObjectSerializer.parse(await response.body.text(), contentType),
2644
- "InlineResponse200", ""
2645
- ) as InlineResponse200;
2579
+ "UserIdentityBody", ""
2580
+ ) as UserIdentityBody;
2646
2581
  return body;
2647
2582
  }
2583
+ if (isCodeInRange("400", response.httpStatusCode)) {
2584
+ const body: GenericError = ObjectSerializer.deserialize(
2585
+ ObjectSerializer.parse(await response.body.text(), contentType),
2586
+ "GenericError", ""
2587
+ ) as GenericError;
2588
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2589
+ }
2590
+ if (isCodeInRange("404", response.httpStatusCode)) {
2591
+ const body: GenericError = ObjectSerializer.deserialize(
2592
+ ObjectSerializer.parse(await response.body.text(), contentType),
2593
+ "GenericError", ""
2594
+ ) as GenericError;
2595
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2596
+ }
2648
2597
 
2649
2598
  // Work around for missing responses in specification, e.g. for petstore.yaml
2650
2599
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2651
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2600
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2652
2601
  ObjectSerializer.parse(await response.body.text(), contentType),
2653
- "InlineResponse200", ""
2654
- ) as InlineResponse200;
2602
+ "UserIdentityBody", ""
2603
+ ) as UserIdentityBody;
2655
2604
  return body;
2656
2605
  }
2657
2606
 
@@ -2675,11 +2624,18 @@ export class DefaultApiResponseProcessor {
2675
2624
  return body;
2676
2625
  }
2677
2626
  if (isCodeInRange("400", response.httpStatusCode)) {
2678
- const body: BadRequestError = ObjectSerializer.deserialize(
2627
+ const body: GenericError = ObjectSerializer.deserialize(
2628
+ ObjectSerializer.parse(await response.body.text(), contentType),
2629
+ "GenericError", ""
2630
+ ) as GenericError;
2631
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2632
+ }
2633
+ if (isCodeInRange("429", response.httpStatusCode)) {
2634
+ const body: RateLimitError = ObjectSerializer.deserialize(
2679
2635
  ObjectSerializer.parse(await response.body.text(), contentType),
2680
- "BadRequestError", ""
2681
- ) as BadRequestError;
2682
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
2636
+ "RateLimitError", ""
2637
+ ) as RateLimitError;
2638
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2683
2639
  }
2684
2640
 
2685
2641
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2711,11 +2667,18 @@ export class DefaultApiResponseProcessor {
2711
2667
  return body;
2712
2668
  }
2713
2669
  if (isCodeInRange("400", response.httpStatusCode)) {
2714
- const body: BadRequestError = ObjectSerializer.deserialize(
2670
+ const body: GenericError = ObjectSerializer.deserialize(
2671
+ ObjectSerializer.parse(await response.body.text(), contentType),
2672
+ "GenericError", ""
2673
+ ) as GenericError;
2674
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2675
+ }
2676
+ if (isCodeInRange("429", response.httpStatusCode)) {
2677
+ const body: RateLimitError = ObjectSerializer.deserialize(
2715
2678
  ObjectSerializer.parse(await response.body.text(), contentType),
2716
- "BadRequestError", ""
2717
- ) as BadRequestError;
2718
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
2679
+ "RateLimitError", ""
2680
+ ) as RateLimitError;
2681
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2719
2682
  }
2720
2683
 
2721
2684
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2730,35 +2693,6 @@ export class DefaultApiResponseProcessor {
2730
2693
  throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2731
2694
  }
2732
2695
 
2733
- /**
2734
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2735
- * to the expected objects
2736
- *
2737
- * @params response Response returned by the server for a request to getEligibleIams
2738
- * @throws ApiException if the response code was not in [200, 299]
2739
- */
2740
- public async getEligibleIams(response: ResponseContext): Promise<InlineResponse2003 > {
2741
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2742
- if (isCodeInRange("200", response.httpStatusCode)) {
2743
- const body: InlineResponse2003 = ObjectSerializer.deserialize(
2744
- ObjectSerializer.parse(await response.body.text(), contentType),
2745
- "InlineResponse2003", ""
2746
- ) as InlineResponse2003;
2747
- return body;
2748
- }
2749
-
2750
- // Work around for missing responses in specification, e.g. for petstore.yaml
2751
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2752
- const body: InlineResponse2003 = ObjectSerializer.deserialize(
2753
- ObjectSerializer.parse(await response.body.text(), contentType),
2754
- "InlineResponse2003", ""
2755
- ) as InlineResponse2003;
2756
- return body;
2757
- }
2758
-
2759
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2760
- }
2761
-
2762
2696
  /**
2763
2697
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2764
2698
  * to the expected objects
@@ -2776,11 +2710,25 @@ export class DefaultApiResponseProcessor {
2776
2710
  return body;
2777
2711
  }
2778
2712
  if (isCodeInRange("400", response.httpStatusCode)) {
2779
- const body: BadRequestError = ObjectSerializer.deserialize(
2713
+ const body: GenericError = ObjectSerializer.deserialize(
2714
+ ObjectSerializer.parse(await response.body.text(), contentType),
2715
+ "GenericError", ""
2716
+ ) as GenericError;
2717
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2718
+ }
2719
+ if (isCodeInRange("404", response.httpStatusCode)) {
2720
+ const body: GenericError = ObjectSerializer.deserialize(
2721
+ ObjectSerializer.parse(await response.body.text(), contentType),
2722
+ "GenericError", ""
2723
+ ) as GenericError;
2724
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2725
+ }
2726
+ if (isCodeInRange("429", response.httpStatusCode)) {
2727
+ const body: RateLimitError = ObjectSerializer.deserialize(
2780
2728
  ObjectSerializer.parse(await response.body.text(), contentType),
2781
- "BadRequestError", ""
2782
- ) as BadRequestError;
2783
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
2729
+ "RateLimitError", ""
2730
+ ) as RateLimitError;
2731
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2784
2732
  }
2785
2733
 
2786
2734
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2812,11 +2760,25 @@ export class DefaultApiResponseProcessor {
2812
2760
  return body;
2813
2761
  }
2814
2762
  if (isCodeInRange("400", response.httpStatusCode)) {
2815
- const body: BadRequestError = ObjectSerializer.deserialize(
2763
+ const body: GenericError = ObjectSerializer.deserialize(
2764
+ ObjectSerializer.parse(await response.body.text(), contentType),
2765
+ "GenericError", ""
2766
+ ) as GenericError;
2767
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2768
+ }
2769
+ if (isCodeInRange("404", response.httpStatusCode)) {
2770
+ const body: GenericError = ObjectSerializer.deserialize(
2816
2771
  ObjectSerializer.parse(await response.body.text(), contentType),
2817
- "BadRequestError", ""
2818
- ) as BadRequestError;
2819
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
2772
+ "GenericError", ""
2773
+ ) as GenericError;
2774
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2775
+ }
2776
+ if (isCodeInRange("429", response.httpStatusCode)) {
2777
+ const body: RateLimitError = ObjectSerializer.deserialize(
2778
+ ObjectSerializer.parse(await response.body.text(), contentType),
2779
+ "RateLimitError", ""
2780
+ ) as RateLimitError;
2781
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2820
2782
  }
2821
2783
 
2822
2784
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2848,11 +2810,18 @@ export class DefaultApiResponseProcessor {
2848
2810
  return body;
2849
2811
  }
2850
2812
  if (isCodeInRange("400", response.httpStatusCode)) {
2851
- const body: BadRequestError = ObjectSerializer.deserialize(
2813
+ const body: GenericError = ObjectSerializer.deserialize(
2814
+ ObjectSerializer.parse(await response.body.text(), contentType),
2815
+ "GenericError", ""
2816
+ ) as GenericError;
2817
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2818
+ }
2819
+ if (isCodeInRange("429", response.httpStatusCode)) {
2820
+ const body: RateLimitError = ObjectSerializer.deserialize(
2852
2821
  ObjectSerializer.parse(await response.body.text(), contentType),
2853
- "BadRequestError", ""
2854
- ) as BadRequestError;
2855
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
2822
+ "RateLimitError", ""
2823
+ ) as RateLimitError;
2824
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2856
2825
  }
2857
2826
 
2858
2827
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2884,11 +2853,18 @@ export class DefaultApiResponseProcessor {
2884
2853
  return body;
2885
2854
  }
2886
2855
  if (isCodeInRange("400", response.httpStatusCode)) {
2887
- const body: BadRequestError = ObjectSerializer.deserialize(
2856
+ const body: GenericError = ObjectSerializer.deserialize(
2888
2857
  ObjectSerializer.parse(await response.body.text(), contentType),
2889
- "BadRequestError", ""
2890
- ) as BadRequestError;
2891
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
2858
+ "GenericError", ""
2859
+ ) as GenericError;
2860
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2861
+ }
2862
+ if (isCodeInRange("429", response.httpStatusCode)) {
2863
+ const body: RateLimitError = ObjectSerializer.deserialize(
2864
+ ObjectSerializer.parse(await response.body.text(), contentType),
2865
+ "RateLimitError", ""
2866
+ ) as RateLimitError;
2867
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2892
2868
  }
2893
2869
 
2894
2870
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2907,32 +2883,39 @@ export class DefaultApiResponseProcessor {
2907
2883
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2908
2884
  * to the expected objects
2909
2885
  *
2910
- * @params response Response returned by the server for a request to getPlayer
2886
+ * @params response Response returned by the server for a request to getSegments
2911
2887
  * @throws ApiException if the response code was not in [200, 299]
2912
2888
  */
2913
- public async getPlayer(response: ResponseContext): Promise<Player > {
2889
+ public async getSegments(response: ResponseContext): Promise<GetSegmentsSuccessResponse > {
2914
2890
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2915
- if (isCodeInRange("200", response.httpStatusCode)) {
2916
- const body: Player = ObjectSerializer.deserialize(
2891
+ if (isCodeInRange("201", response.httpStatusCode)) {
2892
+ const body: GetSegmentsSuccessResponse = ObjectSerializer.deserialize(
2917
2893
  ObjectSerializer.parse(await response.body.text(), contentType),
2918
- "Player", ""
2919
- ) as Player;
2894
+ "GetSegmentsSuccessResponse", ""
2895
+ ) as GetSegmentsSuccessResponse;
2920
2896
  return body;
2921
2897
  }
2922
2898
  if (isCodeInRange("400", response.httpStatusCode)) {
2923
- const body: BadRequestError = ObjectSerializer.deserialize(
2899
+ const body: GenericError = ObjectSerializer.deserialize(
2924
2900
  ObjectSerializer.parse(await response.body.text(), contentType),
2925
- "BadRequestError", ""
2926
- ) as BadRequestError;
2927
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
2901
+ "GenericError", ""
2902
+ ) as GenericError;
2903
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2904
+ }
2905
+ if (isCodeInRange("429", response.httpStatusCode)) {
2906
+ const body: RateLimitError = ObjectSerializer.deserialize(
2907
+ ObjectSerializer.parse(await response.body.text(), contentType),
2908
+ "RateLimitError", ""
2909
+ ) as RateLimitError;
2910
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2928
2911
  }
2929
2912
 
2930
2913
  // Work around for missing responses in specification, e.g. for petstore.yaml
2931
2914
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2932
- const body: Player = ObjectSerializer.deserialize(
2915
+ const body: GetSegmentsSuccessResponse = ObjectSerializer.deserialize(
2933
2916
  ObjectSerializer.parse(await response.body.text(), contentType),
2934
- "Player", ""
2935
- ) as Player;
2917
+ "GetSegmentsSuccessResponse", ""
2918
+ ) as GetSegmentsSuccessResponse;
2936
2919
  return body;
2937
2920
  }
2938
2921
 
@@ -2943,32 +2926,46 @@ export class DefaultApiResponseProcessor {
2943
2926
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2944
2927
  * to the expected objects
2945
2928
  *
2946
- * @params response Response returned by the server for a request to getPlayers
2929
+ * @params response Response returned by the server for a request to getUser
2947
2930
  * @throws ApiException if the response code was not in [200, 299]
2948
2931
  */
2949
- public async getPlayers(response: ResponseContext): Promise<PlayerSlice > {
2932
+ public async getUser(response: ResponseContext): Promise<User > {
2950
2933
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2951
2934
  if (isCodeInRange("200", response.httpStatusCode)) {
2952
- const body: PlayerSlice = ObjectSerializer.deserialize(
2935
+ const body: User = ObjectSerializer.deserialize(
2953
2936
  ObjectSerializer.parse(await response.body.text(), contentType),
2954
- "PlayerSlice", ""
2955
- ) as PlayerSlice;
2937
+ "User", ""
2938
+ ) as User;
2956
2939
  return body;
2957
2940
  }
2958
2941
  if (isCodeInRange("400", response.httpStatusCode)) {
2959
- const body: BadRequestError = ObjectSerializer.deserialize(
2942
+ const body: GenericError = ObjectSerializer.deserialize(
2943
+ ObjectSerializer.parse(await response.body.text(), contentType),
2944
+ "GenericError", ""
2945
+ ) as GenericError;
2946
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2947
+ }
2948
+ if (isCodeInRange("404", response.httpStatusCode)) {
2949
+ const body: GenericError = ObjectSerializer.deserialize(
2960
2950
  ObjectSerializer.parse(await response.body.text(), contentType),
2961
- "BadRequestError", ""
2962
- ) as BadRequestError;
2963
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
2951
+ "GenericError", ""
2952
+ ) as GenericError;
2953
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2954
+ }
2955
+ if (isCodeInRange("429", response.httpStatusCode)) {
2956
+ const body: RateLimitError = ObjectSerializer.deserialize(
2957
+ ObjectSerializer.parse(await response.body.text(), contentType),
2958
+ "RateLimitError", ""
2959
+ ) as RateLimitError;
2960
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2964
2961
  }
2965
2962
 
2966
2963
  // Work around for missing responses in specification, e.g. for petstore.yaml
2967
2964
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2968
- const body: PlayerSlice = ObjectSerializer.deserialize(
2965
+ const body: User = ObjectSerializer.deserialize(
2969
2966
  ObjectSerializer.parse(await response.body.text(), contentType),
2970
- "PlayerSlice", ""
2971
- ) as PlayerSlice;
2967
+ "User", ""
2968
+ ) as User;
2972
2969
  return body;
2973
2970
  }
2974
2971
 
@@ -2979,68 +2976,53 @@ export class DefaultApiResponseProcessor {
2979
2976
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2980
2977
  * to the expected objects
2981
2978
  *
2982
- * @params response Response returned by the server for a request to identifyUserByAlias
2979
+ * @params response Response returned by the server for a request to transferSubscription
2983
2980
  * @throws ApiException if the response code was not in [200, 299]
2984
2981
  */
2985
- public async identifyUserByAlias(response: ResponseContext): Promise<InlineResponse200 > {
2982
+ public async transferSubscription(response: ResponseContext): Promise<UserIdentityBody > {
2986
2983
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2987
2984
  if (isCodeInRange("200", response.httpStatusCode)) {
2988
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2985
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2989
2986
  ObjectSerializer.parse(await response.body.text(), contentType),
2990
- "InlineResponse200", ""
2991
- ) as InlineResponse200;
2987
+ "UserIdentityBody", ""
2988
+ ) as UserIdentityBody;
2992
2989
  return body;
2993
2990
  }
2994
- if (isCodeInRange("409", response.httpStatusCode)) {
2995
- const body: IdentifyUserConflictResponse = ObjectSerializer.deserialize(
2991
+ if (isCodeInRange("400", response.httpStatusCode)) {
2992
+ const body: GenericError = ObjectSerializer.deserialize(
2996
2993
  ObjectSerializer.parse(await response.body.text(), contentType),
2997
- "IdentifyUserConflictResponse", ""
2998
- ) as IdentifyUserConflictResponse;
2999
- throw new ApiException<IdentifyUserConflictResponse>(409, "Conflict", body, response.headers);
2994
+ "GenericError", ""
2995
+ ) as GenericError;
2996
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3000
2997
  }
3001
-
3002
- // Work around for missing responses in specification, e.g. for petstore.yaml
3003
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3004
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2998
+ if (isCodeInRange("404", response.httpStatusCode)) {
2999
+ const body: GenericError = ObjectSerializer.deserialize(
3005
3000
  ObjectSerializer.parse(await response.body.text(), contentType),
3006
- "InlineResponse200", ""
3007
- ) as InlineResponse200;
3008
- return body;
3001
+ "GenericError", ""
3002
+ ) as GenericError;
3003
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
3009
3004
  }
3010
-
3011
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
3012
- }
3013
-
3014
- /**
3015
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
3016
- * to the expected objects
3017
- *
3018
- * @params response Response returned by the server for a request to identifyUserBySubscriptionId
3019
- * @throws ApiException if the response code was not in [200, 299]
3020
- */
3021
- public async identifyUserBySubscriptionId(response: ResponseContext): Promise<UserIdentityResponse > {
3022
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3023
- if (isCodeInRange("200", response.httpStatusCode)) {
3024
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
3005
+ if (isCodeInRange("409", response.httpStatusCode)) {
3006
+ const body: GenericError = ObjectSerializer.deserialize(
3025
3007
  ObjectSerializer.parse(await response.body.text(), contentType),
3026
- "UserIdentityResponse", ""
3027
- ) as UserIdentityResponse;
3028
- return body;
3008
+ "GenericError", ""
3009
+ ) as GenericError;
3010
+ throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3029
3011
  }
3030
- if (isCodeInRange("409", response.httpStatusCode)) {
3031
- const body: IdentifyUserConflictResponse = ObjectSerializer.deserialize(
3012
+ if (isCodeInRange("429", response.httpStatusCode)) {
3013
+ const body: RateLimitError = ObjectSerializer.deserialize(
3032
3014
  ObjectSerializer.parse(await response.body.text(), contentType),
3033
- "IdentifyUserConflictResponse", ""
3034
- ) as IdentifyUserConflictResponse;
3035
- throw new ApiException<IdentifyUserConflictResponse>(409, "Conflict", body, response.headers);
3015
+ "RateLimitError", ""
3016
+ ) as RateLimitError;
3017
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3036
3018
  }
3037
3019
 
3038
3020
  // Work around for missing responses in specification, e.g. for petstore.yaml
3039
3021
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3040
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
3022
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
3041
3023
  ObjectSerializer.parse(await response.body.text(), contentType),
3042
- "UserIdentityResponse", ""
3043
- ) as UserIdentityResponse;
3024
+ "UserIdentityBody", ""
3025
+ ) as UserIdentityBody;
3044
3026
  return body;
3045
3027
  }
3046
3028
 
@@ -3051,25 +3033,39 @@ export class DefaultApiResponseProcessor {
3051
3033
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3052
3034
  * to the expected objects
3053
3035
  *
3054
- * @params response Response returned by the server for a request to transferSubscription
3036
+ * @params response Response returned by the server for a request to unsubscribeEmailWithToken
3055
3037
  * @throws ApiException if the response code was not in [200, 299]
3056
3038
  */
3057
- public async transferSubscription(response: ResponseContext): Promise<UserIdentityResponse > {
3039
+ public async unsubscribeEmailWithToken(response: ResponseContext): Promise<GenericSuccessBoolResponse > {
3058
3040
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3059
- if (isCodeInRange("200", response.httpStatusCode)) {
3060
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
3041
+ if (isCodeInRange("202", response.httpStatusCode)) {
3042
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
3061
3043
  ObjectSerializer.parse(await response.body.text(), contentType),
3062
- "UserIdentityResponse", ""
3063
- ) as UserIdentityResponse;
3044
+ "GenericSuccessBoolResponse", ""
3045
+ ) as GenericSuccessBoolResponse;
3064
3046
  return body;
3065
3047
  }
3048
+ if (isCodeInRange("400", response.httpStatusCode)) {
3049
+ const body: GenericError = ObjectSerializer.deserialize(
3050
+ ObjectSerializer.parse(await response.body.text(), contentType),
3051
+ "GenericError", ""
3052
+ ) as GenericError;
3053
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3054
+ }
3055
+ if (isCodeInRange("429", response.httpStatusCode)) {
3056
+ const body: RateLimitError = ObjectSerializer.deserialize(
3057
+ ObjectSerializer.parse(await response.body.text(), contentType),
3058
+ "RateLimitError", ""
3059
+ ) as RateLimitError;
3060
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3061
+ }
3066
3062
 
3067
3063
  // Work around for missing responses in specification, e.g. for petstore.yaml
3068
3064
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3069
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
3065
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
3070
3066
  ObjectSerializer.parse(await response.body.text(), contentType),
3071
- "UserIdentityResponse", ""
3072
- ) as UserIdentityResponse;
3067
+ "GenericSuccessBoolResponse", ""
3068
+ ) as GenericSuccessBoolResponse;
3073
3069
  return body;
3074
3070
  }
3075
3071
 
@@ -3093,11 +3089,18 @@ export class DefaultApiResponseProcessor {
3093
3089
  return body;
3094
3090
  }
3095
3091
  if (isCodeInRange("400", response.httpStatusCode)) {
3096
- const body: BadRequestError = ObjectSerializer.deserialize(
3092
+ const body: GenericError = ObjectSerializer.deserialize(
3097
3093
  ObjectSerializer.parse(await response.body.text(), contentType),
3098
- "BadRequestError", ""
3099
- ) as BadRequestError;
3100
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
3094
+ "GenericError", ""
3095
+ ) as GenericError;
3096
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3097
+ }
3098
+ if (isCodeInRange("429", response.httpStatusCode)) {
3099
+ const body: RateLimitError = ObjectSerializer.deserialize(
3100
+ ObjectSerializer.parse(await response.body.text(), contentType),
3101
+ "RateLimitError", ""
3102
+ ) as RateLimitError;
3103
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3101
3104
  }
3102
3105
 
3103
3106
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3129,11 +3132,18 @@ export class DefaultApiResponseProcessor {
3129
3132
  return body;
3130
3133
  }
3131
3134
  if (isCodeInRange("400", response.httpStatusCode)) {
3132
- const body: BadRequestError = ObjectSerializer.deserialize(
3135
+ const body: GenericError = ObjectSerializer.deserialize(
3136
+ ObjectSerializer.parse(await response.body.text(), contentType),
3137
+ "GenericError", ""
3138
+ ) as GenericError;
3139
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3140
+ }
3141
+ if (isCodeInRange("429", response.httpStatusCode)) {
3142
+ const body: RateLimitError = ObjectSerializer.deserialize(
3133
3143
  ObjectSerializer.parse(await response.body.text(), contentType),
3134
- "BadRequestError", ""
3135
- ) as BadRequestError;
3136
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
3144
+ "RateLimitError", ""
3145
+ ) as RateLimitError;
3146
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3137
3147
  }
3138
3148
 
3139
3149
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3152,78 +3162,41 @@ export class DefaultApiResponseProcessor {
3152
3162
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3153
3163
  * to the expected objects
3154
3164
  *
3155
- * @params response Response returned by the server for a request to updatePlayer
3165
+ * @params response Response returned by the server for a request to updateSubscription
3156
3166
  * @throws ApiException if the response code was not in [200, 299]
3157
3167
  */
3158
- public async updatePlayer(response: ResponseContext): Promise<UpdatePlayerSuccessResponse > {
3168
+ public async updateSubscription(response: ResponseContext): Promise<void > {
3159
3169
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3160
3170
  if (isCodeInRange("200", response.httpStatusCode)) {
3161
- const body: UpdatePlayerSuccessResponse = ObjectSerializer.deserialize(
3162
- ObjectSerializer.parse(await response.body.text(), contentType),
3163
- "UpdatePlayerSuccessResponse", ""
3164
- ) as UpdatePlayerSuccessResponse;
3165
- return body;
3171
+ return;
3166
3172
  }
3167
3173
  if (isCodeInRange("400", response.httpStatusCode)) {
3168
- const body: BadRequestError = ObjectSerializer.deserialize(
3174
+ const body: GenericError = ObjectSerializer.deserialize(
3169
3175
  ObjectSerializer.parse(await response.body.text(), contentType),
3170
- "BadRequestError", ""
3171
- ) as BadRequestError;
3172
- throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
3176
+ "GenericError", ""
3177
+ ) as GenericError;
3178
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3173
3179
  }
3174
-
3175
- // Work around for missing responses in specification, e.g. for petstore.yaml
3176
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3177
- const body: UpdatePlayerSuccessResponse = ObjectSerializer.deserialize(
3180
+ if (isCodeInRange("404", response.httpStatusCode)) {
3181
+ const body: GenericError = ObjectSerializer.deserialize(
3178
3182
  ObjectSerializer.parse(await response.body.text(), contentType),
3179
- "UpdatePlayerSuccessResponse", ""
3180
- ) as UpdatePlayerSuccessResponse;
3181
- return body;
3183
+ "GenericError", ""
3184
+ ) as GenericError;
3185
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
3182
3186
  }
3183
-
3184
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
3185
- }
3186
-
3187
- /**
3188
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
3189
- * to the expected objects
3190
- *
3191
- * @params response Response returned by the server for a request to updatePlayerTags
3192
- * @throws ApiException if the response code was not in [200, 299]
3193
- */
3194
- public async updatePlayerTags(response: ResponseContext): Promise<UpdatePlayerTagsSuccessResponse > {
3195
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3196
- if (isCodeInRange("200", response.httpStatusCode)) {
3197
- const body: UpdatePlayerTagsSuccessResponse = ObjectSerializer.deserialize(
3187
+ if (isCodeInRange("409", response.httpStatusCode)) {
3188
+ const body: GenericError = ObjectSerializer.deserialize(
3198
3189
  ObjectSerializer.parse(await response.body.text(), contentType),
3199
- "UpdatePlayerTagsSuccessResponse", ""
3200
- ) as UpdatePlayerTagsSuccessResponse;
3201
- return body;
3190
+ "GenericError", ""
3191
+ ) as GenericError;
3192
+ throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3202
3193
  }
3203
-
3204
- // Work around for missing responses in specification, e.g. for petstore.yaml
3205
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3206
- const body: UpdatePlayerTagsSuccessResponse = ObjectSerializer.deserialize(
3194
+ if (isCodeInRange("429", response.httpStatusCode)) {
3195
+ const body: RateLimitError = ObjectSerializer.deserialize(
3207
3196
  ObjectSerializer.parse(await response.body.text(), contentType),
3208
- "UpdatePlayerTagsSuccessResponse", ""
3209
- ) as UpdatePlayerTagsSuccessResponse;
3210
- return body;
3211
- }
3212
-
3213
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
3214
- }
3215
-
3216
- /**
3217
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
3218
- * to the expected objects
3219
- *
3220
- * @params response Response returned by the server for a request to updateSubscription
3221
- * @throws ApiException if the response code was not in [200, 299]
3222
- */
3223
- public async updateSubscription(response: ResponseContext): Promise<void > {
3224
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3225
- if (isCodeInRange("202", response.httpStatusCode)) {
3226
- return;
3197
+ "RateLimitError", ""
3198
+ ) as RateLimitError;
3199
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3227
3200
  }
3228
3201
 
3229
3202
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3245,22 +3218,43 @@ export class DefaultApiResponseProcessor {
3245
3218
  * @params response Response returned by the server for a request to updateUser
3246
3219
  * @throws ApiException if the response code was not in [200, 299]
3247
3220
  */
3248
- public async updateUser(response: ResponseContext): Promise<InlineResponse202 > {
3221
+ public async updateUser(response: ResponseContext): Promise<PropertiesBody > {
3249
3222
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3250
3223
  if (isCodeInRange("202", response.httpStatusCode)) {
3251
- const body: InlineResponse202 = ObjectSerializer.deserialize(
3224
+ const body: PropertiesBody = ObjectSerializer.deserialize(
3252
3225
  ObjectSerializer.parse(await response.body.text(), contentType),
3253
- "InlineResponse202", ""
3254
- ) as InlineResponse202;
3226
+ "PropertiesBody", ""
3227
+ ) as PropertiesBody;
3255
3228
  return body;
3256
3229
  }
3230
+ if (isCodeInRange("400", response.httpStatusCode)) {
3231
+ const body: GenericError = ObjectSerializer.deserialize(
3232
+ ObjectSerializer.parse(await response.body.text(), contentType),
3233
+ "GenericError", ""
3234
+ ) as GenericError;
3235
+ throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3236
+ }
3237
+ if (isCodeInRange("409", response.httpStatusCode)) {
3238
+ const body: GenericError = ObjectSerializer.deserialize(
3239
+ ObjectSerializer.parse(await response.body.text(), contentType),
3240
+ "GenericError", ""
3241
+ ) as GenericError;
3242
+ throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3243
+ }
3244
+ if (isCodeInRange("429", response.httpStatusCode)) {
3245
+ const body: RateLimitError = ObjectSerializer.deserialize(
3246
+ ObjectSerializer.parse(await response.body.text(), contentType),
3247
+ "RateLimitError", ""
3248
+ ) as RateLimitError;
3249
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3250
+ }
3257
3251
 
3258
3252
  // Work around for missing responses in specification, e.g. for petstore.yaml
3259
3253
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3260
- const body: InlineResponse202 = ObjectSerializer.deserialize(
3254
+ const body: PropertiesBody = ObjectSerializer.deserialize(
3261
3255
  ObjectSerializer.parse(await response.body.text(), contentType),
3262
- "InlineResponse202", ""
3263
- ) as InlineResponse202;
3256
+ "PropertiesBody", ""
3257
+ ) as PropertiesBody;
3264
3258
  return body;
3265
3259
  }
3266
3260