"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.searchOgcAggregations = searchOgcAggregations;
const formatOgcAggregationsResponse_1 = require("./formatOgcAggregationsResponse");
const getOgcAggregationQueryParams_1 = require("./getOgcAggregationQueryParams");
const getOgcCollectionUrl_1 = require("./getOgcCollectionUrl");
const ogcApiRequest_1 = require("./ogcApiRequest");
async function searchOgcAggregations(query, options) {
    const url = `${(0, getOgcCollectionUrl_1.getOgcCollectionUrl)(query, options)}/aggregations`;
    const queryParams = (0, getOgcAggregationQueryParams_1.getOgcAggregationQueryParams)(query, options);
    const rawResponse = (await (0, ogcApiRequest_1.ogcApiRequest)(url, queryParams, options));
    return (0, formatOgcAggregationsResponse_1.formatOgcAggregationsResponse)(rawResponse);
}
//# sourceMappingURL=searchOgcAggregations.js.map