Type Definitions

This page provides a comprehensive list of all the type definitions used throughout the scripts. Each type is documented with its structure and, where applicable, links to other dependent types. This documentation serves as a reference for understanding the various data structures and their relationships used within the platform.


AfterDeleteInput

export type AfterDeleteInput<T> = { datasourceId: string; rows: DBRow<T>[] };

AfterDeleteOutput

export type AfterDeleteOutput<T> = { rows: T[] };

AfterInsertInput

export type AfterInsertInput<T> = { datasourceId: string; rows: DBRow<T>[] };

AfterInsertOutput

export type AfterInsertOutput<T> = { rows: T[] };

AfterUpdateInput

export type AfterUpdateInput<T> = { datasourceId: string; rows: DBRow<T>[] };

AfterUpdateOutput

export type AfterUpdateOutput<T> = { rows: T[] };

Aggregate

export type Aggregate<T> = { aggregateFunction: AggregateFunction; attributeCode: keyof T; intoAttributeCode: keyof T };

AggregateFunction

export type AggregateFunction = 'Avg' | 'Count' | 'DistinctCount' | 'Max' | 'Min' | 'Sum';

AppConfig

export type AppConfig = {
  instance_id_prefix: string;
  secret: { data: string; jwt: string; argon: string };
  encrypted_args: boolean;
  smtp?: {
    host: string;
    port?: number;
    from_email: string;
    provider: { Gmail: string } | 'Others';
    use_tls: boolean;
    username?: string;
    password?: string;
  };
  http: {
    enabled: boolean;
    host: string;
    port: number;
    allowed_origins?: Array<string>;
    default_host: string;
    map_unknown_hosts_to_default: boolean;
    max_concurrent_requests: number;
    api_rate_limit_per_hour: number;
    static_rate_limit_per_hour: number;
    allow_public_tiny_urls: boolean;
    upload_max_mb: number;
    allow_sql_worksheet_updates: boolean;
    x_frame_option: 'DENY' | 'SameOrigin' | 'NONE';
  };
  env: 'production' | 'development' | 'test';
  init?: { admin_email: string; admin_password: string };
  deno: {
    port: number;
    timeout_seconds: number;
    initial_old_space_size: number;
    max_old_space_size: number;
    initial_heap_size: number;
    max_heap_size: number;
    max_workers: number;
    web_host: string;
    web_port: number;
    web_dev: boolean;
    web_enabled: boolean;
    web_inspect?: string;
  };
  python: { timeout_seconds: number };
  worker: { enabled: boolean; max_parallel_tasks: number; total_workers: number };
  flow_triggers: { enabled: boolean; total_kafka_consumers: number };
  db: {
    min_connections: number;
    max_connections: number;
    idle_timeout_seconds: bigint;
    max_lifetime_seconds: bigint;
    acquire_timeout_seconds: bigint;
    slow_statements_duration_seconds: bigint;
    sql_rate_limit_per_minute: number;
    sql_timeout_seconds: bigint;
    log_sql: boolean;
  };
  log: string;
  tmp_dir: string;
  thumb_dir: string;
  stack_size_in_mb: number;
  load_test_mode: boolean;
};

Approval

export type Approval = {
  approvers: string;
  minimumApprovalsRequired: number;
  reminderUnit: 'Second' | 'Hour' | 'Day';
  reminderFrequency: number;
  timeoutAfterNReminders: number;
  onRequest: string;
  onResponse: string;
};

ApprovalEmail

export type ApprovalEmail = { subject: string; textBody: string; htmlBody?: string };

ApprovalInfo

export type ApprovalInfo = {
  executionId: string;
  flowId: string;
  flowRunId: string;
  nodeId: string;
  nodeType: string;
  version: number;
  workspaceId: string;
  approver: string;
};

ApprovalResponse

export type ApprovalResponse = {
  executionId: string;
  flowId: string;
  flowRunId: string;
  nodeId: string;
  nodeType: string;
  version: number;
  workspaceId: string;
  approver: string;
  approvalStatus: ApprovalResult;
  rejectReason?: string;
};

ApprovalResult

export type ApprovalResult = 'Approved' | 'Rejected' | 'Timeout' | 'Cancelled' | 'Pending';

ApproversInfo

export type ApproversInfo = {
  approvers: Array<string>;
  urlState: Record<string, any>;
  pageId: string;
  workspaceId: string;
};

Attribute

export type Attribute = {
  orgId: string;
  workspaceId: string;
  datasourceId: string;
  attributeId: string;
  attributeCode: string;
  attributeName: string;
  attributeType: AttributeType;
  columnName?: string;
  seqNo: number;
  insertAllowed: YN;
  updateAllowed: YN;
  selectAllowed: YN;
  exportAllowed: YN;
  queryAllowed: YN;
  auditEnabled: YN;
  primaryKey: YN;
  autoSequence: YN;
  allowBlank: YN;
  maxLength?: number;
  defaultValue?: string;
  paramName?: string;
  outParam: YN;
  scale?: number;
  minValue?: number;
  maxValue?: number;
  calculatedColumn: YN;
  noUppercaseSearch: YN;
  createdAt: string;
  createdBy: string;
  updatedAt: string;
  updatedBy: string;
  tag?: string;
  refMd?: ReferenceMetadata;
  refAlias?: string;
  refFromClause?: string;
  refWhereClause?: string;
  enumValues?: Array<string>;
};

AttributeOption

export type AttributeOption = {
  orgId?: string;
  workspaceId?: string;
  datasourceId?: string;
  attributeId?: string;
  attributeCode?: string;
  attributeName?: string;
  attributeType?: AttributeType;
  columnName?: string;
  seqNo?: number;
  insertAllowed?: YN;
  updateAllowed?: YN;
  selectAllowed?: YN;
  exportAllowed?: YN;
  queryAllowed?: YN;
  auditEnabled?: YN;
  primaryKey?: YN;
  autoSequence?: YN;
  allowBlank?: YN;
  maxLength?: number;
  defaultValue?: string;
  paramName?: string;
  outParam?: YN;
  scale?: number;
  minValue?: number;
  maxValue?: number;
  calculatedColumn?: YN;
  noUppercaseSearch?: YN;
  createdAt?: string;
  createdBy?: string;
  updatedAt?: string;
  updatedBy?: string;
  tag?: string;
  refMd?: ReferenceMetadata;
  refAlias?: string;
  refFromClause?: string;
  refWhereClause?: string;
  enumValues?: Array<string>;
};

AttributeType

export type AttributeType =
  | 'Address'
  | 'Binary'
  | 'Boolean'
  | 'Currency'
  | 'Date'
  | 'DateTime'
  | 'Decimal'
  | 'Double'
  | 'Email'
  | 'EncryptedString'
  | 'Integer'
  | 'IntegerArray'
  | 'JSON'
  | 'Location'
  | 'Password'
  | 'Percent'
  | 'Phone'
  | 'Reference'
  | 'String'
  | 'StringArray'
  | 'Textarea'
  | 'Time'
  | 'URL'
  | 'UUID'
  | { Unknown: string | null }
  | 'UserID'
  | 'YN'
  | { Enum: string }
  | 'Attachment'
  | 'TF';

Audit

export type Audit = {
  orgId: string;
  workspaceId: string;
  datasourceId: string;
  pkValue: string;
  attributeCode: string;
  valueType: AuditValueType;
  oldStringValue?: string;
  newStringValue?: string;
  oldClobValue?: string;
  newClobValue?: string;
  oldDoubleValue?: number;
  newDoubleValue?: number;
  oldDatetimeValue?: string;
  newDatetimeValue?: string;
  updatedAt: string;
  updatedBy: string;
  auditId: number;
};

AuditOption

