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 { AiConfigsAccess, AiConfigsAccess$Outbound } from "./aiconfigsaccess.js";
import { AiConfigsFilter, AiConfigsFilter$Outbound } from "./aiconfigsfilter.js";
import { AiConfigsLink, AiConfigsLink$Outbound } from "./aiconfigslink.js";
import { AiConfigsMemberSummary, AiConfigsMemberSummary$Outbound } from "./aiconfigsmembersummary.js";
import { AiConfigsMetricDataSourceRefRep, AiConfigsMetricDataSourceRefRep$Outbound } from "./aiconfigsmetricdatasourcerefrep.js";
import { AiConfigsMetricDenominatorRep, AiConfigsMetricDenominatorRep$Outbound } from "./aiconfigsmetricdenominatorrep.js";
import { AiConfigsMetricEventDefaultRep, AiConfigsMetricEventDefaultRep$Outbound } from "./aiconfigsmetriceventdefaultrep.js";
import { AiConfigsModification, AiConfigsModification$Outbound } from "./aiconfigsmodification.js";
/**
 * The kind of event the metric tracks
 */
export declare const AiConfigsMetricListingRepKind: {
    readonly Pageview: "pageview";
    readonly Click: "click";
    readonly Custom: "custom";
    readonly Trace: "trace";
};
/**
 * The kind of event the metric tracks
 */
export type AiConfigsMetricListingRepKind = ClosedEnum<typeof AiConfigsMetricListingRepKind>;
/**
 * For custom and trace metrics, the success criteria
 */
export declare const AiConfigsMetricListingRepSuccessCriteria: {
    readonly HigherThanBaseline: "HigherThanBaseline";
    readonly LowerThanBaseline: "LowerThanBaseline";
};
/**
 * For custom and trace metrics, the success criteria
 */
export type AiConfigsMetricListingRepSuccessCriteria = ClosedEnum<typeof AiConfigsMetricListingRepSuccessCriteria>;
/**
 * The method by which multiple unit event values are aggregated
 */
export declare const AiConfigsMetricListingRepUnitAggregationType: {
    readonly Average: "average";
    readonly Sum: "sum";
    readonly CountDistinct: "count_distinct";
};
/**
 * The method by which multiple unit event values are aggregated
 */
export type AiConfigsMetricListingRepUnitAggregationType = ClosedEnum<typeof AiConfigsMetricListingRepUnitAggregationType>;
/**
 * The method for analyzing metric events
 */
export declare const AiConfigsMetricListingRepAnalysisType: {
    readonly Mean: "mean";
    readonly Percentile: "percentile";
};
/**
 * The method for analyzing metric events
 */
