import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export type MetricSourceCreationContractDtoIdTypeMapping = { /** * 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 SourceType: { readonly Table: "table"; readonly Query: "query"; }; /** * The type of source, indicating whether it is a database table or a custom query. */ export type SourceType = ClosedEnum; export type CustomFieldMapping = { /** * The identifier for the custom field mapping. */ key: string; /** * The formula or expression used to compute the custom field value. */ formula: string; }; export type MetricSourceCreationContractDto = { /** * The name of the metric source, serving as its primary identifier. */ name: string; /** * An optional description for the metric source, providing context and details about its purpose and usage. */ description?: string | undefined; /** * Optional array of tags to categorize the metric source, facilitating easier organization and retrieval. */ 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?: SourceType | 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 MetricSourceCreationContractDtoIdTypeMapping$inboundSchema: z.ZodType; /** @internal */ export type MetricSourceCreationContractDtoIdTypeMapping$Outbound = { statsigUnitID: string; column: string; }; /** @internal */ export declare const MetricSourceCreationContractDtoIdTypeMapping$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 MetricSourceCreationContractDtoIdTypeMapping$ { /** @deprecated use `MetricSourceCreationContractDtoIdTypeMapping$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `MetricSourceCreationContractDtoIdTypeMapping$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `MetricSourceCreationContractDtoIdTypeMapping$Outbound` instead. */ type Outbound = MetricSourceCreationContractDtoIdTypeMapping$Outbound; } /** @internal */ export declare const SourceType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const SourceType$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 SourceType$ { /** @deprecated use `SourceType$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Table: "table"; readonly Query: "query"; }>; /** @deprecated use `SourceType$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Table: "table"; readonly Query: "query"; }>; } /** @internal */ export declare const CustomFieldMapping$inboundSchema: z.ZodType; /** @internal */ export type CustomFieldMapping$Outbound = { key: string; formula: string; }; /** @internal */ export declare const CustomFieldMapping$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 CustomFieldMapping$ { /** @deprecated use `CustomFieldMapping$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `CustomFieldMapping$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `CustomFieldMapping$Outbound` instead. */ type Outbound = CustomFieldMapping$Outbound; } /** @internal */ export declare const MetricSourceCreationContractDto$inboundSchema: z.ZodType; /** @internal */ export type MetricSourceCreationContractDto$Outbound = { name: string; description?: string | undefined; 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 MetricSourceCreationContractDto$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 MetricSourceCreationContractDto$ { /** @deprecated use `MetricSourceCreationContractDto$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `MetricSourceCreationContractDto$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `MetricSourceCreationContractDto$Outbound` instead. */ type Outbound = MetricSourceCreationContractDto$Outbound; } //# sourceMappingURL=metricsourcecreationcontractdto.d.ts.map