Hierarchy (View Summary)

Constructors

Properties

abortController: AbortController
all: () => this = ...

Alias for 'noLimit'

Type declaration

    • (): this
    • Disables limit

      Returns this

      this

noLimit

this

ALLOWED_HTTP_METHODS: Method[] = ALLOWED_HTTP_METHODS
cut: (from: number, to: number) => this = ...

Alias for 'between'

Type declaration

    • (from: number, to: number): this
    • Sets limit and offset so that will request from BE records between range

      Parameters

      • from: number

        From index

      • to: number

        To index

      Returns this

      this

From idx

To idx

this

requestConfig: AxiosRequestConfig = {}
root: API
stack: (string | number)[] = []

Accessors

  • get first(): string | number
  • Get first element of the stack

    Returns string | number

  • get last(): string | number
  • Get last element of the stack

    Returns string | number

  • set last(val: string | number): void
  • Set last element of the stack

    Parameters

    • val: string | number

    Returns void

Methods

  • Sets limit and offset so that will request from BE records between range

    Parameters

    • from: number

      From index

    • to: number

      To index

    Returns this

    this

  • Shortcut for sending data POST

    Parameters

    • data: any

    Returns Promise<AxiosResponse>

  • Sets limit

    Parameters

    • Optionallimit: number = DEFAULT_LIMIT

      Limit to be set

    Returns this

    this

  • Sets offset

    Parameters

    • Optionaloffset: number = DEFAULT_OFFSET

      Offset to be set

    Returns this

    this

  • Sets limit and offset so that will request from BE one record on given index

    Parameters

    • idx: number

      Index

    Returns this

    this

  • Gets current limit and sets offset so that will request from BE one page of records

    Parameters

    • Optionalpage: number = 1

      Page number (counted from 1)

    Returns this

    this

  • Sets search

    query param is working like SQL LIKE. BE sets wraps around query with %, and replaces every white character with %. So e.g. if query='my device', then it's searching for '%my%device%' in DB.

    Parameters

    • query: string

      Query to search for

    Returns this

    this

  • Sets sorting

    Parameters

    • name: string

      Name of the column according to which the data will be sorted

    • Optionalorder: APIOrder = APIOrder.asc

      Sorting order. Possibilities: 'a', 'd'

    Returns this