PHP 8.2.30
Preview: record-json.interface.ts Size: 1.32 KB
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/src/frontend/interfaces/record-json.interface.ts

import { ErrorTypeEnum } from '../../utils/error-type.enum.js'
import { ParamsType, RecordError } from '../../backend/index.js'
import { ActionJSON } from './action/action-json.interface.js'

/**
 * @memberof {RecordJSON}
 * @alias ErrorMessage
 */
export type ErrorMessage = {
  /** Human readable message */
  message: string;
  /** Error type */
  type?: ErrorTypeEnum | string;
}

/**
 * JSON representation of an record
 * @subcategory Frontend
 */
export interface RecordJSON {
  /**
   * all flatten params of given record
   */
  params: ParamsType;
  /**
   * If the record has properties which are references - here there will be populated records
   */
  populated: Record<string, RecordJSON | null | undefined>;
  /**
   * Any base/overall validation error for the record
   */
  baseError: RecordError | null;
  /**
   * List of all validation errors
   */
  errors: Record<string, ErrorMessage>;
  /**
   * Uniq Id of a record. Not present if the record is new (in NewAction)
   */
  id: string;
  /**
   * Title of an record. Not present if the record is new (in NewAction)
   */
  title: string;
  /**
   * Actions which can be performed on this record.
   */
  recordActions: Array<ActionJSON>;
  /**
   * Actions which can be performed on this record in a bulk.
   */
  bulkActions: Array<ActionJSON>;
}

// TODO: describe flatten params

Directory Contents

Dirs: 2 × Files: 6

Name Size Perms Modified Actions
action DIR
- drwxr-xr-x 2026-02-28 00:32:28
Edit Download
- drwxr-xr-x 2026-02-28 00:32:40
Edit Download
286 B lrw-r--r-- 2026-02-28 00:32:28
Edit Download
502 B lrw-r--r-- 2026-02-28 00:32:38
Edit Download
482 B lrw-r--r-- 2026-02-28 00:32:38
Edit Download
347 B lrw-r--r-- 2026-02-28 00:32:38
Edit Download
1.32 KB lrw-r--r-- 2026-02-28 00:32:40
Edit Download
1.68 KB lrw-r--r-- 2026-02-28 00:32:42
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).