Skip to content

Commit

Permalink
Merge pull request #644 from novuhq/fix/worklfow-trigger-identifier
Browse files Browse the repository at this point in the history
fix: add workflow trigger identifier
  • Loading branch information
rifont committed Jul 13, 2024
2 parents b8f9390 + b2ad633 commit 5de7b2d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions concepts/controls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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",
Expand All @@ -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
Expand All @@ -111,6 +111,6 @@ The snippet below shows a configuration for the Step Control schema. If you don
</CodeGroup>

## 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.

2 changes: 1 addition & 1 deletion concepts/endpoint.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions concepts/workflows.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ A workflow acts as the blueprint for the notifications that will be sent. This i

<Steps>
<Step title="Name and Identifier">
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. The workflow trigger identifier is used to uniquely identify each workflow. Two workflows can have same name but always have different trigger identifiers.
</Step>
<Step title="Trigger">
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.
</Step>
<Step title="Steps">
Within the Novu framework, steps are categorized into various types, each of which is linked with at least one corresponding action:
Expand Down

0 comments on commit 5de7b2d

Please sign in to comment.