ObjectStackObjectStack

Action

Action protocol schemas

Action Parameter Schema

Defines inputs required before executing an action.

Source: packages/spec/src/ui/action.zod.ts

TypeScript Usage

import { ActionParam, ActionType } from '@objectstack/spec/ui';
import type { ActionParam, ActionType } from '@objectstack/spec/ui';

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

ActionParam

Properties

PropertyTypeRequiredDescription
namestring
labelstring | ObjectDisplay label: plain string or i18n translation object
typeEnum<'text' | 'textarea' | 'email' | 'url' | 'phone' | 'password' | 'markdown' | 'html' | 'richtext' | 'number' | 'currency' | 'percent' | 'date' | 'datetime' | 'time' | 'boolean' | 'toggle' | 'select' | 'multiselect' | 'radio' | 'checkboxes' | 'lookup' | 'master_detail' | 'tree' | 'image' | 'file' | 'avatar' | 'video' | 'audio' | 'formula' | 'summary' | 'autonumber' | 'location' | 'address' | 'code' | 'json' | 'color' | 'rating' | 'slider' | 'signature' | 'qrcode' | 'progress' | 'tags' | 'vector'>
requiredboolean
optionsObject[]optional

ActionType

Allowed Values

  • script
  • url
  • modal
  • flow
  • api

On this page