Type alias EntityConstructor

EntityConstructor: (new (...args) => EntityInterface) & {
    ETYPE: string;
    class: string;
    clientEnabledStaticMethods: string[];
    nymph: Nymph;
    pubSubEnabled: boolean;
    restEnabled: boolean;
    searchRestrictedData: string[];
    alterOptions?<T>(options) => T;
    factory(guid?) => Promise<EntityInterface>;
    factoryReference(reference) => EntityInterface;
    factorySync(guid?) => EntityInterface;
}

Type declaration

Type declaration

  • ETYPE: string

    A unique name for this type of entity used to separate its data from other types of entities in the database.

  • class: string

    The lookup name for this entity.

    This is used for reference arrays (and sleeping references) and client requests.

  • clientEnabledStaticMethods: string[]

    The names of static methods allowed to be called by the frontend with serverCallStatic.

  • nymph: Nymph

    The instance of Nymph to use for queries.

  • pubSubEnabled: boolean

    Whether this entity should publish changes to PubSub servers.

  • restEnabled: boolean

    Whether this entity should be accessible on the frontend through the REST server.

    If this is false, any request from the client that attempts to use this entity will fail.

  • searchRestrictedData: string[]

    Properties that will not be searchable from the frontend. If the frontend includes any of these properties in any of their clauses, they will be filtered out before the search is executed.

  • alterOptions?:function
    • Alter the options for a query for this entity.

      Type Parameters

      Parameters

      • options: T

        The current options.

      Returns T

      The altered options.

  • factory:function
  • factoryReference:function
  • factorySync:function

Generated using TypeDoc