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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/DefaultApi.md +401 -778
  2. package/apis/DefaultApi.ts +682 -1216
  3. package/auth/auth.ts +14 -14
  4. package/configuration.ts +6 -6
  5. package/dist/apis/DefaultApi.d.ts +36 -63
  6. package/dist/apis/DefaultApi.js +653 -1174
  7. package/dist/apis/DefaultApi.js.map +1 -1
  8. package/dist/auth/auth.d.ts +6 -6
  9. package/dist/auth/auth.js +19 -19
  10. package/dist/auth/auth.js.map +1 -1
  11. package/dist/configuration.d.ts +2 -2
  12. package/dist/configuration.js +4 -4
  13. package/dist/configuration.js.map +1 -1
  14. package/dist/models/BasicNotification.d.ts +14 -12
  15. package/dist/models/BasicNotification.js +20 -20
  16. package/dist/models/BasicNotification.js.map +1 -1
  17. package/dist/models/BasicNotificationAllOf.d.ts +10 -8
  18. package/dist/models/BasicNotificationAllOf.js +17 -11
  19. package/dist/models/BasicNotificationAllOf.js.map +1 -1
  20. package/dist/models/CreateNotificationSuccessResponse.d.ts +1 -3
  21. package/dist/models/CreateNotificationSuccessResponse.js +1 -7
  22. package/dist/models/CreateNotificationSuccessResponse.js.map +1 -1
  23. package/dist/models/{ExportPlayersRequestBody.d.ts → ExportSubscriptionsRequestBody.d.ts} +1 -1
  24. package/dist/models/ExportSubscriptionsRequestBody.js +34 -0
  25. package/dist/models/ExportSubscriptionsRequestBody.js.map +1 -0
  26. package/dist/models/{ExportPlayersSuccessResponse.d.ts → ExportSubscriptionsSuccessResponse.d.ts} +1 -1
  27. package/dist/models/ExportSubscriptionsSuccessResponse.js +22 -0
  28. package/dist/models/ExportSubscriptionsSuccessResponse.js.map +1 -0
  29. package/dist/models/Filter.d.ts +6 -2
  30. package/dist/models/Filter.js +24 -0
  31. package/dist/models/Filter.js.map +1 -1
  32. package/dist/models/FilterExpression.d.ts +27 -0
  33. package/dist/models/FilterExpression.js +70 -0
  34. package/dist/models/FilterExpression.js.map +1 -0
  35. package/dist/models/GenericError.d.ts +3 -2
  36. package/dist/models/GenericError.js +13 -1
  37. package/dist/models/GenericError.js.map +1 -1
  38. package/dist/models/{DeletePlayerSuccessResponse.d.ts → GenericSuccessBoolResponse.d.ts} +1 -1
  39. package/dist/models/GenericSuccessBoolResponse.js +22 -0
  40. package/dist/models/GenericSuccessBoolResponse.js.map +1 -0
  41. package/dist/models/{GetNotificationRequestBody.d.ts → GetNotificationHistoryRequestBody.d.ts} +3 -3
  42. package/dist/models/GetNotificationHistoryRequestBody.js +34 -0
  43. package/dist/models/GetNotificationHistoryRequestBody.js.map +1 -0
  44. package/dist/models/{PlayerSlice.d.ts → GetSegmentsSuccessResponse.d.ts} +3 -3
  45. package/dist/models/GetSegmentsSuccessResponse.js +40 -0
  46. package/dist/models/GetSegmentsSuccessResponse.js.map +1 -0
  47. package/dist/models/InvalidIdentifierError.d.ts +1 -1
  48. package/dist/models/InvalidIdentifierError.js +2 -2
  49. package/dist/models/InvalidIdentifierError.js.map +1 -1
  50. package/dist/models/{StringMap.d.ts → LanguageStringMap.d.ts} +1 -1
  51. package/dist/models/{StringMap.js → LanguageStringMap.js} +10 -10
  52. package/dist/models/LanguageStringMap.js.map +1 -0
  53. package/dist/models/Notification.d.ts +14 -12
  54. package/dist/models/Notification.js +20 -20
  55. package/dist/models/Notification.js.map +1 -1
  56. package/dist/models/NotificationTarget.d.ts +4 -4
  57. package/dist/models/NotificationTarget.js +3 -9
  58. package/dist/models/NotificationTarget.js.map +1 -1
  59. package/dist/models/NotificationWithMeta.d.ts +14 -12
  60. package/dist/models/NotificationWithMeta.js +20 -20
  61. package/dist/models/NotificationWithMeta.js.map +1 -1
  62. package/dist/models/ObjectSerializer.d.ts +15 -32
  63. package/dist/models/ObjectSerializer.js +50 -102
  64. package/dist/models/ObjectSerializer.js.map +1 -1
  65. package/dist/models/{InlineResponse202.d.ts → PropertiesBody.d.ts} +1 -1
  66. package/dist/models/PropertiesBody.js +22 -0
  67. package/dist/models/PropertiesBody.js.map +1 -0
  68. package/dist/models/{DeleteSegmentNotFoundResponse.d.ts → RateLimitError.d.ts} +3 -2
  69. package/dist/models/RateLimitError.js +28 -0
  70. package/dist/models/RateLimitError.js.map +1 -0
  71. package/dist/models/Segment.d.ts +2 -2
  72. package/dist/models/Segment.js +1 -1
  73. package/dist/models/Segment.js.map +1 -1
  74. package/dist/models/{CreateSubscriptionRequestBody.d.ts → SegmentData.d.ts} +8 -4
  75. package/dist/models/SegmentData.js +58 -0
  76. package/dist/models/SegmentData.js.map +1 -0
  77. package/dist/models/{SubscriptionObject.d.ts → Subscription.d.ts} +3 -3
  78. package/dist/models/{SubscriptionObject.js → Subscription.js} +11 -11
  79. package/dist/models/Subscription.js.map +1 -0
  80. package/dist/models/{CreatePlayerSuccessResponse.d.ts → SubscriptionBody.d.ts} +3 -3
  81. package/dist/models/SubscriptionBody.js +22 -0
  82. package/dist/models/SubscriptionBody.js.map +1 -0
  83. package/dist/models/{PlayerNotificationTarget.d.ts → SubscriptionNotificationTarget.d.ts} +7 -7
  84. package/dist/models/{PlayerNotificationTarget.js → SubscriptionNotificationTarget.js} +14 -20
  85. package/dist/models/SubscriptionNotificationTarget.js.map +1 -0
  86. package/dist/models/TransferSubscriptionRequestBody.d.ts +1 -1
  87. package/dist/models/TransferSubscriptionRequestBody.js +1 -1
  88. package/dist/models/TransferSubscriptionRequestBody.js.map +1 -1
  89. package/dist/models/UpdateLiveActivityRequest.d.ts +8 -3
  90. package/dist/models/UpdateLiveActivityRequest.js +33 -3
  91. package/dist/models/UpdateLiveActivityRequest.js.map +1 -1
  92. package/dist/models/UpdateLiveActivitySuccessResponse.d.ts +1 -3
  93. package/dist/models/UpdateLiveActivitySuccessResponse.js +2 -8
  94. package/dist/models/UpdateLiveActivitySuccessResponse.js.map +1 -1
  95. package/dist/models/User.d.ts +3 -5
  96. package/dist/models/User.js +2 -8
  97. package/dist/models/User.js.map +1 -1
  98. package/dist/models/{InlineResponse200.d.ts → UserIdentityBody.d.ts} +2 -2
  99. package/dist/models/UserIdentityBody.js +22 -0
  100. package/dist/models/UserIdentityBody.js.map +1 -0
  101. package/dist/models/{BeginLiveActivityRequest.d.ts → WebButton.d.ts} +5 -3
  102. package/dist/models/WebButton.js +40 -0
  103. package/dist/models/WebButton.js.map +1 -0
  104. package/dist/models/all.d.ts +15 -32
  105. package/dist/models/all.js +15 -32
  106. package/dist/models/all.js.map +1 -1
  107. package/dist/servers.js +1 -1
  108. package/dist/servers.js.map +1 -1
  109. package/dist/types/ObjectParamAPI.d.ts +52 -102
  110. package/dist/types/ObjectParamAPI.js +26 -47
  111. package/dist/types/ObjectParamAPI.js.map +1 -1
  112. package/dist/types/ObservableAPI.d.ts +25 -45
  113. package/dist/types/ObservableAPI.js +82 -250
  114. package/dist/types/ObservableAPI.js.map +1 -1
  115. package/dist/types/PromiseAPI.d.ts +25 -45
  116. package/dist/types/PromiseAPI.js +32 -60
  117. package/dist/types/PromiseAPI.js.map +1 -1
  118. package/models/App.ts +1 -1
  119. package/models/BasicNotification.ts +49 -46
  120. package/models/BasicNotificationAllOf.ts +34 -23
  121. package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
  122. package/models/Button.ts +1 -1
  123. package/models/CreateNotificationSuccessResponse.ts +5 -13
  124. package/models/CreateSegmentConflictResponse.ts +1 -1
  125. package/models/CreateSegmentSuccessResponse.ts +1 -1
  126. package/models/CreateUserConflictResponse.ts +1 -1
  127. package/models/CreateUserConflictResponseErrorsInner.ts +1 -1
  128. package/models/CreateUserConflictResponseErrorsItemsMeta.ts +1 -1
  129. package/models/DeliveryData.ts +1 -1
  130. package/models/ExportEventsSuccessResponse.ts +1 -1
  131. package/models/{ExportPlayersRequestBody.ts → ExportSubscriptionsRequestBody.ts} +3 -3
  132. package/models/{ExportPlayersSuccessResponse.ts → ExportSubscriptionsSuccessResponse.ts} +3 -3
  133. package/models/Filter.ts +45 -5
  134. package/models/FilterExpression.ts +120 -0
  135. package/models/GenericError.ts +17 -4
  136. package/models/{DeletePlayerSuccessResponse.ts → GenericSuccessBoolResponse.ts} +3 -3
  137. package/models/{GetNotificationRequestBody.ts → GetNotificationHistoryRequestBody.ts} +6 -6
  138. package/models/{PlayerSlice.ts → GetSegmentsSuccessResponse.ts} +20 -8
  139. package/models/InvalidIdentifierError.ts +6 -6
  140. package/models/{StringMap.ts → LanguageStringMap.ts} +3 -3
  141. package/models/Notification.ts +49 -46
  142. package/models/NotificationAllOf.ts +1 -1
  143. package/models/NotificationHistorySuccessResponse.ts +1 -1
  144. package/models/NotificationSlice.ts +1 -1
  145. package/models/NotificationTarget.ts +17 -25
  146. package/models/NotificationWithMeta.ts +49 -46
  147. package/models/NotificationWithMetaAllOf.ts +1 -1
  148. package/models/ObjectSerializer.ts +57 -109
  149. package/models/Operator.ts +1 -1
  150. package/models/OutcomeData.ts +1 -1
  151. package/models/OutcomesData.ts +1 -1
  152. package/models/PlatformDeliveryData.ts +1 -1
  153. package/models/PlatformDeliveryDataEmailAllOf.ts +1 -1
  154. package/models/PlatformDeliveryDataSmsAllOf.ts +1 -1
  155. package/models/{InlineResponse202.ts → PropertiesBody.ts} +3 -3
  156. package/models/PropertiesDeltas.ts +1 -1
  157. package/models/PropertiesObject.ts +1 -1
  158. package/models/Purchase.ts +1 -1
  159. package/models/{CreatePlayerSuccessResponse.ts → RateLimitError.ts} +10 -10
  160. package/models/Segment.ts +4 -4
  161. package/models/SegmentData.ts +94 -0
  162. package/models/SegmentNotificationTarget.ts +1 -1
  163. package/models/{SubscriptionObject.ts → Subscription.ts} +6 -6
  164. package/models/{InlineResponse201.ts → SubscriptionBody.ts} +6 -6
  165. package/models/{PlayerNotificationTarget.ts → SubscriptionNotificationTarget.ts} +21 -29
  166. package/models/TransferSubscriptionRequestBody.ts +3 -3
  167. package/models/UpdateLiveActivityRequest.ts +56 -9
  168. package/models/UpdateLiveActivitySuccessResponse.ts +4 -12
  169. package/models/UpdateUserRequest.ts +1 -1
  170. package/models/User.ts +6 -14
  171. package/models/{InlineResponse200.ts → UserIdentityBody.ts} +5 -5
  172. package/models/{BeginLiveActivityRequest.ts → WebButton.ts} +23 -9
  173. package/models/all.ts +15 -32
  174. package/package.json +2 -2
  175. package/servers.ts +1 -1
  176. package/types/ObjectParamAPI.ts +161 -357
  177. package/types/ObservableAPI.ts +108 -301
  178. package/types/PromiseAPI.ts +89 -184
  179. package/dist/models/BeginLiveActivityRequest.js +0 -28
  180. package/dist/models/BeginLiveActivityRequest.js.map +0 -1
  181. package/dist/models/CancelNotificationSuccessResponse.d.ts +0 -17
  182. package/dist/models/CancelNotificationSuccessResponse.js +0 -22
  183. package/dist/models/CancelNotificationSuccessResponse.js.map +0 -1
  184. package/dist/models/CreatePlayerSuccessResponse.js +0 -28
  185. package/dist/models/CreatePlayerSuccessResponse.js.map +0 -1
  186. package/dist/models/CreateSubscriptionRequestBody.js +0 -28
  187. package/dist/models/CreateSubscriptionRequestBody.js.map +0 -1
  188. package/dist/models/DeletePlayerNotFoundResponse.d.ts +0 -17
  189. package/dist/models/DeletePlayerNotFoundResponse.js +0 -22
  190. package/dist/models/DeletePlayerNotFoundResponse.js.map +0 -1
  191. package/dist/models/DeletePlayerSuccessResponse.js +0 -22
  192. package/dist/models/DeletePlayerSuccessResponse.js.map +0 -1
  193. package/dist/models/DeleteSegmentNotFoundResponse.js +0 -22
  194. package/dist/models/DeleteSegmentNotFoundResponse.js.map +0 -1
  195. package/dist/models/DeleteSegmentSuccessResponse.d.ts +0 -17
  196. package/dist/models/DeleteSegmentSuccessResponse.js +0 -22
  197. package/dist/models/DeleteSegmentSuccessResponse.js.map +0 -1
  198. package/dist/models/ExportPlayersRequestBody.js +0 -34
  199. package/dist/models/ExportPlayersRequestBody.js.map +0 -1
  200. package/dist/models/ExportPlayersSuccessResponse.js +0 -22
  201. package/dist/models/ExportPlayersSuccessResponse.js.map +0 -1
  202. package/dist/models/FilterExpressions.d.ts +0 -23
  203. package/dist/models/FilterExpressions.js +0 -46
  204. package/dist/models/FilterExpressions.js.map +0 -1
  205. package/dist/models/GetNotificationRequestBody.js +0 -34
  206. package/dist/models/GetNotificationRequestBody.js.map +0 -1
  207. package/dist/models/InlineResponse200.js +0 -22
  208. package/dist/models/InlineResponse200.js.map +0 -1
  209. package/dist/models/InlineResponse2003.d.ts +0 -17
  210. package/dist/models/InlineResponse2003.js +0 -22
  211. package/dist/models/InlineResponse2003.js.map +0 -1
  212. package/dist/models/InlineResponse201.d.ts +0 -18
  213. package/dist/models/InlineResponse201.js +0 -22
  214. package/dist/models/InlineResponse201.js.map +0 -1
  215. package/dist/models/InlineResponse202.js +0 -22
  216. package/dist/models/InlineResponse202.js.map +0 -1
  217. package/dist/models/Notification200Errors.d.ts +0 -18
  218. package/dist/models/Notification200Errors.js +0 -28
  219. package/dist/models/Notification200Errors.js.map +0 -1
  220. package/dist/models/Player.d.ts +0 -43
  221. package/dist/models/Player.js +0 -178
  222. package/dist/models/Player.js.map +0 -1
  223. package/dist/models/PlayerNotificationTarget.js.map +0 -1
  224. package/dist/models/PlayerNotificationTargetIncludeAliases.d.ts +0 -17
  225. package/dist/models/PlayerNotificationTargetIncludeAliases.js +0 -22
  226. package/dist/models/PlayerNotificationTargetIncludeAliases.js.map +0 -1
  227. package/dist/models/PlayerSlice.js +0 -40
  228. package/dist/models/PlayerSlice.js.map +0 -1
  229. package/dist/models/StringMap.js.map +0 -1
  230. package/dist/models/SubscriptionObject.js.map +0 -1
  231. package/dist/models/UpdatePlayerSuccessResponse.d.ts +0 -17
  232. package/dist/models/UpdatePlayerSuccessResponse.js +0 -22
  233. package/dist/models/UpdatePlayerSuccessResponse.js.map +0 -1
  234. package/dist/models/UpdatePlayerTagsRequestBody.d.ts +0 -17
  235. package/dist/models/UpdatePlayerTagsRequestBody.js +0 -22
  236. package/dist/models/UpdatePlayerTagsRequestBody.js.map +0 -1
  237. package/dist/models/UpdatePlayerTagsSuccessResponse.d.ts +0 -17
  238. package/dist/models/UpdatePlayerTagsSuccessResponse.js +0 -22
  239. package/dist/models/UpdatePlayerTagsSuccessResponse.js.map +0 -1
  240. package/dist/models/UpdateSubscriptionRequestBody.d.ts +0 -18
  241. package/dist/models/UpdateSubscriptionRequestBody.js +0 -22
  242. package/dist/models/UpdateSubscriptionRequestBody.js.map +0 -1
  243. package/dist/models/UserIdentityRequestBody.d.ts +0 -19
  244. package/dist/models/UserIdentityRequestBody.js +0 -22
  245. package/dist/models/UserIdentityRequestBody.js.map +0 -1
  246. package/dist/models/UserIdentityResponse.d.ts +0 -19
  247. package/dist/models/UserIdentityResponse.js +0 -22
  248. package/dist/models/UserIdentityResponse.js.map +0 -1
  249. package/dist/models/UserSubscriptionOptions.d.ts +0 -17
  250. package/dist/models/UserSubscriptionOptions.js +0 -22
  251. package/dist/models/UserSubscriptionOptions.js.map +0 -1
  252. package/models/CancelNotificationSuccessResponse.ts +0 -31
  253. package/models/CreateSubscriptionRequestBody.ts +0 -39
  254. package/models/DeletePlayerNotFoundResponse.ts +0 -31
  255. package/models/DeleteSegmentNotFoundResponse.ts +0 -31
  256. package/models/DeleteSegmentSuccessResponse.ts +0 -31
  257. package/models/FilterExpressions.ts +0 -80
  258. package/models/InlineResponse2003.ts +0 -31
  259. package/models/Notification200Errors.ts +0 -45
  260. package/models/Player.ts +0 -291
  261. package/models/PlayerNotificationTargetIncludeAliases.ts +0 -31
  262. package/models/UpdatePlayerSuccessResponse.ts +0 -31
  263. package/models/UpdatePlayerTagsRequestBody.ts +0 -34
  264. package/models/UpdatePlayerTagsSuccessResponse.ts +0 -31
  265. package/models/UpdateSubscriptionRequestBody.ts +0 -32
  266. package/models/UserIdentityRequestBody.ts +0 -31
  267. package/models/UserIdentityResponse.ts +0 -31
  268. package/models/UserSubscriptionOptions.ts +0 -31