export type AuditOption = {
  orgId?: string;
  workspaceId?: string;
  datasourceId?: string;
  pkValue?: string;
  attributeCode?: string;
  valueType?: AuditValueType;
  oldStringValue?: string;
  newStringValue?: string;
  oldClobValue?: string;
  newClobValue?: string;
  oldDoubleValue?: number;
  newDoubleValue?: number;
  oldDatetimeValue?: string;
  newDatetimeValue?: string;
  updatedAt?: string;
  updatedBy?: string;
  auditId?: number;
};

AuditValueType

export type AuditValueType = 'String' | 'Clob' | 'Double' | 'DateTime';

AuthTypes

export type AuthTypes = 'OAUTH' | 'NATIVE' | 'SAML';

BeforeDeleteInput

export type BeforeDeleteInput<T> = { datasourceId: string; rows: DBRow<T>[] };

BeforeDeleteOutput

export type BeforeDeleteOutput<T> = { rows: T[]; skipDML: boolean; sql?: string; params?: unknown[] };

BeforeInsertInput

export type BeforeInsertInput<T> = { datasourceId: string; rows: T[] };

BeforeInsertOutput

export type BeforeInsertOutput<T> = { rows: T[]; skipDML: boolean; sql?: string; params?: unknown[] };

BeforeUpdateInput

export type BeforeUpdateInput<T> = { datasourceId: string; rows: DBRow<T>[] };

BeforeUpdateOutput

export type BeforeUpdateOutput<T> = { rows: T[]; skipDML: boolean; sql?: string; params?: unknown[] };

BooleanFilter

export type BooleanFilter = { istrue: boolean } | { empty: boolean } | { notempty: boolean };

ClientSession

export type ClientSession = {
  orgId: string;
  sessionId: string;
  userName: string;
  displayName: string;
  locationName?: string;
  email: string;
  x: string;
  jwt: string;
  status: 'OK';
  workspaces: Array<UserWorkspaces>;
  settings: UserSettings;
};

Color

export type Color = { base: string; dark: string };

Column

export type Column = {
  key: string;
  code: string;
  name: string;
  columnName: string;
  attributeType: AttributeType;
  optional: boolean;
  maxLength?: number;
  dateFormat?: string;
  primaryKey?: boolean;
  autoSequence?: boolean;
};

Create

export type Create =
  | { type: 'Workspace'; row: Workspace }
  | { type: 'Flow'; row: Flows }
  | { type: 'FlowDraft'; row: FlowVersion };

CreateResult

export type CreateResult =
  | { type: 'Flow'; row: Flows }
  | { type: 'FlowVersion'; row: number }
  | { type: 'Workspace'; row: Workspace };

DBResource

export type DBResource = {
  orgId: string;
  workspaceId: string;
  resource: string;
  dbType: DBType;
  props: DBResourceProps;
};

DBResourceProps

export type DBResourceProps =
  | { MySQL: MySQLProps }
  | { SQLServer: SQLServerProps }
  | { Postgres: PostgresProps }
  | { Oracle: OracleProps };

DBType

export type DBType = 'MySQL' | 'SQLServer' | 'Postgres' | 'Oracle';

DSPost

export type DSPost<T> = { datasourceId: string; rows: DBRow<T>[]; transaction?: Transaction };

DSQuery

export type DSQuery<T> = { datasourceId: string; query: Query<T> };

DSRequest

export type DSRequest<T> = DSQuery<T> | DSPost<T>;

DataSource

export type DataSource = {
  orgId: string;
  workspaceId: string;
  datasourceId: string;
  datasourceType: DatasourceType;
  typeValue: string;
  logLevel?: string;
  preQueryScript?: string;
  postQueryScript?: string;
  skipQueryForUpdate: YN;
  createdAt: string;
  createdBy: string;
  updatedAt: string;
  updatedBy: string;
  beforeInsertScript?: string;
  afterInsertScript?: string;
  beforeUpdateScript?: string;
  afterUpdateScript?: string;
  beforeDeleteScript?: string;
  afterDeleteScript?: string;
  sampleData?: string;
  preventResync: YN;
  readOnly: YN;
  validateRowScript?: string;
  extTypeValue?: string;
  attributes: Array<Attribute>;
  access: Array<DataSourceAccess>;
};

DataSourceAccess

export type DataSourceAccess = {
  orgId: string;
  workspaceId: string;
  roleId: string;
  datasourceId: string;
  startDate: string;
  endDate?: string;
  createdAt: string;
  createdBy: string;
  updatedAt: string;
  updatedBy: string;
  queryAllowed: YN;
  insertAllowed: YN;
  updateAllowed: YN;
  deleteAllowed: YN;
  auditAllowed: YN;
  exportAllowed: YN;
  publicDownloadAllowed: YN;
};

DataSourceAccessOption

export type DataSourceAccessOption = {
  orgId?: string;
  workspaceId?: string;
  roleId?: string;
  datasourceId?: string;
  startDate?: string;
  endDate?: string;
  createdAt?: string;
  createdBy?: string;
  updatedAt?: string;
  updatedBy?: string;
  queryAllowed?: YN;
  insertAllowed?: YN;
  updateAllowed?: YN;
  deleteAllowed?: YN;
  auditAllowed?: YN;
  exportAllowed?: YN;
  publicDownloadAllowed?: YN;
};

DataSourceInternal

export type DataSourceInternal = {
  orgId: string;
  workspaceId: string;
  datasourceId: string;
  datasourceType: string;
  typeValue: string;
  logLevel?: string;
  preQueryScript?: string;
  postQueryScript?: string;
  skipQueryForUpdate: YN;
  createdAt: string;
  createdBy: string;
  updatedAt: string;
  updatedBy: string;
  beforeInsertScript?: string;
  afterInsertScript?: string;
  beforeUpdateScript?: string;
  afterUpdateScript?: string;
  beforeDeleteScript?: string;
  afterDeleteScript?: string;
  sampleData?: string;
  preventResync: YN;
  readOnly: YN;
  validateRowScript?: string;
  extTypeValue?: string;
};

DataSourceInternalOption

export type DataSourceInternalOption = {
  orgId?: string;
  workspaceId?: string;
  datasourceId?: string;
  datasourceType?: string;
  typeValue?: string;
  logLevel?: string;
  preQueryScript?: string;
  postQueryScript?: string;
  skipQueryForUpdate?: YN;
  createdAt?: string;
  createdBy?: string;
  updatedAt?: string;
  updatedBy?: string;
  beforeInsertScript?: string;
  afterInsertScript?: string;
  beforeUpdateScript?: string;
  afterUpdateScript?: string;
  beforeDeleteScript?: string;
  afterDeleteScript?: string;
  sampleData?: string;
  preventResync?: YN;
  readOnly?: YN;
  validateRowScript?: string;
  extTypeValue?: string;
};

DatasourceType

export type DatasourceType = 'Table' | { External: ExternalDatasource };

DateFilter

export type DateFilter =
  | { on: string }
  | { noton: string }
  | { empty: string }
  | { notempty: string }
  | { after: string }
  | { before: string }
  | { beforetime: string }
  | { onorafter: string }
  | { onorbefore: string }
  | { today: string }
  | { yesterday: string }
  | { last7days: string }
  | { last14days: string }
  | { last28days: string }
  | { thisweek: string }
  | { thismonth: string }
  | { thisquarter: string }
  | { thisyear: string };

Delete

export type Delete = { type: 'Flow'; row: string } | { type: 'FlowVersion'; row: FlowVersion };

DeleteResult

export type DeleteResult = { type: 'Empty' };

Direction

export type Direction = 'ltr' | 'rtl';

DownloadPatchIds

