diff --git a/additional-resources/idempotency.mdx b/additional-resources/idempotency.mdx index 355fcd26..af7824f8 100644 --- a/additional-resources/idempotency.mdx +++ b/additional-resources/idempotency.mdx @@ -68,7 +68,7 @@ After this period, the reused key will be treated as a new request and response. ```javascript import { Novu } from '@novu/node'; - const novu = new Novu(""); + const novu = new Novu(""); await novu.trigger("", { to: { @@ -92,7 +92,7 @@ After this period, the reused key will be treated as a new request and response. ```javascript import { Novu } from '@novu/node'; - const novu = new Novu("", { + const novu = new Novu("", { retryConfig: { retryMax: 5 } diff --git a/api-reference/changes/apply-change.mdx b/api-reference/changes/apply-change.mdx index e32c6b59..1a19feec 100644 --- a/api-reference/changes/apply-change.mdx +++ b/api-reference/changes/apply-change.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.changes.applyOne("changeId"); ```` @@ -18,14 +18,14 @@ await novu.changes.applyOne("changeId"); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->applyChange($changeId, []); ```` ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.apply_change(`'); +const novu = new Novu(''); await novu.changes.applyMany(["changeId1", "changeId2"]); ```` @@ -18,7 +18,7 @@ await novu.changes.applyMany(["changeId1", "changeId2"]); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->applyBulkChanges([ 'changeIds' = [ '' @@ -29,7 +29,7 @@ $novu->applyBulkChanges([ ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.apply_change({ 'changeIds' => [''] @@ -40,7 +40,7 @@ client.apply_change({ from novu.api import ChangeApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = ChangeApi(url, api_key).bulk_apply( change_ids = "", ) @@ -51,7 +51,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.applyBulkChanges(""); diff --git a/api-reference/changes/get-changes-count.mdx b/api-reference/changes/get-changes-count.mdx index 0bb0e891..972f7a1a 100644 --- a/api-reference/changes/get-changes-count.mdx +++ b/api-reference/changes/get-changes-count.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.changes.getCount(); ```` @@ -18,14 +18,14 @@ await novu.changes.getCount(); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->getChangesCount()->toArray(); ```` ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.count_changes() ``` @@ -34,7 +34,7 @@ client.count_changes() from novu.api import ChangeApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = ChangeApi(url, api_key).count( ) ``` @@ -44,7 +44,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.countChanges(); diff --git a/api-reference/changes/get-changes.mdx b/api-reference/changes/get-changes.mdx index b31aefbd..20af96f0 100644 --- a/api-reference/changes/get-changes.mdx +++ b/api-reference/changes/get-changes.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.changes.get(); ```` @@ -18,14 +18,14 @@ await novu.changes.get(); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->getChanges(); ```` ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.changes({ 'page' => 1, # optional @@ -38,7 +38,7 @@ client.changes({ from novu.api import ChangeApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = ChangeApi(url, api_key).list( page = "", limit = "", @@ -50,7 +50,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.changes(query = {}); diff --git a/api-reference/environments/get-api-keys.mdx b/api-reference/environments/get-api-keys.mdx index 265336fa..ce799f00 100644 --- a/api-reference/environments/get-api-keys.mdx +++ b/api-reference/environments/get-api-keys.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.environmets.getApiKeys(); ```` @@ -18,14 +18,14 @@ await novu.environmets.getApiKeys(); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->getEnvironmentsAPIKeys()->toArray(); ```` ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.api_keys() ``` @@ -34,7 +34,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.apiKeys(); @@ -46,7 +46,7 @@ public class Main { from novu.api import EnvironmentApi url = "https://api.novu.co" -api_key = "" +api_key = "" apiKeys = EnvironmentApi(url, api_key).api_keys() ``` @@ -64,7 +64,7 @@ fun main() { ```bash cURL curl --request GET \ --url https://api.novu.co/v1/environments/api-keys \ - --header 'Authorization: ApiKey ' + --header 'Authorization: ApiKey ' ``` diff --git a/api-reference/environments/get-current-environment.mdx b/api-reference/environments/get-current-environment.mdx index af67ee80..a729fa73 100644 --- a/api-reference/environments/get-current-environment.mdx +++ b/api-reference/environments/get-current-environment.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.environments.getCurrent(); @@ -19,7 +19,7 @@ await novu.environments.getCurrent(); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->getCurrentEnvironment()->toArray(); ```` @@ -27,7 +27,7 @@ $novu->getCurrentEnvironment()->toArray(); ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.current_environment() ``` @@ -36,7 +36,7 @@ client.current_environment() from novu.api import EnvironmentApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = EnvironmentApi(url, api_key).current( ) ``` @@ -46,7 +46,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.currentEnvironment(); @@ -68,7 +68,7 @@ fun main() { ```bash cURL curl --request GET \ --url https://api.novu.co/v1/environments/me \ - --header 'Authorization: ApiKey ' + --header 'Authorization: ApiKey ' ``` diff --git a/api-reference/environments/get-environments.mdx b/api-reference/environments/get-environments.mdx index 43d98a30..2e10a7f7 100644 --- a/api-reference/environments/get-environments.mdx +++ b/api-reference/environments/get-environments.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.environments.getAll(); @@ -19,14 +19,14 @@ await novu.environments.getAll(); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->getEnvironments()->toArray(); ```` ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.environments() ``` @@ -34,7 +34,7 @@ client.environments() from novu.api import EnvironmentApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = EnvironmentApi(url, api_key).list( ) ``` @@ -44,7 +44,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.environments(); @@ -66,7 +66,7 @@ fun main() { ```bash cURL curl --request GET \ --url https://api.novu.co/v1/environments \ - --header 'Authorization: ApiKey ' + --header 'Authorization: ApiKey ' ``` diff --git a/api-reference/environments/regenerate-api-keys.mdx b/api-reference/environments/regenerate-api-keys.mdx index cdec258f..fb68746a 100644 --- a/api-reference/environments/regenerate-api-keys.mdx +++ b/api-reference/environments/regenerate-api-keys.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.environmets.regenerateApiKeys(); ```` @@ -18,14 +18,14 @@ await novu.environmets.regenerateApiKeys(); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $key = $novu->regenerateEnvironmentsAPIKeys()->toArray(); ```` ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.regenerate_api_keys() ``` @@ -34,7 +34,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.regenerateApiKeys(); @@ -46,14 +46,14 @@ public class Main { from novu.api import EnvironmentApi url = "https://api.novu.co" -api_key = "" +api_key = "" regenerateApiKey = EnvironmentApi(url, api_key).regenerate_api_key() ``` ```bash cURL curl --request POST \ --url https://api.novu.co/v1/environments/api-keys/regenerate \ - --header 'Authorization: ApiKey ' + --header 'Authorization: ApiKey ' ``` diff --git a/api-reference/events/broadcast-event-to-all.mdx b/api-reference/events/broadcast-event-to-all.mdx index 090f1470..77a0d0ee 100644 --- a/api-reference/events/broadcast-event-to-all.mdx +++ b/api-reference/events/broadcast-event-to-all.mdx @@ -11,7 +11,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.events.broadcast("", { payload: { @@ -32,7 +32,7 @@ await novu.events.broadcast("", { ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->broadcastEvent([ 'name' => '', @@ -44,7 +44,7 @@ $novu->broadcastEvent([ ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') payload = { 'name' => 'Trigger', @@ -59,7 +59,7 @@ client.broadcast_event(payload) ```bash cURL curl -X POST https://api.novu.co/v1/events/trigger/broadcast \ - -H "Authorization: ApiKey " \ + -H "Authorization: ApiKey " \ -H "Content-Type: application/json" \ -d '{ "name": "", @@ -89,7 +89,7 @@ import ( ) func main() { - apiKey := "" + apiKey := "" ctx := context.Background() novuClient := novu.NewAPIClient(apiKey, &novu.Config{}) @@ -118,7 +118,7 @@ func main() { from novu.api import EventApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = EventApi(url, api_key).broadcast( name="", @@ -134,7 +134,7 @@ import co.novu.api.events.responses.TriggerEventResponse; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); diff --git a/api-reference/events/bulk-trigger-event.mdx b/api-reference/events/bulk-trigger-event.mdx index d7d8219d..8aeea1df 100644 --- a/api-reference/events/bulk-trigger-event.mdx +++ b/api-reference/events/bulk-trigger-event.mdx @@ -11,7 +11,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); await novu.events.bulkTrigger([ { @@ -56,7 +56,7 @@ await novu.events.bulkTrigger([ ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->bulkTriggerEvent([ [ @@ -75,7 +75,7 @@ $novu->bulkTriggerEvent([ ```bash cURL curl -X POST https://api.novu.co/v1/events/trigger/bulk \ - -H "Authorization: ApiKey " \ + -H "Authorization: ApiKey " \ -H "Content-Type: application/json" \ -d '{ "events": [ @@ -128,7 +128,7 @@ curl -X POST https://api.novu.co/v1/events/trigger/bulk \ ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') payload = { 'events' => [ @@ -168,7 +168,7 @@ import ( ) func main() { - apiKey := "" + apiKey := "" ctx := context.Background() novuClient := novu.NewAPIClient(apiKey, &novu.Config{}) @@ -216,7 +216,7 @@ from novu.dto.event import InputEventDto from novu.api import EventApi url = "https://api.novu.co" -api_key = "" +api_key = "" event_1 = InputEventDto( name="", # The workflow ID is the slug of the workflow name. It can be found on the workflow page. @@ -243,7 +243,7 @@ import co.novu.api.events.responses.BulkTriggerEventResponse; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); diff --git a/api-reference/events/cancel-triggered-event.mdx b/api-reference/events/cancel-triggered-event.mdx index d52c5891..73c9c941 100644 --- a/api-reference/events/cancel-triggered-event.mdx +++ b/api-reference/events/cancel-triggered-event.mdx @@ -11,7 +11,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.events.cancel("transactionId"); ``` @@ -19,7 +19,7 @@ await novu.events.cancel("transactionId"); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $transactionId = "transactionId"; @@ -29,7 +29,7 @@ $novu->cancelEvent($transactionId); ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.cancel_triggered_event('transactionId') ``` @@ -45,7 +45,7 @@ import ( ) func main() { - apiKey := "" + apiKey := "" ctx := context.Background() novuClient := novu.NewAPIClient(apiKey, &novu.Config{}) @@ -65,7 +65,7 @@ func main() { curl --request DELETE \ --url https://api.novu.co/v1/events/trigger/ \ - --header 'Authorization: ApiKey ' + --header 'Authorization: ApiKey ' ``` @@ -73,7 +73,7 @@ curl --request DELETE \ from novu.api import EventApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = EventApi(url, api_key).delete("transactionId"); ``` @@ -84,7 +84,7 @@ import co.novu.api.events.responses.CancelEventResponse; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); diff --git a/api-reference/events/trigger-event.mdx b/api-reference/events/trigger-event.mdx index 86040662..89725928 100644 --- a/api-reference/events/trigger-event.mdx +++ b/api-reference/events/trigger-event.mdx @@ -11,7 +11,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.trigger("", { to: { @@ -32,7 +32,7 @@ await novu.trigger("", { ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->triggerEvent([ 'name' => '', @@ -47,7 +47,7 @@ $novu->triggerEvent([ ```bash cURL curl -X POST https://api.novu.co/v1/events/trigger \ - -H "Authorization: ApiKey " \ + -H "Authorization: ApiKey " \ -H "Content-Type: application/json" \ -d '{ "name": "", @@ -69,7 +69,7 @@ curl -X POST https://api.novu.co/v1/events/trigger \ ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') payload = { 'name' => '', @@ -97,7 +97,7 @@ import ( func main() { subscriberID := "" - apiKey := "" + apiKey := "" eventId := "" ctx := context.Background() @@ -131,7 +131,7 @@ func main() { from novu.api import EventApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = EventApi(url, api_key).trigger( name="", # This is the Workflow ID. It can be found on the workflow page. @@ -148,7 +148,7 @@ import co.novu.api.events.responses.TriggerEventResponse; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); diff --git a/api-reference/execution-details/get-execution-details.mdx b/api-reference/execution-details/get-execution-details.mdx index 9d98c558..40ba1842 100644 --- a/api-reference/execution-details/get-execution-details.mdx +++ b/api-reference/execution-details/get-execution-details.mdx @@ -25,7 +25,7 @@ const data = await response.json(); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); // Get execution details $novu->getExecutionDetails([ @@ -37,7 +37,7 @@ $novu->getExecutionDetails([ ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.execution_details({ 'notificationId' => '8fxxx-xxx-ef9xxxxce66', @@ -49,7 +49,7 @@ client.execution_details({ from novu.api import ExecutionDetailApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = ExecutionDetailApi(url, api_key).list( notification_id = "", subscriber_id = "", @@ -61,7 +61,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.executionDetails(query = {}); diff --git a/api-reference/feeds/create-feed.mdx b/api-reference/feeds/create-feed.mdx index 53cb98bd..0a2211a3 100644 --- a/api-reference/feeds/create-feed.mdx +++ b/api-reference/feeds/create-feed.mdx @@ -11,7 +11,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```bash cURL curl --request POST \ --url https://api.novu.co/v1/feeds \ ---header 'Authorization: ApiKey ' \ +--header 'Authorization: ApiKey ' \ --header 'Content-Type: application/json' \ --data '{"name": ""}' ``` @@ -19,14 +19,14 @@ curl --request POST \ ```javascript Node.js import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.feeds.create(""); ``` ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->createFeed([ 'name' => '' @@ -36,7 +36,7 @@ $novu->createFeed([ ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.create_feed({ 'name' => 'New feed' @@ -47,7 +47,7 @@ client.create_feed({ from novu.api import FeedApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = FeedApi(url, api_key).create( name = "", ) @@ -58,7 +58,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.createFeed(body); diff --git a/api-reference/feeds/delete-feed.mdx b/api-reference/feeds/delete-feed.mdx index 541618b6..9625fe31 100644 --- a/api-reference/feeds/delete-feed.mdx +++ b/api-reference/feeds/delete-feed.mdx @@ -11,20 +11,20 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```bash cURL curl --request DELETE \ --url https://api.novu.co/v1/feeds/{FEED_IDENTIFIER} \ ---header 'Authorization: ApiKey ' +--header 'Authorization: ApiKey ' ``` ```javascript Node.js import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.feeds.delete(""); ``` ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->deleteFeed(); ``` @@ -32,7 +32,7 @@ $novu->deleteFeed(); ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.delete_feed("") ``` @@ -41,7 +41,7 @@ client.delete_feed("") from novu.api import FeedApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = FeedApi(url, api_key).delete( Feed_Id = "", ) @@ -52,7 +52,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.deleteFeed(Feed_Id); diff --git a/api-reference/feeds/get-feeds.mdx b/api-reference/feeds/get-feeds.mdx index 15036ea3..fea43766 100644 --- a/api-reference/feeds/get-feeds.mdx +++ b/api-reference/feeds/get-feeds.mdx @@ -11,20 +11,20 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```bash cURL curl --request GET \ --url https://api.novu.co/v1/feeds \ ---header 'Authorization: ApiKey ' +--header 'Authorization: ApiKey ' ``` ```javascript Node.js import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.feeds.get(); ``` ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->getFeeds()->toArray(); ``` @@ -32,7 +32,7 @@ $novu->getFeeds()->toArray(); ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.feeds() ``` @@ -41,7 +41,7 @@ client.feeds() from novu.api import FeedApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = FeedApi(url, api_key).list( ) ``` @@ -51,7 +51,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.feeds(); diff --git a/api-reference/integrations/create-integration.mdx b/api-reference/integrations/create-integration.mdx index 2e547059..d280b31a 100644 --- a/api-reference/integrations/create-integration.mdx +++ b/api-reference/integrations/create-integration.mdx @@ -12,7 +12,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; curl --location 'https://api.novu.co/v1/integrations' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ ---header 'Authorization: ApiKey ' \ +--header 'Authorization: ApiKey ' \ --data '{ "name": "SES", "identifier": "ses-NkIQ5Koy3-123", @@ -34,7 +34,7 @@ curl --location 'https://api.novu.co/v1/integrations' \ ```javascript Node.js import { Novu, ChannelTypeEnum, ProvidersIdEnum } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); const createPaylod = { name: "SendGrid", @@ -56,7 +56,7 @@ await novu.integrations.create(ProvidersIdEnum.SendGrid, createPayload); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); // Create integration $novu->createIntegration([ @@ -73,7 +73,7 @@ $novu->createIntegration([ ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') body = { 'providerId' => '', @@ -91,7 +91,7 @@ client.create_integration(body) from novu.api import IntegrationApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = IntegrationApi(url, api_key).create( integration="", # Integration instance that you want to create. check="", # If you want the Novu server to check his connection using given integration configuration. Defaults to True. @@ -104,7 +104,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.createIntegration(body) diff --git a/api-reference/integrations/delete-integration.mdx b/api-reference/integrations/delete-integration.mdx index fe8c8430..8e83c245 100644 --- a/api-reference/integrations/delete-integration.mdx +++ b/api-reference/integrations/delete-integration.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.integrations.delete("integrationId"); @@ -20,14 +20,14 @@ await novu.integrations.delete("integrationId"); // Get integrations use Novu\SDK\Novu; -$novu = new Novu(''); +$novu = new Novu(''); $novu->deleteIntegration($integrationId); ```` ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.delete_integration('') ``` @@ -35,7 +35,7 @@ client.delete_integration('') from novu.api import IntegrationApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = IntegrationApi(url, api_key).delete( integration_id="", ) @@ -46,7 +46,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.deleteIntegration(integrationId); diff --git a/api-reference/integrations/get-active-integrations.mdx b/api-reference/integrations/get-active-integrations.mdx index 4dbc8f91..1c22739e 100644 --- a/api-reference/integrations/get-active-integrations.mdx +++ b/api-reference/integrations/get-active-integrations.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.integrations.getActive(); @@ -19,14 +19,14 @@ await novu.integrations.getActive(); // Get integrations use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->getActiveIntegrations()->toArray(); ```` ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.active_integrations() ``` @@ -34,7 +34,7 @@ client.active_integrations() from novu.api import IntegrationApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = IntegrationApi(url, api_key).list( only_active=true # This allows one to retrieve only active integrations. Defaults to False. ) @@ -45,7 +45,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.activeIntegrations() diff --git a/api-reference/integrations/get-integrations.mdx b/api-reference/integrations/get-integrations.mdx index 89785c20..7db11155 100644 --- a/api-reference/integrations/get-integrations.mdx +++ b/api-reference/integrations/get-integrations.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.integrations.getAll(); @@ -20,14 +20,14 @@ await novu.integrations.getAll(); // Get integrations use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->getIntegrations()->toArray(); ```` ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.integrations() ``` @@ -55,7 +55,7 @@ func main() { from novu.api import IntegrationApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = IntegrationApi(url, api_key).list( ) ``` @@ -65,7 +65,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.integrations() diff --git a/api-reference/integrations/get-webhook-support-status-for-provider.mdx b/api-reference/integrations/get-webhook-support-status-for-provider.mdx index 782d7bf2..31dd7616 100644 --- a/api-reference/integrations/get-webhook-support-status-for-provider.mdx +++ b/api-reference/integrations/get-webhook-support-status-for-provider.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu, ProvidersIdEnum } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.integrations.getWebhookProviderStatus(ProvidersIdEnum.SendGrid); @@ -19,14 +19,14 @@ await novu.integrations.getWebhookProviderStatus(ProvidersIdEnum.SendGrid); // Get integrations use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->getWebhookSupportStatusForProvider($providerId)->toArray(); ```` ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.webhook_provider_status('') ``` @@ -34,7 +34,7 @@ client.webhook_provider_status('') from novu.api import IntegrationApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = IntegrationApi(url, api_key).status( provider_id="", # Get webhook support status for a given provider using its providerID. ) @@ -45,7 +45,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.webhookProviderStatus(providerId); diff --git a/api-reference/integrations/set-integration-as-primary.mdx b/api-reference/integrations/set-integration-as-primary.mdx index fccf9789..51dd28b1 100644 --- a/api-reference/integrations/set-integration-as-primary.mdx +++ b/api-reference/integrations/set-integration-as-primary.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.integrations.setIntegrationAsPrimary("integrationId") diff --git a/api-reference/integrations/update-integration.mdx b/api-reference/integrations/update-integration.mdx index 24ce8f90..6c19ac65 100644 --- a/api-reference/integrations/update-integration.mdx +++ b/api-reference/integrations/update-integration.mdx @@ -11,7 +11,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu, ProvidersIdEnum } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); const updatePayload = { name: "SendGrid", @@ -36,7 +36,7 @@ await novu.integrations.getWebhookProviderStatus( // Get integrations use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->updateIntegration($integrationId, [ 'active' => true, 'credentials' => [ @@ -49,7 +49,7 @@ $novu->updateIntegration($integrationId, [ ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') body = { 'active' => true, 'check' => true @@ -64,7 +64,7 @@ client.update_integration('', body) from novu.api import IntegrationApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = IntegrationApi(url, api_key).update( integration="", ) @@ -75,7 +75,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.updateIntegration(integrationId, body); diff --git a/api-reference/layouts/delete-layout.mdx b/api-reference/layouts/delete-layout.mdx index 9cb6da5e..7a8063f3 100644 --- a/api-reference/layouts/delete-layout.mdx +++ b/api-reference/layouts/delete-layout.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.layouts.delete("layoutId"); @@ -19,7 +19,7 @@ await novu.layouts.delete("layoutId"); ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.delete_layout('') ```` @@ -27,7 +27,7 @@ client.delete_layout('') from novu.api import LayoutApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = LayoutApi(url, api_key).delete( layout_id="", ) @@ -38,7 +38,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.deleteLayout(layoutId); diff --git a/api-reference/layouts/filter-layouts.mdx b/api-reference/layouts/filter-layouts.mdx index 5e0b4035..2bcdeba9 100644 --- a/api-reference/layouts/filter-layouts.mdx +++ b/api-reference/layouts/filter-layouts.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); const params = { page: 0, // optional @@ -26,7 +26,7 @@ await novu.layouts.list(params); ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.layouts({ 'page' => 1, # optional 'pageSize' => 10, # optional @@ -39,7 +39,7 @@ client.layouts({ from novu.api import LayoutApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = LayoutApi(url, api_key).list( page="", limit="Size of each page", @@ -51,7 +51,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.layouts(query = {}); diff --git a/api-reference/layouts/get-layout.mdx b/api-reference/layouts/get-layout.mdx index 938ba5b9..2e994836 100644 --- a/api-reference/layouts/get-layout.mdx +++ b/api-reference/layouts/get-layout.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.layouts.get("layoutId"); @@ -19,7 +19,7 @@ await novu.layouts.get("layoutId"); ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') body = { 'active' => true, 'check' => true @@ -34,7 +34,7 @@ client.layout('') from novu.api import LayoutApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = LayoutApi(url, api_key).get( layout_id="" ) @@ -45,7 +45,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.layout(layoutId); diff --git a/api-reference/layouts/layout-creation.mdx b/api-reference/layouts/layout-creation.mdx index 2435e609..f794d812 100644 --- a/api-reference/layouts/layout-creation.mdx +++ b/api-reference/layouts/layout-creation.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); const payload = { content: "

Layout Start

{{{body}}}

Layout End

", @@ -34,7 +34,7 @@ await novu.layouts.create(payload); ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') payload = { 'name' => 'New layout', 'content' => '{{{body}}}', @@ -49,7 +49,7 @@ client.create_layout(payload) from novu.api import LayoutApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = LayoutApi(url, api_key).create( layout="", ) @@ -60,7 +60,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.createLayout(body); diff --git a/api-reference/layouts/set-default-layout.mdx b/api-reference/layouts/set-default-layout.mdx index 8a1ed8cd..1bd33c72 100644 --- a/api-reference/layouts/set-default-layout.mdx +++ b/api-reference/layouts/set-default-layout.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.layouts.setDefault("layoutId"); @@ -19,7 +19,7 @@ await novu.layouts.setDefault("layoutId"); ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.make_default_layout('') ```` @@ -27,7 +27,7 @@ client.make_default_layout('') from novu.api import LayoutApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = LayoutApi(url, api_key).set_default( layout_id= "", ) @@ -38,7 +38,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.makeDefaultLayout(layoutId); diff --git a/api-reference/layouts/update-a-layout.mdx b/api-reference/layouts/update-a-layout.mdx index 049eb43c..d3a68973 100644 --- a/api-reference/layouts/update-a-layout.mdx +++ b/api-reference/layouts/update-a-layout.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); const payloadToUpdate = { content: "

Layout Start

{{{body}}}

Layout End

", @@ -34,7 +34,7 @@ await novu.layouts.update("layoutId", payloadToUpdate); ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') payload = { 'name' => 'Update layout', # optional 'content' => '{{{body}}}', # optional @@ -49,7 +49,7 @@ client.update_layout('', payload) from novu.api import LayoutApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = LayoutApi(url, api_key).patch( layout= "", ) @@ -60,7 +60,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.updateLayout(layoutId, body); diff --git a/api-reference/messages/delete-message-by-transactionid.mdx b/api-reference/messages/delete-message-by-transactionid.mdx index 59c1621d..44190c0d 100644 --- a/api-reference/messages/delete-message-by-transactionid.mdx +++ b/api-reference/messages/delete-message-by-transactionid.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```cURL curl --request DELETE \ --url 'https://api.novu.co/v1/messages/transaction/{transactionId}' \ ---header 'Authorization: ApiKey ' +--header 'Authorization: ApiKey ' ``` diff --git a/api-reference/messages/delete-message.mdx b/api-reference/messages/delete-message.mdx index 7438b3fe..f84c7f0e 100644 --- a/api-reference/messages/delete-message.mdx +++ b/api-reference/messages/delete-message.mdx @@ -11,7 +11,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu, ChannelTypeEnum } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.messages.deleteById(""); ``` @@ -19,7 +19,7 @@ await novu.messages.deleteById(""); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(""); +$novu = new Novu(""); $novu->deleteMessage(); ``` @@ -27,7 +27,7 @@ $novu->deleteMessage(); ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.delete_message('') ``` @@ -36,7 +36,7 @@ client.delete_message('') from novu.api import MessageApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = MessageApi(url, api_key).delete( message_id= "The message ID to delete", ) @@ -47,7 +47,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.deleteMessage(messageId); diff --git a/api-reference/messages/get-messages.mdx b/api-reference/messages/get-messages.mdx index e5787b14..36c178a5 100644 --- a/api-reference/messages/get-messages.mdx +++ b/api-reference/messages/get-messages.mdx @@ -11,7 +11,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu, ChannelTypeEnum } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); const params = { page: 0, // optional @@ -27,7 +27,7 @@ await novu.messages.list(params); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(""); +$novu = new Novu(""); $novu->getMessages(); ``` @@ -35,7 +35,7 @@ $novu->getMessages(); ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') payload = { 'channel' => 'slack', # optional @@ -51,7 +51,7 @@ client.messages(payload) from novu.api import MessageApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = MessageApi(url, api_key).list( limit= "The number of messages to fetch, defaults to 10", page= "The page to fetch, defaults to 0", @@ -65,7 +65,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.messages(query = {}); diff --git a/api-reference/notification/get-notification-graph-statistics.mdx b/api-reference/notification/get-notification-graph-statistics.mdx index 6539c193..94d52a1a 100644 --- a/api-reference/notification/get-notification-graph-statistics.mdx +++ b/api-reference/notification/get-notification-graph-statistics.mdx @@ -11,14 +11,14 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```bash cURL curl --request GET \ --url https://api.novu.co/v1/notifications/graph/stats \ ---header 'Authorization: ApiKey ' +--header 'Authorization: ApiKey ' ``` ```python Python from novu.api import NotificationApi url = "https://api.novu.co" -api_key = "" +api_key = "" notificationApi = NotificationApi(url, api_key) @@ -29,7 +29,7 @@ list(graphStats) ```php PHP use Novu\SDK\Novu; -$novu = new Novu(''); +$novu = new Novu(''); $notificationGraphStats = $novu->getNotificationGraphStats()->toArray(); ``` diff --git a/api-reference/notification/get-notification-statistics.mdx b/api-reference/notification/get-notification-statistics.mdx index c05d9257..9519c1d4 100644 --- a/api-reference/notification/get-notification-statistics.mdx +++ b/api-reference/notification/get-notification-statistics.mdx @@ -13,7 +13,7 @@ import co.novu.Novu import co.novu.extensions.notificationsStats fun main() { - val novu = Novu(apiKey = "") + val novu = Novu(apiKey = "") val notificationsStats = novu.notificationsStats() println(notificationsStats) } @@ -22,14 +22,14 @@ fun main() { ```bash cURL curl --request GET \ --url https://api.novu.co/v1/notifications/stats \ ---header 'Authorization: ApiKey ' +--header 'Authorization: ApiKey ' ``` ```python Python from novu.api import NotificationApi url = "https://api.novu.co" -api_key = "" +api_key = "" notificationApi = NotificationApi(url, api_key) @@ -39,7 +39,7 @@ notification_stats = notificationApi.stats() ```php PHP use Novu\SDK\Novu; -$novu = new Novu(''); +$novu = new Novu(''); $notificationStats = $novu->getNotificationStats()->toArray(); ``` diff --git a/api-reference/notification/get-notification.mdx b/api-reference/notification/get-notification.mdx index bad8b4b6..215978f0 100644 --- a/api-reference/notification/get-notification.mdx +++ b/api-reference/notification/get-notification.mdx @@ -13,7 +13,7 @@ import co.novu.Novu import co.novu.extensions.notification fun main() { - val novu = Novu(apiKey = "") + val novu = Novu(apiKey = "") val notification = novu.notification("") println(notification) } @@ -22,14 +22,14 @@ fun main() { ```bash cURL curl --request GET \ --url https://api.novu.co/v1/notifications/{notificationId} \ ---header 'Authorization: ApiKey ' +--header 'Authorization: ApiKey ' ``` ```python Python from novu.api import NotificationApi url = "https://api.novu.co" -api_key = "" +api_key = "" notificationApi = NotificationApi(url, api_key) @@ -40,7 +40,7 @@ print(notification) ```php PHP use Novu\SDK\Novu; -$novu = new Novu(''); +$novu = new Novu(''); $notification = $novu->getNotification($notificationId)-toArray(); ``` diff --git a/api-reference/notification/get-notifications.mdx b/api-reference/notification/get-notifications.mdx index 924d33ae..5c63f910 100644 --- a/api-reference/notification/get-notifications.mdx +++ b/api-reference/notification/get-notifications.mdx @@ -14,7 +14,7 @@ import co.novu.dto.request.NotificationRequest import co.novu.extensions.notifications fun main() { - val novu = Novu(apiKey = "") + val novu = Novu(apiKey = "") val notificationRequest = NotificationRequest("", "", "", ""); val notifications = novu.notifications(notificationRequest) println(notifications) @@ -24,14 +24,14 @@ fun main() { ```bash cURL curl --request GET \ --url https://api.novu.co/v1/notifications \ ---header 'Authorization: ApiKey ' +--header 'Authorization: ApiKey ' ``` ```python Python from novu.api import NotificationApi url = "https://api.novu.co" -api_key = "" +api_key = "" notificationApi = NotificationApi(url, api_key) @@ -41,7 +41,7 @@ notifications = notificationApi.list() ```php PHP use Novu\SDK\Novu; -$novu = new Novu(''); +$novu = new Novu(''); $notifications = $novu->getNotifications()->toArray(); ``` diff --git a/api-reference/overview.mdx b/api-reference/overview.mdx index 91d3ccb4..9a0f3e4e 100644 --- a/api-reference/overview.mdx +++ b/api-reference/overview.mdx @@ -15,17 +15,17 @@ description: "In this page you can learn about how to work with Novu's API" Authentication for the Novu API involves the use of an API Key, which is a secure credential that is tied to your Novu account. This key should be included in the header of the request in the Authorization field as a string prefixed with 'ApiKey '. ```curl ---header 'Authorization: ApiKey ' +--header 'Authorization: ApiKey ' ``` For example, when using Novu in a Node.js application, the Novu package should be imported and initialized with the API key, as shown in this snippet: ```javascript import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); ``` -Replace `` with your actual API Key, available in the API Key section of the Novu Dashboard. +Replace `` with your actual API Key, available in the API Key section of the Novu Dashboard. It is advised not to hardcode your credentials in a file in production diff --git a/api-reference/subscribers/bulk-create-subscribers.mdx b/api-reference/subscribers/bulk-create-subscribers.mdx index a733ab75..4e1cd9c8 100644 --- a/api-reference/subscribers/bulk-create-subscribers.mdx +++ b/api-reference/subscribers/bulk-create-subscribers.mdx @@ -11,7 +11,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.bulkCreate([ { @@ -41,7 +41,7 @@ import co.novu.api.subscribers.requests.BulkSubscriberRequest; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); SubscriberRequest subscriberRequest1 = new SubscriberRequest(); diff --git a/api-reference/subscribers/create-subscriber.mdx b/api-reference/subscribers/create-subscriber.mdx index e67867ac..322c411b 100644 --- a/api-reference/subscribers/create-subscriber.mdx +++ b/api-reference/subscribers/create-subscriber.mdx @@ -12,7 +12,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; curl --location 'https://api.novu.co/v1/subscribers' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ - --header 'Authorization: ApiKey ' \ + --header 'Authorization: ApiKey ' \ --data-raw '{ "firstName": "Pawan", "lastName": "Jain", @@ -30,7 +30,7 @@ curl --location 'https://api.novu.co/v1/subscribers' \ ```javascript Node.js import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.identify("subscriberId", { firstName: "Pawan", @@ -50,7 +50,7 @@ await novu.subscribers.identify("subscriberId", { ```php PHP use Novu\SDK\Novu; -$novu = new Novu(''); +$novu = new Novu(''); $novu->createSubscriber([ 'subscriberId' => 'YOUR_SYSTEM_USER_ID>', @@ -65,7 +65,7 @@ $novu->createSubscriber([ ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') payload = { 'subscriberId' => '7789', @@ -83,7 +83,7 @@ from novu.dto.subscriber import SubscriberDto from novu.api.subscriber import SubscriberApi url = "https://api.novu.co" -api_key = "" +api_key = "" # Define a subscriber instance subscriber = SubscriberDto( @@ -106,7 +106,7 @@ import co.novu.api.subscribers.responses.CreateSubscriberResponse; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); SubscriberRequest subscriberRequest = new SubscriberRequest(); diff --git a/api-reference/subscribers/delete-subscriber.mdx b/api-reference/subscribers/delete-subscriber.mdx index 7046bdfc..d7c1295d 100644 --- a/api-reference/subscribers/delete-subscriber.mdx +++ b/api-reference/subscribers/delete-subscriber.mdx @@ -11,7 +11,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.delete("subscriberId"); ``` @@ -19,7 +19,7 @@ await novu.subscribers.delete("subscriberId"); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(''); +$novu = new Novu(''); $novu->deleteSubscriber($subscriberId); ``` @@ -27,7 +27,7 @@ $novu->deleteSubscriber($subscriberId); ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.delete_subscriber('') ``` @@ -37,7 +37,7 @@ from novu.dto.event import InputEventDto from novu.api import EventApi url = "https://api.novu.co" -api_key = "" +api_key = "" # Delete a subscriber novu = SubscriberApi(url, api_key).delete(subscriber_id) @@ -49,7 +49,7 @@ import co.novu.api.subscribers.responses.SubscriberDeleteResponse; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); String subscriberId = ""; diff --git a/api-reference/subscribers/get-subscriber-preferences.mdx b/api-reference/subscribers/get-subscriber-preferences.mdx index 9efcdc13..6a97c297 100644 --- a/api-reference/subscribers/get-subscriber-preferences.mdx +++ b/api-reference/subscribers/get-subscriber-preferences.mdx @@ -13,7 +13,7 @@ import co.novu.api.subscribers.responses.SubscriberPreferenceResponse; public class Main { public static void main(String[] args) { -String apiKey = ""; +String apiKey = ""; Novu novu = new Novu(apiKey); String subscriberId = ""; diff --git a/api-reference/subscribers/get-subscriber.mdx b/api-reference/subscribers/get-subscriber.mdx index 86745d22..3b538696 100644 --- a/api-reference/subscribers/get-subscriber.mdx +++ b/api-reference/subscribers/get-subscriber.mdx @@ -11,7 +11,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```javascript Node.js import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); const response = await novu.subscribers.get("subscriberId"); console.log(response.data); @@ -111,7 +111,7 @@ import co.novu.api.subscribers.responses.SingleSubscriberResponse; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); String subscriberId = ""; diff --git a/api-reference/subscribers/get-subscribers.mdx b/api-reference/subscribers/get-subscribers.mdx index 9a263883..0963e156 100644 --- a/api-reference/subscribers/get-subscribers.mdx +++ b/api-reference/subscribers/get-subscribers.mdx @@ -13,7 +13,7 @@ import co.novu.api.subscribers.responses.BulkSubscriberResponse; public class Main { public static void main(String[] args) { -String apiKey = ""; +String apiKey = ""; Novu novu = new Novu(apiKey); Integer page = 0; diff --git a/api-reference/subscribers/update-subscriber-online-status.mdx b/api-reference/subscribers/update-subscriber-online-status.mdx index 4a36e8e8..4d51634b 100644 --- a/api-reference/subscribers/update-subscriber-online-status.mdx +++ b/api-reference/subscribers/update-subscriber-online-status.mdx @@ -13,7 +13,7 @@ import co.novu.api.subscribers.requests.UpdateSubscriberOnlineStatusRequest; public class Main { public static void main(String[] args) { -String apiKey = ""; +String apiKey = ""; Novu novu = new Novu(apiKey); String subscriberId = ""; diff --git a/api-reference/subscribers/update-subscriber-preference.mdx b/api-reference/subscribers/update-subscriber-preference.mdx index 910105dd..dc926255 100644 --- a/api-reference/subscribers/update-subscriber-preference.mdx +++ b/api-reference/subscribers/update-subscriber-preference.mdx @@ -13,7 +13,7 @@ import co.novu.api.subscribers.responses.SingleSubscriberPrefResponse; public class Main { public static void main(String[] args) { -String apiKey = ""; +String apiKey = ""; Novu novu = new Novu(apiKey); String subscriberId = ""; String templateId = ""; diff --git a/api-reference/subscribers/update-subscriber.mdx b/api-reference/subscribers/update-subscriber.mdx index 2b7b1bce..16ee27a6 100644 --- a/api-reference/subscribers/update-subscriber.mdx +++ b/api-reference/subscribers/update-subscriber.mdx @@ -13,7 +13,7 @@ import co.novu.api.subscribers.requests.UpdateSubscriberRequest; public class Main { public static void main(String[] args) { -String apiKey = ""; +String apiKey = ""; Novu novu = new Novu(apiKey); String subscriberId = ""; diff --git a/api-reference/workflow-groups/create-workflow-group.mdx b/api-reference/workflow-groups/create-workflow-group.mdx index 392ae957..bbe5334b 100644 --- a/api-reference/workflow-groups/create-workflow-group.mdx +++ b/api-reference/workflow-groups/create-workflow-group.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```bash cURL curl --request POST \ --url https://api.novu.co/v1/notification-groups \ ---header 'Authorization: ApiKey ' \ +--header 'Authorization: ApiKey ' \ --header 'Content-Type: application/json' \ --data '{"name": "insert-name"}' ``` @@ -23,7 +23,7 @@ import { StepTypeEnum, } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.notificationGroups.create("Product Updates"); ``` @@ -31,7 +31,7 @@ await novu.notificationGroups.create("Product Updates"); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->createNotificationGroup([ 'name' => '' @@ -41,7 +41,7 @@ $novu->createNotificationGroup([ ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.create_notification_group({ 'name' => '' @@ -52,7 +52,7 @@ client.create_notification_group({ from novu.api import NotificationGroupApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = NotificationGroupApi(url, api_key).create( name = "", ) @@ -63,7 +63,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.createWorkflowGroup(body); diff --git a/api-reference/workflow-groups/delete-workflow-group.mdx b/api-reference/workflow-groups/delete-workflow-group.mdx index 0741804a..60b91af8 100644 --- a/api-reference/workflow-groups/delete-workflow-group.mdx +++ b/api-reference/workflow-groups/delete-workflow-group.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```bash cURL curl --request DELETE \ --url https://api.novu.co/v1/notification-groups/{id} \ ---header 'Authorization: ApiKey ' +--header 'Authorization: ApiKey ' ``` ```javascript Node.js @@ -21,7 +21,7 @@ import { StepTypeEnum, } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.notificationGroups.delete("notificationGroupId"); ``` diff --git a/api-reference/workflow-groups/get-workflow-group.mdx b/api-reference/workflow-groups/get-workflow-group.mdx index 208f0a21..8f5baa60 100644 --- a/api-reference/workflow-groups/get-workflow-group.mdx +++ b/api-reference/workflow-groups/get-workflow-group.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```bash cURL curl --request GET \ --url https://api.novu.co/v1/notification-groups/{id} \ ---header 'Authorization: ApiKey ' +--header 'Authorization: ApiKey ' ``` ```javascript Node.js @@ -21,7 +21,7 @@ import { StepTypeEnum, } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.notificationGroups.getOne("notificationGroupId"); ``` diff --git a/api-reference/workflow-groups/get-workflow-groups.mdx b/api-reference/workflow-groups/get-workflow-groups.mdx index 61efb398..2f56e921 100644 --- a/api-reference/workflow-groups/get-workflow-groups.mdx +++ b/api-reference/workflow-groups/get-workflow-groups.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```bash cURL curl --request GET \ --url https://api.novu.co/v1/notification-groups \ ---header 'Authorization: ApiKey ' \ +--header 'Authorization: ApiKey ' \ ``` ```javascript Node.js @@ -21,7 +21,7 @@ import { StepTypeEnum, } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.notificationGroups.get(); ``` @@ -29,7 +29,7 @@ await novu.notificationGroups.get(); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->getNotificationGroups()->toArray(); ``` @@ -37,7 +37,7 @@ $novu->getNotificationGroups()->toArray(); ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.notification_groups() ``` @@ -46,7 +46,7 @@ client.notification_groups() from novu.api import NotificationGroupApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = NotificationGroupApi(url, api_key).list( ) ``` @@ -56,7 +56,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.notificationGroups(); diff --git a/api-reference/workflow-groups/update-workflow-group.mdx b/api-reference/workflow-groups/update-workflow-group.mdx index 76f6e460..4f21ad8e 100644 --- a/api-reference/workflow-groups/update-workflow-group.mdx +++ b/api-reference/workflow-groups/update-workflow-group.mdx @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx"; ```bash cURL curl --request PATCH \ --url https://api.novu.co/v1/notification-groups/{id} \ ---header 'Authorization: ApiKey ' \ +--header 'Authorization: ApiKey ' \ --header 'Content-Type: application/json' \ --data '{"name": "insert-new-name"}' ``` @@ -23,7 +23,7 @@ import { StepTypeEnum, } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.notificationGroups.update("notificationGroupId", { name: "Changelog Updates", @@ -94,7 +94,7 @@ import co.novu.sdk.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.updateWorkflowGroup(workflowId, body); diff --git a/api-reference/workflows/create-workflow.mdx b/api-reference/workflows/create-workflow.mdx index a7fa47f4..63438902 100644 --- a/api-reference/workflows/create-workflow.mdx +++ b/api-reference/workflows/create-workflow.mdx @@ -28,7 +28,7 @@ import { StepTypeEnum, } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.notificationTemplates.create({ name: "Onboarding Workflow", @@ -85,7 +85,7 @@ await novu.notificationTemplates.create({ ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->createNotificationTemplate([ "name" => "name", @@ -103,7 +103,7 @@ $novu->createNotificationTemplate([ ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') body = { 'name' => '', @@ -128,7 +128,7 @@ client.create_notification_template(body) from novu.api import NotificationTemplateApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = NotificationTemplateApi(url, api_key).create( notification_template = "< The notification template form definition>", ) @@ -139,7 +139,7 @@ import co.novu.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.createWorkflow(body); @@ -188,7 +188,7 @@ import co.novu.extensions.createWorkflow class Main { fun main(args: Array) { - val apiKey = "" + val apiKey = "" val novu = Novu(apiKey) novu.createWorkflow(body) diff --git a/api-reference/workflows/delete-workflow.mdx b/api-reference/workflows/delete-workflow.mdx index 12b3c756..0498b8e2 100644 --- a/api-reference/workflows/delete-workflow.mdx +++ b/api-reference/workflows/delete-workflow.mdx @@ -26,7 +26,7 @@ import { StepTypeEnum, } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.notificationTemplates.delete("workflowId"); ``` @@ -34,14 +34,14 @@ await novu.notificationTemplates.delete("workflowId"); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->deleteNotificationTemplate($templateId); ``` ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.delete_notification_template('') ``` @@ -50,7 +50,7 @@ client.delete_notification_template('') from novu.api import NotificationTemplateApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = NotificationTemplateApi(url, api_key).delete( notification_template_id="" ) @@ -61,7 +61,7 @@ import co.novu.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.deleteWorkflow(workflowId); @@ -100,7 +100,7 @@ import co.novu.extensions.deleteWorkflow class Main { fun main(args: Array) { - val apiKey = "" + val apiKey = "" val novu = Novu(apiKey) novu.deleteWorkflow(workflowId) diff --git a/api-reference/workflows/get-workflow.mdx b/api-reference/workflows/get-workflow.mdx index c82aea64..676ef22f 100644 --- a/api-reference/workflows/get-workflow.mdx +++ b/api-reference/workflows/get-workflow.mdx @@ -22,7 +22,7 @@ import { StepTypeEnum, } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.notificationTemplates.getOne("workflowId"); ``` @@ -30,14 +30,14 @@ await novu.notificationTemplates.getOne("workflowId"); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->getANotificationTemplate($templateId); ``` ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.notification_template('') ``` @@ -45,7 +45,7 @@ client.notification_template('') from novu.api import NotificationTemplateApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = NotificationTemplateApi(url, api_key).get( notification_template_id = "< The ID of the notification template>", ) @@ -56,7 +56,7 @@ import co.novu.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.getWorkflow(workflowId); @@ -95,7 +95,7 @@ import co.novu.extensions.getWorkflow class Main { fun main(args: Array) { - val apiKey = "" + val apiKey = "" val novu = Novu(apiKey) novu.getWorkflow(workflowId) diff --git a/api-reference/workflows/get-workflows.mdx b/api-reference/workflows/get-workflows.mdx index 8f874a23..e93fc5e9 100644 --- a/api-reference/workflows/get-workflows.mdx +++ b/api-reference/workflows/get-workflows.mdx @@ -22,7 +22,7 @@ import { StepTypeEnum, } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.notificationTemplates.getAll({ page: 0, // optional @@ -33,14 +33,14 @@ await novu.notificationTemplates.getAll({ ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->getNotificationTemplates()->toArray(); ``` ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.notification_templates({ 'page' => 4, # optional @@ -52,7 +52,7 @@ client.notification_templates({ from novu.api import NotificationTemplateApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = NotificationTemplateApi(url, api_key).list( ) ``` @@ -62,7 +62,7 @@ import co.novu.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.getWorkflows(page, limit); @@ -102,7 +102,7 @@ import co.novu.extensions.getWorkflows class Main { fun main(args: Array) { - val apiKey = "" + val apiKey = "" val novu = Novu(apiKey) novu.getWorkflows(page, limit) diff --git a/api-reference/workflows/update-workflow-status.mdx b/api-reference/workflows/update-workflow-status.mdx index 448d748f..53d7cb32 100644 --- a/api-reference/workflows/update-workflow-status.mdx +++ b/api-reference/workflows/update-workflow-status.mdx @@ -26,7 +26,7 @@ import { StepTypeEnum, } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.notificationTemplates.updateStatus("workflowId", false); ``` @@ -34,7 +34,7 @@ await novu.notificationTemplates.updateStatus("workflowId", false); ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->updateNotificationTemplateStatus($templateId, [ 'active' => true @@ -44,7 +44,7 @@ $novu->updateNotificationTemplateStatus($templateId, [ ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') client.update_notification_template_status('', { 'active' => true }) ``` @@ -53,7 +53,7 @@ client.update_notification_template_status('', { 'active' => from novu.api import NotificationTemplateApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = NotificationTemplateApi(url, api_key).update_status( notification_template_id = "< The notification workflow ID of the workflow>", ) @@ -64,7 +64,7 @@ import co.novu.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.updateWorkflowStatus(workflowId, body); @@ -104,7 +104,7 @@ import co.novu.extensions.updateWorkflowStatus class Main { fun main(args: Array) { - val apiKey = "" + val apiKey = "" val novu = Novu(apiKey) novu.updateWorkflowStatus(workflowId, body) diff --git a/api-reference/workflows/update-workflow.mdx b/api-reference/workflows/update-workflow.mdx index 0ede7390..1ec4dc5c 100644 --- a/api-reference/workflows/update-workflow.mdx +++ b/api-reference/workflows/update-workflow.mdx @@ -26,7 +26,7 @@ import { StepTypeEnum, } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.notificationTemplates.update("workflowId", { name: "Send daily digest email update", @@ -40,7 +40,7 @@ await novu.notificationTemplates.update("workflowId", { ```php PHP use Novu\SDK\Novu; -$novu = new Novu(); +$novu = new Novu(); $novu->updateNotificationTemplate($templateId, [ "name" => "name", @@ -58,7 +58,7 @@ $novu->updateNotificationTemplate($templateId, [ ```ruby Ruby require 'novu' -client = Novu::Client.new('') +client = Novu::Client.new('') body = { 'name' => '', @@ -83,7 +83,7 @@ client.update_notification_template('', body) from novu.api import NotificationTemplateApi url = "https://api.novu.co" -api_key = "" +api_key = "" novu = NotificationTemplateApi(url, api_key).update( notification_template_id = "< The ID of the notification workflow to be updated>", ) @@ -94,7 +94,7 @@ import co.novu.Novu; public class Main { public static void main(String[] args) { - String apiKey = ""; + String apiKey = ""; Novu novu = new Novu(apiKey); novu.updateWorkflow(workflowId, body); @@ -142,7 +142,7 @@ import co.novu.extensions.updateWorkflow class Main { fun main(args: Array) { - val apiKey = "" + val apiKey = "" val novu = Novu(apiKey) novu.updateWorkflow(workflowId, body) diff --git a/community/run-in-local-machine.mdx b/community/run-in-local-machine.mdx index 61d77c13..d4a98010 100644 --- a/community/run-in-local-machine.mdx +++ b/community/run-in-local-machine.mdx @@ -131,7 +131,7 @@ The command `npm run setup:project` creates default environment variables that - `SENDGRID_API_KEY`The api key of the Sendgrid account used to send various emails - `MONGO_URL`The URL of your MongoDB instance - `MONGO_MAX_POOL_SIZE`The max pool size of the MongoDB connection - - `NOVU_API_KEY`The api key of dashboard.novu.co used to send various emails + - `NOVU_SECRET_KEY`The api key of dashboard.novu.co used to send various emails - `SENTRY_DSN`The DSN of sentry.io used to report errors happening in production diff --git a/concepts/subscribers.mdx b/concepts/subscribers.mdx index cd0ff9e4..0477ab67 100644 --- a/concepts/subscribers.mdx +++ b/concepts/subscribers.mdx @@ -89,7 +89,7 @@ A non-existing subscriber can be added by sending subscriber data in `to` fiel ```jsx import { Novu } from '@novu/node'; - const novu = new Novu(''); + const novu = new Novu(''); await novu.trigger('', { to: { @@ -112,7 +112,7 @@ A non-existing subscriber can be added by sending subscriber data in `to` fiel ```php use Novu\SDK\Novu; - $novu = new Novu(''); + $novu = new Novu(''); $novu->triggerEvent([ 'name' => '', @@ -146,7 +146,7 @@ Create the subscriber and then trigger the notification to this subscriber. Here ```jsx import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.subscribers.identify('111', { email: 'john.doe@domain.com', @@ -165,7 +165,7 @@ await novu.subscribers.identify('111', { ```php use Novu\SDK\Novu; -$novu = new Novu(''); +$novu = new Novu(''); $novu->createSubscriber([ 'subscriberId' => '111', diff --git a/concepts/tenants.mdx b/concepts/tenants.mdx index 633eb33e..e9d23add 100644 --- a/concepts/tenants.mdx +++ b/concepts/tenants.mdx @@ -27,7 +27,7 @@ When triggering a workflow, it is possible to pass the tenant information (id or ```javascript import { Novu } from '@novu/node'; - const novu = new Novu(""); + const novu = new Novu(""); await novu.trigger('', { @@ -48,7 +48,7 @@ When triggering a workflow, it is possible to pass the tenant information (id or ```php use Novu\SDK\Novu; - $novu = new Novu(''); + $novu = new Novu(''); $novu->triggerEvent([ 'name' => '', diff --git a/concepts/topics.mdx b/concepts/topics.mdx index ab5eb6e6..5f484cfc 100644 --- a/concepts/topics.mdx +++ b/concepts/topics.mdx @@ -20,7 +20,7 @@ In order to be able to send a notification to a topic, first the user needs to c ```typescript import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); const result = await novu.topics.create({ key: "unique-topic-identifier", @@ -35,7 +35,7 @@ That topic key can be used to retrieve the whole Topic entity: ```typescript import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); const key = "unique-topic-identifier"; @@ -49,7 +49,7 @@ Descriptive name given during creation of topic can be changed later. This can b ```typescript import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); const topicKey = "posts:comment:12345"; const topicName = "Post Comments"; @@ -76,7 +76,7 @@ Adding subscribers to the topic is the main usecase of topic. A topic is like a ```typescript import { Novu } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); const topicKey = 'posts:comment:12345'; @@ -115,7 +115,7 @@ There would be times when it would be needed to verify if a certain subscriber b ```typescript import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); const externalSubscriberId = "external-subscriber-id-1"; const topicKey = "posts:comment:12345"; @@ -139,7 +139,7 @@ A single or group of subscribers can be removed from an existing topic. ```typescript import { Novu } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); const topicKey = 'posts:comment:12345'; @@ -157,7 +157,7 @@ An existing topic can be deleted using topic-key as topic-key is the unique iden ```typescript import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); const key = "unique-topic-identifier"; diff --git a/content-creation-design/layouts.mdx b/content-creation-design/layouts.mdx index 84a9ec8f..67c0ccbc 100644 --- a/content-creation-design/layouts.mdx +++ b/content-creation-design/layouts.mdx @@ -43,7 +43,7 @@ The layout specified will be used for all emails in the context of that trigger ```ts import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); novu.trigger("workflow-identifier", { to: { diff --git a/inbox/react/advanced-configuration.mdx b/inbox/react/advanced-configuration.mdx index 43806a9a..04b64162 100644 --- a/inbox/react/advanced-configuration.mdx +++ b/inbox/react/advanced-configuration.mdx @@ -26,7 +26,7 @@ In order to enable Hash-Based Message Authentication Codes, you need to visit th ```tsx import { createHmac } from 'crypto'; -const hmacHash = createHmac('sha256', process.env.NOVU_API_KEY) +const hmacHash = createHmac('sha256', process.env.NOVU_SECRET_KEY) .update(subscriberId) .digest('hex'); ``` diff --git a/integrations/providers/chat/discord.mdx b/integrations/providers/chat/discord.mdx index 12d76b20..df6f194e 100644 --- a/integrations/providers/chat/discord.mdx +++ b/integrations/providers/chat/discord.mdx @@ -28,7 +28,7 @@ import { ChatProviderIdEnum } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.setCredentials('subscriberId', ChatProviderIdEnum.Discord, { webhookUrl: "", @@ -41,7 +41,7 @@ webhookUrl: "", curl -L -X PUT 'https://api.novu.co/v1/subscribers//credentials' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ --H 'Authorization: ApiKey ' \ +-H 'Authorization: ApiKey ' \ -d '{ "providerId": "discord", "credentials": { diff --git a/integrations/providers/chat/mattermost.mdx b/integrations/providers/chat/mattermost.mdx index 41339639..bda96458 100644 --- a/integrations/providers/chat/mattermost.mdx +++ b/integrations/providers/chat/mattermost.mdx @@ -21,7 +21,7 @@ Once you have the webhook URL, you can store it in the subscriber entity in your ```jsx import { Novu, ChatProviderIdEnum } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.setCredentials( "subscriberId", @@ -49,7 +49,7 @@ Once you have stored the API token in the subscriber entity, you can send notifi ```jsx import { Novu, ChatProviderIdEnum } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); // Get the Mattermost bot API token for the subscriber. await novu.subscribers.setCredentials( diff --git a/integrations/providers/chat/ms-teams.mdx b/integrations/providers/chat/ms-teams.mdx index 26fc5b8a..008e1662 100644 --- a/integrations/providers/chat/ms-teams.mdx +++ b/integrations/providers/chat/ms-teams.mdx @@ -32,7 +32,7 @@ import { ChatProviderIdEnum } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.setCredentials( 'subscriberId', @@ -48,7 +48,7 @@ ChatProviderIdEnum.MsTeams, // providerId curl -L -X PUT 'https://api.novu.co/v1/subscribers//credentials' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ --H 'Authorization: ApiKey ' \ +-H 'Authorization: ApiKey ' \ -d '{ "providerId": "msteams", "credentials": { diff --git a/integrations/providers/chat/overview.mdx b/integrations/providers/chat/overview.mdx index 9764a41e..6c34617a 100644 --- a/integrations/providers/chat/overview.mdx +++ b/integrations/providers/chat/overview.mdx @@ -41,7 +41,7 @@ import { ChatProviderIdEnum } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.setCredentials('subscriberId', ChatProviderIdEnum.Slack, { webhookUrl: "", @@ -54,7 +54,7 @@ webhookUrl: "", curl -L -X PUT 'https://api.novu.co/v1/subscribers//credentials' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ --H 'Authorization: ApiKey ' \ +-H 'Authorization: ApiKey ' \ -d '{ "providerId": "slack", "credentials": { diff --git a/integrations/providers/chat/slack.mdx b/integrations/providers/chat/slack.mdx index cd899c00..f7f947ea 100644 --- a/integrations/providers/chat/slack.mdx +++ b/integrations/providers/chat/slack.mdx @@ -147,7 +147,7 @@ import { ChatProviderIdEnum } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.setCredentials('subscriberId', ChatProviderIdEnum.Slack, { webhookUrl: "", @@ -160,7 +160,7 @@ await novu.subscribers.setCredentials('subscriberId', ChatProviderIdEnum.Slack, curl -L -X PUT 'https://api.novu.co/v1/subscribers//credentials' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ --H 'Authorization: ApiKey ' \ +-H 'Authorization: ApiKey ' \ -d '{ "providerId": "slack", "credentials": { @@ -198,7 +198,7 @@ To enable Hash-Based Message Authentication Codes, you need to do the following ```jsx import { createHmac } from "crypto"; - const hmacHash = createHmac("sha256", process.env.NOVU_API_KEY) + const hmacHash = createHmac("sha256", process.env.NOVU_SECRET_KEY) .update(subscriberId) .digest("hex"); ``` diff --git a/integrations/providers/chat/zulip.mdx b/integrations/providers/chat/zulip.mdx index 82573432..811ee4a3 100644 --- a/integrations/providers/chat/zulip.mdx +++ b/integrations/providers/chat/zulip.mdx @@ -53,7 +53,7 @@ import { ChatProviderIdEnum } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.setCredentials('subscriberId', ChatProviderIdEnum.Zulip, { webhookUrl: "", @@ -66,7 +66,7 @@ webhookUrl: "", curl -L -X PUT 'https://api.novu.co/v1/subscribers//credentials' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ --H 'Authorization: ApiKey ' \ +-H 'Authorization: ApiKey ' \ -d '{ "providerId": "zulip", "credentials": { diff --git a/integrations/providers/email/mailersend.mdx b/integrations/providers/email/mailersend.mdx index 7734e49d..845c8587 100644 --- a/integrations/providers/email/mailersend.mdx +++ b/integrations/providers/email/mailersend.mdx @@ -30,7 +30,7 @@ import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.subscribers.trigger("workflowIdentifier", { to: "subscriberId", @@ -85,7 +85,7 @@ tenant: "tenantIdentifier" curl --location 'https://api.novu.co/v1/events/trigger' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ ---header 'Authorization: ApiKey ' \ +--header 'Authorization: ApiKey ' \ --data '{ "name": "workflowIdentifier", "to": ["subscriberId"], diff --git a/integrations/providers/email/overview.mdx b/integrations/providers/email/overview.mdx index e35bfc21..803afe44 100644 --- a/integrations/providers/email/overview.mdx +++ b/integrations/providers/email/overview.mdx @@ -26,7 +26,7 @@ The overrides field supports an email property. The email overrides field have p ```javascript import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); novu.trigger('', { to: { @@ -60,7 +60,7 @@ You can easily send attachments with the Novu API by passing the attachments arr ```javascript import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); novu.trigger('', { to: { @@ -98,7 +98,7 @@ Here, if `sendgrid-abcdef` is primary integration and you want to use `brevo-abc ```javascript import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); novu.trigger('', { to: { diff --git a/integrations/providers/email/sendgrid.mdx b/integrations/providers/email/sendgrid.mdx index f7eab2fb..8eb9c162 100644 --- a/integrations/providers/email/sendgrid.mdx +++ b/integrations/providers/email/sendgrid.mdx @@ -59,7 +59,7 @@ Novu has its own email editor for writing email template. If you want to use pre ```jsx import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.subscribers.trigger("workflowIdentifier", { to: "subscriberId", @@ -106,7 +106,7 @@ tenant: "tenantIdentifier" curl --location 'https://api.novu.co/v1/events/trigger' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ ---header 'Authorization: ApiKey ' \ +--header 'Authorization: ApiKey ' \ --data '{ "name": "workflowIdentifier", "to": ["subscriberId"], diff --git a/integrations/providers/email/sendinblue.mdx b/integrations/providers/email/sendinblue.mdx index 4ed10ec4..9731f637 100644 --- a/integrations/providers/email/sendinblue.mdx +++ b/integrations/providers/email/sendinblue.mdx @@ -44,7 +44,7 @@ Novu has its own email editor for writing email template. If you want to use pre ```jsx import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); await novu.subscribers.trigger("workflowIdentifier", { to: "subscriberId", @@ -91,7 +91,7 @@ tenant: "tenantIdentifier" curl --location 'https://api.novu.co/v1/events/trigger' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ ---header 'Authorization: ApiKey ' \ +--header 'Authorization: ApiKey ' \ --data '{ "name": "workflowIdentifier", "to": ["subscriberId"], diff --git a/integrations/providers/push/apns.mdx b/integrations/providers/push/apns.mdx index 501bdcfe..f8dc8122 100644 --- a/integrations/providers/push/apns.mdx +++ b/integrations/providers/push/apns.mdx @@ -29,7 +29,7 @@ The overrides field supports all [Notification payload](https://developer.apple ```jsx import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); novu.trigger("", { to: { @@ -59,7 +59,7 @@ novu.trigger("", { ```jsx import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); novu.trigger("", { to: { @@ -99,7 +99,7 @@ import { ChatProviderIdEnum } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.setCredentials('subscriberId', PushProviderIdEnum.APNS, { deviceTokens: ['token1', 'token2'], @@ -112,7 +112,7 @@ deviceTokens: ['token1', 'token2'], curl -L -X PUT 'https://api.novu.co/v1/subscribers//credentials' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ --H 'Authorization: ApiKey ' \ +-H 'Authorization: ApiKey ' \ -d '{ "providerId": "apns", "deviceTokens": ["token1", "token2"], diff --git a/integrations/providers/push/expo-push.mdx b/integrations/providers/push/expo-push.mdx index e7aebd33..39c29e4e 100644 --- a/integrations/providers/push/expo-push.mdx +++ b/integrations/providers/push/expo-push.mdx @@ -12,7 +12,7 @@ The overrides field supports all [Message Request](https://docs.expo.dev/push-n ```jsx import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); novu.trigger("", { to: { @@ -33,7 +33,7 @@ import { Novu,PushProviderIdEnum } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.setCredentials('subscriberId', PushProviderIdEnum.EXPO, { deviceTokens: ['token1', 'token2'], @@ -46,7 +46,7 @@ deviceTokens: ['token1', 'token2'], curl -L -X PUT 'https://api.novu.co/v1/subscribers//credentials' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ --H 'Authorization: ApiKey ' \ +-H 'Authorization: ApiKey ' \ -d '{ "providerId": "expo", "deviceTokens": ["token1", "token2"], diff --git a/integrations/providers/push/fcm.mdx b/integrations/providers/push/fcm.mdx index 2b2c6c10..5c76d84e 100644 --- a/integrations/providers/push/fcm.mdx +++ b/integrations/providers/push/fcm.mdx @@ -60,7 +60,7 @@ import { PushProviderIdEnum } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.setCredentials( 'subscriberId', @@ -77,7 +77,7 @@ PushProviderIdEnum.FCM, curl -L -X PUT 'https://api.novu.co/v1/subscribers//credentials' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ --H 'Authorization: ApiKey ' \ +-H 'Authorization: ApiKey ' \ -d '{ "providerId": "fcm", "credentials": { @@ -100,7 +100,7 @@ Checkout the [API reference](/api-reference/subscribers/update-subscriber-creden ```jsx import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); novu.trigger("", { to: { @@ -148,7 +148,7 @@ In that case, you must use the `link` property with a relative URL. ```javascript import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); novu.trigger("", { to: { diff --git a/integrations/providers/push/onesignal.mdx b/integrations/providers/push/onesignal.mdx index ab9da6ec..48f695a2 100644 --- a/integrations/providers/push/onesignal.mdx +++ b/integrations/providers/push/onesignal.mdx @@ -25,7 +25,7 @@ import { ChatProviderIdEnum } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.setCredentials('subscriberId', PushProviderIdEnum.OneSignal, { // Your user's unique 'player_id' from OneSignal @@ -39,7 +39,7 @@ deviceTokens: ['ad0452ca-3ca7-43b5-bf9b-fa93fd322035'], curl -L -X PUT 'https://api.novu.co/v1/subscribers//credentials' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ --H 'Authorization: ApiKey ' \ +-H 'Authorization: ApiKey ' \ -d '{ "providerId": "one-signal", "deviceTokens": ["ad0452ca-3ca7-43b5-bf9b-fa93fd322035"], @@ -57,7 +57,7 @@ Checkout the [API reference](/api-reference/subscribers/update-subscriber-creden ```jsx import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); novu.trigger("", { to: { diff --git a/integrations/providers/push/overview.mdx b/integrations/providers/push/overview.mdx index 00066cd4..c09f5366 100644 --- a/integrations/providers/push/overview.mdx +++ b/integrations/providers/push/overview.mdx @@ -83,7 +83,7 @@ To remove a device token from subscriber credentials, you need to get the curren ```ts import { Novu, PushProviderIdEnum } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); // fetch subscriber details const subscriber = await novu.subscribers.get('subscriberId'); diff --git a/integrations/providers/push/push-webhook.mdx b/integrations/providers/push/push-webhook.mdx index 06c27a90..0fad6278 100644 --- a/integrations/providers/push/push-webhook.mdx +++ b/integrations/providers/push/push-webhook.mdx @@ -28,7 +28,7 @@ import { ChatProviderIdEnum } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); // PushProviderIdEnum.PushWebhook = push-webhook await novu.subscribers.setCredentials('subscriberId', PushProviderIdEnum.PushWebhook, { @@ -42,7 +42,7 @@ deviceTokens: ['ANY_RANDOM_STRING'], curl -L -X PUT 'https://api.novu.co/v1/subscribers//credentials' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ --H 'Authorization: ApiKey ' \ +-H 'Authorization: ApiKey ' \ -d '{ "providerId": "push-webhook", "deviceTokens": ['ANY_RANDOM_STRING'], diff --git a/integrations/providers/push/pusher-beams.mdx b/integrations/providers/push/pusher-beams.mdx index a8e08541..8458b37d 100644 --- a/integrations/providers/push/pusher-beams.mdx +++ b/integrations/providers/push/pusher-beams.mdx @@ -25,7 +25,7 @@ import { ChatProviderIdEnum } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.setCredentials('subscriberId', PushProviderIdEnum.PusherBeams, { // Your user's unique 'userId' from Pusher Beams @@ -39,7 +39,7 @@ deviceTokens: ['userId-from-pusher-beams'], curl -L -X PUT 'https://api.novu.co/v1/subscribers//credentials' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ --H 'Authorization: ApiKey ' \ +-H 'Authorization: ApiKey ' \ -d '{ "providerId": "pusher-beams", "deviceTokens": ['userId-from-pusher-beams'], @@ -57,7 +57,7 @@ Checkout the [API reference](/api-reference/subscribers/update-subscriber-creden ```jsx import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); novu.trigger("", { to: { diff --git a/integrations/providers/push/pushpad.mdx b/integrations/providers/push/pushpad.mdx index 96ed2932..f8d57730 100644 --- a/integrations/providers/push/pushpad.mdx +++ b/integrations/providers/push/pushpad.mdx @@ -25,7 +25,7 @@ import { ChatProviderIdEnum } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.setCredentials('subscriberId', PushProviderIdEnum.Pushpad, { // the user ID (uid) that you used for Pushpad @@ -39,7 +39,7 @@ deviceTokens: ['user123'], curl -L -X PUT 'https://api.novu.co/v1/subscribers//credentials' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ --H 'Authorization: ApiKey ' \ +-H 'Authorization: ApiKey ' \ -d '{ "providerId": "pushpad", "deviceTokens": ['user123'], @@ -57,7 +57,7 @@ Checkout the [API reference](/api-reference/subscribers/update-subscriber-creden ```jsx import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); novu.trigger("", { to: { diff --git a/integrations/providers/sms/overview.mdx b/integrations/providers/sms/overview.mdx index 7e99be19..bb754ffb 100644 --- a/integrations/providers/sms/overview.mdx +++ b/integrations/providers/sms/overview.mdx @@ -28,7 +28,7 @@ The overrides field supports a `sms` property and `from`, `to`, `content` field ```javascript import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); novu.trigger('', { to: { @@ -62,7 +62,7 @@ Here, if `twilio-abcdef` is primary integration and you want to use `infobip-abc ```javascript import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); novu.trigger('', { to: { diff --git a/legacy-guides/add-digest-to-email-notifications.mdx b/legacy-guides/add-digest-to-email-notifications.mdx index 35f816a5..c5557441 100644 --- a/legacy-guides/add-digest-to-email-notifications.mdx +++ b/legacy-guides/add-digest-to-email-notifications.mdx @@ -158,7 +158,7 @@ Back in our app, we can now add the trigger function: import { Novu } from "@novu/node"; export const sendEmailDigest = async (notif, email) => { - const novu = new Novu(process.env.YOUR_NOVU_API_KEY); + const novu = new Novu(process.env.YOUR_NOVU_SECRET_KEY); await novu.subscribers.identify("digestEmailSub", { firstName: "digest email subscriber", email: email, diff --git a/legacy-guides/add-digest-to-inapp-notifications.mdx b/legacy-guides/add-digest-to-inapp-notifications.mdx index 08085f3f..04f12d4a 100644 --- a/legacy-guides/add-digest-to-inapp-notifications.mdx +++ b/legacy-guides/add-digest-to-inapp-notifications.mdx @@ -154,7 +154,7 @@ Back in our app, we can now add the trigger function: import { Novu } from "@novu/node"; export const sendDigest = async (name) => { - const novu = new Novu(process.env.NOVU_API_KEY); + const novu = new Novu(process.env.NOVU_SECRET_KEY); await novu.subscribers.identify("aa234u787", { firstName: "digest subscriber", diff --git a/legacy-guides/cookbook/introduction.mdx b/legacy-guides/cookbook/introduction.mdx index 66a4e558..c0fee411 100644 --- a/legacy-guides/cookbook/introduction.mdx +++ b/legacy-guides/cookbook/introduction.mdx @@ -164,7 +164,7 @@ import { ChatProviderIdEnum } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); // Identify Subscriber await novu.subscribers.identify('', { diff --git a/legacy-guides/discord-guide.mdx b/legacy-guides/discord-guide.mdx index c85364f1..003d8667 100644 --- a/legacy-guides/discord-guide.mdx +++ b/legacy-guides/discord-guide.mdx @@ -114,7 +114,7 @@ file, `novu.js`, in our case, which is as follows: ```jsx import { export const chat = async (chatMsg) => { try { - const novu = new Novu(process.env.YOUR_NOVU_API_KEY_HERE); + const novu = new Novu(process.env.YOUR_NOVU_SECRET_KEY_HERE); await novu.subscribers.identify(process.env.SUB_ID, { firstName: 'newSubForDiscordChat', @@ -154,7 +154,7 @@ import { Novu, ChatProviderIdEnum } from "@novu/node"; export const chat = async (chatMsg) => { try { - const novu = new Novu(process.env.YOUR_NOVU_API_KEY_HERE); + const novu = new Novu(process.env.YOUR_NOVU_SECRET_KEY_HERE); await novu.subscribers.identify(process.env.SUB_ID, { firstName: "newSubForDiscordChat", diff --git a/legacy-guides/framework-guides/digest.mdx b/legacy-guides/framework-guides/digest.mdx index f86245d3..29911701 100644 --- a/legacy-guides/framework-guides/digest.mdx +++ b/legacy-guides/framework-guides/digest.mdx @@ -37,7 +37,7 @@ Novu’s Digest Engine is designed to consolidate multiple trigger events into a import { Client } from "@novu/framework"; export const client = new Client({ - apiKey: "", + apiKey: "", /** * Enable this flag only during local development */ @@ -177,7 +177,7 @@ export default function Home() { ```tsx import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); export async function POST(request: Request) { const res = await request.json(); diff --git a/legacy-guides/framework-guides/framework-mjml.mdx b/legacy-guides/framework-guides/framework-mjml.mdx index 3bfc0347..2d4482a6 100644 --- a/legacy-guides/framework-guides/framework-mjml.mdx +++ b/legacy-guides/framework-guides/framework-mjml.mdx @@ -181,7 +181,7 @@ import { Client, workflow } from "@novu/framework"; import { mjmlTemplate } from "./mjml"; export const client = new Client({ - apiKey: process.env.NOVU_API_KEY, + apiKey: process.env.NOVU_SECRET_KEY, strictAuthentication: process.env.NODE_ENV !== "development", }); diff --git a/legacy-guides/framework-guides/framework-nuxt-vuemail.mdx b/legacy-guides/framework-guides/framework-nuxt-vuemail.mdx index 051a3524..01368285 100644 --- a/legacy-guides/framework-guides/framework-nuxt-vuemail.mdx +++ b/legacy-guides/framework-guides/framework-nuxt-vuemail.mdx @@ -400,7 +400,7 @@ const vueEmail = config('templates', { }) export const client = new Client({ - apiKey: process.env.NOVU_API_KEY, // <<-- Your Novu API KEY + apiKey: process.env.NOVU_SECRET_KEY, // <<-- Your Novu API KEY /** * Disable this flag only during local development * For production this should be true @@ -468,7 +468,7 @@ export const myWorkflow = workflow('hello-world', async ({ step, payload }) => { ```jsx curl -X POST https://api.novu.co/v1/events/trigger \ - -H "Authorization: ApiKey " \ + -H "Authorization: ApiKey " \ -H "Content-Type: application/json" \ -d '{ "name": "hello-world", diff --git a/legacy-guides/framework-guides/framework-remix.mdx b/legacy-guides/framework-guides/framework-remix.mdx index cc34a74d..4451cb30 100644 --- a/legacy-guides/framework-guides/framework-remix.mdx +++ b/legacy-guides/framework-guides/framework-remix.mdx @@ -224,7 +224,7 @@ import { Client, workflow } from "@novu/framework"; import { renderEmail } from "~/emails/vercel-invite-user"; export const client = new Client({ - apiKey: process.env.NOVU_API_KEY, + apiKey: process.env.NOVU_SECRET_KEY, /** * Disable this flag only during local development * For production this should be true diff --git a/legacy-guides/framework-guides/framework-svelte.mdx b/legacy-guides/framework-guides/framework-svelte.mdx index 2e540f83..8fd0572b 100644 --- a/legacy-guides/framework-guides/framework-svelte.mdx +++ b/legacy-guides/framework-guides/framework-svelte.mdx @@ -222,7 +222,7 @@ export const client = new Client({ * The Novu API key is needed for when you * need to sync to Novu Cloud */ - apiKey: process.env.NOVU_API_KEY, + apiKey: process.env.NOVU_SECRET_KEY, /** * Disable this flag only during local development * For production this should be true diff --git a/legacy-guides/framework-guides/otp.mdx b/legacy-guides/framework-guides/otp.mdx index 42510579..e7fdceff 100644 --- a/legacy-guides/framework-guides/otp.mdx +++ b/legacy-guides/framework-guides/otp.mdx @@ -238,7 +238,7 @@ import { Client, workflow } from "@novu/framework"; import { renderOTPEmail } from "./otp"; export const client = new Client({ - apiKey: process.env.NOVU_API_KEY, + apiKey: process.env.NOVU_SECRET_KEY, /** * Disable this flag only during local development */ @@ -296,7 +296,7 @@ export const otpFlow = workflow( ```ts import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); export async function POST(request: Request) { const res = await request.json(); diff --git a/legacy-guides/headless-notification-center-guide.mdx b/legacy-guides/headless-notification-center-guide.mdx index 9171a594..3e06ec96 100644 --- a/legacy-guides/headless-notification-center-guide.mdx +++ b/legacy-guides/headless-notification-center-guide.mdx @@ -99,11 +99,11 @@ Once installed, you can import Novu into your app and initialize it using your N ```bash import { Novu } from '@novu/node'; -const novu = new Novu(''); +const novu = new Novu(''); ``` -Replace the `` value with the authentic key from the API Key section of your [Novu Dashboard.](http://dashboard.novu.co/?utm_campaign=docs-guides-headless) +Replace the `` value with the authentic key from the API Key section of your [Novu Dashboard.](http://dashboard.novu.co/?utm_campaign=docs-guides-headless) 🔑 Please do not hardcode your credentials in a file in production. Use environment variables instead. @@ -115,7 +115,7 @@ Using the above info, we'll write a function that will help us interact with Nov import { Novu } from "@novu/node"; export const notification = async (description) => { - const novu = new Novu(""); + const novu = new Novu(""); await novu.subscribers.identify(process.env.SUSBSCRIBER_ID, { firstName: "newSubForHeadless", }); diff --git a/legacy-guides/novu-fcm-web.mdx b/legacy-guides/novu-fcm-web.mdx index dc88c928..470bca56 100644 --- a/legacy-guides/novu-fcm-web.mdx +++ b/legacy-guides/novu-fcm-web.mdx @@ -245,7 +245,7 @@ Finally, we can add the trigger code: import { Novu, PushProviderIdEnum } from "@novu/node"; export const inAppNotification = async (title, body) => { - const novu = new Novu(process.env.NOVU_API_KEY); + const novu = new Novu(process.env.NOVU_SECRET_KEY); await novu.subscribers.identify(process.env.NOVU_SUB_ID, { firstName: "pushSubscriber", }); diff --git a/legacy-guides/slack-guide.mdx b/legacy-guides/slack-guide.mdx index c1da4761..c4d9cbdd 100644 --- a/legacy-guides/slack-guide.mdx +++ b/legacy-guides/slack-guide.mdx @@ -122,7 +122,7 @@ To make it modular, we’ll keep the trigger code in a separate function in a se import { Novu, ChatProviderIdEnum } from "@novu/node"; export const chat = async (chatMsg) => { - const novu = new Novu(process.env.YOUR_NOVU_API_KEY_HERE); + const novu = new Novu(process.env.YOUR_NOVU_SECRET_KEY_HERE); await novu.subscribers.identify(process.env.SUB_ID, { firstName: "newSubForSlackChat", }); @@ -186,7 +186,7 @@ import { ChatProviderIdEnum } from '@novu/node'; -const novu = new Novu(""); +const novu = new Novu(""); await novu.subscribers.setCredentials('subscriberId', ChatProviderIdEnum.Slack, { webhookUrl: "", @@ -199,7 +199,7 @@ webhookUrl: "", curl -L -X PUT 'https://api.novu.co/v1/subscribers//credentials' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ --H 'Authorization: ApiKey ' \ +-H 'Authorization: ApiKey ' \ -d '{ "providerId": "slack", "credentials": { @@ -218,7 +218,7 @@ In our case, we'll add it to the `Novu.js` file we created earlier so that the f import { Novu, ChatProviderIdEnum } from "@novu/node"; export const chat = async (chatMsg) => { - const novu = new Novu(process.env.YOUR_NOVU_API_KEY_HERE); + const novu = new Novu(process.env.YOUR_NOVU_SECRET_KEY_HERE); await novu.subscribers.identify(process.env.SUB_ID, { firstName: "newSubForSlackChat", }); diff --git a/sdks/kotlin.mdx b/sdks/kotlin.mdx index 0c8fe1eb..815bfbf9 100644 --- a/sdks/kotlin.mdx +++ b/sdks/kotlin.mdx @@ -46,7 +46,7 @@ import co.novu.Novu import co.novu.extentions.environments fun main() { - val novu = Novu(apiKey = "NOVU_API_KEY") + val novu = Novu(apiKey = "NOVU_SECRET_KEY") val environment = novu.environments() println(environment) } diff --git a/sdks/nodejs.mdx b/sdks/nodejs.mdx index 8160793f..97baad9c 100644 --- a/sdks/nodejs.mdx +++ b/sdks/nodejs.mdx @@ -24,7 +24,7 @@ npm install @novu/node ```javascript import { Novu } from "@novu/node"; -const novu = new Novu(""); +const novu = new Novu(""); await novu.trigger("", { to: { diff --git a/sdks/python.mdx b/sdks/python.mdx index 35f7aae0..009bfaf7 100644 --- a/sdks/python.mdx +++ b/sdks/python.mdx @@ -29,7 +29,7 @@ poetry add novu from novu.api import EventApi url = "https://api.novu.co" -api_key = "" +api_key = "" # You can sign up on https://dashboard.novu.co to get your API key from https://dashboard.novu.co/settings