@@ -11,47 +11,32 @@ import {SecurityAuthentication} from '../auth/auth';
11
11
 
12
12
 
13
13
  import { App } from '../models/App';
14
- import { BeginLiveActivityRequest } from '../models/BeginLiveActivityRequest';
15
- import { CancelNotificationSuccessResponse } from '../models/CancelNotificationSuccessResponse';
16
14
  import { CreateNotificationSuccessResponse } from '../models/CreateNotificationSuccessResponse';
17
- import { CreatePlayerSuccessResponse } from '../models/CreatePlayerSuccessResponse';
18
15
  import { CreateSegmentConflictResponse } from '../models/CreateSegmentConflictResponse';
19
16
  import { CreateSegmentSuccessResponse } from '../models/CreateSegmentSuccessResponse';
20
- import { CreateSubscriptionRequestBody } from '../models/CreateSubscriptionRequestBody';
21
17
  import { CreateUserConflictResponse } from '../models/CreateUserConflictResponse';
22
- import { DeletePlayerNotFoundResponse } from '../models/DeletePlayerNotFoundResponse';
23
- import { DeletePlayerSuccessResponse } from '../models/DeletePlayerSuccessResponse';
24
- import { DeleteSegmentNotFoundResponse } from '../models/DeleteSegmentNotFoundResponse';
25
- import { DeleteSegmentSuccessResponse } from '../models/DeleteSegmentSuccessResponse';
26
18
  import { ExportEventsSuccessResponse } from '../models/ExportEventsSuccessResponse';
27
- import { ExportPlayersRequestBody } from '../models/ExportPlayersRequestBody';
28
- import { ExportPlayersSuccessResponse } from '../models/ExportPlayersSuccessResponse';
19
+ import { ExportSubscriptionsRequestBody } from '../models/ExportSubscriptionsRequestBody';
20
+ import { ExportSubscriptionsSuccessResponse } from '../models/ExportSubscriptionsSuccessResponse';
29
21
  import { GenericError } from '../models/GenericError';
30
- import { GetNotificationRequestBody } from '../models/GetNotificationRequestBody';
31
- import { InlineResponse200 } from '../models/InlineResponse200';
32
- import { InlineResponse2003 } from '../models/InlineResponse2003';
33
- import { InlineResponse201 } from '../models/InlineResponse201';
34
- import { InlineResponse202 } from '../models/InlineResponse202';
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';
42
- import { RateLimiterError } from '../models/RateLimiterError';
30
+ import { PropertiesBody } from '../models/PropertiesBody';
31
+ import { RateLimitError } from '../models/RateLimitError';
43
32
  import { Segment } from '../models/Segment';
33
+ import { SubscriptionBody } from '../models/SubscriptionBody';
44
34
  import { TransferSubscriptionRequestBody } from '../models/TransferSubscriptionRequestBody';
45
35
  import { UpdateLiveActivityRequest } from '../models/UpdateLiveActivityRequest';
46
36
  import { UpdateLiveActivitySuccessResponse } from '../models/UpdateLiveActivitySuccessResponse';
47
- import { UpdatePlayerSuccessResponse } from '../models/UpdatePlayerSuccessResponse';
48
- import { UpdatePlayerTagsRequestBody } from '../models/UpdatePlayerTagsRequestBody';
49
- import { UpdatePlayerTagsSuccessResponse } from '../models/UpdatePlayerTagsSuccessResponse';
50
- import { UpdateSubscriptionRequestBody } from '../models/UpdateSubscriptionRequestBody';
51
37
  import { UpdateUserRequest } from '../models/UpdateUserRequest';
52
38
  import { User } from '../models/User';
53
- import { UserIdentityRequestBody } from '../models/UserIdentityRequestBody';
54
- import { UserIdentityResponse } from '../models/UserIdentityResponse';
39
+ import { UserIdentityBody } from '../models/UserIdentityBody';
55
40
 
56
41
  /**
57
42
  * no description
@@ -59,57 +44,46 @@ import { UserIdentityResponse } from '../models/UserIdentityResponse';
59
44
  export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
60
45
 
61
46
  /**
62
- * Starts a Live Activity
63
- * Start Live Activity
64
- * @param appId The OneSignal App ID for your app. Available in Keys & IDs.
65
- * @param activityId Live Activity record ID
66
- * @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
67
51
  */
68
- 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> {
69
53
  let _config = _options || this.configuration;
70
54
 
71
55
  // verify required parameter 'appId' is not null or undefined
72
56
  if (appId === null || appId === undefined) {
73
- throw new RequiredError("DefaultApi", "beginLiveActivity", "appId");
74
- }
75
-
76
-
77
- // verify required parameter 'activityId' is not null or undefined
78
- if (activityId === null || activityId === undefined) {
79
- throw new RequiredError("DefaultApi", "beginLiveActivity", "activityId");
57
+ throw new RequiredError("DefaultApi", "cancelNotification", "appId");
80
58
  }
81
59
 
82
60
 
83
- // verify required parameter 'beginLiveActivityRequest' is not null or undefined
84
- if (beginLiveActivityRequest === null || beginLiveActivityRequest === undefined) {
85
- 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");
86
64
  }
87
65
 
88
66
 
89
67
  // Path Params
90
- const localVarPath = '/apps/{app_id}/live_activities/{activity_id}/token'
91
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
92
- .replace('{' + 'activity_id' + '}', encodeURIComponent(String(activityId)));
68
+ const localVarPath = '/notifications/{notification_id}'
69
+ .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
93
70
 
94
71
  // Make Request Context
95
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
72
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
96
73
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
97
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
+ }
98
82
 
99
- // Body Params
100
- const contentType = ObjectSerializer.getPreferredMediaType([
101
- "application/json"
102
- ]);
103
- requestContext.setHeaderParam("Content-Type", contentType);
104
- const serializedBody = ObjectSerializer.stringify(
105
- ObjectSerializer.serialize(beginLiveActivityRequest, "BeginLiveActivityRequest", ""),
106
- contentType
107
- );
108
- requestContext.setBody(serializedBody);
109
83
 
110
84
  let authMethod: SecurityAuthentication | undefined;
111
85
  // Apply auth methods
112
- authMethod = _config.authMethods["app_key"]
86
+ authMethod = _config.authMethods["rest_api_key"]
113
87
  if (authMethod?.applySecurityAuthentication) {
114
88
  await authMethod?.applySecurityAuthentication(requestContext);
115
89
  }
@@ -123,43 +97,67 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
123
97
  }
124
98
 
125
99
  /**
126
- * Used to stop a scheduled or currently outgoing notification
127
- * Stop a scheduled or currently outgoing notification
100
+ * Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
128
101
  * @param appId
129
- * @param notificationId
102
+ * @param aliasLabel
103
+ * @param aliasId
104
+ * @param userIdentityBody
130
105
  */
131
- 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> {
132
107
  let _config = _options || this.configuration;
133
108
 
134
109
  // verify required parameter 'appId' is not null or undefined
135
110
  if (appId === null || appId === undefined) {
136
- throw new RequiredError("DefaultApi", "cancelNotification", "appId");
111
+ throw new RequiredError("DefaultApi", "createAlias", "appId");
137
112
  }
138
113
 
139
114
 
140
- // verify required parameter 'notificationId' is not null or undefined
141
- if (notificationId === null || notificationId === undefined) {
142
- 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");
143
130
  }
144
131
 
145
132
 
146
133
  // Path Params
147
- const localVarPath = '/notifications/{notification_id}'
148
- .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)));
149
138
 
150
139
  // Make Request Context
151
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
140
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
152
141
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
153
142
 
154
- // Query Params
155
- if (appId !== undefined) {
156
- requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
157
- }
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
+
158
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);
159
157
 
160
158
  let authMethod: SecurityAuthentication | undefined;
161
159
  // Apply auth methods
162
- authMethod = _config.authMethods["app_key"]
160
+ authMethod = _config.authMethods["rest_api_key"]
163
161
  if (authMethod?.applySecurityAuthentication) {
164
162
  await authMethod?.applySecurityAuthentication(requestContext);
165
163
  }
@@ -173,26 +171,44 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
173
171
  }
174
172
 
175
173
  /**
176
- * Creates a new OneSignal app
177
- * Create an app
178
- * @param app
174
+ * Upserts one or more Aliases for the User identified by :subscription_id.
175
+ * @param appId
176
+ * @param subscriptionId
177
+ * @param userIdentityBody
179
178
  */
180
- public async createApp(app: App, _options?: Configuration): Promise<RequestContext> {
179
+ public async createAliasBySubscription(appId: string, subscriptionId: string, userIdentityBody: UserIdentityBody, _options?: Configuration): Promise<RequestContext> {
181
180
  let _config = _options || this.configuration;
182
181
 
183
- // verify required parameter 'app' is not null or undefined
184
- if (app === null || app === undefined) {
185
- 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");
186
197
  }
187
198
 
188
199
 
189
200
  // Path Params
190
- 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)));
191
204
 
192
205
  // Make Request Context
193
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
206
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
194
207
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
195
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
+
196
212
 
197
213
  // Body Params
198
214
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -200,14 +216,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
200
216
  ]);
201
217
  requestContext.setHeaderParam("Content-Type", contentType);
202
218
  const serializedBody = ObjectSerializer.stringify(
203
- ObjectSerializer.serialize(app, "App", ""),
219
+ ObjectSerializer.serialize(userIdentityBody, "UserIdentityBody", ""),
204
220
  contentType
205
221
  );
206
222
  requestContext.setBody(serializedBody);
207
223
 
208
224
  let authMethod: SecurityAuthentication | undefined;
209
225
  // Apply auth methods
210
- authMethod = _config.authMethods["user_key"]
226
+ authMethod = _config.authMethods["rest_api_key"]
211
227
  if (authMethod?.applySecurityAuthentication) {
212
228
  await authMethod?.applySecurityAuthentication(requestContext);
213
229
  }
@@ -221,26 +237,29 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
221
237
  }
222
238
 
223
239
  /**
224
- * Sends notifications to your users
225
- * Create notification
226
- * @param notification
240
+ * Creates a new OneSignal app
241
+ * Create an app
242
+ * @param app
227
243
  */
228
- public async createNotification(notification: Notification, _options?: Configuration): Promise<RequestContext> {
244
+ public async createApp(app: App, _options?: Configuration): Promise<RequestContext> {
229
245
  let _config = _options || this.configuration;
230
246
 
231
- // verify required parameter 'notification' is not null or undefined
232
- if (notification === null || notification === undefined) {
233
- 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");
234
250
  }
235
251
 
236
252
 
237
253
  // Path Params
238
- const localVarPath = '/notifications';
254
+ const localVarPath = '/apps';
239
255
 
240
256
  // Make Request Context
241
257
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
242
258
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
243
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
+
244
263
 
245
264
  // Body Params
246
265
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -248,14 +267,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
248
267
  ]);
249
268
  requestContext.setHeaderParam("Content-Type", contentType);
250
269
  const serializedBody = ObjectSerializer.stringify(
251
- ObjectSerializer.serialize(notification, "Notification", ""),
270
+ ObjectSerializer.serialize(app, "App", ""),
252
271
  contentType
253
272
  );
254
273
  requestContext.setBody(serializedBody);
255
274
 
256
275
  let authMethod: SecurityAuthentication | undefined;
257
276
  // Apply auth methods
258
- authMethod = _config.authMethods["app_key"]
277
+ authMethod = _config.authMethods["user_auth_key"]
259
278
  if (authMethod?.applySecurityAuthentication) {
260
279
  await authMethod?.applySecurityAuthentication(requestContext);
261
280
  }
@@ -269,26 +288,29 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
269
288
  }
270
289
 
271
290
  /**
272
- * 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.
273
- * Add a device
274
- * @param player
291
+ * Sends notifications to your users
292
+ * Create notification
293
+ * @param notification
275
294
  */
276
- public async createPlayer(player: Player, _options?: Configuration): Promise<RequestContext> {
295
+ public async createNotification(notification: Notification, _options?: Configuration): Promise<RequestContext> {
277
296
  let _config = _options || this.configuration;
278
297
 
279
- // verify required parameter 'player' is not null or undefined
280
- if (player === null || player === undefined) {
281
- 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");
282
301
  }
283
302
 
284
303
 
285
304
  // Path Params
286
- const localVarPath = '/players';
305
+ const localVarPath = '/notifications';
287
306
 
288
307
  // Make Request Context
289
308
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
290
309
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
291
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
+
292
314
 
293
315
  // Body Params
294
316
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -296,14 +318,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
296
318
  ]);
297
319
  requestContext.setHeaderParam("Content-Type", contentType);
298
320
  const serializedBody = ObjectSerializer.stringify(
299
- ObjectSerializer.serialize(player, "Player", ""),
321
+ ObjectSerializer.serialize(notification, "Notification", ""),
300
322
  contentType
301
323
  );
302
324
  requestContext.setBody(serializedBody);
303
325
 
304
326
  let authMethod: SecurityAuthentication | undefined;
305
327
  // Apply auth methods
306
- authMethod = _config.authMethods["app_key"]
328
+ authMethod = _config.authMethods["rest_api_key"]
307
329
  if (authMethod?.applySecurityAuthentication) {
308
330
  await authMethod?.applySecurityAuthentication(requestContext);
309
331
  }
@@ -317,17 +339,17 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
317
339
  }
318
340
 
319
341
  /**
320
- * 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.
321
- * 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
322
344
  * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
323
345
  * @param segment
324
346
  */
325
- public async createSegments(appId: string, segment?: Segment, _options?: Configuration): Promise<RequestContext> {
347
+ public async createSegment(appId: string, segment?: Segment, _options?: Configuration): Promise<RequestContext> {
326
348
  let _config = _options || this.configuration;
327
349
 
328
350
  // verify required parameter 'appId' is not null or undefined
329
351
  if (appId === null || appId === undefined) {
330
- throw new RequiredError("DefaultApi", "createSegments", "appId");
352
+ throw new RequiredError("DefaultApi", "createSegment", "appId");
331
353
  }
332
354
 
333
355
 
@@ -340,6 +362,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
340
362
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
341
363
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
342
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
+
343
368
 
344
369
  // Body Params
345
370
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -354,7 +379,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
354
379
 
355
380
  let authMethod: SecurityAuthentication | undefined;
356
381
  // Apply auth methods
357
- authMethod = _config.authMethods["app_key"]
382
+ authMethod = _config.authMethods["rest_api_key"]
358
383
  if (authMethod?.applySecurityAuthentication) {
359
384
  await authMethod?.applySecurityAuthentication(requestContext);
360
385
  }
@@ -372,9 +397,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
372
397
  * @param appId
373
398
  * @param aliasLabel
374
399
  * @param aliasId
375
- * @param createSubscriptionRequestBody
400
+ * @param subscriptionBody
376
401
  */
377
- 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> {
378
403
  let _config = _options || this.configuration;
379
404
 
380
405
  // verify required parameter 'appId' is not null or undefined
@@ -395,9 +420,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
395
420
  }
396
421
 
397
422
 
398
- // verify required parameter 'createSubscriptionRequestBody' is not null or undefined
399
- if (createSubscriptionRequestBody === null || createSubscriptionRequestBody === undefined) {
400
- 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");
401
426
  }
402
427
 
403
428
 
@@ -411,6 +436,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
411
436
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
412
437
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
413
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
+
414
442
 
415
443
  // Body Params
416
444
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -418,14 +446,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
418
446
  ]);
419
447
  requestContext.setHeaderParam("Content-Type", contentType);
420
448
  const serializedBody = ObjectSerializer.stringify(
421
- ObjectSerializer.serialize(createSubscriptionRequestBody, "CreateSubscriptionRequestBody", ""),
449
+ ObjectSerializer.serialize(subscriptionBody, "SubscriptionBody", ""),
422
450
  contentType
423
451
  );
424
452
  requestContext.setBody(serializedBody);
425
453
 
426
454
  let authMethod: SecurityAuthentication | undefined;
427
455
  // Apply auth methods
428
- authMethod = _config.authMethods["app_key"]
456
+ authMethod = _config.authMethods["rest_api_key"]
429
457
  if (authMethod?.applySecurityAuthentication) {
430
458
  await authMethod?.applySecurityAuthentication(requestContext);
431
459
  }
@@ -466,6 +494,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
466
494
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
467
495
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
468
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
+
469
500
 
470
501
  // Body Params
471
502
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -480,7 +511,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
480
511
 
481
512
  let authMethod: SecurityAuthentication | undefined;
482
513
  // Apply auth methods
483
- authMethod = _config.authMethods["app_key"]
514
+ authMethod = _config.authMethods["rest_api_key"]
484
515
  if (authMethod?.applySecurityAuthentication) {
485
516
  await authMethod?.applySecurityAuthentication(requestContext);
486
517
  }
