ObjectStackObjectStack

Subscription

Subscription protocol schemas

Subscription Event Type

Event types that can be subscribed to for record-level notifications.

Source: packages/spec/src/data/subscription.zod.ts

TypeScript Usage

import { RecordSubscription, SubscriptionEventType } from '@objectstack/spec/data';
import type { RecordSubscription, SubscriptionEventType } from '@objectstack/spec/data';

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

RecordSubscription

Properties

PropertyTypeRequiredDescription
objectstringObject name
recordIdstringRecord ID
userIdstringSubscribing user ID
eventsEnum<'comment' | 'mention' | 'field_change' | 'task' | 'approval' | 'all'>[]Event types to receive notifications for
channelsEnum<'in_app' | 'email' | 'push' | 'slack'>[]Notification delivery channels
activebooleanWhether the subscription is active
createdAtstringSubscription creation timestamp

SubscriptionEventType

Allowed Values

  • comment
  • mention
  • field_change
  • task
  • approval
  • all

On this page