import * as z from "zod/v4-mini"; import { Result as SafeParseResult } from "../../types/fp.js"; import { AggregationType } from "./aggregation-type.js"; import { SDKValidationError } from "./sdk-validation-error.js"; import { WindowSize } from "./window-size.js"; export type MeterAggregation = { bucketSize?: WindowSize | undefined; /** * Expression is an optional CEL expression to compute per-event quantity from event.properties. * * @remarks * When set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel). */ expression?: string | undefined; /** * Field is the key in $event.properties on which the aggregation is to be applied * * @remarks * For ex if the aggregation type is sum for API usage, the field could be "duration_ms" * Ignored when Expression is set. */ field?: string | undefined; /** * GroupBy is the property name in event.properties to group by before aggregating. * * @remarks * Currently only supported for MAX aggregation with bucket_size. * When set, aggregation is applied per unique value of this property within each bucket, * then the per-group results are summed to produce the bucket total. */ groupBy?: string | undefined; /** * Multiplier is the multiplier for the aggregation * * @remarks * For ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000 * to scale up by a factor of 1000. If not provided, it will be null. */ multiplier?: string | undefined; type?: AggregationType | undefined; }; /** @internal */ export declare const MeterAggregation$inboundSchema: z.ZodMiniType; /** @internal */ export type MeterAggregation$Outbound = { bucket_size?: string | undefined; expression?: string | undefined; field?: string | undefined; group_by?: string | undefined; multiplier?: string | undefined; type?: string | undefined; }; /** @internal */ export declare const MeterAggregation$outboundSchema: z.ZodMiniType; export declare function meterAggregationToJSON(meterAggregation: MeterAggregation): string; export declare function meterAggregationFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=meter-aggregation.d.ts.map