@onesignal/node-onesignal 2.1.0-beta1 → 5.0.0-alpha-02

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 (150) hide show
  1. package/DefaultApi.md +401 -778
  2. package/README.md +7 -7
  3. package/apis/DefaultApi.ts +671 -1316
  4. package/auth/auth.ts +14 -14
  5. package/configuration.ts +6 -6
  6. package/dist/apis/DefaultApi.d.ts +36 -63
  7. package/dist/apis/DefaultApi.js +654 -1212
  8. package/dist/apis/DefaultApi.js.map +1 -1
  9. package/dist/auth/auth.d.ts +6 -6
  10. package/dist/auth/auth.js +19 -19
  11. package/dist/auth/auth.js.map +1 -1
  12. package/dist/configuration.d.ts +2 -2
  13. package/dist/configuration.js +4 -4
  14. package/dist/configuration.js.map +1 -1
  15. package/dist/models/BasicNotification.d.ts +14 -12
  16. package/dist/models/BasicNotification.js +20 -20
  17. package/dist/models/BasicNotification.js.map +1 -1
  18. package/dist/models/BasicNotificationAllOf.d.ts +10 -8
  19. package/dist/models/BasicNotificationAllOf.js +17 -11
  20. package/dist/models/BasicNotificationAllOf.js.map +1 -1
  21. package/dist/models/CreateNotificationSuccessResponse.d.ts +1 -3
  22. package/dist/models/CreateNotificationSuccessResponse.js +1 -7
  23. package/dist/models/CreateNotificationSuccessResponse.js.map +1 -1
  24. package/dist/models/Filter.d.ts +6 -2
  25. package/dist/models/Filter.js +24 -0
  26. package/dist/models/Filter.js.map +1 -1
  27. package/dist/models/GenericError.d.ts +3 -2
  28. package/dist/models/GenericError.js +13 -1
  29. package/dist/models/GenericError.js.map +1 -1
  30. package/dist/models/InvalidIdentifierError.d.ts +1 -1
  31. package/dist/models/InvalidIdentifierError.js +2 -2
  32. package/dist/models/InvalidIdentifierError.js.map +1 -1
  33. package/dist/models/Notification.d.ts +14 -12
  34. package/dist/models/Notification.js +20 -20
  35. package/dist/models/Notification.js.map +1 -1
  36. package/dist/models/NotificationTarget.d.ts +4 -4
  37. package/dist/models/NotificationTarget.js +3 -9
  38. package/dist/models/NotificationTarget.js.map +1 -1
  39. package/dist/models/NotificationWithMeta.d.ts +14 -12
  40. package/dist/models/NotificationWithMeta.js +20 -20
  41. package/dist/models/NotificationWithMeta.js.map +1 -1
  42. package/dist/models/ObjectSerializer.d.ts +15 -32
  43. package/dist/models/ObjectSerializer.js +50 -102
  44. package/dist/models/ObjectSerializer.js.map +1 -1
  45. package/dist/models/Segment.d.ts +2 -2
  46. package/dist/models/Segment.js +1 -1
  47. package/dist/models/Segment.js.map +1 -1
  48. package/dist/models/TransferSubscriptionRequestBody.d.ts +1 -1
  49. package/dist/models/TransferSubscriptionRequestBody.js +1 -1
  50. package/dist/models/TransferSubscriptionRequestBody.js.map +1 -1
  51. package/dist/models/UpdateLiveActivityRequest.d.ts +8 -3
  52. package/dist/models/UpdateLiveActivityRequest.js +33 -3
  53. package/dist/models/UpdateLiveActivityRequest.js.map +1 -1
  54. package/dist/models/UpdateLiveActivitySuccessResponse.d.ts +1 -3
  55. package/dist/models/UpdateLiveActivitySuccessResponse.js +2 -8
  56. package/dist/models/UpdateLiveActivitySuccessResponse.js.map +1 -1
  57. package/dist/models/User.d.ts +3 -5
  58. package/dist/models/User.js +2 -8
  59. package/dist/models/User.js.map +1 -1
  60. package/dist/models/all.d.ts +15 -32
  61. package/dist/models/all.js +15 -32
  62. package/dist/models/all.js.map +1 -1
  63. package/dist/types/ObjectParamAPI.d.ts +52 -102
  64. package/dist/types/ObjectParamAPI.js +26 -47
  65. package/dist/types/ObjectParamAPI.js.map +1 -1
  66. package/dist/types/ObservableAPI.d.ts +25 -45
  67. package/dist/types/ObservableAPI.js +82 -250
  68. package/dist/types/ObservableAPI.js.map +1 -1
  69. package/dist/types/PromiseAPI.d.ts +25 -45
  70. package/dist/types/PromiseAPI.js +32 -60
  71. package/dist/types/PromiseAPI.js.map +1 -1
  72. package/models/App.ts +1 -1
  73. package/models/BasicNotification.ts +49 -46
  74. package/models/BasicNotificationAllOf.ts +34 -23
  75. package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
  76. package/models/Button.ts +1 -1
  77. package/models/CreateNotificationSuccessResponse.ts +5 -13
  78. package/models/CreateSegmentConflictResponse.ts +1 -1
  79. package/models/CreateSegmentSuccessResponse.ts +1 -1
  80. package/models/CreateUserConflictResponse.ts +1 -1
  81. package/models/CreateUserConflictResponseErrorsInner.ts +1 -1
  82. package/models/CreateUserConflictResponseErrorsItemsMeta.ts +1 -1
  83. package/models/DeliveryData.ts +1 -1
  84. package/models/ExportEventsSuccessResponse.ts +1 -1
  85. package/models/{ExportPlayersRequestBody.ts → ExportSubscriptionsRequestBody.ts} +3 -3
  86. package/models/{ExportPlayersSuccessResponse.ts → ExportSubscriptionsSuccessResponse.ts} +3 -3
  87. package/models/Filter.ts +45 -5
  88. package/models/FilterExpression.ts +120 -0
  89. package/models/GenericError.ts +17 -4
  90. package/models/GenericErrorErrorsInner.ts +1 -1
  91. package/models/{DeletePlayerSuccessResponse.ts → GenericSuccessBoolResponse.ts} +3 -3
  92. package/models/{GetNotificationRequestBody.ts → GetNotificationHistoryRequestBody.ts} +6 -6
  93. package/models/{PlayerSlice.ts → GetSegmentsSuccessResponse.ts} +20 -8
  94. package/models/InvalidIdentifierError.ts +6 -6
  95. package/models/{StringMap.ts → LanguageStringMap.ts} +3 -3
  96. package/models/Notification.ts +49 -46
  97. package/models/NotificationAllOf.ts +1 -1
  98. package/models/NotificationHistorySuccessResponse.ts +1 -1
  99. package/models/NotificationSlice.ts +1 -1
  100. package/models/NotificationTarget.ts +17 -25
  101. package/models/NotificationWithMeta.ts +49 -46
  102. package/models/NotificationWithMetaAllOf.ts +1 -1
  103. package/models/ObjectSerializer.ts +57 -109
  104. package/models/Operator.ts +1 -1
  105. package/models/OutcomeData.ts +1 -1
  106. package/models/OutcomesData.ts +1 -1
  107. package/models/PlatformDeliveryData.ts +1 -1
  108. package/models/PlatformDeliveryDataEmailAllOf.ts +1 -1
  109. package/models/PlatformDeliveryDataSmsAllOf.ts +1 -1
  110. package/models/{InlineResponse202.ts → PropertiesBody.ts} +3 -3
  111. package/models/PropertiesDeltas.ts +1 -1
  112. package/models/PropertiesObject.ts +1 -1
  113. package/models/Purchase.ts +1 -1
  114. package/models/{CreatePlayerSuccessResponse.ts → RateLimitError.ts} +10 -10
  115. package/models/RateLimiterError.ts +1 -1
  116. package/models/Segment.ts +4 -4
  117. package/models/SegmentData.ts +94 -0
  118. package/models/SegmentNotificationTarget.ts +1 -1
  119. package/models/{SubscriptionObject.ts → Subscription.ts} +6 -6
  120. package/models/{InlineResponse201.ts → SubscriptionBody.ts} +6 -6
  121. package/models/{PlayerNotificationTarget.ts → SubscriptionNotificationTarget.ts} +21 -29
  122. package/models/TransferSubscriptionRequestBody.ts +3 -3
  123. package/models/UpdateLiveActivityRequest.ts +56 -9
  124. package/models/UpdateLiveActivitySuccessResponse.ts +4 -12
  125. package/models/UpdateUserRequest.ts +1 -1
  126. package/models/User.ts +6 -14
  127. package/models/{InlineResponse200.ts → UserIdentityBody.ts} +5 -5
  128. package/models/{BeginLiveActivityRequest.ts → WebButton.ts} +23 -9
  129. package/models/all.ts +15 -32
  130. package/package.json +1 -1
  131. package/types/ObjectParamAPI.ts +161 -357
  132. package/types/ObservableAPI.ts +108 -301
  133. package/types/PromiseAPI.ts +89 -184
  134. package/models/CancelNotificationSuccessResponse.ts +0 -31
  135. package/models/CreateSubscriptionRequestBody.ts +0 -39
  136. package/models/DeletePlayerNotFoundResponse.ts +0 -31
  137. package/models/DeleteSegmentNotFoundResponse.ts +0 -31
  138. package/models/DeleteSegmentSuccessResponse.ts +0 -31
  139. package/models/FilterExpressions.ts +0 -80
  140. package/models/InlineResponse2003.ts +0 -31
  141. package/models/Notification200Errors.ts +0 -45
  142. package/models/Player.ts +0 -291
  143. package/models/PlayerNotificationTargetIncludeAliases.ts +0 -31
  144. package/models/UpdatePlayerSuccessResponse.ts +0 -31
  145. package/models/UpdatePlayerTagsRequestBody.ts +0 -34
  146. package/models/UpdatePlayerTagsSuccessResponse.ts +0 -31
  147. package/models/UpdateSubscriptionRequestBody.ts +0 -32
  148. package/models/UserIdentityRequestBody.ts +0 -31
  149. package/models/UserIdentityResponse.ts +0 -31
  150. 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,60 +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
 
98
75
  // Always add the One Signal telemetry to the request.
99
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
76
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
100
77
 
78
+ // Query Params
79
+ if (appId !== undefined) {
80
+ requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
81
+ }
101
82
 
102
- // Body Params
103
- const contentType = ObjectSerializer.getPreferredMediaType([
104
- "application/json"
105
- ]);
106
- requestContext.setHeaderParam("Content-Type", contentType);
107
- const serializedBody = ObjectSerializer.stringify(
108
- ObjectSerializer.serialize(beginLiveActivityRequest, "BeginLiveActivityRequest", ""),
109
- contentType
110
- );
111
- requestContext.setBody(serializedBody);
112
83
 
113
84
  let authMethod: SecurityAuthentication | undefined;
114
85
  // Apply auth methods
115
- authMethod = _config.authMethods["app_key"]
86
+ authMethod = _config.authMethods["rest_api_key"]
116
87
  if (authMethod?.applySecurityAuthentication) {
117
88
  await authMethod?.applySecurityAuthentication(requestContext);
118
89
  }
@@ -126,46 +97,67 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
126
97
  }
127
98
 
128
99
  /**
129
- * Used to stop a scheduled or currently outgoing notification
130
- * Stop a scheduled or currently outgoing notification
100
+ * Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
131
101
  * @param appId
132
- * @param notificationId
102
+ * @param aliasLabel
103
+ * @param aliasId
104
+ * @param userIdentityBody
133
105
  */
134
- 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> {
135
107
  let _config = _options || this.configuration;
136
108
 
137
109
  // verify required parameter 'appId' is not null or undefined
138
110
  if (appId === null || appId === undefined) {
139
- throw new RequiredError("DefaultApi", "cancelNotification", "appId");
111
+ throw new RequiredError("DefaultApi", "createAlias", "appId");
140
112
  }
141
113
 
142
114
 
143
- // verify required parameter 'notificationId' is not null or undefined
144
- if (notificationId === null || notificationId === undefined) {
145
- 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");
146
130
  }
147
131
 
148
132
 
149
133
  // Path Params
150
- const localVarPath = '/notifications/{notification_id}'
151
- .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)));
152
138
 
153
139
  // Make Request Context
154
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
140
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
155
141
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
156
142
 
157
143
  // Always add the One Signal telemetry to the request.
158
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
144
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
159
145
 
160
- // Query Params
161
- if (appId !== undefined) {
162
- requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
163
- }
164
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);
165
157
 
166
158
  let authMethod: SecurityAuthentication | undefined;
167
159
  // Apply auth methods
168
- authMethod = _config.authMethods["app_key"]
160
+ authMethod = _config.authMethods["rest_api_key"]
169
161
  if (authMethod?.applySecurityAuthentication) {
170
162
  await authMethod?.applySecurityAuthentication(requestContext);
171
163
  }
@@ -179,28 +171,43 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
179
171
  }
180
172
 
181
173
  /**
182
- * Creates a new OneSignal app
183
- * Create an app
184
- * @param app
174
+ * Upserts one or more Aliases for the User identified by :subscription_id.
175
+ * @param appId
176
+ * @param subscriptionId
177
+ * @param userIdentityBody
185
178
  */
186
- public async createApp(app: App, _options?: Configuration): Promise<RequestContext> {
179
+ public async createAliasBySubscription(appId: string, subscriptionId: string, userIdentityBody: UserIdentityBody, _options?: Configuration): Promise<RequestContext> {
187
180
  let _config = _options || this.configuration;
188
181
 
189
- // verify required parameter 'app' is not null or undefined
190
- if (app === null || app === undefined) {
191
- 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");
192
197
  }
193
198
 
194
199
 
195
200
  // Path Params
196
- 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)));
197
204
 
198
205
  // Make Request Context
199
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
206
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
200
207
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
201
208
 
202
209
  // Always add the One Signal telemetry to the request.
203
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
210
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
204
211
 
205
212
 
206
213
  // Body Params
@@ -209,14 +216,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
209
216
  ]);
210
217
  requestContext.setHeaderParam("Content-Type", contentType);
211
218
  const serializedBody = ObjectSerializer.stringify(
212
- ObjectSerializer.serialize(app, "App", ""),
219
+ ObjectSerializer.serialize(userIdentityBody, "UserIdentityBody", ""),
213
220
  contentType
214
221
  );
215
222
  requestContext.setBody(serializedBody);
216
223
 
217
224
  let authMethod: SecurityAuthentication | undefined;
218
225
  // Apply auth methods
219
- authMethod = _config.authMethods["user_key"]
226
+ authMethod = _config.authMethods["rest_api_key"]
220
227
  if (authMethod?.applySecurityAuthentication) {
221
228
  await authMethod?.applySecurityAuthentication(requestContext);
222
229
  }
@@ -230,28 +237,28 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
230
237
  }
231
238
 
232
239
  /**
233
- * Sends notifications to your users
234
- * Create notification
235
- * @param notification
240
+ * Creates a new OneSignal app
241
+ * Create an app
242
+ * @param app
236
243
  */
237
- public async createNotification(notification: Notification, _options?: Configuration): Promise<RequestContext> {
244
+ public async createApp(app: App, _options?: Configuration): Promise<RequestContext> {
238
245
  let _config = _options || this.configuration;
239
246
 
240
- // verify required parameter 'notification' is not null or undefined
241
- if (notification === null || notification === undefined) {
242
- 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");
243
250
  }
244
251
 
245
252
 
246
253
  // Path Params
247
- const localVarPath = '/notifications';
254
+ const localVarPath = '/apps';
248
255
 
249
256
  // Make Request Context
250
257
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
251
258
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
252
259
 
253
260
  // Always add the One Signal telemetry to the request.
254
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
261
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
255
262
 
256
263
 
257
264
  // Body Params
@@ -260,14 +267,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
260
267
  ]);
261
268
  requestContext.setHeaderParam("Content-Type", contentType);
262
269
  const serializedBody = ObjectSerializer.stringify(
263
- ObjectSerializer.serialize(notification, "Notification", ""),
270
+ ObjectSerializer.serialize(app, "App", ""),
264
271
  contentType
265
272
  );
266
273
  requestContext.setBody(serializedBody);
267
274
 
268
275
  let authMethod: SecurityAuthentication | undefined;
269
276
  // Apply auth methods
270
- authMethod = _config.authMethods["app_key"]
277
+ authMethod = _config.authMethods["user_auth_key"]
271
278
  if (authMethod?.applySecurityAuthentication) {
272
279
  await authMethod?.applySecurityAuthentication(requestContext);
273
280
  }
@@ -281,28 +288,28 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
281
288
  }
282
289
 
283
290
  /**
284
- * 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.
285
- * Add a device
286
- * @param player
291
+ * Sends notifications to your users
292
+ * Create notification
293
+ * @param notification
287
294
  */
288
- public async createPlayer(player: Player, _options?: Configuration): Promise<RequestContext> {
295
+ public async createNotification(notification: Notification, _options?: Configuration): Promise<RequestContext> {
289
296
  let _config = _options || this.configuration;
290
297
 
291
- // verify required parameter 'player' is not null or undefined
292
- if (player === null || player === undefined) {
293
- 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");
294
301
  }
295
302
 
296
303
 
297
304
  // Path Params
298
- const localVarPath = '/players';
305
+ const localVarPath = '/notifications';
299
306
 
300
307
  // Make Request Context
301
308
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
302
309
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
303
310
 
304
311
  // Always add the One Signal telemetry to the request.
305
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
312
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
306
313
 
307
314
 
308
315
  // Body Params
@@ -311,14 +318,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
311
318
  ]);
312
319
  requestContext.setHeaderParam("Content-Type", contentType);
313
320
  const serializedBody = ObjectSerializer.stringify(
314
- ObjectSerializer.serialize(player, "Player", ""),
321
+ ObjectSerializer.serialize(notification, "Notification", ""),
315
322
  contentType
316
323
  );
317
324
  requestContext.setBody(serializedBody);
318
325
 
319
326
  let authMethod: SecurityAuthentication | undefined;
320
327
  // Apply auth methods
321
- authMethod = _config.authMethods["app_key"]
328
+ authMethod = _config.authMethods["rest_api_key"]
322
329
  if (authMethod?.applySecurityAuthentication) {
323
330
  await authMethod?.applySecurityAuthentication(requestContext);
324
331
  }
