"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fetchSnapshotCount = void 0; var _runtime_types = require("../../../../common/runtime_types"); var _utils = require("./utils"); var _constants = require("../../../../common/constants"); /* * 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 fetchSnapshotCount = async ({ dateRangeStart, dateRangeEnd, filters, query }) => { const queryParams = { dateRangeStart, dateRangeEnd, ...(filters && { filters }), ...(query && { query }) }; return await _utils.apiService.get(_constants.API_URLS.SNAPSHOT_COUNT, queryParams, _runtime_types.SnapshotType); }; exports.fetchSnapshotCount = fetchSnapshotCount;