fix!: Bugfix/supported events missing key #62
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue # (if applicable)
Closes #.
Reason for this change
The change is to fix an issue with the
EventManager
class and ensure that allDetailType
enum entries have corresponding values in thesupportedEvents
object. This is necessary to prevent errors when creating new event-manager rules using thegetOrCreateRule
function.Marking this as a breaking change because the default CognitoAuth no longer disables setting of scopes for API GWs.
Description of changes
In
src/utils/event-manager.ts
, thesupportedEvents
object is updated to include entries fortenantUserCreated
andtenantUserDeleted
events.A new test suite is added in
test/event-manager.test.ts
to ensure that allDetailType
enum entries have corresponding values in thesupportedEvents
object.In
src/control-plane/integ.default.ts
, aCognitoAuth
instance is created and passed to theControlPlane
construct to enable testing with authentication disabled.In
src/control-plane/auth/cognito-auth.ts
, thecreateAdminUserFunction
is now created in the constructor instead of thecreateAdminUser
method.Description of how you validated changes
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.