export type DownloadPatchIds = {
  pages: Array<string>;
  dataSources: Array<string>;
  flows: Array<string>;
  scripts: Array<string>;
  testScripts: Array<string>;
  profiles: Array<string>;
  roles: Array<string>;
  lookups: Array<string>;
  languages: Array<string>;
  flowNodes: Array<string>;
  externalDataSources: Array<string>;
  images: Array<string>;
  settings: boolean;
  components?: Array<string>;
  componentSources?: Array<string>;
  dbScripts?: Array<string>;
  howTos?: Array<string>;
  resources: Array<string>;
  resourceTypes: Array<string>;
  variables: Array<string>;
};

Edge

export type Edge = { id: string; label?: string; source: string; target: string };

EmailProps

export type EmailProps = {
  to: string;
  cc?: string;
  bcc?: string;
  subject: string;
  text: string;
  html?: string;
  attachments?: Array<string>;
};

ErrorResult

export type ErrorResult = { title: string; message: string; code: number; status: 'ERROR' };

ExecuteDenoNodeScriptInput

export type ExecuteDenoNodeScriptInput<T> = { script: string; input: T };

ExecuteDenoNodeScriptOutput

export type ExecuteDenoNodeScriptOutput = { row: Record<string, unknown> };

ExecuteOnErrorScheduledScriptInput

export type ExecuteOnErrorScheduledScriptInput = { scheduleId: string; error: string; scriptUri: string };

ExecuteScheduledScriptInput

export type ExecuteScheduledScriptInput = { scriptUri: string; body: Record<string, unknown> };

ExecuteScriptInput

export type ExecuteScriptInput = {
  scriptUri: string;
  body: Record<string, unknown>;
  headers: { [key: string]: string };
  params: { [key: string]: string };
};

ExecuteScriptOutput

export type ExecuteScriptOutput = {
  responseBody: any;
  responseType?: 'json' | 'text' | 'base64';
  responseHeaders?: Record<string, string>;
};

Execution

export type Execution = {
  endDate?: string;
  id: string;
  input: Record<string, unknown>;
  ms: number;
  next: Array<ExecutionID>;
  outcome: Outcome;
  output?: any;
  waitState?: WaitState;
  previous?: ExecutionID;
  startDate: string;
  ts: string;
  index: number;
};

ExecutionID

export type ExecutionID = { id: string; nodeId: string };

ExtAttribute

export type ExtAttribute = {
  allowBlank?: YN;
  attributeCode: string;
  attributeName: string;
  attributeType: AttributeType;
  auditEnabled?: YN;
  autoSequence?: YN;
  columnName?: string;
  defaultValue?: string;
  exportAllowed?: YN;
  insertAllowed?: YN;
  maxLength?: number;
  outParam?: YN;
  paramName?: string;
  primaryKey?: YN;
  queryAllowed?: YN;
  scale?: number;
  selectAllowed?: YN;
  updateAllowed?: YN;
  calculatedColumn?: YN;
};

ExtDescAPIInput

export type ExtDescAPIInput = { externalDsId: string; objectName?: string; initData: Record<string, any> };

ExtDescAPIOutput

export type ExtDescAPIOutput = { attrs: Array<ExtAttribute> };

ExtInitAPIInput

export type ExtInitAPIInput = { externalDsId: string; objectName?: string };

ExtInitAPIOutput

export type ExtInitAPIOutput = { row: Record<string, any> };

ExtPostAPIInput

export type ExtPostAPIInput<T> = {
  externalDsId: string;
  objectName?: string;
  rows: Row<T>[];
  initData: Record<string, unknown>;
  attributes: Array<Attribute>;
};

ExtPostAPIOutput

export type ExtPostAPIOutput<T> = { rows: T[]; sql?: string; params?: unknown[] };

ExtQueryAPIInput

export type ExtQueryAPIInput<T> = {
  externalDsId: string;
  objectName?: string;
  query: Query<T>;
  initData: Record<string, unknown>;
  attributes: Array<Attribute>;
};

ExtQueryAPIOutput

export type ExtQueryAPIOutput<T> = { rows: T[]; sql?: string; params?: unknown[] };

ExternalDatasource

export type ExternalDatasource = {
  orgId: string;
  workspaceId: string;
  externalDsId: string;
  authApi?: string;
  describeApi?: string;
  queryApi?: string;
  postApi?: string;
  createdAt: string;
  createdBy: string;
  updatedAt: string;
  updatedBy: string;
};

Flow

export type Flow = { nodes: { [key: string]: Node }; edges: { [key: string]: Edge } };

FlowAccess

export type FlowAccess = {
  createdAt: string;
  createdBy: string;
  endDate?: string;
  flowId: string;
  roleCode: string;
  startDate: string;
  updateAllowed: boolean;
  updatedAt: string;
  updatedBy: string;
};

FlowAccessOption

export type FlowAccessOption = {
  createdAt?: string;
  createdBy?: string;
  endDate?: string;
  flowId?: string;
  roleCode?: string;
  startDate?: string;
  updateAllowed?: boolean;
  updatedAt?: string;
  updatedBy?: string;
};

FlowRun

export type FlowRun = {
  id: string;
  flowId: string;
  version: number;
  name: string;
  ownerContext: string;
  status: FlowRunStatus;
  runtime: FlowRunInstance;
  timeUsageMs: bigint;
  memoryUsageBytes: bigint;
  startedAt: string;
  finishedAt?: string;
  input: Record<string, unknown>;
  store: Record<string, unknown>;
};

FlowRunInstance

export type FlowRunInstance = { nodes: { [key: string]: NodeInstance } };

FlowRunLogs

export type FlowRunLogs = { flowRunId: number; nodeId: string; executionId: string; output: string; error: string };

FlowRunOption

export type FlowRunOption = {
  id?: string;
  flowId?: string;
  version?: number;
  name?: string;
  ownerContext?: string;
  status?: FlowRunStatus;
  runtime?: FlowRunInstance;
  timeUsageMs?: bigint;
  memoryUsageBytes?: bigint;
  startedAt?: string;
  finishedAt?: string;
  input?: Record<string, unknown>;
  store?: Record<string, unknown>;
};

FlowRunStatus

export type FlowRunStatus = 'Running' | 'Success' | 'Error' | 'Cancelled' | 'TimedOut' | 'Scheduled' | 'Waiting';

FlowRunTriggered

export type FlowRunTriggered = { version: number; flowRunId: string };

FlowRunUpdated

export type FlowRunUpdated =
  | { type: 'Execution'; nodeId: string; execution: Execution }
  | { type: 'Node'; nodeId: string; node: NodeInstance }
  | { type: 'ExecutionSeqAdded'; nodeId: string; executionId: string }
  | { type: 'ExecutionOutcome'; nodeId: string; executionId: string; outcome: Outcome }
  | { type: 'RefreshExecution'; nodeId: string; executionId: string }
  | { type: 'FlowCompleted' };

FlowStats

export type FlowStats = {
  createdAt: string;
  createdBy: string;
  flowId: string;
  maxMemoryUsageBytes: number;
  minMemoryUsageBytes: number;
  totalCancelled: number;
  totalDurationMs: number;
  totalError: number;
  totalRuns: number;
  totalSuccess: number;
  totalTimedOut: number;
  updatedAt: string;
  updatedBy: string;
  version: number;
};

FlowStatsOption

export type FlowStatsOption = {
  createdAt?: string;
  createdBy?: string;
  flowId?: string;
  maxMemoryUsageBytes?: number;
  minMemoryUsageBytes?: number;
  totalCancelled?: number;
  totalDurationMs?: number;
  totalError?: number;
  totalRuns?: number;
  totalSuccess?: number;
  totalTimedOut?: number;
  updatedAt?: string;
  updatedBy?: string;
  version?: number;
};

FlowStatus

export type FlowStatus = 'Draft' | 'Published' | 'Archived';

