import { z } from 'zod';
import { DatabricksAuthenticationType, RedshiftAuthenticationType, SnowflakeAuthenticationType, WarehouseTypes, type CreateAthenaCredentials, type CreateBigqueryCredentials, type CreateClickhouseCredentials, type CreateDatabricksCredentials, type CreateDuckdbCredentials, type CreateDuckdbMotherduckCredentials, type CreatePostgresCredentials, type CreateRedshiftCredentials, type CreateSnowflakeCredentials, type CreateTrinoCredentials, type ProjectType } from './projects';
export type UserWarehouseCredentialsProject = {
    projectUuid: string;
    name: string;
    type: ProjectType;
};
export type UserWarehouseCredentials = {
    uuid: string;
    userUuid: string;
    name: string;
    createdAt: Date;
    updatedAt: Date;
    credentials: Pick<CreateRedshiftCredentials, 'type' | 'user' | 'authenticationType' | 'assumeRoleArn'> | Pick<CreatePostgresCredentials | CreateSnowflakeCredentials | CreateTrinoCredentials | CreateClickhouseCredentials, 'type' | 'user'> | Pick<CreateBigqueryCredentials, 'type'> | Pick<CreateDatabricksCredentials, 'type'> | Pick<CreateAthenaCredentials, 'type'> | Pick<CreateDuckdbCredentials, 'type'>;
    project: UserWarehouseCredentialsProject | null;
};
export type UserWarehouseCredentialsWithSecrets = Pick<UserWarehouseCredentials, 'uuid'> & {
    credentials: Pick<CreateRedshiftCredentials, 'type' | 'user' | 'password'> | Pick<CreateRedshiftCredentials, 'type' | 'user' | 'authenticationType' | 'accessKeyId' | 'secretAccessKey' | 'sessionToken' | 'assumeRoleArn' | 'assumeRoleExternalId'> | Pick<CreatePostgresCredentials, 'type' | 'user' | 'password'> | Pick<CreateSnowflakeCredentials, 'type' | 'user' | 'password' | 'authenticationType' | 'refreshToken'> | Pick<CreateTrinoCredentials, 'type' | 'user' | 'password'> | Pick<CreateClickhouseCredentials, 'type' | 'user' | 'password'> | Pick<CreateBigqueryCredentials, 'type' | 'keyfileContents' | 'authenticationType'> | (Pick<CreateDatabricksCredentials, 'type' | 'personalAccessToken' | 'authenticationType' | 'refreshToken'> & Partial<Pick<CreateDatabricksCredentials, 'database' | 'serverHostName' | 'httpPath' | 'oauthClientId'>>) | Pick<CreateAthenaCredentials, 'type' | 'accessKeyId' | 'secretAccessKey'> | Pick<CreateDuckdbMotherduckCredentials, 'type' | 'token'>;
};
export type UpsertUserWarehouseCredentials = {
    name: string;
    credentials: UserWarehouseCredentialsWithSecrets['credentials'];
};
export type RedshiftAwsSsoStartRequest = {
    projectUuid?: string;
    startUrl?: string;
    region?: string;
};
export type RedshiftAwsSsoStartResults = {
    verificationUri: string;
    verificationUriComplete: string;
    userCode: string;
    expiresIn: number;
    interval: number;
};
export type RedshiftAwsSsoStartResponse = {
    status: 'ok';
    results: RedshiftAwsSsoStartResults;
};
export type RedshiftAwsSsoCompleteRequest = {
    accountId?: string;
    roleName?: string;
    projectUuid?: string;
    projectName?: string;
    credentialsName?: string;
    databaseUser?: string;
};
export type RedshiftAwsSsoCompleteResults = {
    status: 'pending';
} | {
    status: 'authenticated';
    credentials: UserWarehouseCredentials;
};
export type RedshiftAwsSsoCompleteResponse = {
    status: 'ok';
    results: RedshiftAwsSsoCompleteResults;
};
export declare const snowflakeSsoUserCredentialsSchema: z.ZodObject<{
    type: z.ZodLiteral<WarehouseTypes.SNOWFLAKE>;
    user: z.ZodOptional<z.ZodString>;
    password: z.ZodOptional<z.ZodString>;
    authenticationType: z.ZodLiteral<SnowflakeAuthenticationType.SSO>;
    refreshToken: z.ZodString;
}, "strict", z.ZodTypeAny, {
    type: WarehouseTypes.SNOWFLAKE;
    refreshToken: string;
    authenticationType: SnowflakeAuthenticationType.SSO;
    user?: string | undefined;
    password?: string | undefined;
}, {
    type: WarehouseTypes.SNOWFLAKE;
    refreshToken: string;
    authenticationType: SnowflakeAuthenticationType.SSO;
    user?: string | undefined;
    password?: string | undefined;
}>;
export declare const databricksOauthU2mUserCredentialsSchema: z.ZodObject<{
    type: z.ZodLiteral<WarehouseTypes.DATABRICKS>;
    authenticationType: z.ZodLiteral<DatabricksAuthenticationType.OAUTH_U2M>;
    refreshToken: z.ZodString;
    oauthClientId: z.ZodOptional<z.ZodString>;
    personalAccessToken: z.ZodOptional<z.ZodString>;
    database: z.ZodOptional<z.ZodString>;
    serverHostName: z.ZodOptional<z.ZodString>;
    httpPath: z.ZodOptional<z.ZodString>;
}, "strict", z.ZodTypeAny, {
    type: WarehouseTypes.DATABRICKS;
    refreshToken: string;
    authenticationType: DatabricksAuthenticationType.OAUTH_U2M;
    database?: string | undefined;
    personalAccessToken?: string | undefined;
    oauthClientId?: string | undefined;
    serverHostName?: string | undefined;
    httpPath?: string | undefined;
}, {
    type: WarehouseTypes.DATABRICKS;
    refreshToken: string;
    authenticationType: DatabricksAuthenticationType.OAUTH_U2M;
    database?: string | undefined;
    personalAccessToken?: string | undefined;
    oauthClientId?: string | undefined;
    serverHostName?: string | undefined;
    httpPath?: string | undefined;
}>;
export declare const bigquerySsoUserCredentialsSchema: z.ZodObject<{
    type: z.ZodLiteral<WarehouseTypes.BIGQUERY>;
    keyfileContents: z.ZodObject<{
        refresh_token: z.ZodString;
    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
        refresh_token: z.ZodString;
    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
        refresh_token: z.ZodString;
    }, z.ZodTypeAny, "passthrough">>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
    type: z.ZodLiteral<WarehouseTypes.BIGQUERY>;
    keyfileContents: z.ZodObject<{
        refresh_token: z.ZodString;
    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
        refresh_token: z.ZodString;
    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
        refresh_token: z.ZodString;
    }, z.ZodTypeAny, "passthrough">>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
    type: z.ZodLiteral<WarehouseTypes.BIGQUERY>;
    keyfileContents: z.ZodObject<{
        refresh_token: z.ZodString;
    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
        refresh_token: z.ZodString;
    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
        refresh_token: z.ZodString;
    }, z.ZodTypeAny, "passthrough">>;
}, z.ZodTypeAny, "passthrough">>;
export declare const redshiftIamUserCredentialsSchema: z.ZodEffects<z.ZodObject<{
    type: z.ZodLiteral<WarehouseTypes.REDSHIFT>;
    authenticationType: z.ZodUnion<[z.ZodLiteral<RedshiftAuthenticationType.IAM>, z.ZodLiteral<RedshiftAuthenticationType.IAM_BROWSER>]>;
    user: z.ZodOptional<z.ZodString>;
    password: z.ZodOptional<z.ZodString>;
    accessKeyId: z.ZodOptional<z.ZodString>;
    secretAccessKey: z.ZodOptional<z.ZodString>;
    sessionToken: z.ZodOptional<z.ZodString>;
    assumeRoleArn: z.ZodOptional<z.ZodString>;
    assumeRoleExternalId: z.ZodOptional<z.ZodString>;
}, "strict", z.ZodTypeAny, {
    type: WarehouseTypes.REDSHIFT;
    authenticationType: RedshiftAuthenticationType.IAM | RedshiftAuthenticationType.IAM_BROWSER;
    user?: string | undefined;
    password?: string | undefined;
    accessKeyId?: string | undefined;
    secretAccessKey?: string | undefined;
    sessionToken?: string | undefined;
    assumeRoleArn?: string | undefined;
    assumeRoleExternalId?: string | undefined;
}, {
    type: WarehouseTypes.REDSHIFT;
    authenticationType: RedshiftAuthenticationType.IAM | RedshiftAuthenticationType.IAM_BROWSER;
    user?: string | undefined;
    password?: string | undefined;
    accessKeyId?: string | undefined;
    secretAccessKey?: string | undefined;
    sessionToken?: string | undefined;
    assumeRoleArn?: string | undefined;
    assumeRoleExternalId?: string | undefined;
}>, {
    type: WarehouseTypes.REDSHIFT;
    authenticationType: RedshiftAuthenticationType.IAM | RedshiftAuthenticationType.IAM_BROWSER;
    user?: string | undefined;
    password?: string | undefined;
    accessKeyId?: string | undefined;
    secretAccessKey?: string | undefined;
    sessionToken?: string | undefined;
    assumeRoleArn?: string | undefined;
    assumeRoleExternalId?: string | undefined;
}, {
    type: WarehouseTypes.REDSHIFT;
    authenticationType: RedshiftAuthenticationType.IAM | RedshiftAuthenticationType.IAM_BROWSER;
    user?: string | undefined;
    password?: string | undefined;
    accessKeyId?: string | undefined;
    secretAccessKey?: string | undefined;
    sessionToken?: string | undefined;
    assumeRoleArn?: string | undefined;
    assumeRoleExternalId?: string | undefined;
}>;
//# sourceMappingURL=userWarehouseCredentials.d.ts.map