Builds the canonical REST plugin set. The list is exported so the microservice starter can compose from it without duplication.
Creates a fully wired REST application. The factory registers the curated REST plugin set, adds the error-handler middleware at priority 0 (outermost per the exceptions contract), and returns the un-started application.
The real-time arm: one option grouping the three plugins that together make a connection-oriented application work, each added only when its sub-arm is present.
-
backplane: RealtimeBackplanePluginOptions
Options for
RealtimeBackplanePlugin, which fans WebSocket rooms and SSE channels out across replicas. Present → the plugin is registered atPLUGIN_PRIORITY.HIGH, so it precedes both consumers. -
sse: SsePluginOptions
Options for
SsePlugin. Present → the plugin is registered. -
websocket: WebSocketPluginOptions
Options for
WebSocketPlugin. Present → the plugin is registered.
Options for createRestApp. Per-plugin optional arms are threaded
straight through to each plugin factory. Omitted plugins use their default
configuration (no arguments required).
-
auth: AuthPluginOptions
Optional arm:
AuthPlugin. Provided only when the caller supplies auth configuration; omitted → auth not registered.rbacis itself optional — supplyjwtalone for a JWT-only application, which registers no authorization capability. -
config: ConfigPluginOptions
Options for
ConfigPlugin. Omitted → defaults. -
database: DatabasePluginOptions
Optional arm:
DatabasePlugin. Provided only when the caller supplies database credentials; omitted → database not registered. -
decorators: DecoratorPluginOptions
Options for
DecoratorPlugin. Omitted → defaults. -
di: DiPluginOptions
Optional arm:
DiPlugin. Omitted → decorated services are constructed directly and registered in the kernel'sServiceRegistry, which is the default and needs no container. -
graphql: GraphqlPluginOptions
Optional arm:
GraphqlPlugin. Gated because the plugin cannot boot without an application-supplied schema — the rule that madesessiongated. -
health: HealthPluginOptions
Options for
HealthPlugin. Omitted → defaults. -
httpSecurity: HttpSecurityPluginOptions
Options for
HttpSecurityPlugin. Omitted → defaults. -
logger: LoggerPluginOptions
Options for
LoggerPlugin. Omitted → defaults. -
metrics: MetricsPluginOptions
Options for
MetricsPlugin. Omitted → defaults. -
openapi: OpenApiPluginOptions
Options for
OpenApiPlugin. Omitted → defaults. -
realtime: RealtimeArm
Optional arm: the real-time plugins, one per sub-arm. Omitted → none of the three is registered.
-
serviceDiscovery: ServiceDiscoveryPluginOptions
Optional arm: ServiceDiscoveryPlugin. Provided → service discovery is registered; omitted → no discovery capability is added.
-
session: SessionPluginOptions
Optional arm:
SessionPlugin. Omitted → the application has no cookie session and no session-backed form CSRF. -
validation: ValidationPluginOptions
Options for
ValidationPlugin. Omitted → defaults.
Usage
import * as REST_starter_bundle___opinionated_plugin_composition_for_building_REST_APIs___Provides_a_single_factory___linkcode_createRestApp__that_returns_a_fully_wired___linkcode_IKernelApplication__with_the_curated_REST_plugin_set_and_error_handling_middleware__Also_exposes_the_option_type___linkcode_RestStarterOptions__and_the_plugin_builder___linkcode_buildRestPlugins__for_advanced_composition__ from "starters/rest-starter/src/index.ts";