Skip to content

Commit

Permalink
Merge pull request #4457 from michaldziuba03/nv-2960-add-zulip-provider
Browse files Browse the repository at this point in the history
feat(providers): add zulip
  • Loading branch information
Cliftonz authored Oct 31, 2023
2 parents 93b09c9 + 765d7f4 commit a063e8e
Show file tree
Hide file tree
Showing 23 changed files with 2,185 additions and 642 deletions.
4 changes: 3 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,9 @@
"messagebird",
"Datetime",
"simpletexting",
"Simpletexting"
"Simpletexting",
"Zulip",
"zulip"
],
"flagWords": [],
"patterns": [
Expand Down
14 changes: 14 additions & 0 deletions apps/web/public/static/images/providers/dark/square/zulip.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions apps/web/public/static/images/providers/dark/zulip.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions apps/web/public/static/images/providers/light/square/zulip.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions apps/web/public/static/images/providers/light/zulip.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions libs/shared/src/consts/providers/channels/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,12 @@ export const chatProviders: IProviderConfig[] = [
docReference: 'https://api.ryver.com/ryvrest_api_examples.html#create-chat-message',
logoFileName: { light: 'ryver.png', dark: 'ryver.png' },
},
{
id: ChatProviderIdEnum.Zulip,
displayName: 'Zulip',
channel: ChannelTypeEnum.CHAT,
credentials: [] as IConfigCredentials[],
docReference: 'https://docs.novu.co/channels-and-providers/chat/zulip',
logoFileName: { light: 'zulip.svg', dark: 'zulip.svg' },
},
];
1 change: 1 addition & 0 deletions libs/shared/src/consts/providers/provider.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export enum ChatProviderIdEnum {
MsTeams = 'msteams',
Mattermost = 'mattermost',
Ryver = 'ryver',
Zulip = 'zulip',
}

export enum PushProviderIdEnum {
Expand Down
1 change: 1 addition & 0 deletions packages/application-generic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"@novu/termii": "^0.21.0",
"@novu/testing": "^0.21.0",
"@novu/twilio": "^0.21.0",
"@novu/zulip": "^0.21.0",
"@sentry/node": "^7.12.1",
"analytics-node": "^6.2.0",
"bullmq": "^3.10.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { DiscordHandler } from './handlers/discord.handler';
import { MSTeamsHandler } from './handlers/msteams.handler';
import { MattermostHandler } from './handlers/mattermost.handler';
import { RyverHandler } from './handlers/ryver.handler';
import { ZulipHandler } from './handlers/zulip.handler';

export class ChatFactory implements IChatFactory {
handlers: IChatHandler[] = [
Expand All @@ -13,6 +14,7 @@ export class ChatFactory implements IChatFactory {
new MSTeamsHandler(),
new MattermostHandler(),
new RyverHandler(),
new ZulipHandler(),
];

getHandler(integration: IntegrationEntity) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { ICredentials, ChatProviderIdEnum } from '@novu/shared';
import { ChannelTypeEnum } from '@novu/stateless';
import { BaseChatHandler } from './base.handler';
import { ZulipProvider } from '@novu/zulip';

export class ZulipHandler extends BaseChatHandler {
constructor() {
super(ChatProviderIdEnum.Zulip, ChannelTypeEnum.CHAT);
}

buildProvider(_credentials: ICredentials) {
this.provider = new ZulipProvider({});
}
}
Loading

1 comment on commit a063e8e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.