@@ -332,17 +339,17 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
332
339
  }
333
340
 
334
341
  /**
335
- * 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.
336
- * 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
337
344
  * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
338
345
  * @param segment
339
346
  */
340
- public async createSegments(appId: string, segment?: Segment, _options?: Configuration): Promise<RequestContext> {
347
+ public async createSegment(appId: string, segment?: Segment, _options?: Configuration): Promise<RequestContext> {
341
348
  let _config = _options || this.configuration;
342
349
 
343
350
  // verify required parameter 'appId' is not null or undefined
344
351
  if (appId === null || appId === undefined) {
345
- throw new RequiredError("DefaultApi", "createSegments", "appId");
352
+ throw new RequiredError("DefaultApi", "createSegment", "appId");
346
353
  }
347
354
 
348
355
 
@@ -356,7 +363,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
356
363
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
357
364
 
358
365
  // Always add the One Signal telemetry to the request.
359
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
366
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
360
367
 
361
368
 
362
369
  // Body Params
@@ -372,7 +379,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
372
379
 
373
380
  let authMethod: SecurityAuthentication | undefined;
374
381
  // Apply auth methods
375
- authMethod = _config.authMethods["app_key"]
382
+ authMethod = _config.authMethods["rest_api_key"]
376
383
  if (authMethod?.applySecurityAuthentication) {
377
384
  await authMethod?.applySecurityAuthentication(requestContext);
378
385
  }
@@ -390,9 +397,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
390
397
  * @param appId
391
398
  * @param aliasLabel
392
399
  * @param aliasId
393
- * @param createSubscriptionRequestBody
400
+ * @param subscriptionBody
394
401
  */
395
- 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> {
396
403
  let _config = _options || this.configuration;
397
404
 
398
405
  // verify required parameter 'appId' is not null or undefined
@@ -413,9 +420,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
413
420
  }
414
421
 
415
422
 
416
- // verify required parameter 'createSubscriptionRequestBody' is not null or undefined
417
- if (createSubscriptionRequestBody === null || createSubscriptionRequestBody === undefined) {
418
- 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");
419
426
  }
420
427
 
421
428
 
@@ -430,7 +437,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
430
437
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
431
438
 
432
439
  // Always add the One Signal telemetry to the request.
433
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
440
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
434
441
 
435
442
 
436
443
  // Body Params
@@ -439,14 +446,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
439
446
  ]);
440
447
  requestContext.setHeaderParam("Content-Type", contentType);
441
448
  const serializedBody = ObjectSerializer.stringify(
442
- ObjectSerializer.serialize(createSubscriptionRequestBody, "CreateSubscriptionRequestBody", ""),
449
+ ObjectSerializer.serialize(subscriptionBody, "SubscriptionBody", ""),
443
450
  contentType
444
451
  );
445
452
  requestContext.setBody(serializedBody);
446
453
 
447
454
  let authMethod: SecurityAuthentication | undefined;
448
455
  // Apply auth methods
449
- authMethod = _config.authMethods["app_key"]
456
+ authMethod = _config.authMethods["rest_api_key"]
450
457
  if (authMethod?.applySecurityAuthentication) {
451
458
  await authMethod?.applySecurityAuthentication(requestContext);
452
459
  }
@@ -488,7 +495,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
488
495
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
489
496
 
490
497
  // Always add the One Signal telemetry to the request.
491
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
498
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
492
499
 
493
500
 
494
501
  // Body Params
@@ -504,7 +511,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
504
511
 
505
512
  let authMethod: SecurityAuthentication | undefined;
506
513
  // Apply auth methods
507
- authMethod = _config.authMethods["app_key"]
514
+ authMethod = _config.authMethods["rest_api_key"]
508
515
  if (authMethod?.applySecurityAuthentication) {
509
516
  await authMethod?.applySecurityAuthentication(requestContext);
510
517
  }
@@ -563,65 +570,12 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
563
570
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
564
571
 
565
572
  // Always add the One Signal telemetry to the request.
566
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
567
-
568
-
569
- let authMethod: SecurityAuthentication | undefined;
570
- // Apply auth methods
571
- authMethod = _config.authMethods["app_key"]
572
- if (authMethod?.applySecurityAuthentication) {
573
- await authMethod?.applySecurityAuthentication(requestContext);
574
- }
575
-
576
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
577
- if (defaultAuth?.applySecurityAuthentication) {
578
- await defaultAuth?.applySecurityAuthentication(requestContext);
579
- }
580
-
581
- return requestContext;
582
- }
583
-
584
- /**
585
- * Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
586
- * Delete a user record
587
- * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
588
- * @param playerId The OneSignal player_id
589
- */
590
- public async deletePlayer(appId: string, playerId: string, _options?: Configuration): Promise<RequestContext> {
591
- let _config = _options || this.configuration;
592
-
593
- // verify required parameter 'appId' is not null or undefined
594
- if (appId === null || appId === undefined) {
595
- throw new RequiredError("DefaultApi", "deletePlayer", "appId");
596
- }
597
-
598
-
599
- // verify required parameter 'playerId' is not null or undefined
600
- if (playerId === null || playerId === undefined) {
601
- throw new RequiredError("DefaultApi", "deletePlayer", "playerId");
602
- }
603
-
604
-
605
- // Path Params
606
- const localVarPath = '/players/{player_id}'
607
- .replace('{' + 'player_id' + '}', encodeURIComponent(String(playerId)));
608
-
609
- // Make Request Context
610
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
611
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
612
-
613
- // Always add the One Signal telemetry to the request.
614
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
615
-
616
- // Query Params
617
- if (appId !== undefined) {
618
- requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
619
- }
573
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
620
574
 
621
575
 
622
576
  let authMethod: SecurityAuthentication | undefined;
623
577
  // Apply auth methods
624
- authMethod = _config.authMethods["app_key"]
578
+ authMethod = _config.authMethods["rest_api_key"]
625
579
  if (authMethod?.applySecurityAuthentication) {
626
580
  await authMethod?.applySecurityAuthentication(requestContext);
627
581
  }
@@ -635,23 +589,23 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
635
589
  }
636
590
 
637
591
  /**
638
- * 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.
639
- * 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
640
594
  * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
641
595
  * @param segmentId The segment_id can be found in the URL of the segment when viewing it in the dashboard.
642
596
  */
