sentry
sentry copied to clipboard
chore(notif-platform): More utility on NotificationProvider
Adds a few things to NotificationProvider
- get_renderer() -> uses the default renderer by default
- target_class -> must be a subclass of
NotificationTarget, added a test for this - target_resource_types -> a list of valid resources that this provider can consume
- validate_target -> a method for the eventual NotificationService to validate the incoming target
The NotificationTarget classes are dataclasses with their own validation. Even though it's a side-effect, I think it's reasonable to prevent initializing a dataclass which will produce an error if used, though I added a todo about a making needless RPC calls
All of the validation has added tests, and the renderers/providers being stubbed out have also been expanded.