Class OnmsResult<T>

An [[IOnmsHTTP]] query result.

Type Parameters

  • T

Constructors

Properties

Methods

Constructors

  • Construct a new result.

    Type Parameters

    • T

    Parameters

    • data: T

      The payload of the response.

    • Optional message: string

      The status message associated with the result.

    • Optional code: number

      The response code of the response.

    • Optional type: string

      The request type of the response.

    Returns OnmsResult<T>

Properties

code?: number

The response code associated with this result.

data: T

The data, if any.

message?: string

The status message associated with this result.

type?: string

The request type, if any.

Methods

  • Create a new success result.

    Parameters

    • response: any
    • Optional message: string
    • Optional code: number
    • Optional type: string

    Returns OnmsResult<any>