FlowTriggers

export type FlowTriggers = {
  activeVersion: number;
  id: string;
  name: string;
  trigger?: TriggerOption;
  updatedBy: string;
};

FlowTriggersOption

export type FlowTriggersOption = {
  activeVersion?: number;
  id?: string;
  name?: string;
  trigger?: TriggerOption;
  updatedBy?: string;
};

FlowUpdate

export type FlowUpdate = { id: string; version: number; updatedAt: string; value: FlowValue };

FlowValue

export type FlowValue =
  | { name: string }
  | { description: string }
  | { status: FlowStatus }
  | { flow: Flow }
  | { trigger: { trigger?: TriggerOption; active: boolean } };

FlowVersion

export type FlowVersion = { id: string; version: number };

FlowWaitForInfo

export type FlowWaitForInfo = {
  executionId: string;
  flowId: string;
  flowRunId: string;
  nodeId: string;
  nodeType: string;
  version: number;
  workspaceId: string;
  data?: Record<string, any>;
};

Flows

export type Flows = {
  activeVersion: number;
  createdAt: string;
  createdBy: string;
  description?: string;
  flow: Flow;
  id: string;
  name: string;
  status: FlowStatus;
  updatedAt: string;
  updatedBy: string;
  versionUpdatedAt: string;
  versionUpdatedBy: string;
  version: number;
  trigger?: TriggerOption;
  triggerActive: boolean;
};

FlowsOption

export type FlowsOption = {
  activeVersion?: number;
  createdAt?: string;
  createdBy?: string;
  description?: string;
  flow?: Flow;
  id?: string;
  name?: string;
  status?: FlowStatus;
  updatedAt?: string;
  updatedBy?: string;
  versionUpdatedAt?: string;
  versionUpdatedBy?: string;
  version?: number;
  trigger?: TriggerOption;
  triggerActive?: boolean;
};

GenerateDataSourceInput

export type GenerateDataSourceInput = { genDsType: GenerateDataSourceType; datasourceId: string };

GenerateDataSourceType

export type GenerateDataSourceType =
  | { type: 'SQL'; data: { sql: string } }
  | { type: 'Table'; data: { tableName: string } }
  | { type: 'External'; data: { extDsId: string; objectName?: string } }
  | { type: 'File'; data: { tableName: string; columns: Array<Column>; csv: string } };

Intake

export type Intake = {
  userNameScript: string;
  reminderUnit: 'Second' | 'Hour' | 'Day';
  reminderFrequency: number;
  timeoutAfterNReminders: number;
  onRequest: string;
  onResponse: string;
};

IntakeEmail

export type IntakeEmail = { subject: string; textBody: string; htmlBody?: string };

IntakeInfo

export type IntakeInfo = {
  executionId: string;
  flowId: string;
  flowRunId: string;
  nodeId: string;
  nodeType: string;
  version: number;
  workspaceId: string;
  userName: string;
};

IntakeQA

export type IntakeQA = { questionItemId: string; answerItemId: string };

IntakeResponse

export type IntakeResponse = {
  executionId: string;
  flowId: string;
  flowRunId: string;
  nodeId: string;
  nodeType: string;
  version: number;
  workspaceId: string;
  userName: string;
  intakeStatus: IntakeResult;
  answers: Record<string, any>;
  intakeFlow: Array<IntakeQA>;
};

IntakeResult

export type IntakeResult = 'Submitted' | 'Timeout' | 'Cancelled' | 'Pending';

IntakeUserInfo

export type IntakeUserInfo = { userName: string; urlState: Record<string, any>; pageId: string; workspaceId: string };

JSError

export type JSError = { code: number; message: string; title: string };

JSRequest

export type JSRequest<T> =
  | { type: 'afterDelete'; data: AfterDeleteInput<T> }
  | { type: 'afterInsert'; data: AfterInsertInput<T> }
  | { type: 'afterUpdate'; data: AfterUpdateInput<T> }
  | { type: 'beforeDelete'; data: BeforeDeleteInput<T> }
  | { type: 'beforeInsert'; data: BeforeInsertInput<T> }
  | { type: 'beforeUpdate'; data: BeforeUpdateInput<T> }
  | { type: 'clearDataSourceCache'; data: string }
  | { type: 'clearExtDataSourceCache'; data: string }
  | { type: 'clearScriptCache'; data: string }
  | { type: 'clearScheduleOnErrorScriptCache'; data: string }
  | { type: 'executeScript'; data: ExecuteScriptInput }
  | { type: 'executeScheduledScript'; data: ExecuteScheduledScriptInput }
  | { type: 'executeScheduleOnErrorScript'; data: ExecuteOnErrorScheduledScriptInput }
  | { type: 'extDescAPI'; data: ExtDescAPIInput }
  | { type: 'extInitAPI'; data: ExtInitAPIInput }
  | { type: 'extPostAPI'; data: ExtPostAPIInput<T> }
  | { type: 'extQueryAPI'; data: ExtQueryAPIInput<T> }
  | { type: 'id'; data: string }
  | { type: 'ping'; data: Array<number> }
  | { type: 'pong'; data: Array<number> }
  | { type: 'postQuery'; data: PostQueryInput<T> }
  | { type: 'preQuery'; data: PreQueryInput<T> }
  | { type: 'validateRow'; data: ValidateRowInput<T> }
  | { type: 'executeDenoNodeScript'; data: ExecuteDenoNodeScriptInput<T> }
  | { type: 'executeDenoNodeExpression'; data: string }
  | { type: 'shutdown' }
  | { type: 'systemFunction'; data: SystemFunctionInput };

JSRequestMessage

export type JSRequestMessage<T> = { id: string; request: JSRequest<T> };

JSResponse

export type JSResponse<T> =
  | { afterDelete: AfterDeleteOutput<T> }
  | { afterInsert: AfterInsertOutput<T> }
  | { afterUpdate: AfterUpdateOutput<T> }
  | { beforeDelete: BeforeDeleteOutput<T> }
  | { beforeInsert: BeforeInsertOutput<T> }
  | { beforeUpdate: BeforeUpdateOutput<T> }
  | 'empty'
  | { error: JSError }
  | { executeScript: ExecuteScriptOutput }
  | { extDescAPI: ExtDescAPIOutput }
  | { extInitAPI: ExtInitAPIOutput }
  | { extPostAPI: ExtPostAPIOutput<T> }
  | { extQueryAPI: ExtQueryAPIOutput<T> }
  | { postQuery: PostQueryOutput<T> }
  | { preQuery: PreQueryOutput<T> }
  | { validateRow: ValidateRowOutput<T> }
  | { executeDenoNodeScript: ExecuteDenoNodeScriptOutput }
  | { executeDenoNodeExpression: any }
  | { systemFunction: SystemFunctionOutput };

JSResponseMessage

export type JSResponseMessage<T> = { id: string; response: string };

JSScriptType

export type JSScriptType =
  | 'AfterDelete'
  | 'AfterInsert'
  | 'AfterUpdate'
  | 'BeforeDelete'
  | 'BeforeInsert'
  | 'BeforeUpdate'
  | 'FlowScript'
  | 'PostQuery'
  | 'PreQuery'
  | 'ScheduleOnError'
  | 'Script'
  | 'ValidateRow'
  | 'ExtQueryAPI'
  | 'ExtPostAPI'
  | 'ExtDescAPI'
  | 'ExtInitAPI';

LogFile

export type LogFile = { fileName: string; logEntries: Array<string> };

MFAInfo

export type MFAInfo = { key: string; code: string };

Manifest

