@mxraven/admin - v2.1.0
    Preparing search index...

    Class Response

    A successful control-plane HTTP response with its status, headers, and decoded JSON body.

    Error responses never surface here; AdminClient throws an ApiException for any non-success status. This type is the escape hatch for endpoints not yet wrapped by a typed client.

    The decoding helpers (as, listOf, pageOf) are unchecked views of the parsed JSON. They assert a shape the caller knows from the API contract; no runtime validation is performed.

    Index
    body: unknown

    The decoded, camel-cased JSON body, or null when there was none.

    headers: Headers

    The response headers.

    rawBody: unknown

    The decoded JSON body with its original wire keys.

    This is the escape hatch for models that contain free-form maps, whose keys are data and therefore are not case-converted.

    status: number

    The HTTP status code.

    • Views the body as a single decoded object.

      Type Parameters

      • T

        The expected body type.

      Returns T

      The body cast to T, or null when the response had no body.

    • Views the body as a single decoded object while keeping its original wire keys.

      Use this only for models that contain free-form maps.

      Type Parameters

      • T

        The expected body type.

      Returns T

      The raw body cast to T, or null when the response had no body.

    • The first value of a response header, case-insensitive.

      Parameters

      • name: string

        The header name.

      Returns string | undefined

      The first header value, or undefined when the header is absent.

    • Views the body as a list of decoded objects.

      Type Parameters

      • T

        The expected element type.

      Returns T[]

      The body cast to T[], or an empty array when the body was absent.

    • Builds a page from the body and the standard X-Next-Page-Token, X-Previous-Page-Token, and X-Last-Page-Token headers.

      The returned page is plain data; use AdminClient.paged to walk every page lazily.

      Type Parameters

      • T

        The expected element type.

      Returns Page<T>

      A page built from this response.