[@types/aws-lambda] Fixing SNSMessage field names to match the AWS developer guide#65607
Conversation
|
@markscamilleri Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 65607,
"author": "markscamilleri",
"headCommitOid": "c4ce31586275e8fb0d04a5f4fc24ac1163db6faa",
"mergeBaseOid": "296c0a0919541f18f770b4b2930d3e379848da1c",
"lastPushDate": "2023-06-14T18:08:23.000Z",
"lastActivityDate": "2023-06-14T21:54:03.000Z",
"maintainerBlessed": "Waiting for Code Reviews",
"mergeOfferDate": "2023-06-14T21:25:25.000Z",
"mergeRequestDate": "2023-06-14T21:54:03.000Z",
"mergeRequestUser": "markscamilleri",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "aws-lambda",
"kind": "edit",
"files": [
{
"path": "types/aws-lambda/aws-lambda-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/common/api-gateway.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/index.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/test/alb-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/api-gateway-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/autoscaling-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/cdk-custom-resource-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/cloudformation-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/cloudwatch-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/codebuild-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/codecommit-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/codepipeline-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/cognito-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/connect-contact-flow-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/dynamodb-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/eventbridge-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/iot-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/kinesis-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/lex-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/lex-v2-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/s3-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/secretsmanager-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/ses-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/sns-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/test/sqs-tests.ts",
"kind": "test"
},
{
"path": "types/aws-lambda/trigger/alb.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/api-gateway-proxy.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/autoscaling.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/cloudformation-custom-resource.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/cloudfront-request.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/cloudfront-response.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/cloudwatch-logs.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/codebuild-cloudwatch-state.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/codecommit.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/codepipeline-cloudwatch-action.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/codepipeline-cloudwatch-pipeline.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/codepipeline-cloudwatch-stage.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/codepipeline-cloudwatch.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/codepipeline.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/cognito-user-pool-trigger/_common.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/cognito-user-pool-trigger/custom-email-sender.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/cognito-user-pool-trigger/custom-sms-sender.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/cognito-user-pool-trigger/post-authentication.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/cognito-user-pool-trigger/post-confirmation.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/cognito-user-pool-trigger/pre-signup.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/cognito-user-pool-trigger/user-migration.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/connect-contact-flow.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/dynamodb-stream.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/iot.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/kinesis-stream.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/lex-v2.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/lex.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/s3-batch.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/s3.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/ses.d.ts",
"kind": "definition"
},
{
"path": "types/aws-lambda/trigger/sns.d.ts",
"kind": "definition"
}
],
"owners": [
"darbio",
"skarum",
"StefH",
"buggy",
"y13i",
"wwwy3y3",
"OrthoDex",
"MichaelMarner",
"daniel-cottone",
"kostya-misura",
"coderbyheart",
"palmithor",
"daniloraisi",
"simonbuchan",
"Haydabase",
"repl-chris",
"aneilbaboo",
"jeznag",
"louislarry",
"dpapukchiev",
"ohookins",
"trevor-leach",
"jagregory",
"dalen",
"loikg",
"skyzenr",
"redlickigrzegorz",
"juancarbonel",
"pwmcintyre",
"alex-bolenok-centralreach",
"marianzange",
"apepper",
"apalumbo",
"SachinShekhar",
"ivanmartos",
"zach-anthony",
"savnik",
"bboure",
"jamesorlakin",
"aphex",
"joeykilpatrick",
"lmanerich"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "darbio",
"date": "2023-06-14T21:24:38.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 1564519502,
"ciResult": "pass"
} |
|
🔔 @darbio @skarum @StefH @buggy @y13i @wwwy3y3 @OrthoDex @MichaelMarner @daniel-cottone @kostya-misura @coderbyheart @palmithor @daniloraisi @simonbuchan @Haydabase @repl-chris @aneilbaboo @jeznag @louislarry @dpapukchiev @ohookins @trevor-leach @jagregory @dalen @loikg @skyzenr @redlickigrzegorz @juancarbonel @pwmcintyre @alex-bolenok-centralreach @marianzange @apepper @apalumbo @SachinShekhar @ivanmartos @zach-anthony @savnik @bboure @jamesorlakin @aphex @joeykilpatrick @lmanerich — please review this PR in the next few days. Be sure to explicitly select |
I kept this unchecked as when running |
I suspect this package simply predates that advice, or at least it working. The separate PR might be a bit of overkill, since it will publish a separate package, so my vote is a separate commit in here is probably fine (I don't think there's any other open PRs that would invalidate?) |
@simonbuchan thanks for this! I have just ran prettier and included the changes in this PR |
|
@darbio Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
|
@markscamilleri Please can you put the This further change is unrelated to the original change/discussion. Thanks mate! |
" This reverts commit 539abca.
@darbio sorry about that! I thought that it made sense to add it to the scope of the PR as it's not breaking and it fits with the title of the PR (albeit I needed to edit the description) I've reverted it and I'll open another PR for that change 🙂 |
|
@markscamilleri Unfortunately, this pull request currently has a merge conflict 😥. Please update your PR branch to be up-to-date with respect to master. Have a nice day! |
|
@markscamilleri: Everything looks good here. I am ready to merge this PR (at c4ce315) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@darbio, @skarum, @StefH, @buggy, @y13i, @wwwy3y3, @OrthoDex, @MichaelMarner, @daniel-cottone, @kostya-misura, @coderbyheart, @palmithor, @daniloraisi, @simonbuchan, @Haydabase, @repl-chris, @aneilbaboo, @jeznag, @louislarry, @dpapukchiev, @ohookins, @trevor-leach, @jagregory, @dalen, @loikg, @skyzenr, @redlickigrzegorz, @juancarbonel, @pwmcintyre, @alex-bolenok-centralreach, @marianzange, @apepper, @apalumbo, @SachinShekhar, @ivanmartos, @zach-anthony, @savnik, @bboure, @jamesorlakin, @aphex, @joeykilpatrick, @lmanerich: you can do this too.) |
|
Ready to merge |
…e field names to match the AWS developer guide by @markscamilleri * Updated field names to match AWS' developer guide * Removed accidental auto-formatting * Ran prettier as per linting instructions * Fixed tslint:disable-next-line due to prettier adding lines * Added optional marker for Subject to solve DefinitelyTyped#54379 * Revert "Added optional marker for Subject to solve DefinitelyTyped#54379" This reverts commit 539abca.
I noticed that the
SNSMessagetype is inconsistent with what AWS documents on the SNS Developer's guide (https://docs.aws.amazon.com/sns/latest/dg/sns-message-and-json-formats.html) and what the event looks like in practice (via logging). The fieldsUnsubscribeUrlandSigningCertUrlare actually namedUnsubscribeURLandSigningCertURL, so this PR seeks to fix that.AWS' own documentation was inconsistent with the Lambda docs showing the wrong field naming as well. A PR has been opened to update this documentation as well (awsdocs/aws-lambda-developer-guide#438)
I have also run prettier as per common mistakes instructions and due to that, I have also fixed a tslint issue.
Please fill in this template.
npm test <package to test>.If changing an existing definition: