Skip to content
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

feat: endpoint to handle fulfillment_completed events #143

Merged
merged 15 commits into from
Feb 22, 2024

Conversation

blefebvre
Copy link
Contributor

This PR implements the POST /event/fulfillment endpoint as detailed in the API spec.

Provides a method to handle fulfillment_completed events from the Fulfillment Gateway. Events are queued for processing onto the provided SQS queue URL.

A sample event in the expected format can be found in test/controllers/event/sample-hoolihan-event.json

Ticket: https://jira.corp.adobe.com/browse/SITES-19428

WIP: stub in route and controller
WIP: Hoolihan event processing
WIP: pass context to controller to facilitate env var injection
Rework processor steps so that an error sending to SQS leads to an error response from the controller
Test coverage to 100%. Improve JSDocs
@solaris007 solaris007 added the enhancement New feature or request label Feb 3, 2024
Copy link
Member

@solaris007 solaris007 left a comment

Choose a reason for hiding this comment

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

Great contribution, thank you @blefebvre ! I have just nitpick comments.

src/controllers/event/fulfillment.js Outdated Show resolved Hide resolved
src/controllers/event/fulfillment.js Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Feb 5, 2024

This PR will trigger a minor release when merged.

@blefebvre
Copy link
Contributor Author

Thank you @solaris007 for the review and suggestions.

Copy link
Member

@solaris007 solaris007 left a comment

Choose a reason for hiding this comment

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

LGTM

@blefebvre blefebvre merged commit c18df3d into main Feb 22, 2024
3 checks passed
@blefebvre blefebvre deleted the blefebvr/fulfillment-handler branch February 22, 2024 14:00
solaris007 pushed a commit that referenced this pull request Feb 22, 2024
# [1.22.0](v1.21.0...v1.22.0) (2024-02-22)

### Bug Fixes

* **deps:** update adobe fixes ([#172](#172)) ([bc96621](bc96621))

### Features

* endpoint to handle fulfillment_completed events ([#143](#143)) ([c18df3d](c18df3d))
@solaris007
Copy link
Member

🎉 This PR is included in version 1.22.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants