From 8d758a26d149817487becc87260288557d30b39c Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Sun, 7 Jul 2024 16:44:37 +0530 Subject: [PATCH 1/2] fix: add workflow trigger identifier --- concepts/controls.mdx | 12 ++++++------ concepts/endpoint.mdx | 2 +- concepts/workflows.mdx | 4 ++-- deployment/actions.mdx | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/concepts/controls.mdx b/concepts/controls.mdx index 69269320..d2fce0c4 100644 --- a/concepts/controls.mdx +++ b/concepts/controls.mdx @@ -2,7 +2,7 @@ title: "Controls" --- -Controls are defined using [JSON Schema](/recipes/json-schema) or Zod, providing a strong run-time validation system for your workflows. +Controls are defined using [JSON Schema](/recipes/json-schema) or [Zod](https://zod.dev), providing a strong run-time validation system for your workflows. This ensures that you as the developer and your non-technical peers are speaking the same language. Those responsible for styling and copy can edit with confidence, knowing their changes are tested in code. @@ -49,7 +49,7 @@ The snippet below shows a configuration for the Step Control schema. If you don { controlSchema: z.object({ hideBanner: z.boolean().default(false), - subject: z.string().defaul('This is the default title'), + subject: z.string().default('This is the default subject'), components: z.array(z.object({ type: z.enum(['header', 'cta-row', 'footer']), content: z.string() @@ -83,7 +83,7 @@ The snippet below shows a configuration for the Step Control schema. If you don // Specify the properties to validate. Supports deep nesting. properties: { hideBanner: { type: "boolean", default: false }, - subject: { type: "string" }, + subject: { type: "string", default: 'This is the default subject' }, // Allowing no code control over the component in the Dashboard UI components: { type: "array", @@ -97,7 +97,7 @@ The snippet below shows a configuration for the Step Control schema. If you don }, }, // Specify the array of which properties are required. - required: ["complianceFooter"], + required: ["hideBanner"], // Used to enforce full type strictness, with no rogue properties. additionalProperties: false, // The `as const` is important to let Typescript know that this @@ -111,6 +111,6 @@ The snippet below shows a configuration for the Step Control schema. If you don ## Supported Schema Types -- **ZodSchema** - A TypeScript-first schema declaration and validation library. -- **[JSON Schema](/recipes/json-schema)** - The most popular schema language for defining JSON data structures. +- [Zod Schema](https://zod.dev/) - A TypeScript-first schema declaration and validation library. +- [JSON Schema](/recipes/json-schema) - The most popular schema language for defining JSON data structures. diff --git a/concepts/endpoint.mdx b/concepts/endpoint.mdx index 8d8e1280..5c2e4116 100644 --- a/concepts/endpoint.mdx +++ b/concepts/endpoint.mdx @@ -2,7 +2,7 @@ title: "Bridge Endpoint" --- -Novu Framework requires a **single** `HTTP` endpoint (`/api/novu` or similar) to be exposed by your application. This endpoint is used to receive events from our Worker Engine. +Novu Framework requires a **single** `HTTP` endpoint (`/api/novu` or similar) to be exposed by your application. This endpoint is used to receive events from our **Worker Engine**. You can view the Bridge Endpoint as a webhook endpoint that Novu will call when it needs to retrieve contextual information for a given subscriber and notification. diff --git a/concepts/workflows.mdx b/concepts/workflows.mdx index a92cc733..52693bf1 100644 --- a/concepts/workflows.mdx +++ b/concepts/workflows.mdx @@ -18,10 +18,10 @@ A workflow acts as the blueprint for the notifications that will be sent. This i - Every workflow will have a name and an identifier that are used to uniquely identify each workflow. + Every workflow will have a name and trigger identifier. Workflow trigger identifier is used to uniquely identify each workflow. Two workflows can have same name but always have different trigger identifiers. - The "Trigger" refers to an event or action that initiates the workflow. It signifies a call to the Novu API with a specified workflow ID, along with the necessary payload data that the workflow content will utilize. + The **Trigger** refers to an event or action that initiates the workflow. It signifies a call to the Novu API with a specified workflow trigger identifier, along with the necessary payload data that the workflow content will utilize. Within the Novu framework, steps are categorized into various types, each of which is linked with at least one corresponding action: diff --git a/deployment/actions.mdx b/deployment/actions.mdx index 93f1a503..7e5967a0 100644 --- a/deployment/actions.mdx +++ b/deployment/actions.mdx @@ -19,5 +19,5 @@ jobs: uses: novuhq/actions-novu-sync@v2 with: secret-key: ${{secrets.NOVU_API_KEY}} # Your Dev or Prod API Key to Novur - bridge-url: "https://your-deployed-servoce.com/api/novu" # This will be your target environment bridge url including that novu path + bridge-url: "https://your-deployed-service.com/api/novu" # This will be your target environment bridge url including that novu path ``` From c2e204d57a725dc60da9cd36dffbb6c2b7f443b3 Mon Sep 17 00:00:00 2001 From: Richard Fontein <32132657+rifont@users.noreply.github.com> Date: Sat, 13 Jul 2024 08:42:40 +0100 Subject: [PATCH 2/2] Update concepts/workflows.mdx --- concepts/workflows.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/concepts/workflows.mdx b/concepts/workflows.mdx index 52693bf1..5086ac29 100644 --- a/concepts/workflows.mdx +++ b/concepts/workflows.mdx @@ -18,7 +18,7 @@ A workflow acts as the blueprint for the notifications that will be sent. This i - Every workflow will have a name and trigger identifier. Workflow trigger identifier is used to uniquely identify each workflow. Two workflows can have same name but always have different trigger identifiers. + Every workflow will have a name and trigger identifier. The workflow trigger identifier is used to uniquely identify each workflow. Two workflows can have same name but always have different trigger identifiers. The **Trigger** refers to an event or action that initiates the workflow. It signifies a call to the Novu API with a specified workflow trigger identifier, along with the necessary payload data that the workflow content will utilize.