Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Schemas

Schemas is an API module for managing Textile schemas

extends

API

Hierarchy

  • API
    • Schemas

Index

Constructors

Methods

Constructors

constructor

Methods

add

  • Creates and validates a new schema from input JSON

    Parameters

    • schema: object

      Input JSON-based thread schema

    Returns Promise<FileIndex>

    The milled schema as a file index

defaultByName

  • defaultByName(name: string): Promise<undefined | object>
  • Default Textile schemas

    Parameters

    • name: string

    Returns Promise<undefined | object>

    An object with various commonly used schemas

defaults

  • defaults(): Promise<object>

get

  • get(thread: string): Promise<Node>
  • Retrieves a schema by thread ID

    Parameters

    • thread: string

      ID of the thread

    Returns Promise<Node>

    The schema of the target thread