From 47892e599dfe0dd32ade81c32ba620130f3b19dc Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Sun, 17 Nov 2024 13:47:26 +0530 Subject: [PATCH 1/2] fix: update client custom config code --- sdks/framework/typescript/client.mdx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sdks/framework/typescript/client.mdx b/sdks/framework/typescript/client.mdx index cb6f3c7d..56edbd59 100644 --- a/sdks/framework/typescript/client.mdx +++ b/sdks/framework/typescript/client.mdx @@ -41,10 +41,18 @@ When your service is running in development mode `process.env.NODE_ENV=developme ## Code Example ```typescript -import { Client } from "@novu/framework"; - -const client = new Client({ - secretKey: "my-secret-key", - strictAuthentication: false, +import { Client as NovuFrameworkClient } from "@novu/framework"; +import { serve } from "@novu/framework/next"; +import { passwordResetWorkflow } from "./workflows"; + +export const { GET, POST, OPTIONS } = serve({ + client: new NovuFrameworkClient({ + secretKey: process.env.NOVU_API_KEY || "ACTUAL_NOVU_SECRET_KEY_VALUE", + strictAuthentication: false, + }), + workflows: [ + /* all workflows */ + passwordResetWorkflow + ], }); ``` From d35a199fc60ee48def53b619de28b10fe2942708 Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Tue, 19 Nov 2024 23:03:22 +0530 Subject: [PATCH 2/2] fix: replace novu api key with novu secret key --- sdks/framework/typescript/client.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/framework/typescript/client.mdx b/sdks/framework/typescript/client.mdx index 56edbd59..53db7d64 100644 --- a/sdks/framework/typescript/client.mdx +++ b/sdks/framework/typescript/client.mdx @@ -47,7 +47,7 @@ import { passwordResetWorkflow } from "./workflows"; export const { GET, POST, OPTIONS } = serve({ client: new NovuFrameworkClient({ - secretKey: process.env.NOVU_API_KEY || "ACTUAL_NOVU_SECRET_KEY_VALUE", + secretKey: process.env.NOVU_SECRET_KEY || "ACTUAL_NOVU_SECRET_KEY_VALUE", strictAuthentication: false, }), workflows: [