@aws-lite/rds-data-types 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +55 -0
- package/package.json +13 -0
- package/readme.md +46 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import {
|
|
2
|
+
/* ! Do not remove IMPORTS_START / IMPORTS_END ! */
|
|
3
|
+
// $IMPORTS_START
|
|
4
|
+
BatchExecuteStatementCommandOutput as BatchExecuteStatementResponse,
|
|
5
|
+
BeginTransactionCommandOutput as BeginTransactionResponse,
|
|
6
|
+
CommitTransactionCommandOutput as CommitTransactionResponse,
|
|
7
|
+
ExecuteStatementCommandOutput as ExecuteStatementResponse,
|
|
8
|
+
RollbackTransactionCommandOutput as RollbackTransactionResponse,
|
|
9
|
+
ExecuteSqlCommandOutput as ExecuteSqlResponse,
|
|
10
|
+
// $IMPORTS_END
|
|
11
|
+
} from "@aws-sdk/client-rds-data";
|
|
12
|
+
|
|
13
|
+
declare interface AwsLiteRDSData {
|
|
14
|
+
/* ! Do not remove METHODS_START / METHODS_END ! */
|
|
15
|
+
// $METHODS_START
|
|
16
|
+
/**
|
|
17
|
+
* @description
|
|
18
|
+
* - AWS docs: {@link https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_BatchExecuteStatement.html RDS Data Service: BatchExecuteStatement}
|
|
19
|
+
* - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/rds-data/readme.md#BatchExecuteStatement RDS Data Service: BatchExecuteStatement}
|
|
20
|
+
*/
|
|
21
|
+
BatchExecuteStatement: (input: { database?: string, parameterSets?: any[], resourceArn: string, schema?: string, secretArn: string, sql: string, transactionId?: string }) => Promise<BatchExecuteStatementResponse>
|
|
22
|
+
/**
|
|
23
|
+
* @description
|
|
24
|
+
* - AWS docs: {@link https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_BeginTransaction.html RDS Data Service: BeginTransaction}
|
|
25
|
+
* - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/rds-data/readme.md#BeginTransaction RDS Data Service: BeginTransaction}
|
|
26
|
+
*/
|
|
27
|
+
BeginTransaction: (input: { database?: string, resourceArn: string, schema?: string, secretArn: string }) => Promise<BeginTransactionResponse>
|
|
28
|
+
/**
|
|
29
|
+
* @description
|
|
30
|
+
* - AWS docs: {@link https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_CommitTransaction.html RDS Data Service: CommitTransaction}
|
|
31
|
+
* - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/rds-data/readme.md#CommitTransaction RDS Data Service: CommitTransaction}
|
|
32
|
+
*/
|
|
33
|
+
CommitTransaction: (input: { resourceArn: string, secretArn: string, transactionId: string }) => Promise<CommitTransactionResponse>
|
|
34
|
+
/**
|
|
35
|
+
* @description
|
|
36
|
+
* - AWS docs: {@link https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ExecuteStatement.html RDS Data Service: ExecuteStatement}
|
|
37
|
+
* - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/rds-data/readme.md#ExecuteStatement RDS Data Service: ExecuteStatement}
|
|
38
|
+
*/
|
|
39
|
+
ExecuteStatement: (input: { continueAfterTimeout?: boolean, database?: string, formatRecordsAs?: string, includeResultMetadata?: boolean, parameters?: any[], resourceArn: string, resultSetOptions?: Record<string, any>, schema?: string, secretArn: string, sql: string, transactionId?: string }) => Promise<ExecuteStatementResponse>
|
|
40
|
+
/**
|
|
41
|
+
* @description
|
|
42
|
+
* - AWS docs: {@link https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_RollbackTransaction.html RDS Data Service: RollbackTransaction}
|
|
43
|
+
* - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/rds-data/readme.md#RollbackTransaction RDS Data Service: RollbackTransaction}
|
|
44
|
+
*/
|
|
45
|
+
RollbackTransaction: (input: { resourceArn: string, secretArn: string, transactionId: string }) => Promise<RollbackTransactionResponse>
|
|
46
|
+
/** @description aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/rds-data/readme.md#ExecuteSql RDS Data Service: ExecuteSql} */
|
|
47
|
+
ExecuteSql: () => Promise<ExecuteSqlResponse>
|
|
48
|
+
// $METHODS_END
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare module "@aws-lite/client" {
|
|
52
|
+
interface AwsLiteClient {
|
|
53
|
+
RDSData: AwsLiteRDSData;
|
|
54
|
+
}
|
|
55
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aws-lite/rds-data-types",
|
|
3
|
+
"description": "Type definitions for the @aws-lite/rds-data plugin",
|
|
4
|
+
"version": "0.0.2",
|
|
5
|
+
"main": "",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"index.d.ts"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@aws-sdk/client-rds-data": "3"
|
|
12
|
+
}
|
|
13
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
## Install
|
|
2
|
+
|
|
3
|
+
Add to `devDependencies` in `package.json`:
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
npm i -D @aws-lite/rds-data-types
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
<small>Be sure you also have `@aws-lite/rds-data` installed.</small>
|
|
10
|
+
|
|
11
|
+
## Usage and Config
|
|
12
|
+
|
|
13
|
+
### Javascript VSCode Intellisense
|
|
14
|
+
|
|
15
|
+
In a Javascript project, the ambient types will be automatically loaded.
|
|
16
|
+
|
|
17
|
+
### TypeScript `tsconfig`
|
|
18
|
+
|
|
19
|
+
#### Add this package to `compilerOptions.types`
|
|
20
|
+
|
|
21
|
+
Example:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"extends": "@tsconfig/node-lts/tsconfig.json",
|
|
26
|
+
"compilerOptions": {
|
|
27
|
+
"types": [
|
|
28
|
+
"@aws-lite/rds-data-types"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
#### Or use reference types
|
|
35
|
+
|
|
36
|
+
Either in individual files or in an `index.d.ts` file.
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
/// <reference types="@aws-lite/rds-data-types" />
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
ymmv
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
/// <reference path="./node_modules/@aws-lite/rds-data-types/index.d.ts" />
|
|
46
|
+
```
|