Skip to content

feat(parser): add TransferFamilySchema for AWS Transfer Family events #3575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

VatsalGoel3
Copy link
Contributor

@VatsalGoel3 VatsalGoel3 commented Feb 9, 2025

Summary

This PR adds a new built-in schema for AWS Transfer Family events.

Changes

  • Implemented TransferFamilySchema using Zod to validate AWS Transfer Family events.
  • Added type definitions in schema.ts and updated package exports (package.json).
  • Documentation updates were included to list TransferFamilySchema as a built-in schema.
  • Added a sample test event JSON file (tests/events/transfer-family/base.json).
  • Implemented unit tests (tests/unit/schema/transfer-family.test.ts) for schema validation.

Issue number: closes #3518


Checklist ✅

  • I have read the contributing guidelines.
  • I have checked that there isn't another PR addressing the same issue.
  • My PR follows the conventional commit format.
  • Tests are included and passing (npm test -w packages/parser).
  • Documentation has been updated (docs/parser.md).

By submitting this pull request, I confirm that I have read and followed the Powertools for AWS Lambda (TypeScript) contributing guidelines, and I confirm that you can use, modify, copy, and redistribute this contribution under the terms of your choice.

…and docs

- Implemented TransferFamilySchema using Zod for AWS Transfer Family events.
- Updated type definitions, package exports, and documentation.
- Added unit tests and a test event JSON file to ensure validation.
@VatsalGoel3 VatsalGoel3 requested a review from a team February 9, 2025 05:49
@VatsalGoel3 VatsalGoel3 requested a review from a team as a code owner February 9, 2025 05:49
@boring-cyborg boring-cyborg bot added dependencies Changes that touch dependencies, e.g. Dependabot, etc. documentation Improvements or additions to documentation parser This item relates to the Parser Utility tests PRs that add or change tests labels Feb 9, 2025
Copy link

boring-cyborg bot commented Feb 9, 2025

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #typescript channel on our Powertools for AWS Lambda Discord: Invite link

@pull-request-size pull-request-size bot added the size/XL PRs between 500-999 LOC, often PRs that grown with feedback label Feb 9, 2025
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @VatsalGoel3, thank you for the PR.

Please revert the changes made to all the package.json files and the main package-lock.json. Zod is already present int the environment so there's no need to install it again.

Also, please don't modify the PR template or it will interfere with our CI.

We'll review the PR once the diff is fixed, of course let us know if you need any help.

@pull-request-size pull-request-size bot added size/M PR between 30-99 LOC and removed size/XL PRs between 500-999 LOC, often PRs that grown with feedback labels Feb 9, 2025
@VatsalGoel3
Copy link
Contributor Author

VatsalGoel3 commented Feb 9, 2025

Hi @dreamorosi,
This is my first PR, so I really appreciate your patience and guidance! I’ve reverted all unintended package.json changes to match the main. Could you please review and let me know if everything looks good now?

Also, I noticed a SonarCloud Quality Gate failure due to 2 security hotspots. Let me know if I need to address anything in my changes to rectify it.
Thanks again for your time! 🚀

Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for reverting the unintended changes.

I've left a few more comments on the actual changes, we're getting there.

Let's make this round of changes and see if they solve the SonarCube alerts, if not I'll share more info.

Thank you again!

@dreamorosi
Copy link
Contributor

Also, we require all PRs to have this text in the description:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This was part of the template but it's been edited and the wording has changed. Before we can merge it we'll need you to either add it back or acknowledge that you agree with this wording.

@VatsalGoel3
Copy link
Contributor Author

@dreamorosi
I've made all requested changes and updated the PR comment statement for the acknowledgment.

Thank you

@github-actions github-actions bot added the feature PRs that introduce new features or minor changes label Feb 10, 2025
@dreamorosi dreamorosi self-requested a review February 10, 2025 07:39
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this PR and addressing all the review comments!

And congrats for getting your first PR in this project merged 🎉

@dreamorosi dreamorosi merged commit 2c27c5e into aws-powertools:main Feb 10, 2025
40 checks passed
Copy link

boring-cyborg bot commented Feb 10, 2025

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Changes that touch dependencies, e.g. Dependabot, etc. documentation Improvements or additions to documentation feature PRs that introduce new features or minor changes parser This item relates to the Parser Utility size/M PR between 30-99 LOC tests PRs that add or change tests
Projects
Development

Successfully merging this pull request may close these issues.

Feature request: add TransferFamilySchema to Parser
2 participants