-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom.d.ts
More file actions
34 lines (30 loc) · 868 Bytes
/
custom.d.ts
File metadata and controls
34 lines (30 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
declare module 'data-api-client' {
import type { ClientConfiguration } from 'aws-sdk/clients/rdsdataservice'
export interface DataApiClientParams {
secretArn: string
resourceArn: string
database?: string
keepAlive?: boolean
hydrateColumnNames?: boolean
sslEnabled?: boolean
options?: ClientConfiguration
region?: string
}
interface DataApiClientQuery {
<T = any>(sql: string, params?: unknown): Promise<DataApiClientResult<T>>
<T = any>(obj: {
sql: string
parameters: unknown
database?: string
hydrateColumnNames?: boolean
}): Promise<DataApiClientResult<T>>
}
interface DataApiClientResult<T> {
records: T
}
export interface DataApiClient {
query: DataApiClientQuery
// More methods to add
}
export default function (params: DataApiClientParams): DataApiClient
}