Options
All
  • Public
  • Public/Protected
  • All
Menu

Base class that generates a middleware, to interact with Diaspora models

author

Gerkin

Type parameters

  • T

Hierarchy

Index

Constructors

Protected constructor

Properties

Protected _middleware

_middleware: T

Instance of the middleware to be used by the application

se

ApiGenerator.middleware

author

Gerkin

Protected _modelsConfiguration

_modelsConfiguration: _.Dictionary<IModelConfiguration>

Dictionary containing each configured models settings.

author

Gerkin

Accessors

middleware

middleware:

Public getter to retrieve the middleware instance usable by application

se

ApiGenerator.middleware

author

Gerkin

Methods

Static parseQuery

  • parseQuery(queryObj: object): object
  • Parse a query string to separate options from search clause.

    author

    Gerkin

    Parameters

    • queryObj: object

      Query string to parse

    Returns object

    A hash with options & search clause separated

    • options: QueryOptions
    • raw: object
    • where: SelectQuery | SelectQueryCondition

Static setIdFromIdHash

  • setIdFromIdHash(entity: Entity): null | IRawEntityAttributes
  • Adds the ID of the entity to the JSON to send to the client. This property is usually not stored in the entity's attributes hash, so we manually add it here.

    author

    Gerkin

    Parameters

    • entity: Entity

      Entity to cast to JSON with ID

    Returns null | IRawEntityAttributes

    The entity attributes, with the ID defined.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc