auth/standard_rpc_actions.ts

Combined admin + role-grant-offer + account RPC actions for fuz_app consumers.

The canonical "standard" RPC surface: every stock fuz_app RPC action a typical web consumer wants on one endpoint. Consumers that want a narrower surface drop down to the per-domain factories directly (create_admin_actions / create_role_grant_offer_actions / create_account_actions).

Option routing: shared roles flows to both admin and role-grant-offer; app_settings goes to admin only; default_ttl_ms and authorize go to role-grant-offer only; max_tokens goes to account only; shared connection_closer flows to admin + account (role-grant-offer ignores); notification_sender reaches role-grant-offer transparently (admin + account ignore it).

Paired with create_admin_rpc_adapters on the UI side.

Declarations
#

3 declarations

view source

create_standard_rpc_actions
#

auth/standard_rpc_actions.ts view source

(deps: StandardRpcActionsDeps, options?: StandardRpcActionsOptions): RpcAction[]

Build the combined admin + role-grant-offer + account RPC action set.

Spreads create_admin_actions(deps, {roles, app_settings}), create_role_grant_offer_actions(deps, {roles, default_ttl_ms, authorize}), and create_account_actions(deps, {max_tokens}). The shared roles option flows to admin + role-grant-offer.

deps

StandardRpcActionsDeps (log, audit from RouteFactoryDeps; optional notification_sender for WS fan-out)

options

role schema, optional app-settings ref, role-grant-offer config, account config

default {}

returns

RpcAction[]

RPC actions to pass as rpc_endpoints or spread into create_rpc_endpoint

StandardRpcActionsDeps
#

auth/standard_rpc_actions.ts view source

StandardRpcActionsDeps

Dependencies for create_standard_rpc_actions.

Stack-standard RouteFactoryDeps slice (log, audit) plus an optional notification_sender consumed only by the role-grant-offer sub-factory for WS fan-out. Admin and account sub-factories ignore notification_sender.

inheritance

extends:
  • Pick<RouteFactoryDeps, 'log' | 'audit'>

notification_sender

type NotificationSender | null

StandardRpcActionsOptions
#

Depends on
#