ObjectStackObjectStack

Approval

Approval protocol schemas

Approval Step Approver Type

Source: packages/spec/src/automation/approval.zod.ts

TypeScript Usage

import { ApprovalDecision, ApprovalEscalation, ApprovalNodeApprover, ApprovalNodeConfig, ApproverType } from '@objectstack/spec/automation';
import type { ApprovalDecision, ApprovalEscalation, ApprovalNodeApprover, ApprovalNodeConfig, ApproverType } from '@objectstack/spec/automation';

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

ApprovalDecision

Allowed Values

  • approve
  • reject

ApprovalEscalation

Properties

PropertyTypeRequiredDescription
enabledbooleanEnable SLA-based escalation for this node
timeoutHoursnumberHours before escalation triggers
actionEnum<'reassign' | 'auto_approve' | 'auto_reject' | 'notify'>Action on escalation timeout
escalateTostringoptionalUser id, role, or manager level to escalate to
notifySubmitterbooleanNotify the original submitter on escalation

ApprovalNodeApprover

Properties

PropertyTypeRequiredDescription
typeEnum<'user' | 'role' | 'team' | 'department' | 'manager' | 'field' | 'queue'>
valuestringoptionalUser id / role / team / department / field / queue — per type

ApprovalNodeConfig

Properties

PropertyTypeRequiredDescription
approversObject[]Allowed approvers for this node
behaviorEnum<'first_response' | 'unanimous'>How to combine multiple approvers
lockRecordbooleanLock the record from editing while pending
approvalStatusFieldstringoptionalBusiness-object field to mirror request status onto
escalationObjectoptionalPer-node SLA escalation

ApproverType

Allowed Values

  • user
  • role
  • team
  • department
  • manager
  • field
  • queue

On this page