diff --git a/src/transforms/v2-to-v3/__fixtures__/api-basic-type/global-require.input.ts b/src/transforms/v2-to-v3/__fixtures__/api-basic-type/global-require.input.ts deleted file mode 100644 index e314034b0..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-basic-type/global-require.input.ts +++ /dev/null @@ -1,3 +0,0 @@ -const AWS = require("aws-sdk"); - -const testTags: typeof AWS.S3.Tag[] = [{ Key: "key", Value: "value" }]; \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-basic-type/global-require.output.ts b/src/transforms/v2-to-v3/__fixtures__/api-basic-type/global-require.output.ts deleted file mode 100644 index 90422ddab..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-basic-type/global-require.output.ts +++ /dev/null @@ -1,3 +0,0 @@ -const AWS_S3 = require("@aws-sdk/client-s3"); - -const testTags: typeof AWS_S3.Tag[] = [{ Key: "key", Value: "value" }]; \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-basic-type/service-require-deep.input.ts b/src/transforms/v2-to-v3/__fixtures__/api-basic-type/service-require-deep.input.ts deleted file mode 100644 index 522077a6c..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-basic-type/service-require-deep.input.ts +++ /dev/null @@ -1,3 +0,0 @@ -const S3 = require("aws-sdk/clients/s3"); - -const testTags: typeof S3.Tag[] = [{ Key: "key", Value: "value" }]; \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-basic-type/service-require-deep.output.ts b/src/transforms/v2-to-v3/__fixtures__/api-basic-type/service-require-deep.output.ts deleted file mode 100644 index 90422ddab..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-basic-type/service-require-deep.output.ts +++ /dev/null @@ -1,3 +0,0 @@ -const AWS_S3 = require("@aws-sdk/client-s3"); - -const testTags: typeof AWS_S3.Tag[] = [{ Key: "key", Value: "value" }]; \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-basic-type/service-require.input.ts b/src/transforms/v2-to-v3/__fixtures__/api-basic-type/service-require.input.ts deleted file mode 100644 index 765bd1928..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-basic-type/service-require.input.ts +++ /dev/null @@ -1,3 +0,0 @@ -const { S3 } = require("aws-sdk"); - -const testTags: typeof S3.Tag[] = [{ Key: "key", Value: "value" }]; \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-basic-type/service-require.output.ts b/src/transforms/v2-to-v3/__fixtures__/api-basic-type/service-require.output.ts deleted file mode 100644 index 90422ddab..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-basic-type/service-require.output.ts +++ /dev/null @@ -1,3 +0,0 @@ -const AWS_S3 = require("@aws-sdk/client-s3"); - -const testTags: typeof AWS_S3.Tag[] = [{ Key: "key", Value: "value" }]; \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/global-require.input.ts b/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/global-require.input.ts deleted file mode 100644 index ad143e917..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/global-require.input.ts +++ /dev/null @@ -1,20 +0,0 @@ -const AWS = require("aws-sdk"); - -const ddbClient = new AWS.DynamoDB({ region: "us-west-2" }); -const listTablesInput: typeof AWS.DynamoDB.ListTablesInput = { Limit: 10 }; -const listTablesOutput: typeof AWS.DynamoDB.ListTablesOutput = await ddbClient - .listTables(listTablesInput) - .promise(); - -const stsClient = new AWS.STS({ region: "us-west-2" }); -const getCallerIdentityInput: typeof AWS.STS.GetCallerIdentityRequest = {}; -const getCallerIdentityOutput: typeof AWS.STS.GetCallerIdentityResponse = await stsClient - .getCallerIdentity(getCallerIdentityInput) - .promise(); - -const lambdaClient = new AWS.Lambda({ region: "us-west-2" }); -const invokeInput: typeof AWS.Lambda.InvocationRequest = { FunctionName: "my-function" }; -const invokeOutput: typeof AWS.Lambda.InvocationResponse = await lambdaClient - .invoke(invokeInput) - .promise(); - \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/global-require.output.ts b/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/global-require.output.ts deleted file mode 100644 index 746b4182a..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/global-require.output.ts +++ /dev/null @@ -1,27 +0,0 @@ -const AWS_DynamoDB = require("@aws-sdk/client-dynamodb"), - { - DynamoDB - } = AWS_DynamoDB, - AWS_Lambda = require("@aws-sdk/client-lambda"), - { - Lambda - } = AWS_Lambda, - AWS_STS = require("@aws-sdk/client-sts"), - { - STS - } = AWS_STS; - -const ddbClient = new DynamoDB({ region: "us-west-2" }); -const listTablesInput: typeof AWS_DynamoDB.ListTablesCommandInput = { Limit: 10 }; -const listTablesOutput: typeof AWS_DynamoDB.ListTablesCommandOutput = await ddbClient - .listTables(listTablesInput); - -const stsClient = new STS({ region: "us-west-2" }); -const getCallerIdentityInput: typeof AWS_STS.GetCallerIdentityCommandInput = {}; -const getCallerIdentityOutput: typeof AWS_STS.GetCallerIdentityCommandOutput = await stsClient - .getCallerIdentity(getCallerIdentityInput); - -const lambdaClient = new Lambda({ region: "us-west-2" }); -const invokeInput: typeof AWS_Lambda.InvokeCommandInput = { FunctionName: "my-function" }; -const invokeOutput: typeof AWS_Lambda.InvokeCommandOutput = await lambdaClient - .invoke(invokeInput); \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/service-require-deep.input.ts b/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/service-require-deep.input.ts deleted file mode 100644 index 9c978f691..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/service-require-deep.input.ts +++ /dev/null @@ -1,21 +0,0 @@ -const DynamoDB = require("aws-sdk/clients/dynamodb"); -const Lambda = require("aws-sdk/clients/lambda"); -const STS = require("aws-sdk/clients/sts"); - -const ddbClient = new DynamoDB({ region: "us-west-2" }); -const listTablesInput: typeof DynamoDB.ListTablesInput = { Limit: 10 }; -const listTablesOutput: typeof DynamoDB.ListTablesOutput = await ddbClient - .listTables(listTablesInput) - .promise(); - -const stsClient = new STS({ region: "us-west-2" }); -const getCallerIdentityInput: typeof STS.GetCallerIdentityRequest = {}; -const getCallerIdentityOutput: typeof STS.GetCallerIdentityResponse = await stsClient - .getCallerIdentity(getCallerIdentityInput) - .promise(); - -const lambdaClient = new Lambda({ region: "us-west-2" }); -const invokeInput: typeof Lambda.InvocationRequest = { FunctionName: "my-function" }; -const invokeOutput: typeof Lambda.InvocationResponse = await lambdaClient - .invoke(invokeInput) - .promise(); \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/service-require-deep.output.ts b/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/service-require-deep.output.ts deleted file mode 100644 index 274b3a204..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/service-require-deep.output.ts +++ /dev/null @@ -1,27 +0,0 @@ -const AWS_DynamoDB = require("@aws-sdk/client-dynamodb"), - { - DynamoDB - } = AWS_DynamoDB; -const AWS_Lambda = require("@aws-sdk/client-lambda"), - { - Lambda - } = AWS_Lambda; -const AWS_STS = require("@aws-sdk/client-sts"), - { - STS - } = AWS_STS; - -const ddbClient = new DynamoDB({ region: "us-west-2" }); -const listTablesInput: typeof AWS_DynamoDB.ListTablesCommandInput = { Limit: 10 }; -const listTablesOutput: typeof AWS_DynamoDB.ListTablesCommandOutput = await ddbClient - .listTables(listTablesInput); - -const stsClient = new STS({ region: "us-west-2" }); -const getCallerIdentityInput: typeof AWS_STS.GetCallerIdentityCommandInput = {}; -const getCallerIdentityOutput: typeof AWS_STS.GetCallerIdentityCommandOutput = await stsClient - .getCallerIdentity(getCallerIdentityInput); - -const lambdaClient = new Lambda({ region: "us-west-2" }); -const invokeInput: typeof AWS_Lambda.InvokeCommandInput = { FunctionName: "my-function" }; -const invokeOutput: typeof AWS_Lambda.InvokeCommandOutput = await lambdaClient - .invoke(invokeInput); \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/service-require.input.ts b/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/service-require.input.ts deleted file mode 100644 index 0329a243b..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/service-require.input.ts +++ /dev/null @@ -1,19 +0,0 @@ -const { DynamoDB, Lambda, STS } = require("aws-sdk"); - -const ddbClient = new DynamoDB({ region: "us-west-2" }); -const listTablesInput: typeof DynamoDB.ListTablesInput = { Limit: 10 }; -const listTablesOutput: typeof DynamoDB.ListTablesOutput = await ddbClient - .listTables(listTablesInput) - .promise(); - -const stsClient = new STS({ region: "us-west-2" }); -const getCallerIdentityInput: typeof STS.GetCallerIdentityRequest = {}; -const getCallerIdentityOutput: typeof STS.GetCallerIdentityResponse = await stsClient - .getCallerIdentity(getCallerIdentityInput) - .promise(); - -const lambdaClient = new Lambda({ region: "us-west-2" }); -const invokeInput: typeof Lambda.InvocationRequest = { FunctionName: "my-function" }; -const invokeOutput: typeof Lambda.InvocationResponse = await lambdaClient - .invoke(invokeInput) - .promise(); \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/service-require.output.ts b/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/service-require.output.ts deleted file mode 100644 index 746b4182a..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-input-output-type/service-require.output.ts +++ /dev/null @@ -1,27 +0,0 @@ -const AWS_DynamoDB = require("@aws-sdk/client-dynamodb"), - { - DynamoDB - } = AWS_DynamoDB, - AWS_Lambda = require("@aws-sdk/client-lambda"), - { - Lambda - } = AWS_Lambda, - AWS_STS = require("@aws-sdk/client-sts"), - { - STS - } = AWS_STS; - -const ddbClient = new DynamoDB({ region: "us-west-2" }); -const listTablesInput: typeof AWS_DynamoDB.ListTablesCommandInput = { Limit: 10 }; -const listTablesOutput: typeof AWS_DynamoDB.ListTablesCommandOutput = await ddbClient - .listTables(listTablesInput); - -const stsClient = new STS({ region: "us-west-2" }); -const getCallerIdentityInput: typeof AWS_STS.GetCallerIdentityCommandInput = {}; -const getCallerIdentityOutput: typeof AWS_STS.GetCallerIdentityCommandOutput = await stsClient - .getCallerIdentity(getCallerIdentityInput); - -const lambdaClient = new Lambda({ region: "us-west-2" }); -const invokeInput: typeof AWS_Lambda.InvokeCommandInput = { FunctionName: "my-function" }; -const invokeOutput: typeof AWS_Lambda.InvokeCommandOutput = await lambdaClient - .invoke(invokeInput); \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/global-require.input.ts b/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/global-require.input.ts deleted file mode 100644 index e474d81cd..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/global-require.input.ts +++ /dev/null @@ -1,46 +0,0 @@ -const AWS = require("aws-sdk"); - -// Native types -const stringType: typeof AWS.S3.AccountId = "string"; -const booleanType: typeof AWS.S3.BucketKeyEnabled = true; -const numberType: typeof AWS.S3.ContentLength = 123; - -// Date -const dateType: typeof AWS.S3.CreationDate = new Date(); - -// Uint8Array -const blobType: typeof AWS.RDSDataService._Blob = new Uint8Array(); - -// Arrays -const stringArray: typeof AWS.S3.AllowedHeaders = ["string1", "string2"]; -const booleanArray: typeof AWS.RDSDataService.BooleanArray = [true, false]; -const numberArray: typeof AWS.RDSDataService.LongArray = [123, 456]; -const blobArray: typeof AWS.IoTFleetWise.NetworkFilesList = [new Uint8Array()]; -const enumArray: typeof AWS.S3.ChecksumAlgorithmList = ["CRC32"]; -const structureArray: typeof AWS.S3.Buckets = [{ Name: "bucketName" }]; - -// Maps -const stringMap: typeof AWS.S3.Metadata = { key: "value" }; -const booleanMap: typeof AWS.APIGateway.MapOfStringToBoolean = { key: true }; -const numberMap: typeof AWS.SSM.AssociationStatusAggregatedCount = { key: 123 }; -const structureMap: typeof AWS.APIGateway.MapOfMethodSnapshot = { key: { apiKeyRequired: true } }; - -// Nested arrays -const arrayNestedTwice: typeof AWS.SageMakerGeospatial.LinearRing = [[1, 2], [3, 4]]; -const arrayNestedThrice: typeof AWS.SageMakerGeospatial.LinearRings = [[[1, 2], [3, 4]], [[4, 5], [6, 7]]]; -const arrayNestedFour: typeof AWS.SageMakerGeospatial.LinearRingsList = [ - [[[1], [2]], [[3], [4]]], - [[[5], [6]], [[7], [8]]] -]; - -// Nested maps -const mapNestedTwice: typeof AWS.LexModelsV2.ConditionMap = { key: stringMap }; -const mapNestedTwiceStruct: typeof AWS.APIGateway.PathToMapOfMethodSnapshot = { key: structureMap }; - -// Nested arrays and maps -const mapOfArrays: typeof AWS.NetworkManager.FilterMap = { key: ["value"] }; -const mapOfMapOfArrays: typeof AWS.AppIntegrations.ObjectConfiguration = { key: mapOfArrays }; -const mapOfArrayOfMaps: typeof AWS.DynamoDB.BatchGetResponseMap = { key: [{ key: { S:"A" }}] }; -const mapOfArrayOfArrays: typeof AWS.APIGateway.MapOfKeyUsages = { key: [[1], [2]] }; -const arrayOfMaps: typeof AWS.SSM.InventoryItemEntryList = [stringMap]; -const arrayOfMapOfArrays: typeof AWS.SSM.TargetMaps = [mapOfArrays]; \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/global-require.output.ts b/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/global-require.output.ts deleted file mode 100644 index 06787c75d..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/global-require.output.ts +++ /dev/null @@ -1,46 +0,0 @@ -const AWS_APIGateway = require("@aws-sdk/client-api-gateway"), AWS_DynamoDB = require("@aws-sdk/client-dynamodb"), AWS_S3 = require("@aws-sdk/client-s3"); - -// Native types -const stringType: string = "string"; -const booleanType: boolean = true; -const numberType: number = 123; - -// Date -const dateType: Date = new Date(); - -// Uint8Array -const blobType: Uint8Array = new Uint8Array(); - -// Arrays -const stringArray: Array = ["string1", "string2"]; -const booleanArray: Array = [true, false]; -const numberArray: Array = [123, 456]; -const blobArray: Array = [new Uint8Array()]; -const enumArray: Array = ["CRC32"]; -const structureArray: Array = [{ Name: "bucketName" }]; - -// Maps -const stringMap: Record = { key: "value" }; -const booleanMap: Record = { key: true }; -const numberMap: Record = { key: 123 }; -const structureMap: Record = { key: { apiKeyRequired: true } }; - -// Nested arrays -const arrayNestedTwice: Array> = [[1, 2], [3, 4]]; -const arrayNestedThrice: Array>> = [[[1, 2], [3, 4]], [[4, 5], [6, 7]]]; -const arrayNestedFour: Array>>> = [ - [[[1], [2]], [[3], [4]]], - [[[5], [6]], [[7], [8]]] -]; - -// Nested maps -const mapNestedTwice: Record> = { key: stringMap }; -const mapNestedTwiceStruct: Record> = { key: structureMap }; - -// Nested arrays and maps -const mapOfArrays: Record> = { key: ["value"] }; -const mapOfMapOfArrays: Record>> = { key: mapOfArrays }; -const mapOfArrayOfMaps: Record>> = { key: [{ key: { S:"A" }}] }; -const mapOfArrayOfArrays: Record>> = { key: [[1], [2]] }; -const arrayOfMaps: Array> = [stringMap]; -const arrayOfMapOfArrays: Array>> = [mapOfArrays]; \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/service-require-deep.input.ts b/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/service-require-deep.input.ts deleted file mode 100644 index fc0544bf2..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/service-require-deep.input.ts +++ /dev/null @@ -1,55 +0,0 @@ -const APIGateway = require("aws-sdk/clients/apigateway"); -const DynamoDB = require("aws-sdk/clients/dynamodb"); -const IoTFleetWise = require("aws-sdk/clients/iotfleetwise"); -const LexModelsV2 = require("aws-sdk/clients/lexmodelsv2"); -const NetworkManager = require("aws-sdk/clients/networkmanager"); -const RDSDataService = require("aws-sdk/clients/rdsdataservice"); -const S3 = require("aws-sdk/clients/s3"); -const SageMakerGeospatial = require("aws-sdk/clients/sagemakergeospatial"); -const AppIntegrations = require("aws-sdk/clients/appintegrations"); -const SSM = require("aws-sdk/clients/ssm"); - -// Native types -const stringType: typeof S3.AccountId = "string"; -const booleanType: typeof S3.BucketKeyEnabled = true; -const numberType: typeof S3.ContentLength = 123; - -// Date -const dateType: typeof S3.CreationDate = new Date(); - -// Uint8Array -const blobType: typeof RDSDataService._Blob = new Uint8Array(); - -// Arrays -const stringArray: typeof S3.AllowedHeaders = ["string1", "string2"]; -const booleanArray: typeof RDSDataService.BooleanArray = [true, false]; -const numberArray: typeof RDSDataService.LongArray = [123, 456]; -const blobArray: typeof IoTFleetWise.NetworkFilesList = [new Uint8Array()]; -const enumArray: typeof S3.ChecksumAlgorithmList = ["CRC32"]; -const structureArray: typeof S3.Buckets = [{ Name: "bucketName" }]; - -// Maps -const stringMap: typeof S3.Metadata = { key: "value" }; -const booleanMap: typeof APIGateway.MapOfStringToBoolean = { key: true }; -const numberMap: typeof SSM.AssociationStatusAggregatedCount = { key: 123 }; -const structureMap: typeof APIGateway.MapOfMethodSnapshot = { key: { apiKeyRequired: true } }; - -// Nested arrays -const arrayNestedTwice: typeof SageMakerGeospatial.LinearRing = [[1, 2], [3, 4]]; -const arrayNestedThrice: typeof SageMakerGeospatial.LinearRings = [[[1, 2], [3, 4]], [[4, 5], [6, 7]]]; -const arrayNestedFour: typeof SageMakerGeospatial.LinearRingsList = [ - [[[1], [2]], [[3], [4]]], - [[[5], [6]], [[7], [8]]] -]; - -// Nested maps -const mapNestedTwice: typeof LexModelsV2.ConditionMap = { key: stringMap }; -const mapNestedTwiceStruct: typeof APIGateway.PathToMapOfMethodSnapshot = { key: structureMap }; - -// Nested arrays and maps -const mapOfArrays: typeof NetworkManager.FilterMap = { key: ["value"] }; -const mapOfMapOfArrays: typeof AppIntegrations.ObjectConfiguration = { key: mapOfArrays }; -const mapOfArrayOfMaps: typeof DynamoDB.BatchGetResponseMap = { key: [{ key: { S:"A" }}] }; -const mapOfArrayOfArrays: typeof APIGateway.MapOfKeyUsages = { key: [[1], [2]] }; -const arrayOfMaps: typeof SSM.InventoryItemEntryList = [stringMap]; -const arrayOfMapOfArrays: typeof SSM.TargetMaps = [mapOfArrays]; \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/service-require-deep.output.ts b/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/service-require-deep.output.ts deleted file mode 100644 index ce53a9426..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/service-require-deep.output.ts +++ /dev/null @@ -1,48 +0,0 @@ -const AWS_APIGateway = require("@aws-sdk/client-api-gateway"); -const AWS_DynamoDB = require("@aws-sdk/client-dynamodb"); -const AWS_S3 = require("@aws-sdk/client-s3"); - -// Native types -const stringType: string = "string"; -const booleanType: boolean = true; -const numberType: number = 123; - -// Date -const dateType: Date = new Date(); - -// Uint8Array -const blobType: Uint8Array = new Uint8Array(); - -// Arrays -const stringArray: Array = ["string1", "string2"]; -const booleanArray: Array = [true, false]; -const numberArray: Array = [123, 456]; -const blobArray: Array = [new Uint8Array()]; -const enumArray: Array = ["CRC32"]; -const structureArray: Array = [{ Name: "bucketName" }]; - -// Maps -const stringMap: Record = { key: "value" }; -const booleanMap: Record = { key: true }; -const numberMap: Record = { key: 123 }; -const structureMap: Record = { key: { apiKeyRequired: true } }; - -// Nested arrays -const arrayNestedTwice: Array> = [[1, 2], [3, 4]]; -const arrayNestedThrice: Array>> = [[[1, 2], [3, 4]], [[4, 5], [6, 7]]]; -const arrayNestedFour: Array>>> = [ - [[[1], [2]], [[3], [4]]], - [[[5], [6]], [[7], [8]]] -]; - -// Nested maps -const mapNestedTwice: Record> = { key: stringMap }; -const mapNestedTwiceStruct: Record> = { key: structureMap }; - -// Nested arrays and maps -const mapOfArrays: Record> = { key: ["value"] }; -const mapOfMapOfArrays: Record>> = { key: mapOfArrays }; -const mapOfArrayOfMaps: Record>> = { key: [{ key: { S:"A" }}] }; -const mapOfArrayOfArrays: Record>> = { key: [[1], [2]] }; -const arrayOfMaps: Array> = [stringMap]; -const arrayOfMapOfArrays: Array>> = [mapOfArrays]; \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/service-require.input.ts b/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/service-require.input.ts deleted file mode 100644 index 44bb7030a..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/service-require.input.ts +++ /dev/null @@ -1,55 +0,0 @@ -const { APIGateway } = require("aws-sdk"); -const { DynamoDB } = require("aws-sdk"); -const { IoTFleetWise } = require("aws-sdk"); -const { LexModelsV2 } = require("aws-sdk"); -const { NetworkManager } = require("aws-sdk"); -const { RDSDataService } = require("aws-sdk"); -const { S3 } = require("aws-sdk"); -const { SageMakerGeospatial } = require("aws-sdk"); -const { AppIntegrations } = require("aws-sdk"); -const { SSM } = require("aws-sdk"); - -// Native types -const stringType: typeof S3.AccountId = "string"; -const booleanType: typeof S3.BucketKeyEnabled = true; -const numberType: typeof S3.ContentLength = 123; - -// Date -const dateType: typeof S3.CreationDate = new Date(); - -// Uint8Array -const blobType: typeof RDSDataService._Blob = new Uint8Array(); - -// Arrays -const stringArray: typeof S3.AllowedHeaders = ["string1", "string2"]; -const booleanArray: typeof RDSDataService.BooleanArray = [true, false]; -const numberArray: typeof RDSDataService.LongArray = [123, 456]; -const blobArray: typeof IoTFleetWise.NetworkFilesList = [new Uint8Array()]; -const enumArray: typeof S3.ChecksumAlgorithmList = ["CRC32"]; -const structureArray: typeof S3.Buckets = [{ Name: "bucketName" }]; - -// Maps -const stringMap: typeof S3.Metadata = { key: "value" }; -const booleanMap: typeof APIGateway.MapOfStringToBoolean = { key: true }; -const numberMap: typeof SSM.AssociationStatusAggregatedCount = { key: 123 }; -const structureMap: typeof APIGateway.MapOfMethodSnapshot = { key: { apiKeyRequired: true } }; - -// Nested arrays -const arrayNestedTwice: typeof SageMakerGeospatial.LinearRing = [[1, 2], [3, 4]]; -const arrayNestedThrice: typeof SageMakerGeospatial.LinearRings = [[[1, 2], [3, 4]], [[4, 5], [6, 7]]]; -const arrayNestedFour: typeof SageMakerGeospatial.LinearRingsList = [ - [[[1], [2]], [[3], [4]]], - [[[5], [6]], [[7], [8]]] -]; - -// Nested maps -const mapNestedTwice: typeof LexModelsV2.ConditionMap = { key: stringMap }; -const mapNestedTwiceStruct: typeof APIGateway.PathToMapOfMethodSnapshot = { key: structureMap }; - -// Nested arrays and maps -const mapOfArrays: typeof NetworkManager.FilterMap = { key: ["value"] }; -const mapOfMapOfArrays: typeof AppIntegrations.ObjectConfiguration = { key: mapOfArrays }; -const mapOfArrayOfMaps: typeof DynamoDB.BatchGetResponseMap = { key: [{ key: { S:"A" }}] }; -const mapOfArrayOfArrays: typeof APIGateway.MapOfKeyUsages = { key: [[1], [2]] }; -const arrayOfMaps: typeof SSM.InventoryItemEntryList = [stringMap]; -const arrayOfMapOfArrays: typeof SSM.TargetMaps = [mapOfArrays]; \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/service-require.output.ts b/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/service-require.output.ts deleted file mode 100644 index ce53a9426..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/api-redundant-type/service-require.output.ts +++ /dev/null @@ -1,48 +0,0 @@ -const AWS_APIGateway = require("@aws-sdk/client-api-gateway"); -const AWS_DynamoDB = require("@aws-sdk/client-dynamodb"); -const AWS_S3 = require("@aws-sdk/client-s3"); - -// Native types -const stringType: string = "string"; -const booleanType: boolean = true; -const numberType: number = 123; - -// Date -const dateType: Date = new Date(); - -// Uint8Array -const blobType: Uint8Array = new Uint8Array(); - -// Arrays -const stringArray: Array = ["string1", "string2"]; -const booleanArray: Array = [true, false]; -const numberArray: Array = [123, 456]; -const blobArray: Array = [new Uint8Array()]; -const enumArray: Array = ["CRC32"]; -const structureArray: Array = [{ Name: "bucketName" }]; - -// Maps -const stringMap: Record = { key: "value" }; -const booleanMap: Record = { key: true }; -const numberMap: Record = { key: 123 }; -const structureMap: Record = { key: { apiKeyRequired: true } }; - -// Nested arrays -const arrayNestedTwice: Array> = [[1, 2], [3, 4]]; -const arrayNestedThrice: Array>> = [[[1, 2], [3, 4]], [[4, 5], [6, 7]]]; -const arrayNestedFour: Array>>> = [ - [[[1], [2]], [[3], [4]]], - [[[5], [6]], [[7], [8]]] -]; - -// Nested maps -const mapNestedTwice: Record> = { key: stringMap }; -const mapNestedTwiceStruct: Record> = { key: structureMap }; - -// Nested arrays and maps -const mapOfArrays: Record> = { key: ["value"] }; -const mapOfMapOfArrays: Record>> = { key: mapOfArrays }; -const mapOfArrayOfMaps: Record>> = { key: [{ key: { S:"A" }}] }; -const mapOfArrayOfArrays: Record>> = { key: [[1], [2]] }; -const arrayOfMaps: Array> = [stringMap]; -const arrayOfMapOfArrays: Array>> = [mapOfArrays]; \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/global-require.input.ts b/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/global-require.input.ts deleted file mode 100644 index 0d1e152e3..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/global-require.input.ts +++ /dev/null @@ -1,11 +0,0 @@ -const AWS = require("aws-sdk"); - -const docClient = new AWS.DynamoDB.DocumentClient({ region: "us-west-2" }); - -const docClientScanInput: typeof AWS.DynamoDB.DocumentClient.ScanInput = { - TableName: "TableName" -}; - -const docClientScanOutput: typeof AWS.DynamoDB.DocumentClient.ScanOutput = await docClient - .scan(docClientScanInput) - .promise(); \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/global-require.output.ts b/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/global-require.output.ts deleted file mode 100644 index 36ea96a35..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/global-require.output.ts +++ /dev/null @@ -1,16 +0,0 @@ -const AWS_DynamoDBDocumentClient = require("@aws-sdk/lib-dynamodb"), - { - DynamoDBDocument - } = AWS_DynamoDBDocumentClient, - { - DynamoDB - } = require("@aws-sdk/client-dynamodb"); - -const docClient = DynamoDBDocument.from(new DynamoDB({ region: "us-west-2" })); - -const docClientScanInput: typeof AWS_DynamoDBDocumentClient.ScanCommandInput = { - TableName: "TableName" -}; - -const docClientScanOutput: typeof AWS_DynamoDBDocumentClient.ScanCommandOutput = await docClient - .scan(docClientScanInput); \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/service-require-deep.input.ts b/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/service-require-deep.input.ts deleted file mode 100644 index 02fffef39..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/service-require-deep.input.ts +++ /dev/null @@ -1,11 +0,0 @@ -const DynDB = require("aws-sdk/clients/dynamodb"); - -const docClient = new DynDB.DocumentClient({ region: "us-west-2" }); - -const docClientScanInput: typeof DynDB.DocumentClient.ScanInput = { - TableName: "TableName" -}; - -const docClientScanOutput: typeof DynDB.DocumentClient.ScanOutput = await docClient - .scan(docClientScanInput) - .promise(); \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/service-require-deep.output.ts b/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/service-require-deep.output.ts deleted file mode 100644 index f5ea8ce27..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/service-require-deep.output.ts +++ /dev/null @@ -1,16 +0,0 @@ -const AWS_DynDBDocumentClient = require("@aws-sdk/lib-dynamodb"), - { - DynamoDBDocument - } = AWS_DynDBDocumentClient, - { - DynamoDB: DynDB - } = require("@aws-sdk/client-dynamodb"); - -const docClient = DynamoDBDocument.from(new DynDB({ region: "us-west-2" })); - -const docClientScanInput: typeof AWS_DynDBDocumentClient.ScanCommandInput = { - TableName: "TableName" -}; - -const docClientScanOutput: typeof AWS_DynDBDocumentClient.ScanCommandOutput = await docClient - .scan(docClientScanInput); \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/service-require.input.ts b/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/service-require.input.ts deleted file mode 100644 index a6c9d164b..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/service-require.input.ts +++ /dev/null @@ -1,11 +0,0 @@ -const { DynamoDB: DynDB } = require("aws-sdk"); - -const docClient = new DynDB.DocumentClient({ region: "us-west-2" }); - -const docClientScanInput: typeof DynDB.DocumentClient.ScanInput = { - TableName: "TableName" -}; - -const docClientScanOutput: typeof DynDB.DocumentClient.ScanOutput = await docClient - .scan(docClientScanInput) - .promise(); \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/service-require.output.ts b/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/service-require.output.ts deleted file mode 100644 index f5ea8ce27..000000000 --- a/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-input-output-type/service-require.output.ts +++ /dev/null @@ -1,16 +0,0 @@ -const AWS_DynDBDocumentClient = require("@aws-sdk/lib-dynamodb"), - { - DynamoDBDocument - } = AWS_DynDBDocumentClient, - { - DynamoDB: DynDB - } = require("@aws-sdk/client-dynamodb"); - -const docClient = DynamoDBDocument.from(new DynDB({ region: "us-west-2" })); - -const docClientScanInput: typeof AWS_DynDBDocumentClient.ScanCommandInput = { - TableName: "TableName" -}; - -const docClientScanOutput: typeof AWS_DynDBDocumentClient.ScanCommandOutput = await docClient - .scan(docClientScanInput); \ No newline at end of file