export type Manifest = {
  components: Record<string, unknown>;
  componentSources: Record<string, unknown>;
  dataSources: Record<string, unknown>;
  externalDataSources: Record<string, unknown>;
  scripts: Record<string, unknown>;
  testScripts: Record<string, unknown>;
  images: Record<string, unknown>;
  languages: Record<string, unknown>;
  lookups: Record<string, unknown>;
  pages: Record<string, unknown>;
  profiles: Record<string, unknown>;
  roles: Record<string, unknown>;
  flowNodes: Record<string, unknown>;
  flows: Record<string, unknown>;
  buildDate: string;
  buildVersion: string;
  elapsedMs: number;
  settings: string;
  totalComponentSources: number;
  totalComponents: number;
  totalDataSources: number;
  totalExternalDataSources: number;
  totalScripts: number;
  totalTestScripts: number;
  totalLookups: number;
  totalLanguages: number;
  totalPages: number;
  totalProfiles: number;
  totalRoles: number;
  totalFlowNodes: number;
  totalFlows: number;
  totalImages: number;
  ts: string;
  version: string;
  id: string;
  dbScripts: Record<string, unknown>;
  totalDbScripts: number;
  howTos: Record<string, unknown>;
  totalHowTos: number;
  resources: Record<string, unknown>;
  totalResources: number;
  resourceTypes: Record<string, unknown>;
  totalResourceTypes: number;
  variables: Record<string, unknown>;
  totalVariables: number;
};

ManifestChanges

export type ManifestChanges = {
  components: Record<string, unknown>;
  componentSources: Record<string, unknown>;
  dataSources: Record<string, unknown>;
  externalDataSources: Record<string, unknown>;
  scripts: Record<string, unknown>;
  testScripts: Record<string, unknown>;
  images: Record<string, unknown>;
  languages: Record<string, unknown>;
  lookups: Record<string, unknown>;
  pages: Record<string, unknown>;
  profiles: Record<string, unknown>;
  roles: Record<string, unknown>;
  settings: string;
  flowNodes: Record<string, unknown>;
  flows: Record<string, unknown>;
  dbScripts: Record<string, unknown>;
  howTos: Record<string, unknown>;
  resources: Record<string, unknown>;
  resourceTypes: Record<string, unknown>;
  variables: Record<string, unknown>;
  flowsState: { [key: string]: string | null };
  resourceProps: { [key: string]: string | null };
  variableValue: { [key: string]: string | null };
};

MultiDateFilter

export type MultiDateFilter = { bn: [string, string] };

MultiNumberFilter

export type MultiNumberFilter = { bn: [number, number] } | { in: Array<number> } | { nin: Array<number> };

MultiStringFilter

export type MultiStringFilter =
  | { hasall: Array<string> }
  | { hasany: Array<string> }
  | { notany: Array<string> }
  | { in: Array<string> }
  | { nin: Array<string> }
  | { ihasall: Array<string> }
  | { ihasany: Array<string> }
  | { inotany: Array<string> }
  | { iin: Array<string> }
  | { inin: Array<string> };

MySQLProps

export type MySQLProps = {
  databaseUrl: string;
  dbPkcs12Path?: string;
  dbPkcs12Password?: string;
  dbRootCertPath?: string;
  dbSkipDomainValidation?: boolean;
  dbAcceptInvalidCerts?: boolean;
  maxConnections?: number;
  initScript?: string;
};

Node

export type Node = {
  id: string;
  nodeType: NodeType;
  label: string;
  input?: Record<string, unknown>;
  ui: UI;
  retry?: Retry;
  output?: Record<string, unknown>;
};

NodeInstance

export type NodeInstance = {
  executions: { [key: string]: Execution };
  ms: number;
  nodeInstId: string;
  nodeType: NodeType;
  executionSeq: Array<string>;
};

NodeType

export type NodeType =
  | { type: 'Trigger'; trigger: Trigger; active: boolean }
  | ({ type: 'Approval' } & Approval)
  | ({ type: 'Intake' } & Intake)
  | { type: 'Conditional'; expression: string }
  | { type: 'Email'; script: string }
  | { type: 'End' }
  | { type: 'Fork'; key: string; script: string }
  | { type: 'Deno'; script: string }
  | { type: 'Python'; script: string }
  | { type: 'Postgres'; script: string }
  | { type: 'Join'; key: string }
  | { type: 'LoadJSON'; file_path: string }
  | { type: 'OnError'; script: string }
  | { type: 'Start'; script: string }
  | { type: 'Switch'; expression: string }
  | { type: 'Wait'; seconds: number }
  | { type: 'WaitFor'; timeoutSeconds: number; onRequest: string; onResponse: string };

NumberFilter

export type NumberFilter =
  | { eq: number }
  | { is: number }
  | { ne: number }
  | { not: number }
  | { gt: number }
  | { gte: number }
  | { lt: number }
  | { lte: number }
  | { null: number }
  | { notnull: number };

OAuthConfigs

export type OAuthConfigs = {
  provider: OAuthProvider;
  callbackUrl: string;
  authUrl: string;
  accessTokenUrl: string;
  userInfoUrl: string;
  clientId: string;
  clientSecret: string;
  scope: string;
  allowedDomains?: string;
  version?: string;
  logoutUrl?: string;
  pkce?: string;
  revokeAccess?: string;
  userNameClaimName: string;
  emailClaimName: string;
  authUrlParams: string;
};

OAuthInfo

export type OAuthInfo = { un: string; display_name: string; redirect_uri: string };

OAuthProvider

export type OAuthProvider = 'DEFAULT' | 'SFORCE';

OptionalCaptchaRequest

export type OptionalCaptchaRequest = { un: string; pw: string; cc?: string; ck?: string };

OracleProps

export type OracleProps = {
  databaseUrl: string;
  minConnections?: number;
  maxConnections?: number;
  initScript?: string;
};

OrgAuthProvider

export type OrgAuthProvider = { Native: PasswordPolicy } | { OAuth: OAuthConfigs } | { Saml: SAMLConfigs };

OrgSetup

export type OrgSetup = { emailSignature: string };

Outcome

export type Outcome = {
  conditionResult?: boolean;
  message?: string;
  status: OutcomeStatus;
  switchResult?: string;
  approvalResult?: ApprovalResult;
  intakeResult?: IntakeResult;
  waitUntil?: WaitUntil;
  waiting?: boolean;
};

OutcomeStatus

export type OutcomeStatus = 'Cancelled' | 'End' | 'Error' | 'Pending' | 'Running' | 'Success' | 'WaitUntil';

OwnerContext

export type OwnerContext =
  | { Schedule: { id: string; user_name: string } }
  | { Script: { id: string; user_name: string } }
  | { Trigger: { user_name: string } }
  | { TestRun: { user_name: string } };

PasswordPolicy

export type PasswordPolicy = {
  maxFailedAttemptsToLock: number;
  minAlphaChars: number;
  minChars: number;
  minNumericChars: number;
  minSpecialChars: number;
  preventReuse: number;
  pwdExpiryDays: number;
  signInErrorMessage?: string;
  forceResetInitialPwd?: boolean;
  sessionLifetimeMinutes?: number;
};

PasswordResetInfo

export type PasswordResetInfo = { type: 'Captcha'; data: OptionalCaptchaRequest } | { type: 'Reset'; data: Reset };

PatchMeta

export type PatchMeta = {
  orgId: string;
  workspaceId: string;
  ids?: DownloadPatchIds;
  createdBy: string;
  createdAt: string;
};

PatchVerificationResult

export type PatchVerificationResult = {
  orgId: string;
  workspaceId: string;
  inserts: ManifestChanges;
  updates: ManifestChanges;
  changes: Array<string>;
  isSame: boolean;
  settingsChanged: boolean;
  genMs: bigint;
  compareMs: bigint;
  target: ManifestChanges;
  settingsHash: string;
  buildDate?: string;
  buildVersion: string;
  ts?: string;
  version: string;
  patchId: string;
  zipFile: string;
  sourceZipFile: string;
};

