Class MetaClass

Represents a base class with common functionality.

Hierarchy (view full)

Constructors

Properties

_listeners: Listeners = {}

Event listeners registered for this instance.

_uid: string = ...

Unique identifier for the instance.

loading: boolean = false

Indicates whether the class is currently loading.

Accessors

  • get $class(): string
  • Gets the class name of this instance.

    Returns string

Methods

  • Returns a map of API functions with default values.

    Returns Endpoints

    An object containing API functions.

  • Initiates a bulk create or update operation using provided payload.

    Parameters

    • payload: any = null

      The payload for the bulk create or update operation.

    Returns Promise<any>

    A Promise representing the bulk create or update operation.

  • Initiates a bulk delete operation using provided payload.

    Parameters

    • payload: any = null

      The payload for the bulk delete operation.

    Returns Promise<any>

    A Promise representing the bulk delete operation.

  • Initiates a create operation using provided payload.

    Parameters

    • payload: any = null

      The payload for the create operation.

    Returns Promise<any>

    A Promise representing the create operation.

  • Initializes or resets metadata for the instance.

    Returns void

  • Initiates a delete operation using provided payload.

    Parameters

    • payload: any = null

      The payload for the delete operation.

    Returns Promise<any>

    A Promise representing the delete operation.

  • Performs an asynchronous operation with loading indicator.

    Parameters

    • func: Function

      The function to execute.

    • Rest ...args: any[]

      Additional arguments for the function.

    Returns Promise<any>

    A Promise representing the result of the operation.

  • Emits an event by name to all registered listeners on that event. Listeners will be called in the order that they were added. If a listener returns false, no other listeners will be called.

    Parameters

    • event: any

      The name of the event to emit.

    • Rest ...args: any[]

      The context of the event, passed to listeners.

    Returns void

  • Initiates a fetch operation using provided payload.

    Parameters

    • payload: any = null

      The payload for the fetch operation.

    Returns Promise<any>

    A Promise representing the fetch operation.

  • Makes a request using the provided request function and payload.

    Parameters

    • payload: any

      The payload for the request.

    • reqFunc: any

      The request function to execute.

    Returns Promise<any>

    A Promise representing the request operation.

  • Registers an event listener for a given event.

    Event names can be comma-separated to register multiple events.

    Parameters

    • event: string

      The name of the event to listen for.

    • listener: Function

      The event listener, accepts context.

    Returns void

  • Initiates a read operation using provided payload.

    Parameters

    • payload: any = null

      The payload for the read operation.

    Returns Promise<any>

    A Promise representing the read operation.

  • Returns a string representation of this instance.

    Returns string

  • Initiates an update operation using provided payload.

    Parameters

    • payload: any = null

      The payload for the update operation.

    Returns Promise<any>

    A Promise representing the update operation.

Generated using TypeDoc