Skip to content

[@types/aws-lambda] Fixing SNSMessage field names to match the AWS developer guide#65607

Merged
typescript-bot merged 7 commits intoDefinitelyTyped:masterfrom
markscamilleri:aws-lambda-fix-sns-message-field-names
Jun 14, 2023
Merged

[@types/aws-lambda] Fixing SNSMessage field names to match the AWS developer guide#65607
typescript-bot merged 7 commits intoDefinitelyTyped:masterfrom
markscamilleri:aws-lambda-fix-sns-message-field-names

Conversation

@markscamilleri
Copy link
Contributor

@markscamilleri markscamilleri commented May 26, 2023

I noticed that the SNSMessage type 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 fields UnsubscribeUrl and SigningCertUrl are actually named UnsubscribeURL and SigningCertURL, 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.

If changing an existing definition:

@typescript-bot
Copy link
Contributor

typescript-bot commented May 26, 2023

@markscamilleri Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because 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

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by type definition owners or DT maintainers

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"
}

@typescript-bot
Copy link
Contributor

typescript-bot commented May 26, 2023

@markscamilleri
Copy link
Contributor Author

markscamilleri commented May 26, 2023

I kept this unchecked as when running npm run prettier -- --write types/aws-lambda/**/*.ts it seems all files needed to be changed and that would have made this PR too large. Could you please advise what to do regarding this? I'm more than happy to open a separate PR running prettier as well.

@markscamilleri markscamilleri changed the title Fixing SNSMessage field names to match the AWS developer guide in @types/aws-lambda @types/aws-lambda: Fixing SNSMessage field names to match the AWS developer guide May 26, 2023
@simonbuchan
Copy link
Contributor

Could you please advise what to do regarding this? I'm more than happy to open a separate PR running prettier as well.

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?)

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label May 26, 2023
@markscamilleri
Copy link
Contributor Author

Could you please advise what to do regarding this? I'm more than happy to open a separate PR running prettier as well.

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

@typescript-bot typescript-bot removed the Owner Approved A listed owner of this package signed off on the pull request. label Jun 2, 2023
@typescript-bot
Copy link
Contributor

@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?

@darbio
Copy link

darbio commented Jun 2, 2023

@markscamilleri Please can you put the subject field change in a new PR (with a link to the documentation) and roll this one back to just be the discussed changes.

This further change is unrelated to the original change/discussion. Thanks mate!

@markscamilleri
Copy link
Contributor Author

@markscamilleri Please can you put the subject field change in a new PR (with a link to the documentation) and roll this one back to just be the discussed changes.

This further change is unrelated to the original change/discussion. Thanks mate!

@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 markscamilleri changed the title @types/aws-lambda: Fixing SNSMessage field names to match the AWS developer guide [@types/aws-lambda] Fixing SNSMessage field names to match the AWS developer guide Jun 5, 2023
@typescript-bot typescript-bot added the Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. label Jun 9, 2023
@typescript-bot
Copy link
Contributor

@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!

@typescript-bot typescript-bot removed the Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. label Jun 14, 2023
@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner labels Jun 14, 2023
@typescript-bot
Copy link
Contributor

@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:

Ready to merge

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.)

@markscamilleri
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit e6a7b86 into DefinitelyTyped:master Jun 14, 2023
Desplandis pushed a commit to Desplandis/DefinitelyTyped that referenced this pull request Jul 3, 2023
…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.
@jansauer jansauer mentioned this pull request Aug 18, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants