Options
All
  • Public
  • Public/Protected
  • All
Menu

Module documents

import type { Document, Edge } from "arangojs/documents";

The "documents" module provides document/edge related types for TypeScript.

Index

Type aliases

Document

Document<T>: T & DocumentMetadata & Partial<EdgeMetadata>

Type representing a document stored in a collection.

Type parameters

  • T: Record<string, any> = any

DocumentData

DocumentData<T>: T & Partial<DocumentMetadata> & Partial<EdgeMetadata>

Type representing an object that can be stored in a collection.

Type parameters

  • T: Record<string, any> = any

DocumentMetadata

DocumentMetadata: { _id: string; _key: string; _rev: string }

Common ArangoDB metadata properties of a document.

Type declaration

  • _id: string

    Unique ID of the document, which is composed of the collection name and the document _key.

  • _key: string

    Key of the document, which uniquely identifies the document within its collection.

  • _rev: string

    Revision of the document data.

DocumentSelector

DocumentSelector: ObjectWithId | ObjectWithKey | string

A value that can be used to identify a document within a collection in arangojs methods, i.e. a partial ArangoDB document or the value of a document's _key or _id.

See DocumentMetadata.

Edge

Type representing an edge document stored in an edge collection.

Type parameters

  • T: Record<string, any> = any

EdgeData

EdgeData<T>: T & Partial<DocumentMetadata> & EdgeMetadata

Type representing an object that can be stored in an edge collection.

Type parameters

  • T: Record<string, any> = any

EdgeMetadata

EdgeMetadata: { _from: string; _to: string }

ArangoDB metadata defining the relations of an edge document.

Type declaration

  • _from: string

    Unique ID of the document that acts as the edge's start vertex.

  • _to: string

    Unique ID of the document that acts as the edge's end vertex.

ObjectWithId

ObjectWithId: { _id: string }

An object with an ArangoDB document _id property.

See DocumentMetadata.

Type declaration

  • [key: string]: any
  • _id: string

ObjectWithKey

ObjectWithKey: { _key: string }

An object with an ArangoDB document _key property.

See DocumentMetadata.

Type declaration

  • [key: string]: any
  • _key: string

Patch

Patch<T>: {[ K in keyof T]: T[K] | Patch<T[K]> }

Type representing patch data for a given object type to represent a payload ArangoDB can apply in a document PATCH request (i.e. a partial update).

This differs from Partial in that it also applies itself to any nested objects recursively.

Type parameters

  • T = Record<string, any>

Generated using TypeDoc