@@ -538,60 +569,13 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
538
569
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
539
570
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
540
571
 
541
-
542
- let authMethod: SecurityAuthentication | undefined;
543
- // Apply auth methods
544
- authMethod = _config.authMethods["app_key"]
545
- if (authMethod?.applySecurityAuthentication) {
546
- await authMethod?.applySecurityAuthentication(requestContext);
547
- }
548
-
549
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
550
- if (defaultAuth?.applySecurityAuthentication) {
551
- await defaultAuth?.applySecurityAuthentication(requestContext);
552
- }
553
-
554
- return requestContext;
555
- }
556
-
557
- /**
558
- * Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
559
- * Delete a user record
560
- * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
561
- * @param playerId The OneSignal player_id
562
- */
563
- public async deletePlayer(appId: string, playerId: string, _options?: Configuration): Promise<RequestContext> {
564
- let _config = _options || this.configuration;
565
-
566
- // verify required parameter 'appId' is not null or undefined
567
- if (appId === null || appId === undefined) {
568
- throw new RequiredError("DefaultApi", "deletePlayer", "appId");
569
- }
570
-
571
-
572
- // verify required parameter 'playerId' is not null or undefined
573
- if (playerId === null || playerId === undefined) {
574
- throw new RequiredError("DefaultApi", "deletePlayer", "playerId");
575
- }
576
-
577
-
578
- // Path Params
579
- const localVarPath = '/players/{player_id}'
580
- .replace('{' + 'player_id' + '}', encodeURIComponent(String(playerId)));
581
-
582
- // Make Request Context
583
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
584
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
585
-
586
- // Query Params
587
- if (appId !== undefined) {
588
- requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
589
- }
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");
590
574
 
591
575
 
592
576
  let authMethod: SecurityAuthentication | undefined;
593
577
  // Apply auth methods
594
- authMethod = _config.authMethods["app_key"]
578
+ authMethod = _config.authMethods["rest_api_key"]
595
579
  if (authMethod?.applySecurityAuthentication) {
596
580
  await authMethod?.applySecurityAuthentication(requestContext);
597
581
  }
@@ -605,23 +589,23 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
605
589
  }
606
590
 
607
591
  /**
608
- * 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.
609
- * 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
610
594
  * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
611
595
  * @param segmentId The segment_id can be found in the URL of the segment when viewing it in the dashboard.
612
596
  */
