Trigger

The `Trigger` entity.

Definition

TypeScript
interface Trigger {
  id: string;
  workspaceId: string;
  eventType: string;
  targetId: string;
  subjectId: string | null;
  filter: {
    version: 1;
    root: import("/home/runner/work/aeontel/aeontel/packages/shared/src/conditions/schema").ConditionNode;
  } | null;
  enabled: boolean;
  createdBy: string;
  runtimeUserId: string | null;
  createdAt: string;
  updatedAt: string;
}

Fields

FieldTypeNotes
idstringreadonly required
workspaceIdstringrequired — Workspace that owns this listener.
eventTypestringrequired — Event type the listener fires on (e.g. 'email.stored' or 'file.*' wildcard).
targetIdstringrequired — Entity dispatched when the event matches.
subjectIdstring | nullrequired — Optional subject scope. When set, fires only for events whose subjectId matches (e.g. one specific schedule).
filter{ version: 1; root: import("/home/runner/work/aeontel/aeontel/packages/shared/src/conditions/schema").ConditionNode; } | nullrequired — Optional condition tree evaluated against the event. When non-null, the listener only fires if matches.
enabledbooleanrequired — When false the listener is registered but does not fire.
createdBystringrequired — User who created the listener.
runtimeUserIdstring | nullrequired — Override the workspace default service user as the runtime caller when this listener fires. Null = inherit workspace default. Workspace-admin-only to set; target user must be a member of the workspace.
createdAtstringreadonly required — ISO-8601 timestamp of creation.
updatedAtstringreadonly required — ISO-8601 timestamp of the last update.