@openfort/openfort-node 0.6.35 → 0.6.36
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/notificationSubscriptionsApiWrapper.d.ts +29 -0
- package/dist/apis/notificationSubscriptionsApiWrapper.js +56 -0
- package/dist/apis/notificationSubscriptionsApiWrapper.js.map +1 -0
- package/dist/apis/notificationTriggersApiWrapper.d.ts +29 -0
- package/dist/apis/notificationTriggersApiWrapper.js +56 -0
- package/dist/apis/notificationTriggersApiWrapper.js.map +1 -0
- package/dist/apis/notificationsApiWrapper.d.ts +29 -0
- package/dist/apis/notificationsApiWrapper.js +56 -0
- package/dist/apis/notificationsApiWrapper.js.map +1 -0
- package/dist/apis/policyRulesApiWrapper.d.ts +6 -6
- package/dist/apis/policyRulesApiWrapper.js +9 -9
- package/dist/apis/policyRulesApiWrapper.js.map +1 -1
- package/dist/generated/apis/AccountsApi.d.ts +1 -1
- package/dist/generated/apis/AccountsApi.js +1 -1
- package/dist/generated/apis/NotificationsApi.d.ts +204 -0
- package/dist/generated/apis/NotificationsApi.js +744 -0
- package/dist/generated/apis/NotificationsApi.js.map +1 -0
- package/dist/generated/apis/PoliciesApi.d.ts +2 -2
- package/dist/generated/apis/PoliciesApi.js +2 -2
- package/dist/generated/apis/PolicyRulesApi.d.ts +10 -9
- package/dist/generated/apis/PolicyRulesApi.js +14 -13
- package/dist/generated/apis/PolicyRulesApi.js.map +1 -1
- package/dist/generated/apis/SettingsApi.d.ts +3 -3
- package/dist/generated/apis/SettingsApi.js +3 -3
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/index.js +2 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/models/AccountNotificationTriggerResponse.d.ts +37 -0
- package/dist/generated/models/AccountNotificationTriggerResponse.js +68 -0
- package/dist/generated/models/AccountNotificationTriggerResponse.js.map +1 -0
- package/dist/generated/models/AccountNotificationTriggerResponseAccount.d.ts +36 -0
- package/dist/generated/models/AccountNotificationTriggerResponseAccount.js +68 -0
- package/dist/generated/models/AccountNotificationTriggerResponseAccount.js.map +1 -0
- package/dist/generated/models/BalanceNotificationTriggerResponse.d.ts +34 -0
- package/dist/generated/models/BalanceNotificationTriggerResponse.js +56 -0
- package/dist/generated/models/BalanceNotificationTriggerResponse.js.map +1 -0
- package/dist/generated/models/CancelTransferOwnershipRequest.d.ts +1 -1
- package/dist/generated/models/ContractNotificationTriggerResponse.d.ts +38 -0
- package/dist/generated/models/ContractNotificationTriggerResponse.js +74 -0
- package/dist/generated/models/ContractNotificationTriggerResponse.js.map +1 -0
- package/dist/generated/models/{ContractPolicyRuleResponseContract.d.ts → ContractNotificationTriggerResponseContract.d.ts} +1 -1
- package/dist/generated/models/{ContractPolicyRuleResponseContract.js → ContractNotificationTriggerResponseContract.js} +7 -7
- package/dist/generated/models/ContractNotificationTriggerResponseContract.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/CreateNotificationRequest.d.ts +31 -0
- package/dist/generated/models/CreateNotificationRequest.js +32 -0
- package/dist/generated/models/CreateNotificationRequest.js.map +1 -0
- package/dist/generated/models/CreatePolicyRuleRequest.d.ts +2 -2
- package/dist/generated/models/CreateSubscriptionRequest.d.ts +37 -0
- package/dist/generated/models/CreateSubscriptionRequest.js +44 -0
- package/dist/generated/models/CreateSubscriptionRequest.js.map +1 -0
- package/dist/generated/models/CreateTriggerRequest.d.ts +57 -0
- package/dist/generated/models/CreateTriggerRequest.js +74 -0
- package/dist/generated/models/CreateTriggerRequest.js.map +1 -0
- package/dist/generated/models/EntityTypeNOTIFICATION.d.ts +12 -0
- package/dist/generated/models/EntityTypeNOTIFICATION.js +14 -0
- package/dist/generated/models/EntityTypeNOTIFICATION.js.map +1 -0
- package/dist/generated/models/EntityTypeNOTIFICATIONSUBSCRIPTION.d.ts +12 -0
- package/dist/generated/models/EntityTypeNOTIFICATIONSUBSCRIPTION.js +14 -0
- package/dist/generated/models/EntityTypeNOTIFICATIONSUBSCRIPTION.js.map +1 -0
- package/dist/generated/models/EntityTypeNOTIFICATIONTRIGGER.d.ts +12 -0
- package/dist/generated/models/EntityTypeNOTIFICATIONTRIGGER.js +14 -0
- package/dist/generated/models/EntityTypeNOTIFICATIONTRIGGER.js.map +1 -0
- package/dist/generated/models/Interaction.d.ts +1 -1
- package/dist/generated/models/NotificationDeleteResponse.d.ts +31 -0
- package/dist/generated/models/NotificationDeleteResponse.js +44 -0
- package/dist/generated/models/NotificationDeleteResponse.js.map +1 -0
- package/dist/generated/models/NotificationListQueries.d.ts +50 -0
- package/dist/generated/models/NotificationListQueries.js +62 -0
- package/dist/generated/models/NotificationListQueries.js.map +1 -0
- package/dist/generated/models/NotificationListResponse.d.ts +35 -0
- package/dist/generated/models/NotificationListResponse.js +62 -0
- package/dist/generated/models/NotificationListResponse.js.map +1 -0
- package/dist/generated/models/NotificationResponse.d.ts +38 -0
- package/dist/generated/models/NotificationResponse.js +74 -0
- package/dist/generated/models/NotificationResponse.js.map +1 -0
- package/dist/generated/models/NotificationResponseExpandable.d.ts +12 -0
- package/dist/generated/models/NotificationResponseExpandable.js +14 -0
- package/dist/generated/models/NotificationResponseExpandable.js.map +1 -0
- package/dist/generated/models/NotificationResponseSubscriptionsInner.d.ts +34 -0
- package/dist/generated/models/NotificationResponseSubscriptionsInner.js +56 -0
- package/dist/generated/models/NotificationResponseSubscriptionsInner.js.map +1 -0
- package/dist/generated/models/NotificationResponseTriggersInner.d.ts +41 -0
- package/dist/generated/models/NotificationResponseTriggersInner.js +86 -0
- package/dist/generated/models/NotificationResponseTriggersInner.js.map +1 -0
- package/dist/generated/models/NotificationSubscription.d.ts +34 -0
- package/dist/generated/models/NotificationSubscription.js +56 -0
- package/dist/generated/models/NotificationSubscription.js.map +1 -0
- package/dist/generated/models/NotificationSubscriptionDeleteResponse.d.ts +31 -0
- package/dist/generated/models/NotificationSubscriptionDeleteResponse.js +44 -0
- package/dist/generated/models/NotificationSubscriptionDeleteResponse.js.map +1 -0
- package/dist/generated/models/NotificationSubscriptionListQueries.d.ts +41 -0
- package/dist/generated/models/NotificationSubscriptionListQueries.js +50 -0
- package/dist/generated/models/NotificationSubscriptionListQueries.js.map +1 -0
- package/dist/generated/models/NotificationSubscriptionListResponse.d.ts +35 -0
- package/dist/generated/models/NotificationSubscriptionListResponse.js +62 -0
- package/dist/generated/models/NotificationSubscriptionListResponse.js.map +1 -0
- package/dist/generated/models/NotificationTriggerDeleteResponse.d.ts +31 -0
- package/dist/generated/models/NotificationTriggerDeleteResponse.js +44 -0
- package/dist/generated/models/NotificationTriggerDeleteResponse.js.map +1 -0
- package/dist/generated/models/NotificationTriggerListQueries.d.ts +41 -0
- package/dist/generated/models/NotificationTriggerListQueries.js +50 -0
- package/dist/generated/models/NotificationTriggerListQueries.js.map +1 -0
- package/dist/generated/models/NotificationTriggerListResponse.d.ts +35 -0
- package/dist/generated/models/NotificationTriggerListResponse.js +62 -0
- package/dist/generated/models/NotificationTriggerListResponse.js.map +1 -0
- package/dist/generated/models/NotificationTriggerResponse.d.ts +41 -0
- package/dist/generated/models/NotificationTriggerResponse.js +86 -0
- package/dist/generated/models/NotificationTriggerResponse.js.map +1 -0
- package/dist/generated/models/NotificationTriggerType.d.ts +12 -0
- package/dist/generated/models/NotificationTriggerType.js +14 -0
- package/dist/generated/models/NotificationTriggerType.js.map +1 -0
- package/dist/generated/models/NotificationTriggerTypeCONTRACTTRIGGER.d.ts +12 -0
- package/dist/generated/models/NotificationTriggerTypeCONTRACTTRIGGER.js +14 -0
- package/dist/generated/models/NotificationTriggerTypeCONTRACTTRIGGER.js.map +1 -0
- package/dist/generated/models/NotificationTriggerTypeDEVELOPERACCOUNTTRIGGER.d.ts +12 -0
- package/dist/generated/models/NotificationTriggerTypeDEVELOPERACCOUNTTRIGGER.js +14 -0
- package/dist/generated/models/NotificationTriggerTypeDEVELOPERACCOUNTTRIGGER.js.map +1 -0
- package/dist/generated/models/NotificationTriggerTypePROJECTBALANCETRIGGER.d.ts +12 -0
- package/dist/generated/models/NotificationTriggerTypePROJECTBALANCETRIGGER.js +14 -0
- package/dist/generated/models/NotificationTriggerTypePROJECTBALANCETRIGGER.js.map +1 -0
- package/dist/generated/models/ObjectSerializer.d.ts +32 -1
- package/dist/generated/models/ObjectSerializer.js +87 -3
- package/dist/generated/models/ObjectSerializer.js.map +1 -1
- package/dist/generated/models/PickDeveloperAccountId.d.ts +31 -0
- package/dist/generated/models/PickDeveloperAccountId.js +35 -0
- package/dist/generated/models/PickDeveloperAccountId.js.map +1 -0
- package/dist/generated/models/PlayerCancelTransferOwnershipRequest.d.ts +1 -1
- package/dist/generated/models/PlayerTransferOwnershipRequest.d.ts +1 -1
- package/dist/generated/models/PolicyListQueries.d.ts +2 -2
- 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/SubscriptionType.d.ts +12 -0
- package/dist/generated/models/SubscriptionType.js +14 -0
- package/dist/generated/models/SubscriptionType.js.map +1 -0
- package/dist/generated/models/TransferOwnershipRequest.d.ts +1 -1
- package/dist/generated/models/UpdatePolicyRuleRequest.d.ts +2 -2
- package/dist/generated/models/all.d.ts +32 -1
- package/dist/generated/models/all.js +32 -1
- package/dist/generated/models/all.js.map +1 -1
- package/dist/generated/types/ObjectParamAPI.d.ts +275 -16
- package/dist/generated/types/ObjectParamAPI.js +130 -26
- package/dist/generated/types/ObjectParamAPI.js.map +1 -1
- package/dist/generated/types/ObservableAPI.d.ts +114 -9
- package/dist/generated/types/ObservableAPI.js +290 -16
- package/dist/generated/types/ObservableAPI.js.map +1 -1
- package/dist/generated/types/PromiseAPI.d.ts +112 -9
- package/dist/generated/types/PromiseAPI.js +158 -30
- package/dist/generated/types/PromiseAPI.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/models/getNotificationRequest.d.ts +4 -0
- package/dist/models/getNotificationRequest.js +3 -0
- package/dist/models/getNotificationRequest.js.map +1 -0
- package/dist/models/getNotificationSubscriptionRequest.d.ts +3 -0
- package/dist/models/getNotificationSubscriptionRequest.js +3 -0
- package/dist/models/getNotificationSubscriptionRequest.js.map +1 -0
- package/dist/models/getNotificationTriggerRequest.d.ts +3 -0
- package/dist/models/getNotificationTriggerRequest.js +3 -0
- package/dist/models/getNotificationTriggerRequest.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/generated/models/ContractPolicyRuleResponseContract.js.map +0 -1
|
@@ -0,0 +1,744 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationsApiResponseProcessor = exports.NotificationsApiRequestFactory = 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 NotificationsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
14
|
+
/**
|
|
15
|
+
* Create a notification object.
|
|
16
|
+
* Create a notification object.
|
|
17
|
+
* @param createNotificationRequest
|
|
18
|
+
*/
|
|
19
|
+
async createNotification(createNotificationRequest, _options) {
|
|
20
|
+
let _config = _options || this.configuration;
|
|
21
|
+
// verify required parameter 'createNotificationRequest' is not null or undefined
|
|
22
|
+
if (createNotificationRequest === null || createNotificationRequest === undefined) {
|
|
23
|
+
throw new baseapi_1.RequiredError("NotificationsApi", "createNotification", "createNotificationRequest");
|
|
24
|
+
}
|
|
25
|
+
// Path Params
|
|
26
|
+
const localVarPath = '/v1/notifications';
|
|
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(createNotificationRequest, "CreateNotificationRequest", ""), 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
|
+
* Create a subscription for the provided notification.
|
|
51
|
+
* Create a notification subscription object.
|
|
52
|
+
* @param createSubscriptionRequest
|
|
53
|
+
*/
|
|
54
|
+
async createNotificationSubscription(createSubscriptionRequest, _options) {
|
|
55
|
+
let _config = _options || this.configuration;
|
|
56
|
+
// verify required parameter 'createSubscriptionRequest' is not null or undefined
|
|
57
|
+
if (createSubscriptionRequest === null || createSubscriptionRequest === undefined) {
|
|
58
|
+
throw new baseapi_1.RequiredError("NotificationsApi", "createNotificationSubscription", "createSubscriptionRequest");
|
|
59
|
+
}
|
|
60
|
+
// Path Params
|
|
61
|
+
const localVarPath = '/v1/notification_subscriptions';
|
|
62
|
+
// Make Request Context
|
|
63
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
64
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
65
|
+
// Body Params
|
|
66
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
67
|
+
"application/json"
|
|
68
|
+
]);
|
|
69
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
70
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(createSubscriptionRequest, "CreateSubscriptionRequest", ""), contentType);
|
|
71
|
+
requestContext.setBody(serializedBody);
|
|
72
|
+
let authMethod;
|
|
73
|
+
// Apply auth methods
|
|
74
|
+
authMethod = _config.authMethods["sk"];
|
|
75
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
76
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
77
|
+
}
|
|
78
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
79
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
80
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
81
|
+
}
|
|
82
|
+
return requestContext;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Create a trigger for the provided notification.
|
|
86
|
+
* Create a notification trigger object.
|
|
87
|
+
* @param createTriggerRequest
|
|
88
|
+
*/
|
|
89
|
+
async createNotificationTrigger(createTriggerRequest, _options) {
|
|
90
|
+
let _config = _options || this.configuration;
|
|
91
|
+
// verify required parameter 'createTriggerRequest' is not null or undefined
|
|
92
|
+
if (createTriggerRequest === null || createTriggerRequest === undefined) {
|
|
93
|
+
throw new baseapi_1.RequiredError("NotificationsApi", "createNotificationTrigger", "createTriggerRequest");
|
|
94
|
+
}
|
|
95
|
+
// Path Params
|
|
96
|
+
const localVarPath = '/v1/notification_triggers';
|
|
97
|
+
// Make Request Context
|
|
98
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
99
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
100
|
+
// Body Params
|
|
101
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
102
|
+
"application/json"
|
|
103
|
+
]);
|
|
104
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
105
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(createTriggerRequest, "CreateTriggerRequest", ""), contentType);
|
|
106
|
+
requestContext.setBody(serializedBody);
|
|
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
|
+
* Delete a notification by providing its notification id.
|
|
121
|
+
* Deletes a notification object.
|
|
122
|
+
* @param id Specifies the unique notification ID (starts with not_).
|
|
123
|
+
*/
|
|
124
|
+
async deleteNotification(id, _options) {
|
|
125
|
+
let _config = _options || this.configuration;
|
|
126
|
+
// verify required parameter 'id' is not null or undefined
|
|
127
|
+
if (id === null || id === undefined) {
|
|
128
|
+
throw new baseapi_1.RequiredError("NotificationsApi", "deleteNotification", "id");
|
|
129
|
+
}
|
|
130
|
+
// Path Params
|
|
131
|
+
const localVarPath = '/v1/notifications/{id}'
|
|
132
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
133
|
+
// Make Request Context
|
|
134
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
135
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
136
|
+
let authMethod;
|
|
137
|
+
// Apply auth methods
|
|
138
|
+
authMethod = _config.authMethods["sk"];
|
|
139
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
140
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
141
|
+
}
|
|
142
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
143
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
144
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
145
|
+
}
|
|
146
|
+
return requestContext;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Delete a notification subscription by providing its notification subscription id.
|
|
150
|
+
* Deletes a notification subscription object.
|
|
151
|
+
* @param id Specifies the unique notification subscription ID (starts with ntr_).
|
|
152
|
+
*/
|
|
153
|
+
async deleteNotificationSubscription(id, _options) {
|
|
154
|
+
let _config = _options || this.configuration;
|
|
155
|
+
// verify required parameter 'id' is not null or undefined
|
|
156
|
+
if (id === null || id === undefined) {
|
|
157
|
+
throw new baseapi_1.RequiredError("NotificationsApi", "deleteNotificationSubscription", "id");
|
|
158
|
+
}
|
|
159
|
+
// Path Params
|
|
160
|
+
const localVarPath = '/v1/notification_subscriptions/{id}'
|
|
161
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
162
|
+
// Make Request Context
|
|
163
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
164
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
165
|
+
let authMethod;
|
|
166
|
+
// Apply auth methods
|
|
167
|
+
authMethod = _config.authMethods["sk"];
|
|
168
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
169
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
170
|
+
}
|
|
171
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
172
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
173
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
174
|
+
}
|
|
175
|
+
return requestContext;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Delete a notification trigger by providing its notification trigger id.
|
|
179
|
+
* Deletes a notification trigger object.
|
|
180
|
+
* @param id Specifies the unique notification trigger ID (starts with ntr_).
|
|
181
|
+
*/
|
|
182
|
+
async deleteNotificationTrigger(id, _options) {
|
|
183
|
+
let _config = _options || this.configuration;
|
|
184
|
+
// verify required parameter 'id' is not null or undefined
|
|
185
|
+
if (id === null || id === undefined) {
|
|
186
|
+
throw new baseapi_1.RequiredError("NotificationsApi", "deleteNotificationTrigger", "id");
|
|
187
|
+
}
|
|
188
|
+
// Path Params
|
|
189
|
+
const localVarPath = '/v1/notification_triggers/{id}'
|
|
190
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
191
|
+
// Make Request Context
|
|
192
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
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
|
+
* Retrieves the details of an existing account. Supply the unique notification ID.
|
|
208
|
+
* Get existing account.
|
|
209
|
+
* @param id Specifies the unique account ID (starts with not_).
|
|
210
|
+
* @param expand
|
|
211
|
+
*/
|
|
212
|
+
async getNotification(id, expand, _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("NotificationsApi", "getNotification", "id");
|
|
217
|
+
}
|
|
218
|
+
// Path Params
|
|
219
|
+
const localVarPath = '/v1/notifications/{id}'
|
|
220
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
221
|
+
// Make Request Context
|
|
222
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
223
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
224
|
+
// Query Params
|
|
225
|
+
if (expand !== undefined) {
|
|
226
|
+
requestContext.setQueryParam("expand", ObjectSerializer_1.ObjectSerializer.serialize(expand, "Array<NotificationResponseExpandable>", ""));
|
|
227
|
+
}
|
|
228
|
+
let authMethod;
|
|
229
|
+
// Apply auth methods
|
|
230
|
+
authMethod = _config.authMethods["sk"];
|
|
231
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
232
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
233
|
+
}
|
|
234
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
235
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
236
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
237
|
+
}
|
|
238
|
+
return requestContext;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Retrieves the details of an existing notification subscription. Supply the unique notification subscription ID.
|
|
242
|
+
* Get existing notification subscription.
|
|
243
|
+
* @param id Specifies the unique notification subscription ID (starts with not_).
|
|
244
|
+
*/
|
|
245
|
+
async getNotificationSubscription(id, _options) {
|
|
246
|
+
let _config = _options || this.configuration;
|
|
247
|
+
// verify required parameter 'id' is not null or undefined
|
|
248
|
+
if (id === null || id === undefined) {
|
|
249
|
+
throw new baseapi_1.RequiredError("NotificationsApi", "getNotificationSubscription", "id");
|
|
250
|
+
}
|
|
251
|
+
// Path Params
|
|
252
|
+
const localVarPath = '/v1/notification_subscriptions/{id}'
|
|
253
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
254
|
+
// Make Request Context
|
|
255
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
256
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
257
|
+
let authMethod;
|
|
258
|
+
// Apply auth methods
|
|
259
|
+
authMethod = _config.authMethods["sk"];
|
|
260
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
261
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
262
|
+
}
|
|
263
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
264
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
265
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
266
|
+
}
|
|
267
|
+
return requestContext;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Returns a list of subscriptions of a notification. The subscriptions are returned sorted by creation date, with the most recently created accounts appearing first. By default, a maximum of 10 notification subscriptions are shown per page.
|
|
271
|
+
* List notification subscriptions of a notification.
|
|
272
|
+
* @param notification Specifies the unique notification ID (starts with not_).
|
|
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
|
+
*/
|
|
277
|
+
async getNotificationSubscriptions(notification, limit, skip, order, _options) {
|
|
278
|
+
let _config = _options || this.configuration;
|
|
279
|
+
// verify required parameter 'notification' is not null or undefined
|
|
280
|
+
if (notification === null || notification === undefined) {
|
|
281
|
+
throw new baseapi_1.RequiredError("NotificationsApi", "getNotificationSubscriptions", "notification");
|
|
282
|
+
}
|
|
283
|
+
// Path Params
|
|
284
|
+
const localVarPath = '/v1/notification_subscriptions';
|
|
285
|
+
// Make Request Context
|
|
286
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
287
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
288
|
+
// Query Params
|
|
289
|
+
if (limit !== undefined) {
|
|
290
|
+
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", "int32"));
|
|
291
|
+
}
|
|
292
|
+
// Query Params
|
|
293
|
+
if (skip !== undefined) {
|
|
294
|
+
requestContext.setQueryParam("skip", ObjectSerializer_1.ObjectSerializer.serialize(skip, "number", "int32"));
|
|
295
|
+
}
|
|
296
|
+
// Query Params
|
|
297
|
+
if (order !== undefined) {
|
|
298
|
+
requestContext.setQueryParam("order", ObjectSerializer_1.ObjectSerializer.serialize(order, "SortOrder", ""));
|
|
299
|
+
}
|
|
300
|
+
// Query Params
|
|
301
|
+
if (notification !== undefined) {
|
|
302
|
+
requestContext.setQueryParam("notification", ObjectSerializer_1.ObjectSerializer.serialize(notification, "string", ""));
|
|
303
|
+
}
|
|
304
|
+
let authMethod;
|
|
305
|
+
// Apply auth methods
|
|
306
|
+
authMethod = _config.authMethods["sk"];
|
|
307
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
308
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
309
|
+
}
|
|
310
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
311
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
312
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
313
|
+
}
|
|
314
|
+
return requestContext;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Retrieves the details of an existing notification trigger. Supply the unique notification trigger ID.
|
|
318
|
+
* Get existing notification trigger.
|
|
319
|
+
* @param id Specifies the unique notification trigger ID (starts with ntr_).
|
|
320
|
+
*/
|
|
321
|
+
async getNotificationTrigger(id, _options) {
|
|
322
|
+
let _config = _options || this.configuration;
|
|
323
|
+
// verify required parameter 'id' is not null or undefined
|
|
324
|
+
if (id === null || id === undefined) {
|
|
325
|
+
throw new baseapi_1.RequiredError("NotificationsApi", "getNotificationTrigger", "id");
|
|
326
|
+
}
|
|
327
|
+
// Path Params
|
|
328
|
+
const localVarPath = '/v1/notification_triggers/{id}'
|
|
329
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
330
|
+
// Make Request Context
|
|
331
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
332
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
333
|
+
let authMethod;
|
|
334
|
+
// Apply auth methods
|
|
335
|
+
authMethod = _config.authMethods["sk"];
|
|
336
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
337
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
338
|
+
}
|
|
339
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
340
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
341
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
342
|
+
}
|
|
343
|
+
return requestContext;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Returns a list of triggers of a notification. The triggers are returned sorted by creation date, with the most recently created accounts appearing first. By default, a maximum of 10 notification triggers are shown per page.
|
|
347
|
+
* List notification triggers of a notification.
|
|
348
|
+
* @param notification Specifies the unique notification ID (starts with not_).
|
|
349
|
+
* @param limit Specifies the maximum number of records to return.
|
|
350
|
+
* @param skip Specifies the offset for the first records to return.
|
|
351
|
+
* @param order Specifies the order in which to sort the results.
|
|
352
|
+
*/
|
|
353
|
+
async getNotificationTriggers(notification, limit, skip, order, _options) {
|
|
354
|
+
let _config = _options || this.configuration;
|
|
355
|
+
// verify required parameter 'notification' is not null or undefined
|
|
356
|
+
if (notification === null || notification === undefined) {
|
|
357
|
+
throw new baseapi_1.RequiredError("NotificationsApi", "getNotificationTriggers", "notification");
|
|
358
|
+
}
|
|
359
|
+
// Path Params
|
|
360
|
+
const localVarPath = '/v1/notification_triggers';
|
|
361
|
+
// Make Request Context
|
|
362
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
363
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
364
|
+
// Query Params
|
|
365
|
+
if (limit !== undefined) {
|
|
366
|
+
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", "int32"));
|
|
367
|
+
}
|
|
368
|
+
// Query Params
|
|
369
|
+
if (skip !== undefined) {
|
|
370
|
+
requestContext.setQueryParam("skip", ObjectSerializer_1.ObjectSerializer.serialize(skip, "number", "int32"));
|
|
371
|
+
}
|
|
372
|
+
// Query Params
|
|
373
|
+
if (order !== undefined) {
|
|
374
|
+
requestContext.setQueryParam("order", ObjectSerializer_1.ObjectSerializer.serialize(order, "SortOrder", ""));
|
|
375
|
+
}
|
|
376
|
+
// Query Params
|
|
377
|
+
if (notification !== undefined) {
|
|
378
|
+
requestContext.setQueryParam("notification", ObjectSerializer_1.ObjectSerializer.serialize(notification, "string", ""));
|
|
379
|
+
}
|
|
380
|
+
let authMethod;
|
|
381
|
+
// Apply auth methods
|
|
382
|
+
authMethod = _config.authMethods["sk"];
|
|
383
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
384
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
385
|
+
}
|
|
386
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
387
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
388
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
389
|
+
}
|
|
390
|
+
return requestContext;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Returns a list of notifications. The notifications are returned sorted by creation date, with the most recently created notifications appearing first. By default, a maximum of 10 notifications are shown per page.
|
|
394
|
+
* List notifications.
|
|
395
|
+
* @param limit Specifies the maximum number of records to return.
|
|
396
|
+
* @param skip Specifies the offset for the first records to return.
|
|
397
|
+
* @param order Specifies the order in which to sort the results.
|
|
398
|
+
* @param expand Specifies the fields to expand in the response.
|
|
399
|
+
* @param deleted Specifies whether to include deleted notifications.
|
|
400
|
+
* @param name Specifies the name of the notifications.
|
|
401
|
+
*/
|
|
402
|
+
async getNotifications(limit, skip, order, expand, deleted, name, _options) {
|
|
403
|
+
let _config = _options || this.configuration;
|
|
404
|
+
// Path Params
|
|
405
|
+
const localVarPath = '/v1/notifications';
|
|
406
|
+
// Make Request Context
|
|
407
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
408
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
409
|
+
// Query Params
|
|
410
|
+
if (limit !== undefined) {
|
|
411
|
+
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", "int32"));
|
|
412
|
+
}
|
|
413
|
+
// Query Params
|
|
414
|
+
if (skip !== undefined) {
|
|
415
|
+
requestContext.setQueryParam("skip", ObjectSerializer_1.ObjectSerializer.serialize(skip, "number", "int32"));
|
|
416
|
+
}
|
|
417
|
+
// Query Params
|
|
418
|
+
if (order !== undefined) {
|
|
419
|
+
requestContext.setQueryParam("order", ObjectSerializer_1.ObjectSerializer.serialize(order, "SortOrder", ""));
|
|
420
|
+
}
|
|
421
|
+
// Query Params
|
|
422
|
+
if (expand !== undefined) {
|
|
423
|
+
requestContext.setQueryParam("expand", ObjectSerializer_1.ObjectSerializer.serialize(expand, "Array<NotificationResponseExpandable>", ""));
|
|
424
|
+
}
|
|
425
|
+
// Query Params
|
|
426
|
+
if (deleted !== undefined) {
|
|
427
|
+
requestContext.setQueryParam("deleted", ObjectSerializer_1.ObjectSerializer.serialize(deleted, "boolean", ""));
|
|
428
|
+
}
|
|
429
|
+
// Query Params
|
|
430
|
+
if (name !== undefined) {
|
|
431
|
+
requestContext.setQueryParam("name", ObjectSerializer_1.ObjectSerializer.serialize(name, "string", ""));
|
|
432
|
+
}
|
|
433
|
+
let authMethod;
|
|
434
|
+
// Apply auth methods
|
|
435
|
+
authMethod = _config.authMethods["sk"];
|
|
436
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
437
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
438
|
+
}
|
|
439
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
440
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
441
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
442
|
+
}
|
|
443
|
+
return requestContext;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
exports.NotificationsApiRequestFactory = NotificationsApiRequestFactory;
|
|
447
|
+
class NotificationsApiResponseProcessor {
|
|
448
|
+
/**
|
|
449
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
450
|
+
* to the expected objects
|
|
451
|
+
*
|
|
452
|
+
* @params response Response returned by the server for a request to createNotification
|
|
453
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
454
|
+
*/
|
|
455
|
+
async createNotification(response) {
|
|
456
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
457
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
458
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationResponse", "");
|
|
459
|
+
return body;
|
|
460
|
+
}
|
|
461
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
462
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
463
|
+
}
|
|
464
|
+
if ((0, util_1.isCodeInRange)("409", response.httpStatusCode)) {
|
|
465
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
466
|
+
}
|
|
467
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
468
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
469
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationResponse", "");
|
|
470
|
+
return body;
|
|
471
|
+
}
|
|
472
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
476
|
+
* to the expected objects
|
|
477
|
+
*
|
|
478
|
+
* @params response Response returned by the server for a request to createNotificationSubscription
|
|
479
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
480
|
+
*/
|
|
481
|
+
async createNotificationSubscription(response) {
|
|
482
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
483
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
484
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationSubscription", "");
|
|
485
|
+
return body;
|
|
486
|
+
}
|
|
487
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
488
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
489
|
+
}
|
|
490
|
+
if ((0, util_1.isCodeInRange)("409", response.httpStatusCode)) {
|
|
491
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
492
|
+
}
|
|
493
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
494
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
495
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationSubscription", "");
|
|
496
|
+
return body;
|
|
497
|
+
}
|
|
498
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
502
|
+
* to the expected objects
|
|
503
|
+
*
|
|
504
|
+
* @params response Response returned by the server for a request to createNotificationTrigger
|
|
505
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
506
|
+
*/
|
|
507
|
+
async createNotificationTrigger(response) {
|
|
508
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
509
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
510
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationTriggerResponse", "");
|
|
511
|
+
return body;
|
|
512
|
+
}
|
|
513
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
514
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
515
|
+
}
|
|
516
|
+
if ((0, util_1.isCodeInRange)("409", response.httpStatusCode)) {
|
|
517
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
518
|
+
}
|
|
519
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
520
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
521
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationTriggerResponse", "");
|
|
522
|
+
return body;
|
|
523
|
+
}
|
|
524
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
528
|
+
* to the expected objects
|
|
529
|
+
*
|
|
530
|
+
* @params response Response returned by the server for a request to deleteNotification
|
|
531
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
532
|
+
*/
|
|
533
|
+
async deleteNotification(response) {
|
|
534
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
535
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
536
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationDeleteResponse", "");
|
|
537
|
+
return body;
|
|
538
|
+
}
|
|
539
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
540
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
541
|
+
}
|
|
542
|
+
if ((0, util_1.isCodeInRange)("409", response.httpStatusCode)) {
|
|
543
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
544
|
+
}
|
|
545
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
546
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
547
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationDeleteResponse", "");
|
|
548
|
+
return body;
|
|
549
|
+
}
|
|
550
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
554
|
+
* to the expected objects
|
|
555
|
+
*
|
|
556
|
+
* @params response Response returned by the server for a request to deleteNotificationSubscription
|
|
557
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
558
|
+
*/
|
|
559
|
+
async deleteNotificationSubscription(response) {
|
|
560
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
561
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
562
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationSubscriptionDeleteResponse", "");
|
|
563
|
+
return body;
|
|
564
|
+
}
|
|
565
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
566
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
567
|
+
}
|
|
568
|
+
if ((0, util_1.isCodeInRange)("409", response.httpStatusCode)) {
|
|
569
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
570
|
+
}
|
|
571
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
572
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
573
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationSubscriptionDeleteResponse", "");
|
|
574
|
+
return body;
|
|
575
|
+
}
|
|
576
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
580
|
+
* to the expected objects
|
|
581
|
+
*
|
|
582
|
+
* @params response Response returned by the server for a request to deleteNotificationTrigger
|
|
583
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
584
|
+
*/
|
|
585
|
+
async deleteNotificationTrigger(response) {
|
|
586
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
587
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
588
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationTriggerDeleteResponse", "");
|
|
589
|
+
return body;
|
|
590
|
+
}
|
|
591
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
592
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
593
|
+
}
|
|
594
|
+
if ((0, util_1.isCodeInRange)("409", response.httpStatusCode)) {
|
|
595
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
596
|
+
}
|
|
597
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
598
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
599
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationTriggerDeleteResponse", "");
|
|
600
|
+
return body;
|
|
601
|
+
}
|
|
602
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
606
|
+
* to the expected objects
|
|
607
|
+
*
|
|
608
|
+
* @params response Response returned by the server for a request to getNotification
|
|
609
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
610
|
+
*/
|
|
611
|
+
async getNotification(response) {
|
|
612
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
613
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
614
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationResponse", "");
|
|
615
|
+
return body;
|
|
616
|
+
}
|
|
617
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
618
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
619
|
+
}
|
|
620
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
621
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
622
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationResponse", "");
|
|
623
|
+
return body;
|
|
624
|
+
}
|
|
625
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
629
|
+
* to the expected objects
|
|
630
|
+
*
|
|
631
|
+
* @params response Response returned by the server for a request to getNotificationSubscription
|
|
632
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
633
|
+
*/
|
|
634
|
+
async getNotificationSubscription(response) {
|
|
635
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
636
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
637
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationSubscription", "");
|
|
638
|
+
return body;
|
|
639
|
+
}
|
|
640
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
641
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
642
|
+
}
|
|
643
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
644
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
645
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationSubscription", "");
|
|
646
|
+
return body;
|
|
647
|
+
}
|
|
648
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
652
|
+
* to the expected objects
|
|
653
|
+
*
|
|
654
|
+
* @params response Response returned by the server for a request to getNotificationSubscriptions
|
|
655
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
656
|
+
*/
|
|
657
|
+
async getNotificationSubscriptions(response) {
|
|
658
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
659
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
660
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationSubscriptionListResponse", "");
|
|
661
|
+
return body;
|
|
662
|
+
}
|
|
663
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
664
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
665
|
+
}
|
|
666
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
667
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
668
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationSubscriptionListResponse", "");
|
|
669
|
+
return body;
|
|
670
|
+
}
|
|
671
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
675
|
+
* to the expected objects
|
|
676
|
+
*
|
|
677
|
+
* @params response Response returned by the server for a request to getNotificationTrigger
|
|
678
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
679
|
+
*/
|
|
680
|
+
async getNotificationTrigger(response) {
|
|
681
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
682
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
683
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationTriggerResponse", "");
|
|
684
|
+
return body;
|
|
685
|
+
}
|
|
686
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
687
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
688
|
+
}
|
|
689
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
690
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
691
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationTriggerResponse", "");
|
|
692
|
+
return body;
|
|
693
|
+
}
|
|
694
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
698
|
+
* to the expected objects
|
|
699
|
+
*
|
|
700
|
+
* @params response Response returned by the server for a request to getNotificationTriggers
|
|
701
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
702
|
+
*/
|
|
703
|
+
async getNotificationTriggers(response) {
|
|
704
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
705
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
706
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationTriggerListResponse", "");
|
|
707
|
+
return body;
|
|
708
|
+
}
|
|
709
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
710
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
711
|
+
}
|
|
712
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
713
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
714
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationTriggerListResponse", "");
|
|
715
|
+
return body;
|
|
716
|
+
}
|
|
717
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
721
|
+
* to the expected objects
|
|
722
|
+
*
|
|
723
|
+
* @params response Response returned by the server for a request to getNotifications
|
|
724
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
725
|
+
*/
|
|
726
|
+
async getNotifications(response) {
|
|
727
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
728
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
729
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationListResponse", "");
|
|
730
|
+
return body;
|
|
731
|
+
}
|
|
732
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
733
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
734
|
+
}
|
|
735
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
736
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
737
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationListResponse", "");
|
|
738
|
+
return body;
|
|
739
|
+
}
|
|
740
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
exports.NotificationsApiResponseProcessor = NotificationsApiResponseProcessor;
|
|
744
|
+
//# sourceMappingURL=NotificationsApi.js.map
|