Front-End Model API

Last modified by Pierre Jeanjean on 2026/05/18 17:08

Reference

Entity Types

/**
 * @since 18.0.0RC1
 */
enum EntityType {
  WIKI,
  SPACE,
  DOCUMENT,
  ATTACHMENT,
}

Entities

/**
 * @since 18.0.0RC1
 */
interface BaseEntityReference {
  type: EntityType;
}

WikiReference

/**
 * @since 18.0.0RC1
 */
class WikiReference implements BaseEntityReference {
  type: EntityType.WIKI = EntityType.WIKI;
  name: string;
}

SpaceReference

/**
 * @since 18.0.0RC1
 */
class SpaceReference implements BaseEntityReference {
  type: EntityType.SPACE = EntityType.SPACE;
  wiki?: WikiReference;
  names: string[];
}

DocumentReference

/**
 * @since 18.0.0RC1
 */
class DocumentReference implements BaseEntityReference {
  type: EntityType.DOCUMENT = EntityType.DOCUMENT;
  space?: SpaceReference;
  name: string;

  /**
   * Indicates whether the current document reference is terminal.
   * @since 18.0.0RC1
   */
  terminal: boolean;

  /**
   * The locale of the referenced document.
   * @since 18.4.0RC1
   */
  locale?: string;
}

AttachmentReference

/**
 * @since 18.0.0RC1
 */
class AttachmentReference implements BaseEntityReference {
  type: EntityType.ATTACHMENT = EntityType.ATTACHMENT;
  name: string;
  document: DocumentReference;

  /**
   * @since 18.0.0RC1
   */
  private readonly _metadata: Record<string, string>;
}

Related

Cristal - Model - API

Get Connected