-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #363 from alkem-io/develop
In-app notifications
- Loading branch information
Showing
52 changed files
with
898 additions
and
122 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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,5 @@ | ||
export enum InAppNotificationCategory { | ||
SELF = 'self', | ||
MEMBER = 'member', | ||
ADMIN = 'admin', | ||
} |
This file contains 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,2 @@ | ||
export * from "./role.change.type"; | ||
export * from "./in.app.notification.category"; |
This file contains 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
8 changes: 8 additions & 0 deletions
8
lib/src/dto/in-app/in.app.notification.callout.published.payload.ts
This file contains 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,8 @@ | ||
import { InAppNotificationPayloadBase } from "./in.app.notification.payload.base"; | ||
import { NotificationEventType } from '../../notification.event.type'; | ||
|
||
export interface InAppNotificationCalloutPublishedPayload extends InAppNotificationPayloadBase { | ||
type: NotificationEventType.COLLABORATION_CALLOUT_PUBLISHED; | ||
calloutID: string; | ||
spaceID: string; | ||
} |
10 changes: 10 additions & 0 deletions
10
lib/src/dto/in-app/in.app.notification.community.new.member.payload.ts
This file contains 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 @@ | ||
import { CommunityContributorType } from '@alkemio/client-lib'; | ||
import { InAppNotificationPayloadBase } from './in.app.notification.payload.base'; | ||
import { NotificationEventType } from '../../notification.event.type'; | ||
|
||
export interface InAppNotificationCommunityNewMemberPayload extends InAppNotificationPayloadBase { | ||
type: NotificationEventType.COMMUNITY_NEW_MEMBER; | ||
contributorType: CommunityContributorType; | ||
newMemberID: string; | ||
spaceID: string; | ||
} |
This file contains 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,9 @@ | ||
import { InAppNotificationPayloadBase } from "./in.app.notification.payload.base"; | ||
|
||
/** | ||
* The compressed version of an In-App Notifications. | ||
* It is the same payload but with multiple receivers. | ||
*/ | ||
export type CompressedInAppNotificationPayload<T extends InAppNotificationPayloadBase> = Exclude<T, 'receiverID'> & { | ||
receiverIDs: string[]; | ||
} |
13 changes: 13 additions & 0 deletions
13
lib/src/dto/in-app/in.app.notification.contributor.mentioned.payload.ts
This file contains 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,13 @@ | ||
import { CommunityContributorType } from "@alkemio/client-lib"; | ||
import { InAppNotificationPayloadBase } from "./in.app.notification.payload.base"; | ||
import { NotificationEventType } from '../../notification.event.type'; | ||
|
||
export interface InAppNotificationContributorMentionedPayload extends InAppNotificationPayloadBase { | ||
type: NotificationEventType.COMMUNICATION_USER_MENTION; | ||
comment: string; // probably will be removed; can be too large; can be replaced with roomID, commentID | ||
contributorType: CommunityContributorType | ||
commentOrigin: { | ||
displayName: string; | ||
url: string; | ||
} | ||
} |
This file contains 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,11 @@ | ||
import { InAppNotificationCategory } from "../../common/enums"; | ||
import { NotificationEventType } from "../../notification.event.type"; | ||
|
||
export interface InAppNotificationPayloadBase { | ||
receiverID: string; | ||
/** UTC */ | ||
triggeredAt: Date; | ||
type: NotificationEventType; | ||
triggeredByID: string; | ||
category: InAppNotificationCategory; | ||
} |
This file contains 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,8 @@ | ||
import { InAppNotificationCalloutPublishedPayload } from "./in.app.notification.callout.published.payload"; | ||
import { InAppNotificationCommunityNewMemberPayload } from "./in.app.notification.community.new.member.payload"; | ||
import { InAppNotificationContributorMentionedPayload } from "./in.app.notification.contributor.mentioned.payload"; | ||
|
||
export type InAppNotificationPayload = | ||
| InAppNotificationCalloutPublishedPayload | ||
| InAppNotificationCommunityNewMemberPayload | ||
| InAppNotificationContributorMentionedPayload; |
This file contains 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,9 @@ | ||
export * from "./in.app.notification.payload.base"; | ||
|
||
export * from "./in.app.notification.payload"; | ||
|
||
export * from "./in.app.notification.compessed.payload"; | ||
|
||
export * from "./in.app.notification.callout.published.payload"; | ||
export * from "./in.app.notification.community.new.member.payload"; | ||
export * from "./in.app.notification.contributor.mentioned.payload"; |
This file contains 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 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 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './notification.event.type'; | ||
export * from './dto'; | ||
export * from './common/enums/role.change.type'; | ||
export * from './dto/in-app'; | ||
export * from './common/enums'; |
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.