export type AiConfigsMetricListingRepAnalysisType = ClosedEnum<typeof AiConfigsMetricListingRepAnalysisType>;
export type AiConfigsMetricListingRep = {
    /**
     * The number of experiments using this metric
     */
    experimentCount?: number | undefined;
    /**
     * The number of metric groups using this metric
     */
    metricGroupCount?: number | undefined;
    /**
     * The number of guarded rollouts using this metric
     */
    guardedRolloutCount?: number | undefined;
    /**
     * The number of release policies using this metric
     */
    releasePolicyCount?: number | undefined;
    /**
     * The number of active experiments using this metric
     */
    activeExperimentCount?: number | undefined;
    /**
     * The number of active guarded rollouts using this metric
     */
    activeGuardedRolloutCount?: number | undefined;
    /**
     * The ID of this metric
     */
    id: string;
    /**
     * The version ID of the metric
     */
    versionId: string;
    /**
     * Version of the metric
     */
    version?: number | undefined;
    /**
     * A unique key to reference the metric
     */
    key: string;
    /**
     * A human-friendly name for the metric
     */
    name: string;
    /**
     * The kind of event the metric tracks
     */
    kind: AiConfigsMetricListingRepKind;
    /**
     * The number of feature flags currently attached to this metric
     */
    attachedFlagCount?: number | undefined;
    /**
     * The location and content type of related resources
     */
    links: {
        [k: string]: AiConfigsLink;
    };
    site?: AiConfigsLink | undefined;
    access?: AiConfigsAccess | undefined;
    /**
     * Tags for the metric
     */
    tags: Array<string>;
    creationDate: number;
    lastModified?: AiConfigsModification | undefined;
    /**
     * The ID of the member who maintains this metric
     */
    maintainerId?: string | undefined;
    maintainer?: AiConfigsMemberSummary | undefined;
    /**
     * Description of the metric
     */
    description?: string | undefined;
    /**
     * The category of the metric
     */
    category?: string | undefined;
    /**
     * For custom and trace metrics, 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>).
     */
    isNumeric?: boolean | undefined;
    /**
     * For custom and trace metrics, the success criteria
     */
    successCriteria?: AiConfigsMetricListingRepSuccessCriteria | undefined;
    /**
     * For numeric custom and trace metrics, the unit of measure
     */
    unit?: string | undefined;
    /**
     * For custom metrics, the event key to use in your code
     */
    eventKey?: 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;
    filters?: AiConfigsFilter | undefined;
    /**
     * The method by which multiple unit event values are aggregated
     */
    unitAggregationType?: AiConfigsMetricListingRepUnitAggregationType | undefined;
    /**
     * The method for analyzing metric events
     */
    analysisType?: AiConfigsMetricListingRepAnalysisType | 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?: AiConfigsMetricEventDefaultRep | undefined;
    dataSource: AiConfigsMetricDataSourceRefRep;
    lastSeen?: number | undefined;
    /**
     * Whether the metric version is archived
     */
    archived?: boolean | undefined;
    archivedAt?: number | undefined;
    /**
     * For click metrics, the CSS selectors
     */
    selector?: string | undefined;
    urls?: Array<{
        [k: string]: any;
    }> | 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;
    /**
     * For trace metrics, the trace query to use for the metric.
     */
    traceQuery?: string | undefined;
    /**
     * For trace metrics, the location in the trace to use for numeric values.
     */
    traceValueLocation?: string | undefined;
    /**
     * For count_distinct metrics, the column to count distinct values of
     */
    unitAggregationField?: string | undefined;
    denominator?: AiConfigsMetricDenominatorRep | undefined;
};
/** @internal */
export declare const AiConfigsMetricListingRepKind$inboundSchema: z.ZodNativeEnum<typeof AiConfigsMetricListingRepKind>;
/** @internal */
export declare const AiConfigsMetricListingRepKind$outboundSchema: z.ZodNativeEnum<typeof AiConfigsMetricListingRepKind>;
/** @internal */
export declare const AiConfigsMetricListingRepSuccessCriteria$inboundSchema: z.ZodNativeEnum<typeof AiConfigsMetricListingRepSuccessCriteria>;
/** @internal */
export declare const AiConfigsMetricListingRepSuccessCriteria$outboundSchema: z.ZodNativeEnum<typeof AiConfigsMetricListingRepSuccessCriteria>;
/** @internal */
export declare const AiConfigsMetricListingRepUnitAggregationType$inboundSchema: z.ZodNativeEnum<typeof AiConfigsMetricListingRepUnitAggregationType>;
/** @internal */
export declare const AiConfigsMetricListingRepUnitAggregationType$outboundSchema: z.ZodNativeEnum<typeof AiConfigsMetricListingRepUnitAggregationType>;
/** @internal */
export declare const AiConfigsMetricListingRepAnalysisType$inboundSchema: z.ZodNativeEnum<typeof AiConfigsMetricListingRepAnalysisType>;
/** @internal */
export declare const AiConfigsMetricListingRepAnalysisType$outboundSchema: z.ZodNativeEnum<typeof AiConfigsMetricListingRepAnalysisType>;
/** @internal */
export declare const AiConfigsMetricListingRep$inboundSchema: z.ZodType<AiConfigsMetricListingRep, z.ZodTypeDef, unknown>;
/** @internal */
export type AiConfigsMetricListingRep$Outbound = {
    experimentCount?: number | undefined;
    metricGroupCount?: number | undefined;
    guardedRolloutCount?: number | undefined;
    releasePolicyCount?: number | undefined;
    activeExperimentCount?: number | undefined;
    activeGuardedRolloutCount?: number | undefined;
    _id: string;
    _versionId: string;
    _version?: number | undefined;
    key: string;
    name: string;
    kind: string;
    _attachedFlagCount?: number | undefined;
    _links: {
        [k: string]: AiConfigsLink$Outbound;
    };
    _site?: AiConfigsLink$Outbound | undefined;
    _access?: AiConfigsAccess$Outbound | undefined;
    tags: Array<string>;
    _creationDate: number;
    lastModified?: AiConfigsModification$Outbound | undefined;
    maintainerId?: string | undefined;
    _maintainer?: AiConfigsMemberSummary$Outbound | undefined;
    description?: string | undefined;
    category?: string | undefined;
    isNumeric?: boolean | undefined;
    successCriteria?: string | undefined;
    unit?: string | undefined;
    eventKey?: string | undefined;
    randomizationUnits?: Array<string> | undefined;
    analysisUnits?: Array<string> | undefined;
    filters?: AiConfigsFilter$Outbound | undefined;
    unitAggregationType?: string | undefined;
    analysisType?: string | undefined;
    percentileValue?: number | undefined;
    eventDefault?: AiConfigsMetricEventDefaultRep$Outbound | undefined;
    dataSource: AiConfigsMetricDataSourceRefRep$Outbound;
    lastSeen?: number | undefined;
    archived?: boolean | undefined;
    archivedAt?: number | undefined;
    selector?: string | undefined;
    urls?: Array<{
        [k: string]: any;
    }> | 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;
    denominator?: AiConfigsMetricDenominatorRep$Outbound | undefined;
};
/** @internal */
export declare const AiConfigsMetricListingRep$outboundSchema: z.ZodType<AiConfigsMetricListingRep$Outbound, z.ZodTypeDef, AiConfigsMetricListingRep>;
export declare function aiConfigsMetricListingRepToJSON(aiConfigsMetricListingRep: AiConfigsMetricListingRep): string;
export declare function aiConfigsMetricListingRepFromJSON(jsonString: string): SafeParseResult<AiConfigsMetricListingRep, SDKValidationError>;
//# sourceMappingURL=aiconfigsmetriclistingrep.d.ts.map