import * as z from "zod/v3";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
import { DenominatorPost, DenominatorPost$Outbound } from "./denominatorpost.js";
import { EventFilter, EventFilter$Outbound } from "./eventfilter.js";
import { MetricDataSourceRefRep, MetricDataSourceRefRep$Outbound } from "./metricdatasourcerefrep.js";
import { MetricEventDefaultRep, MetricEventDefaultRep$Outbound } from "./metriceventdefaultrep.js";
import { UrlPost, UrlPost$Outbound } from "./urlpost.js";
/**
 * The kind of event your metric will track
 */
export declare const MetricPostKind: {
    readonly Pageview: "pageview";
    readonly Click: "click";
    readonly Custom: "custom";
    readonly Trace: "trace";
};
/**
 * The kind of event your metric will track
 */
export type MetricPostKind = ClosedEnum<typeof MetricPostKind>;
/**
 * Success criteria. Required for custom and trace numeric metrics, optional for custom and trace conversion metrics.
 */
export declare const MetricPostSuccessCriteria: {
    readonly HigherThanBaseline: "HigherThanBaseline";
    readonly LowerThanBaseline: "LowerThanBaseline";
};
/**
 * Success criteria. Required for custom and trace numeric metrics, optional for custom and trace conversion metrics.
 */
export type MetricPostSuccessCriteria = ClosedEnum<typeof MetricPostSuccessCriteria>;
/**
 * The method by which multiple unit event values are aggregated
 */
export declare const MetricPostUnitAggregationType: {
    readonly Average: "average";
    readonly Sum: "sum";
    readonly CountDistinct: "count_distinct";
};
/**
 * The method by which multiple unit event values are aggregated
 */
