Skip to content

Commit

Permalink
fix(root): add novu cli flags and remove magicbell (#6779)
Browse files Browse the repository at this point in the history
  • Loading branch information
jainpawan21 authored Oct 27, 2024
1 parent dc51c99 commit acdffc6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 19 deletions.
19 changes: 9 additions & 10 deletions packages/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ Novu provides a single API to manage providers across multiple channels with a s
#### 📱 In-App

- [x] [Novu](https://docs.novu.co/notification-center/introduction?utm_campaign=node-sdk-readme)
- [ ] MagicBell

#### Other (Coming Soon...)

Expand Down Expand Up @@ -295,7 +294,7 @@ await novu.subscribers.setCredentials(
{
webhookUrl: ['webhookUrl'],
},
'slack_identifier'
'slack_identifier',
);
```

Expand Down Expand Up @@ -363,13 +362,13 @@ const novu = new Novu('<NOVU_SECRET_KEY>');
// Get global level preference
await novu.subscribers.getPreferenceByLevel(
'subscriberId',
PreferenceLevelEnum.GLOBAL
PreferenceLevelEnum.GLOBAL,
);

// Get template level preference
await novu.subscribers.getPreferenceByLevel(
'subscriberId',
PreferenceLevelEnum.TEMPLATE
PreferenceLevelEnum.TEMPLATE,
);
```

Expand Down Expand Up @@ -486,14 +485,14 @@ const novu = new Novu('<NOVU_SECRET_KEY>');
await novu.subscribers.markAllMessagesAs(
'subscriberId',
MarkMessageAsEnum.SEEN,
'feedId'
'feedId',
);

// mark all messages as read
await novu.subscribers.markAllMessagesAs(
'subscriberId',
MarkMessageAsEnum.READ,
'feedId'
'feedId',
);
```

Expand All @@ -511,7 +510,7 @@ await novu.subscribers.markMessageActionSeen(
ButtonTypeEnum.PRIMARY,
{
status: MessageActionStatusEnum.PENDING,
}
},
);

// mark a message's secondary action button as done
Expand All @@ -521,7 +520,7 @@ await novu.subscribers.markMessageActionSeen(
ButtonTypeEnum.SECONDARY,
{
status: MessageActionStatusEnum.DONE,
}
},
);
```

Expand Down Expand Up @@ -1382,7 +1381,7 @@ const novu = new Novu('<NOVU_SECRET_KEY>');

await novu.workflowOverrides.getOneByTenantIdandWorkflowId(
'workflowId_123',
'tenantId_123'
'tenantId_123',
);
```

Expand All @@ -1398,7 +1397,7 @@ await novu.workflowOverrides.updateOneByTenantIdandWorkflowId(
'tenantId_123',
{
active: false,
}
},
);
```

Expand Down
29 changes: 23 additions & 6 deletions packages/novu/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,31 @@
```bash
npx novu@latest dev
```


## 🔥 Flags

| flag | long form usage example | description | default value |
| ---- | ----------------------- | ----------------------------- | --------------------------- |
| -p | --port <port> | local bridge application port | 4000 |
| -r | --route <route> | bridge application route | /api/novu |
| -o | --origin <origin> | bridge application origin | http://localhost |
| -d | --dashboard-url <url> | Novu cloud dashboard URL | https://dashboard.novu.co |
| -sp | --studio-port <port> | Local Studio server port | 2022 |
| -t | --tunnel <url> | self hosted tunnel url | https://my-tunnel.ngrok.app |

Example: If bridge application is running on port `3002` and Novu account is in `EU` region.

```bash
npx novu@latest dev --port 3002 --dashboard-url https://eu.dashboard.novu.co
```

## ⭐️ Why

Building a notification system is hard, at first it seems like just sending an email but in reality it's just the beginning. In today's world users expect multichannel communication experience over email, sms, push, chat and more... An ever-growing list of providers are popping up each day, and notifications are spread around the code. Novu's goal is to simplify notifications and provide developers the tools to create meaningful communication between the system and its users.

## ✨ Features

- 🌈 Single API for all messaging providers (Email, SMS, Push, Chat)
- 🌈 Single API for all messaging provide`rs (Email, SMS, Push, Chat)
- 💅 Easily manage notification over multiple channels
- 🚀 Equipped with a CMS for advanced layouts and design management
- 🛡 Built-in protection for missing variables (Coming Soon)
Expand Down Expand Up @@ -76,7 +94,7 @@ await novu.trigger('<TRIGGER_NAME>', {
name: 'Hello World',
organization: {
logo: 'https://happycorp.com/logo.png',
}
},
},
});
```
Expand Down Expand Up @@ -123,14 +141,14 @@ Novu provides a single API to manage providers across multiple channels with a s
- [ ] Bandwidth
- [ ] RingCentral

#### 📱 Push
#### 📱 Push

- [x] [FCM](https://github.com/novuhq/novu/tree/main/providers/fcm)
- [x] [Expo](https://github.com/novuhq/novu/tree/main/providers/expo)
- [ ] [SNS](https://github.com/novuhq/novu/tree/main/providers/sns)
- [ ] Pushwoosh

#### 👇 Chat
#### 👇 Chat

- [x] [Slack](https://github.com/novuhq/novu/tree/main/providers/slack)
- [x] [Discord](https://github.com/novuhq/novu/tree/main/providers/discord)
Expand All @@ -140,7 +158,6 @@ Novu provides a single API to manage providers across multiple channels with a s
#### 📱 In-App

- [x] [Novu](https://docs.novu.co/notification-center/introduction?utm_campaign=inapp-cli-readme)
- [ ] MagicBell

#### Other (Coming Soon...)

Expand Down
2 changes: 1 addition & 1 deletion packages/novu/src/commands/init/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export async function init(program: IInitCommandOptions, anonymousId?: string):
} catch (error) {
console.error(
// eslint-disable-next-line max-len
`Failed to verify your secret key against ${program.apiUrl}. For EU instances use --api-url https://eu.novu.co or provide the correct secret key`
`Failed to verify your secret key against ${program.apiUrl}. For EU instances use --api-url https://eu.api.novu.co or provide the correct secret key`
);

process.exit(1);
Expand Down
3 changes: 1 addition & 2 deletions packages/stateless/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ await novu.registerProvider(
new SendgridEmailProvider({
apiKey: process.env.SENDGRID_API_KEY,
from: '[email protected]',
})
}),
);

const passwordResetTemplate = await novu.registerTemplate({
Expand Down Expand Up @@ -100,7 +100,6 @@ Novu provides a single API to manage providers across multiple channels with a s
#### 📱 In-App

- [x] [Novu](https://docs.novu.co/notification-center/introduction?utm_source=github-stateless-readme)
- [ ] MagicBell

#### Other (Coming Soon...)

Expand Down

0 comments on commit acdffc6

Please sign in to comment.