import * as z from "zod/v4-mini"; import { AggregationType } from "./aggregation-type.js"; import { WindowSize } from "./window-size.js"; export type GetUsageRequest = { aggregationType: AggregationType; /** * BillingAnchor enables custom monthly billing periods for usage aggregation. * * @remarks * * When to use: * - WindowSize = "MONTH" AND you need custom monthly periods (not calendar months) * - Subscription billing that doesn't align with calendar months * - Example: Customer signed up on 15th, so billing periods are 15th to 15th * * When NOT to use: * - WindowSize != "MONTH" (ignored for DAY, HOUR, WEEK, etc.) * - Standard calendar-based billing (1st to 1st of each month) * * Example values: * - "2024-03-05T14:30:45.123456789Z" (5th of each month at 2:30:45 PM) * - "2024-01-15T00:00:00Z" (15th of each month at midnight) * - "2024-02-29T12:00:00Z" (29th of each month at noon - handles leap years) */ billingAnchor?: Date | undefined; bucketSize?: WindowSize | undefined; customerId?: string | undefined; endTime?: Date | undefined; eventName: string; externalCustomerId?: string | undefined; filters?: { [k: string]: Array; } | undefined; /** * GroupBy lists the analytics group_by dimensions. * * @remarks * - "source" — group by event source column * - "properties.X" — group by JSON property X */ groupBy?: Array | undefined; /** * GroupByProperty is the property name in event.properties to group by before aggregating. * * @remarks * 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. * * Deprecated: prefer GroupBy []string{"properties."} for parity with * other analytics endpoints. ToUsageParams translates this field into * GroupBy when GroupBy is otherwise empty. */ groupByProperty?: string | undefined; multiplier?: string | undefined; /** * will be empty/ignored in case of COUNT */ propertyName?: string | undefined; startTime?: Date | undefined; timezone?: string | undefined; windowSize?: WindowSize | undefined; }; /** @internal */ export type GetUsageRequest$Outbound = { aggregation_type: string; billing_anchor?: string | undefined; bucket_size?: string | undefined; customer_id?: string | undefined; end_time?: string | undefined; event_name: string; external_customer_id?: string | undefined; filters?: { [k: string]: Array; } | undefined; group_by?: Array | undefined; group_by_property?: string | undefined; multiplier?: string | undefined; property_name?: string | undefined; start_time?: string | undefined; timezone?: string | undefined; window_size?: string | undefined; }; /** @internal */ export declare const GetUsageRequest$outboundSchema: z.ZodMiniType; export declare function getUsageRequestToJSON(getUsageRequest: GetUsageRequest): string; //# sourceMappingURL=get-usage-request.d.ts.map