TypeScript Types
Complete type definitions for next-api-layer.
Core Types#
AuthProxyConfig#
Main configuration for createAuthProxy.
TypeScript
Loading...
ApiClientConfig#
Configuration for createApiClient.
TypeScript
Loading...
Security Types#
CsrfConfig#
TypeScript
Loading...
RateLimitConfig#
TypeScript
Loading...
AuditConfig#
TypeScript
Loading...
Access Control Types#
AccessConfig#
TypeScript
Loading...
Response Types#
ApiResponse#
Standard API response wrapper.
TypeScript
Loading...
AuthResult#
Result from authentication validation.
TypeScript
Loading...
TokenInfo#
Token validation result.
TypeScript
Loading...
Cookie Types#
CookieOptions#
TypeScript
Loading...
Sanitization Types#
SanitizationConfig#
TypeScript
Loading...
Response Mappers#
ResponseMappers#
Custom parsers for different backend formats.
TypeScript
Loading...
Client-Side Types#
AuthState#
TypeScript
Loading...
UseAuthReturn#
TypeScript
Loading...
AuthProviderProps#
TypeScript
Loading...
I18n Types#
I18nConfig#
TypeScript
Loading...
Error Types#
v0.2.0 introduces a comprehensive error class hierarchy for better error handling.
ApiError (Base)#
Base class for all API errors.
TypeScript
Loading...
HttpError#
HTTP response errors (4xx, 5xx).
TypeScript
Loading...
TimeoutError#
Request timeout errors.
TypeScript
Loading...
NetworkError#
Network connectivity errors.
TypeScript
Loading...
AuthError#
Authentication-related errors.
TypeScript
Loading...
ValidationError#
Validation errors with field-level details.
TypeScript
Loading...
RateLimitError#
Rate limit exceeded errors.
TypeScript
Loading...
Type Guards#
TypeScript
Loading...
Usage Example#
TypeScript
Loading...
Utility Types#
RequestOptions#
TypeScript
Loading...
ResponseFormat#
TypeScript
Loading...
MethodSpoofingConfig#
TypeScript
Loading...
ErrorMessages#
TypeScript
Loading...