643
- public async deleteSegments(appId: string, segmentId: string, _options?: Configuration): Promise<RequestContext> {
597
+ public async deleteSegment(appId: string, segmentId: string, _options?: Configuration): Promise<RequestContext> {
644
598
  let _config = _options || this.configuration;
645
599
 
646
600
  // verify required parameter 'appId' is not null or undefined
647
601
  if (appId === null || appId === undefined) {
648
- throw new RequiredError("DefaultApi", "deleteSegments", "appId");
602
+ throw new RequiredError("DefaultApi", "deleteSegment", "appId");
649
603
  }
650
604
 
651
605
 
652
606
  // verify required parameter 'segmentId' is not null or undefined
653
607
  if (segmentId === null || segmentId === undefined) {
654
- throw new RequiredError("DefaultApi", "deleteSegments", "segmentId");
608
+ throw new RequiredError("DefaultApi", "deleteSegment", "segmentId");
655
609
  }
656
610
 
657
611
 
@@ -665,12 +619,12 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
665
619
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
666
620
 
667
621
  // Always add the One Signal telemetry to the request.
668
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
622
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
669
623
 
670
624
 
671
625
  let authMethod: SecurityAuthentication | undefined;
672
626
  // Apply auth methods
673
- authMethod = _config.authMethods["app_key"]
627
+ authMethod = _config.authMethods["rest_api_key"]
674
628
  if (authMethod?.applySecurityAuthentication) {
675
629
  await authMethod?.applySecurityAuthentication(requestContext);
676
630
  }
@@ -713,12 +667,12 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
713
667
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
714
668
 
715
669
  // Always add the One Signal telemetry to the request.
716
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
670
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
717
671
 
718
672
 
719
673
  let authMethod: SecurityAuthentication | undefined;
720
674
  // Apply auth methods
721
- authMethod = _config.authMethods["app_key"]
675
+ authMethod = _config.authMethods["rest_api_key"]
722
676
  if (authMethod?.applySecurityAuthentication) {
723
677
  await authMethod?.applySecurityAuthentication(requestContext);
724
678
  }
@@ -769,69 +723,12 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
769
723
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
770
724
 
771
725
  // Always add the One Signal telemetry to the request.
772
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
773
-
774
-
775
- let authMethod: SecurityAuthentication | undefined;
776
- // Apply auth methods
777
- authMethod = _config.authMethods["app_key"]
778
- if (authMethod?.applySecurityAuthentication) {
779
- await authMethod?.applySecurityAuthentication(requestContext);
780
- }
781
-
782
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
783
- if (defaultAuth?.applySecurityAuthentication) {
784
- await defaultAuth?.applySecurityAuthentication(requestContext);
785
- }
786
-
787
- return requestContext;
788
- }
789
-
790
- /**
791
- * Stops a Live Activity
792
- * Stop Live Activity
793
- * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
794
- * @param activityId Live Activity record ID
795
- * @param subscriptionId Subscription ID
796
- */
797
- public async endLiveActivity(appId: string, activityId: string, subscriptionId: string, _options?: Configuration): Promise<RequestContext> {
798
- let _config = _options || this.configuration;
799
-
800
- // verify required parameter 'appId' is not null or undefined
801
- if (appId === null || appId === undefined) {
802
- throw new RequiredError("DefaultApi", "endLiveActivity", "appId");
803
- }
804
-
805
-
806
- // verify required parameter 'activityId' is not null or undefined
807
- if (activityId === null || activityId === undefined) {
808
- throw new RequiredError("DefaultApi", "endLiveActivity", "activityId");
809
- }
810
-
811
-
812
- // verify required parameter 'subscriptionId' is not null or undefined
813
- if (subscriptionId === null || subscriptionId === undefined) {
814
- throw new RequiredError("DefaultApi", "endLiveActivity", "subscriptionId");
815
- }
816
-
817
-
818
- // Path Params
819
- const localVarPath = '/apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}'
820
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
821
- .replace('{' + 'activity_id' + '}', encodeURIComponent(String(activityId)))
822
- .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
823
-
824
- // Make Request Context
825
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
826
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
827
-
828
- // Always add the One Signal telemetry to the request.
829
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
726
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
830
727
 
831
728
 
832
729
  let authMethod: SecurityAuthentication | undefined;
833
730
  // Apply auth methods
834
- authMethod = _config.authMethods["app_key"]
731
+ authMethod = _config.authMethods["rest_api_key"]
835
732
  if (authMethod?.applySecurityAuthentication) {
836
733
  await authMethod?.applySecurityAuthentication(requestContext);
837
734
  }
@@ -874,7 +771,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
874
771
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
875
772
 
876
773
  // Always add the One Signal telemetry to the request.
877
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
774
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
878
775
 
879
776
  // Query Params
880
777
  if (appId !== undefined) {
@@ -884,7 +781,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
884
781
 
885
782
  let authMethod: SecurityAuthentication | undefined;
886
783
  // Apply auth methods
887
- authMethod = _config.authMethods["app_key"]
784
+ authMethod = _config.authMethods["rest_api_key"]
888
785
  if (authMethod?.applySecurityAuthentication) {
889
786
  await authMethod?.applySecurityAuthentication(requestContext);
890
787
  }
@@ -899,16 +796,16 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
899
796
 
900
797
  /**
901
798
  * 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. |
902
- * Export CSV of Players
799
+ * Export CSV of Subscriptions
903
800
  * @param appId The app ID that you want to export devices from
904
- * @param exportPlayersRequestBody
801
+ * @param exportSubscriptionsRequestBody
905
802
  */
906
- public async exportPlayers(appId: string, exportPlayersRequestBody?: ExportPlayersRequestBody, _options?: Configuration): Promise<RequestContext> {
803
+ public async exportSubscriptions(appId: string, exportSubscriptionsRequestBody?: ExportSubscriptionsRequestBody, _options?: Configuration): Promise<RequestContext> {
907
804
  let _config = _options || this.configuration;
908
805
 
909
806
  // verify required parameter 'appId' is not null or undefined
910
807
  if (appId === null || appId === undefined) {
911
- throw new RequiredError("DefaultApi", "exportPlayers", "appId");
808
+ throw new RequiredError("DefaultApi", "exportSubscriptions", "appId");
912
809
  }
913
810
 
914
811
 
@@ -922,7 +819,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
922
819
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
923
820
 
924
821
  // Always add the One Signal telemetry to the request.
925
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
822
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
926
823
 
927
824
 
928
825
  // Body Params
@@ -931,14 +828,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
931
828
  ]);
932
829
  requestContext.setHeaderParam("Content-Type", contentType);
933
830
  const serializedBody = ObjectSerializer.stringify(
934
- ObjectSerializer.serialize(exportPlayersRequestBody, "ExportPlayersRequestBody", ""),
831
+ ObjectSerializer.serialize(exportSubscriptionsRequestBody, "ExportSubscriptionsRequestBody", ""),
935
832
  contentType
936
833
  );
937
834
  requestContext.setBody(serializedBody);
938
835
 
939
836
  let authMethod: SecurityAuthentication | undefined;
940
837
  // Apply auth methods
941
- authMethod = _config.authMethods["app_key"]
838
+ authMethod = _config.authMethods["rest_api_key"]
942
839
  if (authMethod?.applySecurityAuthentication) {
943
840
  await authMethod?.applySecurityAuthentication(requestContext);
944
841
  }
@@ -952,41 +849,49 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
952
849
  }
953
850
 
954
851
  /**
955
- * Lists all Aliases for the User identified by :subscription_id.
852
+ * Lists all Aliases for the User identified by (:alias_label, :alias_id).
956
853
  * @param appId
957
- * @param subscriptionId
854
+ * @param aliasLabel
855
+ * @param aliasId
958
856
  */
959
- public async fetchAliases(appId: string, subscriptionId: string, _options?: Configuration): Promise<RequestContext> {
857
+ public async getAliases(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<RequestContext> {
960
858
  let _config = _options || this.configuration;
961
859
 
962
860
  // verify required parameter 'appId' is not null or undefined
963
861
  if (appId === null || appId === undefined) {
964
- throw new RequiredError("DefaultApi", "fetchAliases", "appId");
862
+ throw new RequiredError("DefaultApi", "getAliases", "appId");
965
863
  }
966
864
 
967
865
 
968
- // verify required parameter 'subscriptionId' is not null or undefined
969
- if (subscriptionId === null || subscriptionId === undefined) {
970
- throw new RequiredError("DefaultApi", "fetchAliases", "subscriptionId");
866
+ // verify required parameter 'aliasLabel' is not null or undefined
867
+ if (aliasLabel === null || aliasLabel === undefined) {
868
+ throw new RequiredError("DefaultApi", "getAliases", "aliasLabel");
869
+ }
870
+
871
+
872
+ // verify required parameter 'aliasId' is not null or undefined
873
+ if (aliasId === null || aliasId === undefined) {
874
+ throw new RequiredError("DefaultApi", "getAliases", "aliasId");
971
875
  }
972
876
 
973
877
 
974
878
  // Path Params
975
- const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/user/identity'
879
+ const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity'
976
880
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
977
- .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
881
+ .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
882
+ .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
978
883
 
979
884
  // Make Request Context
980
885
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
981
886
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
982
887
 
983
888
  // Always add the One Signal telemetry to the request.
984
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
889
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
985
890
 
986
891
 
987
892
  let authMethod: SecurityAuthentication | undefined;
988
893
  // Apply auth methods
989
- authMethod = _config.authMethods["app_key"]
894
+ authMethod = _config.authMethods["rest_api_key"]
990
895
  if (authMethod?.applySecurityAuthentication) {
991
896
  await authMethod?.applySecurityAuthentication(requestContext);
992
897
  }
@@ -1000,105 +905,41 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1000
905
  }
1001
906
 
1002
907
  /**
1003
- * Returns the User’s properties, Aliases, and Subscriptions.
908
+ * Lists all Aliases for the User identified by :subscription_id.
1004
909
  * @param appId
1005
- * @param aliasLabel
1006
- * @param aliasId
910
+ * @param subscriptionId
1007
911
  */
1008
- public async fetchUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<RequestContext> {
912
+ public async getAliasesBySubscription(appId: string, subscriptionId: string, _options?: Configuration): Promise<RequestContext> {
1009
913
  let _config = _options || this.configuration;
1010
914
 
1011
915
  // verify required parameter 'appId' is not null or undefined
1012
916
  if (appId === null || appId === undefined) {
1013
- throw new RequiredError("DefaultApi", "fetchUser", "appId");
1014
- }
1015
-
1016
-
1017
- // verify required parameter 'aliasLabel' is not null or undefined
1018
- if (aliasLabel === null || aliasLabel === undefined) {
1019
- throw new RequiredError("DefaultApi", "fetchUser", "aliasLabel");
917
+ throw new RequiredError("DefaultApi", "getAliasesBySubscription", "appId");
1020
918
  }
1021
919
 
1022
920
 
1023
- // verify required parameter 'aliasId' is not null or undefined
1024
- if (aliasId === null || aliasId === undefined) {
1025
- throw new RequiredError("DefaultApi", "fetchUser", "aliasId");
921
+ // verify required parameter 'subscriptionId' is not null or undefined
922
+ if (subscriptionId === null || subscriptionId === undefined) {
923
+ throw new RequiredError("DefaultApi", "getAliasesBySubscription", "subscriptionId");
1026
924
  }
1027
925
 
1028
926
 
1029
927
  // Path Params
1030
- const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}'
928
+ const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/user/identity'
1031
929
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1032
- .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
1033
- .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
930
+ .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
1034
931
 
1035
932
  // Make Request Context
1036
933
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1037
934
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1038
935
 
1039
936
  // Always add the One Signal telemetry to the request.
1040
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
937
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
1041
938
 
1042
939
 
1043
940
  let authMethod: SecurityAuthentication | undefined;
1044
941
  // Apply auth methods
1045
- authMethod = _config.authMethods["app_key"]
1046
- if (authMethod?.applySecurityAuthentication) {
1047
- await authMethod?.applySecurityAuthentication(requestContext);
1048
- }
1049
-
1050
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1051
- if (defaultAuth?.applySecurityAuthentication) {
1052
- await defaultAuth?.applySecurityAuthentication(requestContext);
1053
- }
1054
-
1055
- return requestContext;
1056
- }
1057
-
1058
- /**
1059
- * Lists all Aliases for the User identified by (:alias_label, :alias_id).
1060
- * @param appId
1061
- * @param aliasLabel
1062
- * @param aliasId
1063
- */
1064
- public async fetchUserIdentity(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<RequestContext> {
1065
- let _config = _options || this.configuration;
1066
-
1067
- // verify required parameter 'appId' is not null or undefined
1068
- if (appId === null || appId === undefined) {
1069
- throw new RequiredError("DefaultApi", "fetchUserIdentity", "appId");
1070
- }
1071
-
1072
-
1073
- // verify required parameter 'aliasLabel' is not null or undefined
1074
- if (aliasLabel === null || aliasLabel === undefined) {
1075
- throw new RequiredError("DefaultApi", "fetchUserIdentity", "aliasLabel");
1076
- }
1077
-
1078
-
1079
- // verify required parameter 'aliasId' is not null or undefined
1080
- if (aliasId === null || aliasId === undefined) {
1081
- throw new RequiredError("DefaultApi", "fetchUserIdentity", "aliasId");
1082
- }
1083
-
1084
-
1085
- // Path Params
1086
- const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity'
1087
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1088
- .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
1089
- .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
1090
-
1091
- // Make Request Context
1092
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1093
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1094
-
1095
- // Always add the One Signal telemetry to the request.
1096
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1097
-
1098
-
1099
- let authMethod: SecurityAuthentication | undefined;
1100
- // Apply auth methods
1101
- authMethod = _config.authMethods["app_key"]
942
+ authMethod = _config.authMethods["rest_api_key"]
1102
943
  if (authMethod?.applySecurityAuthentication) {
1103
944
  await authMethod?.applySecurityAuthentication(requestContext);
1104
945
  }
@@ -1134,12 +975,12 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1134
975
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1135
976
 
1136
977
  // Always add the One Signal telemetry to the request.
1137
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
978
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
1138
979
 
1139
980
 
1140
981
  let authMethod: SecurityAuthentication | undefined;
1141
982
  // Apply auth methods
1142
- authMethod = _config.authMethods["user_key"]
983
+ authMethod = _config.authMethods["user_auth_key"]
1143
984
  if (authMethod?.applySecurityAuthentication) {
1144
985
  await authMethod?.applySecurityAuthentication(requestContext);
1145
986
  }
@@ -1167,60 +1008,12 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1167
1008
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1168
1009
 
1169
1010
  // Always add the One Signal telemetry to the request.
1170
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1171
-
1172
-
1173
- let authMethod: SecurityAuthentication | undefined;
1174
- // Apply auth methods
1175
- authMethod = _config.authMethods["user_key"]
1176
- if (authMethod?.applySecurityAuthentication) {
1177
- await authMethod?.applySecurityAuthentication(requestContext);
1178
- }
1179
-
1180
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1181
- if (defaultAuth?.applySecurityAuthentication) {
1182
- await defaultAuth?.applySecurityAuthentication(requestContext);
1183
- }
1184
-
1185
- return requestContext;
1186
- }
1187
-
1188
- /**
1189
- * Manifest of In-App Messages the Subscription is eligible to display by the SDK.
1190
- * @param appId
1191
- * @param subscriptionId
1192
- */
1193
- public async getEligibleIams(appId: string, subscriptionId: string, _options?: Configuration): Promise<RequestContext> {
1194
- let _config = _options || this.configuration;
1195
-
1196
- // verify required parameter 'appId' is not null or undefined
1197
- if (appId === null || appId === undefined) {
1198
- throw new RequiredError("DefaultApi", "getEligibleIams", "appId");
1199
- }
1200
-
1201
-
1202
- // verify required parameter 'subscriptionId' is not null or undefined
1203
- if (subscriptionId === null || subscriptionId === undefined) {
1204
- throw new RequiredError("DefaultApi", "getEligibleIams", "subscriptionId");
1205
- }
1206
-
1207
-
1208
- // Path Params
1209
- const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/iams'
1210
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1211
- .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
1212
-
1213
- // Make Request Context
1214
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1215
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1216
-
1217
- // Always add the One Signal telemetry to the request.
1218
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1011
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
1219
1012
 
1220
1013
 
1221
1014
  let authMethod: SecurityAuthentication | undefined;
1222
1015
  // Apply auth methods
1223
- authMethod = _config.authMethods["app_key"]
1016
+ authMethod = _config.authMethods["user_auth_key"]
1224
1017
  if (authMethod?.applySecurityAuthentication) {
1225
1018
  await authMethod?.applySecurityAuthentication(requestContext);
1226
1019
  }
@@ -1263,7 +1056,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1263
1056
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1264
1057
 
1265
1058
  // Always add the One Signal telemetry to the request.
1266
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1059
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
1267
1060
 
1268
1061
  // Query Params
1269
1062
  if (appId !== undefined) {
@@ -1273,7 +1066,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1273
1066
 
1274
1067
  let authMethod: SecurityAuthentication | undefined;
1275
1068
  // Apply auth methods
1276
- authMethod = _config.authMethods["app_key"]
1069
+ authMethod = _config.authMethods["rest_api_key"]
1277
1070
  if (authMethod?.applySecurityAuthentication) {
1278
1071
  await authMethod?.applySecurityAuthentication(requestContext);
1279
1072
  }
@@ -1290,9 +1083,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1290
1083
  * -> 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.
1291
1084
  * Notification History
1292
1085
  * @param notificationId The \&quot;id\&quot; of the message found in the Notification object
1293
- * @param getNotificationRequestBody
1086
+ * @param getNotificationHistoryRequestBody
1294
1087
  */
1295
- public async getNotificationHistory(notificationId: string, getNotificationRequestBody: GetNotificationRequestBody, _options?: Configuration): Promise<RequestContext> {
1088
+ public async getNotificationHistory(notificationId: string, getNotificationHistoryRequestBody: GetNotificationHistoryRequestBody, _options?: Configuration): Promise<RequestContext> {
1296
1089
  let _config = _options || this.configuration;
1297
1090
 
1298
1091
  // verify required parameter 'notificationId' is not null or undefined
@@ -1301,9 +1094,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1301
1094
  }
1302
1095
 
1303
1096
 
1304
- // verify required parameter 'getNotificationRequestBody' is not null or undefined
1305
- if (getNotificationRequestBody === null || getNotificationRequestBody === undefined) {
1306
- throw new RequiredError("DefaultApi", "getNotificationHistory", "getNotificationRequestBody");
1097
+ // verify required parameter 'getNotificationHistoryRequestBody' is not null or undefined
1098
+ if (getNotificationHistoryRequestBody === null || getNotificationHistoryRequestBody === undefined) {
1099
+ throw new RequiredError("DefaultApi", "getNotificationHistory", "getNotificationHistoryRequestBody");
1307
1100
  }
1308
1101
 
1309
1102
 
@@ -1316,7 +1109,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1316
1109
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1317
1110
 
1318
1111
  // Always add the One Signal telemetry to the request.
1319
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1112
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
1320
1113
 
1321
1114
 
1322
1115
  // Body Params
@@ -1325,14 +1118,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1325
1118
  ]);
1326
1119
  requestContext.setHeaderParam("Content-Type", contentType);
1327
1120
  const serializedBody = ObjectSerializer.stringify(
1328
- ObjectSerializer.serialize(getNotificationRequestBody, "GetNotificationRequestBody", ""),
1121
+ ObjectSerializer.serialize(getNotificationHistoryRequestBody, "GetNotificationHistoryRequestBody", ""),
1329
1122
  contentType
1330
1123
  );
1331
1124
  requestContext.setBody(serializedBody);
1332
1125
 
1333
1126
  let authMethod: SecurityAuthentication | undefined;
1334
1127
  // Apply auth methods
1335
- authMethod = _config.authMethods["app_key"]
1128
+ authMethod = _config.authMethods["rest_api_key"]
1336
1129
  if (authMethod?.applySecurityAuthentication) {
1337
1130
  await authMethod?.applySecurityAuthentication(requestContext);
1338
1131
  }
@@ -1373,7 +1166,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1373
1166
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1374
1167
 
1375
1168
  // Always add the One Signal telemetry to the request.
1376
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1169
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
1377
1170
 
1378
1171
  // Query Params
1379
1172
  if (appId !== undefined) {
@@ -1398,7 +1191,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1398
1191
 
1399
1192
  let authMethod: SecurityAuthentication | undefined;
1400
1193
  // Apply auth methods
1401
- authMethod = _config.authMethods["app_key"]
1194
+ authMethod = _config.authMethods["rest_api_key"]
1402
1195
  if (authMethod?.applySecurityAuthentication) {
1403
1196
  await authMethod?.applySecurityAuthentication(requestContext);
1404
1197
  }
@@ -1449,7 +1242,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1449
1242
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1450
1243
 
1451
1244
  // Always add the One Signal telemetry to the request.
1452
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1245
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
1453
1246
 
1454
1247
  // Query Params
1455
1248
  if (outcomeNames !== undefined) {
@@ -1479,67 +1272,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1479
1272
 
1480
1273
  let authMethod: SecurityAuthentication | undefined;
1481
1274
  // Apply auth methods
1482
- authMethod = _config.authMethods["app_key"]
1483
- if (authMethod?.applySecurityAuthentication) {
1484
- await authMethod?.applySecurityAuthentication(requestContext);
1485
- }
1486
-
1487
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
1488
- if (defaultAuth?.applySecurityAuthentication) {
1489
- await defaultAuth?.applySecurityAuthentication(requestContext);
1490
- }
1491
-
1492
- return requestContext;
1493
- }
1494
-
1495
- /**
1496
- * View the details of an existing device in one of your OneSignal apps
1497
- * View device
1498
- * @param appId Your app_id for this device
1499
- * @param playerId Player\&#39;s OneSignal ID
1500
- * @param emailAuthHash Email - Only required if you have enabled Identity Verification and device_type is email (11).
1501
- */
1502
- public async getPlayer(appId: string, playerId: string, emailAuthHash?: string, _options?: Configuration): Promise<RequestContext> {
1503
- let _config = _options || this.configuration;
1504
-
1505
- // verify required parameter 'appId' is not null or undefined
1506
- if (appId === null || appId === undefined) {
1507
- throw new RequiredError("DefaultApi", "getPlayer", "appId");
1508
- }
1509
-
1510
-
1511
- // verify required parameter 'playerId' is not null or undefined
1512
- if (playerId === null || playerId === undefined) {
1513
- throw new RequiredError("DefaultApi", "getPlayer", "playerId");
1514
- }
1515
-
1516
-
1517
-
1518
- // Path Params
1519
- const localVarPath = '/players/{player_id}'
1520
- .replace('{' + 'player_id' + '}', encodeURIComponent(String(playerId)));
1521
-
1522
- // Make Request Context
1523
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1524
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1525
-
1526
- // Always add the One Signal telemetry to the request.
1527
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1528
-
1529
- // Query Params
1530
- if (appId !== undefined) {
1531
- requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
1532
- }
1533
-
1534
- // Query Params
1535
- if (emailAuthHash !== undefined) {
1536
- requestContext.setQueryParam("email_auth_hash", ObjectSerializer.serialize(emailAuthHash, "string", ""));
1537
- }
1538
-
1539
-
1540
- let authMethod: SecurityAuthentication | undefined;
1541
- // Apply auth methods
1542
- authMethod = _config.authMethods["app_key"]
1275
+ authMethod = _config.authMethods["rest_api_key"]
1543
1276
  if (authMethod?.applySecurityAuthentication) {
1544
1277
  await authMethod?.applySecurityAuthentication(requestContext);
1545
1278
  }
@@ -1553,36 +1286,37 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1553
1286
  }
1554
1287
 
1555
1288
  /**
1556
- * 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.
1557
- * View devices
1558
- * @param appId The app ID that you want to view players from
1559
- * @param limit How many devices to return. Max is 300. Default is 300
1560
- * @param offset Result offset. Default is 0. Results are sorted by id;
1289
+ * Returns an array of segments from an app.
1290
+ * Get Segments
1291
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
1292
+ * @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.
1293
+ * @param limit The amount of Segments in the response. Maximum 300.
1561
1294
  */
1562
- public async getPlayers(appId: string, limit?: number, offset?: number, _options?: Configuration): Promise<RequestContext> {
1295
+ public async getSegments(appId: string, offset?: number, limit?: number, _options?: Configuration): Promise<RequestContext> {
1563
1296
  let _config = _options || this.configuration;
1564
1297
 
1565
1298
  // verify required parameter 'appId' is not null or undefined
1566
1299
  if (appId === null || appId === undefined) {
1567
- throw new RequiredError("DefaultApi", "getPlayers", "appId");
1300
+ throw new RequiredError("DefaultApi", "getSegments", "appId");
1568
1301
  }
1569
1302
 
1570
1303
 
1571
1304
 
1572
1305
 
1573
1306
  // Path Params
1574
- const localVarPath = '/players';
1307
+ const localVarPath = '/apps/{app_id}/segments'
1308
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
1575
1309
 
1576
1310
  // Make Request Context
1577
1311
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1578
1312
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1579
1313
 
1580
1314
  // Always add the One Signal telemetry to the request.
1581
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1315
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
1582
1316
 
1583
1317
  // Query Params
1584
- if (appId !== undefined) {
1585
- requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
1318
+ if (offset !== undefined) {
1319
+ requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", ""));
1586
1320
  }
1587
1321
 
1588
1322
  // Query Params
@@ -1590,15 +1324,10 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1590
1324
  requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", ""));
1591
1325
  }
1592
1326
 
1593
- // Query Params
1594
- if (offset !== undefined) {
1595
- requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", ""));
1596
- }
1597
-
1598
1327
 
1599
1328
  let authMethod: SecurityAuthentication | undefined;
1600
1329
  // Apply auth methods
1601
- authMethod = _config.authMethods["app_key"]
1330
+ authMethod = _config.authMethods["rest_api_key"]
1602
1331
  if (authMethod?.applySecurityAuthentication) {
1603
1332
  await authMethod?.applySecurityAuthentication(requestContext);
1604
1333
  }
@@ -1612,67 +1341,49 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1612
1341
  }
1613
1342
 
1614
1343
  /**
1615
- * Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
1344
+ * Returns the User’s properties, Aliases, and Subscriptions.
1616
1345
  * @param appId
1617
1346
  * @param aliasLabel
1618
1347
  * @param aliasId
1619
- * @param userIdentityRequestBody
1620
1348
  */
1621
- public async identifyUserByAlias(appId: string, aliasLabel: string, aliasId: string, userIdentityRequestBody: UserIdentityRequestBody, _options?: Configuration): Promise<RequestContext> {
1349
+ public async getUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<RequestContext> {
1622
1350
  let _config = _options || this.configuration;
1623
1351
 
1624
1352
  // verify required parameter 'appId' is not null or undefined
1625
1353
  if (appId === null || appId === undefined) {
1626
- throw new RequiredError("DefaultApi", "identifyUserByAlias", "appId");
1354
+ throw new RequiredError("DefaultApi", "getUser", "appId");
1627
1355
  }
1628
1356
 
1629
1357
 
1630
1358
  // verify required parameter 'aliasLabel' is not null or undefined
1631
1359
  if (aliasLabel === null || aliasLabel === undefined) {
1632
- throw new RequiredError("DefaultApi", "identifyUserByAlias", "aliasLabel");
1360
+ throw new RequiredError("DefaultApi", "getUser", "aliasLabel");
1633
1361
  }
1634
1362
 
1635
1363
 
1636
1364
  // verify required parameter 'aliasId' is not null or undefined
1637
1365
  if (aliasId === null || aliasId === undefined) {
1638
- throw new RequiredError("DefaultApi", "identifyUserByAlias", "aliasId");
1639
- }
1640
-
1641
-
1642
- // verify required parameter 'userIdentityRequestBody' is not null or undefined
1643
- if (userIdentityRequestBody === null || userIdentityRequestBody === undefined) {
1644
- throw new RequiredError("DefaultApi", "identifyUserByAlias", "userIdentityRequestBody");
1366
+ throw new RequiredError("DefaultApi", "getUser", "aliasId");
1645
1367
  }
1646
1368
 
1647
1369
 
1648
1370
  // Path Params
1649
- const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity'
1371
+ const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}'
1650
1372
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1651
1373
  .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
1652
1374
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
1653
1375
 
1654
1376
  // Make Request Context
1655
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
1377
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
1656
1378
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1657
1379
 
1658
1380
  // Always add the One Signal telemetry to the request.
1659
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1381
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
1660
1382
 
1661
1383
 
1662
- // Body Params
1663
- const contentType = ObjectSerializer.getPreferredMediaType([
1664
- "application/json"
1665
- ]);
1666
- requestContext.setHeaderParam("Content-Type", contentType);
1667
- const serializedBody = ObjectSerializer.stringify(
1668
- ObjectSerializer.serialize(userIdentityRequestBody, "UserIdentityRequestBody", ""),
1669
- contentType
1670
- );
1671
- requestContext.setBody(serializedBody);
1672
-
1673
1384
  let authMethod: SecurityAuthentication | undefined;
1674
1385
  // Apply auth methods
1675
- authMethod = _config.authMethods["app_key"]
1386
+ authMethod = _config.authMethods["rest_api_key"]
1676
1387
  if (authMethod?.applySecurityAuthentication) {
1677
1388
  await authMethod?.applySecurityAuthentication(requestContext);
1678
1389
  }
@@ -1686,34 +1397,34 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1686
1397
  }
1687
1398
 
1688
1399
  /**
1689
- * Upserts one or more Aliases for the User identified by :subscription_id.
1400
+ * Transfers this Subscription to the User identified by the identity in the payload.
1690
1401
  * @param appId
1691
1402
  * @param subscriptionId
1692
- * @param userIdentityRequestBody
1403
+ * @param transferSubscriptionRequestBody
1693
1404
  */
1694
- public async identifyUserBySubscriptionId(appId: string, subscriptionId: string, userIdentityRequestBody: UserIdentityRequestBody, _options?: Configuration): Promise<RequestContext> {
1405
+ public async transferSubscription(appId: string, subscriptionId: string, transferSubscriptionRequestBody: TransferSubscriptionRequestBody, _options?: Configuration): Promise<RequestContext> {
1695
1406
  let _config = _options || this.configuration;
1696
1407
 
1697
1408
  // verify required parameter 'appId' is not null or undefined
1698
1409
  if (appId === null || appId === undefined) {
1699
- throw new RequiredError("DefaultApi", "identifyUserBySubscriptionId", "appId");
1410
+ throw new RequiredError("DefaultApi", "transferSubscription", "appId");
1700
1411
  }
1701
1412
 
1702
1413
 
1703
1414
  // verify required parameter 'subscriptionId' is not null or undefined
1704
1415
  if (subscriptionId === null || subscriptionId === undefined) {
1705
- throw new RequiredError("DefaultApi", "identifyUserBySubscriptionId", "subscriptionId");
1416
+ throw new RequiredError("DefaultApi", "transferSubscription", "subscriptionId");
1706
1417
  }
1707
1418
 
1708
1419
 
1709
- // verify required parameter 'userIdentityRequestBody' is not null or undefined
1710
- if (userIdentityRequestBody === null || userIdentityRequestBody === undefined) {
1711
- throw new RequiredError("DefaultApi", "identifyUserBySubscriptionId", "userIdentityRequestBody");
1420
+ // verify required parameter 'transferSubscriptionRequestBody' is not null or undefined
1421
+ if (transferSubscriptionRequestBody === null || transferSubscriptionRequestBody === undefined) {
1422
+ throw new RequiredError("DefaultApi", "transferSubscription", "transferSubscriptionRequestBody");
1712
1423
  }
1713
1424
 
1714
1425
 
1715
1426
  // Path Params
1716
- const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/user/identity'
1427
+ const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/owner'
1717
1428
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1718
1429
  .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
1719
1430
 
@@ -1722,7 +1433,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1722
1433
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1723
1434
 
1724
1435
  // Always add the One Signal telemetry to the request.
1725
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1436
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
1726
1437
 
1727
1438
 
1728
1439
  // Body Params
@@ -1731,14 +1442,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1731
1442
  ]);
1732
1443
  requestContext.setHeaderParam("Content-Type", contentType);
1733
1444
  const serializedBody = ObjectSerializer.stringify(
1734
- ObjectSerializer.serialize(userIdentityRequestBody, "UserIdentityRequestBody", ""),
1445
+ ObjectSerializer.serialize(transferSubscriptionRequestBody, "TransferSubscriptionRequestBody", ""),
1735
1446
  contentType
1736
1447
  );
1737
1448
  requestContext.setBody(serializedBody);
1738
1449
 
1739
1450
  let authMethod: SecurityAuthentication | undefined;
1740
1451
  // Apply auth methods
1741
- authMethod = _config.authMethods["app_key"]
1452
+ authMethod = _config.authMethods["rest_api_key"]
1742
1453
  if (authMethod?.applySecurityAuthentication) {
1743
1454
  await authMethod?.applySecurityAuthentication(requestContext);
1744
1455
  }
@@ -1752,59 +1463,54 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1752
1463
  }
1753
1464
 
1754
1465
  /**
1755
- * Transfers this Subscription to the User identified by the identity in the payload.
1756
- * @param appId
1757
- * @param subscriptionId
1758
- * @param transferSubscriptionRequestBody
1466
+ * Unsubscribe an email with a token when using your own custom email unsubscribe landing page
1467
+ * Unsubscribe with token
1468
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
1469
+ * @param notificationId The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report.
1470
+ * @param token The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email.
1759
1471
  */
1760
- public async transferSubscription(appId: string, subscriptionId: string, transferSubscriptionRequestBody: TransferSubscriptionRequestBody, _options?: Configuration): Promise<RequestContext> {
1472
+ public async unsubscribeEmailWithToken(appId: string, notificationId: string, token: string, _options?: Configuration): Promise<RequestContext> {
1761
1473
  let _config = _options || this.configuration;
1762
1474
 
1763
1475
  // verify required parameter 'appId' is not null or undefined
1764
1476
  if (appId === null || appId === undefined) {
1765
- throw new RequiredError("DefaultApi", "transferSubscription", "appId");
1477
+ throw new RequiredError("DefaultApi", "unsubscribeEmailWithToken", "appId");
1766
1478
  }
1767
1479
 
1768
1480
 
1769
- // verify required parameter 'subscriptionId' is not null or undefined
1770
- if (subscriptionId === null || subscriptionId === undefined) {
1771
- throw new RequiredError("DefaultApi", "transferSubscription", "subscriptionId");
1481
+ // verify required parameter 'notificationId' is not null or undefined
1482
+ if (notificationId === null || notificationId === undefined) {
1483
+ throw new RequiredError("DefaultApi", "unsubscribeEmailWithToken", "notificationId");
1772
1484
  }
1773
1485
 
1774
1486
 
1775
- // verify required parameter 'transferSubscriptionRequestBody' is not null or undefined
1776
- if (transferSubscriptionRequestBody === null || transferSubscriptionRequestBody === undefined) {
1777
- throw new RequiredError("DefaultApi", "transferSubscription", "transferSubscriptionRequestBody");
1487
+ // verify required parameter 'token' is not null or undefined
1488
+ if (token === null || token === undefined) {
1489
+ throw new RequiredError("DefaultApi", "unsubscribeEmailWithToken", "token");
1778
1490
  }
1779
1491
 
1780
1492
 
1781
1493
  // Path Params
1782
- const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/owner'
1494
+ const localVarPath = '/apps/{app_id}/notifications/{notification_id}/unsubscribe'
1783
1495
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1784
- .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
1496
+ .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
1785
1497
 
1786
1498
  // Make Request Context
1787
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
1499
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
1788
1500
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1789
1501
 
1790
1502
  // Always add the One Signal telemetry to the request.
1791
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1503
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
1792
1504
 
1505
+ // Query Params
1506
+ if (token !== undefined) {
1507
+ requestContext.setQueryParam("token", ObjectSerializer.serialize(token, "string", ""));
1508
+ }
1793
1509
 
1794
- // Body Params
1795
- const contentType = ObjectSerializer.getPreferredMediaType([
1796
- "application/json"
1797
- ]);
1798
- requestContext.setHeaderParam("Content-Type", contentType);
1799
- const serializedBody = ObjectSerializer.stringify(
1800
- ObjectSerializer.serialize(transferSubscriptionRequestBody, "TransferSubscriptionRequestBody", ""),
1801
- contentType
1802
- );
1803
- requestContext.setBody(serializedBody);
1804
1510
 
1805
1511
  let authMethod: SecurityAuthentication | undefined;
1806
1512
  // Apply auth methods
1807
- authMethod = _config.authMethods["app_key"]
1513
+ authMethod = _config.authMethods["rest_api_key"]
1808
1514
  if (authMethod?.applySecurityAuthentication) {
1809
1515
  await authMethod?.applySecurityAuthentication(requestContext);
1810
1516
  }
@@ -1847,7 +1553,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1847
1553
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1848
1554
 
1849
1555
  // Always add the One Signal telemetry to the request.
1850
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1556
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
1851
1557
 
1852
1558
 
1853
1559
  // Body Params
@@ -1863,7 +1569,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1863
1569
 
1864
1570
  let authMethod: SecurityAuthentication | undefined;
1865
1571
  // Apply auth methods
1866
- authMethod = _config.authMethods["user_key"]
1572
+ authMethod = _config.authMethods["user_auth_key"]
1867
1573
  if (authMethod?.applySecurityAuthentication) {
1868
1574
  await authMethod?.applySecurityAuthentication(requestContext);
1869
1575
  }
@@ -1914,7 +1620,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1914
1620
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1915
1621
 
1916
1622
  // Always add the One Signal telemetry to the request.
1917
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1623
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
1918
1624
 
1919
1625
 
1920
1626
  // Body Params
@@ -1930,7 +1636,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1930
1636
 
1931
1637
  let authMethod: SecurityAuthentication | undefined;
1932
1638
  // Apply auth methods
1933
- authMethod = _config.authMethods["app_key"]
1639
+ authMethod = _config.authMethods["rest_api_key"]
1934
1640
  if (authMethod?.applySecurityAuthentication) {
1935
1641
  await authMethod?.applySecurityAuthentication(requestContext);
1936
1642
  }
@@ -1944,36 +1650,43 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1944
1650
  }
1945
1651
 
1946
1652
  /**
1947
- * Update an existing device in one of your OneSignal apps
1948
- * Edit device
1949
- * @param playerId Player\&#39;s OneSignal ID
1950
- * @param player
1653
+ * Updates an existing Subscription’s properties.
1654
+ * @param appId
1655
+ * @param subscriptionId
1656
+ * @param subscriptionBody
1951
1657
  */
1952
- public async updatePlayer(playerId: string, player: Player, _options?: Configuration): Promise<RequestContext> {
1658
+ public async updateSubscription(appId: string, subscriptionId: string, subscriptionBody: SubscriptionBody, _options?: Configuration): Promise<RequestContext> {
1953
1659
  let _config = _options || this.configuration;
1954
1660
 
1955
- // verify required parameter 'playerId' is not null or undefined
1956
- if (playerId === null || playerId === undefined) {
1957
- throw new RequiredError("DefaultApi", "updatePlayer", "playerId");
1661
+ // verify required parameter 'appId' is not null or undefined
1662
+ if (appId === null || appId === undefined) {
1663
+ throw new RequiredError("DefaultApi", "updateSubscription", "appId");
1664
+ }
1665
+
1666
+
1667
+ // verify required parameter 'subscriptionId' is not null or undefined
1668
+ if (subscriptionId === null || subscriptionId === undefined) {
1669
+ throw new RequiredError("DefaultApi", "updateSubscription", "subscriptionId");
1958
1670
  }
1959
1671
 
1960
1672
 
1961
- // verify required parameter 'player' is not null or undefined
1962
- if (player === null || player === undefined) {
1963
- throw new RequiredError("DefaultApi", "updatePlayer", "player");
1673
+ // verify required parameter 'subscriptionBody' is not null or undefined
1674
+ if (subscriptionBody === null || subscriptionBody === undefined) {
1675
+ throw new RequiredError("DefaultApi", "updateSubscription", "subscriptionBody");
1964
1676
  }
1965
1677
 
1966
1678
 
1967
1679
  // Path Params
1968
- const localVarPath = '/players/{player_id}'
1969
- .replace('{' + 'player_id' + '}', encodeURIComponent(String(playerId)));
1680
+ const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}'
1681
+ .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
1682
+ .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
1970
1683
 
1971
1684
  // Make Request Context
1972
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1685
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
1973
1686
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
1974
1687
 
1975
1688
  // Always add the One Signal telemetry to the request.
1976
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1689
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
1977
1690
 
1978
1691
 
1979
1692
  // Body Params
@@ -1982,14 +1695,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
1982
1695
  ]);
1983
1696
  requestContext.setHeaderParam("Content-Type", contentType);
1984
1697
  const serializedBody = ObjectSerializer.stringify(
1985
- ObjectSerializer.serialize(player, "Player", ""),
1698
+ ObjectSerializer.serialize(subscriptionBody, "SubscriptionBody", ""),
1986
1699
  contentType
1987
1700
  );
1988
1701
  requestContext.setBody(serializedBody);
1989
1702
 
1990
1703
  let authMethod: SecurityAuthentication | undefined;
1991
1704
  // Apply auth methods
1992
- authMethod = _config.authMethods["app_key"]
1705
+ authMethod = _config.authMethods["rest_api_key"]
1993
1706
  if (authMethod?.applySecurityAuthentication) {
1994
1707
  await authMethod?.applySecurityAuthentication(requestContext);
1995
1708
  }
@@ -2003,39 +1716,51 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
2003
1716
  }
2004
1717
 
2005
1718
  /**
2006
- * 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\" }
2007
- * Edit tags with external user id
2008
- * @param appId The OneSignal App ID the user record is found under.
2009
- * @param externalUserId The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated.
2010
- * @param updatePlayerTagsRequestBody
1719
+ * Updates an existing Users properties.
1720
+ * @param appId
1721
+ * @param aliasLabel
1722
+ * @param aliasId
1723
+ * @param updateUserRequest
2011
1724
  */
2012
- public async updatePlayerTags(appId: string, externalUserId: string, updatePlayerTagsRequestBody?: UpdatePlayerTagsRequestBody, _options?: Configuration): Promise<RequestContext> {
1725
+ public async updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise<RequestContext> {
2013
1726
  let _config = _options || this.configuration;
2014
1727
 
2015
1728
  // verify required parameter 'appId' is not null or undefined
2016
1729
  if (appId === null || appId === undefined) {
2017
- throw new RequiredError("DefaultApi", "updatePlayerTags", "appId");
1730
+ throw new RequiredError("DefaultApi", "updateUser", "appId");
1731
+ }
1732
+
1733
+
1734
+ // verify required parameter 'aliasLabel' is not null or undefined
1735
+ if (aliasLabel === null || aliasLabel === undefined) {
1736
+ throw new RequiredError("DefaultApi", "updateUser", "aliasLabel");
2018
1737
  }
2019
1738
 
2020
1739
 
2021
- // verify required parameter 'externalUserId' is not null or undefined
2022
- if (externalUserId === null || externalUserId === undefined) {
2023
- throw new RequiredError("DefaultApi", "updatePlayerTags", "externalUserId");
1740
+ // verify required parameter 'aliasId' is not null or undefined
1741
+ if (aliasId === null || aliasId === undefined) {
1742
+ throw new RequiredError("DefaultApi", "updateUser", "aliasId");
2024
1743
  }
2025
1744
 
2026
1745
 
1746
+ // verify required parameter 'updateUserRequest' is not null or undefined
1747
+ if (updateUserRequest === null || updateUserRequest === undefined) {
1748
+ throw new RequiredError("DefaultApi", "updateUser", "updateUserRequest");
1749
+ }
1750
+
2027
1751
 
2028
1752
  // Path Params
2029
- const localVarPath = '/apps/{app_id}/users/{external_user_id}'
1753
+ const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}'
2030
1754
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
2031
- .replace('{' + 'external_user_id' + '}', encodeURIComponent(String(externalUserId)));
1755
+ .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
1756
+ .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
2032
1757
 
2033
1758
  // Make Request Context
2034
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
1759
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
2035
1760
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
2036
1761
 
2037
1762
  // Always add the One Signal telemetry to the request.
2038
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
1763
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.0.1");
2039
1764
 
2040
1765
 
2041
1766
  // Body Params
@@ -2044,154 +1769,14 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
2044
1769
  ]);
2045
1770
  requestContext.setHeaderParam("Content-Type", contentType);
2046
1771
  const serializedBody = ObjectSerializer.stringify(
2047
- ObjectSerializer.serialize(updatePlayerTagsRequestBody, "UpdatePlayerTagsRequestBody", ""),
1772
+ ObjectSerializer.serialize(updateUserRequest, "UpdateUserRequest", ""),
2048
1773
  contentType
2049
1774
  );
2050
1775
  requestContext.setBody(serializedBody);
2051
1776
 
2052
1777
  let authMethod: SecurityAuthentication | undefined;
2053
1778
  // Apply auth methods
2054
- authMethod = _config.authMethods["app_key"]
2055
- if (authMethod?.applySecurityAuthentication) {
2056
- await authMethod?.applySecurityAuthentication(requestContext);
2057
- }
2058
-
2059
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
2060
- if (defaultAuth?.applySecurityAuthentication) {
2061
- await defaultAuth?.applySecurityAuthentication(requestContext);
2062
- }
2063
-
2064
- return requestContext;
2065
- }
2066
-
2067
- /**
2068
- * Updates an existing Subscription’s properties.
2069
- * @param appId
2070
- * @param subscriptionId
2071
- * @param updateSubscriptionRequestBody
2072
- */
2073
- public async updateSubscription(appId: string, subscriptionId: string, updateSubscriptionRequestBody: UpdateSubscriptionRequestBody, _options?: Configuration): Promise<RequestContext> {
2074
- let _config = _options || this.configuration;
2075
-
2076
- // verify required parameter 'appId' is not null or undefined
2077
- if (appId === null || appId === undefined) {
2078
- throw new RequiredError("DefaultApi", "updateSubscription", "appId");
2079
- }
2080
-
2081
-
2082
- // verify required parameter 'subscriptionId' is not null or undefined
2083
- if (subscriptionId === null || subscriptionId === undefined) {
2084
- throw new RequiredError("DefaultApi", "updateSubscription", "subscriptionId");
2085
- }
2086
-
2087
-
2088
- // verify required parameter 'updateSubscriptionRequestBody' is not null or undefined
2089
- if (updateSubscriptionRequestBody === null || updateSubscriptionRequestBody === undefined) {
2090
- throw new RequiredError("DefaultApi", "updateSubscription", "updateSubscriptionRequestBody");
2091
- }
2092
-
2093
-
2094
- // Path Params
2095
- const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}'
2096
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
2097
- .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
2098
-
2099
- // Make Request Context
2100
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
2101
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
2102
-
2103
- // Always add the One Signal telemetry to the request.
2104
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
2105
-
2106
-
2107
- // Body Params
2108
- const contentType = ObjectSerializer.getPreferredMediaType([
2109
- "application/json"
2110
- ]);
2111
- requestContext.setHeaderParam("Content-Type", contentType);
2112
- const serializedBody = ObjectSerializer.stringify(
2113
- ObjectSerializer.serialize(updateSubscriptionRequestBody, "UpdateSubscriptionRequestBody", ""),
2114
- contentType
2115
- );
2116
- requestContext.setBody(serializedBody);
2117
-
2118
- let authMethod: SecurityAuthentication | undefined;
2119
- // Apply auth methods
2120
- authMethod = _config.authMethods["app_key"]
2121
- if (authMethod?.applySecurityAuthentication) {
2122
- await authMethod?.applySecurityAuthentication(requestContext);
2123
- }
2124
-
2125
- const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
2126
- if (defaultAuth?.applySecurityAuthentication) {
2127
- await defaultAuth?.applySecurityAuthentication(requestContext);
2128
- }
2129
-
2130
- return requestContext;
2131
- }
2132
-
2133
- /**
2134
- * Updates an existing User’s properties.
2135
- * @param appId
2136
- * @param aliasLabel
2137
- * @param aliasId
2138
- * @param updateUserRequest
2139
- */
2140
- public async updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise<RequestContext> {
2141
- let _config = _options || this.configuration;
2142
-
2143
- // verify required parameter 'appId' is not null or undefined
2144
- if (appId === null || appId === undefined) {
2145
- throw new RequiredError("DefaultApi", "updateUser", "appId");
2146
- }
2147
-
2148
-
2149
- // verify required parameter 'aliasLabel' is not null or undefined
2150
- if (aliasLabel === null || aliasLabel === undefined) {
2151
- throw new RequiredError("DefaultApi", "updateUser", "aliasLabel");
2152
- }
2153
-
2154
-
2155
- // verify required parameter 'aliasId' is not null or undefined
2156
- if (aliasId === null || aliasId === undefined) {
2157
- throw new RequiredError("DefaultApi", "updateUser", "aliasId");
2158
- }
2159
-
2160
-
2161
- // verify required parameter 'updateUserRequest' is not null or undefined
2162
- if (updateUserRequest === null || updateUserRequest === undefined) {
2163
- throw new RequiredError("DefaultApi", "updateUser", "updateUserRequest");
2164
- }
2165
-
2166
-
2167
- // Path Params
2168
- const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}'
2169
- .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
2170
- .replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
2171
- .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
2172
-
2173
- // Make Request Context
2174
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
2175
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
2176
-
2177
- // Always add the One Signal telemetry to the request.
2178
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
2179
-
2180
-
2181
- // Body Params
2182
- const contentType = ObjectSerializer.getPreferredMediaType([
2183
- "application/json"
2184
- ]);
2185
- requestContext.setHeaderParam("Content-Type", contentType);
2186
- const serializedBody = ObjectSerializer.stringify(
2187
- ObjectSerializer.serialize(updateUserRequest, "UpdateUserRequest", ""),
2188
- contentType
2189
- );
2190
- requestContext.setBody(serializedBody);
2191
-
2192
- let authMethod: SecurityAuthentication | undefined;
2193
- // Apply auth methods
2194
- authMethod = _config.authMethods["app_key"]
1779
+ authMethod = _config.authMethods["rest_api_key"]
2195
1780
  if (authMethod?.applySecurityAuthentication) {
2196
1781
  await authMethod?.applySecurityAuthentication(requestContext);
2197
1782
  }
@@ -2212,13 +1797,17 @@ export class DefaultApiResponseProcessor {
2212
1797
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2213
1798
  * to the expected objects
2214
1799
  *
2215
- * @params response Response returned by the server for a request to beginLiveActivity
1800
+ * @params response Response returned by the server for a request to cancelNotification
2216
1801
  * @throws ApiException if the response code was not in [200, 299]
2217
1802
  */
2218
- public async beginLiveActivity(response: ResponseContext): Promise<void > {
1803
+ public async cancelNotification(response: ResponseContext): Promise<GenericSuccessBoolResponse > {
2219
1804
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2220
- if (isCodeInRange("204", response.httpStatusCode)) {
2221
- return;
1805
+ if (isCodeInRange("200", response.httpStatusCode)) {
1806
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
1807
+ ObjectSerializer.parse(await response.body.text(), contentType),
1808
+ "GenericSuccessBoolResponse", ""
1809
+ ) as GenericSuccessBoolResponse;
1810
+ return body;
2222
1811
  }
2223
1812
  if (isCodeInRange("400", response.httpStatusCode)) {
2224
1813
  const body: GenericError = ObjectSerializer.deserialize(
@@ -2227,20 +1816,27 @@ export class DefaultApiResponseProcessor {
2227
1816
  ) as GenericError;
2228
1817
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2229
1818
  }
1819
+ if (isCodeInRange("404", response.httpStatusCode)) {
1820
+ const body: GenericError = ObjectSerializer.deserialize(
1821
+ ObjectSerializer.parse(await response.body.text(), contentType),
1822
+ "GenericError", ""
1823
+ ) as GenericError;
1824
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
1825
+ }
2230
1826
  if (isCodeInRange("429", response.httpStatusCode)) {
2231
- const body: RateLimiterError = ObjectSerializer.deserialize(
1827
+ const body: RateLimitError = ObjectSerializer.deserialize(
2232
1828
  ObjectSerializer.parse(await response.body.text(), contentType),
2233
- "RateLimiterError", ""
2234
- ) as RateLimiterError;
2235
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
1829
+ "RateLimitError", ""
1830
+ ) as RateLimitError;
1831
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2236
1832
  }
2237
1833
 
2238
1834
  // Work around for missing responses in specification, e.g. for petstore.yaml
2239
1835
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2240
- const body: void = ObjectSerializer.deserialize(
1836
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
2241
1837
  ObjectSerializer.parse(await response.body.text(), contentType),
2242
- "void", ""
2243
- ) as void;
1838
+ "GenericSuccessBoolResponse", ""
1839
+ ) as GenericSuccessBoolResponse;
2244
1840
  return body;
2245
1841
  }
2246
1842
 
@@ -2251,16 +1847,16 @@ export class DefaultApiResponseProcessor {
2251
1847
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2252
1848
  * to the expected objects
2253
1849
  *
2254
- * @params response Response returned by the server for a request to cancelNotification
1850
+ * @params response Response returned by the server for a request to createAlias
2255
1851
  * @throws ApiException if the response code was not in [200, 299]
2256
1852
  */
2257
- public async cancelNotification(response: ResponseContext): Promise<CancelNotificationSuccessResponse > {
1853
+ public async createAlias(response: ResponseContext): Promise<UserIdentityBody > {
2258
1854
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2259
1855
  if (isCodeInRange("200", response.httpStatusCode)) {
2260
- const body: CancelNotificationSuccessResponse = ObjectSerializer.deserialize(
1856
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2261
1857
  ObjectSerializer.parse(await response.body.text(), contentType),
2262
- "CancelNotificationSuccessResponse", ""
2263
- ) as CancelNotificationSuccessResponse;
1858
+ "UserIdentityBody", ""
1859
+ ) as UserIdentityBody;
2264
1860
  return body;
2265
1861
  }
2266
1862
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2270,20 +1866,34 @@ export class DefaultApiResponseProcessor {
2270
1866
  ) as GenericError;
2271
1867
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2272
1868
  }
1869
+ if (isCodeInRange("404", response.httpStatusCode)) {
1870
+ const body: GenericError = ObjectSerializer.deserialize(
1871
+ ObjectSerializer.parse(await response.body.text(), contentType),
1872
+ "GenericError", ""
1873
+ ) as GenericError;
1874
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
1875
+ }
1876
+ if (isCodeInRange("409", response.httpStatusCode)) {
1877
+ const body: GenericError = ObjectSerializer.deserialize(
1878
+ ObjectSerializer.parse(await response.body.text(), contentType),
1879
+ "GenericError", ""
1880
+ ) as GenericError;
1881
+ throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
1882
+ }
2273
1883
  if (isCodeInRange("429", response.httpStatusCode)) {
2274
- const body: RateLimiterError = ObjectSerializer.deserialize(
1884
+ const body: RateLimitError = ObjectSerializer.deserialize(
2275
1885
  ObjectSerializer.parse(await response.body.text(), contentType),
2276
- "RateLimiterError", ""
2277
- ) as RateLimiterError;
2278
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
1886
+ "RateLimitError", ""
1887
+ ) as RateLimitError;
1888
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2279
1889
  }
2280
1890
 
2281
1891
  // Work around for missing responses in specification, e.g. for petstore.yaml
2282
1892
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2283
- const body: CancelNotificationSuccessResponse = ObjectSerializer.deserialize(
1893
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2284
1894
  ObjectSerializer.parse(await response.body.text(), contentType),
2285
- "CancelNotificationSuccessResponse", ""
2286
- ) as CancelNotificationSuccessResponse;
1895
+ "UserIdentityBody", ""
1896
+ ) as UserIdentityBody;
2287
1897
  return body;
2288
1898
  }
2289
1899
 
@@ -2294,16 +1904,16 @@ export class DefaultApiResponseProcessor {
2294
1904
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2295
1905
  * to the expected objects
2296
1906
  *
2297
- * @params response Response returned by the server for a request to createApp
1907
+ * @params response Response returned by the server for a request to createAliasBySubscription
2298
1908
  * @throws ApiException if the response code was not in [200, 299]
2299
1909
  */
2300
- public async createApp(response: ResponseContext): Promise<App > {
1910
+ public async createAliasBySubscription(response: ResponseContext): Promise<UserIdentityBody > {
2301
1911
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2302
1912
  if (isCodeInRange("200", response.httpStatusCode)) {
2303
- const body: App = ObjectSerializer.deserialize(
1913
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2304
1914
  ObjectSerializer.parse(await response.body.text(), contentType),
2305
- "App", ""
2306
- ) as App;
1915
+ "UserIdentityBody", ""
1916
+ ) as UserIdentityBody;
2307
1917
  return body;
2308
1918
  }
2309
1919
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2313,20 +1923,34 @@ export class DefaultApiResponseProcessor {
2313
1923
  ) as GenericError;
2314
1924
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2315
1925
  }
1926
+ if (isCodeInRange("404", response.httpStatusCode)) {
1927
+ const body: GenericError = ObjectSerializer.deserialize(
1928
+ ObjectSerializer.parse(await response.body.text(), contentType),
1929
+ "GenericError", ""
1930
+ ) as GenericError;
1931
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
1932
+ }
1933
+ if (isCodeInRange("409", response.httpStatusCode)) {
1934
+ const body: GenericError = ObjectSerializer.deserialize(
1935
+ ObjectSerializer.parse(await response.body.text(), contentType),
1936
+ "GenericError", ""
1937
+ ) as GenericError;
1938
+ throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
1939
+ }
2316
1940
  if (isCodeInRange("429", response.httpStatusCode)) {
2317
- const body: RateLimiterError = ObjectSerializer.deserialize(
1941
+ const body: RateLimitError = ObjectSerializer.deserialize(
2318
1942
  ObjectSerializer.parse(await response.body.text(), contentType),
2319
- "RateLimiterError", ""
2320
- ) as RateLimiterError;
2321
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
1943
+ "RateLimitError", ""
1944
+ ) as RateLimitError;
1945
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2322
1946
  }
2323
1947
 
2324
1948
  // Work around for missing responses in specification, e.g. for petstore.yaml
2325
1949
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2326
- const body: App = ObjectSerializer.deserialize(
1950
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2327
1951
  ObjectSerializer.parse(await response.body.text(), contentType),
2328
- "App", ""
2329
- ) as App;
1952
+ "UserIdentityBody", ""
1953
+ ) as UserIdentityBody;
2330
1954
  return body;
2331
1955
  }
2332
1956
 
@@ -2337,16 +1961,16 @@ export class DefaultApiResponseProcessor {
2337
1961
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2338
1962
  * to the expected objects
2339
1963
  *
2340
- * @params response Response returned by the server for a request to createNotification
1964
+ * @params response Response returned by the server for a request to createApp
2341
1965
  * @throws ApiException if the response code was not in [200, 299]
2342
1966
  */
2343
- public async createNotification(response: ResponseContext): Promise<CreateNotificationSuccessResponse > {
1967
+ public async createApp(response: ResponseContext): Promise<App > {
2344
1968
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2345
1969
  if (isCodeInRange("200", response.httpStatusCode)) {
2346
- const body: CreateNotificationSuccessResponse = ObjectSerializer.deserialize(
1970
+ const body: App = ObjectSerializer.deserialize(
2347
1971
  ObjectSerializer.parse(await response.body.text(), contentType),
2348
- "CreateNotificationSuccessResponse", ""
2349
- ) as CreateNotificationSuccessResponse;
1972
+ "App", ""
1973
+ ) as App;
2350
1974
  return body;
2351
1975
  }
2352
1976
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2357,19 +1981,19 @@ export class DefaultApiResponseProcessor {
2357
1981
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2358
1982
  }
2359
1983
  if (isCodeInRange("429", response.httpStatusCode)) {
2360
- const body: RateLimiterError = ObjectSerializer.deserialize(
1984
+ const body: RateLimitError = ObjectSerializer.deserialize(
2361
1985
  ObjectSerializer.parse(await response.body.text(), contentType),
2362
- "RateLimiterError", ""
2363
- ) as RateLimiterError;
2364
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
1986
+ "RateLimitError", ""
1987
+ ) as RateLimitError;
1988
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2365
1989
  }
2366
1990
 
2367
1991
  // Work around for missing responses in specification, e.g. for petstore.yaml
2368
1992
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2369
- const body: CreateNotificationSuccessResponse = ObjectSerializer.deserialize(
1993
+ const body: App = ObjectSerializer.deserialize(
2370
1994
  ObjectSerializer.parse(await response.body.text(), contentType),
2371
- "CreateNotificationSuccessResponse", ""
2372
- ) as CreateNotificationSuccessResponse;
1995
+ "App", ""
1996
+ ) as App;
2373
1997
  return body;
2374
1998
  }
2375
1999
 
@@ -2380,16 +2004,16 @@ export class DefaultApiResponseProcessor {
2380
2004
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2381
2005
  * to the expected objects
2382
2006
  *
2383
- * @params response Response returned by the server for a request to createPlayer
2007
+ * @params response Response returned by the server for a request to createNotification
2384
2008
  * @throws ApiException if the response code was not in [200, 299]
2385
2009
  */
2386
- public async createPlayer(response: ResponseContext): Promise<CreatePlayerSuccessResponse > {
2010
+ public async createNotification(response: ResponseContext): Promise<CreateNotificationSuccessResponse > {
2387
2011
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2388
2012
  if (isCodeInRange("200", response.httpStatusCode)) {
2389
- const body: CreatePlayerSuccessResponse = ObjectSerializer.deserialize(
2013
+ const body: CreateNotificationSuccessResponse = ObjectSerializer.deserialize(
2390
2014
  ObjectSerializer.parse(await response.body.text(), contentType),
2391
- "CreatePlayerSuccessResponse", ""
2392
- ) as CreatePlayerSuccessResponse;
2015
+ "CreateNotificationSuccessResponse", ""
2016
+ ) as CreateNotificationSuccessResponse;
2393
2017
  return body;
2394
2018
  }
2395
2019
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2399,27 +2023,20 @@ export class DefaultApiResponseProcessor {
2399
2023
  ) as GenericError;
2400
2024
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2401
2025
  }
2402
- if (isCodeInRange("409", response.httpStatusCode)) {
2403
- const body: GenericError = ObjectSerializer.deserialize(
2404
- ObjectSerializer.parse(await response.body.text(), contentType),
2405
- "GenericError", ""
2406
- ) as GenericError;
2407
- throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2408
- }
2409
2026
  if (isCodeInRange("429", response.httpStatusCode)) {
2410
- const body: RateLimiterError = ObjectSerializer.deserialize(
2027
+ const body: RateLimitError = ObjectSerializer.deserialize(
2411
2028
  ObjectSerializer.parse(await response.body.text(), contentType),
2412
- "RateLimiterError", ""
2413
- ) as RateLimiterError;
2414
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2029
+ "RateLimitError", ""
2030
+ ) as RateLimitError;
2031
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2415
2032
  }
2416
2033
 
2417
2034
  // Work around for missing responses in specification, e.g. for petstore.yaml
2418
2035
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2419
- const body: CreatePlayerSuccessResponse = ObjectSerializer.deserialize(
2036
+ const body: CreateNotificationSuccessResponse = ObjectSerializer.deserialize(
2420
2037
  ObjectSerializer.parse(await response.body.text(), contentType),
2421
- "CreatePlayerSuccessResponse", ""
2422
- ) as CreatePlayerSuccessResponse;
2038
+ "CreateNotificationSuccessResponse", ""
2039
+ ) as CreateNotificationSuccessResponse;
2423
2040
  return body;
2424
2041
  }
2425
2042
 
@@ -2430,10 +2047,10 @@ export class DefaultApiResponseProcessor {
2430
2047
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2431
2048
  * to the expected objects
2432
2049
  *
2433
- * @params response Response returned by the server for a request to createSegments
2050
+ * @params response Response returned by the server for a request to createSegment
2434
2051
  * @throws ApiException if the response code was not in [200, 299]
2435
2052
  */
2436
- public async createSegments(response: ResponseContext): Promise<CreateSegmentSuccessResponse > {
2053
+ public async createSegment(response: ResponseContext): Promise<CreateSegmentSuccessResponse > {
2437
2054
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2438
2055
  if (isCodeInRange("201", response.httpStatusCode)) {
2439
2056
  const body: CreateSegmentSuccessResponse = ObjectSerializer.deserialize(
@@ -2457,11 +2074,11 @@ export class DefaultApiResponseProcessor {
2457
2074
  throw new ApiException<CreateSegmentConflictResponse>(409, "Conflict", body, response.headers);
2458
2075
  }
2459
2076
  if (isCodeInRange("429", response.httpStatusCode)) {
2460
- const body: RateLimiterError = ObjectSerializer.deserialize(
2077
+ const body: RateLimitError = ObjectSerializer.deserialize(
2461
2078
  ObjectSerializer.parse(await response.body.text(), contentType),
2462
- "RateLimiterError", ""
2463
- ) as RateLimiterError;
2464
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2079
+ "RateLimitError", ""
2080
+ ) as RateLimitError;
2081
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2465
2082
  }
2466
2083
 
2467
2084
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2483,20 +2100,20 @@ export class DefaultApiResponseProcessor {
2483
2100
  * @params response Response returned by the server for a request to createSubscription
2484
2101
  * @throws ApiException if the response code was not in [200, 299]
2485
2102
  */
2486
- public async createSubscription(response: ResponseContext): Promise<InlineResponse201 > {
2103
+ public async createSubscription(response: ResponseContext): Promise<SubscriptionBody > {
2487
2104
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2488
2105
  if (isCodeInRange("201", response.httpStatusCode)) {
2489
- const body: InlineResponse201 = ObjectSerializer.deserialize(
2106
+ const body: SubscriptionBody = ObjectSerializer.deserialize(
2490
2107
  ObjectSerializer.parse(await response.body.text(), contentType),
2491
- "InlineResponse201", ""
2492
- ) as InlineResponse201;
2108
+ "SubscriptionBody", ""
2109
+ ) as SubscriptionBody;
2493
2110
  return body;
2494
2111
  }
2495
2112
  if (isCodeInRange("202", response.httpStatusCode)) {
2496
- const body: InlineResponse201 = ObjectSerializer.deserialize(
2113
+ const body: SubscriptionBody = ObjectSerializer.deserialize(
2497
2114
  ObjectSerializer.parse(await response.body.text(), contentType),
2498
- "InlineResponse201", ""
2499
- ) as InlineResponse201;
2115
+ "SubscriptionBody", ""
2116
+ ) as SubscriptionBody;
2500
2117
  return body;
2501
2118
  }
2502
2119
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2506,6 +2123,13 @@ export class DefaultApiResponseProcessor {
2506
2123
  ) as GenericError;
2507
2124
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2508
2125
  }
2126
+ if (isCodeInRange("404", response.httpStatusCode)) {
2127
+ const body: GenericError = ObjectSerializer.deserialize(
2128
+ ObjectSerializer.parse(await response.body.text(), contentType),
2129
+ "GenericError", ""
2130
+ ) as GenericError;
2131
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2132
+ }
2509
2133
  if (isCodeInRange("409", response.httpStatusCode)) {
2510
2134
  const body: GenericError = ObjectSerializer.deserialize(
2511
2135
  ObjectSerializer.parse(await response.body.text(), contentType),
@@ -2514,19 +2138,19 @@ export class DefaultApiResponseProcessor {
2514
2138
  throw new ApiException<GenericError>(409, "Operation is not permitted due to user having the maximum number of subscriptions assigned", body, response.headers);
2515
2139
  }
2516
2140
  if (isCodeInRange("429", response.httpStatusCode)) {
2517
- const body: RateLimiterError = ObjectSerializer.deserialize(
2141
+ const body: RateLimitError = ObjectSerializer.deserialize(
2518
2142
  ObjectSerializer.parse(await response.body.text(), contentType),
2519
- "RateLimiterError", ""
2520
- ) as RateLimiterError;
2521
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2143
+ "RateLimitError", ""
2144
+ ) as RateLimitError;
2145
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2522
2146
  }
2523
2147
 
2524
2148
  // Work around for missing responses in specification, e.g. for petstore.yaml
2525
2149
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2526
- const body: InlineResponse201 = ObjectSerializer.deserialize(
2150
+ const body: SubscriptionBody = ObjectSerializer.deserialize(
2527
2151
  ObjectSerializer.parse(await response.body.text(), contentType),
2528
- "InlineResponse201", ""
2529
- ) as InlineResponse201;
2152
+ "SubscriptionBody", ""
2153
+ ) as SubscriptionBody;
2530
2154
  return body;
2531
2155
  }
2532
2156
 
@@ -2578,11 +2202,11 @@ export class DefaultApiResponseProcessor {
2578
2202
  throw new ApiException<CreateUserConflictResponse>(409, "Multiple User Identity Conflict", body, response.headers);
2579
2203
  }
2580
2204
  if (isCodeInRange("429", response.httpStatusCode)) {
2581
- const body: RateLimiterError = ObjectSerializer.deserialize(
2205
+ const body: RateLimitError = ObjectSerializer.deserialize(
2582
2206
  ObjectSerializer.parse(await response.body.text(), contentType),
2583
- "RateLimiterError", ""
2584
- ) as RateLimiterError;
2585
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2207
+ "RateLimitError", ""
2208
+ ) as RateLimitError;
2209
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2586
2210
  }
2587
2211
 
2588
2212
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2604,13 +2228,13 @@ export class DefaultApiResponseProcessor {
2604
2228
  * @params response Response returned by the server for a request to deleteAlias
2605
2229
  * @throws ApiException if the response code was not in [200, 299]
2606
2230
  */
2607
- public async deleteAlias(response: ResponseContext): Promise<InlineResponse200 > {
2231
+ public async deleteAlias(response: ResponseContext): Promise<UserIdentityBody > {
2608
2232
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2609
2233
  if (isCodeInRange("200", response.httpStatusCode)) {
2610
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2234
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2611
2235
  ObjectSerializer.parse(await response.body.text(), contentType),
2612
- "InlineResponse200", ""
2613
- ) as InlineResponse200;
2236
+ "UserIdentityBody", ""
2237
+ ) as UserIdentityBody;
2614
2238
  return body;
2615
2239
  }
2616
2240
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2620,77 +2244,34 @@ export class DefaultApiResponseProcessor {
2620
2244
  ) as GenericError;
2621
2245
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2622
2246
  }
2623
- if (isCodeInRange("409", response.httpStatusCode)) {
2247
+ if (isCodeInRange("404", response.httpStatusCode)) {
2624
2248
  const body: GenericError = ObjectSerializer.deserialize(
2625
2249
  ObjectSerializer.parse(await response.body.text(), contentType),
2626
2250
  "GenericError", ""
2627
2251
  ) as GenericError;
2628
- throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2629
- }
2630
- if (isCodeInRange("429", response.httpStatusCode)) {
2631
- const body: RateLimiterError = ObjectSerializer.deserialize(
2632
- ObjectSerializer.parse(await response.body.text(), contentType),
2633
- "RateLimiterError", ""
2634
- ) as RateLimiterError;
2635
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2636
- }
2637
-
2638
- // Work around for missing responses in specification, e.g. for petstore.yaml
2639
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2640
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2641
- ObjectSerializer.parse(await response.body.text(), contentType),
2642
- "InlineResponse200", ""
2643
- ) as InlineResponse200;
2644
- return body;
2645
- }
2646
-
2647
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2648
- }
2649
-
2650
- /**
2651
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2652
- * to the expected objects
2653
- *
2654
- * @params response Response returned by the server for a request to deletePlayer
2655
- * @throws ApiException if the response code was not in [200, 299]
2656
- */
2657
- public async deletePlayer(response: ResponseContext): Promise<DeletePlayerSuccessResponse > {
2658
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2659
- if (isCodeInRange("200", response.httpStatusCode)) {
2660
- const body: DeletePlayerSuccessResponse = ObjectSerializer.deserialize(
2661
- ObjectSerializer.parse(await response.body.text(), contentType),
2662
- "DeletePlayerSuccessResponse", ""
2663
- ) as DeletePlayerSuccessResponse;
2664
- return body;
2252
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2665
2253
  }
2666
- if (isCodeInRange("400", response.httpStatusCode)) {
2254
+ if (isCodeInRange("409", response.httpStatusCode)) {
2667
2255
  const body: GenericError = ObjectSerializer.deserialize(
2668
2256
  ObjectSerializer.parse(await response.body.text(), contentType),
2669
2257
  "GenericError", ""
2670
2258
  ) as GenericError;
2671
- throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2672
- }
2673
- if (isCodeInRange("404", response.httpStatusCode)) {
2674
- const body: DeletePlayerNotFoundResponse = ObjectSerializer.deserialize(
2675
- ObjectSerializer.parse(await response.body.text(), contentType),
2676
- "DeletePlayerNotFoundResponse", ""
2677
- ) as DeletePlayerNotFoundResponse;
2678
- throw new ApiException<DeletePlayerNotFoundResponse>(404, "Not Found", body, response.headers);
2259
+ throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2679
2260
  }
2680
2261
  if (isCodeInRange("429", response.httpStatusCode)) {
2681
- const body: RateLimiterError = ObjectSerializer.deserialize(
2262
+ const body: RateLimitError = ObjectSerializer.deserialize(
2682
2263
  ObjectSerializer.parse(await response.body.text(), contentType),
2683
- "RateLimiterError", ""
2684
- ) as RateLimiterError;
2685
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2264
+ "RateLimitError", ""
2265
+ ) as RateLimitError;
2266
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2686
2267
  }
2687
2268
 
2688
2269
  // Work around for missing responses in specification, e.g. for petstore.yaml
2689
2270
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2690
- const body: DeletePlayerSuccessResponse = ObjectSerializer.deserialize(
2271
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2691
2272
  ObjectSerializer.parse(await response.body.text(), contentType),
2692
- "DeletePlayerSuccessResponse", ""
2693
- ) as DeletePlayerSuccessResponse;
2273
+ "UserIdentityBody", ""
2274
+ ) as UserIdentityBody;
2694
2275
  return body;
2695
2276
  }
2696
2277
 
@@ -2701,63 +2282,17 @@ export class DefaultApiResponseProcessor {
2701
2282
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2702
2283
  * to the expected objects
2703
2284
  *
2704
- * @params response Response returned by the server for a request to deleteSegments
2285
+ * @params response Response returned by the server for a request to deleteSegment
2705
2286
  * @throws ApiException if the response code was not in [200, 299]
2706
2287
  */
2707
- public async deleteSegments(response: ResponseContext): Promise<DeleteSegmentSuccessResponse > {
2288
+ public async deleteSegment(response: ResponseContext): Promise<GenericSuccessBoolResponse > {
2708
2289
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2709
2290
  if (isCodeInRange("200", response.httpStatusCode)) {
2710
- const body: DeleteSegmentSuccessResponse = ObjectSerializer.deserialize(
2711
- ObjectSerializer.parse(await response.body.text(), contentType),
2712
- "DeleteSegmentSuccessResponse", ""
2713
- ) as DeleteSegmentSuccessResponse;
2714
- return body;
2715
- }
2716
- if (isCodeInRange("400", response.httpStatusCode)) {
2717
- const body: GenericError = ObjectSerializer.deserialize(
2718
- ObjectSerializer.parse(await response.body.text(), contentType),
2719
- "GenericError", ""
2720
- ) as GenericError;
2721
- throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2722
- }
2723
- if (isCodeInRange("404", response.httpStatusCode)) {
2724
- const body: DeleteSegmentNotFoundResponse = ObjectSerializer.deserialize(
2725
- ObjectSerializer.parse(await response.body.text(), contentType),
2726
- "DeleteSegmentNotFoundResponse", ""
2727
- ) as DeleteSegmentNotFoundResponse;
2728
- throw new ApiException<DeleteSegmentNotFoundResponse>(404, "Not Found", body, response.headers);
2729
- }
2730
- if (isCodeInRange("429", response.httpStatusCode)) {
2731
- const body: RateLimiterError = ObjectSerializer.deserialize(
2732
- ObjectSerializer.parse(await response.body.text(), contentType),
2733
- "RateLimiterError", ""
2734
- ) as RateLimiterError;
2735
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2736
- }
2737
-
2738
- // Work around for missing responses in specification, e.g. for petstore.yaml
2739
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2740
- const body: DeleteSegmentSuccessResponse = ObjectSerializer.deserialize(
2741
- ObjectSerializer.parse(await response.body.text(), contentType),
2742
- "DeleteSegmentSuccessResponse", ""
2743
- ) as DeleteSegmentSuccessResponse;
2744
- return body;
2745
- }
2746
-
2747
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
2748
- }
2749
-
2750
- /**
2751
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
2752
- * to the expected objects
2753
- *
2754
- * @params response Response returned by the server for a request to deleteSubscription
2755
- * @throws ApiException if the response code was not in [200, 299]
2756
- */
2757
- public async deleteSubscription(response: ResponseContext): Promise<void > {
2758
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2759
- if (isCodeInRange("202", response.httpStatusCode)) {
2760
- return;
2291
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
2292
+ ObjectSerializer.parse(await response.body.text(), contentType),
2293
+ "GenericSuccessBoolResponse", ""
2294
+ ) as GenericSuccessBoolResponse;
2295
+ return body;
2761
2296
  }
2762
2297
  if (isCodeInRange("400", response.httpStatusCode)) {
2763
2298
  const body: GenericError = ObjectSerializer.deserialize(
@@ -2766,27 +2301,27 @@ export class DefaultApiResponseProcessor {
2766
2301
  ) as GenericError;
2767
2302
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2768
2303
  }
2769
- if (isCodeInRange("409", response.httpStatusCode)) {
2770
- const body: GenericError = ObjectSerializer.deserialize(
2304
+ if (isCodeInRange("404", response.httpStatusCode)) {
2305
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
2771
2306
  ObjectSerializer.parse(await response.body.text(), contentType),
2772
- "GenericError", ""
2773
- ) as GenericError;
2774
- throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2307
+ "GenericSuccessBoolResponse", ""
2308
+ ) as GenericSuccessBoolResponse;
2309
+ throw new ApiException<GenericSuccessBoolResponse>(404, "Not Found", body, response.headers);
2775
2310
  }
2776
2311
  if (isCodeInRange("429", response.httpStatusCode)) {
2777
- const body: RateLimiterError = ObjectSerializer.deserialize(
2312
+ const body: RateLimitError = ObjectSerializer.deserialize(
2778
2313
  ObjectSerializer.parse(await response.body.text(), contentType),
2779
- "RateLimiterError", ""
2780
- ) as RateLimiterError;
2781
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2314
+ "RateLimitError", ""
2315
+ ) as RateLimitError;
2316
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2782
2317
  }
2783
2318
 
2784
2319
  // Work around for missing responses in specification, e.g. for petstore.yaml
2785
2320
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2786
- const body: void = ObjectSerializer.deserialize(
2321
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
2787
2322
  ObjectSerializer.parse(await response.body.text(), contentType),
2788
- "void", ""
2789
- ) as void;
2323
+ "GenericSuccessBoolResponse", ""
2324
+ ) as GenericSuccessBoolResponse;
2790
2325
  return body;
2791
2326
  }
2792
2327
 
@@ -2797,12 +2332,12 @@ export class DefaultApiResponseProcessor {
2797
2332
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2798
2333
  * to the expected objects
2799
2334
  *
2800
- * @params response Response returned by the server for a request to deleteUser
2335
+ * @params response Response returned by the server for a request to deleteSubscription
2801
2336
  * @throws ApiException if the response code was not in [200, 299]
2802
2337
  */
2803
- public async deleteUser(response: ResponseContext): Promise<void > {
2338
+ public async deleteSubscription(response: ResponseContext): Promise<void > {
2804
2339
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2805
- if (isCodeInRange("200", response.httpStatusCode)) {
2340
+ if (isCodeInRange("202", response.httpStatusCode)) {
2806
2341
  return;
2807
2342
  }
2808
2343
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2812,6 +2347,13 @@ export class DefaultApiResponseProcessor {
2812
2347
  ) as GenericError;
2813
2348
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2814
2349
  }
2350
+ if (isCodeInRange("404", response.httpStatusCode)) {
2351
+ const body: GenericError = ObjectSerializer.deserialize(
2352
+ ObjectSerializer.parse(await response.body.text(), contentType),
2353
+ "GenericError", ""
2354
+ ) as GenericError;
2355
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2356
+ }
2815
2357
  if (isCodeInRange("409", response.httpStatusCode)) {
2816
2358
  const body: GenericError = ObjectSerializer.deserialize(
2817
2359
  ObjectSerializer.parse(await response.body.text(), contentType),
@@ -2820,11 +2362,11 @@ export class DefaultApiResponseProcessor {
2820
2362
  throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2821
2363
  }
2822
2364
  if (isCodeInRange("429", response.httpStatusCode)) {
2823
- const body: RateLimiterError = ObjectSerializer.deserialize(
2365
+ const body: RateLimitError = ObjectSerializer.deserialize(
2824
2366
  ObjectSerializer.parse(await response.body.text(), contentType),
2825
- "RateLimiterError", ""
2826
- ) as RateLimiterError;
2827
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2367
+ "RateLimitError", ""
2368
+ ) as RateLimitError;
2369
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2828
2370
  }
2829
2371
 
2830
2372
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2843,12 +2385,12 @@ export class DefaultApiResponseProcessor {
2843
2385
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2844
2386
  * to the expected objects
2845
2387
  *
2846
- * @params response Response returned by the server for a request to endLiveActivity
2388
+ * @params response Response returned by the server for a request to deleteUser
2847
2389
  * @throws ApiException if the response code was not in [200, 299]
2848
2390
  */
2849
- public async endLiveActivity(response: ResponseContext): Promise<void > {
2391
+ public async deleteUser(response: ResponseContext): Promise<void > {
2850
2392
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2851
- if (isCodeInRange("204", response.httpStatusCode)) {
2393
+ if (isCodeInRange("200", response.httpStatusCode)) {
2852
2394
  return;
2853
2395
  }
2854
2396
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2858,12 +2400,19 @@ export class DefaultApiResponseProcessor {
2858
2400
  ) as GenericError;
2859
2401
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2860
2402
  }
2403
+ if (isCodeInRange("409", response.httpStatusCode)) {
2404
+ const body: GenericError = ObjectSerializer.deserialize(
2405
+ ObjectSerializer.parse(await response.body.text(), contentType),
2406
+ "GenericError", ""
2407
+ ) as GenericError;
2408
+ throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2409
+ }
2861
2410
  if (isCodeInRange("429", response.httpStatusCode)) {
2862
- const body: RateLimiterError = ObjectSerializer.deserialize(
2411
+ const body: RateLimitError = ObjectSerializer.deserialize(
2863
2412
  ObjectSerializer.parse(await response.body.text(), contentType),
2864
- "RateLimiterError", ""
2865
- ) as RateLimiterError;
2866
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2413
+ "RateLimitError", ""
2414
+ ) as RateLimitError;
2415
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2867
2416
  }
2868
2417
 
2869
2418
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2909,11 +2458,11 @@ export class DefaultApiResponseProcessor {
2909
2458
  throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2910
2459
  }
2911
2460
  if (isCodeInRange("429", response.httpStatusCode)) {
2912
- const body: RateLimiterError = ObjectSerializer.deserialize(
2461
+ const body: RateLimitError = ObjectSerializer.deserialize(
2913
2462
  ObjectSerializer.parse(await response.body.text(), contentType),
2914
- "RateLimiterError", ""
2915
- ) as RateLimiterError;
2916
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2463
+ "RateLimitError", ""
2464
+ ) as RateLimitError;
2465
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2917
2466
  }
2918
2467
 
2919
2468
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -2932,16 +2481,16 @@ export class DefaultApiResponseProcessor {
2932
2481
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2933
2482
  * to the expected objects
2934
2483
  *
2935
- * @params response Response returned by the server for a request to exportPlayers
2484
+ * @params response Response returned by the server for a request to exportSubscriptions
2936
2485
  * @throws ApiException if the response code was not in [200, 299]
2937
2486
  */
2938
- public async exportPlayers(response: ResponseContext): Promise<ExportPlayersSuccessResponse > {
2487
+ public async exportSubscriptions(response: ResponseContext): Promise<ExportSubscriptionsSuccessResponse > {
2939
2488
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2940
2489
  if (isCodeInRange("200", response.httpStatusCode)) {
2941
- const body: ExportPlayersSuccessResponse = ObjectSerializer.deserialize(
2490
+ const body: ExportSubscriptionsSuccessResponse = ObjectSerializer.deserialize(
2942
2491
  ObjectSerializer.parse(await response.body.text(), contentType),
2943
- "ExportPlayersSuccessResponse", ""
2944
- ) as ExportPlayersSuccessResponse;
2492
+ "ExportSubscriptionsSuccessResponse", ""
2493
+ ) as ExportSubscriptionsSuccessResponse;
2945
2494
  return body;
2946
2495
  }
2947
2496
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2952,19 +2501,19 @@ export class DefaultApiResponseProcessor {
2952
2501
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2953
2502
  }
2954
2503
  if (isCodeInRange("429", response.httpStatusCode)) {
2955
- const body: RateLimiterError = ObjectSerializer.deserialize(
2504
+ const body: RateLimitError = ObjectSerializer.deserialize(
2956
2505
  ObjectSerializer.parse(await response.body.text(), contentType),
2957
- "RateLimiterError", ""
2958
- ) as RateLimiterError;
2959
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2506
+ "RateLimitError", ""
2507
+ ) as RateLimitError;
2508
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
2960
2509
  }
2961
2510
 
2962
2511
  // Work around for missing responses in specification, e.g. for petstore.yaml
2963
2512
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2964
- const body: ExportPlayersSuccessResponse = ObjectSerializer.deserialize(
2513
+ const body: ExportSubscriptionsSuccessResponse = ObjectSerializer.deserialize(
2965
2514
  ObjectSerializer.parse(await response.body.text(), contentType),
2966
- "ExportPlayersSuccessResponse", ""
2967
- ) as ExportPlayersSuccessResponse;
2515
+ "ExportSubscriptionsSuccessResponse", ""
2516
+ ) as ExportSubscriptionsSuccessResponse;
2968
2517
  return body;
2969
2518
  }
2970
2519
 
@@ -2975,16 +2524,16 @@ export class DefaultApiResponseProcessor {
2975
2524
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
2976
2525
  * to the expected objects
2977
2526
  *
2978
- * @params response Response returned by the server for a request to fetchAliases
2527
+ * @params response Response returned by the server for a request to getAliases
2979
2528
  * @throws ApiException if the response code was not in [200, 299]
2980
2529
  */
2981
- public async fetchAliases(response: ResponseContext): Promise<UserIdentityResponse > {
2530
+ public async getAliases(response: ResponseContext): Promise<UserIdentityBody > {
2982
2531
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
2983
2532
  if (isCodeInRange("200", response.httpStatusCode)) {
2984
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
2533
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
2985
2534
  ObjectSerializer.parse(await response.body.text(), contentType),
2986
- "UserIdentityResponse", ""
2987
- ) as UserIdentityResponse;
2535
+ "UserIdentityBody", ""
2536
+ ) as UserIdentityBody;
2988
2537
  return body;
2989
2538
  }
2990
2539
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -2994,56 +2543,27 @@ export class DefaultApiResponseProcessor {
2994
2543
  ) as GenericError;
2995
2544
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2996
2545
  }
2997
-
2998
- // Work around for missing responses in specification, e.g. for petstore.yaml
2999
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3000
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
3001
- ObjectSerializer.parse(await response.body.text(), contentType),
3002
- "UserIdentityResponse", ""
3003
- ) as UserIdentityResponse;
3004
- return body;
3005
- }
3006
-
3007
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
3008
- }
3009
-
3010
- /**
3011
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
3012
- * to the expected objects
3013
- *
3014
- * @params response Response returned by the server for a request to fetchUser
3015
- * @throws ApiException if the response code was not in [200, 299]
3016
- */
3017
- public async fetchUser(response: ResponseContext): Promise<User > {
3018
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3019
- if (isCodeInRange("200", response.httpStatusCode)) {
3020
- const body: User = ObjectSerializer.deserialize(
3021
- ObjectSerializer.parse(await response.body.text(), contentType),
3022
- "User", ""
3023
- ) as User;
3024
- return body;
3025
- }
3026
- if (isCodeInRange("400", response.httpStatusCode)) {
2546
+ if (isCodeInRange("404", response.httpStatusCode)) {
3027
2547
  const body: GenericError = ObjectSerializer.deserialize(
3028
2548
  ObjectSerializer.parse(await response.body.text(), contentType),
3029
2549
  "GenericError", ""
3030
2550
  ) as GenericError;
3031
- throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
2551
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
3032
2552
  }
3033
2553
  if (isCodeInRange("429", response.httpStatusCode)) {
3034
- const body: RateLimiterError = ObjectSerializer.deserialize(
2554
+ const body: RateLimitError = ObjectSerializer.deserialize(
3035
2555
  ObjectSerializer.parse(await response.body.text(), contentType),
3036
- "RateLimiterError", ""
3037
- ) as RateLimiterError;
3038
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2556
+ "RateLimitError", ""
2557
+ ) as RateLimitError;
2558
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3039
2559
  }
3040
2560
 
3041
2561
  // Work around for missing responses in specification, e.g. for petstore.yaml
3042
2562
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3043
- const body: User = ObjectSerializer.deserialize(
2563
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
3044
2564
  ObjectSerializer.parse(await response.body.text(), contentType),
3045
- "User", ""
3046
- ) as User;
2565
+ "UserIdentityBody", ""
2566
+ ) as UserIdentityBody;
3047
2567
  return body;
3048
2568
  }
3049
2569
 
@@ -3054,16 +2574,16 @@ export class DefaultApiResponseProcessor {
3054
2574
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3055
2575
  * to the expected objects
3056
2576
  *
3057
- * @params response Response returned by the server for a request to fetchUserIdentity
2577
+ * @params response Response returned by the server for a request to getAliasesBySubscription
3058
2578
  * @throws ApiException if the response code was not in [200, 299]
3059
2579
  */
3060
- public async fetchUserIdentity(response: ResponseContext): Promise<InlineResponse200 > {
2580
+ public async getAliasesBySubscription(response: ResponseContext): Promise<UserIdentityBody > {
3061
2581
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3062
2582
  if (isCodeInRange("200", response.httpStatusCode)) {
3063
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2583
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
3064
2584
  ObjectSerializer.parse(await response.body.text(), contentType),
3065
- "InlineResponse200", ""
3066
- ) as InlineResponse200;
2585
+ "UserIdentityBody", ""
2586
+ ) as UserIdentityBody;
3067
2587
  return body;
3068
2588
  }
3069
2589
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -3073,20 +2593,20 @@ export class DefaultApiResponseProcessor {
3073
2593
  ) as GenericError;
3074
2594
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3075
2595
  }
3076
- if (isCodeInRange("429", response.httpStatusCode)) {
3077
- const body: RateLimiterError = ObjectSerializer.deserialize(
2596
+ if (isCodeInRange("404", response.httpStatusCode)) {
2597
+ const body: GenericError = ObjectSerializer.deserialize(
3078
2598
  ObjectSerializer.parse(await response.body.text(), contentType),
3079
- "RateLimiterError", ""
3080
- ) as RateLimiterError;
3081
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2599
+ "GenericError", ""
2600
+ ) as GenericError;
2601
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
3082
2602
  }
3083
2603
 
3084
2604
  // Work around for missing responses in specification, e.g. for petstore.yaml
3085
2605
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3086
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2606
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
3087
2607
  ObjectSerializer.parse(await response.body.text(), contentType),
3088
- "InlineResponse200", ""
3089
- ) as InlineResponse200;
2608
+ "UserIdentityBody", ""
2609
+ ) as UserIdentityBody;
3090
2610
  return body;
3091
2611
  }
3092
2612
 
@@ -3117,11 +2637,11 @@ export class DefaultApiResponseProcessor {
3117
2637
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3118
2638
  }
3119
2639
  if (isCodeInRange("429", response.httpStatusCode)) {
3120
- const body: RateLimiterError = ObjectSerializer.deserialize(
2640
+ const body: RateLimitError = ObjectSerializer.deserialize(
3121
2641
  ObjectSerializer.parse(await response.body.text(), contentType),
3122
- "RateLimiterError", ""
3123
- ) as RateLimiterError;
3124
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2642
+ "RateLimitError", ""
2643
+ ) as RateLimitError;
2644
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3125
2645
  }
3126
2646
 
3127
2647
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3160,11 +2680,11 @@ export class DefaultApiResponseProcessor {
3160
2680
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3161
2681
  }
3162
2682
  if (isCodeInRange("429", response.httpStatusCode)) {
3163
- const body: RateLimiterError = ObjectSerializer.deserialize(
2683
+ const body: RateLimitError = ObjectSerializer.deserialize(
3164
2684
  ObjectSerializer.parse(await response.body.text(), contentType),
3165
- "RateLimiterError", ""
3166
- ) as RateLimiterError;
3167
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2685
+ "RateLimitError", ""
2686
+ ) as RateLimitError;
2687
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3168
2688
  }
3169
2689
 
3170
2690
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3179,49 +2699,6 @@ export class DefaultApiResponseProcessor {
3179
2699
  throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
3180
2700
  }
3181
2701
 
3182
- /**
3183
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
3184
- * to the expected objects
3185
- *
3186
- * @params response Response returned by the server for a request to getEligibleIams
3187
- * @throws ApiException if the response code was not in [200, 299]
3188
- */
3189
- public async getEligibleIams(response: ResponseContext): Promise<InlineResponse2003 > {
3190
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3191
- if (isCodeInRange("200", response.httpStatusCode)) {
3192
- const body: InlineResponse2003 = ObjectSerializer.deserialize(
3193
- ObjectSerializer.parse(await response.body.text(), contentType),
3194
- "InlineResponse2003", ""
3195
- ) as InlineResponse2003;
3196
- return body;
3197
- }
3198
- if (isCodeInRange("400", response.httpStatusCode)) {
3199
- const body: GenericError = ObjectSerializer.deserialize(
3200
- ObjectSerializer.parse(await response.body.text(), contentType),
3201
- "GenericError", ""
3202
- ) as GenericError;
3203
- throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3204
- }
3205
- if (isCodeInRange("429", response.httpStatusCode)) {
3206
- const body: RateLimiterError = ObjectSerializer.deserialize(
3207
- ObjectSerializer.parse(await response.body.text(), contentType),
3208
- "RateLimiterError", ""
3209
- ) as RateLimiterError;
3210
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3211
- }
3212
-
3213
- // Work around for missing responses in specification, e.g. for petstore.yaml
3214
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3215
- const body: InlineResponse2003 = ObjectSerializer.deserialize(
3216
- ObjectSerializer.parse(await response.body.text(), contentType),
3217
- "InlineResponse2003", ""
3218
- ) as InlineResponse2003;
3219
- return body;
3220
- }
3221
-
3222
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
3223
- }
3224
-
3225
2702
  /**
3226
2703
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3227
2704
  * to the expected objects
@@ -3245,12 +2722,19 @@ export class DefaultApiResponseProcessor {
3245
2722
  ) as GenericError;
3246
2723
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3247
2724
  }
2725
+ if (isCodeInRange("404", response.httpStatusCode)) {
2726
+ const body: GenericError = ObjectSerializer.deserialize(
2727
+ ObjectSerializer.parse(await response.body.text(), contentType),
2728
+ "GenericError", ""
2729
+ ) as GenericError;
2730
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2731
+ }
3248
2732
  if (isCodeInRange("429", response.httpStatusCode)) {
3249
- const body: RateLimiterError = ObjectSerializer.deserialize(
2733
+ const body: RateLimitError = ObjectSerializer.deserialize(
3250
2734
  ObjectSerializer.parse(await response.body.text(), contentType),
3251
- "RateLimiterError", ""
3252
- ) as RateLimiterError;
3253
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2735
+ "RateLimitError", ""
2736
+ ) as RateLimitError;
2737
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3254
2738
  }
3255
2739
 
3256
2740
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3288,12 +2772,19 @@ export class DefaultApiResponseProcessor {
3288
2772
  ) as GenericError;
3289
2773
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3290
2774
  }
2775
+ if (isCodeInRange("404", response.httpStatusCode)) {
2776
+ const body: GenericError = ObjectSerializer.deserialize(
2777
+ ObjectSerializer.parse(await response.body.text(), contentType),
2778
+ "GenericError", ""
2779
+ ) as GenericError;
2780
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
2781
+ }
3291
2782
  if (isCodeInRange("429", response.httpStatusCode)) {
3292
- const body: RateLimiterError = ObjectSerializer.deserialize(
2783
+ const body: RateLimitError = ObjectSerializer.deserialize(
3293
2784
  ObjectSerializer.parse(await response.body.text(), contentType),
3294
- "RateLimiterError", ""
3295
- ) as RateLimiterError;
3296
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2785
+ "RateLimitError", ""
2786
+ ) as RateLimitError;
2787
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3297
2788
  }
3298
2789
 
3299
2790
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3332,11 +2823,11 @@ export class DefaultApiResponseProcessor {
3332
2823
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3333
2824
  }
3334
2825
  if (isCodeInRange("429", response.httpStatusCode)) {
3335
- const body: RateLimiterError = ObjectSerializer.deserialize(
2826
+ const body: RateLimitError = ObjectSerializer.deserialize(
3336
2827
  ObjectSerializer.parse(await response.body.text(), contentType),
3337
- "RateLimiterError", ""
3338
- ) as RateLimiterError;
3339
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2828
+ "RateLimitError", ""
2829
+ ) as RateLimitError;
2830
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3340
2831
  }
3341
2832
 
3342
2833
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3375,11 +2866,11 @@ export class DefaultApiResponseProcessor {
3375
2866
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3376
2867
  }
3377
2868
  if (isCodeInRange("429", response.httpStatusCode)) {
3378
- const body: RateLimiterError = ObjectSerializer.deserialize(
2869
+ const body: RateLimitError = ObjectSerializer.deserialize(
3379
2870
  ObjectSerializer.parse(await response.body.text(), contentType),
3380
- "RateLimiterError", ""
3381
- ) as RateLimiterError;
3382
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2871
+ "RateLimitError", ""
2872
+ ) as RateLimitError;
2873
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3383
2874
  }
3384
2875
 
3385
2876
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3398,59 +2889,16 @@ export class DefaultApiResponseProcessor {
3398
2889
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3399
2890
  * to the expected objects
3400
2891
  *
3401
- * @params response Response returned by the server for a request to getPlayer
3402
- * @throws ApiException if the response code was not in [200, 299]
3403
- */
3404
- public async getPlayer(response: ResponseContext): Promise<Player > {
3405
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3406
- if (isCodeInRange("200", response.httpStatusCode)) {
3407
- const body: Player = ObjectSerializer.deserialize(
3408
- ObjectSerializer.parse(await response.body.text(), contentType),
3409
- "Player", ""
3410
- ) as Player;
3411
- return body;
3412
- }
3413
- if (isCodeInRange("400", response.httpStatusCode)) {
3414
- const body: GenericError = ObjectSerializer.deserialize(
3415
- ObjectSerializer.parse(await response.body.text(), contentType),
3416
- "GenericError", ""
3417
- ) as GenericError;
3418
- throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3419
- }
3420
- if (isCodeInRange("429", response.httpStatusCode)) {
3421
- const body: RateLimiterError = ObjectSerializer.deserialize(
3422
- ObjectSerializer.parse(await response.body.text(), contentType),
3423
- "RateLimiterError", ""
3424
- ) as RateLimiterError;
3425
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3426
- }
3427
-
3428
- // Work around for missing responses in specification, e.g. for petstore.yaml
3429
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3430
- const body: Player = ObjectSerializer.deserialize(
3431
- ObjectSerializer.parse(await response.body.text(), contentType),
3432
- "Player", ""
3433
- ) as Player;
3434
- return body;
3435
- }
3436
-
3437
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
3438
- }
3439
-
3440
- /**
3441
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
3442
- * to the expected objects
3443
- *
3444
- * @params response Response returned by the server for a request to getPlayers
2892
+ * @params response Response returned by the server for a request to getSegments
3445
2893
  * @throws ApiException if the response code was not in [200, 299]
3446
2894
  */
3447
- public async getPlayers(response: ResponseContext): Promise<PlayerSlice > {
2895
+ public async getSegments(response: ResponseContext): Promise<GetSegmentsSuccessResponse > {
3448
2896
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3449
- if (isCodeInRange("200", response.httpStatusCode)) {
3450
- const body: PlayerSlice = ObjectSerializer.deserialize(
2897
+ if (isCodeInRange("201", response.httpStatusCode)) {
2898
+ const body: GetSegmentsSuccessResponse = ObjectSerializer.deserialize(
3451
2899
  ObjectSerializer.parse(await response.body.text(), contentType),
3452
- "PlayerSlice", ""
3453
- ) as PlayerSlice;
2900
+ "GetSegmentsSuccessResponse", ""
2901
+ ) as GetSegmentsSuccessResponse;
3454
2902
  return body;
3455
2903
  }
3456
2904
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -3461,19 +2909,19 @@ export class DefaultApiResponseProcessor {
3461
2909
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3462
2910
  }
3463
2911
  if (isCodeInRange("429", response.httpStatusCode)) {
3464
- const body: RateLimiterError = ObjectSerializer.deserialize(
2912
+ const body: RateLimitError = ObjectSerializer.deserialize(
3465
2913
  ObjectSerializer.parse(await response.body.text(), contentType),
3466
- "RateLimiterError", ""
3467
- ) as RateLimiterError;
3468
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2914
+ "RateLimitError", ""
2915
+ ) as RateLimitError;
2916
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3469
2917
  }
3470
2918
 
3471
2919
  // Work around for missing responses in specification, e.g. for petstore.yaml
3472
2920
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3473
- const body: PlayerSlice = ObjectSerializer.deserialize(
2921
+ const body: GetSegmentsSuccessResponse = ObjectSerializer.deserialize(
3474
2922
  ObjectSerializer.parse(await response.body.text(), contentType),
3475
- "PlayerSlice", ""
3476
- ) as PlayerSlice;
2923
+ "GetSegmentsSuccessResponse", ""
2924
+ ) as GetSegmentsSuccessResponse;
3477
2925
  return body;
3478
2926
  }
3479
2927
 
@@ -3484,16 +2932,16 @@ export class DefaultApiResponseProcessor {
3484
2932
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3485
2933
  * to the expected objects
3486
2934
  *
3487
- * @params response Response returned by the server for a request to identifyUserByAlias
2935
+ * @params response Response returned by the server for a request to getUser
3488
2936
  * @throws ApiException if the response code was not in [200, 299]
3489
2937
  */
3490
- public async identifyUserByAlias(response: ResponseContext): Promise<InlineResponse200 > {
2938
+ public async getUser(response: ResponseContext): Promise<User > {
3491
2939
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3492
2940
  if (isCodeInRange("200", response.httpStatusCode)) {
3493
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2941
+ const body: User = ObjectSerializer.deserialize(
3494
2942
  ObjectSerializer.parse(await response.body.text(), contentType),
3495
- "InlineResponse200", ""
3496
- ) as InlineResponse200;
2943
+ "User", ""
2944
+ ) as User;
3497
2945
  return body;
3498
2946
  }
3499
2947
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -3503,27 +2951,27 @@ export class DefaultApiResponseProcessor {
3503
2951
  ) as GenericError;
3504
2952
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3505
2953
  }
3506
- if (isCodeInRange("409", response.httpStatusCode)) {
2954
+ if (isCodeInRange("404", response.httpStatusCode)) {
3507
2955
  const body: GenericError = ObjectSerializer.deserialize(
3508
2956
  ObjectSerializer.parse(await response.body.text(), contentType),
3509
2957
  "GenericError", ""
3510
2958
  ) as GenericError;
3511
- throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
2959
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
3512
2960
  }
3513
2961
  if (isCodeInRange("429", response.httpStatusCode)) {
3514
- const body: RateLimiterError = ObjectSerializer.deserialize(
2962
+ const body: RateLimitError = ObjectSerializer.deserialize(
3515
2963
  ObjectSerializer.parse(await response.body.text(), contentType),
3516
- "RateLimiterError", ""
3517
- ) as RateLimiterError;
3518
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
2964
+ "RateLimitError", ""
2965
+ ) as RateLimitError;
2966
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3519
2967
  }
3520
2968
 
3521
2969
  // Work around for missing responses in specification, e.g. for petstore.yaml
3522
2970
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3523
- const body: InlineResponse200 = ObjectSerializer.deserialize(
2971
+ const body: User = ObjectSerializer.deserialize(
3524
2972
  ObjectSerializer.parse(await response.body.text(), contentType),
3525
- "InlineResponse200", ""
3526
- ) as InlineResponse200;
2973
+ "User", ""
2974
+ ) as User;
3527
2975
  return body;
3528
2976
  }
3529
2977
 
@@ -3534,16 +2982,16 @@ export class DefaultApiResponseProcessor {
3534
2982
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3535
2983
  * to the expected objects
3536
2984
  *
3537
- * @params response Response returned by the server for a request to identifyUserBySubscriptionId
2985
+ * @params response Response returned by the server for a request to transferSubscription
3538
2986
  * @throws ApiException if the response code was not in [200, 299]
3539
2987
  */
3540
- public async identifyUserBySubscriptionId(response: ResponseContext): Promise<UserIdentityResponse > {
2988
+ public async transferSubscription(response: ResponseContext): Promise<UserIdentityBody > {
3541
2989
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3542
2990
  if (isCodeInRange("200", response.httpStatusCode)) {
3543
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
2991
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
3544
2992
  ObjectSerializer.parse(await response.body.text(), contentType),
3545
- "UserIdentityResponse", ""
3546
- ) as UserIdentityResponse;
2993
+ "UserIdentityBody", ""
2994
+ ) as UserIdentityBody;
3547
2995
  return body;
3548
2996
  }
3549
2997
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -3553,6 +3001,13 @@ export class DefaultApiResponseProcessor {
3553
3001
  ) as GenericError;
3554
3002
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3555
3003
  }
3004
+ if (isCodeInRange("404", response.httpStatusCode)) {
3005
+ const body: GenericError = ObjectSerializer.deserialize(
3006
+ ObjectSerializer.parse(await response.body.text(), contentType),
3007
+ "GenericError", ""
3008
+ ) as GenericError;
3009
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
3010
+ }
3556
3011
  if (isCodeInRange("409", response.httpStatusCode)) {
3557
3012
  const body: GenericError = ObjectSerializer.deserialize(
3558
3013
  ObjectSerializer.parse(await response.body.text(), contentType),
@@ -3561,19 +3016,19 @@ export class DefaultApiResponseProcessor {
3561
3016
  throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3562
3017
  }
3563
3018
  if (isCodeInRange("429", response.httpStatusCode)) {
3564
- const body: RateLimiterError = ObjectSerializer.deserialize(
3019
+ const body: RateLimitError = ObjectSerializer.deserialize(
3565
3020
  ObjectSerializer.parse(await response.body.text(), contentType),
3566
- "RateLimiterError", ""
3567
- ) as RateLimiterError;
3568
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3021
+ "RateLimitError", ""
3022
+ ) as RateLimitError;
3023
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3569
3024
  }
3570
3025
 
3571
3026
  // Work around for missing responses in specification, e.g. for petstore.yaml
3572
3027
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3573
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
3028
+ const body: UserIdentityBody = ObjectSerializer.deserialize(
3574
3029
  ObjectSerializer.parse(await response.body.text(), contentType),
3575
- "UserIdentityResponse", ""
3576
- ) as UserIdentityResponse;
3030
+ "UserIdentityBody", ""
3031
+ ) as UserIdentityBody;
3577
3032
  return body;
3578
3033
  }
3579
3034
 
@@ -3584,16 +3039,16 @@ export class DefaultApiResponseProcessor {
3584
3039
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3585
3040
  * to the expected objects
3586
3041
  *
3587
- * @params response Response returned by the server for a request to transferSubscription
3042
+ * @params response Response returned by the server for a request to unsubscribeEmailWithToken
3588
3043
  * @throws ApiException if the response code was not in [200, 299]
3589
3044
  */
3590
- public async transferSubscription(response: ResponseContext): Promise<UserIdentityResponse > {
3045
+ public async unsubscribeEmailWithToken(response: ResponseContext): Promise<GenericSuccessBoolResponse > {
3591
3046
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3592
- if (isCodeInRange("200", response.httpStatusCode)) {
3593
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
3047
+ if (isCodeInRange("202", response.httpStatusCode)) {
3048
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
3594
3049
  ObjectSerializer.parse(await response.body.text(), contentType),
3595
- "UserIdentityResponse", ""
3596
- ) as UserIdentityResponse;
3050
+ "GenericSuccessBoolResponse", ""
3051
+ ) as GenericSuccessBoolResponse;
3597
3052
  return body;
3598
3053
  }
3599
3054
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -3603,27 +3058,20 @@ export class DefaultApiResponseProcessor {
3603
3058
  ) as GenericError;
3604
3059
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3605
3060
  }
3606
- if (isCodeInRange("409", response.httpStatusCode)) {
3607
- const body: GenericError = ObjectSerializer.deserialize(
3608
- ObjectSerializer.parse(await response.body.text(), contentType),
3609
- "GenericError", ""
3610
- ) as GenericError;
3611
- throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3612
- }
3613
3061
  if (isCodeInRange("429", response.httpStatusCode)) {
3614
- const body: RateLimiterError = ObjectSerializer.deserialize(
3062
+ const body: RateLimitError = ObjectSerializer.deserialize(
3615
3063
  ObjectSerializer.parse(await response.body.text(), contentType),
3616
- "RateLimiterError", ""
3617
- ) as RateLimiterError;
3618
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3064
+ "RateLimitError", ""
3065
+ ) as RateLimitError;
3066
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3619
3067
  }
3620
3068
 
3621
3069
  // Work around for missing responses in specification, e.g. for petstore.yaml
3622
3070
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3623
- const body: UserIdentityResponse = ObjectSerializer.deserialize(
3071
+ const body: GenericSuccessBoolResponse = ObjectSerializer.deserialize(
3624
3072
  ObjectSerializer.parse(await response.body.text(), contentType),
3625
- "UserIdentityResponse", ""
3626
- ) as UserIdentityResponse;
3073
+ "GenericSuccessBoolResponse", ""
3074
+ ) as GenericSuccessBoolResponse;
3627
3075
  return body;
3628
3076
  }
3629
3077
 
@@ -3654,11 +3102,11 @@ export class DefaultApiResponseProcessor {
3654
3102
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3655
3103
  }
3656
3104
  if (isCodeInRange("429", response.httpStatusCode)) {
3657
- const body: RateLimiterError = ObjectSerializer.deserialize(
3105
+ const body: RateLimitError = ObjectSerializer.deserialize(
3658
3106
  ObjectSerializer.parse(await response.body.text(), contentType),
3659
- "RateLimiterError", ""
3660
- ) as RateLimiterError;
3661
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3107
+ "RateLimitError", ""
3108
+ ) as RateLimitError;
3109
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3662
3110
  }
3663
3111
 
3664
3112
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3697,11 +3145,11 @@ export class DefaultApiResponseProcessor {
3697
3145
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3698
3146
  }
3699
3147
  if (isCodeInRange("429", response.httpStatusCode)) {
3700
- const body: RateLimiterError = ObjectSerializer.deserialize(
3148
+ const body: RateLimitError = ObjectSerializer.deserialize(
3701
3149
  ObjectSerializer.parse(await response.body.text(), contentType),
3702
- "RateLimiterError", ""
3703
- ) as RateLimiterError;
3704
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3150
+ "RateLimitError", ""
3151
+ ) as RateLimitError;
3152
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3705
3153
  }
3706
3154
 
3707
3155
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3720,67 +3168,13 @@ export class DefaultApiResponseProcessor {
3720
3168
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
3721
3169
  * to the expected objects
3722
3170
  *
3723
- * @params response Response returned by the server for a request to updatePlayer
3724
- * @throws ApiException if the response code was not in [200, 299]
3725
- */
3726
- public async updatePlayer(response: ResponseContext): Promise<UpdatePlayerSuccessResponse > {
3727
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3728
- if (isCodeInRange("200", response.httpStatusCode)) {
3729
- const body: UpdatePlayerSuccessResponse = ObjectSerializer.deserialize(
3730
- ObjectSerializer.parse(await response.body.text(), contentType),
3731
- "UpdatePlayerSuccessResponse", ""
3732
- ) as UpdatePlayerSuccessResponse;
3733
- return body;
3734
- }
3735
- if (isCodeInRange("400", response.httpStatusCode)) {
3736
- const body: GenericError = ObjectSerializer.deserialize(
3737
- ObjectSerializer.parse(await response.body.text(), contentType),
3738
- "GenericError", ""
3739
- ) as GenericError;
3740
- throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3741
- }
3742
- if (isCodeInRange("409", response.httpStatusCode)) {
3743
- const body: GenericError = ObjectSerializer.deserialize(
3744
- ObjectSerializer.parse(await response.body.text(), contentType),
3745
- "GenericError", ""
3746
- ) as GenericError;
3747
- throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3748
- }
3749
- if (isCodeInRange("429", response.httpStatusCode)) {
3750
- const body: RateLimiterError = ObjectSerializer.deserialize(
3751
- ObjectSerializer.parse(await response.body.text(), contentType),
3752
- "RateLimiterError", ""
3753
- ) as RateLimiterError;
3754
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3755
- }
3756
-
3757
- // Work around for missing responses in specification, e.g. for petstore.yaml
3758
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3759
- const body: UpdatePlayerSuccessResponse = ObjectSerializer.deserialize(
3760
- ObjectSerializer.parse(await response.body.text(), contentType),
3761
- "UpdatePlayerSuccessResponse", ""
3762
- ) as UpdatePlayerSuccessResponse;
3763
- return body;
3764
- }
3765
-
3766
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
3767
- }
3768
-
3769
- /**
3770
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
3771
- * to the expected objects
3772
- *
3773
- * @params response Response returned by the server for a request to updatePlayerTags
3171
+ * @params response Response returned by the server for a request to updateSubscription
3774
3172
  * @throws ApiException if the response code was not in [200, 299]
3775
3173
  */
3776
- public async updatePlayerTags(response: ResponseContext): Promise<UpdatePlayerTagsSuccessResponse > {
3174
+ public async updateSubscription(response: ResponseContext): Promise<void > {
3777
3175
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3778
3176
  if (isCodeInRange("200", response.httpStatusCode)) {
3779
- const body: UpdatePlayerTagsSuccessResponse = ObjectSerializer.deserialize(
3780
- ObjectSerializer.parse(await response.body.text(), contentType),
3781
- "UpdatePlayerTagsSuccessResponse", ""
3782
- ) as UpdatePlayerTagsSuccessResponse;
3783
- return body;
3177
+ return;
3784
3178
  }
3785
3179
  if (isCodeInRange("400", response.httpStatusCode)) {
3786
3180
  const body: GenericError = ObjectSerializer.deserialize(
@@ -3789,51 +3183,12 @@ export class DefaultApiResponseProcessor {
3789
3183
  ) as GenericError;
3790
3184
  throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3791
3185
  }
3792
- if (isCodeInRange("409", response.httpStatusCode)) {
3793
- const body: GenericError = ObjectSerializer.deserialize(
3794
- ObjectSerializer.parse(await response.body.text(), contentType),
3795
- "GenericError", ""
3796
- ) as GenericError;
3797
- throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3798
- }
3799
- if (isCodeInRange("429", response.httpStatusCode)) {
3800
- const body: RateLimiterError = ObjectSerializer.deserialize(
3801
- ObjectSerializer.parse(await response.body.text(), contentType),
3802
- "RateLimiterError", ""
3803
- ) as RateLimiterError;
3804
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3805
- }
3806
-
3807
- // Work around for missing responses in specification, e.g. for petstore.yaml
3808
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3809
- const body: UpdatePlayerTagsSuccessResponse = ObjectSerializer.deserialize(
3810
- ObjectSerializer.parse(await response.body.text(), contentType),
3811
- "UpdatePlayerTagsSuccessResponse", ""
3812
- ) as UpdatePlayerTagsSuccessResponse;
3813
- return body;
3814
- }
3815
-
3816
- throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
3817
- }
3818
-
3819
- /**
3820
- * Unwraps the actual response sent by the server from the response context and deserializes the response content
3821
- * to the expected objects
3822
- *
3823
- * @params response Response returned by the server for a request to updateSubscription
3824
- * @throws ApiException if the response code was not in [200, 299]
3825
- */
3826
- public async updateSubscription(response: ResponseContext): Promise<void > {
3827
- const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3828
- if (isCodeInRange("202", response.httpStatusCode)) {
3829
- return;
3830
- }
3831
- if (isCodeInRange("400", response.httpStatusCode)) {
3186
+ if (isCodeInRange("404", response.httpStatusCode)) {
3832
3187
  const body: GenericError = ObjectSerializer.deserialize(
3833
3188
  ObjectSerializer.parse(await response.body.text(), contentType),
3834
3189
  "GenericError", ""
3835
3190
  ) as GenericError;
3836
- throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
3191
+ throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
3837
3192
  }
3838
3193
  if (isCodeInRange("409", response.httpStatusCode)) {
3839
3194
  const body: GenericError = ObjectSerializer.deserialize(
@@ -3843,11 +3198,11 @@ export class DefaultApiResponseProcessor {
3843
3198
  throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3844
3199
  }
3845
3200
  if (isCodeInRange("429", response.httpStatusCode)) {
3846
- const body: RateLimiterError = ObjectSerializer.deserialize(
3201
+ const body: RateLimitError = ObjectSerializer.deserialize(
3847
3202
  ObjectSerializer.parse(await response.body.text(), contentType),
3848
- "RateLimiterError", ""
3849
- ) as RateLimiterError;
3850
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3203
+ "RateLimitError", ""
3204
+ ) as RateLimitError;
3205
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3851
3206
  }
3852
3207
 
3853
3208
  // Work around for missing responses in specification, e.g. for petstore.yaml
@@ -3869,13 +3224,13 @@ export class DefaultApiResponseProcessor {
3869
3224
  * @params response Response returned by the server for a request to updateUser
3870
3225
  * @throws ApiException if the response code was not in [200, 299]
3871
3226
  */
3872
- public async updateUser(response: ResponseContext): Promise<InlineResponse202 > {
3227
+ public async updateUser(response: ResponseContext): Promise<PropertiesBody > {
3873
3228
  const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3874
3229
  if (isCodeInRange("202", response.httpStatusCode)) {
3875
- const body: InlineResponse202 = ObjectSerializer.deserialize(
3230
+ const body: PropertiesBody = ObjectSerializer.deserialize(
3876
3231
  ObjectSerializer.parse(await response.body.text(), contentType),
3877
- "InlineResponse202", ""
3878
- ) as InlineResponse202;
3232
+ "PropertiesBody", ""
3233
+ ) as PropertiesBody;
3879
3234
  return body;
3880
3235
  }
3881
3236
  if (isCodeInRange("400", response.httpStatusCode)) {
@@ -3893,19 +3248,19 @@ export class DefaultApiResponseProcessor {
3893
3248
  throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
3894
3249
  }
3895
3250
  if (isCodeInRange("429", response.httpStatusCode)) {
3896
- const body: RateLimiterError = ObjectSerializer.deserialize(
3251
+ const body: RateLimitError = ObjectSerializer.deserialize(
3897
3252
  ObjectSerializer.parse(await response.body.text(), contentType),
3898
- "RateLimiterError", ""
3899
- ) as RateLimiterError;
3900
- throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
3253
+ "RateLimitError", ""
3254
+ ) as RateLimitError;
3255
+ throw new ApiException<RateLimitError>(429, "Rate Limit Exceeded", body, response.headers);
3901
3256
  }
3902
3257
 
3903
3258
  // Work around for missing responses in specification, e.g. for petstore.yaml
3904
3259
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
3905
- const body: InlineResponse202 = ObjectSerializer.deserialize(
3260
+ const body: PropertiesBody = ObjectSerializer.deserialize(
3906
3261
  ObjectSerializer.parse(await response.body.text(), contentType),
3907
- "InlineResponse202", ""
3908
- ) as InlineResponse202;
3262
+ "PropertiesBody", ""
3263
+ ) as PropertiesBody;
3909
3264
  return body;
3910
3265
  }
3911
3266