613
- public async deleteSegments(appId: string, segmentId: string, _options?: Configuration): Promise<RequestContext> {
597
+ public async deleteSegment(appId: string, segmentId: string, _options?: Configuration): Promise<RequestContext> {
614
598
  let _config = _options || this.configuration;
615
599
 
616
600
  // verify required parameter 'appId' is not null or undefined
617
601
  if (appId === null || appId === undefined) {
618
- throw new RequiredError("DefaultApi", "deleteSegments", "appId");
602
+ throw new RequiredError("DefaultApi", "deleteSegment", "appId");
619
603
  }
620
604
 
621
605
 
622
606
  // verify required parameter 'segmentId' is not null or undefined
623
607
  if (segmentId === null || segmentId === undefined) {
624
- throw new RequiredError("DefaultApi", "deleteSegments", "segmentId");
608
+ throw new RequiredError("DefaultApi", "deleteSegment", "segmentId");
625
609
  }
626
610
 
627
611
 
@@ -634,10 +618,13 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
634
618
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
635
619
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
636
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
+
637
624
 
638
625
  let authMethod: SecurityAuthentication | undefined;
639
626
  // Apply auth methods
640
- authMethod = _config.authMethods["app_key"]
627
+ authMethod = _config.authMethods["rest_api_key"]
641
628
  if (authMethod?.applySecurityAuthentication) {
642
629
  await authMethod?.applySecurityAuthentication(requestContext);
643
630
  }
@@ -679,10 +666,13 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
679
666
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
680
667
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
681
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
+
682
672
 
683
673
  let authMethod: SecurityAuthentication | undefined;
684
674
  // Apply auth methods
685
- authMethod = _config.authMethods["app_key"]
675
+ authMethod = _config.authMethods["rest_api_key"]
686
676
  if (authMethod?.applySecurityAuthentication) {
687
677
  await authMethod?.applySecurityAuthentication(requestContext);
688
678
  }
@@ -732,61 +722,10 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
732
722
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
733
723
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
734
724
 
735
-
736
-
737
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
738
- if (defaultAuth?.applySecurityAuthentication) {
739
- await defaultAuth?.applySecurityAuthentication(requestContext);
740
- }
741
-
742
- return requestContext;
743
- }
744
-
745
- /**
746
- * Stops a Live Activity
747
- * Stop Live Activity
748
- * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
749
- * @param activityId Live Activity record ID
750
- * @param subscriptionId Subscription ID
751
- */
752
- public async endLiveActivity(appId: string, activityId: string, subscriptionId: string, _options?: Configuration): Promise<RequestContext> {
753
- let _config = _options || this.configuration;
754
-
755
- // verify required parameter 'appId' is not null or undefined
756
- if (appId === null || appId === undefined) {
757
- throw new RequiredError("DefaultApi", "endLiveActivity", "appId");
758
- }
759
-
760
-
761
- // verify required parameter 'activityId' is not null or undefined
762
- if (activityId === null || activityId === undefined) {
763
- throw new RequiredError("DefaultApi", "endLiveActivity", "activityId");
764
- }
765
-
766
-
767
- // verify required parameter 'subscriptionId' is not null or undefined
768
- if (subscriptionId === null || subscriptionId === undefined) {
769
- throw new RequiredError("DefaultApi", "endLiveActivity", "subscriptionId");
770
- }
771
-
772
-
773
- // Path Params
774
- const localVarPath = '/apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}'
775
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
776
- .replace('{' + 'activity_id' + '}', encodeURIComponent(String(activityId)))
777
- .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
778
-
779
- // Make Request Context
780
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
781
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
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");
782
727
 
783
728
 
784
- let authMethod: SecurityAuthentication | undefined;
785
- // Apply auth methods
786
- authMethod = _config.authMethods["app_key"]
787
- if (authMethod?.applySecurityAuthentication) {
788
- await authMethod?.applySecurityAuthentication(requestContext);
789
- }
790
729
 
791
730
  const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
792
731
  if (defaultAuth?.applySecurityAuthentication) {
@@ -825,6 +764,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
825
764
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
826
765
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
827
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
+
828
770
  // Query Params
829
771
  if (appId !== undefined) {
830
772
  requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
@@ -833,7 +775,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
833
775
 
834
776
  let authMethod: SecurityAuthentication | undefined;
835
777
  // Apply auth methods
836
- authMethod = _config.authMethods["app_key"]
778
+ authMethod = _config.authMethods["rest_api_key"]
837
779
  if (authMethod?.applySecurityAuthentication) {
838
780
  await authMethod?.applySecurityAuthentication(requestContext);
839
781
  }
@@ -848,16 +790,16 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
848
790
 
849
791
  /**
850
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. |
851
- * Export CSV of Players
793
+ * Export CSV of Subscriptions
852
794
  * @param appId The app ID that you want to export devices from
853
- * @param exportPlayersRequestBody
795
+ * @param exportSubscriptionsRequestBody
854
796
  */
855
- public async exportPlayers(appId: string, exportPlayersRequestBody?: ExportPlayersRequestBody, _options?: Configuration): Promise<RequestContext> {
797
+ public async exportSubscriptions(appId: string, exportSubscriptionsRequestBody?: ExportSubscriptionsRequestBody, _options?: Configuration): Promise<RequestContext> {
856
798
  let _config = _options || this.configuration;
857
799
 
858
800
  // verify required parameter 'appId' is not null or undefined
859
801
  if (appId === null || appId === undefined) {
860
- throw new RequiredError("DefaultApi", "exportPlayers", "appId");
802
+ throw new RequiredError("DefaultApi", "exportSubscriptions", "appId");
861
803
  }
862
804
 
863
805
 
@@ -870,6 +812,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
870
812
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
871
813
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
872
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
+
873
818
 
874
819
  // Body Params
875
820
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -877,14 +822,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
877
822
  ]);
878
823
  requestContext.setHeaderParam("Content-Type", contentType);
879
824
  const serializedBody = ObjectSerializer.stringify(
880
- ObjectSerializer.serialize(exportPlayersRequestBody, "ExportPlayersRequestBody", ""),
825
+ ObjectSerializer.serialize(exportSubscriptionsRequestBody, "ExportSubscriptionsRequestBody", ""),
881
826
  contentType
882
827
  );
883
828
  requestContext.setBody(serializedBody);
884
829
 
885
830
  let authMethod: SecurityAuthentication | undefined;
886
831
  // Apply auth methods
887
- authMethod = _config.authMethods["app_key"]
832
+ authMethod = _config.authMethods["rest_api_key"]
888
833
  if (authMethod?.applySecurityAuthentication) {
889
834
  await authMethod?.applySecurityAuthentication(requestContext);
890
835
  }
@@ -898,38 +843,49 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
898
843
  }
899
844
 
900
845
  /**
901
- * Lists all Aliases for the User identified by :subscription_id.
846
+ * Lists all Aliases for the User identified by (:alias_label, :alias_id).
902
847
  * @param appId
903
- * @param subscriptionId
848
+ * @param aliasLabel
849
+ * @param aliasId
904
850
  */
905
- 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> {
906
852
  let _config = _options || this.configuration;
907
853
 
908
854
  // verify required parameter 'appId' is not null or undefined
909
855
  if (appId === null || appId === undefined) {
910
- throw new RequiredError("DefaultApi", "fetchAliases", "appId");
856
+ throw new RequiredError("DefaultApi", "getAliases", "appId");
911
857
  }
912
858
 
913
859
 
914
- // verify required parameter 'subscriptionId' is not null or undefined
915
- if (subscriptionId === null || subscriptionId === undefined) {
916
- 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");
917
869
  }
918
870
 
919
871
 
920
872
  // Path Params
921
- const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/user/identity'
873
+ const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity'
922
874
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
923
- .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
875
+ .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
876
+ .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
924
877
 
925
878
  // Make Request Context
926
879
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
927
880
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
928
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
+
929
885
 
930
886
  let authMethod: SecurityAuthentication | undefined;
931
887
  // Apply auth methods
932
- authMethod = _config.authMethods["app_key"]
888
+ authMethod = _config.authMethods["rest_api_key"]
933
889
  if (authMethod?.applySecurityAuthentication) {
934
890
  await authMethod?.applySecurityAuthentication(requestContext);
935
891
  }
@@ -943,99 +899,41 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
943
899
  }
944
900
 
945
901
  /**
946
- * Returns the User’s properties, Aliases, and Subscriptions.
902
+ * Lists all Aliases for the User identified by :subscription_id.
947
903
  * @param appId
948
- * @param aliasLabel
949
- * @param aliasId
904
+ * @param subscriptionId
950
905
  */
951
- 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> {
952
907
  let _config = _options || this.configuration;
953
908
 
954
909
  // verify required parameter 'appId' is not null or undefined
955
910
  if (appId === null || appId === undefined) {
956
- throw new RequiredError("DefaultApi", "fetchUser", "appId");
911
+ throw new RequiredError("DefaultApi", "getAliasesBySubscription", "appId");
957
912
  }
958
913
 
959
914
 
960
- // verify required parameter 'aliasLabel' is not null or undefined
961
- if (aliasLabel === null || aliasLabel === undefined) {
962
- throw new RequiredError("DefaultApi", "fetchUser", "aliasLabel");
963
- }
964
-
965
-
966
- // verify required parameter 'aliasId' is not null or undefined
967
- if (aliasId === null || aliasId === undefined) {
968
- 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");
969
918
  }
970
919
 
971
920
 
972
921
  // Path Params
973
- const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}'
922
+ const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/user/identity'
974
923
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
975
- .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
976
- .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
924
+ .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
977
925
 
978
926
  // Make Request Context
979
927
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
980
928
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
981
929
 
982
-
983
- let authMethod: SecurityAuthentication | undefined;
984
- // Apply auth methods
985
- authMethod = _config.authMethods["app_key"]
986
- if (authMethod?.applySecurityAuthentication) {
987
- await authMethod?.applySecurityAuthentication(requestContext);
988
- }
989
-
990
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
991
- if (defaultAuth?.applySecurityAuthentication) {
992
- await defaultAuth?.applySecurityAuthentication(requestContext);
993
- }
994
-
995
- return requestContext;
996
- }
997
-
998
- /**
999
- * Lists all Aliases for the User identified by (:alias_label, :alias_id).
1000
- * @param appId
1001
- * @param aliasLabel
1002
- * @param aliasId
1003
- */
1004
- public async fetchUserIdentity(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<RequestContext> {
1005
- let _config = _options || this.configuration;
1006
-
1007
- // verify required parameter 'appId' is not null or undefined
1008
- if (appId === null || appId === undefined) {
1009
- throw new RequiredError("DefaultApi", "fetchUserIdentity", "appId");
1010
- }
1011
-
1012
-
1013
- // verify required parameter 'aliasLabel' is not null or undefined
1014
- if (aliasLabel === null || aliasLabel === undefined) {
1015
- throw new RequiredError("DefaultApi", "fetchUserIdentity", "aliasLabel");
1016
- }
1017
-
1018
-
1019
- // verify required parameter 'aliasId' is not null or undefined
1020
- if (aliasId === null || aliasId === undefined) {
1021
- throw new RequiredError("DefaultApi", "fetchUserIdentity", "aliasId");
1022
- }
1023
-
1024
-
1025
- // Path Params
1026
- const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity'
1027
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1028
- .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
1029
- .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
1030
-
1031
- // Make Request Context
1032
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1033
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
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");
1034
932
 
1035
933
 
1036
934
  let authMethod: SecurityAuthentication | undefined;
1037
935
  // Apply auth methods
1038
- authMethod = _config.authMethods["app_key"]
936
+ authMethod = _config.authMethods["rest_api_key"]
1039
937
  if (authMethod?.applySecurityAuthentication) {
1040
938
  await authMethod?.applySecurityAuthentication(requestContext);
1041
939
  }
@@ -1070,10 +968,13 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1070
968
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1071
969
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1072
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
+
1073
974
 
1074
975
  let authMethod: SecurityAuthentication | undefined;
1075
976
  // Apply auth methods
1076
- authMethod = _config.authMethods["user_key"]
977
+ authMethod = _config.authMethods["user_auth_key"]
1077
978
  if (authMethod?.applySecurityAuthentication) {
1078
979
  await authMethod?.applySecurityAuthentication(requestContext);
1079
980
  }
@@ -1100,55 +1001,13 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1100
1001
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1101
1002
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1102
1003
 
1103
-
1104
- let authMethod: SecurityAuthentication | undefined;
1105
- // Apply auth methods
1106
- authMethod = _config.authMethods["user_key"]
1107
- if (authMethod?.applySecurityAuthentication) {
1108
- await authMethod?.applySecurityAuthentication(requestContext);
1109
- }
1110
-
1111
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1112
- if (defaultAuth?.applySecurityAuthentication) {
1113
- await defaultAuth?.applySecurityAuthentication(requestContext);
1114
- }
1115
-
1116
- return requestContext;
1117
- }
1118
-
1119
- /**
1120
- * Manifest of In-App Messages the Subscription is eligible to display by the SDK.
1121
- * @param appId
1122
- * @param subscriptionId
1123
- */
1124
- public async getEligibleIams(appId: string, subscriptionId: string, _options?: Configuration): Promise<RequestContext> {
1125
- let _config = _options || this.configuration;
1126
-
1127
- // verify required parameter 'appId' is not null or undefined
1128
- if (appId === null || appId === undefined) {
1129
- throw new RequiredError("DefaultApi", "getEligibleIams", "appId");
1130
- }
1131
-
1132
-
1133
- // verify required parameter 'subscriptionId' is not null or undefined
1134
- if (subscriptionId === null || subscriptionId === undefined) {
1135
- throw new RequiredError("DefaultApi", "getEligibleIams", "subscriptionId");
1136
- }
1137
-
1138
-
1139
- // Path Params
1140
- const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/iams'
1141
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1142
- .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
1143
-
1144
- // Make Request Context
1145
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1146
- 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");
1147
1006
 
1148
1007
 
1149
1008
  let authMethod: SecurityAuthentication | undefined;
1150
1009
  // Apply auth methods
1151
- authMethod = _config.authMethods["app_key"]
1010
+ authMethod = _config.authMethods["user_auth_key"]
1152
1011
  if (authMethod?.applySecurityAuthentication) {
1153
1012
  await authMethod?.applySecurityAuthentication(requestContext);
1154
1013
  }
@@ -1190,6 +1049,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1190
1049
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1191
1050
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1192
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
+
1193
1055
  // Query Params
1194
1056
  if (appId !== undefined) {
1195
1057
  requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
@@ -1198,7 +1060,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1198
1060
 
1199
1061
  let authMethod: SecurityAuthentication | undefined;
1200
1062
  // Apply auth methods
1201
- authMethod = _config.authMethods["app_key"]
1063
+ authMethod = _config.authMethods["rest_api_key"]
1202
1064
  if (authMethod?.applySecurityAuthentication) {
1203
1065
  await authMethod?.applySecurityAuthentication(requestContext);
1204
1066
  }
@@ -1215,9 +1077,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1215
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.
1216
1078
  * Notification History
1217
1079
  * @param notificationId The \&quot;id\&quot; of the message found in the Notification object
1218
- * @param getNotificationRequestBody
1080
+ * @param getNotificationHistoryRequestBody
1219
1081
  */
1220
- public async getNotificationHistory(notificationId: string, getNotificationRequestBody: GetNotificationRequestBody, _options?: Configuration): Promise<RequestContext> {
1082
+ public async getNotificationHistory(notificationId: string, getNotificationHistoryRequestBody: GetNotificationHistoryRequestBody, _options?: Configuration): Promise<RequestContext> {
1221
1083
  let _config = _options || this.configuration;
1222
1084
 
1223
1085
  // verify required parameter 'notificationId' is not null or undefined
@@ -1226,9 +1088,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1226
1088
  }
1227
1089
 
1228
1090
 
1229
- // verify required parameter 'getNotificationRequestBody' is not null or undefined
1230
- if (getNotificationRequestBody === null || getNotificationRequestBody === undefined) {
1231
- 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");
1232
1094
  }
1233
1095
 
1234
1096
 
@@ -1240,6 +1102,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1240
1102
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
1241
1103
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1242
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
+
1243
1108
 
1244
1109
  // Body Params
1245
1110
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -1247,14 +1112,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1247
1112
  ]);
1248
1113
  requestContext.setHeaderParam("Content-Type", contentType);
1249
1114
  const serializedBody = ObjectSerializer.stringify(
1250
- ObjectSerializer.serialize(getNotificationRequestBody, "GetNotificationRequestBody", ""),
1115
+ ObjectSerializer.serialize(getNotificationHistoryRequestBody, "GetNotificationHistoryRequestBody", ""),
1251
1116
  contentType
1252
1117
  );
1253
1118
  requestContext.setBody(serializedBody);
1254
1119
 
1255
1120
  let authMethod: SecurityAuthentication | undefined;
1256
1121
  // Apply auth methods
1257
- authMethod = _config.authMethods["app_key"]
1122
+ authMethod = _config.authMethods["rest_api_key"]
1258
1123
  if (authMethod?.applySecurityAuthentication) {
1259
1124
  await authMethod?.applySecurityAuthentication(requestContext);
1260
1125
  }
@@ -1294,6 +1159,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1294
1159
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1295
1160
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1296
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
+
1297
1165
  // Query Params
1298
1166
  if (appId !== undefined) {
1299
1167
  requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
@@ -1317,7 +1185,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1317
1185
 
1318
1186
  let authMethod: SecurityAuthentication | undefined;
1319
1187
  // Apply auth methods
1320
- authMethod = _config.authMethods["app_key"]
1188
+ authMethod = _config.authMethods["rest_api_key"]
1321
1189
  if (authMethod?.applySecurityAuthentication) {
1322
1190
  await authMethod?.applySecurityAuthentication(requestContext);
1323
1191
  }
@@ -1367,6 +1235,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1367
1235
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1368
1236
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1369
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
+
1370
1241
  // Query Params
1371
1242
  if (outcomeNames !== undefined) {
1372
1243
  requestContext.setQueryParam("outcome_names", ObjectSerializer.serialize(outcomeNames, "string", ""));
@@ -1395,7 +1266,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1395
1266
 
1396
1267
  let authMethod: SecurityAuthentication | undefined;
1397
1268
  // Apply auth methods
1398
- authMethod = _config.authMethods["app_key"]
1269
+ authMethod = _config.authMethods["rest_api_key"]
1399
1270
  if (authMethod?.applySecurityAuthentication) {
1400
1271
  await authMethod?.applySecurityAuthentication(requestContext);
1401
1272
  }
@@ -1409,90 +1280,37 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1409
1280
  }
1410
1281
 
1411
1282
  /**
1412
- * View the details of an existing device in one of your OneSignal apps
1413
- * View device
1414
- * @param appId Your app_id for this device
1415
- * @param playerId Player\&#39;s OneSignal ID
1416
- * @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.
1417
1288
  */
1418
- 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> {
1419
1290
  let _config = _options || this.configuration;
1420
1291
 
1421
1292
  // verify required parameter 'appId' is not null or undefined
1422
1293
  if (appId === null || appId === undefined) {
1423
- throw new RequiredError("DefaultApi", "getPlayer", "appId");
1294
+ throw new RequiredError("DefaultApi", "getSegments", "appId");
1424
1295
  }
1425
1296
 
1426
1297
 
1427
- // verify required parameter 'playerId' is not null or undefined
1428
- if (playerId === null || playerId === undefined) {
1429
- throw new RequiredError("DefaultApi", "getPlayer", "playerId");
1430
- }
1431
-
1432
1298
 
1433
1299
 
1434
1300
  // Path Params
1435
- const localVarPath = '/players/{player_id}'
1436
- .replace('{' + 'player_id' + '}', encodeURIComponent(String(playerId)));
1301
+ const localVarPath = '/apps/{app_id}/segments'
1302
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
1437
1303
 
1438
1304
  // Make Request Context
1439
1305
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1440
1306
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1441
1307
 
1442
- // Query Params
1443
- if (appId !== undefined) {
1444
- requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
1445
- }
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");
1446
1310
 
1447
1311
  // Query Params
1448
- if (emailAuthHash !== undefined) {
1449
- requestContext.setQueryParam("email_auth_hash", ObjectSerializer.serialize(emailAuthHash, "string", ""));
1450
- }
1451
-
1452
-
1453
- let authMethod: SecurityAuthentication | undefined;
1454
- // Apply auth methods
1455
- authMethod = _config.authMethods["app_key"]
1456
- if (authMethod?.applySecurityAuthentication) {
1457
- await authMethod?.applySecurityAuthentication(requestContext);
1458
- }
1459
-
1460
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1461
- if (defaultAuth?.applySecurityAuthentication) {
1462
- await defaultAuth?.applySecurityAuthentication(requestContext);
1463
- }
1464
-
1465
- return requestContext;
1466
- }
1467
-
1468
- /**
1469
- * 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.
1470
- * View devices
1471
- * @param appId The app ID that you want to view players from
1472
- * @param limit How many devices to return. Max is 300. Default is 300
1473
- * @param offset Result offset. Default is 0. Results are sorted by id;
1474
- */
1475
- public async getPlayers(appId: string, limit?: number, offset?: number, _options?: Configuration): Promise<RequestContext> {
1476
- let _config = _options || this.configuration;
1477
-
1478
- // verify required parameter 'appId' is not null or undefined
1479
- if (appId === null || appId === undefined) {
1480
- throw new RequiredError("DefaultApi", "getPlayers", "appId");
1481
- }
1482
-
1483
-
1484
-
1485
-
1486
- // Path Params
1487
- const localVarPath = '/players';
1488
-
1489
- // Make Request Context
1490
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1491
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1492
-
1493
- // Query Params
1494
- if (appId !== undefined) {
1495
- requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
1312
+ if (offset !== undefined) {
1313
+ requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", ""));
1496
1314
  }
1497
1315
 
1498
1316
  // Query Params
@@ -1500,15 +1318,10 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1500
1318
  requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", ""));
1501
1319
  }
1502
1320
 
1503
- // Query Params
1504
- if (offset !== undefined) {
1505
- requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", ""));
1506
- }
1507
-
1508
1321
 
1509
1322
  let authMethod: SecurityAuthentication | undefined;
1510
1323
  // Apply auth methods
1511
- authMethod = _config.authMethods["app_key"]
1324
+ authMethod = _config.authMethods["rest_api_key"]
1512
1325
  if (authMethod?.applySecurityAuthentication) {
1513
1326
  await authMethod?.applySecurityAuthentication(requestContext);
1514
1327
  }
@@ -1522,64 +1335,49 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1522
1335
  }
1523
1336
 
1524
1337
  /**
1525
- * Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
1338
+ * Returns the User’s properties, Aliases, and Subscriptions.
1526
1339
  * @param appId
1527
1340
  * @param aliasLabel
1528
1341
  * @param aliasId
1529
- * @param userIdentityRequestBody
1530
1342
  */
1531
- 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> {
1532
1344
  let _config = _options || this.configuration;
1533
1345
 
1534
1346
  // verify required parameter 'appId' is not null or undefined
1535
1347
  if (appId === null || appId === undefined) {
1536
- throw new RequiredError("DefaultApi", "identifyUserByAlias", "appId");
1348
+ throw new RequiredError("DefaultApi", "getUser", "appId");
1537
1349
  }
1538
1350
 
1539
1351
 
1540
1352
  // verify required parameter 'aliasLabel' is not null or undefined
1541
1353
  if (aliasLabel === null || aliasLabel === undefined) {
1542
- throw new RequiredError("DefaultApi", "identifyUserByAlias", "aliasLabel");
1354
+ throw new RequiredError("DefaultApi", "getUser", "aliasLabel");
1543
1355
  }
1544
1356
 
1545
1357
 
1546
1358
  // verify required parameter 'aliasId' is not null or undefined
1547
1359
  if (aliasId === null || aliasId === undefined) {
1548
- throw new RequiredError("DefaultApi", "identifyUserByAlias", "aliasId");
1549
- }
1550
-
1551
-
1552
- // verify required parameter 'userIdentityRequestBody' is not null or undefined
1553
- if (userIdentityRequestBody === null || userIdentityRequestBody === undefined) {
1554
- throw new RequiredError("DefaultApi", "identifyUserByAlias", "userIdentityRequestBody");
1360
+ throw new RequiredError("DefaultApi", "getUser", "aliasId");
1555
1361
  }
1556
1362
 
1557
1363
 
1558
1364
  // Path Params
1559
- const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity'
1365
+ const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}'
1560
1366
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1561
1367
  .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
1562
1368
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
1563
1369
 
1564
1370
  // Make Request Context
1565
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
1371
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1566
1372
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1567
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");
1568
1376
 
1569
- // Body Params
1570
- const contentType = ObjectSerializer.getPreferredMediaType([
1571
- "application/json"
1572
- ]);
1573
- requestContext.setHeaderParam("Content-Type", contentType);
1574
- const serializedBody = ObjectSerializer.stringify(
1575
- ObjectSerializer.serialize(userIdentityRequestBody, "UserIdentityRequestBody", ""),
1576
- contentType
1577
- );
1578
- requestContext.setBody(serializedBody);
1579
1377
 
1580
1378
  let authMethod: SecurityAuthentication | undefined;
1581
1379
  // Apply auth methods
1582
- authMethod = _config.authMethods["app_key"]
1380
+ authMethod = _config.authMethods["rest_api_key"]
1583
1381
  if (authMethod?.applySecurityAuthentication) {
1584
1382
  await authMethod?.applySecurityAuthentication(requestContext);
1585
1383
  }
@@ -1593,34 +1391,34 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1593
1391
  }
1594
1392
 
1595
1393
  /**
1596
- * 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.
1597
1395
  * @param appId
1598
1396
  * @param subscriptionId
1599
- * @param userIdentityRequestBody
1397
+ * @param transferSubscriptionRequestBody
1600
1398
  */
1601
- 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> {
1602
1400
  let _config = _options || this.configuration;
1603
1401
 
1604
1402
  // verify required parameter 'appId' is not null or undefined
1605
1403
  if (appId === null || appId === undefined) {
1606
- throw new RequiredError("DefaultApi", "identifyUserBySubscriptionId", "appId");
1404
+ throw new RequiredError("DefaultApi", "transferSubscription", "appId");
1607
1405
  }
1608
1406
 
1609
1407
 
1610
1408
  // verify required parameter 'subscriptionId' is not null or undefined
1611
1409
  if (subscriptionId === null || subscriptionId === undefined) {
1612
- throw new RequiredError("DefaultApi", "identifyUserBySubscriptionId", "subscriptionId");
1410
+ throw new RequiredError("DefaultApi", "transferSubscription", "subscriptionId");
1613
1411
  }
1614
1412
 
1615
1413
 
1616
- // verify required parameter 'userIdentityRequestBody' is not null or undefined
1617
- if (userIdentityRequestBody === null || userIdentityRequestBody === undefined) {
1618
- 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");
1619
1417
  }
1620
1418
 
1621
1419
 
1622
1420
  // Path Params
1623
- const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/user/identity'
1421
+ const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/owner'
1624
1422
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1625
1423
  .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
1626
1424
 
@@ -1628,6 +1426,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1628
1426
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
1629
1427
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1630
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
+
1631
1432
 
1632
1433
  // Body Params
1633
1434
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -1635,14 +1436,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1635
1436
  ]);
1636
1437
  requestContext.setHeaderParam("Content-Type", contentType);
1637
1438
  const serializedBody = ObjectSerializer.stringify(
1638
- ObjectSerializer.serialize(userIdentityRequestBody, "UserIdentityRequestBody", ""),
1439
+ ObjectSerializer.serialize(transferSubscriptionRequestBody, "TransferSubscriptionRequestBody", ""),
1639
1440
  contentType
1640
1441
  );
1641
1442
  requestContext.setBody(serializedBody);
1642
1443
 
1643
1444
  let authMethod: SecurityAuthentication | undefined;
1644
1445
  // Apply auth methods
1645
- authMethod = _config.authMethods["app_key"]
1446
+ authMethod = _config.authMethods["rest_api_key"]
1646
1447
  if (authMethod?.applySecurityAuthentication) {
1647
1448
  await authMethod?.applySecurityAuthentication(requestContext);
1648
1449
  }
@@ -1656,56 +1457,54 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1656
1457
  }
1657
1458
 
1658
1459
  /**
1659
- * Transfers this Subscription to the User identified by the identity in the payload.
1660
- * @param appId
1661
- * @param subscriptionId
1662
- * @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.
1663
1465
  */
1664
- 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> {
1665
1467
  let _config = _options || this.configuration;
1666
1468
 
1667
1469
  // verify required parameter 'appId' is not null or undefined
1668
1470
  if (appId === null || appId === undefined) {
1669
- throw new RequiredError("DefaultApi", "transferSubscription", "appId");
1471
+ throw new RequiredError("DefaultApi", "unsubscribeEmailWithToken", "appId");
1670
1472
  }
1671
1473
 
1672
1474
 
1673
- // verify required parameter 'subscriptionId' is not null or undefined
1674
- if (subscriptionId === null || subscriptionId === undefined) {
1675
- 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");
1676
1478
  }
1677
1479
 
1678
1480
 
1679
- // verify required parameter 'transferSubscriptionRequestBody' is not null or undefined
1680
- if (transferSubscriptionRequestBody === null || transferSubscriptionRequestBody === undefined) {
1681
- 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");
1682
1484
  }
1683
1485
 
1684
1486
 
1685
1487
  // Path Params
1686
- const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/owner'
1488
+ const localVarPath = '/apps/{app_id}/notifications/{notification_id}/unsubscribe'
1687
1489
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1688
- .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
1490
+ .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
1689
1491
 
1690
1492
  // Make Request Context
1691
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
1493
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
1692
1494
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1693
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
+ }
1694
1503
 
1695
- // Body Params
1696
- const contentType = ObjectSerializer.getPreferredMediaType([
1697
- "application/json"
1698
- ]);
1699
- requestContext.setHeaderParam("Content-Type", contentType);
1700
- const serializedBody = ObjectSerializer.stringify(
1701
- ObjectSerializer.serialize(transferSubscriptionRequestBody, "TransferSubscriptionRequestBody", ""),
1702
- contentType
1703
- );
1704
- requestContext.setBody(serializedBody);
1705
1504
 
1706
1505
  let authMethod: SecurityAuthentication | undefined;
1707
1506
  // Apply auth methods
1708
- authMethod = _config.authMethods["app_key"]
1507
+ authMethod = _config.authMethods["rest_api_key"]
1709
1508
  if (authMethod?.applySecurityAuthentication) {
1710
1509
  await authMethod?.applySecurityAuthentication(requestContext);
1711
1510
  }
@@ -1747,6 +1546,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1747
1546
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1748
1547
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1749
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
+
1750
1552
 
1751
1553
  // Body Params
1752
1554
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -1761,7 +1563,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1761
1563
 
1762
1564
  let authMethod: SecurityAuthentication | undefined;
1763
1565
  // Apply auth methods
1764
- authMethod = _config.authMethods["user_key"]
1566
+ authMethod = _config.authMethods["user_auth_key"]
1765
1567
  if (authMethod?.applySecurityAuthentication) {
1766
1568
  await authMethod?.applySecurityAuthentication(requestContext);
1767
1569
  }
@@ -1811,120 +1613,8 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1811
1613
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
1812
1614
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1813
1615
 
1814
-
1815
- // Body Params
1816
- const contentType = ObjectSerializer.getPreferredMediaType([
1817
- "application/json"
1818
- ]);
1819
- requestContext.setHeaderParam("Content-Type", contentType);
1820
- const serializedBody = ObjectSerializer.stringify(
1821
- ObjectSerializer.serialize(updateLiveActivityRequest, "UpdateLiveActivityRequest", ""),
1822
- contentType
1823
- );
1824
- requestContext.setBody(serializedBody);
1825
-
1826
- let authMethod: SecurityAuthentication | undefined;
1827
- // Apply auth methods
1828
- authMethod = _config.authMethods["app_key"]
1829
- if (authMethod?.applySecurityAuthentication) {
1830
- await authMethod?.applySecurityAuthentication(requestContext);
1831
- }
1832
-
1833
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1834
- if (defaultAuth?.applySecurityAuthentication) {
1835
- await defaultAuth?.applySecurityAuthentication(requestContext);
1836
- }
1837
-
1838
- return requestContext;
1839
- }
1840
-
1841
- /**
1842
- * Update an existing device in one of your OneSignal apps
1843
- * Edit device
1844
- * @param playerId Player\&#39;s OneSignal ID
1845
- * @param player
1846
- */
1847
- public async updatePlayer(playerId: string, player: Player, _options?: Configuration): Promise<RequestContext> {
1848
- let _config = _options || this.configuration;
1849
-
1850
- // verify required parameter 'playerId' is not null or undefined
1851
- if (playerId === null || playerId === undefined) {
1852
- throw new RequiredError("DefaultApi", "updatePlayer", "playerId");
1853
- }
1854
-
1855
-
1856
- // verify required parameter 'player' is not null or undefined
1857
- if (player === null || player === undefined) {
1858
- throw new RequiredError("DefaultApi", "updatePlayer", "player");
1859
- }
1860
-
1861
-
1862
- // Path Params
1863
- const localVarPath = '/players/{player_id}'
1864
- .replace('{' + 'player_id' + '}', encodeURIComponent(String(playerId)));
1865
-
1866
- // Make Request Context
1867
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1868
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1869
-
1870
-
1871
- // Body Params
1872
- const contentType = ObjectSerializer.getPreferredMediaType([
1873
- "application/json"
1874
- ]);
1875
- requestContext.setHeaderParam("Content-Type", contentType);
1876
- const serializedBody = ObjectSerializer.stringify(
1877
- ObjectSerializer.serialize(player, "Player", ""),
1878
- contentType
1879
- );
1880
- requestContext.setBody(serializedBody);
1881
-
1882
- let authMethod: SecurityAuthentication | undefined;
1883
- // Apply auth methods
1884
- authMethod = _config.authMethods["app_key"]
1885
- if (authMethod?.applySecurityAuthentication) {
1886
- await authMethod?.applySecurityAuthentication(requestContext);
1887
- }
1888
-
1889
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1890
- if (defaultAuth?.applySecurityAuthentication) {
1891
- await defaultAuth?.applySecurityAuthentication(requestContext);
1892
- }
1893
-
1894
- return requestContext;
1895
- }
1896
-
1897
- /**
1898
- * 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\" }
1899
- * Edit tags with external user id
1900
- * @param appId The OneSignal App ID the user record is found under.
1901
- * @param externalUserId The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated.
1902
- * @param updatePlayerTagsRequestBody
1903
- */
1904
- public async updatePlayerTags(appId: string, externalUserId: string, updatePlayerTagsRequestBody?: UpdatePlayerTagsRequestBody, _options?: Configuration): Promise<RequestContext> {
1905
- let _config = _options || this.configuration;
1906
-
1907
- // verify required parameter 'appId' is not null or undefined
1908
- if (appId === null || appId === undefined) {
1909
- throw new RequiredError("DefaultApi", "updatePlayerTags", "appId");
1910
- }
1911
-
1912
-
1913
- // verify required parameter 'externalUserId' is not null or undefined
1914
- if (externalUserId === null || externalUserId === undefined) {
1915
- throw new RequiredError("DefaultApi", "updatePlayerTags", "externalUserId");
1916
- }
1917
-
1918
-
1919
-
1920
- // Path Params
1921
- const localVarPath = '/apps/{app_id}/users/{external_user_id}'
1922
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1923
- .replace('{' + 'external_user_id' + '}', encodeURIComponent(String(externalUserId)));
1924
-
1925
- // Make Request Context
1926
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1927
- 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");
1928
1618
 
1929
1619
 
1930
1620
  // Body Params
@@ -1933,14 +1623,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1933
1623
  ]);
