ObjectStackObjectStack

Notification

Notification protocol schemas

Email Template Schema

Defines the structure and content of email notifications.

Supports variables for personalization and file attachments.

@example


\{

"id": "welcome-email",

"subject": "Welcome to \{\{company_name\}\}",

"body": "<h1>Welcome \{\{user_name\}\}!</h1>",

"bodyType": "html",

"variables": ["company_name", "user_name"],

"attachments": [

\{

"name": "guide.pdf",

"url": "https://example.com/guide.pdf"

\}

]

\}

Source: packages/spec/src/system/notification.zod.ts

TypeScript Usage

import { NotificationChannel } from '@objectstack/spec/system';
import type { NotificationChannel } from '@objectstack/spec/system';

// Validate data
const result = NotificationChannel.parse(data);

NotificationChannel

Allowed Values

  • email
  • sms
  • push
  • in-app
  • slack
  • teams
  • webhook

On this page