@aws/aurora-dsql-postgresjs-connector
Version:
An AWS Aurora DSQL connector with IAM authentication for Postgres.js
21 lines • 1.17 kB
TypeScript
import postgres, { PostgresType } from "postgres";
import { AwsCredentialIdentity, AwsCredentialIdentityProvider } from "@aws-sdk/types";
export declare function auroraDSQLPostgres<T extends Record<string, postgres.PostgresType> = {}>(url: string, options?: AuroraDSQLConfig<T>): postgres.Sql<Record<string, postgres.PostgresType> extends T ? {} : {
[type in keyof T]: T[type] extends {
serialize: (value: infer R) => any;
parse: (raw: any) => infer R;
} ? R : never;
}>;
export declare function auroraDSQLPostgres<T extends Record<string, postgres.PostgresType> = {}>(options: AuroraDSQLConfig<T>): postgres.Sql<Record<string, postgres.PostgresType> extends T ? {} : {
[type in keyof T]: T[type] extends {
serialize: (value: infer R) => any;
parse: (raw: any) => infer R;
} ? R : never;
}>;
export interface AuroraDSQLConfig<T extends Record<string, PostgresType<T>>> extends Omit<postgres.Options<T>, 'password' | 'pass'> {
region?: string;
profile?: string;
tokenDurationSecs?: number;
customCredentialsProvider?: AwsCredentialIdentity | AwsCredentialIdentityProvider;
}
//# sourceMappingURL=client.d.ts.map