Skip to content

Commit ed9ca3d

Browse files
authored
Add missing api-input-output-type tests (#312)
1 parent 91045a8 commit ed9ca3d

10 files changed

+105
-4
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import AWS = require("aws-sdk");
2+
3+
const ddbClient = new AWS.DynamoDB({ region: "us-west-2" });
4+
const listTablesInput: AWS.DynamoDB.ListTablesInput = { Limit: 10 };
5+
const listTablesOutput: AWS.DynamoDB.ListTablesOutput = await ddbClient
6+
.listTables(listTablesInput)
7+
.promise();
8+
9+
const stsClient = new AWS.STS({ region: "us-west-2" });
10+
const getCallerIdentityInput: AWS.STS.GetCallerIdentityRequest = {};
11+
const getCallerIdentityOutput: AWS.STS.GetCallerIdentityResponse = await stsClient
12+
.getCallerIdentity(getCallerIdentityInput)
13+
.promise();
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import AWS_DynamoDB = require("@aws-sdk/client-dynamodb");
2+
3+
const {
4+
DynamoDB
5+
} = AWS_DynamoDB;
6+
7+
import AWS_STS = require("@aws-sdk/client-sts");
8+
9+
const {
10+
STS
11+
} = AWS_STS;
12+
13+
const ddbClient = new DynamoDB({ region: "us-west-2" });
14+
const listTablesInput: AWS_DynamoDB.ListTablesCommandInput = { Limit: 10 };
15+
const listTablesOutput: AWS_DynamoDB.ListTablesCommandOutput = await ddbClient
16+
.listTables(listTablesInput);
17+
18+
const stsClient = new STS({ region: "us-west-2" });
19+
const getCallerIdentityInput: AWS_STS.GetCallerIdentityCommandInput = {};
20+
const getCallerIdentityOutput: AWS_STS.GetCallerIdentityCommandOutput = await stsClient
21+
.getCallerIdentity(getCallerIdentityInput);
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import DynamoDB = require("aws-sdk/clients/dynamodb");
2+
import STS = require("aws-sdk/clients/sts");
3+
4+
const ddbClient = new DynamoDB({ region: "us-west-2" });
5+
const listTablesInput: DynamoDB.ListTablesInput = { Limit: 10 };
6+
const listTablesOutput: DynamoDB.ListTablesOutput = await ddbClient
7+
.listTables(listTablesInput)
8+
.promise();
9+
10+
const stsClient = new STS({ region: "us-west-2" });
11+
const getCallerIdentityInput: STS.GetCallerIdentityRequest = {};
12+
const getCallerIdentityOutput: STS.GetCallerIdentityResponse = await stsClient
13+
.getCallerIdentity(getCallerIdentityInput)
14+
.promise();
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import AWS_DynamoDB = require("@aws-sdk/client-dynamodb");
2+
3+
const {
4+
DynamoDB
5+
} = AWS_DynamoDB;
6+
7+
import AWS_STS = require("@aws-sdk/client-sts");
8+
9+
const {
10+
STS
11+
} = AWS_STS;
12+
13+
const ddbClient = new DynamoDB({ region: "us-west-2" });
14+
const listTablesInput: AWS_DynamoDB.ListTablesCommandInput = { Limit: 10 };
15+
const listTablesOutput: AWS_DynamoDB.ListTablesCommandOutput = await ddbClient
16+
.listTables(listTablesInput);
17+
18+
const stsClient = new STS({ region: "us-west-2" });
19+
const getCallerIdentityInput: AWS_STS.GetCallerIdentityCommandInput = {};
20+
const getCallerIdentityOutput: AWS_STS.GetCallerIdentityCommandOutput = await stsClient
21+
.getCallerIdentity(getCallerIdentityInput);

src/transforms/v2-to-v3/__fixtures__/api-input-output-type/service-import.input.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import DynamoDB from "aws-sdk/clients/dynamodb";
2-
import STS from "aws-sdk/clients/sts";
1+
import { DynamoDB } from "aws-sdk";
2+
import { STS } from "aws-sdk";
33

44
const ddbClient = new DynamoDB({ region: "us-west-2" });
55
const listTablesInput: DynamoDB.ListTablesInput = { Limit: 10 };
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const DynamoDB = require("aws-sdk/clients/dynamodb");
2+
const STS = require("aws-sdk/clients/sts");
3+
4+
const ddbClient = new DynamoDB({ region: "us-west-2" });
5+
const listTablesInput: DynamoDB.ListTablesInput = { Limit: 10 };
6+
const listTablesOutput: DynamoDB.ListTablesOutput = await ddbClient
7+
.listTables(listTablesInput)
8+
.promise();
9+
10+
const stsClient = new STS({ region: "us-west-2" });
11+
const getCallerIdentityInput: STS.GetCallerIdentityRequest = {};
12+
const getCallerIdentityOutput: STS.GetCallerIdentityResponse = await stsClient
13+
.getCallerIdentity(getCallerIdentityInput)
14+
.promise();
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const AWS_DynamoDB = require("@aws-sdk/client-dynamodb"),
2+
{
3+
DynamoDB
4+
} = AWS_DynamoDB;
5+
const AWS_STS = require("@aws-sdk/client-sts"),
6+
{
7+
STS
8+
} = AWS_STS;
9+
10+
const ddbClient = new DynamoDB({ region: "us-west-2" });
11+
const listTablesInput: AWS_DynamoDB.ListTablesCommandInput = { Limit: 10 };
12+
const listTablesOutput: AWS_DynamoDB.ListTablesCommandOutput = await ddbClient
13+
.listTables(listTablesInput);
14+
15+
const stsClient = new STS({ region: "us-west-2" });
16+
const getCallerIdentityInput: AWS_STS.GetCallerIdentityCommandInput = {};
17+
const getCallerIdentityOutput: AWS_STS.GetCallerIdentityCommandOutput = await stsClient
18+
.getCallerIdentity(getCallerIdentityInput);

src/transforms/v2-to-v3/__fixtures__/api-input-output-type/service-require.input.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const DynamoDB = require("aws-sdk/clients/dynamodb");
2-
const STS = require("aws-sdk/clients/sts");
1+
const { DynamoDB } = require("aws-sdk");
2+
const { STS } = require("aws-sdk");
33

44
const ddbClient = new DynamoDB({ region: "us-west-2" });
55
const listTablesInput: DynamoDB.ListTablesInput = { Limit: 10 };

0 commit comments

Comments
 (0)