From acdffc615e1a254531f0c6807ac91d75b3667eac Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Sun, 27 Oct 2024 23:33:52 +0530 Subject: [PATCH] fix(root): add novu cli flags and remove magicbell (#6779) --- packages/node/README.md | 19 ++++++++-------- packages/novu/README.MD | 29 +++++++++++++++++++----- packages/novu/src/commands/init/index.ts | 2 +- packages/stateless/README.md | 3 +-- 4 files changed, 34 insertions(+), 19 deletions(-) diff --git a/packages/node/README.md b/packages/node/README.md index cbeba162560..219b958e2dd 100644 --- a/packages/node/README.md +++ b/packages/node/README.md @@ -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...) @@ -295,7 +294,7 @@ await novu.subscribers.setCredentials( { webhookUrl: ['webhookUrl'], }, - 'slack_identifier' + 'slack_identifier', ); ``` @@ -363,13 +362,13 @@ const novu = new Novu(''); // 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, ); ``` @@ -486,14 +485,14 @@ const novu = new Novu(''); await novu.subscribers.markAllMessagesAs( 'subscriberId', MarkMessageAsEnum.SEEN, - 'feedId' + 'feedId', ); // mark all messages as read await novu.subscribers.markAllMessagesAs( 'subscriberId', MarkMessageAsEnum.READ, - 'feedId' + 'feedId', ); ``` @@ -511,7 +510,7 @@ await novu.subscribers.markMessageActionSeen( ButtonTypeEnum.PRIMARY, { status: MessageActionStatusEnum.PENDING, - } + }, ); // mark a message's secondary action button as done @@ -521,7 +520,7 @@ await novu.subscribers.markMessageActionSeen( ButtonTypeEnum.SECONDARY, { status: MessageActionStatusEnum.DONE, - } + }, ); ``` @@ -1382,7 +1381,7 @@ const novu = new Novu(''); await novu.workflowOverrides.getOneByTenantIdandWorkflowId( 'workflowId_123', - 'tenantId_123' + 'tenantId_123', ); ``` @@ -1398,7 +1397,7 @@ await novu.workflowOverrides.updateOneByTenantIdandWorkflowId( 'tenantId_123', { active: false, - } + }, ); ``` diff --git a/packages/novu/README.MD b/packages/novu/README.MD index 1b03e37af2e..a1b0e763059 100644 --- a/packages/novu/README.MD +++ b/packages/novu/README.MD @@ -31,13 +31,31 @@ ```bash npx novu@latest dev ``` - + +## 🔥 Flags + +| flag | long form usage example | description | default value | +| ---- | ----------------------- | ----------------------------- | --------------------------- | +| -p | --port | local bridge application port | 4000 | +| -r | --route | bridge application route | /api/novu | +| -o | --origin | bridge application origin | http://localhost | +| -d | --dashboard-url | Novu cloud dashboard URL | https://dashboard.novu.co | +| -sp | --studio-port | Local Studio server port | 2022 | +| -t | --tunnel | 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) @@ -76,7 +94,7 @@ await novu.trigger('', { name: 'Hello World', organization: { logo: 'https://happycorp.com/logo.png', - } + }, }, }); ``` @@ -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) @@ -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...) diff --git a/packages/novu/src/commands/init/index.ts b/packages/novu/src/commands/init/index.ts index 12e18a58c40..a68f79ac44d 100644 --- a/packages/novu/src/commands/init/index.ts +++ b/packages/novu/src/commands/init/index.ts @@ -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); diff --git a/packages/stateless/README.md b/packages/stateless/README.md index 2c7abe7c3db..e91bf79ad18 100644 --- a/packages/stateless/README.md +++ b/packages/stateless/README.md @@ -20,7 +20,7 @@ await novu.registerProvider( new SendgridEmailProvider({ apiKey: process.env.SENDGRID_API_KEY, from: 'sender@mail.com', - }) + }), ); const passwordResetTemplate = await novu.registerTemplate({ @@ -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...)