"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getGlobalParams = exports.editGlobalParam = exports.deleteGlobalParams = exports.addGlobalParam = void 0; var _constants = require("../../../../../common/constants"); var _runtime_types = require("../../../../../common/runtime_types"); var _api_service = require("../../../../utils/api_service/api_service"); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ const getGlobalParams = async () => { return _api_service.apiService.get(_constants.SYNTHETICS_API_URLS.PARAMS, undefined, _runtime_types.SyntheticsParamsReadonlyCodec); }; exports.getGlobalParams = getGlobalParams; const addGlobalParam = async paramRequest => _api_service.apiService.post(_constants.SYNTHETICS_API_URLS.PARAMS, paramRequest, _runtime_types.SyntheticsParamsCodec); exports.addGlobalParam = addGlobalParam; const editGlobalParam = async ({ paramRequest, id }) => _api_service.apiService.put(_constants.SYNTHETICS_API_URLS.PARAMS, { id, ...paramRequest }, _runtime_types.SyntheticsParamsCodec); exports.editGlobalParam = editGlobalParam; const deleteGlobalParams = async ids => _api_service.apiService.delete(_constants.SYNTHETICS_API_URLS.PARAMS, { ids: JSON.stringify(ids) }); exports.deleteGlobalParams = deleteGlobalParams;