asobi_ops_players (asobi v0.75.1)

View Source

Player list for the ops read plane: filter, search, sort, paginate.

Search is ILIKE across username and display_name. The endpoints this replaces searched by exact equality on a single column, which meant an operator had to already know the username to find it.

Summary

Functions

Positive allowlist of the fields a player row may carry off this endpoint.

Wire-name to column mapping this endpoint accepts in ?sort=.

Functions

project(Player)

-spec project(map()) -> map().

Positive allowlist of the fields a player row may carry off this endpoint.

Deliberately identical to asobi_player_controller's projection: these routes sit behind the same player-scoped auth plugin, so they must not widen what an authenticated caller can already read. hashed_password must never appear here. Widening the projection waits on the capability model (ADR 0007).

query(Params)

-spec query(asobi_ops_params:params()) ->
               {ok,
                #kura_query{from :: atom() | module() | undefined,
                            select :: [atom() | term()] | {exprs, [term()]},
                            wheres :: [term()],
                            joins :: [term()],
                            order_bys :: [term()],
                            group_bys :: [atom()],
                            havings :: [term()],
                            limit :: non_neg_integer() | undefined,
                            offset :: non_neg_integer() | undefined,
                            distinct :: boolean() | [atom()],
                            lock :: binary() | undefined,
                            prefix :: binary() | undefined,
                            preloads :: [atom() | {atom(), list()}],
                            ctes :: [{binary(), #kura_query{}}],
                            combinations :: [{union | union_all | intersect | except, #kura_query{}}],
                            include_deleted :: boolean()}} |
               {error,
                {unknown_sort, binary()} | {unknown_order, binary()} | {invalid_filter, binary()}}.

sortable()

-spec sortable() -> asobi_ops_params:sort_allowlist().

Wire-name to column mapping this endpoint accepts in ?sort=.