import { entityKind } from "../../entity.cjs";
import { Query } from "../../sql/sql.cjs";
import { Logger } from "../../logger.cjs";
import { AnyRelations } from "../../relations.cjs";
import { WithCacheConfig } from "../../cache/core/types.cjs";
import { Cache } from "../../cache/core/cache.cjs";
import { PgDialect } from "../../pg-core/dialect.cjs";
import { PgQueryResultHKT, PgTransactionConfig, PreparedQueryConfig } from "../../pg-core/session.cjs";
import { PgAsyncPreparedQuery, PgAsyncSession, PgAsyncTransaction } from "../../pg-core/async/session.cjs";
import { ExecuteStatementCommandOutput, RDSDataClient } from "@aws-sdk/client-rds-data";

//#region src/aws-data-api/pg/session.d.ts
type AwsDataApiClient = RDSDataClient;
interface AwsDataApiSessionOptions {
  logger?: Logger;
  cache?: Cache;
  database: string;
  resourceArn: string;
  secretArn: string;
}
declare class AwsDataApiSession<TRelations extends AnyRelations> extends PgAsyncSession<AwsDataApiPgQueryResultHKT, TRelations> {
  private relations;
  private options;
  static readonly [entityKind]: string;
  private cache;
  private logger;
  constructor(/** @internal */

  client: AwsDataApiClient, dialect: PgDialect, relations: TRelations, options: AwsDataApiSessionOptions, /** @internal */

  transactionId: string | undefined);
  prepareQuery<T extends PreparedQueryConfig>(query: Query, mode: 'arrays' | 'objects' | 'raw', _name: string | boolean, mapper: ((rows: any[]) => any) | undefined, queryMetadata?: {
    type: 'select' | 'update' | 'delete' | 'insert';
    tables: string[];
  }, cacheConfig?: WithCacheConfig): PgAsyncPreparedQuery<T>;
  transaction<T>(transaction: (tx: AwsDataApiTransaction<TRelations>) => Promise<T>, config?: PgTransactionConfig | undefined): Promise<T>;
}
declare class AwsDataApiTransaction<TRelations extends AnyRelations> extends PgAsyncTransaction<AwsDataApiPgQueryResultHKT, TRelations> {
  static readonly [entityKind]: string;
  transaction<T>(transaction: (tx: AwsDataApiTransaction<TRelations>) => Promise<T>): Promise<T>;
}
type AwsDataApiPgQueryResult<T> = ExecuteStatementCommandOutput & {
  rows: T[];
};
interface AwsDataApiPgQueryResultHKT extends PgQueryResultHKT {
  type: AwsDataApiPgQueryResult<this['row']>;
}
//#endregion
export { AwsDataApiClient, AwsDataApiPgQueryResult, AwsDataApiPgQueryResultHKT, AwsDataApiSession, AwsDataApiSessionOptions, AwsDataApiTransaction };
//# sourceMappingURL=session.d.cts.map