/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** * The type of the metric, defining its aggregation method and characteristics. */ export const ExternalMetricDefinitionContractDtoType = { Ratio: "ratio", Sum: "sum", Composite: "composite", Mean: "mean", EventCountCustom: "event_count_custom", EventUser: "event_user", Funnel: "funnel", Undefined: "undefined", SetupIncomplete: "setup_incomplete", CompositeSum: "composite_sum", ImportWindow: "import_window", UserWarehouse: "user_warehouse", } as const; /** * The type of the metric, defining its aggregation method and characteristics. */ export type ExternalMetricDefinitionContractDtoType = ClosedEnum< typeof ExternalMetricDefinitionContractDtoType >; /** * The type of metric event. Allowed values include: count, count_distinct, value, and metadata. */ export const ExternalMetricDefinitionContractDtoMetricEventsType = { Count: "count", CountDistinct: "count_distinct", Value: "value", Metadata: "metadata", } as const; /** * The type of metric event. Allowed values include: count, count_distinct, value, and metadata. */ export type ExternalMetricDefinitionContractDtoMetricEventsType = ClosedEnum< typeof ExternalMetricDefinitionContractDtoMetricEventsType >; /** * Type of event criterion for filtering metrics. Options include `value`, `metadata`, `user`, and `user_custom`. */ export const ExternalMetricDefinitionContractDtoMetricEventsCriteriaType = { Value: "value", Metadata: "metadata", User: "user", UserCustom: "user_custom", } as const; /** * Type of event criterion for filtering metrics. Options include `value`, `metadata`, `user`, and `user_custom`. */ export type ExternalMetricDefinitionContractDtoMetricEventsCriteriaType = ClosedEnum< typeof ExternalMetricDefinitionContractDtoMetricEventsCriteriaType >; /** * sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native */ export const Condition = { In: "in", NotIn: "not_in", Equal: "=", GreaterThan: ">", LessThan: "<", GreaterThanEqual: ">=", LessThanEqual: "<=", IsNull: "is_null", NonNull: "non_null", Contains: "contains", NotContains: "not_contains", SqlFilter: "sql_filter", StartsWith: "starts_with", EndsWith: "ends_with", AfterExposure: "after_exposure", } as const; /** * sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native */ export type Condition = ClosedEnum; export type Criteria = { /** * Type of event criterion for filtering metrics. Options include `value`, `metadata`, `user`, and `user_custom`. */ type: ExternalMetricDefinitionContractDtoMetricEventsCriteriaType; /** * Optional column specifying which data attribute to filter on. */ column?: string | undefined; /** * sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native */ condition: Condition; /** * Optional array of values for the criterion to match against. */ values?: Array | undefined; /** * If true, overrides null values in criterion evaluation. */ nullVacuousOverride?: boolean | undefined; }; export type MetricEvents = { /** * The name of the metric event. */ name: string; /** * The type of metric event. Allowed values include: count, count_distinct, value, and metadata. */ type?: ExternalMetricDefinitionContractDtoMetricEventsType | null | undefined; /** * The key for associated metadata, if applicable. */ metadataKey?: string | undefined; /** * Filtering criteria for the metric event, including conditions and values to refine the event data. */ criteria?: Array | undefined; }; export type MetricComponentMetrics = { name: string; type: string; }; /** * Specifies the desired directionality for the metric, indicating whether an increase or decrease is favorable. */ export const Directionality = { Increase: "increase", Decrease: "decrease", } as const; /** * Specifies the desired directionality for the metric, indicating whether an increase or decrease is favorable. */ export type Directionality = ClosedEnum; /** * The type of funnel event, specifying how the event is tracked. */ export const ExternalMetricDefinitionContractDtoFunnelEventListType = { EventDau: "event_dau", EventUser: "event_user", EventCount: "event_count", EventCountCustom: "event_count_custom", } as const; /** * The type of funnel event, specifying how the event is tracked. */ export type ExternalMetricDefinitionContractDtoFunnelEventListType = ClosedEnum< typeof ExternalMetricDefinitionContractDtoFunnelEventListType >; export type FunnelEventList = { /** * The name of the funnel event used in the metric. */ name: string; /** * The type of funnel event, specifying how the event is tracked. */ type: ExternalMetricDefinitionContractDtoFunnelEventListType; }; /** * Specifies whether to count events or distinct users for the funnel metric. */ export const FunnelCountDistinct = { Events: "events", Users: "users", } as const; /** * Specifies whether to count events or distinct users for the funnel metric. */ export type FunnelCountDistinct = ClosedEnum; /** * Allowed: count┃sum┃mean┃daily_participation┃ratio┃funnel┃count_distinct┃percentile */ export const Aggregation = { Count: "count", Sum: "sum", Mean: "mean", DailyParticipation: "daily_participation", Ratio: "ratio", Funnel: "funnel", CountDistinct: "count_distinct", Percentile: "percentile", Unknown: "", } as const; /** * Allowed: count┃sum┃mean┃daily_participation┃ratio┃funnel┃count_distinct┃percentile */ export type Aggregation = ClosedEnum; /** * Type of event criterion for filtering metrics. Options include `value`, `metadata`, `user`, and `user_custom`. */ export const ExternalMetricDefinitionContractDtoWarehouseNativeType = { Value: "value", Metadata: "metadata", User: "user", UserCustom: "user_custom", } as const; /** * Type of event criterion for filtering metrics. Options include `value`, `metadata`, `user`, and `user_custom`. */ export type ExternalMetricDefinitionContractDtoWarehouseNativeType = ClosedEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeType >; /** * sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native */ export const ExternalMetricDefinitionContractDtoCondition = { In: "in", NotIn: "not_in", Equal: "=", GreaterThan: ">", LessThan: "<", GreaterThanEqual: ">=", LessThanEqual: "<=", IsNull: "is_null", NonNull: "non_null", Contains: "contains", NotContains: "not_contains", SqlFilter: "sql_filter", StartsWith: "starts_with", EndsWith: "ends_with", AfterExposure: "after_exposure", } as const; /** * sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native */ export type ExternalMetricDefinitionContractDtoCondition = ClosedEnum< typeof ExternalMetricDefinitionContractDtoCondition >; export type ExternalMetricDefinitionContractDtoCriteria = { /** * Type of event criterion for filtering metrics. Options include `value`, `metadata`, `user`, and `user_custom`. */ type: ExternalMetricDefinitionContractDtoWarehouseNativeType; /** * Optional column specifying which data attribute to filter on. */ column?: string | undefined; /** * sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native */ condition: ExternalMetricDefinitionContractDtoCondition; /** * Optional array of values for the criterion to match against. */ values?: Array | undefined; /** * If true, overrides null values in criterion evaluation. */ nullVacuousOverride?: boolean | undefined; }; /** * Type of event criterion for filtering metrics. Options include `value`, `metadata`, `user`, and `user_custom`. */ export const ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType = { Value: "value", Metadata: "metadata", User: "user", UserCustom: "user_custom", } as const; /** * Type of event criterion for filtering metrics. Options include `value`, `metadata`, `user`, and `user_custom`. */ export type ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType = ClosedEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType >; /** * sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native */ export const ExternalMetricDefinitionContractDtoWarehouseNativeCondition = { In: "in", NotIn: "not_in", Equal: "=", GreaterThan: ">", LessThan: "<", GreaterThanEqual: ">=", LessThanEqual: "<=", IsNull: "is_null", NonNull: "non_null", Contains: "contains", NotContains: "not_contains", SqlFilter: "sql_filter", StartsWith: "starts_with", EndsWith: "ends_with", AfterExposure: "after_exposure", } as const; /** * sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native */ export type ExternalMetricDefinitionContractDtoWarehouseNativeCondition = ClosedEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeCondition >; export type DenominatorCriteria = { /** * Type of event criterion for filtering metrics. Options include `value`, `metadata`, `user`, and `user_custom`. */ type: ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType; /** * Optional column specifying which data attribute to filter on. */ column?: string | undefined; /** * sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native */ condition: ExternalMetricDefinitionContractDtoWarehouseNativeCondition; /** * Optional array of values for the criterion to match against. */ values?: Array | undefined; /** * If true, overrides null values in criterion evaluation. */ nullVacuousOverride?: boolean | undefined; }; /** * Allowed: count┃sum┃mean┃daily_participation┃ratio┃funnel┃count_distinct┃percentile */ export const DenominatorAggregation = { Count: "count", Sum: "sum", Mean: "mean", DailyParticipation: "daily_participation", Ratio: "ratio", Funnel: "funnel", CountDistinct: "count_distinct", Percentile: "percentile", Unknown: "", } as const; /** * Allowed: count┃sum┃mean┃daily_participation┃ratio┃funnel┃count_distinct┃percentile */ export type DenominatorAggregation = ClosedEnum; /** * Allowed: users┃sessions for distinct count method in funnel events. */ export const ExternalMetricDefinitionContractDtoFunnelCountDistinct = { Sessions: "sessions", Users: "users", } as const; /** * Allowed: users┃sessions for distinct count method in funnel events. */ export type ExternalMetricDefinitionContractDtoFunnelCountDistinct = ClosedEnum< typeof ExternalMetricDefinitionContractDtoFunnelCountDistinct >; /** * Type of event criterion for filtering metrics. Options include `value`, `metadata`, `user`, and `user_custom`. */ export const ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType = { Value: "value", Metadata: "metadata", User: "user", UserCustom: "user_custom", } as const; /** * Type of event criterion for filtering metrics. Options include `value`, `metadata`, `user`, and `user_custom`. */ export type ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType = ClosedEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType >; /** * sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native */ export const ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition = { In: "in", NotIn: "not_in", Equal: "=", GreaterThan: ">", LessThan: "<", GreaterThanEqual: ">=", LessThanEqual: "<=", IsNull: "is_null", NonNull: "non_null", Contains: "contains", NotContains: "not_contains", SqlFilter: "sql_filter", StartsWith: "starts_with", EndsWith: "ends_with", AfterExposure: "after_exposure", } as const; /** * sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native */ export type ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition = ClosedEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition >; export type ExternalMetricDefinitionContractDtoWarehouseNativeCriteria = { /** * Type of event criterion for filtering metrics. Options include `value`, `metadata`, `user`, and `user_custom`. */ type: ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType; /** * Optional column specifying which data attribute to filter on. */ column?: string | undefined; /** * sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native */ condition: ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition; /** * Optional array of values for the criterion to match against. */ values?: Array | undefined; /** * If true, overrides null values in criterion evaluation. */ nullVacuousOverride?: boolean | undefined; }; export type FunnelEvents = { /** * Optional array of criteria to filter the funnel events, defined by various types and conditions. */ criteria?: Array | undefined; /** * Optional name of the metric source associated with the funnel event. */ metricSourceName?: string | undefined; /** * Optional step name for the funnel event, can be null if not specified. */ name?: any | null | undefined; /** * Name of column which being used as session identifier. Funnel event with the same metric source */ sessionIdentifierField?: any | null | undefined; }; /** * Allowed: start_event┃exposure to determine funnel start criteria. */ export const FunnelStartCriteria = { StartEvent: "start_event", Exposure: "exposure", } as const; /** * Allowed: start_event┃exposure to determine funnel start criteria. */ export type FunnelStartCriteria = ClosedEnum; /** * Aggregation type for numerator; Allowed: count┃sum┃mean┃daily_participation┃ratio┃funnel┃count_distinct┃percentile. */ export const NumeratorAggregation = { Count: "count", Sum: "sum", Mean: "mean", DailyParticipation: "daily_participation", Ratio: "ratio", Funnel: "funnel", CountDistinct: "count_distinct", Percentile: "percentile", Unknown: "", } as const; /** * Aggregation type for numerator; Allowed: count┃sum┃mean┃daily_participation┃ratio┃funnel┃count_distinct┃percentile. */ export type NumeratorAggregation = ClosedEnum; /** * Defines warehouse native metrics for advanced configurations. */ export type WarehouseNative = { /** * Allowed: count┃sum┃mean┃daily_participation┃ratio┃funnel┃count_distinct┃percentile */ aggregation?: Aggregation | undefined; /** * For Count, Sum, Mean, User Count aggregation types: the name of metric source */ metricSourceName?: string | undefined; /** * MetricEventCrtieria */ criteria?: Array | undefined; waitForCohortWindow?: boolean | undefined; /** * MetricEventCriteria */ denominatorCriteria?: Array | undefined; /** * Allowed: count┃sum┃mean┃daily_participation┃ratio┃funnel┃count_distinct┃percentile */ denominatorAggregation?: DenominatorAggregation | undefined; /** * Custom end date for rollup in days since exposure. */ denominatorCustomRollupEnd?: number | undefined; /** * Custom start date for rollup in days since exposure. */ denominatorCustomRollupStart?: number | undefined; /** * Name of the metric source for the denominator. */ denominatorMetricSourceName?: string | undefined; /** * Time window for the denominator metric. Specify "custom" for a custom window. */ denominatorRollupTimeWindow?: string | undefined; /** * Column name for the denominator’s value. */ denominatorValueColumn?: string | undefined; /** * Duration for counting funnel events in days. */ funnelCalculationWindow?: number | undefined; /** * Allowed: users┃sessions for distinct count method in funnel events. */ funnelCountDistinct?: ExternalMetricDefinitionContractDtoFunnelCountDistinct | undefined; /** * List of funnel events with associated criteria and identifiers. */ funnelEvents?: Array | undefined; /** * Allowed: start_event┃exposure to determine funnel start criteria. */ funnelStartCriteria?: FunnelStartCriteria | undefined; /** * Specify metadata columns for breaking down metric analysis. */ metricDimensionColumns?: Array | undefined; /** * Number of days for metric baking; specify duration for analysis. */ metricBakeDays?: number | undefined; /** * Aggregation type for numerator; Allowed: count┃sum┃mean┃daily_participation┃ratio┃funnel┃count_distinct┃percentile. */ numeratorAggregation?: NumeratorAggregation | undefined; /** * Column name representing the metric’s value. */ valueColumn?: string | undefined; /** * High threshold for winsorization; must be between 0 and 1. */ winsorizationHigh?: number | undefined; /** * Low threshold for winsorization; must be between 0 and 1. */ winsorizationLow?: number | undefined; /** * Attribution window for CUPED adjustments in days. */ cupedAttributionWindow?: any | null | undefined; /** * Flag to include only users with a conversion event in the metric. */ onlyIncludeUsersWithConversionEvent?: boolean | undefined; /** * Percentile value for statistical calculations. */ percentile?: number | undefined; /** * Threshold value for filtering metrics. */ valueThreshold?: number | undefined; /** * Maximum cap for metric values. */ cap?: number | undefined; /** * General time window for rollup; can specify custom settings. */ rollupTimeWindow?: string | undefined; /** * Custom start date for rollup in days since exposure. */ customRollUpStart?: number | undefined; /** * Custom end date for rollup in days since exposure. */ customRollUpEnd?: number | undefined; }; export type Lineage = { /** * List of event names that contribute to the metric’s calculation. */ events: Array; /** * List of metric names that are part of this metric’s lineage. */ metrics: Array; }; export type ExternalMetricDefinitionContractDtoOwner = { /** * Name of the owner responsible for the metric’s management. */ name: string; }; export type ExternalMetricDefinitionContractDto = { /** * The name of the metric, serving as its primary identifier. */ name: string; /** * The type of the metric, defining its aggregation method and characteristics. */ type: ExternalMetricDefinitionContractDtoType; /** * Indicates if the metric is hidden from the user interface. */ isHidden?: boolean | undefined; /** * Marks the metric as verified, indicating trustworthiness within the organization. */ isVerified?: boolean | undefined; /** * Set to true to make the metric definition editable only through the Console API. */ isReadOnly?: boolean | undefined; /** * Array of unit types associated with the metric, such as stableID or userID. */ unitTypes?: Array | undefined; /** * An array of event definitions used to compute the metric. */ metricEvents?: Array | undefined; /** * List of input metrics used to calculate the new metric for composite types. */ metricComponentMetrics?: Array | undefined; /** * An optional description providing additional context about the metric. */ description?: string | undefined; /** * Specifies the desired directionality for the metric, indicating whether an increase or decrease is favorable. */ directionality: Directionality; /** * Optional tags for categorizing the metric and improving searchability. */ tags?: Array | undefined; /** * Indicates whether the metric is permanent and should not be deleted. */ isPermanent?: boolean | undefined; /** * Time window for the metric rollup. Specify "custom" for a customized time window. */ rollupTimeWindow?: string | undefined; /** * Custom time window start date in days since exposure. */ customRollUpStart?: number | undefined; /** * Custom time window end date in days since exposure. */ customRollUpEnd?: number | undefined; /** * List of events used to create funnel metrics. */ funnelEventList?: Array | undefined; /** * Specifies whether to count events or distinct users for the funnel metric. */ funnelCountDistinct?: FunnelCountDistinct | undefined; /** * Defines warehouse native metrics for advanced configurations. */ warehouseNative?: WarehouseNative | undefined; /** * The team associated with the metric, applicable for enterprise environments. */ team?: any | null | undefined; /** * Unique identifier for the metric, used for referencing within the system. */ id: string; lineage: Lineage; /** * Name of the person who created the metric, if available. */ creatorName?: any | null | undefined; /** * Email address of the metric creator for contact purposes. */ creatorEmail?: any | null | undefined; /** * Timestamp indicating when the metric was created. */ createdTime?: number | undefined; owner?: ExternalMetricDefinitionContractDtoOwner | undefined; }; /** @internal */ export const ExternalMetricDefinitionContractDtoType$inboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoType > = z.nativeEnum(ExternalMetricDefinitionContractDtoType); /** @internal */ export const ExternalMetricDefinitionContractDtoType$outboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoType > = ExternalMetricDefinitionContractDtoType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDtoType$ { /** @deprecated use `ExternalMetricDefinitionContractDtoType$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDtoType$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoType$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDtoType$outboundSchema; } /** @internal */ export const ExternalMetricDefinitionContractDtoMetricEventsType$inboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoMetricEventsType > = z.nativeEnum(ExternalMetricDefinitionContractDtoMetricEventsType); /** @internal */ export const ExternalMetricDefinitionContractDtoMetricEventsType$outboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoMetricEventsType > = ExternalMetricDefinitionContractDtoMetricEventsType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDtoMetricEventsType$ { /** @deprecated use `ExternalMetricDefinitionContractDtoMetricEventsType$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDtoMetricEventsType$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoMetricEventsType$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDtoMetricEventsType$outboundSchema; } /** @internal */ export const ExternalMetricDefinitionContractDtoMetricEventsCriteriaType$inboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoMetricEventsCriteriaType > = z.nativeEnum(ExternalMetricDefinitionContractDtoMetricEventsCriteriaType); /** @internal */ export const ExternalMetricDefinitionContractDtoMetricEventsCriteriaType$outboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoMetricEventsCriteriaType > = ExternalMetricDefinitionContractDtoMetricEventsCriteriaType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDtoMetricEventsCriteriaType$ { /** @deprecated use `ExternalMetricDefinitionContractDtoMetricEventsCriteriaType$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDtoMetricEventsCriteriaType$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoMetricEventsCriteriaType$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDtoMetricEventsCriteriaType$outboundSchema; } /** @internal */ export const Condition$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Condition); /** @internal */ export const Condition$outboundSchema: z.ZodNativeEnum = Condition$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Condition$ { /** @deprecated use `Condition$inboundSchema` instead. */ export const inboundSchema = Condition$inboundSchema; /** @deprecated use `Condition$outboundSchema` instead. */ export const outboundSchema = Condition$outboundSchema; } /** @internal */ export const Criteria$inboundSchema: z.ZodType = z.object({ type: ExternalMetricDefinitionContractDtoMetricEventsCriteriaType$inboundSchema, column: z.string().optional(), condition: Condition$inboundSchema, values: z.array(z.string()).optional(), nullVacuousOverride: z.boolean().optional(), }); /** @internal */ export type Criteria$Outbound = { type: string; column?: string | undefined; condition: string; values?: Array | undefined; nullVacuousOverride?: boolean | undefined; }; /** @internal */ export const Criteria$outboundSchema: z.ZodType = z.object({ type: ExternalMetricDefinitionContractDtoMetricEventsCriteriaType$outboundSchema, column: z.string().optional(), condition: Condition$outboundSchema, values: z.array(z.string()).optional(), nullVacuousOverride: z.boolean().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Criteria$ { /** @deprecated use `Criteria$inboundSchema` instead. */ export const inboundSchema = Criteria$inboundSchema; /** @deprecated use `Criteria$outboundSchema` instead. */ export const outboundSchema = Criteria$outboundSchema; /** @deprecated use `Criteria$Outbound` instead. */ export type Outbound = Criteria$Outbound; } /** @internal */ export const MetricEvents$inboundSchema: z.ZodType = z.object({ name: z.string(), type: z.nullable(ExternalMetricDefinitionContractDtoMetricEventsType$inboundSchema).optional(), metadataKey: z.string().optional(), criteria: z.array(z.lazy(() => Criteria$inboundSchema)).optional(), }); /** @internal */ export type MetricEvents$Outbound = { name: string; type?: string | null | undefined; metadataKey?: string | undefined; criteria?: Array | undefined; }; /** @internal */ export const MetricEvents$outboundSchema: z.ZodType< MetricEvents$Outbound, z.ZodTypeDef, MetricEvents > = z.object({ name: z.string(), type: z.nullable(ExternalMetricDefinitionContractDtoMetricEventsType$outboundSchema).optional(), metadataKey: z.string().optional(), criteria: z.array(z.lazy(() => Criteria$outboundSchema)).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MetricEvents$ { /** @deprecated use `MetricEvents$inboundSchema` instead. */ export const inboundSchema = MetricEvents$inboundSchema; /** @deprecated use `MetricEvents$outboundSchema` instead. */ export const outboundSchema = MetricEvents$outboundSchema; /** @deprecated use `MetricEvents$Outbound` instead. */ export type Outbound = MetricEvents$Outbound; } /** @internal */ export const MetricComponentMetrics$inboundSchema: z.ZodType< MetricComponentMetrics, z.ZodTypeDef, unknown > = z.object({ name: z.string(), type: z.string(), }); /** @internal */ export type MetricComponentMetrics$Outbound = { name: string; type: string; }; /** @internal */ export const MetricComponentMetrics$outboundSchema: z.ZodType< MetricComponentMetrics$Outbound, z.ZodTypeDef, MetricComponentMetrics > = z.object({ name: z.string(), type: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MetricComponentMetrics$ { /** @deprecated use `MetricComponentMetrics$inboundSchema` instead. */ export const inboundSchema = MetricComponentMetrics$inboundSchema; /** @deprecated use `MetricComponentMetrics$outboundSchema` instead. */ export const outboundSchema = MetricComponentMetrics$outboundSchema; /** @deprecated use `MetricComponentMetrics$Outbound` instead. */ export type Outbound = MetricComponentMetrics$Outbound; } /** @internal */ export const Directionality$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Directionality); /** @internal */ export const Directionality$outboundSchema: z.ZodNativeEnum = Directionality$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Directionality$ { /** @deprecated use `Directionality$inboundSchema` instead. */ export const inboundSchema = Directionality$inboundSchema; /** @deprecated use `Directionality$outboundSchema` instead. */ export const outboundSchema = Directionality$outboundSchema; } /** @internal */ export const ExternalMetricDefinitionContractDtoFunnelEventListType$inboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoFunnelEventListType > = z.nativeEnum(ExternalMetricDefinitionContractDtoFunnelEventListType); /** @internal */ export const ExternalMetricDefinitionContractDtoFunnelEventListType$outboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoFunnelEventListType > = ExternalMetricDefinitionContractDtoFunnelEventListType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDtoFunnelEventListType$ { /** @deprecated use `ExternalMetricDefinitionContractDtoFunnelEventListType$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDtoFunnelEventListType$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoFunnelEventListType$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDtoFunnelEventListType$outboundSchema; } /** @internal */ export const FunnelEventList$inboundSchema: z.ZodType = z.object({ name: z.string(), type: ExternalMetricDefinitionContractDtoFunnelEventListType$inboundSchema, }); /** @internal */ export type FunnelEventList$Outbound = { name: string; type: string; }; /** @internal */ export const FunnelEventList$outboundSchema: z.ZodType< FunnelEventList$Outbound, z.ZodTypeDef, FunnelEventList > = z.object({ name: z.string(), type: ExternalMetricDefinitionContractDtoFunnelEventListType$outboundSchema, }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace FunnelEventList$ { /** @deprecated use `FunnelEventList$inboundSchema` instead. */ export const inboundSchema = FunnelEventList$inboundSchema; /** @deprecated use `FunnelEventList$outboundSchema` instead. */ export const outboundSchema = FunnelEventList$outboundSchema; /** @deprecated use `FunnelEventList$Outbound` instead. */ export type Outbound = FunnelEventList$Outbound; } /** @internal */ export const FunnelCountDistinct$inboundSchema: z.ZodNativeEnum = z.nativeEnum(FunnelCountDistinct); /** @internal */ export const FunnelCountDistinct$outboundSchema: z.ZodNativeEnum = FunnelCountDistinct$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace FunnelCountDistinct$ { /** @deprecated use `FunnelCountDistinct$inboundSchema` instead. */ export const inboundSchema = FunnelCountDistinct$inboundSchema; /** @deprecated use `FunnelCountDistinct$outboundSchema` instead. */ export const outboundSchema = FunnelCountDistinct$outboundSchema; } /** @internal */ export const Aggregation$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Aggregation); /** @internal */ export const Aggregation$outboundSchema: z.ZodNativeEnum = Aggregation$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Aggregation$ { /** @deprecated use `Aggregation$inboundSchema` instead. */ export const inboundSchema = Aggregation$inboundSchema; /** @deprecated use `Aggregation$outboundSchema` instead. */ export const outboundSchema = Aggregation$outboundSchema; } /** @internal */ export const ExternalMetricDefinitionContractDtoWarehouseNativeType$inboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeType > = z.nativeEnum(ExternalMetricDefinitionContractDtoWarehouseNativeType); /** @internal */ export const ExternalMetricDefinitionContractDtoWarehouseNativeType$outboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeType > = ExternalMetricDefinitionContractDtoWarehouseNativeType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDtoWarehouseNativeType$ { /** @deprecated use `ExternalMetricDefinitionContractDtoWarehouseNativeType$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDtoWarehouseNativeType$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoWarehouseNativeType$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDtoWarehouseNativeType$outboundSchema; } /** @internal */ export const ExternalMetricDefinitionContractDtoCondition$inboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoCondition > = z.nativeEnum(ExternalMetricDefinitionContractDtoCondition); /** @internal */ export const ExternalMetricDefinitionContractDtoCondition$outboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoCondition > = ExternalMetricDefinitionContractDtoCondition$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDtoCondition$ { /** @deprecated use `ExternalMetricDefinitionContractDtoCondition$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDtoCondition$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoCondition$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDtoCondition$outboundSchema; } /** @internal */ export const ExternalMetricDefinitionContractDtoCriteria$inboundSchema: z.ZodType< ExternalMetricDefinitionContractDtoCriteria, z.ZodTypeDef, unknown > = z.object({ type: ExternalMetricDefinitionContractDtoWarehouseNativeType$inboundSchema, column: z.string().optional(), condition: ExternalMetricDefinitionContractDtoCondition$inboundSchema, values: z.array(z.string()).optional(), nullVacuousOverride: z.boolean().optional(), }); /** @internal */ export type ExternalMetricDefinitionContractDtoCriteria$Outbound = { type: string; column?: string | undefined; condition: string; values?: Array | undefined; nullVacuousOverride?: boolean | undefined; }; /** @internal */ export const ExternalMetricDefinitionContractDtoCriteria$outboundSchema: z.ZodType< ExternalMetricDefinitionContractDtoCriteria$Outbound, z.ZodTypeDef, ExternalMetricDefinitionContractDtoCriteria > = z.object({ type: ExternalMetricDefinitionContractDtoWarehouseNativeType$outboundSchema, column: z.string().optional(), condition: ExternalMetricDefinitionContractDtoCondition$outboundSchema, values: z.array(z.string()).optional(), nullVacuousOverride: z.boolean().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDtoCriteria$ { /** @deprecated use `ExternalMetricDefinitionContractDtoCriteria$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDtoCriteria$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoCriteria$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDtoCriteria$outboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoCriteria$Outbound` instead. */ export type Outbound = ExternalMetricDefinitionContractDtoCriteria$Outbound; } /** @internal */ export const ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType$inboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType > = z.nativeEnum(ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType); /** @internal */ export const ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType$outboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType > = ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType$ { /** @deprecated use `ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType$outboundSchema; } /** @internal */ export const ExternalMetricDefinitionContractDtoWarehouseNativeCondition$inboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeCondition > = z.nativeEnum(ExternalMetricDefinitionContractDtoWarehouseNativeCondition); /** @internal */ export const ExternalMetricDefinitionContractDtoWarehouseNativeCondition$outboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeCondition > = ExternalMetricDefinitionContractDtoWarehouseNativeCondition$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDtoWarehouseNativeCondition$ { /** @deprecated use `ExternalMetricDefinitionContractDtoWarehouseNativeCondition$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDtoWarehouseNativeCondition$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoWarehouseNativeCondition$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDtoWarehouseNativeCondition$outboundSchema; } /** @internal */ export const DenominatorCriteria$inboundSchema: z.ZodType< DenominatorCriteria, z.ZodTypeDef, unknown > = z.object({ type: ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType$inboundSchema, column: z.string().optional(), condition: ExternalMetricDefinitionContractDtoWarehouseNativeCondition$inboundSchema, values: z.array(z.string()).optional(), nullVacuousOverride: z.boolean().optional(), }); /** @internal */ export type DenominatorCriteria$Outbound = { type: string; column?: string | undefined; condition: string; values?: Array | undefined; nullVacuousOverride?: boolean | undefined; }; /** @internal */ export const DenominatorCriteria$outboundSchema: z.ZodType< DenominatorCriteria$Outbound, z.ZodTypeDef, DenominatorCriteria > = z.object({ type: ExternalMetricDefinitionContractDtoWarehouseNativeDenominatorCriteriaType$outboundSchema, column: z.string().optional(), condition: ExternalMetricDefinitionContractDtoWarehouseNativeCondition$outboundSchema, values: z.array(z.string()).optional(), nullVacuousOverride: z.boolean().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DenominatorCriteria$ { /** @deprecated use `DenominatorCriteria$inboundSchema` instead. */ export const inboundSchema = DenominatorCriteria$inboundSchema; /** @deprecated use `DenominatorCriteria$outboundSchema` instead. */ export const outboundSchema = DenominatorCriteria$outboundSchema; /** @deprecated use `DenominatorCriteria$Outbound` instead. */ export type Outbound = DenominatorCriteria$Outbound; } /** @internal */ export const DenominatorAggregation$inboundSchema: z.ZodNativeEnum = z.nativeEnum(DenominatorAggregation); /** @internal */ export const DenominatorAggregation$outboundSchema: z.ZodNativeEnum = DenominatorAggregation$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DenominatorAggregation$ { /** @deprecated use `DenominatorAggregation$inboundSchema` instead. */ export const inboundSchema = DenominatorAggregation$inboundSchema; /** @deprecated use `DenominatorAggregation$outboundSchema` instead. */ export const outboundSchema = DenominatorAggregation$outboundSchema; } /** @internal */ export const ExternalMetricDefinitionContractDtoFunnelCountDistinct$inboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoFunnelCountDistinct > = z.nativeEnum(ExternalMetricDefinitionContractDtoFunnelCountDistinct); /** @internal */ export const ExternalMetricDefinitionContractDtoFunnelCountDistinct$outboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoFunnelCountDistinct > = ExternalMetricDefinitionContractDtoFunnelCountDistinct$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDtoFunnelCountDistinct$ { /** @deprecated use `ExternalMetricDefinitionContractDtoFunnelCountDistinct$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDtoFunnelCountDistinct$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoFunnelCountDistinct$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDtoFunnelCountDistinct$outboundSchema; } /** @internal */ export const ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType$inboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType > = z.nativeEnum(ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType); /** @internal */ export const ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType$outboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType > = ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType$ { /** @deprecated use `ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType$outboundSchema; } /** @internal */ export const ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition$inboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition > = z.nativeEnum(ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition); /** @internal */ export const ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition$outboundSchema: z.ZodNativeEnum< typeof ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition > = ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition$ { /** @deprecated use `ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition$outboundSchema; } /** @internal */ export const ExternalMetricDefinitionContractDtoWarehouseNativeCriteria$inboundSchema: z.ZodType< ExternalMetricDefinitionContractDtoWarehouseNativeCriteria, z.ZodTypeDef, unknown > = z.object({ type: ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType$inboundSchema, column: z.string().optional(), condition: ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition$inboundSchema, values: z.array(z.string()).optional(), nullVacuousOverride: z.boolean().optional(), }); /** @internal */ export type ExternalMetricDefinitionContractDtoWarehouseNativeCriteria$Outbound = { type: string; column?: string | undefined; condition: string; values?: Array | undefined; nullVacuousOverride?: boolean | undefined; }; /** @internal */ export const ExternalMetricDefinitionContractDtoWarehouseNativeCriteria$outboundSchema: z.ZodType< ExternalMetricDefinitionContractDtoWarehouseNativeCriteria$Outbound, z.ZodTypeDef, ExternalMetricDefinitionContractDtoWarehouseNativeCriteria > = z.object({ type: ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsType$outboundSchema, column: z.string().optional(), condition: ExternalMetricDefinitionContractDtoWarehouseNativeFunnelEventsCondition$outboundSchema, values: z.array(z.string()).optional(), nullVacuousOverride: z.boolean().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDtoWarehouseNativeCriteria$ { /** @deprecated use `ExternalMetricDefinitionContractDtoWarehouseNativeCriteria$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDtoWarehouseNativeCriteria$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoWarehouseNativeCriteria$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDtoWarehouseNativeCriteria$outboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoWarehouseNativeCriteria$Outbound` instead. */ export type Outbound = ExternalMetricDefinitionContractDtoWarehouseNativeCriteria$Outbound; } /** @internal */ export const FunnelEvents$inboundSchema: z.ZodType = z.object({ criteria: z .array( z.lazy(() => ExternalMetricDefinitionContractDtoWarehouseNativeCriteria$inboundSchema) ) .optional(), metricSourceName: z.string().optional(), name: z.nullable(z.any()).optional(), sessionIdentifierField: z.nullable(z.any()).optional(), }); /** @internal */ export type FunnelEvents$Outbound = { criteria?: | Array | undefined; metricSourceName?: string | undefined; name?: any | null | undefined; sessionIdentifierField?: any | null | undefined; }; /** @internal */ export const FunnelEvents$outboundSchema: z.ZodType< FunnelEvents$Outbound, z.ZodTypeDef, FunnelEvents > = z.object({ criteria: z .array( z.lazy(() => ExternalMetricDefinitionContractDtoWarehouseNativeCriteria$outboundSchema) ) .optional(), metricSourceName: z.string().optional(), name: z.nullable(z.any()).optional(), sessionIdentifierField: z.nullable(z.any()).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace FunnelEvents$ { /** @deprecated use `FunnelEvents$inboundSchema` instead. */ export const inboundSchema = FunnelEvents$inboundSchema; /** @deprecated use `FunnelEvents$outboundSchema` instead. */ export const outboundSchema = FunnelEvents$outboundSchema; /** @deprecated use `FunnelEvents$Outbound` instead. */ export type Outbound = FunnelEvents$Outbound; } /** @internal */ export const FunnelStartCriteria$inboundSchema: z.ZodNativeEnum = z.nativeEnum(FunnelStartCriteria); /** @internal */ export const FunnelStartCriteria$outboundSchema: z.ZodNativeEnum = FunnelStartCriteria$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace FunnelStartCriteria$ { /** @deprecated use `FunnelStartCriteria$inboundSchema` instead. */ export const inboundSchema = FunnelStartCriteria$inboundSchema; /** @deprecated use `FunnelStartCriteria$outboundSchema` instead. */ export const outboundSchema = FunnelStartCriteria$outboundSchema; } /** @internal */ export const NumeratorAggregation$inboundSchema: z.ZodNativeEnum = z.nativeEnum(NumeratorAggregation); /** @internal */ export const NumeratorAggregation$outboundSchema: z.ZodNativeEnum = NumeratorAggregation$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NumeratorAggregation$ { /** @deprecated use `NumeratorAggregation$inboundSchema` instead. */ export const inboundSchema = NumeratorAggregation$inboundSchema; /** @deprecated use `NumeratorAggregation$outboundSchema` instead. */ export const outboundSchema = NumeratorAggregation$outboundSchema; } /** @internal */ export const WarehouseNative$inboundSchema: z.ZodType = z.object({ aggregation: Aggregation$inboundSchema.optional(), metricSourceName: z.string().optional(), criteria: z .array(z.lazy(() => ExternalMetricDefinitionContractDtoCriteria$inboundSchema)) .optional(), waitForCohortWindow: z.boolean().optional(), denominatorCriteria: z.array(z.lazy(() => DenominatorCriteria$inboundSchema)).optional(), denominatorAggregation: DenominatorAggregation$inboundSchema.optional(), denominatorCustomRollupEnd: z.number().optional(), denominatorCustomRollupStart: z.number().optional(), denominatorMetricSourceName: z.string().optional(), denominatorRollupTimeWindow: z.string().optional(), denominatorValueColumn: z.string().optional(), funnelCalculationWindow: z.number().optional(), funnelCountDistinct: ExternalMetricDefinitionContractDtoFunnelCountDistinct$inboundSchema.optional(), funnelEvents: z.array(z.lazy(() => FunnelEvents$inboundSchema)).optional(), funnelStartCriteria: FunnelStartCriteria$inboundSchema.optional(), metricDimensionColumns: z.array(z.string()).optional(), metricBakeDays: z.number().optional(), numeratorAggregation: NumeratorAggregation$inboundSchema.optional(), valueColumn: z.string().optional(), winsorizationHigh: z.number().optional(), winsorizationLow: z.number().optional(), cupedAttributionWindow: z.nullable(z.any()).optional(), onlyIncludeUsersWithConversionEvent: z.boolean().optional(), percentile: z.number().optional(), valueThreshold: z.number().optional(), cap: z.number().optional(), rollupTimeWindow: z.string().optional(), customRollUpStart: z.number().optional(), customRollUpEnd: z.number().optional(), }); /** @internal */ export type WarehouseNative$Outbound = { aggregation?: string | undefined; metricSourceName?: string | undefined; criteria?: Array | undefined; waitForCohortWindow?: boolean | undefined; denominatorCriteria?: Array | undefined; denominatorAggregation?: string | undefined; denominatorCustomRollupEnd?: number | undefined; denominatorCustomRollupStart?: number | undefined; denominatorMetricSourceName?: string | undefined; denominatorRollupTimeWindow?: string | undefined; denominatorValueColumn?: string | undefined; funnelCalculationWindow?: number | undefined; funnelCountDistinct?: string | undefined; funnelEvents?: Array | undefined; funnelStartCriteria?: string | undefined; metricDimensionColumns?: Array | undefined; metricBakeDays?: number | undefined; numeratorAggregation?: string | undefined; valueColumn?: string | undefined; winsorizationHigh?: number | undefined; winsorizationLow?: number | undefined; cupedAttributionWindow?: any | null | undefined; onlyIncludeUsersWithConversionEvent?: boolean | undefined; percentile?: number | undefined; valueThreshold?: number | undefined; cap?: number | undefined; rollupTimeWindow?: string | undefined; customRollUpStart?: number | undefined; customRollUpEnd?: number | undefined; }; /** @internal */ export const WarehouseNative$outboundSchema: z.ZodType< WarehouseNative$Outbound, z.ZodTypeDef, WarehouseNative > = z.object({ aggregation: Aggregation$outboundSchema.optional(), metricSourceName: z.string().optional(), criteria: z .array(z.lazy(() => ExternalMetricDefinitionContractDtoCriteria$outboundSchema)) .optional(), waitForCohortWindow: z.boolean().optional(), denominatorCriteria: z.array(z.lazy(() => DenominatorCriteria$outboundSchema)).optional(), denominatorAggregation: DenominatorAggregation$outboundSchema.optional(), denominatorCustomRollupEnd: z.number().optional(), denominatorCustomRollupStart: z.number().optional(), denominatorMetricSourceName: z.string().optional(), denominatorRollupTimeWindow: z.string().optional(), denominatorValueColumn: z.string().optional(), funnelCalculationWindow: z.number().optional(), funnelCountDistinct: ExternalMetricDefinitionContractDtoFunnelCountDistinct$outboundSchema.optional(), funnelEvents: z.array(z.lazy(() => FunnelEvents$outboundSchema)).optional(), funnelStartCriteria: FunnelStartCriteria$outboundSchema.optional(), metricDimensionColumns: z.array(z.string()).optional(), metricBakeDays: z.number().optional(), numeratorAggregation: NumeratorAggregation$outboundSchema.optional(), valueColumn: z.string().optional(), winsorizationHigh: z.number().optional(), winsorizationLow: z.number().optional(), cupedAttributionWindow: z.nullable(z.any()).optional(), onlyIncludeUsersWithConversionEvent: z.boolean().optional(), percentile: z.number().optional(), valueThreshold: z.number().optional(), cap: z.number().optional(), rollupTimeWindow: z.string().optional(), customRollUpStart: z.number().optional(), customRollUpEnd: z.number().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace WarehouseNative$ { /** @deprecated use `WarehouseNative$inboundSchema` instead. */ export const inboundSchema = WarehouseNative$inboundSchema; /** @deprecated use `WarehouseNative$outboundSchema` instead. */ export const outboundSchema = WarehouseNative$outboundSchema; /** @deprecated use `WarehouseNative$Outbound` instead. */ export type Outbound = WarehouseNative$Outbound; } /** @internal */ export const Lineage$inboundSchema: z.ZodType = z.object({ events: z.array(z.string()), metrics: z.array(z.string()), }); /** @internal */ export type Lineage$Outbound = { events: Array; metrics: Array; }; /** @internal */ export const Lineage$outboundSchema: z.ZodType = z.object({ events: z.array(z.string()), metrics: z.array(z.string()), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Lineage$ { /** @deprecated use `Lineage$inboundSchema` instead. */ export const inboundSchema = Lineage$inboundSchema; /** @deprecated use `Lineage$outboundSchema` instead. */ export const outboundSchema = Lineage$outboundSchema; /** @deprecated use `Lineage$Outbound` instead. */ export type Outbound = Lineage$Outbound; } /** @internal */ export const ExternalMetricDefinitionContractDtoOwner$inboundSchema: z.ZodType< ExternalMetricDefinitionContractDtoOwner, z.ZodTypeDef, unknown > = z.object({ name: z.string(), }); /** @internal */ export type ExternalMetricDefinitionContractDtoOwner$Outbound = { name: string; }; /** @internal */ export const ExternalMetricDefinitionContractDtoOwner$outboundSchema: z.ZodType< ExternalMetricDefinitionContractDtoOwner$Outbound, z.ZodTypeDef, ExternalMetricDefinitionContractDtoOwner > = z.object({ name: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDtoOwner$ { /** @deprecated use `ExternalMetricDefinitionContractDtoOwner$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDtoOwner$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoOwner$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDtoOwner$outboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDtoOwner$Outbound` instead. */ export type Outbound = ExternalMetricDefinitionContractDtoOwner$Outbound; } /** @internal */ export const ExternalMetricDefinitionContractDto$inboundSchema: z.ZodType< ExternalMetricDefinitionContractDto, z.ZodTypeDef, unknown > = z.object({ name: z.string(), type: ExternalMetricDefinitionContractDtoType$inboundSchema, isHidden: z.boolean().optional(), isVerified: z.boolean().optional(), isReadOnly: z.boolean().optional(), unitTypes: z.array(z.string()).optional(), metricEvents: z.array(z.lazy(() => MetricEvents$inboundSchema)).optional(), metricComponentMetrics: z.array(z.lazy(() => MetricComponentMetrics$inboundSchema)).optional(), description: z.string().optional(), directionality: Directionality$inboundSchema, tags: z.array(z.string()).optional(), isPermanent: z.boolean().optional(), rollupTimeWindow: z.string().optional(), customRollUpStart: z.number().optional(), customRollUpEnd: z.number().optional(), funnelEventList: z.array(z.lazy(() => FunnelEventList$inboundSchema)).optional(), funnelCountDistinct: FunnelCountDistinct$inboundSchema.optional(), warehouseNative: z.lazy(() => WarehouseNative$inboundSchema).optional(), team: z.nullable(z.any()).optional(), id: z.string(), lineage: z.lazy(() => Lineage$inboundSchema), creatorName: z.nullable(z.any()).optional(), creatorEmail: z.nullable(z.any()).optional(), createdTime: z.number().optional(), owner: z.lazy(() => ExternalMetricDefinitionContractDtoOwner$inboundSchema).optional(), }); /** @internal */ export type ExternalMetricDefinitionContractDto$Outbound = { name: string; type: string; isHidden?: boolean | undefined; isVerified?: boolean | undefined; isReadOnly?: boolean | undefined; unitTypes?: Array | undefined; metricEvents?: Array | undefined; metricComponentMetrics?: Array | undefined; description?: string | undefined; directionality: string; tags?: Array | undefined; isPermanent?: boolean | undefined; rollupTimeWindow?: string | undefined; customRollUpStart?: number | undefined; customRollUpEnd?: number | undefined; funnelEventList?: Array | undefined; funnelCountDistinct?: string | undefined; warehouseNative?: WarehouseNative$Outbound | undefined; team?: any | null | undefined; id: string; lineage: Lineage$Outbound; creatorName?: any | null | undefined; creatorEmail?: any | null | undefined; createdTime?: number | undefined; owner?: ExternalMetricDefinitionContractDtoOwner$Outbound | undefined; }; /** @internal */ export const ExternalMetricDefinitionContractDto$outboundSchema: z.ZodType< ExternalMetricDefinitionContractDto$Outbound, z.ZodTypeDef, ExternalMetricDefinitionContractDto > = z.object({ name: z.string(), type: ExternalMetricDefinitionContractDtoType$outboundSchema, isHidden: z.boolean().optional(), isVerified: z.boolean().optional(), isReadOnly: z.boolean().optional(), unitTypes: z.array(z.string()).optional(), metricEvents: z.array(z.lazy(() => MetricEvents$outboundSchema)).optional(), metricComponentMetrics: z.array(z.lazy(() => MetricComponentMetrics$outboundSchema)).optional(), description: z.string().optional(), directionality: Directionality$outboundSchema, tags: z.array(z.string()).optional(), isPermanent: z.boolean().optional(), rollupTimeWindow: z.string().optional(), customRollUpStart: z.number().optional(), customRollUpEnd: z.number().optional(), funnelEventList: z.array(z.lazy(() => FunnelEventList$outboundSchema)).optional(), funnelCountDistinct: FunnelCountDistinct$outboundSchema.optional(), warehouseNative: z.lazy(() => WarehouseNative$outboundSchema).optional(), team: z.nullable(z.any()).optional(), id: z.string(), lineage: z.lazy(() => Lineage$outboundSchema), creatorName: z.nullable(z.any()).optional(), creatorEmail: z.nullable(z.any()).optional(), createdTime: z.number().optional(), owner: z.lazy(() => ExternalMetricDefinitionContractDtoOwner$outboundSchema).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalMetricDefinitionContractDto$ { /** @deprecated use `ExternalMetricDefinitionContractDto$inboundSchema` instead. */ export const inboundSchema = ExternalMetricDefinitionContractDto$inboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDto$outboundSchema` instead. */ export const outboundSchema = ExternalMetricDefinitionContractDto$outboundSchema; /** @deprecated use `ExternalMetricDefinitionContractDto$Outbound` instead. */ export type Outbound = ExternalMetricDefinitionContractDto$Outbound; }