@datadog/datadog-api-client 1.38.0 → 1.39.0
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/CHANGELOG.md +20 -0
- package/dist/packages/datadog-api-client-common/configuration.js +7 -0
- package/dist/packages/datadog-api-client-common/configuration.js.map +1 -1
- package/dist/packages/datadog-api-client-common/servers.js +14 -0
- package/dist/packages/datadog-api-client-common/servers.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/index.d.ts +1 -0
- package/dist/packages/datadog-api-client-v1/index.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/ObjectSerializer.js +1 -0
- package/dist/packages/datadog-api-client-v1/models/ObjectSerializer.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/SyntheticsMobileTest.d.ts +1 -1
- package/dist/packages/datadog-api-client-v1/models/SyntheticsMobileTest.js +1 -0
- package/dist/packages/datadog-api-client-v1/models/SyntheticsMobileTest.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/SyntheticsTestRequest.d.ts +2 -1
- package/dist/packages/datadog-api-client-v1/models/SyntheticsTestRequest.js +1 -1
- package/dist/packages/datadog-api-client-v1/models/SyntheticsTestRequest.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/SyntheticsTestRequestDNSServerPort.d.ts +10 -0
- package/dist/packages/datadog-api-client-v1/models/SyntheticsTestRequestDNSServerPort.js +8 -0
- package/dist/packages/datadog-api-client-v1/models/SyntheticsTestRequestDNSServerPort.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/apis/ActionConnectionApi.d.ts +96 -4
- package/dist/packages/datadog-api-client-v2/apis/ActionConnectionApi.js +304 -4
- package/dist/packages/datadog-api-client-v2/apis/ActionConnectionApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/AppBuilderApi.d.ts +8 -8
- package/dist/packages/datadog-api-client-v2/apis/AppBuilderApi.js +8 -8
- package/dist/packages/datadog-api-client-v2/apis/EventsApi.d.ts +8 -4
- package/dist/packages/datadog-api-client-v2/apis/EventsApi.js +8 -4
- package/dist/packages/datadog-api-client-v2/apis/EventsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/MonitorsApi.d.ts +156 -0
- package/dist/packages/datadog-api-client-v2/apis/MonitorsApi.js +576 -0
- package/dist/packages/datadog-api-client-v2/apis/MonitorsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/WorkflowAutomationApi.d.ts +8 -8
- package/dist/packages/datadog-api-client-v2/apis/WorkflowAutomationApi.js +8 -8
- package/dist/packages/datadog-api-client-v2/index.d.ts +30 -2
- package/dist/packages/datadog-api-client-v2/index.js +84 -39
- package/dist/packages/datadog-api-client-v2/index.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributes.d.ts +45 -0
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributes.js +39 -0
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributesLinksItems.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributesLinksItems.js +36 -0
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributesLinksItems.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributesLinksItemsCategory.d.ts +13 -0
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributesLinksItemsCategory.js +12 -0
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributesLinksItemsCategory.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributesPriority.d.ts +15 -0
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributesPriority.js +14 -0
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributesPriority.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributesStatus.d.ts +13 -0
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributesStatus.js +12 -0
- package/dist/packages/datadog-api-client-v2/models/AlertEventCustomAttributesStatus.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/AppKeyRegistrationData.d.ts +41 -0
- package/dist/packages/datadog-api-client-v2/models/AppKeyRegistrationData.js +36 -0
- package/dist/packages/datadog-api-client-v2/models/AppKeyRegistrationData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/AppKeyRegistrationDataType.d.ts +11 -0
- package/dist/packages/datadog-api-client-v2/models/AppKeyRegistrationDataType.js +10 -0
- package/dist/packages/datadog-api-client-v2/models/AppKeyRegistrationDataType.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/ChangeEventCustomAttributes.d.ts +7 -15
- package/dist/packages/datadog-api-client-v2/models/ChangeEventCustomAttributes.js +1 -5
- package/dist/packages/datadog-api-client-v2/models/ChangeEventCustomAttributes.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/ChangeEventCustomAttributesAuthor.d.ts +2 -10
- package/dist/packages/datadog-api-client-v2/models/ChangeEventCustomAttributesAuthor.js +1 -5
- package/dist/packages/datadog-api-client-v2/models/ChangeEventCustomAttributesAuthor.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/ChangeEventCustomAttributesChangedResource.d.ts +3 -11
- package/dist/packages/datadog-api-client-v2/models/ChangeEventCustomAttributesChangedResource.js +1 -5
- package/dist/packages/datadog-api-client-v2/models/ChangeEventCustomAttributesChangedResource.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/ChangeEventCustomAttributesChangedResourceType.d.ts +1 -1
- package/dist/packages/datadog-api-client-v2/models/ChangeEventCustomAttributesImpactedResourcesItems.d.ts +3 -11
- package/dist/packages/datadog-api-client-v2/models/ChangeEventCustomAttributesImpactedResourcesItems.js +1 -5
- package/dist/packages/datadog-api-client-v2/models/ChangeEventCustomAttributesImpactedResourcesItems.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/ChangeEventCustomAttributesImpactedResourcesItemsType.d.ts +1 -1
- package/dist/packages/datadog-api-client-v2/models/EventCategory.d.ts +3 -2
- package/dist/packages/datadog-api-client-v2/models/EventCategory.js +2 -1
- package/dist/packages/datadog-api-client-v2/models/EventCategory.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/EventCreateRequest.d.ts +3 -3
- package/dist/packages/datadog-api-client-v2/models/EventCreateRequest.js +3 -1
- package/dist/packages/datadog-api-client-v2/models/EventCreateRequest.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/EventCreateRequestPayload.d.ts +2 -2
- package/dist/packages/datadog-api-client-v2/models/EventCreateRequestPayload.js +1 -0
- package/dist/packages/datadog-api-client-v2/models/EventCreateRequestPayload.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponse.d.ts +3 -3
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponse.js +1 -1
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponseAttributes.d.ts +2 -2
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponseAttributes.js +1 -1
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponseAttributesAttributes.d.ts +1 -1
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponseAttributesAttributes.js +1 -1
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponseAttributesAttributesEvt.d.ts +5 -1
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponseAttributesAttributesEvt.js +4 -0
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponseAttributesAttributesEvt.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponsePayload.d.ts +7 -2
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponsePayload.js +5 -1
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponsePayload.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponsePayloadLinks.d.ts +36 -0
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponsePayloadLinks.js +35 -0
- package/dist/packages/datadog-api-client-v2/models/EventCreateResponsePayloadLinks.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/EventPayload.d.ts +11 -14
- package/dist/packages/datadog-api-client-v2/models/EventPayload.js +4 -4
- package/dist/packages/datadog-api-client-v2/models/EventPayload.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/EventPayloadAttributes.d.ts +3 -2
- package/dist/packages/datadog-api-client-v2/models/EventPayloadIntegrationId.d.ts +11 -0
- package/dist/packages/datadog-api-client-v2/models/EventPayloadIntegrationId.js +10 -0
- package/dist/packages/datadog-api-client-v2/models/EventPayloadIntegrationId.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/GetAppKeyRegistrationResponse.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/GetAppKeyRegistrationResponse.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/GetAppKeyRegistrationResponse.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentCreateAttributes.d.ts +4 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentCreateAttributes.js +4 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentCreateAttributes.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/IncidentResponseAttributes.d.ts +4 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentResponseAttributes.js +4 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentResponseAttributes.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/JobDefinitionFromRule.d.ts +0 -4
- package/dist/packages/datadog-api-client-v2/models/JobDefinitionFromRule.js +0 -6
- package/dist/packages/datadog-api-client-v2/models/JobDefinitionFromRule.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/ListAppKeyRegistrationsResponse.d.ts +42 -0
- package/dist/packages/datadog-api-client-v2/models/ListAppKeyRegistrationsResponse.js +34 -0
- package/dist/packages/datadog-api-client-v2/models/ListAppKeyRegistrationsResponse.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/ListAppKeyRegistrationsResponseMeta.d.ts +40 -0
- package/dist/packages/datadog-api-client-v2/models/ListAppKeyRegistrationsResponseMeta.js +41 -0
- package/dist/packages/datadog-api-client-v2/models/ListAppKeyRegistrationsResponseMeta.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplate.d.ts +72 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplate.js +65 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplate.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateCreateData.d.ts +42 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateCreateData.js +36 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateCreateData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateCreateRequest.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateCreateRequest.js +31 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateCreateRequest.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateCreateResponse.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateCreateResponse.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateCreateResponse.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateListResponse.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateListResponse.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateListResponse.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateRequestAttributes.d.ts +47 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateRequestAttributes.js +45 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateRequestAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResourceType.d.ts +11 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResourceType.js +10 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResourceType.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResponse.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResponse.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResponse.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResponseAttributes.d.ts +67 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResponseAttributes.js +61 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResponseAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResponseData.d.ts +46 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResponseData.js +38 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResponseData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResponseDataWithVersions.d.ts +46 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResponseDataWithVersions.js +38 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateResponseDataWithVersions.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateTemplateVariablesItems.d.ts +40 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateTemplateVariablesItems.js +44 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateTemplateVariablesItems.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateUpdateData.d.ts +46 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateUpdateData.js +41 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateUpdateData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateUpdateRequest.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateUpdateRequest.js +31 -0
- package/dist/packages/datadog-api-client-v2/models/MonitorUserTemplateUpdateRequest.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/ObjectSerializer.js +59 -2
- package/dist/packages/datadog-api-client-v2/models/ObjectSerializer.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/RegisterAppKeyResponse.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/RegisterAppKeyResponse.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/RegisterAppKeyResponse.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/SimpleMonitorUserTemplate.d.ts +67 -0
- package/dist/packages/datadog-api-client-v2/models/SimpleMonitorUserTemplate.js +60 -0
- package/dist/packages/datadog-api-client-v2/models/SimpleMonitorUserTemplate.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -82,6 +82,41 @@ class MonitorsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
82
82
|
return requestContext;
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
+
createMonitorUserTemplate(body, _options) {
|
|
86
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
+
const _config = _options || this.configuration;
|
|
88
|
+
logger_1.logger.warn("Using unstable operation 'createMonitorUserTemplate'");
|
|
89
|
+
if (!_config.unstableOperations["v2.createMonitorUserTemplate"]) {
|
|
90
|
+
throw new Error("Unstable operation 'createMonitorUserTemplate' is disabled");
|
|
91
|
+
}
|
|
92
|
+
// verify required parameter 'body' is not null or undefined
|
|
93
|
+
if (body === null || body === undefined) {
|
|
94
|
+
throw new baseapi_1.RequiredError("body", "createMonitorUserTemplate");
|
|
95
|
+
}
|
|
96
|
+
// Path Params
|
|
97
|
+
const localVarPath = "/api/v2/monitor/template";
|
|
98
|
+
// Make Request Context
|
|
99
|
+
const requestContext = _config
|
|
100
|
+
.getServer("v2.MonitorsApi.createMonitorUserTemplate")
|
|
101
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
102
|
+
requestContext.setHeaderParam("Accept", "application/json");
|
|
103
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
104
|
+
// Body Params
|
|
105
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
106
|
+
"application/json",
|
|
107
|
+
]);
|
|
108
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
109
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "MonitorUserTemplateCreateRequest", ""), contentType);
|
|
110
|
+
requestContext.setBody(serializedBody);
|
|
111
|
+
// Apply auth methods
|
|
112
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
113
|
+
"AuthZ",
|
|
114
|
+
"apiKeyAuth",
|
|
115
|
+
"appKeyAuth",
|
|
116
|
+
]);
|
|
117
|
+
return requestContext;
|
|
118
|
+
});
|
|
119
|
+
}
|
|
85
120
|
deleteMonitorConfigPolicy(policyId, _options) {
|
|
86
121
|
return __awaiter(this, void 0, void 0, function* () {
|
|
87
122
|
const _config = _options || this.configuration;
|
|
@@ -133,6 +168,34 @@ class MonitorsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
133
168
|
return requestContext;
|
|
134
169
|
});
|
|
135
170
|
}
|
|
171
|
+
deleteMonitorUserTemplate(templateId, _options) {
|
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
const _config = _options || this.configuration;
|
|
174
|
+
logger_1.logger.warn("Using unstable operation 'deleteMonitorUserTemplate'");
|
|
175
|
+
if (!_config.unstableOperations["v2.deleteMonitorUserTemplate"]) {
|
|
176
|
+
throw new Error("Unstable operation 'deleteMonitorUserTemplate' is disabled");
|
|
177
|
+
}
|
|
178
|
+
// verify required parameter 'templateId' is not null or undefined
|
|
179
|
+
if (templateId === null || templateId === undefined) {
|
|
180
|
+
throw new baseapi_1.RequiredError("templateId", "deleteMonitorUserTemplate");
|
|
181
|
+
}
|
|
182
|
+
// Path Params
|
|
183
|
+
const localVarPath = "/api/v2/monitor/template/{template_id}".replace("{template_id}", encodeURIComponent(String(templateId)));
|
|
184
|
+
// Make Request Context
|
|
185
|
+
const requestContext = _config
|
|
186
|
+
.getServer("v2.MonitorsApi.deleteMonitorUserTemplate")
|
|
187
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
188
|
+
requestContext.setHeaderParam("Accept", "*/*");
|
|
189
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
190
|
+
// Apply auth methods
|
|
191
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
192
|
+
"AuthZ",
|
|
193
|
+
"apiKeyAuth",
|
|
194
|
+
"appKeyAuth",
|
|
195
|
+
]);
|
|
196
|
+
return requestContext;
|
|
197
|
+
});
|
|
198
|
+
}
|
|
136
199
|
getMonitorConfigPolicy(policyId, _options) {
|
|
137
200
|
return __awaiter(this, void 0, void 0, function* () {
|
|
138
201
|
const _config = _options || this.configuration;
|
|
@@ -217,6 +280,38 @@ class MonitorsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
217
280
|
return requestContext;
|
|
218
281
|
});
|
|
219
282
|
}
|
|
283
|
+
getMonitorUserTemplate(templateId, withAllVersions, _options) {
|
|
284
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
285
|
+
const _config = _options || this.configuration;
|
|
286
|
+
logger_1.logger.warn("Using unstable operation 'getMonitorUserTemplate'");
|
|
287
|
+
if (!_config.unstableOperations["v2.getMonitorUserTemplate"]) {
|
|
288
|
+
throw new Error("Unstable operation 'getMonitorUserTemplate' is disabled");
|
|
289
|
+
}
|
|
290
|
+
// verify required parameter 'templateId' is not null or undefined
|
|
291
|
+
if (templateId === null || templateId === undefined) {
|
|
292
|
+
throw new baseapi_1.RequiredError("templateId", "getMonitorUserTemplate");
|
|
293
|
+
}
|
|
294
|
+
// Path Params
|
|
295
|
+
const localVarPath = "/api/v2/monitor/template/{template_id}".replace("{template_id}", encodeURIComponent(String(templateId)));
|
|
296
|
+
// Make Request Context
|
|
297
|
+
const requestContext = _config
|
|
298
|
+
.getServer("v2.MonitorsApi.getMonitorUserTemplate")
|
|
299
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
300
|
+
requestContext.setHeaderParam("Accept", "application/json");
|
|
301
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
302
|
+
// Query Params
|
|
303
|
+
if (withAllVersions !== undefined) {
|
|
304
|
+
requestContext.setQueryParam("with_all_versions", ObjectSerializer_1.ObjectSerializer.serialize(withAllVersions, "boolean", ""), "");
|
|
305
|
+
}
|
|
306
|
+
// Apply auth methods
|
|
307
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
308
|
+
"AuthZ",
|
|
309
|
+
"apiKeyAuth",
|
|
310
|
+
"appKeyAuth",
|
|
311
|
+
]);
|
|
312
|
+
return requestContext;
|
|
313
|
+
});
|
|
314
|
+
}
|
|
220
315
|
listMonitorConfigPolicies(_options) {
|
|
221
316
|
return __awaiter(this, void 0, void 0, function* () {
|
|
222
317
|
const _config = _options || this.configuration;
|
|
@@ -237,6 +332,30 @@ class MonitorsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
237
332
|
return requestContext;
|
|
238
333
|
});
|
|
239
334
|
}
|
|
335
|
+
listMonitorUserTemplates(_options) {
|
|
336
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
337
|
+
const _config = _options || this.configuration;
|
|
338
|
+
logger_1.logger.warn("Using unstable operation 'listMonitorUserTemplates'");
|
|
339
|
+
if (!_config.unstableOperations["v2.listMonitorUserTemplates"]) {
|
|
340
|
+
throw new Error("Unstable operation 'listMonitorUserTemplates' is disabled");
|
|
341
|
+
}
|
|
342
|
+
// Path Params
|
|
343
|
+
const localVarPath = "/api/v2/monitor/template";
|
|
344
|
+
// Make Request Context
|
|
345
|
+
const requestContext = _config
|
|
346
|
+
.getServer("v2.MonitorsApi.listMonitorUserTemplates")
|
|
347
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
348
|
+
requestContext.setHeaderParam("Accept", "application/json");
|
|
349
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
350
|
+
// Apply auth methods
|
|
351
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
352
|
+
"AuthZ",
|
|
353
|
+
"apiKeyAuth",
|
|
354
|
+
"appKeyAuth",
|
|
355
|
+
]);
|
|
356
|
+
return requestContext;
|
|
357
|
+
});
|
|
358
|
+
}
|
|
240
359
|
updateMonitorConfigPolicy(policyId, body, _options) {
|
|
241
360
|
return __awaiter(this, void 0, void 0, function* () {
|
|
242
361
|
const _config = _options || this.configuration;
|
|
@@ -310,6 +429,119 @@ class MonitorsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
310
429
|
return requestContext;
|
|
311
430
|
});
|
|
312
431
|
}
|
|
432
|
+
updateMonitorUserTemplate(templateId, body, _options) {
|
|
433
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
434
|
+
const _config = _options || this.configuration;
|
|
435
|
+
logger_1.logger.warn("Using unstable operation 'updateMonitorUserTemplate'");
|
|
436
|
+
if (!_config.unstableOperations["v2.updateMonitorUserTemplate"]) {
|
|
437
|
+
throw new Error("Unstable operation 'updateMonitorUserTemplate' is disabled");
|
|
438
|
+
}
|
|
439
|
+
// verify required parameter 'templateId' is not null or undefined
|
|
440
|
+
if (templateId === null || templateId === undefined) {
|
|
441
|
+
throw new baseapi_1.RequiredError("templateId", "updateMonitorUserTemplate");
|
|
442
|
+
}
|
|
443
|
+
// verify required parameter 'body' is not null or undefined
|
|
444
|
+
if (body === null || body === undefined) {
|
|
445
|
+
throw new baseapi_1.RequiredError("body", "updateMonitorUserTemplate");
|
|
446
|
+
}
|
|
447
|
+
// Path Params
|
|
448
|
+
const localVarPath = "/api/v2/monitor/template/{template_id}".replace("{template_id}", encodeURIComponent(String(templateId)));
|
|
449
|
+
// Make Request Context
|
|
450
|
+
const requestContext = _config
|
|
451
|
+
.getServer("v2.MonitorsApi.updateMonitorUserTemplate")
|
|
452
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
|
|
453
|
+
requestContext.setHeaderParam("Accept", "application/json");
|
|
454
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
455
|
+
// Body Params
|
|
456
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
457
|
+
"application/json",
|
|
458
|
+
]);
|
|
459
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
460
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "MonitorUserTemplateUpdateRequest", ""), contentType);
|
|
461
|
+
requestContext.setBody(serializedBody);
|
|
462
|
+
// Apply auth methods
|
|
463
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
464
|
+
"AuthZ",
|
|
465
|
+
"apiKeyAuth",
|
|
466
|
+
"appKeyAuth",
|
|
467
|
+
]);
|
|
468
|
+
return requestContext;
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
validateExistingMonitorUserTemplate(templateId, body, _options) {
|
|
472
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
473
|
+
const _config = _options || this.configuration;
|
|
474
|
+
logger_1.logger.warn("Using unstable operation 'validateExistingMonitorUserTemplate'");
|
|
475
|
+
if (!_config.unstableOperations["v2.validateExistingMonitorUserTemplate"]) {
|
|
476
|
+
throw new Error("Unstable operation 'validateExistingMonitorUserTemplate' is disabled");
|
|
477
|
+
}
|
|
478
|
+
// verify required parameter 'templateId' is not null or undefined
|
|
479
|
+
if (templateId === null || templateId === undefined) {
|
|
480
|
+
throw new baseapi_1.RequiredError("templateId", "validateExistingMonitorUserTemplate");
|
|
481
|
+
}
|
|
482
|
+
// verify required parameter 'body' is not null or undefined
|
|
483
|
+
if (body === null || body === undefined) {
|
|
484
|
+
throw new baseapi_1.RequiredError("body", "validateExistingMonitorUserTemplate");
|
|
485
|
+
}
|
|
486
|
+
// Path Params
|
|
487
|
+
const localVarPath = "/api/v2/monitor/template/{template_id}/validate".replace("{template_id}", encodeURIComponent(String(templateId)));
|
|
488
|
+
// Make Request Context
|
|
489
|
+
const requestContext = _config
|
|
490
|
+
.getServer("v2.MonitorsApi.validateExistingMonitorUserTemplate")
|
|
491
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
492
|
+
requestContext.setHeaderParam("Accept", "*/*");
|
|
493
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
494
|
+
// Body Params
|
|
495
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
496
|
+
"application/json",
|
|
497
|
+
]);
|
|
498
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
499
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "MonitorUserTemplateUpdateRequest", ""), contentType);
|
|
500
|
+
requestContext.setBody(serializedBody);
|
|
501
|
+
// Apply auth methods
|
|
502
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
503
|
+
"AuthZ",
|
|
504
|
+
"apiKeyAuth",
|
|
505
|
+
"appKeyAuth",
|
|
506
|
+
]);
|
|
507
|
+
return requestContext;
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
validateMonitorUserTemplate(body, _options) {
|
|
511
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
512
|
+
const _config = _options || this.configuration;
|
|
513
|
+
logger_1.logger.warn("Using unstable operation 'validateMonitorUserTemplate'");
|
|
514
|
+
if (!_config.unstableOperations["v2.validateMonitorUserTemplate"]) {
|
|
515
|
+
throw new Error("Unstable operation 'validateMonitorUserTemplate' is disabled");
|
|
516
|
+
}
|
|
517
|
+
// verify required parameter 'body' is not null or undefined
|
|
518
|
+
if (body === null || body === undefined) {
|
|
519
|
+
throw new baseapi_1.RequiredError("body", "validateMonitorUserTemplate");
|
|
520
|
+
}
|
|
521
|
+
// Path Params
|
|
522
|
+
const localVarPath = "/api/v2/monitor/template/validate";
|
|
523
|
+
// Make Request Context
|
|
524
|
+
const requestContext = _config
|
|
525
|
+
.getServer("v2.MonitorsApi.validateMonitorUserTemplate")
|
|
526
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
527
|
+
requestContext.setHeaderParam("Accept", "*/*");
|
|
528
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
529
|
+
// Body Params
|
|
530
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
531
|
+
"application/json",
|
|
532
|
+
]);
|
|
533
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
534
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "MonitorUserTemplateCreateRequest", ""), contentType);
|
|
535
|
+
requestContext.setBody(serializedBody);
|
|
536
|
+
// Apply auth methods
|
|
537
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
538
|
+
"AuthZ",
|
|
539
|
+
"apiKeyAuth",
|
|
540
|
+
"appKeyAuth",
|
|
541
|
+
]);
|
|
542
|
+
return requestContext;
|
|
543
|
+
});
|
|
544
|
+
}
|
|
313
545
|
}
|
|
314
546
|
exports.MonitorsApiRequestFactory = MonitorsApiRequestFactory;
|
|
315
547
|
class MonitorsApiResponseProcessor {
|
|
@@ -387,6 +619,41 @@ class MonitorsApiResponseProcessor {
|
|
|
387
619
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
388
620
|
});
|
|
389
621
|
}
|
|
622
|
+
/**
|
|
623
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
624
|
+
* to the expected objects
|
|
625
|
+
*
|
|
626
|
+
* @params response Response returned by the server for a request to createMonitorUserTemplate
|
|
627
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
628
|
+
*/
|
|
629
|
+
createMonitorUserTemplate(response) {
|
|
630
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
631
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
632
|
+
if (response.httpStatusCode === 200) {
|
|
633
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "MonitorUserTemplateCreateResponse");
|
|
634
|
+
return body;
|
|
635
|
+
}
|
|
636
|
+
if (response.httpStatusCode === 400 || response.httpStatusCode === 429) {
|
|
637
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
638
|
+
let body;
|
|
639
|
+
try {
|
|
640
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
641
|
+
}
|
|
642
|
+
catch (error) {
|
|
643
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
644
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
645
|
+
}
|
|
646
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
647
|
+
}
|
|
648
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
649
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
650
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "MonitorUserTemplateCreateResponse", "");
|
|
651
|
+
return body;
|
|
652
|
+
}
|
|
653
|
+
const body = (yield response.body.text()) || "";
|
|
654
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
655
|
+
});
|
|
656
|
+
}
|
|
390
657
|
/**
|
|
391
658
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
392
659
|
* to the expected objects
|
|
@@ -460,6 +727,40 @@ class MonitorsApiResponseProcessor {
|
|
|
460
727
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
461
728
|
});
|
|
462
729
|
}
|
|
730
|
+
/**
|
|
731
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
732
|
+
* to the expected objects
|
|
733
|
+
*
|
|
734
|
+
* @params response Response returned by the server for a request to deleteMonitorUserTemplate
|
|
735
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
736
|
+
*/
|
|
737
|
+
deleteMonitorUserTemplate(response) {
|
|
738
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
739
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
740
|
+
if (response.httpStatusCode === 204) {
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
if (response.httpStatusCode === 404 || response.httpStatusCode === 429) {
|
|
744
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
745
|
+
let body;
|
|
746
|
+
try {
|
|
747
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
748
|
+
}
|
|
749
|
+
catch (error) {
|
|
750
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
751
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
752
|
+
}
|
|
753
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
754
|
+
}
|
|
755
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
756
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
757
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
|
|
758
|
+
return body;
|
|
759
|
+
}
|
|
760
|
+
const body = (yield response.body.text()) || "";
|
|
761
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
762
|
+
});
|
|
763
|
+
}
|
|
463
764
|
/**
|
|
464
765
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
465
766
|
* to the expected objects
|
|
@@ -569,6 +870,41 @@ class MonitorsApiResponseProcessor {
|
|
|
569
870
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
570
871
|
});
|
|
571
872
|
}
|
|
873
|
+
/**
|
|
874
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
875
|
+
* to the expected objects
|
|
876
|
+
*
|
|
877
|
+
* @params response Response returned by the server for a request to getMonitorUserTemplate
|
|
878
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
879
|
+
*/
|
|
880
|
+
getMonitorUserTemplate(response) {
|
|
881
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
882
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
883
|
+
if (response.httpStatusCode === 200) {
|
|
884
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "MonitorUserTemplateResponse");
|
|
885
|
+
return body;
|
|
886
|
+
}
|
|
887
|
+
if (response.httpStatusCode === 404 || response.httpStatusCode === 429) {
|
|
888
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
889
|
+
let body;
|
|
890
|
+
try {
|
|
891
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
892
|
+
}
|
|
893
|
+
catch (error) {
|
|
894
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
895
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
896
|
+
}
|
|
897
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
898
|
+
}
|
|
899
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
900
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
901
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "MonitorUserTemplateResponse", "");
|
|
902
|
+
return body;
|
|
903
|
+
}
|
|
904
|
+
const body = (yield response.body.text()) || "";
|
|
905
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
906
|
+
});
|
|
907
|
+
}
|
|
572
908
|
/**
|
|
573
909
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
574
910
|
* to the expected objects
|
|
@@ -604,6 +940,41 @@ class MonitorsApiResponseProcessor {
|
|
|
604
940
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
605
941
|
});
|
|
606
942
|
}
|
|
943
|
+
/**
|
|
944
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
945
|
+
* to the expected objects
|
|
946
|
+
*
|
|
947
|
+
* @params response Response returned by the server for a request to listMonitorUserTemplates
|
|
948
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
949
|
+
*/
|
|
950
|
+
listMonitorUserTemplates(response) {
|
|
951
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
952
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
953
|
+
if (response.httpStatusCode === 200) {
|
|
954
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "MonitorUserTemplateListResponse");
|
|
955
|
+
return body;
|
|
956
|
+
}
|
|
957
|
+
if (response.httpStatusCode === 429) {
|
|
958
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
959
|
+
let body;
|
|
960
|
+
try {
|
|
961
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
962
|
+
}
|
|
963
|
+
catch (error) {
|
|
964
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
965
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
966
|
+
}
|
|
967
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
968
|
+
}
|
|
969
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
970
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
971
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "MonitorUserTemplateListResponse", "");
|
|
972
|
+
return body;
|
|
973
|
+
}
|
|
974
|
+
const body = (yield response.body.text()) || "";
|
|
975
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
976
|
+
});
|
|
977
|
+
}
|
|
607
978
|
/**
|
|
608
979
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
609
980
|
* to the expected objects
|
|
@@ -680,6 +1051,113 @@ class MonitorsApiResponseProcessor {
|
|
|
680
1051
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
681
1052
|
});
|
|
682
1053
|
}
|
|
1054
|
+
/**
|
|
1055
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
1056
|
+
* to the expected objects
|
|
1057
|
+
*
|
|
1058
|
+
* @params response Response returned by the server for a request to updateMonitorUserTemplate
|
|
1059
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
1060
|
+
*/
|
|
1061
|
+
updateMonitorUserTemplate(response) {
|
|
1062
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1063
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1064
|
+
if (response.httpStatusCode === 200) {
|
|
1065
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "MonitorUserTemplateResponse");
|
|
1066
|
+
return body;
|
|
1067
|
+
}
|
|
1068
|
+
if (response.httpStatusCode === 400 ||
|
|
1069
|
+
response.httpStatusCode === 404 ||
|
|
1070
|
+
response.httpStatusCode === 429) {
|
|
1071
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
1072
|
+
let body;
|
|
1073
|
+
try {
|
|
1074
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1075
|
+
}
|
|
1076
|
+
catch (error) {
|
|
1077
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
1078
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1079
|
+
}
|
|
1080
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
1081
|
+
}
|
|
1082
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
1083
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
1084
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "MonitorUserTemplateResponse", "");
|
|
1085
|
+
return body;
|
|
1086
|
+
}
|
|
1087
|
+
const body = (yield response.body.text()) || "";
|
|
1088
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
1093
|
+
* to the expected objects
|
|
1094
|
+
*
|
|
1095
|
+
* @params response Response returned by the server for a request to validateExistingMonitorUserTemplate
|
|
1096
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
1097
|
+
*/
|
|
1098
|
+
validateExistingMonitorUserTemplate(response) {
|
|
1099
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1100
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1101
|
+
if (response.httpStatusCode === 204) {
|
|
1102
|
+
return;
|
|
1103
|
+
}
|
|
1104
|
+
if (response.httpStatusCode === 400 ||
|
|
1105
|
+
response.httpStatusCode === 404 ||
|
|
1106
|
+
response.httpStatusCode === 429) {
|
|
1107
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
1108
|
+
let body;
|
|
1109
|
+
try {
|
|
1110
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1111
|
+
}
|
|
1112
|
+
catch (error) {
|
|
1113
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
1114
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1115
|
+
}
|
|
1116
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
1117
|
+
}
|
|
1118
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
1119
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
1120
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
|
|
1121
|
+
return body;
|
|
1122
|
+
}
|
|
1123
|
+
const body = (yield response.body.text()) || "";
|
|
1124
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
1127
|
+
/**
|
|
1128
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
1129
|
+
* to the expected objects
|
|
1130
|
+
*
|
|
1131
|
+
* @params response Response returned by the server for a request to validateMonitorUserTemplate
|
|
1132
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
1133
|
+
*/
|
|
1134
|
+
validateMonitorUserTemplate(response) {
|
|
1135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1136
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1137
|
+
if (response.httpStatusCode === 204) {
|
|
1138
|
+
return;
|
|
1139
|
+
}
|
|
1140
|
+
if (response.httpStatusCode === 400 || response.httpStatusCode === 429) {
|
|
1141
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
1142
|
+
let body;
|
|
1143
|
+
try {
|
|
1144
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1145
|
+
}
|
|
1146
|
+
catch (error) {
|
|
1147
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
1148
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1149
|
+
}
|
|
1150
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
1151
|
+
}
|
|
1152
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
1153
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
1154
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
|
|
1155
|
+
return body;
|
|
1156
|
+
}
|
|
1157
|
+
const body = (yield response.body.text()) || "";
|
|
1158
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
1159
|
+
});
|
|
1160
|
+
}
|
|
683
1161
|
}
|
|
684
1162
|
exports.MonitorsApiResponseProcessor = MonitorsApiResponseProcessor;
|
|
685
1163
|
class MonitorsApi {
|
|
@@ -718,6 +1196,20 @@ class MonitorsApi {
|
|
|
718
1196
|
});
|
|
719
1197
|
});
|
|
720
1198
|
}
|
|
1199
|
+
/**
|
|
1200
|
+
* Create a new monitor user template.
|
|
1201
|
+
* @param param The request object
|
|
1202
|
+
*/
|
|
1203
|
+
createMonitorUserTemplate(param, options) {
|
|
1204
|
+
const requestContextPromise = this.requestFactory.createMonitorUserTemplate(param.body, options);
|
|
1205
|
+
return requestContextPromise.then((requestContext) => {
|
|
1206
|
+
return this.configuration.httpApi
|
|
1207
|
+
.send(requestContext)
|
|
1208
|
+
.then((responseContext) => {
|
|
1209
|
+
return this.responseProcessor.createMonitorUserTemplate(responseContext);
|
|
1210
|
+
});
|
|
1211
|
+
});
|
|
1212
|
+
}
|
|
721
1213
|
/**
|
|
722
1214
|
* Delete a monitor configuration policy.
|
|
723
1215
|
* @param param The request object
|
|
@@ -746,6 +1238,20 @@ class MonitorsApi {
|
|
|
746
1238
|
});
|
|
747
1239
|
});
|
|
748
1240
|
}
|
|
1241
|
+
/**
|
|
1242
|
+
* Delete an existing monitor user template by its ID.
|
|
1243
|
+
* @param param The request object
|
|
1244
|
+
*/
|
|
1245
|
+
deleteMonitorUserTemplate(param, options) {
|
|
1246
|
+
const requestContextPromise = this.requestFactory.deleteMonitorUserTemplate(param.templateId, options);
|
|
1247
|
+
return requestContextPromise.then((requestContext) => {
|
|
1248
|
+
return this.configuration.httpApi
|
|
1249
|
+
.send(requestContext)
|
|
1250
|
+
.then((responseContext) => {
|
|
1251
|
+
return this.responseProcessor.deleteMonitorUserTemplate(responseContext);
|
|
1252
|
+
});
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
749
1255
|
/**
|
|
750
1256
|
* Get a monitor configuration policy by `policy_id`.
|
|
751
1257
|
* @param param The request object
|
|
@@ -788,6 +1294,20 @@ class MonitorsApi {
|
|
|
788
1294
|
});
|
|
789
1295
|
});
|
|
790
1296
|
}
|
|
1297
|
+
/**
|
|
1298
|
+
* Retrieve a monitor user template by its ID.
|
|
1299
|
+
* @param param The request object
|
|
1300
|
+
*/
|
|
1301
|
+
getMonitorUserTemplate(param, options) {
|
|
1302
|
+
const requestContextPromise = this.requestFactory.getMonitorUserTemplate(param.templateId, param.withAllVersions, options);
|
|
1303
|
+
return requestContextPromise.then((requestContext) => {
|
|
1304
|
+
return this.configuration.httpApi
|
|
1305
|
+
.send(requestContext)
|
|
1306
|
+
.then((responseContext) => {
|
|
1307
|
+
return this.responseProcessor.getMonitorUserTemplate(responseContext);
|
|
1308
|
+
});
|
|
1309
|
+
});
|
|
1310
|
+
}
|
|
791
1311
|
/**
|
|
792
1312
|
* Get all monitor configuration policies.
|
|
793
1313
|
* @param param The request object
|
|
@@ -802,6 +1322,20 @@ class MonitorsApi {
|
|
|
802
1322
|
});
|
|
803
1323
|
});
|
|
804
1324
|
}
|
|
1325
|
+
/**
|
|
1326
|
+
* Retrieve all monitor user templates.
|
|
1327
|
+
* @param param The request object
|
|
1328
|
+
*/
|
|
1329
|
+
listMonitorUserTemplates(options) {
|
|
1330
|
+
const requestContextPromise = this.requestFactory.listMonitorUserTemplates(options);
|
|
1331
|
+
return requestContextPromise.then((requestContext) => {
|
|
1332
|
+
return this.configuration.httpApi
|
|
1333
|
+
.send(requestContext)
|
|
1334
|
+
.then((responseContext) => {
|
|
1335
|
+
return this.responseProcessor.listMonitorUserTemplates(responseContext);
|
|
1336
|
+
});
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
805
1339
|
/**
|
|
806
1340
|
* Edit a monitor configuration policy.
|
|
807
1341
|
* @param param The request object
|
|
@@ -830,6 +1364,48 @@ class MonitorsApi {
|
|
|
830
1364
|
});
|
|
831
1365
|
});
|
|
832
1366
|
}
|
|
1367
|
+
/**
|
|
1368
|
+
* Creates a new version of an existing monitor user template.
|
|
1369
|
+
* @param param The request object
|
|
1370
|
+
*/
|
|
1371
|
+
updateMonitorUserTemplate(param, options) {
|
|
1372
|
+
const requestContextPromise = this.requestFactory.updateMonitorUserTemplate(param.templateId, param.body, options);
|
|
1373
|
+
return requestContextPromise.then((requestContext) => {
|
|
1374
|
+
return this.configuration.httpApi
|
|
1375
|
+
.send(requestContext)
|
|
1376
|
+
.then((responseContext) => {
|
|
1377
|
+
return this.responseProcessor.updateMonitorUserTemplate(responseContext);
|
|
1378
|
+
});
|
|
1379
|
+
});
|
|
1380
|
+
}
|
|
1381
|
+
/**
|
|
1382
|
+
* Validate the structure and content of an existing monitor user template being updated to a new version.
|
|
1383
|
+
* @param param The request object
|
|
1384
|
+
*/
|
|
1385
|
+
validateExistingMonitorUserTemplate(param, options) {
|
|
1386
|
+
const requestContextPromise = this.requestFactory.validateExistingMonitorUserTemplate(param.templateId, param.body, options);
|
|
1387
|
+
return requestContextPromise.then((requestContext) => {
|
|
1388
|
+
return this.configuration.httpApi
|
|
1389
|
+
.send(requestContext)
|
|
1390
|
+
.then((responseContext) => {
|
|
1391
|
+
return this.responseProcessor.validateExistingMonitorUserTemplate(responseContext);
|
|
1392
|
+
});
|
|
1393
|
+
});
|
|
1394
|
+
}
|
|
1395
|
+
/**
|
|
1396
|
+
* Validate the structure and content of a monitor user template.
|
|
1397
|
+
* @param param The request object
|
|
1398
|
+
*/
|
|
1399
|
+
validateMonitorUserTemplate(param, options) {
|
|
1400
|
+
const requestContextPromise = this.requestFactory.validateMonitorUserTemplate(param.body, options);
|
|
1401
|
+
return requestContextPromise.then((requestContext) => {
|
|
1402
|
+
return this.configuration.httpApi
|
|
1403
|
+
.send(requestContext)
|
|
1404
|
+
.then((responseContext) => {
|
|
1405
|
+
return this.responseProcessor.validateMonitorUserTemplate(responseContext);
|
|
1406
|
+
});
|
|
1407
|
+
});
|
|
1408
|
+
}
|
|
833
1409
|
}
|
|
834
1410
|
exports.MonitorsApi = MonitorsApi;
|
|
835
1411
|
//# sourceMappingURL=MonitorsApi.js.map
|