Serverless awsProvider.d.ts fix + addition (#49104)

* Fixed filterPolicty alternative type

* Allow AwsFunction layers property to be defined as key with string so Ref can be used.

* Added optional type to Stream interface

* Update types/serverless/plugins/aws/provider/awsProvider.d.ts

Co-authored-by: Frédéric Barthelet <fredericb@theodo.fr>

* Update types/serverless/plugins/aws/provider/awsProvider.d.ts

Co-authored-by: Frédéric Barthelet <fredericb@theodo.fr>

* Update types/serverless/plugins/aws/provider/awsProvider.d.ts

* Update awsProvider.d.ts

Added missing semicolon

* awsProvider.d.ts
Formatted document
Used Array<> syntax for AwsFunction.layers

* Fixed SNS filterPolicy test

Co-authored-by: Frédéric Barthelet <fredericb@theodo.fr>
This commit is contained in:
Niels van Amstel
2020-12-22 22:01:40 +01:00
committed by GitHub
parent 5b373c2167
commit 3c1e642c70
2 changed files with 4 additions and 3 deletions

View File

@@ -372,7 +372,7 @@ declare namespace Aws {
arn?: string;
topicName?: string;
displayName?: string;
filterPolicy?: string[] | { [key: string]: string };
filterPolicy?: Record<string, unknown>;
redrivePolicy?: RedrivePolicy;
}
@@ -388,6 +388,7 @@ declare namespace Aws {
batchSize?: number | string;
startingPosition?: number | string;
enabled?: boolean;
type?: 'dynamodb' | 'kinesis';
}
interface Msk {
@@ -526,7 +527,7 @@ declare namespace Aws {
tags?: Tags;
vpc?: Vpc;
package?: Package;
layers?: string[];
layers?: Array<string | Record<string, string>>;
tracing?: string;
condition?: string;
dependsOn?: string[];

View File

@@ -467,7 +467,7 @@ const awsServerless: Aws.Serverless = {
arn: 'testarn',
topicName: 'testtopicName',
displayName: 'testdisplayName',
filterPolicy: ['testfilterpolicy'],
filterPolicy: { testFilterPolicy: 'testfilterpolicy' },
redrivePolicy: {
deadLetterTargetArn: 'testdeadLetterTargetArn',
deadLetterTargetRef: 'testdeadLetterTargetRef',