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