"use strict";
/**
 * Helper functions for creating aggregation metrics.
 * These functions return objects that describe the aggregation to perform.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.count = count;
exports.avg = avg;
exports.sum = sum;
exports.median = median;
exports.min = min;
exports.max = max;
exports.range = range;
exports.stdDev = stdDev;
exports.unique = unique;
/**
 * Creates a count aggregation for the specified field.
 * @param field - The field name to count.
 * @returns An aggregation helper object.
 *
 * @example
 * ```typescript
 * count('id')
 * ```
 */
function count(field) {
    return { field, aggregation: 'count' };
}
/**
 * Creates an average aggregation for the specified field.
 * @param field - The field name to average.
 * @returns An aggregation helper object.
 *
 * @example
 * ```typescript
 * avg('age')
 * ```
 */
function avg(field) {
    return { field, aggregation: 'average' };
}
/**
 * Creates a sum aggregation for the specified field.
 * @param field - The field name to sum.
 * @returns An aggregation helper object.
 *
 * @example
 * ```typescript
 * sum('age')
 * ```
 */
function sum(field) {
    return { field, aggregation: 'sum' };
}
/**
 * Creates a median aggregation for the specified field.
 * @param field - The field name to calculate median for.
 * @returns An aggregation helper object.
 */
function median(field) {
    return { field, aggregation: 'median' };
}
/**
 * Creates a min aggregation for the specified field.
 * @param field - The field name to find minimum for.
 * @returns An aggregation helper object.
 */
function min(field) {
    return { field, aggregation: 'min' };
}
/**
 * Creates a max aggregation for the specified field.
 * @param field - The field name to find maximum for.
 * @returns An aggregation helper object.
 */
function max(field) {
    return { field, aggregation: 'max' };
}
/**
 * Creates a range aggregation for the specified field.
 * @param field - The field name to calculate range for.
 * @returns An aggregation helper object.
 */
function range(field) {
    return { field, aggregation: 'range' };
}
/**
 * Creates a standard deviation aggregation for the specified field.
 * @param field - The field name to calculate standard deviation for.
 * @returns An aggregation helper object.
 */
function stdDev(field) {
    return { field, aggregation: 'standardDeviation' };
}
/**
 * Creates a unique count aggregation for the specified field.
 * @param field - The field name to count unique values for.
 * @returns An aggregation helper object.
 */
function unique(field) {
    return { field, aggregation: 'unique' };
}
//# sourceMappingURL=aggregation-helpers.js.map