@grabjs/superapp-sdk
    Preparing search index...

    Type Alias BridgeResponse

    Base response type for all JSBridge calls.

    Every response has a numeric status_code. Success responses (200) carry result; error responses (4xx/5xx) carry error. Use the type guards (isSuccess, isError, etc.) to narrow to a specific shape.

    Per-module response types (e.g., ScanQRCodeResponse) are derived from their valibot schemas via v.InferOutput and form proper discriminated unions — enabling precise TypeScript narrowing while this base type serves as the internal contract.

    type BridgeResponse = {
        error?: string;
        result?: unknown;
        status_code: number;
    }
    Index

    Properties

    error?: string

    Error message, present on 4xx/5xx responses

    result?: unknown

    The result data from the JSBridge method, present on 200 responses

    status_code: number

    HTTP-style status code indicating the outcome of the JSBridge method call