Member Junction
    Preparing search index...

    Class BaseRemotableOperation<TInput, TOutput>Abstract

    Base class for a typed, provider-routed Remote Operation — the typed peer of BaseEntity (record CRUD) and RunView (set reads) for arbitrary server capabilities.

    A concrete operation declares its stable OperationKey and is invoked through the single universal Execute entry point, which routes through the active provider: on the client the call is marshalled over GraphQL, on the server it is dispatched in-process — the developer writes the same call regardless of where their code runs (the unified-developer-surface principle).

    The class is never abstract on the work itself: InternalExecute has a throwing default so a CodeGen-emitted base carrying AI-authored or default plumbing is fully executable with no hand-written subclass. Subclassing to override InternalExecute / Authorize is available but never required.

    Concrete subclasses are resolved by stable key via the MJ ClassFactory, e.g. @RegisterClass(BaseRemotableOperation, 'RecordProcess.RunNow'); the last registration (the hand-authored subclass, which imports and extends the generated base) wins by import order.

    Type Parameters

    • TInput = unknown

      The operation's input payload type.

    • TOutput = unknown

      The operation's output payload type.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    ExecutionMode: RemoteOpExecMode = 'Sync'

    Whether this operation is a plain Sync request/response or a LongRunning run.

    OperationKey: string

    Stable registry key and wire token for this operation (e.g. RecordProcess.RunNow).

    RequiredScope?: string

    Optional API-key scope string (e.g. recordprocess:execute) enforced for API-key / MCP callers by the server resolver. undefined means no scope gate; interactive users remain bounded by their entity permissions. Informational here — the server applies it.

    RequiresSystemUser?: boolean

    When true, the server only permits the system user to invoke this operation.

    Methods

    • Per-operation authorization hook, composed with (and applied after) the framework gates that the server resolver runs. Returns true by default. Override to enforce operation-specific rules against the input and acting user.

      Parameters

      • _input: TInput

        The typed input payload.

      • _user: UserInfo

        The acting user.

      Returns Promise<boolean>

      True if the operation may proceed.