@openfort/openfort-node 0.6.52 → 0.6.53
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/dist/apis/eventsApiWrapper.d.ts +28 -0
- package/dist/apis/eventsApiWrapper.js +56 -0
- package/dist/apis/eventsApiWrapper.js.map +1 -0
- package/dist/apis/iamApiWrapper.d.ts +11 -1
- package/dist/apis/iamApiWrapper.js +42 -0
- package/dist/apis/iamApiWrapper.js.map +1 -1
- package/dist/apis/policiesApiWrapper.js +2 -2
- package/dist/apis/policiesApiWrapper.js.map +1 -1
- package/dist/apis/settingsApiWrapper.d.ts +0 -9
- package/dist/apis/settingsApiWrapper.js +0 -13
- package/dist/apis/settingsApiWrapper.js.map +1 -1
- package/dist/apis/subscriptionsApiWrapper.d.ts +28 -0
- package/dist/apis/{notificationsApiWrapper.js → subscriptionsApiWrapper.js} +21 -21
- package/dist/apis/subscriptionsApiWrapper.js.map +1 -0
- package/dist/generated/apis/AdminAuthenticationApi.d.ts +16 -0
- package/dist/generated/apis/AdminAuthenticationApi.js +61 -0
- package/dist/generated/apis/AdminAuthenticationApi.js.map +1 -1
- package/dist/generated/apis/EventsApi.d.ts +75 -0
- package/dist/generated/apis/{NotificationsApi.js → EventsApi.js} +57 -67
- package/dist/generated/apis/EventsApi.js.map +1 -0
- package/dist/generated/apis/SettingsApi.d.ts +0 -28
- package/dist/generated/apis/SettingsApi.js +0 -108
- package/dist/generated/apis/SettingsApi.js.map +1 -1
- package/dist/generated/apis/SubscriptionsApi.d.ts +171 -0
- package/dist/generated/apis/SubscriptionsApi.js +616 -0
- package/dist/generated/apis/SubscriptionsApi.js.map +1 -0
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/index.js +3 -4
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/models/{EntityTypeNOTIFICATIONSUBSCRIPTION.js → APITopic.d.ts} +1 -3
- package/dist/generated/models/{SubscriptionType.js → APITopic.js} +1 -1
- package/dist/generated/models/APITopic.js.map +1 -0
- package/dist/generated/models/{EntityTypeNOTIFICATIONTRIGGER.d.ts → APITopicBALANCECONTRACT.d.ts} +1 -1
- package/dist/generated/models/{NotificationTriggerType.js → APITopicBALANCECONTRACT.js} +1 -1
- package/dist/generated/models/APITopicBALANCECONTRACT.js.map +1 -0
- package/dist/generated/models/{NotificationTriggerTypeCONTRACTTRIGGER.d.ts → APITopicBALANCEDEVACCOUNT.d.ts} +1 -1
- package/dist/generated/models/{EntityTypeNOTIFICATIONTRIGGER.js → APITopicBALANCEDEVACCOUNT.js} +1 -1
- package/dist/generated/models/APITopicBALANCEDEVACCOUNT.js.map +1 -0
- package/dist/generated/models/APITopicBALANCEPROJECT.d.ts +12 -0
- package/dist/generated/models/{EntityTypeNOTIFICATION.js → APITopicBALANCEPROJECT.js} +1 -1
- package/dist/generated/models/APITopicBALANCEPROJECT.js.map +1 -0
- package/dist/generated/models/{NotificationResponseExpandable.d.ts → APITopicTRANSACTIONSUCCESSFUL.d.ts} +1 -1
- package/dist/generated/models/APITopicTRANSACTIONSUCCESSFUL.js +14 -0
- package/dist/generated/models/APITopicTRANSACTIONSUCCESSFUL.js.map +1 -0
- package/dist/generated/models/{SubscriptionType.d.ts → APITriggerType.d.ts} +1 -1
- package/dist/generated/models/APITriggerType.js +14 -0
- package/dist/generated/models/APITriggerType.js.map +1 -0
- package/dist/generated/models/{AccountNotificationTriggerResponseAccount.d.ts → AccountEventResponse.d.ts} +8 -7
- package/dist/generated/models/{AccountNotificationTriggerResponse.js → AccountEventResponse.js} +14 -14
- package/dist/generated/models/AccountEventResponse.js.map +1 -0
- package/dist/generated/models/AuthPlayerResponseWithRecoveryShare.d.ts +36 -0
- package/dist/generated/models/AuthPlayerResponseWithRecoveryShare.js +62 -0
- package/dist/generated/models/AuthPlayerResponseWithRecoveryShare.js.map +1 -0
- package/dist/generated/models/AuthenticateOAuthRequest.d.ts +5 -0
- package/dist/generated/models/AuthenticateOAuthRequest.js +6 -0
- package/dist/generated/models/AuthenticateOAuthRequest.js.map +1 -1
- package/dist/generated/models/{NotificationSubscriptionDeleteResponse.d.ts → BalanceEventResponse.d.ts} +7 -4
- package/dist/generated/models/{NotificationSubscription.js → BalanceEventResponse.js} +14 -14
- package/dist/generated/models/BalanceEventResponse.js.map +1 -0
- package/dist/generated/models/{NotificationSubscriptionListResponse.d.ts → BaseEntityListResponseLogResponse.d.ts} +3 -3
- package/dist/generated/models/{NotificationTriggerListResponse.js → BaseEntityListResponseLogResponse.js} +8 -8
- package/dist/generated/models/BaseEntityListResponseLogResponse.js.map +1 -0
- package/dist/generated/models/{NotificationTriggerListResponse.d.ts → BaseEntityListResponseTriggerResponse.d.ts} +3 -3
- package/dist/generated/models/{NotificationSubscriptionListResponse.js → BaseEntityListResponseTriggerResponse.js} +8 -8
- package/dist/generated/models/BaseEntityListResponseTriggerResponse.js.map +1 -0
- package/dist/generated/models/{BalanceNotificationTriggerResponse.d.ts → ContractEventResponse.d.ts} +9 -5
- package/dist/generated/models/{ContractNotificationTriggerResponse.js → ContractEventResponse.js} +12 -12
- package/dist/generated/models/ContractEventResponse.js.map +1 -0
- package/dist/generated/models/ContractPolicyRuleResponse.d.ts +2 -2
- package/dist/generated/models/ContractPolicyRuleResponse.js +1 -1
- package/dist/generated/models/ContractPolicyRuleResponse.js.map +1 -1
- package/dist/generated/models/{ContractNotificationTriggerResponseContract.d.ts → ContractPolicyRuleResponseContract.d.ts} +1 -1
- package/dist/generated/models/{ContractNotificationTriggerResponseContract.js → ContractPolicyRuleResponseContract.js} +7 -7
- package/dist/generated/models/ContractPolicyRuleResponseContract.js.map +1 -0
- package/dist/generated/models/{CreateNotificationRequest.d.ts → CreateAuthPlayerRequest.d.ts} +9 -3
- package/dist/generated/models/CreateAuthPlayerRequest.js +44 -0
- package/dist/generated/models/CreateAuthPlayerRequest.js.map +1 -0
- package/dist/generated/models/{CreateNotificationTriggerRequest.d.ts → CreateEventRequest.d.ts} +19 -15
- package/dist/generated/models/{CreateNotificationTriggerRequest.js → CreateEventRequest.js} +27 -21
- package/dist/generated/models/CreateEventRequest.js.map +1 -0
- package/dist/generated/models/{ProjectWebhookRequest.d.ts → CreateSubscriptionRequest.d.ts} +6 -4
- package/dist/generated/models/{ProjectWebhookRequest.js → CreateSubscriptionRequest.js} +13 -13
- package/dist/generated/models/CreateSubscriptionRequest.js.map +1 -0
- package/dist/generated/models/{CreateNotificationSubscriptionRequest.d.ts → CreateTriggerRequest.d.ts} +7 -7
- package/dist/generated/models/{CreateNotificationSubscriptionRequest.js → CreateTriggerRequest.js} +14 -14
- package/dist/generated/models/CreateTriggerRequest.js.map +1 -0
- package/dist/generated/models/{EntityTypeNOTIFICATION.d.ts → EntityTypeEVENT.d.ts} +1 -1
- package/dist/generated/models/EntityTypeEVENT.js +14 -0
- package/dist/generated/models/EntityTypeEVENT.js.map +1 -0
- package/dist/generated/models/EntityTypeLOG.d.ts +12 -0
- package/dist/generated/models/EntityTypeLOG.js +14 -0
- package/dist/generated/models/EntityTypeLOG.js.map +1 -0
- package/dist/generated/models/EntityTypeSUBSCRIPTION.d.ts +12 -0
- package/dist/generated/models/EntityTypeSUBSCRIPTION.js +14 -0
- package/dist/generated/models/EntityTypeSUBSCRIPTION.js.map +1 -0
- package/dist/generated/models/EntityTypeTRIGGER.d.ts +12 -0
- package/dist/generated/models/EntityTypeTRIGGER.js +14 -0
- package/dist/generated/models/EntityTypeTRIGGER.js.map +1 -0
- package/dist/generated/models/{NotificationDeleteResponse.d.ts → EventDeleteResponse.d.ts} +3 -3
- package/dist/generated/models/{NotificationTriggerDeleteResponse.js → EventDeleteResponse.js} +8 -8
- package/dist/generated/models/EventDeleteResponse.js.map +1 -0
- package/dist/generated/models/{NotificationSubscriptionListQueries.d.ts → EventListQueries.d.ts} +7 -3
- package/dist/generated/models/{NotificationListQueries.js → EventListQueries.js} +10 -16
- package/dist/generated/models/EventListQueries.js.map +1 -0
- package/dist/generated/models/{SettingsWebhookUpdateRequest.d.ts → EventListResponse.d.ts} +8 -4
- package/dist/generated/models/{NotificationListResponse.js → EventListResponse.js} +8 -8
- package/dist/generated/models/EventListResponse.js.map +1 -0
- package/dist/generated/models/{ContractNotificationTriggerResponse.d.ts → EventResponse.d.ts} +10 -7
- package/dist/generated/models/{NotificationTriggerResponse.js → EventResponse.js} +21 -15
- package/dist/generated/models/EventResponse.js.map +1 -0
- package/dist/generated/models/{NotificationListQueries.d.ts → ListSubscriptionLogsRequest.d.ts} +15 -8
- package/dist/generated/models/ListSubscriptionLogsRequest.js +80 -0
- package/dist/generated/models/ListSubscriptionLogsRequest.js.map +1 -0
- package/dist/generated/models/LogResponse.d.ts +38 -0
- package/dist/generated/models/{AccountNotificationTriggerResponseAccount.js → LogResponse.js} +25 -19
- package/dist/generated/models/LogResponse.js.map +1 -0
- package/dist/generated/models/ObjectSerializer.d.ts +33 -34
- package/dist/generated/models/ObjectSerializer.js +88 -93
- package/dist/generated/models/ObjectSerializer.js.map +1 -1
- package/dist/generated/models/PolicyResponsePolicyRulesInner.d.ts +2 -2
- package/dist/generated/models/PolicyResponsePolicyRulesInner.js +1 -1
- package/dist/generated/models/PolicyResponsePolicyRulesInner.js.map +1 -1
- package/dist/generated/models/PolicyRuleResponse.d.ts +2 -2
- package/dist/generated/models/PolicyRuleResponse.js +1 -1
- package/dist/generated/models/PolicyRuleResponse.js.map +1 -1
- package/dist/generated/models/Status.d.ts +12 -0
- package/dist/generated/models/Status.js +14 -0
- package/dist/generated/models/Status.js.map +1 -0
- package/dist/generated/models/{NotificationTriggerDeleteResponse.d.ts → SubscriptionDeleteResponse.d.ts} +3 -3
- package/dist/generated/models/{NotificationDeleteResponse.js → SubscriptionDeleteResponse.js} +8 -8
- package/dist/generated/models/{NotificationDeleteResponse.js.map → SubscriptionDeleteResponse.js.map} +1 -1
- package/dist/generated/models/{NotificationListResponse.d.ts → SubscriptionListResponse.d.ts} +3 -3
- package/dist/generated/models/SubscriptionListResponse.js +62 -0
- package/dist/generated/models/{NotificationListResponse.js.map → SubscriptionListResponse.js.map} +1 -1
- package/dist/generated/models/{NotificationResponseSubscriptionsInner.d.ts → TransactionConfirmedEventResponse.d.ts} +6 -6
- package/dist/generated/models/{BalanceNotificationTriggerResponse.js → TransactionConfirmedEventResponse.js} +15 -15
- package/dist/generated/models/TransactionConfirmedEventResponse.js.map +1 -0
- package/dist/generated/models/{PickDeveloperAccountId.d.ts → TriggerDeleteResponse.d.ts} +4 -4
- package/dist/generated/models/{NotificationSubscriptionDeleteResponse.js → TriggerDeleteResponse.js} +8 -8
- package/dist/generated/models/TriggerDeleteResponse.js.map +1 -0
- package/dist/generated/models/{NotificationSubscription.d.ts → TriggerResponse.d.ts} +7 -5
- package/dist/generated/models/{NotificationResponseSubscriptionsInner.js → TriggerResponse.js} +23 -11
- package/dist/generated/models/TriggerResponse.js.map +1 -0
- package/dist/generated/models/UpdateProjectApiKeyRequest.d.ts +4 -0
- package/dist/generated/models/UpdateProjectApiKeyRequest.js +6 -0
- package/dist/generated/models/UpdateProjectApiKeyRequest.js.map +1 -1
- package/dist/generated/models/all.d.ts +33 -34
- package/dist/generated/models/all.js +33 -34
- package/dist/generated/models/all.js.map +1 -1
- package/dist/generated/types/ObjectParamAPI.d.ts +309 -285
- package/dist/generated/types/ObjectParamAPI.js +146 -145
- package/dist/generated/types/ObjectParamAPI.js.map +1 -1
- package/dist/generated/types/ObservableAPI.d.ts +130 -126
- package/dist/generated/types/ObservableAPI.js +318 -304
- package/dist/generated/types/ObservableAPI.js.map +1 -1
- package/dist/generated/types/PromiseAPI.d.ts +126 -120
- package/dist/generated/types/PromiseAPI.js +174 -170
- package/dist/generated/types/PromiseAPI.js.map +1 -1
- package/dist/index.d.ts +4 -6
- package/dist/index.js +6 -10
- package/dist/index.js.map +1 -1
- package/dist/models/getEventRequest.d.ts +3 -0
- package/dist/models/{getNotificationRequest.js → getEventRequest.js} +1 -1
- package/dist/models/getEventRequest.js.map +1 -0
- package/dist/models/getSubscriptionRequest.d.ts +3 -0
- package/dist/models/{getNotificationTriggerRequest.js → getSubscriptionRequest.js} +1 -1
- package/dist/models/getSubscriptionRequest.js.map +1 -0
- package/dist/models/preGenerateEmbeddedAccountRequest.d.ts +10 -0
- package/dist/models/preGenerateEmbeddedAccountRequest.js +9 -0
- package/dist/models/preGenerateEmbeddedAccountRequest.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/apis/notificationSubscriptionsApiWrapper.d.ts +0 -28
- package/dist/apis/notificationSubscriptionsApiWrapper.js +0 -56
- package/dist/apis/notificationSubscriptionsApiWrapper.js.map +0 -1
- package/dist/apis/notificationTriggersApiWrapper.d.ts +0 -28
- package/dist/apis/notificationTriggersApiWrapper.js +0 -56
- package/dist/apis/notificationTriggersApiWrapper.js.map +0 -1
- package/dist/apis/notificationsApiWrapper.d.ts +0 -29
- package/dist/apis/notificationsApiWrapper.js.map +0 -1
- package/dist/generated/apis/NotificationSubscriptionsApi.d.ts +0 -74
- package/dist/generated/apis/NotificationSubscriptionsApi.js +0 -257
- package/dist/generated/apis/NotificationSubscriptionsApi.js.map +0 -1
- package/dist/generated/apis/NotificationTriggersApi.d.ts +0 -74
- package/dist/generated/apis/NotificationTriggersApi.js +0 -257
- package/dist/generated/apis/NotificationTriggersApi.js.map +0 -1
- package/dist/generated/apis/NotificationsApi.d.ts +0 -78
- package/dist/generated/apis/NotificationsApi.js.map +0 -1
- package/dist/generated/models/AccountNotificationTriggerResponse.d.ts +0 -37
- package/dist/generated/models/AccountNotificationTriggerResponse.js.map +0 -1
- package/dist/generated/models/AccountNotificationTriggerResponseAccount.js.map +0 -1
- package/dist/generated/models/BalanceNotificationTriggerResponse.js.map +0 -1
- package/dist/generated/models/ContractNotificationTriggerResponse.js.map +0 -1
- package/dist/generated/models/ContractNotificationTriggerResponseContract.js.map +0 -1
- package/dist/generated/models/CreateNotificationRequest.js +0 -32
- package/dist/generated/models/CreateNotificationRequest.js.map +0 -1
- package/dist/generated/models/CreateNotificationSubscriptionRequest.js.map +0 -1
- package/dist/generated/models/CreateNotificationTriggerRequest.js.map +0 -1
- package/dist/generated/models/EntityTypeNOTIFICATION.js.map +0 -1
- package/dist/generated/models/EntityTypeNOTIFICATIONSUBSCRIPTION.d.ts +0 -12
- package/dist/generated/models/EntityTypeNOTIFICATIONSUBSCRIPTION.js.map +0 -1
- package/dist/generated/models/EntityTypeNOTIFICATIONTRIGGER.js.map +0 -1
- package/dist/generated/models/NotificationListQueries.js.map +0 -1
- package/dist/generated/models/NotificationResponse.d.ts +0 -38
- package/dist/generated/models/NotificationResponse.js +0 -74
- package/dist/generated/models/NotificationResponse.js.map +0 -1
- package/dist/generated/models/NotificationResponseExpandable.js +0 -14
- package/dist/generated/models/NotificationResponseExpandable.js.map +0 -1
- package/dist/generated/models/NotificationResponseSubscriptionsInner.js.map +0 -1
- package/dist/generated/models/NotificationResponseTriggersInner.d.ts +0 -41
- package/dist/generated/models/NotificationResponseTriggersInner.js +0 -86
- package/dist/generated/models/NotificationResponseTriggersInner.js.map +0 -1
- package/dist/generated/models/NotificationSubscription.js.map +0 -1
- package/dist/generated/models/NotificationSubscriptionDeleteResponse.js.map +0 -1
- package/dist/generated/models/NotificationSubscriptionListQueries.js +0 -50
- package/dist/generated/models/NotificationSubscriptionListQueries.js.map +0 -1
- package/dist/generated/models/NotificationSubscriptionListResponse.js.map +0 -1
- package/dist/generated/models/NotificationTriggerDeleteResponse.js.map +0 -1
- package/dist/generated/models/NotificationTriggerListQueries.d.ts +0 -41
- package/dist/generated/models/NotificationTriggerListQueries.js +0 -50
- package/dist/generated/models/NotificationTriggerListQueries.js.map +0 -1
- package/dist/generated/models/NotificationTriggerListResponse.js.map +0 -1
- package/dist/generated/models/NotificationTriggerResponse.d.ts +0 -41
- package/dist/generated/models/NotificationTriggerResponse.js.map +0 -1
- package/dist/generated/models/NotificationTriggerType.d.ts +0 -12
- package/dist/generated/models/NotificationTriggerType.js.map +0 -1
- package/dist/generated/models/NotificationTriggerTypeCONTRACTTRIGGER.js +0 -14
- package/dist/generated/models/NotificationTriggerTypeCONTRACTTRIGGER.js.map +0 -1
- package/dist/generated/models/NotificationTriggerTypeDEVELOPERACCOUNTTRIGGER.d.ts +0 -12
- package/dist/generated/models/NotificationTriggerTypeDEVELOPERACCOUNTTRIGGER.js +0 -14
- package/dist/generated/models/NotificationTriggerTypeDEVELOPERACCOUNTTRIGGER.js.map +0 -1
- package/dist/generated/models/NotificationTriggerTypePROJECTBALANCETRIGGER.d.ts +0 -12
- package/dist/generated/models/NotificationTriggerTypePROJECTBALANCETRIGGER.js +0 -14
- package/dist/generated/models/NotificationTriggerTypePROJECTBALANCETRIGGER.js.map +0 -1
- package/dist/generated/models/PickDeveloperAccountId.js +0 -35
- package/dist/generated/models/PickDeveloperAccountId.js.map +0 -1
- package/dist/generated/models/ProjectWebhookRequest.js.map +0 -1
- package/dist/generated/models/SettingsWebhookUpdateRequest.js +0 -32
- package/dist/generated/models/SettingsWebhookUpdateRequest.js.map +0 -1
- package/dist/generated/models/SubscriptionType.js.map +0 -1
- package/dist/models/getNotificationRequest.d.ts +0 -4
- package/dist/models/getNotificationRequest.js.map +0 -1
- package/dist/models/getNotificationSubscriptionRequest.d.ts +0 -3
- package/dist/models/getNotificationSubscriptionRequest.js +0 -3
- package/dist/models/getNotificationSubscriptionRequest.js.map +0 -1
- package/dist/models/getNotificationTriggerRequest.d.ts +0 -3
- package/dist/models/getNotificationTriggerRequest.js.map +0 -1
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubscriptionsApiResponseProcessor = exports.SubscriptionsApiRequestFactory = void 0;
|
|
4
|
+
// TODO: better import syntax?
|
|
5
|
+
const baseapi_1 = require("./baseapi");
|
|
6
|
+
const http_1 = require("../http/http");
|
|
7
|
+
const ObjectSerializer_1 = require("../models/ObjectSerializer");
|
|
8
|
+
const exception_1 = require("./exception");
|
|
9
|
+
const util_1 = require("../util");
|
|
10
|
+
/**
|
|
11
|
+
* no description
|
|
12
|
+
*/
|
|
13
|
+
class SubscriptionsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
14
|
+
/**
|
|
15
|
+
* Creates a subscription for the given project. This object represents the subscription where the project owner has subscribed to.
|
|
16
|
+
* Create subscription for project.
|
|
17
|
+
* @param createSubscriptionRequest
|
|
18
|
+
*/
|
|
19
|
+
async createSubscription(createSubscriptionRequest, _options) {
|
|
20
|
+
let _config = _options || this.configuration;
|
|
21
|
+
// verify required parameter 'createSubscriptionRequest' is not null or undefined
|
|
22
|
+
if (createSubscriptionRequest === null || createSubscriptionRequest === undefined) {
|
|
23
|
+
throw new baseapi_1.RequiredError("SubscriptionsApi", "createSubscription", "createSubscriptionRequest");
|
|
24
|
+
}
|
|
25
|
+
// Path Params
|
|
26
|
+
const localVarPath = '/v1/subscriptions';
|
|
27
|
+
// Make Request Context
|
|
28
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
29
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
30
|
+
// Body Params
|
|
31
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
32
|
+
"application/json"
|
|
33
|
+
]);
|
|
34
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
35
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(createSubscriptionRequest, "CreateSubscriptionRequest", ""), contentType);
|
|
36
|
+
requestContext.setBody(serializedBody);
|
|
37
|
+
let authMethod;
|
|
38
|
+
// Apply auth methods
|
|
39
|
+
authMethod = _config.authMethods["sk"];
|
|
40
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
41
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
42
|
+
}
|
|
43
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
44
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
45
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
46
|
+
}
|
|
47
|
+
return requestContext;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Creates a trigger for the given subscription. This object represents the trigger where the subscription owner has subscribed to.
|
|
51
|
+
* Create trigger for subscription.
|
|
52
|
+
* @param id Specifies the unique subscription ID (starts with sub_).
|
|
53
|
+
* @param createTriggerRequest
|
|
54
|
+
*/
|
|
55
|
+
async createTrigger(id, createTriggerRequest, _options) {
|
|
56
|
+
let _config = _options || this.configuration;
|
|
57
|
+
// verify required parameter 'id' is not null or undefined
|
|
58
|
+
if (id === null || id === undefined) {
|
|
59
|
+
throw new baseapi_1.RequiredError("SubscriptionsApi", "createTrigger", "id");
|
|
60
|
+
}
|
|
61
|
+
// verify required parameter 'createTriggerRequest' is not null or undefined
|
|
62
|
+
if (createTriggerRequest === null || createTriggerRequest === undefined) {
|
|
63
|
+
throw new baseapi_1.RequiredError("SubscriptionsApi", "createTrigger", "createTriggerRequest");
|
|
64
|
+
}
|
|
65
|
+
// Path Params
|
|
66
|
+
const localVarPath = '/v1/subscriptions/{id}/triggers'
|
|
67
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
68
|
+
// Make Request Context
|
|
69
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
70
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
71
|
+
// Body Params
|
|
72
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
73
|
+
"application/json"
|
|
74
|
+
]);
|
|
75
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
76
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(createTriggerRequest, "CreateTriggerRequest", ""), contentType);
|
|
77
|
+
requestContext.setBody(serializedBody);
|
|
78
|
+
let authMethod;
|
|
79
|
+
// Apply auth methods
|
|
80
|
+
authMethod = _config.authMethods["sk"];
|
|
81
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
82
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
83
|
+
}
|
|
84
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
85
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
86
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
87
|
+
}
|
|
88
|
+
return requestContext;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Deletes a subscription for the given project. This object represents the subscription where the project owner has subscribed to.
|
|
92
|
+
* Delete subscription of project.
|
|
93
|
+
* @param id Specifies the unique subscription ID (starts with sub_).
|
|
94
|
+
*/
|
|
95
|
+
async deleteSubscription(id, _options) {
|
|
96
|
+
let _config = _options || this.configuration;
|
|
97
|
+
// verify required parameter 'id' is not null or undefined
|
|
98
|
+
if (id === null || id === undefined) {
|
|
99
|
+
throw new baseapi_1.RequiredError("SubscriptionsApi", "deleteSubscription", "id");
|
|
100
|
+
}
|
|
101
|
+
// Path Params
|
|
102
|
+
const localVarPath = '/v1/subscriptions/{id}'
|
|
103
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
104
|
+
// Make Request Context
|
|
105
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
106
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
107
|
+
let authMethod;
|
|
108
|
+
// Apply auth methods
|
|
109
|
+
authMethod = _config.authMethods["sk"];
|
|
110
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
111
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
112
|
+
}
|
|
113
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
114
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
115
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
116
|
+
}
|
|
117
|
+
return requestContext;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Deletes a trigger for the given subscription. This object represents the trigger where the subscription owner has subscribed to.
|
|
121
|
+
* Delete trigger of subscription.
|
|
122
|
+
* @param id Specifies the unique subscription ID (starts with sub_).
|
|
123
|
+
* @param triggerId Specifies the unique subscription ID (starts with sub_).
|
|
124
|
+
*/
|
|
125
|
+
async deleteTrigger(id, triggerId, _options) {
|
|
126
|
+
let _config = _options || this.configuration;
|
|
127
|
+
// verify required parameter 'id' is not null or undefined
|
|
128
|
+
if (id === null || id === undefined) {
|
|
129
|
+
throw new baseapi_1.RequiredError("SubscriptionsApi", "deleteTrigger", "id");
|
|
130
|
+
}
|
|
131
|
+
// verify required parameter 'triggerId' is not null or undefined
|
|
132
|
+
if (triggerId === null || triggerId === undefined) {
|
|
133
|
+
throw new baseapi_1.RequiredError("SubscriptionsApi", "deleteTrigger", "triggerId");
|
|
134
|
+
}
|
|
135
|
+
// Path Params
|
|
136
|
+
const localVarPath = '/v1/subscriptions/{id}/triggers/{triggerId}'
|
|
137
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
|
|
138
|
+
.replace('{' + 'triggerId' + '}', encodeURIComponent(String(triggerId)));
|
|
139
|
+
// Make Request Context
|
|
140
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
141
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
142
|
+
let authMethod;
|
|
143
|
+
// Apply auth methods
|
|
144
|
+
authMethod = _config.authMethods["sk"];
|
|
145
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
146
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
147
|
+
}
|
|
148
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
149
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
150
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
151
|
+
}
|
|
152
|
+
return requestContext;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Returns a subscription for the given project. This object represents the subscription where the project owner has subscribed to.
|
|
156
|
+
* Get subscription of project.
|
|
157
|
+
* @param id Specifies the unique subscription ID (starts with sub_).
|
|
158
|
+
*/
|
|
159
|
+
async getSubscription(id, _options) {
|
|
160
|
+
let _config = _options || this.configuration;
|
|
161
|
+
// verify required parameter 'id' is not null or undefined
|
|
162
|
+
if (id === null || id === undefined) {
|
|
163
|
+
throw new baseapi_1.RequiredError("SubscriptionsApi", "getSubscription", "id");
|
|
164
|
+
}
|
|
165
|
+
// Path Params
|
|
166
|
+
const localVarPath = '/v1/subscriptions/{id}'
|
|
167
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
168
|
+
// Make Request Context
|
|
169
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
170
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
171
|
+
let authMethod;
|
|
172
|
+
// Apply auth methods
|
|
173
|
+
authMethod = _config.authMethods["sk"];
|
|
174
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
175
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
176
|
+
}
|
|
177
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
178
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
179
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
180
|
+
}
|
|
181
|
+
return requestContext;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Returns a list of subscriptions for the given project. This object represents the subscriptions where the project owner has subscribed to. Subscriptions are returned sorted by creation date, with the most recently created subscriptions appearing first. By default, a maximum of 10 subscriptions are shown per page.
|
|
185
|
+
* List subscriptions of project.
|
|
186
|
+
*/
|
|
187
|
+
async getSubscriptions(_options) {
|
|
188
|
+
let _config = _options || this.configuration;
|
|
189
|
+
// Path Params
|
|
190
|
+
const localVarPath = '/v1/subscriptions';
|
|
191
|
+
// Make Request Context
|
|
192
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
193
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
194
|
+
let authMethod;
|
|
195
|
+
// Apply auth methods
|
|
196
|
+
authMethod = _config.authMethods["sk"];
|
|
197
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
198
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
199
|
+
}
|
|
200
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
201
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
202
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
203
|
+
}
|
|
204
|
+
return requestContext;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Returns a trigger for the given id. This object represents the trigger where the subscription owner has subscribed to.
|
|
208
|
+
* Get trigger by id.
|
|
209
|
+
* @param id Specifies the unique subscription ID (starts with sub_).
|
|
210
|
+
* @param triggerId Specifies the unique subscription ID (starts with sub_).
|
|
211
|
+
*/
|
|
212
|
+
async getTrigger(id, triggerId, _options) {
|
|
213
|
+
let _config = _options || this.configuration;
|
|
214
|
+
// verify required parameter 'id' is not null or undefined
|
|
215
|
+
if (id === null || id === undefined) {
|
|
216
|
+
throw new baseapi_1.RequiredError("SubscriptionsApi", "getTrigger", "id");
|
|
217
|
+
}
|
|
218
|
+
// verify required parameter 'triggerId' is not null or undefined
|
|
219
|
+
if (triggerId === null || triggerId === undefined) {
|
|
220
|
+
throw new baseapi_1.RequiredError("SubscriptionsApi", "getTrigger", "triggerId");
|
|
221
|
+
}
|
|
222
|
+
// Path Params
|
|
223
|
+
const localVarPath = '/v1/subscriptions/{id}/triggers/{triggerId}'
|
|
224
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
|
|
225
|
+
.replace('{' + 'triggerId' + '}', encodeURIComponent(String(triggerId)));
|
|
226
|
+
// Make Request Context
|
|
227
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
228
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
229
|
+
let authMethod;
|
|
230
|
+
// Apply auth methods
|
|
231
|
+
authMethod = _config.authMethods["sk"];
|
|
232
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
233
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
234
|
+
}
|
|
235
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
236
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
237
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
238
|
+
}
|
|
239
|
+
return requestContext;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Returns a list of triggers for the given subscription. This object represents the triggers where the subscription owner has subscribed to. Triggers are returned sorted by creation date, with the most recently created triggers appearing first. By default, a maximum of 10 triggers are shown per page.
|
|
243
|
+
* List triggers of subscription.
|
|
244
|
+
* @param id Specifies the unique subscription ID (starts with sub_).
|
|
245
|
+
*/
|
|
246
|
+
async getTriggers(id, _options) {
|
|
247
|
+
let _config = _options || this.configuration;
|
|
248
|
+
// verify required parameter 'id' is not null or undefined
|
|
249
|
+
if (id === null || id === undefined) {
|
|
250
|
+
throw new baseapi_1.RequiredError("SubscriptionsApi", "getTriggers", "id");
|
|
251
|
+
}
|
|
252
|
+
// Path Params
|
|
253
|
+
const localVarPath = '/v1/subscriptions/{id}/triggers'
|
|
254
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
255
|
+
// Make Request Context
|
|
256
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
257
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
258
|
+
let authMethod;
|
|
259
|
+
// Apply auth methods
|
|
260
|
+
authMethod = _config.authMethods["sk"];
|
|
261
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
262
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
263
|
+
}
|
|
264
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
265
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
266
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
267
|
+
}
|
|
268
|
+
return requestContext;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Lists logs of the triggered subscriptions for the given project. This object represents the logs of the triggered subscriptions where the project owner has subscribed to.
|
|
272
|
+
* List logs of triggered subscriptions.
|
|
273
|
+
* @param limit Specifies the maximum number of records to return.
|
|
274
|
+
* @param skip Specifies the offset for the first records to return.
|
|
275
|
+
* @param order Specifies the order in which to sort the results.
|
|
276
|
+
* @param topic Specifies the topic of the subscription logs
|
|
277
|
+
* @param status Specifies the status of the subscription logs
|
|
278
|
+
* @param object Specifies the object ID of the object related to triggered notification
|
|
279
|
+
* @param subscription Specifies the subscription ID
|
|
280
|
+
* @param trigger Specifies the trigger ID
|
|
281
|
+
* @param requestID Specifies the request ID
|
|
282
|
+
*/
|
|
283
|
+
async listSubscriptionLogs(limit, skip, order, topic, status, object, subscription, trigger, requestID, _options) {
|
|
284
|
+
let _config = _options || this.configuration;
|
|
285
|
+
// Path Params
|
|
286
|
+
const localVarPath = '/v1/subscriptions/logs';
|
|
287
|
+
// Make Request Context
|
|
288
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
289
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
290
|
+
// Query Params
|
|
291
|
+
if (limit !== undefined) {
|
|
292
|
+
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", "int32"));
|
|
293
|
+
}
|
|
294
|
+
// Query Params
|
|
295
|
+
if (skip !== undefined) {
|
|
296
|
+
requestContext.setQueryParam("skip", ObjectSerializer_1.ObjectSerializer.serialize(skip, "number", "int32"));
|
|
297
|
+
}
|
|
298
|
+
// Query Params
|
|
299
|
+
if (order !== undefined) {
|
|
300
|
+
requestContext.setQueryParam("order", ObjectSerializer_1.ObjectSerializer.serialize(order, "SortOrder", ""));
|
|
301
|
+
}
|
|
302
|
+
// Query Params
|
|
303
|
+
if (topic !== undefined) {
|
|
304
|
+
requestContext.setQueryParam("topic", ObjectSerializer_1.ObjectSerializer.serialize(topic, "APITopic", ""));
|
|
305
|
+
}
|
|
306
|
+
// Query Params
|
|
307
|
+
if (status !== undefined) {
|
|
308
|
+
requestContext.setQueryParam("status", ObjectSerializer_1.ObjectSerializer.serialize(status, "Status", ""));
|
|
309
|
+
}
|
|
310
|
+
// Query Params
|
|
311
|
+
if (object !== undefined) {
|
|
312
|
+
requestContext.setQueryParam("object", ObjectSerializer_1.ObjectSerializer.serialize(object, "string", ""));
|
|
313
|
+
}
|
|
314
|
+
// Query Params
|
|
315
|
+
if (subscription !== undefined) {
|
|
316
|
+
requestContext.setQueryParam("subscription", ObjectSerializer_1.ObjectSerializer.serialize(subscription, "string", ""));
|
|
317
|
+
}
|
|
318
|
+
// Query Params
|
|
319
|
+
if (trigger !== undefined) {
|
|
320
|
+
requestContext.setQueryParam("trigger", ObjectSerializer_1.ObjectSerializer.serialize(trigger, "string", ""));
|
|
321
|
+
}
|
|
322
|
+
// Query Params
|
|
323
|
+
if (requestID !== undefined) {
|
|
324
|
+
requestContext.setQueryParam("requestID", ObjectSerializer_1.ObjectSerializer.serialize(requestID, "string", ""));
|
|
325
|
+
}
|
|
326
|
+
let authMethod;
|
|
327
|
+
// Apply auth methods
|
|
328
|
+
authMethod = _config.authMethods["sk"];
|
|
329
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
330
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
331
|
+
}
|
|
332
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
333
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
334
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
335
|
+
}
|
|
336
|
+
return requestContext;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Test a trigger Returns a trigger for the given id.
|
|
340
|
+
* Test trigger by id.
|
|
341
|
+
*/
|
|
342
|
+
async testTrigger(_options) {
|
|
343
|
+
let _config = _options || this.configuration;
|
|
344
|
+
// Path Params
|
|
345
|
+
const localVarPath = '/v1/subscriptions/test';
|
|
346
|
+
// Make Request Context
|
|
347
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
348
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
349
|
+
let authMethod;
|
|
350
|
+
// Apply auth methods
|
|
351
|
+
authMethod = _config.authMethods["sk"];
|
|
352
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
353
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
354
|
+
}
|
|
355
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
356
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
357
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
358
|
+
}
|
|
359
|
+
return requestContext;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
exports.SubscriptionsApiRequestFactory = SubscriptionsApiRequestFactory;
|
|
363
|
+
class SubscriptionsApiResponseProcessor {
|
|
364
|
+
/**
|
|
365
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
366
|
+
* to the expected objects
|
|
367
|
+
*
|
|
368
|
+
* @params response Response returned by the server for a request to createSubscription
|
|
369
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
370
|
+
*/
|
|
371
|
+
async createSubscription(response) {
|
|
372
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
373
|
+
if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
|
|
374
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "SubscriptionResponse", "");
|
|
375
|
+
return body;
|
|
376
|
+
}
|
|
377
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
378
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
379
|
+
}
|
|
380
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
381
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
382
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "SubscriptionResponse", "");
|
|
383
|
+
return body;
|
|
384
|
+
}
|
|
385
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
389
|
+
* to the expected objects
|
|
390
|
+
*
|
|
391
|
+
* @params response Response returned by the server for a request to createTrigger
|
|
392
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
393
|
+
*/
|
|
394
|
+
async createTrigger(response) {
|
|
395
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
396
|
+
if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
|
|
397
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "TriggerResponse", "");
|
|
398
|
+
return body;
|
|
399
|
+
}
|
|
400
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
401
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
402
|
+
}
|
|
403
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
404
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Subscription not found.", undefined, response.headers);
|
|
405
|
+
}
|
|
406
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
407
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
408
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "TriggerResponse", "");
|
|
409
|
+
return body;
|
|
410
|
+
}
|
|
411
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
415
|
+
* to the expected objects
|
|
416
|
+
*
|
|
417
|
+
* @params response Response returned by the server for a request to deleteSubscription
|
|
418
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
419
|
+
*/
|
|
420
|
+
async deleteSubscription(response) {
|
|
421
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
422
|
+
if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
|
|
423
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "SubscriptionDeleteResponse", "");
|
|
424
|
+
return body;
|
|
425
|
+
}
|
|
426
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
427
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
428
|
+
}
|
|
429
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
430
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Subscription not found.", undefined, response.headers);
|
|
431
|
+
}
|
|
432
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
433
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
434
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "SubscriptionDeleteResponse", "");
|
|
435
|
+
return body;
|
|
436
|
+
}
|
|
437
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
441
|
+
* to the expected objects
|
|
442
|
+
*
|
|
443
|
+
* @params response Response returned by the server for a request to deleteTrigger
|
|
444
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
445
|
+
*/
|
|
446
|
+
async deleteTrigger(response) {
|
|
447
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
448
|
+
if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
|
|
449
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "TriggerDeleteResponse", "");
|
|
450
|
+
return body;
|
|
451
|
+
}
|
|
452
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
453
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
454
|
+
}
|
|
455
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
456
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Trigger not found.", undefined, response.headers);
|
|
457
|
+
}
|
|
458
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
459
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
460
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "TriggerDeleteResponse", "");
|
|
461
|
+
return body;
|
|
462
|
+
}
|
|
463
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
467
|
+
* to the expected objects
|
|
468
|
+
*
|
|
469
|
+
* @params response Response returned by the server for a request to getSubscription
|
|
470
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
471
|
+
*/
|
|
472
|
+
async getSubscription(response) {
|
|
473
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
474
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
475
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "SubscriptionResponse", "");
|
|
476
|
+
return body;
|
|
477
|
+
}
|
|
478
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
479
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
480
|
+
}
|
|
481
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
482
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Subscription not found.", undefined, response.headers);
|
|
483
|
+
}
|
|
484
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
485
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
486
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "SubscriptionResponse", "");
|
|
487
|
+
return body;
|
|
488
|
+
}
|
|
489
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
493
|
+
* to the expected objects
|
|
494
|
+
*
|
|
495
|
+
* @params response Response returned by the server for a request to getSubscriptions
|
|
496
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
497
|
+
*/
|
|
498
|
+
async getSubscriptions(response) {
|
|
499
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
500
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
501
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "SubscriptionListResponse", "");
|
|
502
|
+
return body;
|
|
503
|
+
}
|
|
504
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
505
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
506
|
+
}
|
|
507
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
508
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
509
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "SubscriptionListResponse", "");
|
|
510
|
+
return body;
|
|
511
|
+
}
|
|
512
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
516
|
+
* to the expected objects
|
|
517
|
+
*
|
|
518
|
+
* @params response Response returned by the server for a request to getTrigger
|
|
519
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
520
|
+
*/
|
|
521
|
+
async getTrigger(response) {
|
|
522
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
523
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
524
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "TriggerResponse", "");
|
|
525
|
+
return body;
|
|
526
|
+
}
|
|
527
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
528
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
529
|
+
}
|
|
530
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
531
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Trigger not found.", undefined, response.headers);
|
|
532
|
+
}
|
|
533
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
534
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
535
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "TriggerResponse", "");
|
|
536
|
+
return body;
|
|
537
|
+
}
|
|
538
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
542
|
+
* to the expected objects
|
|
543
|
+
*
|
|
544
|
+
* @params response Response returned by the server for a request to getTriggers
|
|
545
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
546
|
+
*/
|
|
547
|
+
async getTriggers(response) {
|
|
548
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
549
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
550
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "BaseEntityListResponseTriggerResponse", "");
|
|
551
|
+
return body;
|
|
552
|
+
}
|
|
553
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
554
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
555
|
+
}
|
|
556
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
557
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Subscription not found.", undefined, response.headers);
|
|
558
|
+
}
|
|
559
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
560
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
561
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "BaseEntityListResponseTriggerResponse", "");
|
|
562
|
+
return body;
|
|
563
|
+
}
|
|
564
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
568
|
+
* to the expected objects
|
|
569
|
+
*
|
|
570
|
+
* @params response Response returned by the server for a request to listSubscriptionLogs
|
|
571
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
572
|
+
*/
|
|
573
|
+
async listSubscriptionLogs(response) {
|
|
574
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
575
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
576
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "BaseEntityListResponseLogResponse", "");
|
|
577
|
+
return body;
|
|
578
|
+
}
|
|
579
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
580
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
581
|
+
}
|
|
582
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
583
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
584
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "BaseEntityListResponseLogResponse", "");
|
|
585
|
+
return body;
|
|
586
|
+
}
|
|
587
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
591
|
+
* to the expected objects
|
|
592
|
+
*
|
|
593
|
+
* @params response Response returned by the server for a request to testTrigger
|
|
594
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
595
|
+
*/
|
|
596
|
+
async testTrigger(response) {
|
|
597
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
598
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
602
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
603
|
+
}
|
|
604
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
605
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Trigger not found.", undefined, response.headers);
|
|
606
|
+
}
|
|
607
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
608
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
609
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "void", "");
|
|
610
|
+
return body;
|
|
611
|
+
}
|
|
612
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
exports.SubscriptionsApiResponseProcessor = SubscriptionsApiResponseProcessor;
|
|
616
|
+
//# sourceMappingURL=SubscriptionsApi.js.map
|