PostQueryInput

export type PostQueryInput<T> = { datasourceId: string; rows: DBRow<T>[]; query: Query<T> };

PostQueryOutput

export type PostQueryOutput<T> = { rows: T[] };

PostgresProps

export type PostgresProps = { databaseUrl: string; maxConnections?: number; initScript?: string };

PreQueryInput

export type PreQueryInput<T> = { datasourceId: string; query: Query<T> };

PreQueryOutput

export type PreQueryOutput<T> = { query: Query<T>; rows?: T[]; sql?: string; params?: unknown[] };

PreviousPasswordHashes

export type PreviousPasswordHashes = Array<string>;

ProfileContext

export type ProfileContext = 'Organization' | 'Workspace' | 'Role' | 'User';

PublicMD

export type PublicMD = { enableCaptcha: boolean; logo: string; name: string };

Publish

export type Publish = { context: string; id: string; payload: any };

Query

export type Query<T> = {
  aggregate?: Array<Aggregate<T>>;
  data?: SchemaMemberValue<T>;
  fetchDistinct?: boolean;
  filter?: Filters<T>;
  groupBy?: (keyof T)[];
  limit?: number;
  offset?: number;
  params?: SchemaMemberValue<T>;
  projection?: SchemaMember<T, number>;
  select?: (keyof T)[];
  sort?: SchemaMember<T, number>;
  includeRowCount?: boolean;
  fullSQL?: string;
  whereClause?: string;
  whereClauseParamList?: any[];
  subSQL?: string;
  subSQLParamList?: any[];
  orderBy?: string;
};

QueryMany

export type QueryMany<T> = { type: 'Workspace'; query: Query<T> };

QueryManyResult

export type QueryManyResult =
  | { type: 'Flow'; rows: Array<FlowsOption> }
  | { type: 'Workspace'; rows: Array<WorkspaceOption> };

QueryOne

export type QueryOne =
  | { type: 'NextFlowVersion'; filter: string }
  | { type: 'Workspace'; filter: string }
  | { type: 'Flow'; filter: FlowVersion }
  | { type: 'FlowRun'; filter: string }
  | { type: 'WorkspaceSettings'; filter: string };

QueryOneResult

export type QueryOneResult =
  | { type: 'Flow'; row: Flows }
  | { type: 'FlowRun'; row: FlowRun }
  | { type: 'NextFlowVersion'; row: number }
  | { type: 'Workspace'; row: Workspace }
  | { type: 'WorkspaceSettings'; row: WorkspaceSettings };

QueryResult

export type QueryResult<T> = {
  data: DBRow<T>[];
  pagination?: Record<string, string>;
  queryElapsed: number;
  connectionElapsed: number;
  sql?: string;
  params?: any[];
  rowsFetched: number;
  totalRowCount?: number;
  serverElapsed: number;
  columns?: Array<Attribute>;
};

RecordStatus

export type RecordStatus = 'D' | 'I' | 'N' | 'Q' | 'U' | 'V' | 'E';

ReferenceMapping

export type ReferenceMapping = { attributeCode: string; refAttributeCode: string };

ReferenceMetadata

export type ReferenceMetadata = {
  datasourceId: string;
  attributeCode: string;
  attributeType: AttributeType;
  mappings: Array<ReferenceMapping>;
  selectAttributes: Array<string>;
};

Request

export type Request<T> =
  | { type: 'QueryOne'; data: QueryOne }
  | { type: 'QueryMany'; data: QueryMany<T> }
  | { type: 'Create'; data: Create }
  | { type: 'Update'; data: Update }
  | { type: 'Delete'; data: Delete }
  | { type: 'DataSourceRequests'; data: { [key: string]: DSRequest<T> } }
  | { type: 'GenerateDataSource'; data: GenerateDataSourceInput }
  | { type: 'GenerateDataSourceType'; data: string }
  | { type: 'GenerateJSONSchema'; data: string }
  | { type: 'SyncDataSource'; data: string }
  | { type: 'GenerateAPIKey'; data: string }
  | { type: 'ExecuteScript'; data: ExecuteScriptInput }
  | { type: 'Subscribe'; data: Subscription }
  | { type: 'Unsubscribe'; data: Subscription }
  | { type: 'Publish'; data: Publish }
  | { type: 'SQL'; data: SQLRequest }
  | { type: 'BroadcastEnter'; data: { context: string; id: string; data: any } }
  | { type: 'BroadcastExit'; data: { broadcastId: string } }
  | { type: 'Broadcast'; data: { broadcastId: string; data: any } }
  | { type: 'StartFlow'; data: { name: string; flowId: string; version: number; input: any } }
  | { type: 'ApprovalResponse'; data: ApprovalResponse }
  | { type: 'IntakeResponse'; data: IntakeResponse }
  | { type: 'CompleteWaitFor'; data: FlowWaitForInfo }
  | { type: 'UserInfo'; data: Array<string> }
  | { type: 'CommentsCount'; data: { contextId: string; contextValue: string } };

Reset

export type Reset = { key: string; code: string; np: string };

ResetPasswordResponse

export type ResetPasswordResponse =
  | { type: 'Key'; data: string }
  | { type: 'Success' }
  | { type: 'Error'; data: string };

Resource

export type Resource = {
  orgId: string;
  workspaceId: string;
  id: string;
  typeId: string;
  resourceName: string;
  props: Record<string, unknown>;
  access: Array<ResourceAccess>;
};

ResourceAccess

export type ResourceAccess = {
  orgId: string;
  workspaceId: string;
  roleCode: string;
  resourceId: string;
  startDate: string;
  endDate?: string;
  updateAllowed: boolean;
};

ResourceAccessOption

export type ResourceAccessOption = {
  orgId?: string;
  workspaceId?: string;
  roleCode?: string;
  resourceId?: string;
  startDate?: string;
  endDate?: string;
  updateAllowed?: boolean;
};

ResourceInternal

export type ResourceInternal = {
  orgId: string;
  workspaceId: string;
  id: string;
  typeId: string;
  resourceName: string;
  props: Record<string, unknown>;
};

ResourceInternalOption

export type ResourceInternalOption = {
  orgId?: string;
  workspaceId?: string;
  id?: string;
  typeId?: string;
  resourceName?: string;
  props?: Record<string, unknown>;
};

ResourceOption

export type ResourceOption = {
  orgId?: string;
  workspaceId?: string;
  id?: string;
  typeId?: string;
  resourceName?: string;
  props?: Record<string, unknown>;
  access?: Array<ResourceAccess>;
};

Response

export type Response<T> =
  | { type: 'QueryOne'; data: QueryOneResult }
  | { type: 'QueryMany'; data: QueryManyResult }
  | { type: 'Create'; data: CreateResult }
  | { type: 'Update'; data: UpdateResult }
  | { type: 'Delete'; data: DeleteResult }
  | { type: 'Error'; data: ErrorResult }
  | { type: 'DataSourceResponse'; data: { [key: string]: QueryResult<T> } }
  | { type: 'Ok'; data: string }
  | { type: 'ExecuteScript'; data: ExecuteScriptOutput }
  | { type: 'Publish'; data: Publish }
  | {
      type: 'BroadcastEnter';
      data: { context: string; id: string; data: any; broadcastId: string; createdBy: string; createdAt: string };
    }
  | { type: 'BroadcastExit'; data: { context: string; id: string; broadcastId: string } }
  | { type: 'Broadcast'; data: { context: string; id: string; broadcastId: string; data: any } }
  | { type: 'SQL'; data: [string | null, QueryResult<T> | null] }
  | { type: 'UserInfo'; data: Array<UserInfo> }
  | { type: 'CommentsCount'; data: number };

