Stone.js API
    Preparing search index...
    • Build a ResourceContext from an incoming event.

      The parameter names are configuration, not convention: an API that already answers ?view= or ?only= keeps its own vocabulary instead of gaining a second one. Defaults are fields, include and view.

      The authenticated principal is read too, because deciding what a caller may see is the most common reason two callers get different shapes — and a resource that cannot see who is asking has to be told by the handler, which is exactly the plumbing this module exists to remove.

      Agnostic: the event only needs get(key).

      Parameters

      • event: { get: <T>(key: string, fallback?: T) => T; getUser?: <T>() => T }

        Anything with get(key) (an IncomingHttpEvent, a URL search wrapper, …).

      • Optionalblueprint: { get: <T>(key: string, fallback?: T) => T }

        The blueprint carrying the parameter names, when there is one.

      • extra: ResourceContext = {}

        Extra context to merge in.

      Returns ResourceContext

      The resource context.