Representation of a Code which runs on Baqend.

Hierarchy

  • Code

Constructors

Properties

entityManagerFactory: EntityManagerFactory
metamodel: Metamodel

Methods

  • Deletes Baqend code identified by the given bucket and code type

    Returns

    succeed if the code was deleted

    Parameters

    • type: string | ManagedType<any>

      The entity type for the handler or the Name of the Baqend code

    • codeType: string

      The type of the code

    Returns Promise<any>

  • Converts the given function to a string

    Returns

    The serialized function

    Parameters

    • fn: Function

      The JavaScript function to serialize

    Returns string

  • Loads Baqend code which will be identified by the given bucket and code type

    Returns

    The code as parsed function

    Parameters

    • type: string | ManagedType<any>

      The entity type for the handler or the Name of the Baqend code

    • codeType: string

      The type of the code

    • asFunction: true

      set it to true, to parse the code as a function and return it instead of a string

    Returns Promise<Function>

  • Loads Baqend code which will be identified by the given bucket and code type

    Returns

    The code as string

    Parameters

    • type: string | ManagedType<any>

      The entity type for the handler or the Name of the Baqend code

    • codeType: string

      The type of the code

    • Optional asFunction: false

      set it to true, to parse the code as a function and return it instead of a string

    Returns Promise<string>

  • Loads a list of all available modules without handlers

    Returns

    Returns Promise<string[]>

  • Private

    Returns

    Parameters

    • bucket: string
    • codeType: string
    • Optional asFunction: boolean
    • code: null | string

    Returns null | string | Function

  • Saves Baqend code which will be identified by the given bucket and code type

    Returns

    The stored code as a string

    Parameters

    • type: string | ManagedType<any>

      The entity type for the handler or the Name of the Baqend code

    • codeType: string

      The type of the code

    • fn: string

      Baqend code as a string

    Returns Promise<string>

  • Saves Baqend code which will be identified by the given bucket and code type

    Returns

    The stored code as a parsed function

    Parameters

    • type: string | ManagedType<any>

      The entity type for the handler or the Name of the Baqend code

    • codeType: string

      The type of the code

    • fn: Function

      Baqend code as a function

    Returns Promise<Function>

  • Converts the given string to a module wrapper function

    Returns

    The deserialized function

    Parameters

    • signature: string[]

      The expected parameters of the function

    • code: string

      The JavaScript function to deserialize

    Returns Function

Generated using TypeDoc