ResumeFlow

export type ResumeFlow = { flowId: string; flowRunId: string };

Retry

export type Retry = { initialDelay: number; maxDelay: number; delayMultiplier: number; maxAttempts: number };

Role

export type Role = {
  createdAt: string;
  createdBy: string;
  description?: string;
  endDate?: string;
  roleCode: string;
  roleName: string;
  startDate: string;
  updatedAt: string;
  updatedBy: string;
};

RoleOption

export type RoleOption = {
  createdAt?: string;
  createdBy?: string;
  description?: string;
  endDate?: string;
  roleCode?: string;
  roleName?: string;
  startDate?: string;
  updatedAt?: string;
  updatedBy?: string;
};

SAMLConfigs

export type SAMLConfigs = {
  issuer: string;
  callbackUrl: string;
  idp: string;
  userNameClaimName: string;
  emailClaimName: string;
};

SQLRequest

export type SQLRequest = { sql: string; params: unknown[]; update: boolean };

SQLServerProps

export type SQLServerProps = { databaseUrl: string; maxConnections?: number; initScript?: string };

Schedule

export type Schedule = {
  createdAt: string;
  createdBy: string;
  cronExpression: string;
  description?: string;
  id: string;
  input: string;
  itemId: string;
  itemType: 'Flow' | 'Script';
  itemIdContext: string;
  lastRanAt?: string;
  name: string;
  nextRunAt?: string;
  onError: string;
  orgId: string;
  owner: string;
  priority: number;
  status: TaskStatus;
  updatedAt: string;
  updatedBy: string;
  workspaceId: string;
  retry?: Retry;
  retryAttempt: number;
  retryAt?: string;
};

ScheduleOption

export type ScheduleOption = {
  createdAt?: string;
  createdBy?: string;
  cronExpression?: string;
  description?: string;
  id?: string;
  input?: string;
  itemId?: string;
  itemType?: 'Flow' | 'Script';
  itemIdContext?: string;
  lastRanAt?: string;
  name?: string;
  nextRunAt?: string;
  onError?: string;
  orgId?: string;
  owner?: string;
  priority?: number;
  status?: TaskStatus;
  updatedAt?: string;
  updatedBy?: string;
  workspaceId?: string;
  retry?: Retry;
  retryAttempt?: number;
  retryAt?: string;
};

ScheduleRunUpdated

export type ScheduleRunUpdated = {
  type: 'Status';
  status: TaskStatus;
  lastRanAt?: string;
  nextRunAt?: string;
  retryAttempt: number;
};

Script

export type Script = {
  orgId: string;
  workspaceId: string;
  scriptId: string;
  scriptUri: string;
  scriptName: string;
  scriptCode: string;
  createdAt: string;
  createdBy: string;
  updatedAt: string;
  updatedBy: string;
  scriptType: ScriptType;
  scriptLang: ScriptLangType;
};

ScriptLangType

export type ScriptLangType = 'Deno' | 'Python';

ScriptOption

export type ScriptOption = {
  orgId?: string;
  workspaceId?: string;
  scriptId?: string;
  scriptUri?: string;
  scriptName?: string;
  scriptCode?: string;
  createdAt?: string;
  createdBy?: string;
  updatedAt?: string;
  updatedBy?: string;
  scriptType?: ScriptType;
  scriptLang?: ScriptLangType;
};

ScriptType

export type ScriptType = 'PublicWebAPI' | 'PrivateWebAPI' | 'Module' | 'ScheduledJob';

SignInInfo

export type SignInInfo =
  | { type: 'OAuth'; data: OAuthInfo }
  | { type: 'Captcha'; data: OptionalCaptchaRequest }
  | { type: 'Mfa'; data: MFAInfo };

Sort

export type Sort = { field: string; order: SortOrder };

SortOrder

export type SortOrder = 'ASC' | 'DESC';

StateParams

export type StateParams = { code_verifier: string; redirect_uris: string; expiry: number };

Status

export type Status = 'ERROR' | 'OK';

StringFilter

export type StringFilter =
  | { is: string }
  | { not: string }
  | { empty: string }
  | { notempty: string }
  | { nct: string }
  | { like: string }
  | { sw: string }
  | { ew: string }
  | { iis: string }
  | { inot: string }
  | { inct: string }
  | { ilike: string }
  | { isw: string }
  | { iew: string };

Subscription

export type Subscription = { context: string; id: string };

SystemFunctionInput

export type SystemFunctionInput = { functionName: string; input: Record<string, unknown> };

SystemFunctionOutput

export type SystemFunctionOutput = { output: Record<string, unknown> };

Task

export type Task =
  | {
      StartFlow: {
        name: string;
        id: string;
        version: number;
        input: Record<string, unknown>;
        ownerContext: OwnerContext;
      };
    }
  | { ResumeFlow: ResumeFlow }
  | {
      ExecuteFlowNode: {
        executionId: string;
        flowId: string;
        version: number;
        flowRunId: string;
        nodeId: string;
        nodeType: string;
        source?: ExecutionID;
      };
    }
  | {
      RetryFlowNode: {
        executionId: string;
        flowId: string;
        version: number;
        flowRunId: string;
        nodeId: string;
        nodeType: string;
      };
    }
  | {
      TimeoutFlowNode: {
        executionId: string;
        flowId: string;
        version: number;
        flowRunId: string;
        nodeId: string;
        nodeType: string;
      };
    }
  | { CompleteWaitForFlowNode: FlowWaitForInfo }
  | { ApprovalResponse: ApprovalResponse }
  | { IntakeResponse: IntakeResponse }
  | { Schedule: { id: string } };

TaskQueue

export type TaskQueue = {
  completedAt?: string;
  error?: string;
  id: string;
  orgId: string;
  owner: string;
  priority: number;
  startAt: string;
  startedAt?: string;
  status: TaskStatus;
  task: Task;
  taskType: TaskType;
  workspaceId: string;
};

TaskQueueOption

export type TaskQueueOption = {
  completedAt?: string;
  error?: string;
  id?: string;
  orgId?: string;
  owner?: string;
  priority?: number;
  startAt?: string;
  startedAt?: string;
  status?: TaskStatus;
  task?: Task;
  taskType?: TaskType;
  workspaceId?: string;
};

TaskStatus

export type TaskStatus = 'Queued' | 'Running' | 'Success' | 'Error' | 'Retry';

TaskType

export type TaskType = 'Flow' | 'Script' | 'FlowStep' | 'ScheduledFlow' | 'ScheduledScript';

ThemeColor

export type ThemeColor = { main: Color; light: Color; lighter: Color; dark: Color; hover: Color; contrastText: Color };

Transaction

export type Transaction = { parentAlias: string; parentId: string; mapping: Array<TransactionMapping> };

TransactionMapping

export type TransactionMapping = { childAttribute: string; parentAttribute: string };

Trigger

export type Trigger =
  | { type: 'Manual' }
  | { type: 'Kafka'; config: { resource: string; topics: Array<string>; groupId: string } };

TriggerOption

export type TriggerOption = Trigger | null | undefined;

UI

export type UI = { pos: { x: number; y: number }; size: { w: number; h: number } };

Update

export type Update =
  | { type: 'Workspace'; row: Workspace }
  | { type: 'Flow'; row: FlowUpdate }
  | { type: 'UserSettings'; row: { key: string; value: unknown } }
  | { type: 'WorkspaceSettings'; row: { key: string; value: unknown } }
  | { type: 'User'; row: { key: UserKey; value: string } }
  | { type: 'CommentReaction'; row: { commentId: string; reaction: string } };

UpdateResult

export type UpdateResult = { type: 'Flow'; row: string } | { type: 'Workspace'; row: Workspace } | { type: 'Empty' };

