-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/define shared notification models #71
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
Merged
Changes from 73 commits
Commits
Show all changes
78 commits
Select commit
Hold shift + click to select a range
a8389be
feat(lib): add DevicePlatform enum
fulleni 58beac3
feat(enum): add push notification provider definition
fulleni 5b5be15
feat(enums): add SubscriptionDeliveryType enum
fulleni 5e6a4e9
feat(notifications): add Device model for push notifications
fulleni 4e9ef7a
feat(notifications): add NotificationPayload model
fulleni 121a962
feat(models): add NotificationSubscription model
fulleni 8dc89ba
feat(headline): add isBreaking flag to Headline model
fulleni 0cb6b7e
feat(config): add push notification configuration model
fulleni c4aa87d
refactor(push_notification_config): remove unused import
fulleni 556a1a4
feat(remote_config): add push notification config and optimize imports
fulleni df6a9e8
docs(CHANGELOG): add entry for push notification data models
fulleni 85d725a
docs(README): add push notification models and configurations
fulleni 75ff00b
feat(config): add PushNotificationProviderConfig base class
fulleni 01e670c
feat(core): add firebase provider config model
fulleni 72c0908
feat(config): add OneSignalProviderConfig model
fulleni 0fb86d8
feat(models): add push notification delivery role config model
fulleni 3a8999a
feat(core): add push notification delivery config model
fulleni 53faeb9
feat(config): enhance push notification config model
fulleni 600f91e
refactor(RemoteConfig): reorder class properties
fulleni 471b588
feat(auth): add push notification subscriptions to User model
fulleni 323ee62
feat(user_preferences): add notification subscriptions to UserContent…
fulleni dc88548
chore: file relocation
fulleni 7917750
chore: file rename
fulleni aed9000
chore: file rename
fulleni eb219ef
chore: file rename
fulleni 1fc02b8
chore: file rename
fulleni b007012
chore: updated enums barrel file
fulleni 42fc4ba
chore: updated models barrel file
fulleni 922494b
refactor(models): organize imports and update namespaces
fulleni d81f103
chore: misc
fulleni 0772c7f
build(serialization): misc
fulleni 47d1a15
fix: misc
fulleni 78bb9c9
build(user_preferences): generate UserContentPreferences serializer
fulleni db9bd83
refactor(user): remove pushNotificationSubscriptions from User model
fulleni 8b6f491
refactor(push_notification): improve serialization and deserialization
fulleni 024110b
fix(push_notification_configs): correct JSON serialization of provide…
fulleni 90328ff
fix(config): override toJson to include provider in Firebase config
fulleni 9fb704a
refactor(firebase): improve OneSignalProviderConfig toJson implementa…
fulleni 2debe2c
refactor(core): improve PushNotificationProviderConfig design
fulleni 651182e
build(serialization): generate
fulleni c541d30
refactor(config): remove redundant toJson method from PushNotificatio…
fulleni 692958e
feat(push_notification_config): add json serialization for providerCo…
fulleni dba2818
refactor(push): remove redundant comments and annotations
fulleni f696641
style(push): remove unnecessary override annotations
fulleni 6e7a5bf
fix(remote_configs): update push notification delivery config models …
fulleni 122ca7c
feat(PushNotificationConfig): implement custom serializers for provid…
fulleni 5e52e03
test(core): add unit test for PushNotificationSubscriptionDeliveryTyp…
fulleni 73e4a39
test(core): add unit test for PushNotificationProvider enum
fulleni 6d5cb62
test(core): add PushNotificationSubscription model tests
fulleni 3fa58e3
test(push_notifications): add unit tests for PushNotificationPayload
fulleni 0585e19
style(test): remove unnecessary comment in push notification subscrip…
fulleni 682ada0
test(core): add PushNotificationDevice model tests
fulleni 1fc17fe
test: add constant for push notification subscription ID
fulleni ce6737f
test(core): add FirebaseProviderConfig model tests
fulleni 1814a9a
test(core): add OneSignalProviderConfig tests
fulleni 6a9d075
test(core): add PushNotificationConfig model tests
fulleni 42ae276
test(core): add tests for PushNotificationDeliveryRoleConfig
fulleni 1f35724
test(core): add PushNotificationProviderConfig serialization tests
fulleni e6139ec
test(config): enhance OneSignalProviderConfig tests with fixture data
fulleni 8466f1a
test(config): migrate FirebaseProviderConfig tests to use fixtures
fulleni 97f04d8
test(config): update PushNotificationDeliveryRoleConfig tests
fulleni ca5f087
test(config): refactor push notification config tests
fulleni eadb60e
refactor(test): replace local push notification config with fixture
fulleni bc5d841
refactor(push-notification): use fixtures for topic, source, and coun…
fulleni b6de7ed
test(RemoteConfig): add and improve equality and JSON tests
fulleni 4939d79
test(headline): update headline test expectations
fulleni 39069bd
test(core): add unit test for DevicePlatform enum
fulleni 6e67d15
refactor(user_preferences): update notification subscriptions structure
fulleni 34a3799
test(user_preferences): add notificationSubscriptions tests
fulleni d395d05
fix(fixtures): use empty list instead of map for notification subscri…
fulleni cafcb08
docs(CHANGELOG): update feature description for push notification system
fulleni f610220
docs(README): expand feature showcase and organize content structure
fulleni c09b9a3
style: format
fulleni 4d7f24e
refactor(user): remove unused notification subscription property
fulleni d5fb10f
docs: fix capitalization in CHANGELOG.md
fulleni cafecf0
fix(models): update error message in PushNotificationProviderConfig
fulleni 971a884
style: format
fulleni cdbc913
refactor(user): remove unused import
fulleni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /// {@template device_platform} | ||
| /// Identifies the mobile operating system of a user's device. | ||
| /// {@endtemplate} | ||
| enum DevicePlatform { | ||
| /// Apple iOS. | ||
| ios, | ||
|
|
||
| /// Google Android. | ||
| android, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| /// {@template push_notification_provider} | ||
| /// Defines the available push notification service providers. | ||
| /// | ||
| /// This allows the backend to select the appropriate client for sending a | ||
| /// notification and allows devices to register themselves with the provider | ||
| /// they are configured to use. | ||
| /// {@endtemplate} | ||
| enum PushNotificationProvider { | ||
| /// Firebase Cloud Messaging. | ||
| firebase, | ||
|
|
||
| /// OneSignal. | ||
| oneSignal, | ||
| } |
19 changes: 19 additions & 0 deletions
19
lib/src/enums/push_notification_subscription_delivery_type.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| /// {@template push_notification_subscription_delivery_type} | ||
| /// Defines the types of notifications a user can receive for a subscription. | ||
| /// | ||
| /// A user can opt into multiple delivery types for a single notification | ||
| /// subscription, allowing for flexible alert configurations. | ||
| /// {@endtemplate} | ||
| enum PushNotificationSubscriptionDeliveryType { | ||
| /// Delivers a notification immediately only when a matching headline is | ||
| /// editorially marked as "breaking news". | ||
| breakingOnly, | ||
|
|
||
| /// Delivers a single, AI-powered summary of all matching headlines from the | ||
| /// past day, sent at a scheduled time. | ||
| dailyDigest, | ||
|
|
||
| /// Delivers a single, AI-powered summary of all matching headlines from the | ||
| /// past week, sent on a recurring day. | ||
| weeklyRoundup, | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.