1934
1624
  requestContext.setHeaderParam("Content-Type", contentType);
1935
1625
  const serializedBody = ObjectSerializer.stringify(
1936
- ObjectSerializer.serialize(updatePlayerTagsRequestBody, "UpdatePlayerTagsRequestBody", ""),
1626
+ ObjectSerializer.serialize(updateLiveActivityRequest, "UpdateLiveActivityRequest", ""),
1937
1627
  contentType
1938
1628
  );
1939
1629
  requestContext.setBody(serializedBody);
1940
1630
 
1941
1631
  let authMethod: SecurityAuthentication | undefined;
1942
1632
  // Apply auth methods
1943
- authMethod = _config.authMethods["app_key"]
1633
+ authMethod = _config.authMethods["rest_api_key"]
1944
1634
  if (authMethod?.applySecurityAuthentication) {
1945
1635
  await authMethod?.applySecurityAuthentication(requestContext);
1946
1636
  }
@@ -1957,9 +1647,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1957
1647
  * Updates an existing Subscription’s properties.
1958
1648
  * @param appId
1959
1649
  * @param subscriptionId
1960
- * @param updateSubscriptionRequestBody
1650
+ * @param subscriptionBody
1961
1651
  */
1962
- 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> {
1963
1653
  let _config = _options || this.configuration;
1964
1654
 
1965
1655
  // verify required parameter 'appId' is not null or undefined
@@ -1974,9 +1664,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1974
1664
  }
1975
1665
 
1976
1666
 
1977
- // verify required parameter 'updateSubscriptionRequestBody' is not null or undefined
1978
- if (updateSubscriptionRequestBody === null || updateSubscriptionRequestBody === undefined) {
1979
- 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");
1980
1670
  }
1981
1671
 
1982
1672
 
@@ -1989,6 +1679,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1989
1679
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
1990
1680
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1991
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
+
1992
1685
 
1993
1686
  // Body Params
1994
1687
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -1996,14 +1689,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1996
1689
  ]);
1997
1690
  requestContext.setHeaderParam("Content-Type", contentType);
1998
1691
  const serializedBody = ObjectSerializer.stringify(
1999
- ObjectSerializer.serialize(updateSubscriptionRequestBody, "UpdateSubscriptionRequestBody", ""),
1692
+ ObjectSerializer.serialize(subscriptionBody, "SubscriptionBody", ""),
2000
1693
  contentType
2001
1694
  );
2002
1695
  requestContext.setBody(serializedBody);
2003
1696
 
2004
1697
  let authMethod: SecurityAuthentication | undefined;
2005
1698
  // Apply auth methods
2006
- authMethod = _config.authMethods["app_key"]
1699
+ authMethod = _config.authMethods["rest_api_key"]
2007
1700
  if (authMethod?.applySecurityAuthentication) {
2008
1701
  await authMethod?.applySecurityAuthentication(requestContext);
2009
1702
  }
@@ -2060,6 +1753,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
2060
1753
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
2061
1754
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
2062
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
+
2063
1759
 
2064
1760
  // Body Params