User

export type User = {
  apiKey?: string;
  apiSecret?: string;
  createdAt: string;
  createdBy: string;
  displayName: string;
  email: string;
  endDate?: string;
  failedLoginAttempts: number;
  ipAddress?: string;
  lastFailedLogin?: string;
  lastFailedLoginIpAddress?: string;
  lastLogin?: string;
  lastPasswordReset?: string;
  lastPasswordResetBy?: string;
  lastPasswordResetIpAddress?: string;
  locationName?: string;
  locked: boolean;
  passwordHash: string;
  picture?: string;
  previousPasswordHashes: PreviousPasswordHashes;
  startDate: string;
  updatedAt: string;
  updatedBy: string;
  userName: string;
  settings: UserSettings;
  userId?: number;
};

UserInfo

export type UserInfo = {
  displayName: string;
  locationName?: string;
  picture?: string;
  email: string;
  userName: string;
  userId?: number;
};

UserInfoOption

export type UserInfoOption = {
  displayName?: string;
  locationName?: string;
  picture?: string;
  email?: string;
  userName?: string;
  userId?: number;
};

UserKey

export type UserKey = 'displayName' | 'locationName' | 'picture';

UserOption

export type UserOption = {
  apiKey?: string;
  apiSecret?: string;
  createdAt?: string;
  createdBy?: string;
  displayName?: string;
  email?: string;
  endDate?: string;
  failedLoginAttempts?: number;
  ipAddress?: string;
  lastFailedLogin?: string;
  lastFailedLoginIpAddress?: string;
  lastLogin?: string;
  lastPasswordReset?: string;
  lastPasswordResetBy?: string;
  lastPasswordResetIpAddress?: string;
  locationName?: string;
  locked?: boolean;
  passwordHash?: string;
  picture?: string;
  previousPasswordHashes?: PreviousPasswordHashes;
  startDate?: string;
  updatedAt?: string;
  updatedBy?: string;
  userName?: string;
  settings?: UserSettings;
  userId?: number;
};

UserRoles

export type UserRoles = {
  createdAt: string;
  createdBy: string;
  endDate?: string;
  roleCode: string;
  startDate: string;
  updatedAt: string;
  updatedBy: string;
  userName: string;
};

UserRolesOption

export type UserRolesOption = {
  createdAt?: string;
  createdBy?: string;
  endDate?: string;
  roleCode?: string;
  startDate?: string;
  updatedAt?: string;
  updatedBy?: string;
  userName?: string;
};

ToasterLocation

export type ToasterLocation = 'top' | 'bottom' | 'top-right' | 'bottom-right';

UserSettings

export type UserSettings = {
  disableMessageCompression?: boolean;
  lang?: string;
  recordDictionary?: boolean;
  dir?: Direction;
  notificationLocation?: ToasterLocation;
  darkMode?: boolean;
  theme?: string;
  workspace?: string;
  dateFormat?: string;
  dateTimeFormat?: string;
};

UserWorkspaces

export type UserWorkspaces = { id: string; name: string; roles: Array<WorkspaceRoles> };

ValidateRowInput

export type ValidateRowInput<T> = { datasourceId: string; row: Row<T> };

ValidateRowOutput

export type ValidateRowOutput<T> = { row: Row<T> };

Variables

export type Variables = {
  createdAt: string;
  createdBy: string;
  description?: string;
  encrypted: boolean;
  orgId: string;
  updatedAt: string;
  updatedBy: string;
  variableName: string;
  variableValue: unknown;
  workspaceId: string;
};

WSRequest

export type WSRequest<T> = {
  ws: string;
  role?: string;
  page?: string;
  body: Request<T>;
  timestamp: number;
  uid: string;
  noGzip?: boolean;
};

WSResponse

export type WSResponse<T> = {
  code?: number;
  data?: Response<T>;
  message?: string;
  status: WSStatus;
  timestamp: number;
  uid: string;
  title?: string;
};

WSStatus

export type WSStatus = 'OK' | 'ERROR';

WaitState

export type WaitState =
  | { type: 'Retry'; attempt: number; retry_at: string }
  | { type: 'Wait'; until: string }
  | {
      type: 'Approval';
      total_reminders_sent: number;
      reminder_at: string;
      approvers: Array<string>;
      approval_status: Array<ApprovalResult>;
      approvers_info: ApproversInfo;
    }
  | {
      type: 'Intake';
      total_reminders_sent: number;
      reminder_at: string;
      user_name: string;
      intake_user_info: IntakeUserInfo;
    };

WaitUntil

export type WaitUntil = { type: 'DateTime'; data: string } | { type: 'Trigger' };

WayvoFile

export type WayvoFile = {
  orgId: string;
  workspaceId: string;
  fileId: string;
  fileVersion: number;
  activeVersion: YN;
  sourceType: string;
  sourceUri: string;
  datasourceId: string;
  fileSize: number;
  fileName: string;
  mimeType: string;
  totalDownloadCount?: number;
  lastDownloadDate?: string;
  createdAt: string;
  createdBy: string;
  updatedAt: string;
  updatedBy: string;
};

WayvoImage

export type WayvoImage = {
  orgId: string;
  workspaceId: string;
  imageId: string;
  createdAt: string;
  createdBy: string;
  updatedAt: string;
  updatedBy: string;
};

WorkflowStatus

export type WorkflowStatus = 'Cancelled' | 'Error' | 'Pending' | 'Running' | 'Success' | 'Waiting';

Workspace

export type Workspace = {
  createdAt: string;
  createdBy: string;
  description?: string;
  id: string;
  name: string;
  updatedAt: string;
  updatedBy: string;
  storageConnectionCode?: string;
  bucketName?: string;
  dbResourceTypeId: DBType;
  dbResourceId?: string;
  readonlyDbResourceId?: string;
};

WorkspaceOption

export type WorkspaceOption = {
  createdAt?: string;
  createdBy?: string;
  description?: string;
  id?: string;
  name?: string;
  updatedAt?: string;
  updatedBy?: string;
  storageConnectionCode?: string;
  bucketName?: string;
  dbResourceTypeId?: DBType;
  dbResourceId?: string;
  readonlyDbResourceId?: string;
};

WorkspaceRoles

export type WorkspaceRoles = { code: string; name: string };

WorkspaceSettings

export type WorkspaceSettings = {
  headerBgColor?: string;
  headerTextColor?: string;
  logo?: string;
  primaryColor?: ThemeColor | null;
  secondaryColor?: ThemeColor | null;
  controller?: string;
};

YN

export type YN = 'Y' | 'N';

StringKeyof

export type StringKeyof<T> = Extract<keyof T, string>;

SchemaMemberValue

export type SchemaMemberValue<T> = { [P in StringKeyof<T>]?: T[P] };

SchemaMember

export type SchemaMember<T, V> = { [P in StringKeyof<T>]?: V };

Filters

export type Filters<T> = FilterEntry<T>[];

NestedFilter

export type NestedFilter<T> = {
  [name in Combiner]?: Filters<T>;
};

FilterEntry

export type FilterEntry<T> = SingleFilter<T> | NestedFilter<T>;

Combiner

export type Combiner = 'allof' | 'anyof' | 'noneof';

SingleFilter

export type SingleFilter<T> = {
  [K in StringKeyof<T>]?: T[K] extends 'DateTime' | 'Date' | undefined
    ? DateFilter | MultiDateFilter
    : T[K] extends string | undefined
      ? MultiStringFilter | StringFilter
      : T[K] extends number | undefined
        ? NumberFilter | MultiNumberFilter
        : T[K] extends boolean | undefined
          ? BooleanFilter
          : T[K] extends Record<string, unknown> | undefined
            ? StringFilter
            : never;
};