Core - v1.0.0
    Preparing search index...

    Interface APIResponse

    The response envelope every endpoint returns.

    Services build this through Service.ok and Service.fail rather than assembling it by hand, which is what lets a controller map success onto a status code without reading the service it called.

    { "message": "Article found", "success": true, "data": { "id": 1 } }
    

    Bayu Dwiyan Satria

    1.0.0

    1.0.0

    interface APIResponse {
        data: any;
        message: string;
        success: boolean;
    }
    Index
    data: any

    The payload, or null when there is nothing to return.

    Deliberately untyped: the shape belongs to the endpoint, and the controller is the layer that knows it.

    message: string

    Human-readable description of the outcome, safe to show a client.

    success: boolean

    Whether the request did what the caller asked for.

    false marks an outcome the caller can act on — a missing record, invalid input. Faults they cannot act on throw instead, and surface as a 500.