UNPKG

@datadog/datadog-api-client

Version:

OpenAPI client for Datadog APIs

957 lines 150 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } }; Object.defineProperty(exports, "__esModule", { value: true }); exports.SyntheticsApi = exports.SyntheticsApiResponseProcessor = exports.SyntheticsApiRequestFactory = void 0; const baseapi_1 = require("../../datadog-api-client-common/baseapi"); const configuration_1 = require("../../datadog-api-client-common/configuration"); const http_1 = require("../../datadog-api-client-common/http/http"); const logger_1 = require("../../../logger"); const ObjectSerializer_1 = require("../models/ObjectSerializer"); const exception_1 = require("../../datadog-api-client-common/exception"); class SyntheticsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory { createGlobalVariable(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createGlobalVariable"); } // Path Params const localVarPath = "/api/v1/synthetics/variables"; // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.createGlobalVariable") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SyntheticsGlobalVariableRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } createPrivateLocation(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createPrivateLocation"); } // Path Params const localVarPath = "/api/v1/synthetics/private-locations"; // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.createPrivateLocation") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SyntheticsPrivateLocation", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } createSyntheticsAPITest(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createSyntheticsAPITest"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/api"; // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.createSyntheticsAPITest") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SyntheticsAPITest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } createSyntheticsBrowserTest(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createSyntheticsBrowserTest"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/browser"; // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.createSyntheticsBrowserTest") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SyntheticsBrowserTest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } createSyntheticsMobileTest(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createSyntheticsMobileTest"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/mobile"; // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.createSyntheticsMobileTest") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SyntheticsMobileTest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } deleteGlobalVariable(variableId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'variableId' is not null or undefined if (variableId === null || variableId === undefined) { throw new baseapi_1.RequiredError("variableId", "deleteGlobalVariable"); } // Path Params const localVarPath = "/api/v1/synthetics/variables/{variable_id}".replace("{variable_id}", encodeURIComponent(String(variableId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.deleteGlobalVariable") .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } deletePrivateLocation(locationId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'locationId' is not null or undefined if (locationId === null || locationId === undefined) { throw new baseapi_1.RequiredError("locationId", "deletePrivateLocation"); } // Path Params const localVarPath = "/api/v1/synthetics/private-locations/{location_id}".replace("{location_id}", encodeURIComponent(String(locationId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.deletePrivateLocation") .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } deleteTests(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "deleteTests"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/delete"; // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.deleteTests") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SyntheticsDeleteTestsPayload", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } editGlobalVariable(variableId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'variableId' is not null or undefined if (variableId === null || variableId === undefined) { throw new baseapi_1.RequiredError("variableId", "editGlobalVariable"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "editGlobalVariable"); } // Path Params const localVarPath = "/api/v1/synthetics/variables/{variable_id}".replace("{variable_id}", encodeURIComponent(String(variableId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.editGlobalVariable") .makeRequestContext(localVarPath, http_1.HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SyntheticsGlobalVariableRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } fetchUptimes(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "fetchUptimes"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/uptimes"; // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.fetchUptimes") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SyntheticsFetchUptimesPayload", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getAPITest(publicId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'publicId' is not null or undefined if (publicId === null || publicId === undefined) { throw new baseapi_1.RequiredError("publicId", "getAPITest"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/api/{public_id}".replace("{public_id}", encodeURIComponent(String(publicId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.getAPITest") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getAPITestLatestResults(publicId, fromTs, toTs, probeDc, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'publicId' is not null or undefined if (publicId === null || publicId === undefined) { throw new baseapi_1.RequiredError("publicId", "getAPITestLatestResults"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/{public_id}/results".replace("{public_id}", encodeURIComponent(String(publicId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.getAPITestLatestResults") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (fromTs !== undefined) { requestContext.setQueryParam("from_ts", ObjectSerializer_1.ObjectSerializer.serialize(fromTs, "number", "int64"), ""); } if (toTs !== undefined) { requestContext.setQueryParam("to_ts", ObjectSerializer_1.ObjectSerializer.serialize(toTs, "number", "int64"), ""); } if (probeDc !== undefined) { requestContext.setQueryParam("probe_dc", ObjectSerializer_1.ObjectSerializer.serialize(probeDc, "Array<string>", ""), "multi"); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getAPITestResult(publicId, resultId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'publicId' is not null or undefined if (publicId === null || publicId === undefined) { throw new baseapi_1.RequiredError("publicId", "getAPITestResult"); } // verify required parameter 'resultId' is not null or undefined if (resultId === null || resultId === undefined) { throw new baseapi_1.RequiredError("resultId", "getAPITestResult"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/{public_id}/results/{result_id}" .replace("{public_id}", encodeURIComponent(String(publicId))) .replace("{result_id}", encodeURIComponent(String(resultId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.getAPITestResult") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getBrowserTest(publicId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'publicId' is not null or undefined if (publicId === null || publicId === undefined) { throw new baseapi_1.RequiredError("publicId", "getBrowserTest"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/browser/{public_id}".replace("{public_id}", encodeURIComponent(String(publicId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.getBrowserTest") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getBrowserTestLatestResults(publicId, fromTs, toTs, probeDc, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'publicId' is not null or undefined if (publicId === null || publicId === undefined) { throw new baseapi_1.RequiredError("publicId", "getBrowserTestLatestResults"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/browser/{public_id}/results".replace("{public_id}", encodeURIComponent(String(publicId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.getBrowserTestLatestResults") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (fromTs !== undefined) { requestContext.setQueryParam("from_ts", ObjectSerializer_1.ObjectSerializer.serialize(fromTs, "number", "int64"), ""); } if (toTs !== undefined) { requestContext.setQueryParam("to_ts", ObjectSerializer_1.ObjectSerializer.serialize(toTs, "number", "int64"), ""); } if (probeDc !== undefined) { requestContext.setQueryParam("probe_dc", ObjectSerializer_1.ObjectSerializer.serialize(probeDc, "Array<string>", ""), "multi"); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getBrowserTestResult(publicId, resultId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'publicId' is not null or undefined if (publicId === null || publicId === undefined) { throw new baseapi_1.RequiredError("publicId", "getBrowserTestResult"); } // verify required parameter 'resultId' is not null or undefined if (resultId === null || resultId === undefined) { throw new baseapi_1.RequiredError("resultId", "getBrowserTestResult"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/browser/{public_id}/results/{result_id}" .replace("{public_id}", encodeURIComponent(String(publicId))) .replace("{result_id}", encodeURIComponent(String(resultId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.getBrowserTestResult") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getGlobalVariable(variableId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'variableId' is not null or undefined if (variableId === null || variableId === undefined) { throw new baseapi_1.RequiredError("variableId", "getGlobalVariable"); } // Path Params const localVarPath = "/api/v1/synthetics/variables/{variable_id}".replace("{variable_id}", encodeURIComponent(String(variableId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.getGlobalVariable") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getMobileTest(publicId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'publicId' is not null or undefined if (publicId === null || publicId === undefined) { throw new baseapi_1.RequiredError("publicId", "getMobileTest"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/mobile/{public_id}".replace("{public_id}", encodeURIComponent(String(publicId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.getMobileTest") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getPrivateLocation(locationId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'locationId' is not null or undefined if (locationId === null || locationId === undefined) { throw new baseapi_1.RequiredError("locationId", "getPrivateLocation"); } // Path Params const localVarPath = "/api/v1/synthetics/private-locations/{location_id}".replace("{location_id}", encodeURIComponent(String(locationId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.getPrivateLocation") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getSyntheticsCIBatch(batchId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'batchId' is not null or undefined if (batchId === null || batchId === undefined) { throw new baseapi_1.RequiredError("batchId", "getSyntheticsCIBatch"); } // Path Params const localVarPath = "/api/v1/synthetics/ci/batch/{batch_id}".replace("{batch_id}", encodeURIComponent(String(batchId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.getSyntheticsCIBatch") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getSyntheticsDefaultLocations(_options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v1/synthetics/settings/default_locations"; // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.getSyntheticsDefaultLocations") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } getTest(publicId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'publicId' is not null or undefined if (publicId === null || publicId === undefined) { throw new baseapi_1.RequiredError("publicId", "getTest"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/{public_id}".replace("{public_id}", encodeURIComponent(String(publicId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.getTest") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } listGlobalVariables(_options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v1/synthetics/variables"; // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.listGlobalVariables") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } listLocations(_options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v1/synthetics/locations"; // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.listLocations") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } listTests(pageSize, pageNumber, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v1/synthetics/tests"; // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.listTests") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (pageSize !== undefined) { requestContext.setQueryParam("page_size", ObjectSerializer_1.ObjectSerializer.serialize(pageSize, "number", "int64"), ""); } if (pageNumber !== undefined) { requestContext.setQueryParam("page_number", ObjectSerializer_1.ObjectSerializer.serialize(pageNumber, "number", "int64"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } patchTest(publicId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'publicId' is not null or undefined if (publicId === null || publicId === undefined) { throw new baseapi_1.RequiredError("publicId", "patchTest"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "patchTest"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/{public_id}".replace("{public_id}", encodeURIComponent(String(publicId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.patchTest") .makeRequestContext(localVarPath, http_1.HttpMethod.PATCH); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SyntheticsPatchTestBody", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } searchTests(text, includeFullConfig, facetsOnly, start, count, sort, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v1/synthetics/tests/search"; // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.searchTests") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (text !== undefined) { requestContext.setQueryParam("text", ObjectSerializer_1.ObjectSerializer.serialize(text, "string", ""), ""); } if (includeFullConfig !== undefined) { requestContext.setQueryParam("include_full_config", ObjectSerializer_1.ObjectSerializer.serialize(includeFullConfig, "boolean", ""), ""); } if (facetsOnly !== undefined) { requestContext.setQueryParam("facets_only", ObjectSerializer_1.ObjectSerializer.serialize(facetsOnly, "boolean", ""), ""); } if (start !== undefined) { requestContext.setQueryParam("start", ObjectSerializer_1.ObjectSerializer.serialize(start, "number", "int64"), ""); } if (count !== undefined) { requestContext.setQueryParam("count", ObjectSerializer_1.ObjectSerializer.serialize(count, "number", "int64"), ""); } if (sort !== undefined) { requestContext.setQueryParam("sort", ObjectSerializer_1.ObjectSerializer.serialize(sort, "string", ""), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } triggerCITests(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "triggerCITests"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/trigger/ci"; // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.triggerCITests") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SyntheticsCITestBody", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } triggerTests(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "triggerTests"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/trigger"; // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.triggerTests") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SyntheticsTriggerBody", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } updateAPITest(publicId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'publicId' is not null or undefined if (publicId === null || publicId === undefined) { throw new baseapi_1.RequiredError("publicId", "updateAPITest"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "updateAPITest"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/api/{public_id}".replace("{public_id}", encodeURIComponent(String(publicId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.updateAPITest") .makeRequestContext(localVarPath, http_1.HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SyntheticsAPITest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } updateBrowserTest(publicId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'publicId' is not null or undefined if (publicId === null || publicId === undefined) { throw new baseapi_1.RequiredError("publicId", "updateBrowserTest"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "updateBrowserTest"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/browser/{public_id}".replace("{public_id}", encodeURIComponent(String(publicId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.updateBrowserTest") .makeRequestContext(localVarPath, http_1.HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SyntheticsBrowserTest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } updateMobileTest(publicId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'publicId' is not null or undefined if (publicId === null || publicId === undefined) { throw new baseapi_1.RequiredError("publicId", "updateMobileTest"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "updateMobileTest"); } // Path Params const localVarPath = "/api/v1/synthetics/tests/mobile/{public_id}".replace("{public_id}", encodeURIComponent(String(publicId))); // Make Request Context const requestContext = _config .getServer("v1.SyntheticsApi.updateMobileTest") .makeRequestContext(localVarPath, http_1.HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SyntheticsMobileTest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } updatePrivateLocation(locationId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config =