2065
1761
  const contentType = ObjectSerializer.getPreferredMediaType([
@@ -2074,7 +1770,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
2074
1770
 
2075
1771
  let authMethod: SecurityAuthentication | undefined;
2076
1772
  // Apply auth methods
2077
- authMethod = _config.authMethods["app_key"]
1773
+ authMethod = _config.authMethods["rest_api_key"]
2078
1774
  if (authMethod?.applySecurityAuthentication) {
2079
1775
  await authMethod?.applySecurityAuthentication(requestContext);
2080
1776
  }
@@ -2095,13 +1791,17 @@ export class DefaultApiResponseProcessor {
2095
1791
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2096
1792
  * to the expected objects
2097
1793
  *
2098
- * @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
2099
1795
  * @throws ApiException if the response code was not in [200, 299]
2100
1796
  */
2101
- public async beginLiveActivity(response: ResponseContext): Promise<void > {
1797
+ public async cancelNotification(response: ResponseContext): Promise<GenericSuccessBoolResponse > {
2102
1798
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2103
- if (isCodeInRange("204", response.httpStatusCode)) {
2104
- 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;
2105
1805
  }
2106
1806
  if (isCodeInRange("400", response.httpStatusCode)) {
2107
1807
  const body: GenericError = ObjectSerializer.deserialize(
@@ -2110,20 +1810,27 @@ export class DefaultApiResponseProcessor {
2110
1810
  ) as GenericError;
2111
1811
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2112
1812
  }
1813
+ if (isCodeInRange("404", response.httpStatusCode)) {
1814
+ const body: GenericError = ObjectSerializer.deserialize(
1815
+ ObjectSerializer.parse(await response.body.text(), contentType),
1816
+ "GenericError", ""
1817
+ ) as GenericError;
1818
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
1819
+ }
2113
1820
  if (isCodeInRange("429", response.httpStatusCode)) {
2114
- const body: RateLimiterError = ObjectSerializer.deserialize(
1821
+ const body: RateLimitError = ObjectSerializer.deserialize(
2115
1822
  ObjectSerializer.parse(await response.body.text(), contentType),
2116
- "RateLimiterError", ""
2117
- ) as RateLimiterError;
2118
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
1823
+ "RateLimitError", ""
1824
+ ) as RateLimitError;
1825
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2119
1826
  }
2120
1827
 
2121
1828
  // Work around for missing responses in specification, e.g. for petstore.yaml
2122
1829
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2123
- const body: void = ObjectSerializer.deserialize(
1830
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
2124
1831
  ObjectSerializer.parse(await response.body.text(), contentType),
2125
- "void", ""
2126
- ) as void;
1832
+ "GenericSuccessBoolResponse", ""
1833
+ ) as GenericSuccessBoolResponse;
2127
1834
  return body;
2128
1835
  }
2129
1836
 
@@ -2134,16 +1841,16 @@ export class DefaultApiResponseProcessor {
2134
1841
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2135
1842
  * to the expected objects
2136
1843
  *
2137
- * @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
2138
1845
  * @throws ApiException if the response code was not in [200, 299]
2139
1846
  */
2140
- public async cancelNotification(response: ResponseContext): Promise<CancelNotificationSuccessResponse > {
1847
+ public async createAlias(response: ResponseContext): Promise<UserIdentityBody > {
2141
1848
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2142
1849
  if (isCodeInRange("200", response.httpStatusCode)) {
2143
- const body: CancelNotificationSuccessResponse = ObjectSerializer.deserialize(
1850
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2144
1851
  ObjectSerializer.parse(await response.body.text(), contentType),
2145
- "CancelNotificationSuccessResponse", ""
2146
- ) as CancelNotificationSuccessResponse;
1852
+ "UserIdentityBody", ""
1853
+ ) as UserIdentityBody;
2147
1854
  return body;
2148
1855
  }
2149
1856
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2153,20 +1860,34 @@ export class DefaultApiResponseProcessor {
2153
1860
  ) as GenericError;
2154
1861
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2155
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
+ }
2156
1877
  if (isCodeInRange("429", response.httpStatusCode)) {
2157
- const body: RateLimiterError = ObjectSerializer.deserialize(
1878
+ const body: RateLimitError = ObjectSerializer.deserialize(
2158
1879
  ObjectSerializer.parse(await response.body.text(), contentType),
2159
- "RateLimiterError", ""
2160
- ) as RateLimiterError;
2161
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
1880
+ "RateLimitError", ""
1881
+ ) as RateLimitError;
1882
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2162
1883
  }
2163
1884
 
2164
1885
  // Work around for missing responses in specification, e.g. for petstore.yaml
2165
1886
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2166
- const body: CancelNotificationSuccessResponse = ObjectSerializer.deserialize(
1887
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2167
1888
  ObjectSerializer.parse(await response.body.text(), contentType),
2168
- "CancelNotificationSuccessResponse", ""
2169
- ) as CancelNotificationSuccessResponse;
1889
+ "UserIdentityBody", ""
1890
+ ) as UserIdentityBody;
2170
1891
  return body;
2171
1892
  }
2172
1893
 
@@ -2177,16 +1898,16 @@ export class DefaultApiResponseProcessor {
2177
1898
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2178
1899
  * to the expected objects
2179
1900
  *
2180
- * @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
2181
1902
  * @throws ApiException if the response code was not in [200, 299]
2182
1903
  */
2183
- public async createApp(response: ResponseContext): Promise<App > {
1904
+ public async createAliasBySubscription(response: ResponseContext): Promise<UserIdentityBody > {
2184
1905
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2185
1906
  if (isCodeInRange("200", response.httpStatusCode)) {
2186
- const body: App = ObjectSerializer.deserialize(
1907
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2187
1908
  ObjectSerializer.parse(await response.body.text(), contentType),
2188
- "App", ""
2189
- ) as App;
1909
+ "UserIdentityBody", ""
1910
+ ) as UserIdentityBody;
2190
1911
  return body;
2191
1912
  }
2192
1913
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2196,20 +1917,34 @@ export class DefaultApiResponseProcessor {
2196
1917
  ) as GenericError;
2197
1918
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2198
1919
  }
1920
+ if (isCodeInRange("404", response.httpStatusCode)) {
1921
+ const body: GenericError = ObjectSerializer.deserialize(
1922
+ ObjectSerializer.parse(await response.body.text(), contentType),
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
+ }
2199
1934
  if (isCodeInRange("429", response.httpStatusCode)) {
2200
- const body: RateLimiterError = ObjectSerializer.deserialize(
1935
+ const body: RateLimitError = ObjectSerializer.deserialize(
2201
1936
  ObjectSerializer.parse(await response.body.text(), contentType),
2202
- "RateLimiterError", ""
2203
- ) as RateLimiterError;
2204
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
1937
+ "RateLimitError", ""
1938
+ ) as RateLimitError;
1939
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2205
1940
  }
2206
1941
 
2207
1942
  // Work around for missing responses in specification, e.g. for petstore.yaml
2208
1943
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2209
- const body: App = ObjectSerializer.deserialize(
1944
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2210
1945
  ObjectSerializer.parse(await response.body.text(), contentType),
2211
- "App", ""
2212
- ) as App;
1946
+ "UserIdentityBody", ""
1947
+ ) as UserIdentityBody;
2213
1948
  return body;
2214
1949
  }
2215
1950
 
@@ -2220,16 +1955,16 @@ export class DefaultApiResponseProcessor {
2220
1955
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2221
1956
  * to the expected objects
2222
1957
  *
2223
- * @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
2224
1959
  * @throws ApiException if the response code was not in [200, 299]
2225
1960
  */
2226
- public async createNotification(response: ResponseContext): Promise<CreateNotificationSuccessResponse > {
1961
+ public async createApp(response: ResponseContext): Promise<App > {
2227
1962
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2228
1963
  if (isCodeInRange("200", response.httpStatusCode)) {
2229
- const body: CreateNotificationSuccessResponse = ObjectSerializer.deserialize(
1964
+ const body: App = ObjectSerializer.deserialize(
2230
1965
  ObjectSerializer.parse(await response.body.text(), contentType),
2231
- "CreateNotificationSuccessResponse", ""
2232
- ) as CreateNotificationSuccessResponse;
1966
+ "App", ""
1967
+ ) as App;
2233
1968
  return body;
2234
1969
  }
2235
1970
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2240,19 +1975,19 @@ export class DefaultApiResponseProcessor {
2240
1975
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2241
1976
  }
2242
1977
  if (isCodeInRange("429", response.httpStatusCode)) {
2243
- const body: RateLimiterError = ObjectSerializer.deserialize(
1978
+ const body: RateLimitError = ObjectSerializer.deserialize(
2244
1979
  ObjectSerializer.parse(await response.body.text(), contentType),
2245
- "RateLimiterError", ""
2246
- ) as RateLimiterError;
2247
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
1980
+ "RateLimitError", ""
1981
+ ) as RateLimitError;
1982
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2248
1983
  }
2249
1984
 
2250
1985
  // Work around for missing responses in specification, e.g. for petstore.yaml
2251
1986
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2252
- const body: CreateNotificationSuccessResponse = ObjectSerializer.deserialize(
1987
+ const body: App = ObjectSerializer.deserialize(
2253
1988
  ObjectSerializer.parse(await response.body.text(), contentType),
2254
- "CreateNotificationSuccessResponse", ""
2255
- ) as CreateNotificationSuccessResponse;
1989
+ "App", ""
1990
+ ) as App;
2256
1991
  return body;
2257
1992
  }
2258
1993
 
@@ -2263,16 +1998,16 @@ export class DefaultApiResponseProcessor {
2263
1998
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2264
1999
  * to the expected objects
2265
2000
  *
2266
- * @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
2267
2002
  * @throws ApiException if the response code was not in [200, 299]
2268
2003
  */
2269
- public async createPlayer(response: ResponseContext): Promise<CreatePlayerSuccessResponse > {
2004
+ public async createNotification(response: ResponseContext): Promise<CreateNotificationSuccessResponse > {
2270
2005
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2271
2006
  if (isCodeInRange("200", response.httpStatusCode)) {
2272
- const body: CreatePlayerSuccessResponse = ObjectSerializer.deserialize(
2007
+ const body: CreateNotificationSuccessResponse = ObjectSerializer.deserialize(
2273
2008
  ObjectSerializer.parse(await response.body.text(), contentType),
2274
- "CreatePlayerSuccessResponse", ""
2275
- ) as CreatePlayerSuccessResponse;
2009
+ "CreateNotificationSuccessResponse", ""
2010
+ ) as CreateNotificationSuccessResponse;
2276
2011
  return body;
2277
2012
  }
2278
2013
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2282,27 +2017,20 @@ export class DefaultApiResponseProcessor {
2282
2017
  ) as GenericError;
2283
2018
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2284
2019
  }
2285
- if (isCodeInRange("409", response.httpStatusCode)) {
2286
- const body: GenericError = ObjectSerializer.deserialize(
2287
- ObjectSerializer.parse(await response.body.text(), contentType),
2288
- "GenericError", ""
2289
- ) as GenericError;
2290
- throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2291
- }
2292
2020
  if (isCodeInRange("429", response.httpStatusCode)) {
2293
- const body: RateLimiterError = ObjectSerializer.deserialize(
2021
+ const body: RateLimitError = ObjectSerializer.deserialize(
2294
2022
  ObjectSerializer.parse(await response.body.text(), contentType),
2295
- "RateLimiterError", ""
2296
- ) as RateLimiterError;
2297
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2023
+ "RateLimitError", ""
2024
+ ) as RateLimitError;
2025
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2298
2026
  }
2299
2027
 
2300
2028
  // Work around for missing responses in specification, e.g. for petstore.yaml
2301
2029
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2302
- const body: CreatePlayerSuccessResponse = ObjectSerializer.deserialize(
2030
+ const body: CreateNotificationSuccessResponse = ObjectSerializer.deserialize(
2303
2031
  ObjectSerializer.parse(await response.body.text(), contentType),
2304
- "CreatePlayerSuccessResponse", ""
2305
- ) as CreatePlayerSuccessResponse;
2032
+ "CreateNotificationSuccessResponse", ""
2033
+ ) as CreateNotificationSuccessResponse;
2306
2034
  return body;
2307
2035
  }
2308
2036
 
@@ -2313,10 +2041,10 @@ export class DefaultApiResponseProcessor {
2313
2041
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2314
2042
  * to the expected objects
2315
2043
  *
2316
- * @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
2317
2045
  * @throws ApiException if the response code was not in [200, 299]
2318
2046
  */
2319
- public async createSegments(response: ResponseContext): Promise<CreateSegmentSuccessResponse > {
2047
+ public async createSegment(response: ResponseContext): Promise<CreateSegmentSuccessResponse > {
2320
2048
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2321
2049
  if (isCodeInRange("201", response.httpStatusCode)) {
2322
2050
  const body: CreateSegmentSuccessResponse = ObjectSerializer.deserialize(
@@ -2340,11 +2068,11 @@ export class DefaultApiResponseProcessor {
2340
2068
  throw new ApiException<CreateSegmentConflictResponse>(409, "Conflict", body, response.headers);
2341
2069
  }
2342
2070
  if (isCodeInRange("429", response.httpStatusCode)) {
2343
- const body: RateLimiterError = ObjectSerializer.deserialize(
2071
+ const body: RateLimitError = ObjectSerializer.deserialize(
2344
2072
  ObjectSerializer.parse(await response.body.text(), contentType),
2345
- "RateLimiterError", ""
2346
- ) as RateLimiterError;
2347
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2073
+ "RateLimitError", ""
2074
+ ) as RateLimitError;
2075
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2348
2076
  }
2349
2077
 
2350
2078
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2366,20 +2094,20 @@ export class DefaultApiResponseProcessor {
2366
2094
  * @params response Response returned by the server for a request to createSubscription
2367
2095
  * @throws ApiException if the response code was not in [200, 299]
2368
2096
  */
2369
- public async createSubscription(response: ResponseContext): Promise<InlineResponse201 > {
2097
+ public async createSubscription(response: ResponseContext): Promise<SubscriptionBody > {
2370
2098
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2371
2099
  if (isCodeInRange("201", response.httpStatusCode)) {
2372
- const body: InlineResponse201 = ObjectSerializer.deserialize(
2100
+ const body: SubscriptionBody = ObjectSerializer.deserialize(
2373
2101
  ObjectSerializer.parse(await response.body.text(), contentType),
2374
- "InlineResponse201", ""
2375
- ) as InlineResponse201;
2102
+ "SubscriptionBody", ""
2103
+ ) as SubscriptionBody;
2376
2104
  return body;
2377
2105
  }
2378
2106
  if (isCodeInRange("202", response.httpStatusCode)) {
2379
- const body: InlineResponse201 = ObjectSerializer.deserialize(
2107
+ const body: SubscriptionBody = ObjectSerializer.deserialize(
2380
2108
  ObjectSerializer.parse(await response.body.text(), contentType),
2381
- "InlineResponse201", ""
2382
- ) as InlineResponse201;
2109
+ "SubscriptionBody", ""
2110
+ ) as SubscriptionBody;
2383
2111
  return body;
2384
2112
  }
2385
2113
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2389,6 +2117,13 @@ export class DefaultApiResponseProcessor {
2389
2117
  ) as GenericError;
2390
2118
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2391
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
+ }
2392
2127
  if (isCodeInRange("409", response.httpStatusCode)) {
2393
2128
  const body: GenericError = ObjectSerializer.deserialize(
2394
2129
  ObjectSerializer.parse(await response.body.text(), contentType),
@@ -2397,19 +2132,19 @@ export class DefaultApiResponseProcessor {
2397
2132
  throw new ApiException<GenericError>(409, "Operation is not permitted due to user having the maximum number of subscriptions assigned", body, response.headers);
2398
2133
  }
2399
2134
  if (isCodeInRange("429", response.httpStatusCode)) {
2400
- const body: RateLimiterError = ObjectSerializer.deserialize(
2135
+ const body: RateLimitError = ObjectSerializer.deserialize(
2401
2136
  ObjectSerializer.parse(await response.body.text(), contentType),
2402
- "RateLimiterError", ""
2403
- ) as RateLimiterError;
2404
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2137
+ "RateLimitError", ""
2138
+ ) as RateLimitError;
2139
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2405
2140
  }
2406
2141
 
2407
2142
  // Work around for missing responses in specification, e.g. for petstore.yaml
2408
2143
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2409
- const body: InlineResponse201 = ObjectSerializer.deserialize(
2144
+ const body: SubscriptionBody = ObjectSerializer.deserialize(
2410
2145
  ObjectSerializer.parse(await response.body.text(), contentType),
2411
- "InlineResponse201", ""
2412
- ) as InlineResponse201;
2146
+ "SubscriptionBody", ""
2147
+ ) as SubscriptionBody;
2413
2148
  return body;
2414
2149
  }
2415
2150
 
@@ -2461,11 +2196,11 @@ export class DefaultApiResponseProcessor {
2461
2196
  throw new ApiException<CreateUserConflictResponse>(409, "Multiple User Identity Conflict", body, response.headers);
2462
2197
  }
2463
2198
  if (isCodeInRange("429", response.httpStatusCode)) {
2464
- const body: RateLimiterError = ObjectSerializer.deserialize(
2199
+ const body: RateLimitError = ObjectSerializer.deserialize(
2465
2200
  ObjectSerializer.parse(await response.body.text(), contentType),
2466
- "RateLimiterError", ""
2467
- ) as RateLimiterError;
2468
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2201
+ "RateLimitError", ""
2202
+ ) as RateLimitError;
2203
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2469
2204
  }
2470
2205
 
2471
2206
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2487,13 +2222,13 @@ export class DefaultApiResponseProcessor {
2487
2222
  * @params response Response returned by the server for a request to deleteAlias
2488
2223
  * @throws ApiException if the response code was not in [200, 299]
2489
2224
  */
2490
- public async deleteAlias(response: ResponseContext): Promise<InlineResponse200 > {
2225
+ public async deleteAlias(response: ResponseContext): Promise<UserIdentityBody > {
2491
2226
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2492
2227
  if (isCodeInRange("200", response.httpStatusCode)) {
2493
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2228
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2494
2229
  ObjectSerializer.parse(await response.body.text(), contentType),
2495
- "InlineResponse200", ""
2496
- ) as InlineResponse200;
2230
+ "UserIdentityBody", ""
2231
+ ) as UserIdentityBody;
2497
2232
  return body;
2498
2233
  }
2499
2234
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2503,77 +2238,34 @@ export class DefaultApiResponseProcessor {
2503
2238
  ) as GenericError;
2504
2239
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2505
2240
  }
2506
- if (isCodeInRange("409", response.httpStatusCode)) {
2241
+ if (isCodeInRange("404", response.httpStatusCode)) {
2507
2242
  const body: GenericError = ObjectSerializer.deserialize(
2508
2243
  ObjectSerializer.parse(await response.body.text(), contentType),
2509
2244
  "GenericError", ""
2510
2245
  ) as GenericError;
2511
- throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2512
- }
2513
- if (isCodeInRange("429", response.httpStatusCode)) {
2514
- const body: RateLimiterError = ObjectSerializer.deserialize(
2515
- ObjectSerializer.parse(await response.body.text(), contentType),
2516
- "RateLimiterError", ""
2517
- ) as RateLimiterError;
2518
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2519
- }
2520
-
2521
- // Work around for missing responses in specification, e.g. for petstore.yaml
2522
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2523
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2524
- ObjectSerializer.parse(await response.body.text(), contentType),
2525
- "InlineResponse200", ""
2526
- ) as InlineResponse200;
2527
- return body;
2528
- }
2529
-
2530
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2531
- }
2532
-
2533
- /**
2534
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2535
- * to the expected objects
2536
- *
2537
- * @params response Response returned by the server for a request to deletePlayer
2538
- * @throws ApiException if the response code was not in [200, 299]
2539
- */
2540
- public async deletePlayer(response: ResponseContext): Promise<DeletePlayerSuccessResponse > {
2541
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2542
- if (isCodeInRange("200", response.httpStatusCode)) {
2543
- const body: DeletePlayerSuccessResponse = ObjectSerializer.deserialize(
2544
- ObjectSerializer.parse(await response.body.text(), contentType),
2545
- "DeletePlayerSuccessResponse", ""
2546
- ) as DeletePlayerSuccessResponse;
2547
- return body;
2246
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2548
2247
  }
2549
- if (isCodeInRange("400", response.httpStatusCode)) {
2248
+ if (isCodeInRange("409", response.httpStatusCode)) {
2550
2249
  const body: GenericError = ObjectSerializer.deserialize(
2551
2250
  ObjectSerializer.parse(await response.body.text(), contentType),
2552
2251
  "GenericError", ""
2553
2252
  ) as GenericError;
2554
- throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2555
- }
2556
- if (isCodeInRange("404", response.httpStatusCode)) {
2557
- const body: DeletePlayerNotFoundResponse = ObjectSerializer.deserialize(
2558
- ObjectSerializer.parse(await response.body.text(), contentType),
2559
- "DeletePlayerNotFoundResponse", ""
2560
- ) as DeletePlayerNotFoundResponse;
2561
- throw new ApiException<DeletePlayerNotFoundResponse>(404, "Not Found", body, response.headers);
2253
+ throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2562
2254
  }
2563
2255
  if (isCodeInRange("429", response.httpStatusCode)) {
2564
- const body: RateLimiterError = ObjectSerializer.deserialize(
2256
+ const body: RateLimitError = ObjectSerializer.deserialize(
2565
2257
  ObjectSerializer.parse(await response.body.text(), contentType),
2566
- "RateLimiterError", ""
2567
- ) as RateLimiterError;
2568
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2258
+ "RateLimitError", ""
2259
+ ) as RateLimitError;
2260
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2569
2261
  }
2570
2262
 
2571
2263
  // Work around for missing responses in specification, e.g. for petstore.yaml
2572
2264
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2573
- const body: DeletePlayerSuccessResponse = ObjectSerializer.deserialize(
2265
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2574
2266
  ObjectSerializer.parse(await response.body.text(), contentType),
2575
- "DeletePlayerSuccessResponse", ""
2576
- ) as DeletePlayerSuccessResponse;
2267
+ "UserIdentityBody", ""
2268
+ ) as UserIdentityBody;
2577
2269
  return body;
2578
2270
  }
2579
2271
 
@@ -2584,63 +2276,17 @@ export class DefaultApiResponseProcessor {
2584
2276
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2585
2277
  * to the expected objects
2586
2278
  *
2587
- * @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
2588
2280
  * @throws ApiException if the response code was not in [200, 299]
2589
2281
  */
2590
- public async deleteSegments(response: ResponseContext): Promise<DeleteSegmentSuccessResponse > {
2282
+ public async deleteSegment(response: ResponseContext): Promise<GenericSuccessBoolResponse > {
2591
2283
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2592
2284
  if (isCodeInRange("200", response.httpStatusCode)) {
2593
- const body: DeleteSegmentSuccessResponse = ObjectSerializer.deserialize(
2594
- ObjectSerializer.parse(await response.body.text(), contentType),
2595
- "DeleteSegmentSuccessResponse", ""
2596
- ) as DeleteSegmentSuccessResponse;
2597
- return body;
2598
- }
2599
- if (isCodeInRange("400", response.httpStatusCode)) {
2600
- const body: GenericError = ObjectSerializer.deserialize(
2601
- ObjectSerializer.parse(await response.body.text(), contentType),
2602
- "GenericError", ""
2603
- ) as GenericError;
2604
- throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2605
- }
2606
- if (isCodeInRange("404", response.httpStatusCode)) {
2607
- const body: DeleteSegmentNotFoundResponse = ObjectSerializer.deserialize(
2608
- ObjectSerializer.parse(await response.body.text(), contentType),
2609
- "DeleteSegmentNotFoundResponse", ""
2610
- ) as DeleteSegmentNotFoundResponse;
2611
- throw new ApiException<DeleteSegmentNotFoundResponse>(404, "Not Found", body, response.headers);
2612
- }
2613
- if (isCodeInRange("429", response.httpStatusCode)) {
2614
- const body: RateLimiterError = ObjectSerializer.deserialize(
2615
- ObjectSerializer.parse(await response.body.text(), contentType),
2616
- "RateLimiterError", ""
2617
- ) as RateLimiterError;
2618
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2619
- }
2620
-
2621
- // Work around for missing responses in specification, e.g. for petstore.yaml
2622
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2623
- const body: DeleteSegmentSuccessResponse = ObjectSerializer.deserialize(
2624
- ObjectSerializer.parse(await response.body.text(), contentType),
2625
- "DeleteSegmentSuccessResponse", ""
2626
- ) as DeleteSegmentSuccessResponse;
2627
- return body;
2628
- }
2629
-
2630
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2631
- }
2632
-
2633
- /**
2634
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2635
- * to the expected objects
2636
- *
2637
- * @params response Response returned by the server for a request to deleteSubscription
2638
- * @throws ApiException if the response code was not in [200, 299]
2639
- */
2640
- public async deleteSubscription(response: ResponseContext): Promise<void > {
2641
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2642
- if (isCodeInRange("202", response.httpStatusCode)) {
2643
- return;
2285
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
2286
+ ObjectSerializer.parse(await response.body.text(), contentType),
2287
+ "GenericSuccessBoolResponse", ""
2288
+ ) as GenericSuccessBoolResponse;
2289
+ return body;
2644
2290
  }
2645
2291
  if (isCodeInRange("400", response.httpStatusCode)) {
2646
2292
  const body: GenericError = ObjectSerializer.deserialize(
@@ -2649,27 +2295,27 @@ export class DefaultApiResponseProcessor {
2649
2295
  ) as GenericError;
2650
2296
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2651
2297
  }
2652
- if (isCodeInRange("409", response.httpStatusCode)) {
2653
- const body: GenericError = ObjectSerializer.deserialize(
2298
+ if (isCodeInRange("404", response.httpStatusCode)) {
2299
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
2654
2300
  ObjectSerializer.parse(await response.body.text(), contentType),
2655
- "GenericError", ""
2656
- ) as GenericError;
2657
- throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2301
+ "GenericSuccessBoolResponse", ""
2302
+ ) as GenericSuccessBoolResponse;
2303
+ throw new ApiException<GenericSuccessBoolResponse>(404, "Not Found", body, response.headers);
2658
2304
  }
2659
2305
  if (isCodeInRange("429", response.httpStatusCode)) {
2660
- const body: RateLimiterError = ObjectSerializer.deserialize(
2306
+ const body: RateLimitError = ObjectSerializer.deserialize(
2661
2307
  ObjectSerializer.parse(await response.body.text(), contentType),
2662
- "RateLimiterError", ""
2663
- ) as RateLimiterError;
2664
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2308
+ "RateLimitError", ""
2309
+ ) as RateLimitError;
2310
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2665
2311
  }
2666
2312
 
2667
2313
  // Work around for missing responses in specification, e.g. for petstore.yaml
2668
2314
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2669
- const body: void = ObjectSerializer.deserialize(
2315
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
2670
2316
  ObjectSerializer.parse(await response.body.text(), contentType),
2671
- "void", ""
2672
- ) as void;
2317
+ "GenericSuccessBoolResponse", ""
2318
+ ) as GenericSuccessBoolResponse;
2673
2319
  return body;
2674
2320
  }
2675
2321
 
@@ -2680,12 +2326,12 @@ export class DefaultApiResponseProcessor {
2680
2326
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2681
2327
  * to the expected objects
2682
2328
  *
2683
- * @params response Response returned by the server for a request to deleteUser
2329
+ * @params response Response returned by the server for a request to deleteSubscription
2684
2330
  * @throws ApiException if the response code was not in [200, 299]
2685
2331
  */
2686
- public async deleteUser(response: ResponseContext): Promise<void > {
2332
+ public async deleteSubscription(response: ResponseContext): Promise<void > {
2687
2333
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2688
- if (isCodeInRange("200", response.httpStatusCode)) {
2334
+ if (isCodeInRange("202", response.httpStatusCode)) {
2689
2335
  return;
2690
2336
  }
2691
2337
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2695,6 +2341,13 @@ export class DefaultApiResponseProcessor {
2695
2341
  ) as GenericError;
2696
2342
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2697
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
+ }
2698
2351
  if (isCodeInRange("409", response.httpStatusCode)) {
2699
2352
  const body: GenericError = ObjectSerializer.deserialize(
2700
2353
  ObjectSerializer.parse(await response.body.text(), contentType),
@@ -2703,11 +2356,11 @@ export class DefaultApiResponseProcessor {
2703
2356
  throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2704
2357
  }
2705
2358
  if (isCodeInRange("429", response.httpStatusCode)) {
2706
- const body: RateLimiterError = ObjectSerializer.deserialize(
2359
+ const body: RateLimitError = ObjectSerializer.deserialize(
2707
2360
  ObjectSerializer.parse(await response.body.text(), contentType),
2708
- "RateLimiterError", ""
2709
- ) as RateLimiterError;
2710
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2361
+ "RateLimitError", ""
2362
+ ) as RateLimitError;
2363
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2711
2364
  }
2712
2365
 
2713
2366
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2726,12 +2379,12 @@ export class DefaultApiResponseProcessor {
2726
2379
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2727
2380
  * to the expected objects
2728
2381
  *
2729
- * @params response Response returned by the server for a request to endLiveActivity
2382
+ * @params response Response returned by the server for a request to deleteUser
2730
2383
  * @throws ApiException if the response code was not in [200, 299]
2731
2384
  */
2732
- public async endLiveActivity(response: ResponseContext): Promise<void > {
2385
+ public async deleteUser(response: ResponseContext): Promise<void > {
2733
2386
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2734
- if (isCodeInRange("204", response.httpStatusCode)) {
2387
+ if (isCodeInRange("200", response.httpStatusCode)) {
2735
2388
  return;
2736
2389
  }
2737
2390
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2741,12 +2394,19 @@ export class DefaultApiResponseProcessor {
2741
2394
  ) as GenericError;
2742
2395
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2743
2396
  }
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);
2403
+ }
2744
2404
  if (isCodeInRange("429", response.httpStatusCode)) {
2745
- const body: RateLimiterError = ObjectSerializer.deserialize(
2405
+ const body: RateLimitError = ObjectSerializer.deserialize(
2746
2406
  ObjectSerializer.parse(await response.body.text(), contentType),
2747
- "RateLimiterError", ""
2748
- ) as RateLimiterError;
2749
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2407
+ "RateLimitError", ""
2408
+ ) as RateLimitError;
2409
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2750
2410
  }
2751
2411
 
2752
2412
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2792,11 +2452,11 @@ export class DefaultApiResponseProcessor {
2792
2452
  throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2793
2453
  }
2794
2454
  if (isCodeInRange("429", response.httpStatusCode)) {
2795
- const body: RateLimiterError = ObjectSerializer.deserialize(
2455
+ const body: RateLimitError = ObjectSerializer.deserialize(
2796
2456
  ObjectSerializer.parse(await response.body.text(), contentType),
2797
- "RateLimiterError", ""
2798
- ) as RateLimiterError;
2799
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2457
+ "RateLimitError", ""
2458
+ ) as RateLimitError;
2459
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2800
2460
  }
2801
2461
 
2802
2462
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2815,16 +2475,16 @@ export class DefaultApiResponseProcessor {
2815
2475
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2816
2476
  * to the expected objects
2817
2477
  *
2818
- * @params response Response returned by the server for a request to exportPlayers
2478
+ * @params response Response returned by the server for a request to exportSubscriptions
2819
2479
  * @throws ApiException if the response code was not in [200, 299]
2820
2480
  */
2821
- public async exportPlayers(response: ResponseContext): Promise<ExportPlayersSuccessResponse > {
2481
+ public async exportSubscriptions(response: ResponseContext): Promise<ExportSubscriptionsSuccessResponse > {
2822
2482
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2823
2483
  if (isCodeInRange("200", response.httpStatusCode)) {
2824
- const body: ExportPlayersSuccessResponse = ObjectSerializer.deserialize(
2484
+ const body: ExportSubscriptionsSuccessResponse = ObjectSerializer.deserialize(
2825
2485
  ObjectSerializer.parse(await response.body.text(), contentType),
2826
- "ExportPlayersSuccessResponse", ""
2827
- ) as ExportPlayersSuccessResponse;
2486
+ "ExportSubscriptionsSuccessResponse", ""
2487
+ ) as ExportSubscriptionsSuccessResponse;
2828
2488
  return body;
2829
2489
  }
2830
2490
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2835,19 +2495,19 @@ export class DefaultApiResponseProcessor {
2835
2495
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2836
2496
  }
2837
2497
  if (isCodeInRange("429", response.httpStatusCode)) {
2838
- const body: RateLimiterError = ObjectSerializer.deserialize(
2498
+ const body: RateLimitError = ObjectSerializer.deserialize(
2839
2499
  ObjectSerializer.parse(await response.body.text(), contentType),
2840
- "RateLimiterError", ""
2841
- ) as RateLimiterError;
2842
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2500
+ "RateLimitError", ""
2501
+ ) as RateLimitError;
2502
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2843
2503
  }
2844
2504
 
2845
2505
  // Work around for missing responses in specification, e.g. for petstore.yaml
2846
2506
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2847
- const body: ExportPlayersSuccessResponse = ObjectSerializer.deserialize(
2507
+ const body: ExportSubscriptionsSuccessResponse = ObjectSerializer.deserialize(
2848
2508
  ObjectSerializer.parse(await response.body.text(), contentType),
2849
- "ExportPlayersSuccessResponse", ""
2850
- ) as ExportPlayersSuccessResponse;
2509
+ "ExportSubscriptionsSuccessResponse", ""
2510
+ ) as ExportSubscriptionsSuccessResponse;
2851
2511
  return body;
2852
2512
  }
2853
2513
 
@@ -2858,16 +2518,16 @@ export class DefaultApiResponseProcessor {
2858
2518
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2859
2519
  * to the expected objects
2860
2520
  *
2861
- * @params response Response returned by the server for a request to fetchAliases
2521
+ * @params response Response returned by the server for a request to getAliases
2862
2522
  * @throws ApiException if the response code was not in [200, 299]
2863
2523
  */
2864
- public async fetchAliases(response: ResponseContext): Promise<UserIdentityResponse > {
2524
+ public async getAliases(response: ResponseContext): Promise<UserIdentityBody > {
2865
2525
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2866
2526
  if (isCodeInRange("200", response.httpStatusCode)) {
2867
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
2527
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2868
2528
  ObjectSerializer.parse(await response.body.text(), contentType),
2869
- "UserIdentityResponse", ""
2870
- ) as UserIdentityResponse;
2529
+ "UserIdentityBody", ""
2530
+ ) as UserIdentityBody;
2871
2531
  return body;
2872
2532
  }
2873
2533
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2877,56 +2537,27 @@ export class DefaultApiResponseProcessor {
2877
2537
  ) as GenericError;
2878
2538
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2879
2539
  }
2880
-
2881
- // Work around for missing responses in specification, e.g. for petstore.yaml
2882
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2883
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
2884
- ObjectSerializer.parse(await response.body.text(), contentType),
2885
- "UserIdentityResponse", ""
2886
- ) as UserIdentityResponse;
2887
- return body;
2888
- }
2889
-
2890
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2891
- }
2892
-
2893
- /**
2894
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2895
- * to the expected objects
2896
- *
2897
- * @params response Response returned by the server for a request to fetchUser
2898
- * @throws ApiException if the response code was not in [200, 299]
2899
- */
2900
- public async fetchUser(response: ResponseContext): Promise<User > {
2901
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2902
- if (isCodeInRange("200", response.httpStatusCode)) {
2903
- const body: User = ObjectSerializer.deserialize(
2904
- ObjectSerializer.parse(await response.body.text(), contentType),
2905
- "User", ""
2906
- ) as User;
2907
- return body;
2908
- }
2909
- if (isCodeInRange("400", response.httpStatusCode)) {
2540
+ if (isCodeInRange("404", response.httpStatusCode)) {
2910
2541
  const body: GenericError = ObjectSerializer.deserialize(
2911
2542
  ObjectSerializer.parse(await response.body.text(), contentType),
2912
2543
  "GenericError", ""
2913
2544
  ) as GenericError;
2914
- throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2545
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2915
2546
  }
2916
2547
  if (isCodeInRange("429", response.httpStatusCode)) {
2917
- const body: RateLimiterError = ObjectSerializer.deserialize(
2548
+ const body: RateLimitError = ObjectSerializer.deserialize(
2918
2549
  ObjectSerializer.parse(await response.body.text(), contentType),
2919
- "RateLimiterError", ""
2920
- ) as RateLimiterError;
2921
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2550
+ "RateLimitError", ""
2551
+ ) as RateLimitError;
2552
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2922
2553
  }
2923
2554
 
2924
2555
  // Work around for missing responses in specification, e.g. for petstore.yaml
2925
2556
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2926
- const body: User = ObjectSerializer.deserialize(
2557
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2927
2558
  ObjectSerializer.parse(await response.body.text(), contentType),
2928
- "User", ""
2929
- ) as User;
2559
+ "UserIdentityBody", ""
2560
+ ) as UserIdentityBody;
2930
2561
  return body;
2931
2562
  }
2932
2563
 
@@ -2937,16 +2568,16 @@ export class DefaultApiResponseProcessor {
2937
2568
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2938
2569
  * to the expected objects
2939
2570
  *
2940
- * @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
2941
2572
  * @throws ApiException if the response code was not in [200, 299]
2942
2573
  */
2943
- public async fetchUserIdentity(response: ResponseContext): Promise<InlineResponse200 > {
2574
+ public async getAliasesBySubscription(response: ResponseContext): Promise<UserIdentityBody > {
2944
2575
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2945
2576
  if (isCodeInRange("200", response.httpStatusCode)) {
2946
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2577
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2947
2578
  ObjectSerializer.parse(await response.body.text(), contentType),
2948
- "InlineResponse200", ""
2949
- ) as InlineResponse200;
2579
+ "UserIdentityBody", ""
2580
+ ) as UserIdentityBody;
2950
2581
  return body;
2951
2582
  }
2952
2583
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2956,20 +2587,20 @@ export class DefaultApiResponseProcessor {
2956
2587
  ) as GenericError;
2957
2588
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2958
2589
  }
2959
- if (isCodeInRange("429", response.httpStatusCode)) {
2960
- const body: RateLimiterError = ObjectSerializer.deserialize(
2590
+ if (isCodeInRange("404", response.httpStatusCode)) {
2591
+ const body: GenericError = ObjectSerializer.deserialize(
2961
2592
  ObjectSerializer.parse(await response.body.text(), contentType),
2962
- "RateLimiterError", ""
2963
- ) as RateLimiterError;
2964
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2593
+ "GenericError", ""
2594
+ ) as GenericError;
2595
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2965
2596
  }
2966
2597
 
2967
2598
  // Work around for missing responses in specification, e.g. for petstore.yaml
2968
2599
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2969
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2600
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2970
2601
  ObjectSerializer.parse(await response.body.text(), contentType),
2971
- "InlineResponse200", ""
2972
- ) as InlineResponse200;
2602
+ "UserIdentityBody", ""
2603
+ ) as UserIdentityBody;
2973
2604
  return body;
2974
2605
  }
2975
2606
 
@@ -3000,11 +2631,11 @@ export class DefaultApiResponseProcessor {
3000
2631
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3001
2632
  }
3002
2633
  if (isCodeInRange("429", response.httpStatusCode)) {
3003
- const body: RateLimiterError = ObjectSerializer.deserialize(
2634
+ const body: RateLimitError = ObjectSerializer.deserialize(
3004
2635
  ObjectSerializer.parse(await response.body.text(), contentType),
3005
- "RateLimiterError", ""
3006
- ) as RateLimiterError;
3007
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2636
+ "RateLimitError", ""
2637
+ ) as RateLimitError;
2638
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3008
2639
  }
3009
2640
 
3010
2641
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3043,11 +2674,11 @@ export class DefaultApiResponseProcessor {
3043
2674
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3044
2675
  }
3045
2676
  if (isCodeInRange("429", response.httpStatusCode)) {
3046
- const body: RateLimiterError = ObjectSerializer.deserialize(
2677
+ const body: RateLimitError = ObjectSerializer.deserialize(
3047
2678
  ObjectSerializer.parse(await response.body.text(), contentType),
3048
- "RateLimiterError", ""
3049
- ) as RateLimiterError;
3050
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2679
+ "RateLimitError", ""
2680
+ ) as RateLimitError;
2681
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3051
2682
  }
3052
2683
 
3053
2684
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3062,49 +2693,6 @@ export class DefaultApiResponseProcessor {
3062
2693
  throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
3063
2694
  }
3064
2695
 
3065
- /**
3066
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
3067
- * to the expected objects
3068
- *
3069
- * @params response Response returned by the server for a request to getEligibleIams
3070
- * @throws ApiException if the response code was not in [200, 299]
3071
- */
3072
- public async getEligibleIams(response: ResponseContext): Promise<InlineResponse2003 > {
3073
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3074
- if (isCodeInRange("200", response.httpStatusCode)) {
3075
- const body: InlineResponse2003 = ObjectSerializer.deserialize(
3076
- ObjectSerializer.parse(await response.body.text(), contentType),
3077
- "InlineResponse2003", ""
3078
- ) as InlineResponse2003;
3079
- return body;
3080
- }
3081
- if (isCodeInRange("400", response.httpStatusCode)) {
3082
- const body: GenericError = ObjectSerializer.deserialize(
3083
- ObjectSerializer.parse(await response.body.text(), contentType),
3084
- "GenericError", ""
3085
- ) as GenericError;
3086
- throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3087
- }
3088
- if (isCodeInRange("429", response.httpStatusCode)) {
3089
- const body: RateLimiterError = ObjectSerializer.deserialize(
3090
- ObjectSerializer.parse(await response.body.text(), contentType),
3091
- "RateLimiterError", ""
3092
- ) as RateLimiterError;
3093
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3094
- }
3095
-
3096
- // Work around for missing responses in specification, e.g. for petstore.yaml
3097
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3098
- const body: InlineResponse2003 = ObjectSerializer.deserialize(
3099
- ObjectSerializer.parse(await response.body.text(), contentType),
3100
- "InlineResponse2003", ""
3101
- ) as InlineResponse2003;
3102
- return body;
3103
- }
3104
-
3105
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
3106
- }
3107
-
3108
2696
  /**
3109
2697
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3110
2698
  * to the expected objects
@@ -3128,12 +2716,19 @@ export class DefaultApiResponseProcessor {
3128
2716
  ) as GenericError;
3129
2717
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3130
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
+ }
3131
2726
  if (isCodeInRange("429", response.httpStatusCode)) {
3132
- const body: RateLimiterError = ObjectSerializer.deserialize(
2727
+ const body: RateLimitError = ObjectSerializer.deserialize(
3133
2728
  ObjectSerializer.parse(await response.body.text(), contentType),
3134
- "RateLimiterError", ""
3135
- ) as RateLimiterError;
3136
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2729
+ "RateLimitError", ""
2730
+ ) as RateLimitError;
2731
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3137
2732
  }
3138
2733
 
3139
2734
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3171,12 +2766,19 @@ export class DefaultApiResponseProcessor {
3171
2766
  ) as GenericError;
3172
2767
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3173
2768
  }
2769
+ if (isCodeInRange("404", response.httpStatusCode)) {
2770
+ const body: GenericError = ObjectSerializer.deserialize(
2771
+ ObjectSerializer.parse(await response.body.text(), contentType),
2772
+ "GenericError", ""
2773
+ ) as GenericError;
2774
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2775
+ }
3174
2776
  if (isCodeInRange("429", response.httpStatusCode)) {
3175
- const body: RateLimiterError = ObjectSerializer.deserialize(
2777
+ const body: RateLimitError = ObjectSerializer.deserialize(
3176
2778
  ObjectSerializer.parse(await response.body.text(), contentType),
3177
- "RateLimiterError", ""
3178
- ) as RateLimiterError;
3179
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2779
+ "RateLimitError", ""
2780
+ ) as RateLimitError;
2781
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3180
2782
  }
3181
2783
 
3182
2784
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3215,11 +2817,11 @@ export class DefaultApiResponseProcessor {
3215
2817
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3216
2818
  }
3217
2819
  if (isCodeInRange("429", response.httpStatusCode)) {
3218
- const body: RateLimiterError = ObjectSerializer.deserialize(
2820
+ const body: RateLimitError = ObjectSerializer.deserialize(
3219
2821
  ObjectSerializer.parse(await response.body.text(), contentType),
3220
- "RateLimiterError", ""
3221
- ) as RateLimiterError;
3222
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2822
+ "RateLimitError", ""
2823
+ ) as RateLimitError;
2824
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3223
2825
  }
3224
2826
 
3225
2827
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3258,11 +2860,11 @@ export class DefaultApiResponseProcessor {
3258
2860
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3259
2861
  }
3260
2862
  if (isCodeInRange("429", response.httpStatusCode)) {
3261
- const body: RateLimiterError = ObjectSerializer.deserialize(
2863
+ const body: RateLimitError = ObjectSerializer.deserialize(
3262
2864
  ObjectSerializer.parse(await response.body.text(), contentType),
3263
- "RateLimiterError", ""
3264
- ) as RateLimiterError;
3265
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2865
+ "RateLimitError", ""
2866
+ ) as RateLimitError;
2867
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3266
2868
  }
3267
2869
 
3268
2870
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3281,59 +2883,16 @@ export class DefaultApiResponseProcessor {
3281
2883
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3282
2884
  * to the expected objects
3283
2885
  *
3284
- * @params response Response returned by the server for a request to getPlayer
3285
- * @throws ApiException if the response code was not in [200, 299]
3286
- */
3287
- public async getPlayer(response: ResponseContext): Promise<Player > {
3288
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3289
- if (isCodeInRange("200", response.httpStatusCode)) {
3290
- const body: Player = ObjectSerializer.deserialize(
3291
- ObjectSerializer.parse(await response.body.text(), contentType),
3292
- "Player", ""
3293
- ) as Player;
3294
- return body;
3295
- }
3296
- if (isCodeInRange("400", response.httpStatusCode)) {
3297
- const body: GenericError = ObjectSerializer.deserialize(
3298
- ObjectSerializer.parse(await response.body.text(), contentType),
3299
- "GenericError", ""
3300
- ) as GenericError;
3301
- throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3302
- }
3303
- if (isCodeInRange("429", response.httpStatusCode)) {
3304
- const body: RateLimiterError = ObjectSerializer.deserialize(
3305
- ObjectSerializer.parse(await response.body.text(), contentType),
3306
- "RateLimiterError", ""
3307
- ) as RateLimiterError;
3308
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3309
- }
3310
-
3311
- // Work around for missing responses in specification, e.g. for petstore.yaml
3312
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3313
- const body: Player = ObjectSerializer.deserialize(
3314
- ObjectSerializer.parse(await response.body.text(), contentType),
3315
- "Player", ""
3316
- ) as Player;
3317
- return body;
3318
- }
3319
-
3320
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
3321
- }
3322
-
3323
- /**
3324
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
3325
- * to the expected objects
3326
- *
3327
- * @params response Response returned by the server for a request to getPlayers
2886
+ * @params response Response returned by the server for a request to getSegments
3328
2887
  * @throws ApiException if the response code was not in [200, 299]
3329
2888
  */
3330
- public async getPlayers(response: ResponseContext): Promise<PlayerSlice > {
2889
+ public async getSegments(response: ResponseContext): Promise<GetSegmentsSuccessResponse > {
3331
2890
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3332
- if (isCodeInRange("200", response.httpStatusCode)) {
3333
- const body: PlayerSlice = ObjectSerializer.deserialize(
2891
+ if (isCodeInRange("201", response.httpStatusCode)) {
2892
+ const body: GetSegmentsSuccessResponse = ObjectSerializer.deserialize(
3334
2893
  ObjectSerializer.parse(await response.body.text(), contentType),
3335
- "PlayerSlice", ""
3336
- ) as PlayerSlice;
2894
+ "GetSegmentsSuccessResponse", ""
2895
+ ) as GetSegmentsSuccessResponse;
3337
2896
  return body;
3338
2897
  }
3339
2898
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -3344,19 +2903,19 @@ export class DefaultApiResponseProcessor {
3344
2903
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3345
2904
  }
3346
2905
  if (isCodeInRange("429", response.httpStatusCode)) {
3347
- const body: RateLimiterError = ObjectSerializer.deserialize(
2906
+ const body: RateLimitError = ObjectSerializer.deserialize(
3348
2907
  ObjectSerializer.parse(await response.body.text(), contentType),
3349
- "RateLimiterError", ""
3350
- ) as RateLimiterError;
3351
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2908
+ "RateLimitError", ""
2909
+ ) as RateLimitError;
2910
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3352
2911
  }
3353
2912
 
3354
2913
  // Work around for missing responses in specification, e.g. for petstore.yaml
3355
2914
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3356
- const body: PlayerSlice = ObjectSerializer.deserialize(
2915
+ const body: GetSegmentsSuccessResponse = ObjectSerializer.deserialize(
3357
2916
  ObjectSerializer.parse(await response.body.text(), contentType),
3358
- "PlayerSlice", ""
3359
- ) as PlayerSlice;
2917
+ "GetSegmentsSuccessResponse", ""
2918
+ ) as GetSegmentsSuccessResponse;
3360
2919
  return body;
3361
2920
  }
3362
2921
 
@@ -3367,16 +2926,16 @@ export class DefaultApiResponseProcessor {
3367
2926
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3368
2927
  * to the expected objects
3369
2928
  *
3370
- * @params response Response returned by the server for a request to identifyUserByAlias
2929
+ * @params response Response returned by the server for a request to getUser
3371
2930
  * @throws ApiException if the response code was not in [200, 299]
3372
2931
  */
3373
- public async identifyUserByAlias(response: ResponseContext): Promise<InlineResponse200 > {
2932
+ public async getUser(response: ResponseContext): Promise<User > {
3374
2933
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3375
2934
  if (isCodeInRange("200", response.httpStatusCode)) {
3376
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2935
+ const body: User = ObjectSerializer.deserialize(
3377
2936
  ObjectSerializer.parse(await response.body.text(), contentType),
3378
- "InlineResponse200", ""
3379
- ) as InlineResponse200;
2937
+ "User", ""
2938
+ ) as User;
3380
2939
  return body;
3381
2940
  }
3382
2941
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -3386,27 +2945,27 @@ export class DefaultApiResponseProcessor {
3386
2945
  ) as GenericError;
3387
2946
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3388
2947
  }
3389
- if (isCodeInRange("409", response.httpStatusCode)) {
2948
+ if (isCodeInRange("404", response.httpStatusCode)) {
3390
2949
  const body: GenericError = ObjectSerializer.deserialize(
3391
2950
  ObjectSerializer.parse(await response.body.text(), contentType),
3392
2951
  "GenericError", ""
3393
2952
  ) as GenericError;
3394
- throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2953
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
3395
2954
  }
3396
2955
  if (isCodeInRange("429", response.httpStatusCode)) {
3397
- const body: RateLimiterError = ObjectSerializer.deserialize(
2956
+ const body: RateLimitError = ObjectSerializer.deserialize(
3398
2957
  ObjectSerializer.parse(await response.body.text(), contentType),
3399
- "RateLimiterError", ""
3400
- ) as RateLimiterError;
3401
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2958
+ "RateLimitError", ""
2959
+ ) as RateLimitError;
2960
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3402
2961
  }
3403
2962
 
3404
2963
  // Work around for missing responses in specification, e.g. for petstore.yaml
3405
2964
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3406
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2965
+ const body: User = ObjectSerializer.deserialize(
3407
2966
  ObjectSerializer.parse(await response.body.text(), contentType),
3408
- "InlineResponse200", ""
3409
- ) as InlineResponse200;
2967
+ "User", ""
2968
+ ) as User;
3410
2969
  return body;
3411
2970
  }
3412
2971
 
@@ -3417,16 +2976,16 @@ export class DefaultApiResponseProcessor {
3417
2976
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3418
2977
  * to the expected objects
3419
2978
  *
3420
- * @params response Response returned by the server for a request to identifyUserBySubscriptionId
2979
+ * @params response Response returned by the server for a request to transferSubscription
3421
2980
  * @throws ApiException if the response code was not in [200, 299]
3422
2981
  */
3423
- public async identifyUserBySubscriptionId(response: ResponseContext): Promise<UserIdentityResponse > {
2982
+ public async transferSubscription(response: ResponseContext): Promise<UserIdentityBody > {
3424
2983
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3425
2984
  if (isCodeInRange("200", response.httpStatusCode)) {
3426
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
2985
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
3427
2986
  ObjectSerializer.parse(await response.body.text(), contentType),
3428
- "UserIdentityResponse", ""
3429
- ) as UserIdentityResponse;
2987
+ "UserIdentityBody", ""
2988
+ ) as UserIdentityBody;
3430
2989
  return body;
3431
2990
  }
3432
2991
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -3436,6 +2995,13 @@ export class DefaultApiResponseProcessor {
3436
2995
  ) as GenericError;
3437
2996
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3438
2997
  }
2998
+ if (isCodeInRange("404", response.httpStatusCode)) {
2999
+ const body: GenericError = ObjectSerializer.deserialize(
3000
+ ObjectSerializer.parse(await response.body.text(), contentType),
3001
+ "GenericError", ""
3002
+ ) as GenericError;
3003
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
3004
+ }
3439
3005
  if (isCodeInRange("409", response.httpStatusCode)) {
3440
3006
  const body: GenericError = ObjectSerializer.deserialize(
3441
3007
  ObjectSerializer.parse(await response.body.text(), contentType),
@@ -3444,19 +3010,19 @@ export class DefaultApiResponseProcessor {
3444
3010
  throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3445
3011
  }
3446
3012
  if (isCodeInRange("429", response.httpStatusCode)) {
3447
- const body: RateLimiterError = ObjectSerializer.deserialize(
3013
+ const body: RateLimitError = ObjectSerializer.deserialize(
3448
3014
  ObjectSerializer.parse(await response.body.text(), contentType),
3449
- "RateLimiterError", ""
3450
- ) as RateLimiterError;
3451
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3015
+ "RateLimitError", ""
3016
+ ) as RateLimitError;
3017
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3452
3018
  }
3453
3019
 
3454
3020
  // Work around for missing responses in specification, e.g. for petstore.yaml
3455
3021
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3456
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
3022
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
3457
3023
  ObjectSerializer.parse(await response.body.text(), contentType),
3458
- "UserIdentityResponse", ""
3459
- ) as UserIdentityResponse;
3024
+ "UserIdentityBody", ""
3025
+ ) as UserIdentityBody;
3460
3026
  return body;
3461
3027
  }
3462
3028
 
@@ -3467,16 +3033,16 @@ export class DefaultApiResponseProcessor {
3467
3033
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3468
3034
  * to the expected objects
3469
3035
  *
3470
- * @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
3471
3037
  * @throws ApiException if the response code was not in [200, 299]
3472
3038
  */
3473
- public async transferSubscription(response: ResponseContext): Promise<UserIdentityResponse > {
3039
+ public async unsubscribeEmailWithToken(response: ResponseContext): Promise<GenericSuccessBoolResponse > {
3474
3040
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3475
- if (isCodeInRange("200", response.httpStatusCode)) {
3476
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
3041
+ if (isCodeInRange("202", response.httpStatusCode)) {
3042
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
3477
3043
  ObjectSerializer.parse(await response.body.text(), contentType),
3478
- "UserIdentityResponse", ""
3479
- ) as UserIdentityResponse;
3044
+ "GenericSuccessBoolResponse", ""
3045
+ ) as GenericSuccessBoolResponse;
3480
3046
  return body;
3481
3047
  }
3482
3048
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -3486,27 +3052,20 @@ export class DefaultApiResponseProcessor {
3486
3052
  ) as GenericError;
3487
3053
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3488
3054
  }
3489
- if (isCodeInRange("409", response.httpStatusCode)) {
3490
- const body: GenericError = ObjectSerializer.deserialize(
3491
- ObjectSerializer.parse(await response.body.text(), contentType),
3492
- "GenericError", ""
3493
- ) as GenericError;
3494
- throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3495
- }
3496
3055
  if (isCodeInRange("429", response.httpStatusCode)) {
3497
- const body: RateLimiterError = ObjectSerializer.deserialize(
3056
+ const body: RateLimitError = ObjectSerializer.deserialize(
3498
3057
  ObjectSerializer.parse(await response.body.text(), contentType),
3499
- "RateLimiterError", ""
3500
- ) as RateLimiterError;
3501
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3058
+ "RateLimitError", ""
3059
+ ) as RateLimitError;
3060
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3502
3061
  }
3503
3062
 
3504
3063
  // Work around for missing responses in specification, e.g. for petstore.yaml
3505
3064
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3506
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
3065
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
3507
3066
  ObjectSerializer.parse(await response.body.text(), contentType),
3508
- "UserIdentityResponse", ""
3509
- ) as UserIdentityResponse;
3067
+ "GenericSuccessBoolResponse", ""
3068
+ ) as GenericSuccessBoolResponse;
3510
3069
  return body;
3511
3070
  }
3512
3071
 
@@ -3537,11 +3096,11 @@ export class DefaultApiResponseProcessor {
3537
3096
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3538
3097
  }
3539
3098
  if (isCodeInRange("429", response.httpStatusCode)) {
3540
- const body: RateLimiterError = ObjectSerializer.deserialize(
3099
+ const body: RateLimitError = ObjectSerializer.deserialize(
3541
3100
  ObjectSerializer.parse(await response.body.text(), contentType),
3542
- "RateLimiterError", ""
3543
- ) as RateLimiterError;
3544
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3101
+ "RateLimitError", ""
3102
+ ) as RateLimitError;
3103
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3545
3104
  }
3546
3105
 
3547
3106
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3580,11 +3139,11 @@ export class DefaultApiResponseProcessor {
3580
3139
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3581
3140
  }
3582
3141
  if (isCodeInRange("429", response.httpStatusCode)) {
3583
- const body: RateLimiterError = ObjectSerializer.deserialize(
3142
+ const body: RateLimitError = ObjectSerializer.deserialize(
3584
3143
  ObjectSerializer.parse(await response.body.text(), contentType),
3585
- "RateLimiterError", ""
3586
- ) as RateLimiterError;
3587
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3144
+ "RateLimitError", ""
3145
+ ) as RateLimitError;
3146
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3588
3147
  }
3589
3148
 
3590
3149
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3603,67 +3162,13 @@ export class DefaultApiResponseProcessor {
3603
3162
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3604
3163
  * to the expected objects
3605
3164
  *
3606
- * @params response Response returned by the server for a request to updatePlayer
3607
- * @throws ApiException if the response code was not in [200, 299]
3608
- */
3609
- public async updatePlayer(response: ResponseContext): Promise<UpdatePlayerSuccessResponse > {
3610
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3611
- if (isCodeInRange("200", response.httpStatusCode)) {
3612
- const body: UpdatePlayerSuccessResponse = ObjectSerializer.deserialize(
3613
- ObjectSerializer.parse(await response.body.text(), contentType),
3614
- "UpdatePlayerSuccessResponse", ""
3615
- ) as UpdatePlayerSuccessResponse;
3616
- return body;
3617
- }
3618
- if (isCodeInRange("400", response.httpStatusCode)) {
3619
- const body: GenericError = ObjectSerializer.deserialize(
3620
- ObjectSerializer.parse(await response.body.text(), contentType),
3621
- "GenericError", ""
3622
- ) as GenericError;
3623
- throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3624
- }
3625
- if (isCodeInRange("409", response.httpStatusCode)) {
3626
- const body: GenericError = ObjectSerializer.deserialize(
3627
- ObjectSerializer.parse(await response.body.text(), contentType),
3628
- "GenericError", ""
3629
- ) as GenericError;
3630
- throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3631
- }
3632
- if (isCodeInRange("429", response.httpStatusCode)) {
3633
- const body: RateLimiterError = ObjectSerializer.deserialize(
3634
- ObjectSerializer.parse(await response.body.text(), contentType),
3635
- "RateLimiterError", ""
3636
- ) as RateLimiterError;
3637
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3638
- }
3639
-
3640
- // Work around for missing responses in specification, e.g. for petstore.yaml
3641
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3642
- const body: UpdatePlayerSuccessResponse = ObjectSerializer.deserialize(
3643
- ObjectSerializer.parse(await response.body.text(), contentType),
3644
- "UpdatePlayerSuccessResponse", ""
3645
- ) as UpdatePlayerSuccessResponse;
3646
- return body;
3647
- }
3648
-
3649
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
3650
- }
3651
-
3652
- /**
3653
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
3654
- * to the expected objects
3655
- *
3656
- * @params response Response returned by the server for a request to updatePlayerTags
3165
+ * @params response Response returned by the server for a request to updateSubscription
3657
3166
  * @throws ApiException if the response code was not in [200, 299]
3658
3167
  */
3659
- public async updatePlayerTags(response: ResponseContext): Promise<UpdatePlayerTagsSuccessResponse > {
3168
+ public async updateSubscription(response: ResponseContext): Promise<void > {
3660
3169
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3661
3170
  if (isCodeInRange("200", response.httpStatusCode)) {
3662
- const body: UpdatePlayerTagsSuccessResponse = ObjectSerializer.deserialize(
3663
- ObjectSerializer.parse(await response.body.text(), contentType),
3664
- "UpdatePlayerTagsSuccessResponse", ""
3665
- ) as UpdatePlayerTagsSuccessResponse;
3666
- return body;
3171
+ return;
3667
3172
  }
3668
3173
  if (isCodeInRange("400", response.httpStatusCode)) {
3669
3174
  const body: GenericError = ObjectSerializer.deserialize(
@@ -3672,51 +3177,12 @@ export class DefaultApiResponseProcessor {
3672
3177
  ) as GenericError;
3673
3178
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3674
3179
  }
3675
- if (isCodeInRange("409", response.httpStatusCode)) {
3676
- const body: GenericError = ObjectSerializer.deserialize(
3677
- ObjectSerializer.parse(await response.body.text(), contentType),
3678
- "GenericError", ""
3679
- ) as GenericError;
3680
- throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3681
- }
3682
- if (isCodeInRange("429", response.httpStatusCode)) {
3683
- const body: RateLimiterError = ObjectSerializer.deserialize(
3684
- ObjectSerializer.parse(await response.body.text(), contentType),
3685
- "RateLimiterError", ""
3686
- ) as RateLimiterError;
3687
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3688
- }
3689
-
3690
- // Work around for missing responses in specification, e.g. for petstore.yaml
3691
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3692
- const body: UpdatePlayerTagsSuccessResponse = ObjectSerializer.deserialize(
3693
- ObjectSerializer.parse(await response.body.text(), contentType),
3694
- "UpdatePlayerTagsSuccessResponse", ""
3695
- ) as UpdatePlayerTagsSuccessResponse;
3696
- return body;
3697
- }
3698
-
3699
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
3700
- }
3701
-
3702
- /**
3703
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
3704
- * to the expected objects
3705
- *
3706
- * @params response Response returned by the server for a request to updateSubscription
3707
- * @throws ApiException if the response code was not in [200, 299]
3708
- */
3709
- public async updateSubscription(response: ResponseContext): Promise<void > {
3710
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3711
- if (isCodeInRange("202", response.httpStatusCode)) {
3712
- return;
3713
- }
3714
- if (isCodeInRange("400", response.httpStatusCode)) {
3180
+ if (isCodeInRange("404", response.httpStatusCode)) {
3715
3181
  const body: GenericError = ObjectSerializer.deserialize(
3716
3182
  ObjectSerializer.parse(await response.body.text(), contentType),
3717
3183
  "GenericError", ""
3718
3184
  ) as GenericError;
3719
- throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3185
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
3720
3186
  }
3721
3187
  if (isCodeInRange("409", response.httpStatusCode)) {
3722
3188
  const body: GenericError = ObjectSerializer.deserialize(
@@ -3726,11 +3192,11 @@ export class DefaultApiResponseProcessor {
3726
3192
  throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3727
3193
  }
3728
3194
  if (isCodeInRange("429", response.httpStatusCode)) {
3729
- const body: RateLimiterError = ObjectSerializer.deserialize(
3195
+ const body: RateLimitError = ObjectSerializer.deserialize(
3730
3196
  ObjectSerializer.parse(await response.body.text(), contentType),
3731
- "RateLimiterError", ""
3732
- ) as RateLimiterError;
3733
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3197
+ "RateLimitError", ""
3198
+ ) as RateLimitError;
3199
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3734
3200
  }
3735
3201
 
3736
3202
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3752,13 +3218,13 @@ export class DefaultApiResponseProcessor {
3752
3218
  * @params response Response returned by the server for a request to updateUser
3753
3219
  * @throws ApiException if the response code was not in [200, 299]
3754
3220
  */
3755
- public async updateUser(response: ResponseContext): Promise<InlineResponse202 > {
3221
+ public async updateUser(response: ResponseContext): Promise<PropertiesBody > {
3756
3222
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3757
3223
  if (isCodeInRange("202", response.httpStatusCode)) {
3758
- const body: InlineResponse202 = ObjectSerializer.deserialize(
3224
+ const body: PropertiesBody = ObjectSerializer.deserialize(
3759
3225
  ObjectSerializer.parse(await response.body.text(), contentType),
3760
- "InlineResponse202", ""
3761
- ) as InlineResponse202;
3226
+ "PropertiesBody", ""
3227
+ ) as PropertiesBody;
3762
3228
  return body;
3763
3229
  }
3764
3230
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -3776,19 +3242,19 @@ export class DefaultApiResponseProcessor {
3776
3242
  throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3777
3243
  }
3778
3244
  if (isCodeInRange("429", response.httpStatusCode)) {
3779
- const body: RateLimiterError = ObjectSerializer.deserialize(
3245
+ const body: RateLimitError = ObjectSerializer.deserialize(
3780
3246
  ObjectSerializer.parse(await response.body.text(), contentType),
3781
- "RateLimiterError", ""
3782
- ) as RateLimiterError;
3783
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3247
+ "RateLimitError", ""
3248
+ ) as RateLimitError;
3249
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3784
3250
  }
3785
3251
 
3786
3252
  // Work around for missing responses in specification, e.g. for petstore.yaml
3787
3253
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3788
- const body: InlineResponse202 = ObjectSerializer.deserialize(
3254
+ const body: PropertiesBody = ObjectSerializer.deserialize(
3789
3255
  ObjectSerializer.parse(await response.body.text(), contentType),
3790
- "InlineResponse202", ""
3791
- ) as InlineResponse202;
3256
+ "PropertiesBody", ""
3257
+ ) as PropertiesBody;
3792
3258
  return body;
3793
3259
  }
3794
3260