export type MetricPostUnitAggregationType = ClosedEnum<typeof MetricPostUnitAggregationType>;
export type MetricPost = {
    /**
     * A unique key to reference the metric
     */
    key: string;
    /**
     * A human-friendly name for the metric
     */
    name?: string | undefined;
    /**
     * Description of the metric
     */
    description?: string | undefined;
    /**
     * The kind of event your metric will track
     */
    kind: MetricPostKind;
    /**
     * One or more CSS selectors. Required for click metrics only.
     */
    selector?: string | undefined;
    /**
     * One or more target URLs. Required for click and pageview metrics only.
     */
    urls?: Array<UrlPost> | undefined;
    /**
     * Whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>). Required for custom and trace metrics only.
     */
    isNumeric?: boolean | undefined;
    /**
     * The unit of measure. Applicable for numeric custom and trace metrics only.
     */
    unit?: string | undefined;
    /**
     * The event key to use in your code. Required for custom conversion/binary and custom numeric metrics only.
     */
    eventKey?: string | undefined;
    /**
     * Success criteria. Required for custom and trace numeric metrics, optional for custom and trace conversion metrics.
     */
    successCriteria?: MetricPostSuccessCriteria | undefined;
    /**
     * Tags for the metric
     */
    tags?: Array<string> | undefined;
    /**
     * Deprecated, use <code>analysisUnits</code> instead.
     *
     * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
     */
    randomizationUnits?: Array<string> | undefined;
    /**
     * An array of analysis units allowed for this metric.
     */
    analysisUnits?: Array<string> | undefined;
    /**
     * The ID of the member who maintains this metric
     */
    maintainerId?: string | undefined;
    /**
     * The method by which multiple unit event values are aggregated
     */
    unitAggregationType?: MetricPostUnitAggregationType | undefined;
    /**
     * The method for analyzing metric events
     */
    analysisType?: string | undefined;
    /**
     * The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>.
     */
    percentileValue?: number | undefined;
    eventDefault?: MetricEventDefaultRep | undefined;
    dataSource?: MetricDataSourceRefRep | undefined;
    filters?: EventFilter | undefined;
    /**
     * Not yet implemented - The start of the measurement window, in milliseconds relative to the unit's first exposure to a flag variation
     */
    windowStartOffset?: number | undefined;
    /**
     * Not yet implemented - The end of the measurement window, in milliseconds relative to the unit's first exposure to a flag variation
     */
    windowEndOffset?: number | undefined;
    /**
     * Lower winsorization percentile, expressed as a percent in the open interval (0, 100). When both bounds are set, defines a two-sided clamp range. Otherwise lower-only winsorization.
     */
    winsorLowerPercentile?: number | undefined;
    /**
     * Upper winsorization percentile, expressed as a percent in the open interval (0, 100). When both bounds are set, must be greater than winsorLowerPercentile.
     */
    winsorUpperPercentile?: number | undefined;
    /**
     * When true, the percentile bound calculation includes imputed zeros. Only meaningful when at least one bound is set and the metric includes units that didn't send events.
     */
    winsorIncludeImputed?: boolean | undefined;
    /**
     * The trace query to use for the metric. Required for trace metrics.
     */
    traceQuery?: string | undefined;
    /**
     * The location in the trace to use for numeric values. Required for numeric trace metrics.
     */
    traceValueLocation?: string | undefined;
    /**
     * The warehouse column to use for counting distinct values. Required when the unitAggregationType is count_distinct.
     */
    unitAggregationField?: string | undefined;
    /**
     * For numeric warehouse-native metrics, the column holding the numeric value. Overrides the value column mapped on the data source.
     */
    valueColumn?: string | undefined;
    denominator?: DenominatorPost | undefined;
};
/** @internal */
export declare const MetricPostKind$inboundSchema: z.ZodNativeEnum<typeof MetricPostKind>;
/** @internal */
export declare const MetricPostKind$outboundSchema: z.ZodNativeEnum<typeof MetricPostKind>;
/** @internal */
export declare const MetricPostSuccessCriteria$inboundSchema: z.ZodNativeEnum<typeof MetricPostSuccessCriteria>;
/** @internal */
export declare const MetricPostSuccessCriteria$outboundSchema: z.ZodNativeEnum<typeof MetricPostSuccessCriteria>;
/** @internal */
export declare const MetricPostUnitAggregationType$inboundSchema: z.ZodNativeEnum<typeof MetricPostUnitAggregationType>;
/** @internal */
export declare const MetricPostUnitAggregationType$outboundSchema: z.ZodNativeEnum<typeof MetricPostUnitAggregationType>;
/** @internal */
export declare const MetricPost$inboundSchema: z.ZodType<MetricPost, z.ZodTypeDef, unknown>;
/** @internal */
export type MetricPost$Outbound = {
    key: string;
    name?: string | undefined;
    description?: string | undefined;
    kind: string;
    selector?: string | undefined;
    urls?: Array<UrlPost$Outbound> | undefined;
    isNumeric?: boolean | undefined;
    unit?: string | undefined;
    eventKey?: string | undefined;
    successCriteria?: string | undefined;
    tags?: Array<string> | undefined;
    randomizationUnits?: Array<string> | undefined;
    analysisUnits?: Array<string> | undefined;
    maintainerId?: string | undefined;
    unitAggregationType?: string | undefined;
    analysisType?: string | undefined;
    percentileValue?: number | undefined;
    eventDefault?: MetricEventDefaultRep$Outbound | undefined;
    dataSource?: MetricDataSourceRefRep$Outbound | undefined;
    filters?: EventFilter$Outbound | undefined;
    windowStartOffset?: number | undefined;
    windowEndOffset?: number | undefined;
    winsorLowerPercentile?: number | undefined;
    winsorUpperPercentile?: number | undefined;
    winsorIncludeImputed?: boolean | undefined;
    traceQuery?: string | undefined;
    traceValueLocation?: string | undefined;
    unitAggregationField?: string | undefined;
    valueColumn?: string | undefined;
    denominator?: DenominatorPost$Outbound | undefined;
};
/** @internal */
export declare const MetricPost$outboundSchema: z.ZodType<MetricPost$Outbound, z.ZodTypeDef, MetricPost>;
export declare function metricPostToJSON(metricPost: MetricPost): string;
export declare function metricPostFromJSON(jsonString: string): SafeParseResult<MetricPost, SDKValidationError>;
//# sourceMappingURL=metricpost.d.ts.map