API
Interface API Documentation
Overview
The Interface API provides a decorator-based framework for building HTTP services with TypeScript. It offers a declarative approach to defining API endpoints, processing requests, and generating responses, with built-in support for WebSocket connections.
The framework centers around three core concepts:
- Controllers organize routes under a shared base path and support hierarchical nesting.
- Route decorators (
@Get,@Post,@Put,@Delete) map methods to HTTP endpoints with prefix, postfix, and monitor hooks. - Parameter decorators (
@Parameter,@JSONBody,@RawBody,@Context, etc.) inject request data directly into handler arguments.
Installation
npm install @antelopejs/interface-api
Documentation sections
- Controllers - Creating and organizing API controllers
- HTTP Handling - Request and response handling with
HTTPResult - Parameter Handling - Parameter injection, providers, and modifiers