import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export type MetricSourceContractDtoIdTypeMapping = { /** * The identifier mapping for Statsig units. */ statsigUnitID: string; /** * The corresponding column name in the source that relates to the Statsig unit ID. */ column: string; }; /** * The type of source, indicating whether it is a database table or a custom query. */ export declare const MetricSourceContractDtoSourceType: { readonly Table: "table"; readonly Query: "query"; }; /** * The type of source, indicating whether it is a database table or a custom query. */ export type MetricSourceContractDtoSourceType = ClosedEnum; export type MetricSourceContractDtoCustomFieldMapping = { /** * The identifier for the custom field mapping. */ key: string; /** * The formula or expression used to compute the custom field value. */ formula: string; }; export type MetricSourceContractDto = { /** * The name of the metric source, serving as its primary identifier. */ name: string; /** * A detailed description of the metric source, providing context and usage information. */ description: string; /** * Optional tags for categorizing the metric source and improving searchability. */ tags?: Array | undefined; /** * The SQL query or statement used to extract data from the metric source. */ sql: string; /** * The name of the column containing timestamp data for the metric source. */ timestampColumn: string; /** * Indicates whether the timestamp should be treated as a day-level granularity. */ timestampAsDay?: boolean | undefined; /** * Array defining the mapping between Statsig unit IDs and their respective source columns. */ idTypeMapping: Array; /** * The type of source, indicating whether it is a database table or a custom query. */ sourceType?: MetricSourceContractDtoSourceType | undefined; /** * The name of the database table if the source type is "table". */ tableName?: string | undefined; /** * Optional array defining mappings for custom fields using specific formulas. */ customFieldMapping?: Array | undefined; }; /** @internal */ export declare const MetricSourceContractDtoIdTypeMapping$inboundSchema: z.ZodType; /** @internal */ export type MetricSourceContractDtoIdTypeMapping$Outbound = { statsigUnitID: string; column: string; }; /** @internal */ export declare const MetricSourceContractDtoIdTypeMapping$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace MetricSourceContractDtoIdTypeMapping$ { /** @deprecated use `MetricSourceContractDtoIdTypeMapping$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `MetricSourceContractDtoIdTypeMapping$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `MetricSourceContractDtoIdTypeMapping$Outbound` instead. */ type Outbound = MetricSourceContractDtoIdTypeMapping$Outbound; } /** @internal */ export declare const MetricSourceContractDtoSourceType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const MetricSourceContractDtoSourceType$outboundSchema: z.ZodNativeEnum; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace MetricSourceContractDtoSourceType$ { /** @deprecated use `MetricSourceContractDtoSourceType$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Table: "table"; readonly Query: "query"; }>; /** @deprecated use `MetricSourceContractDtoSourceType$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Table: "table"; readonly Query: "query"; }>; } /** @internal */ export declare const MetricSourceContractDtoCustomFieldMapping$inboundSchema: z.ZodType; /** @internal */ export type MetricSourceContractDtoCustomFieldMapping$Outbound = { key: string; formula: string; }; /** @internal */ export declare const MetricSourceContractDtoCustomFieldMapping$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace MetricSourceContractDtoCustomFieldMapping$ { /** @deprecated use `MetricSourceContractDtoCustomFieldMapping$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `MetricSourceContractDtoCustomFieldMapping$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `MetricSourceContractDtoCustomFieldMapping$Outbound` instead. */ type Outbound = MetricSourceContractDtoCustomFieldMapping$Outbound; } /** @internal */ export declare const MetricSourceContractDto$inboundSchema: z.ZodType; /** @internal */ export type MetricSourceContractDto$Outbound = { name: string; description: string; tags?: Array | undefined; sql: string; timestampColumn: string; timestampAsDay?: boolean | undefined; idTypeMapping: Array; sourceType?: string | undefined; tableName?: string | undefined; customFieldMapping?: Array | undefined; }; /** @internal */ export declare const MetricSourceContractDto$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace MetricSourceContractDto$ { /** @deprecated use `MetricSourceContractDto$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `MetricSourceContractDto$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `MetricSourceContractDto$Outbound` instead. */ type Outbound = MetricSourceContractDto$Outbound; } //# sourceMappingURL=metricsourcecontractdto.d.ts.map