import type { SourceConnectivity } from '../../components/PipelineForm/PipelineForm.types'; import type { UiDraftUpsertRequestSource } from './draft.types'; /** * Per-source-type configuration extracted from a draft source for use in * mapDraftToPipelineForm. Keeps the main transform function free of * scattered databaseType if-checks. */ export interface DraftSourceTypeMapping { /** Connectivity type resolved from the draft source fields. */ connectivityType: 'publicEndpoint' | 'awsPrivateLink'; /** * Whether a port field should be included in the configuration variant. * False for Snowflake (uses accountIdentifier/warehouse instead). */ includePort: boolean; /** Source-type-specific config fields to spread into the configuration variant. */ extraConfigFields: Record; } type DraftSource = UiDraftUpsertRequestSource & { databaseType?: string; }; /** * Returns the source-type-specific mapping config for use in mapDraftToPipelineForm. * Falls back to the default (SQL host/port) mapper for unknown source types. */ export declare function mapDraftSourceConfigByType(source: DraftSource | undefined): DraftSourceTypeMapping; export interface FormSourceTypeParams { connectivity: SourceConnectivity; activeVariant: Record | undefined; } /** Fields contributed by each source type to the draft UpsertRequest source. */ export type FormSourceTypeDraftFields = Partial>; /** * Returns the connectivity and source-type-specific fields to merge into the * draft UpsertRequest source in mapPipelineFormToDraft. * Falls back to the default (SQL host/port) mapper for unknown source types. */ export declare function mapFormSourceToDraftByType(sourceType: string | undefined, params: FormSourceTypeParams): FormSourceTypeDraftFields; export {};