Skip to content

Commit

Permalink
Merge pull request #167 from alkem-io/develop
Browse files Browse the repository at this point in the history
Release: Notifications on Discussion Callout Comment, Canvas Created
  • Loading branch information
valentinyanakiev authored Dec 13, 2022
2 parents d0355bf + 6b87969 commit add5b44
Show file tree
Hide file tree
Showing 109 changed files with 1,688 additions and 1,001 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@

.vscode
.idea
package-lock.json
4 changes: 2 additions & 2 deletions lib/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alkemio/notifications-lib",
"version": "0.1.7",
"version": "0.2.5",
"description": "Library for interacting with Alkemio notifications service",
"author": "Alkemio Foundation",
"private": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// todo: remove once notifications can use the types directly from
export enum CommunityType {
export enum JourneyType {
HUB = 'hub',
CHALLENGE = 'challenge',
OPPORTUNITY = 'opportunity',
Expand Down
13 changes: 0 additions & 13 deletions lib/src/dto/application.created.event.payload.ts

This file was deleted.

28 changes: 0 additions & 28 deletions lib/src/dto/aspect.comment.created.event.payload.ts

This file was deleted.

26 changes: 0 additions & 26 deletions lib/src/dto/aspect.created.event.payload.ts

This file was deleted.

4 changes: 3 additions & 1 deletion lib/src/dto/base.event.payload.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface BaseEventPayload {} // todo when templates are more clearly defined
export interface BaseEventPayload {
triggeredBy: string;
}
27 changes: 0 additions & 27 deletions lib/src/dto/callout.published.event.payload.ts

This file was deleted.

11 changes: 11 additions & 0 deletions lib/src/dto/collaboration.callout.published.event.payload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { JourneyBaseEventPayload } from './journey.base.event.payload';

export interface CollaborationCalloutPublishedEventPayload extends JourneyBaseEventPayload {
callout: {
id: string;
displayName: string;
description: string;
nameID: string;
type: string;
};
}
14 changes: 14 additions & 0 deletions lib/src/dto/collaboration.canvas.created.event.payload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { JourneyBaseEventPayload } from './journey.base.event.payload';

export interface CollaborationCanvasCreatedEventPayload extends JourneyBaseEventPayload {
callout: {
displayName: string;
nameID: string;
}
canvas: {
id: string;
createdBy: string;
displayName: string;
nameID: string;
};
}
17 changes: 17 additions & 0 deletions lib/src/dto/collaboration.card.comment.event.payload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { JourneyBaseEventPayload } from './journey.base.event.payload';

export interface CollaborationCardCommentEventPayload extends JourneyBaseEventPayload {
callout: {
displayName: string;
nameID: string;
}
card: {
displayName: string;
createdBy: string;
nameID: string;
};
comment: {
message: string;
createdBy: string;
};
}
15 changes: 15 additions & 0 deletions lib/src/dto/collaboration.card.created.event.payload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { JourneyBaseEventPayload } from './journey.base.event.payload';

export interface CollaborationCardCreatedEventPayload extends JourneyBaseEventPayload {
callout: {
displayName: string;
nameID: string;
}
card: {
id: string;
createdBy: string;
displayName: string;
nameID: string;
type: string;
};
}
12 changes: 12 additions & 0 deletions lib/src/dto/collaboration.context.review.submitted.payload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { JourneyBaseEventPayload } from './journey.base.event.payload';

export interface CollaborationContextReviewSubmittedPayload
extends JourneyBaseEventPayload {
questions: FeedbackQuestions[];
}

export type FeedbackQuestions = {
name: string;
value: string;
sortOrder: number;
};
12 changes: 12 additions & 0 deletions lib/src/dto/collaboration.discussion.comment.event.payload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { JourneyBaseEventPayload } from './journey.base.event.payload';

export interface CollaborationDiscussionCommentEventPayload extends JourneyBaseEventPayload {
callout: {
displayName: string;
nameID: string;
}
comment: {
message: string;
createdBy: string;
};
}
10 changes: 10 additions & 0 deletions lib/src/dto/collaboration.interest.payload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

import { JourneyBaseEventPayload } from './journey.base.event.payload';

export interface CollaborationInterestPayload
extends JourneyBaseEventPayload {
relation: {
role: string;
description: string;
};
}
11 changes: 2 additions & 9 deletions lib/src/dto/communication.discussion.created.event.payload.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
import { HubPayload } from './hub.payload';
import { BaseEventPayload } from './base.event.payload';
import { CommunityType } from '@common/enums/community.type';
import { JourneyBaseEventPayload } from './journey.base.event.payload';

export interface CommunicationDiscussionCreatedEventPayload
extends BaseEventPayload {
extends JourneyBaseEventPayload {
discussion: {
id: string;
createdBy: string;
title: string;
description: string;
};
community: {
name: string;
type: CommunityType;
};
hub: HubPayload;
}
12 changes: 3 additions & 9 deletions lib/src/dto/communication.update.event.payload.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import { HubPayload } from './hub.payload';
import { BaseEventPayload } from './base.event.payload';
import { CommunityType } from '@common/enums/community.type';
import { JourneyBaseEventPayload } from './journey.base.event.payload';

export interface CommunicationUpdateEventPayload extends BaseEventPayload {
export interface CommunicationUpdateEventPayload extends JourneyBaseEventPayload {
update: {
id: string;
createdBy: string;
};
community: {
name: string;
type: CommunityType;
};
hub: HubPayload;

}
6 changes: 6 additions & 0 deletions lib/src/dto/community.application.created.event.payload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { JourneyPayload } from './journey.payload';
import { JourneyBaseEventPayload } from './journey.base.event.payload';

export interface CommunityApplicationCreatedEventPayload extends JourneyBaseEventPayload {
applicantID: string;
}
18 changes: 0 additions & 18 deletions lib/src/dto/community.collaboration.interest.payload.ts

This file was deleted.

15 changes: 0 additions & 15 deletions lib/src/dto/community.context.review.submitted.payload.ts

This file was deleted.

13 changes: 3 additions & 10 deletions lib/src/dto/community.new.member.payload.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import { CommunityType } from '@common/enums/community.type';
import { BaseEventPayload } from './base.event.payload';
import { HubPayload } from './hub.payload';

export interface CommunityNewMemberPayload extends BaseEventPayload {
import { JourneyBaseEventPayload } from './journey.base.event.payload';

export interface CommunityNewMemberPayload extends JourneyBaseEventPayload {
userID: string;
community: {
name: string;
url: string;
type: CommunityType;
};
hub: HubPayload;
}
13 changes: 0 additions & 13 deletions lib/src/dto/hub.payload.ts

This file was deleted.

19 changes: 11 additions & 8 deletions lib/src/dto/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
export * from './base.event.payload';
export * from './application.created.event.payload';
export * from './journey.payload';
export * from './communication.discussion.created.event.payload';
export * from './communication.update.event.payload';
export * from './community.context.review.submitted.payload';
export * from './community.application.created.event.payload';
export * from './community.new.member.payload';
export * from './community.collaboration.interest.payload';
export * from './user.registration.event.payload';
export * from './hub.payload';
export * from './aspect.created.event.payload';
export * from './aspect.comment.created.event.payload';
export * from './callout.published.event.payload';
export * from './collaboration.interest.payload';
export * from './collaboration.canvas.created.event.payload';
export * from './collaboration.card.created.event.payload';
export * from './collaboration.context.review.submitted.payload';
export * from './collaboration.card.comment.event.payload';
export * from './collaboration.callout.published.event.payload';
export * from './collaboration.discussion.comment.event.payload';
export * from './platform.user.registration.event.payload';
export * from './platform.user.removed.event.payload';
8 changes: 8 additions & 0 deletions lib/src/dto/journey.base.event.payload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { JourneyPayload } from './journey.payload';
import { BaseEventPayload } from './base.event.payload';

export interface JourneyBaseEventPayload
extends BaseEventPayload {

journey: JourneyPayload;
}
16 changes: 16 additions & 0 deletions lib/src/dto/journey.payload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { JourneyType } from "@src/common/enums/journey.type";

export type JourneyPayload = {
hubID: string;
hubNameID: string;
displayName: string;
type: JourneyType;
challenge?: {
id: string;
nameID: string;
opportunity?: {
nameID: string;
id: string;
};
};
};
Loading

0 comments on commit add5b44

Please sign in to comment.