/**
 * Standardized API Response Utilities
 * Provides consistent response format across all applications
 */
import { Response } from "express";
export interface ApiResponse<T = any> {
    success: boolean;
    data?: T;
    error?: string;
    message?: string;
    timestamp?: string;
    metadata?: Record<string, any>;
}
export interface ApiErrorResponse extends ApiResponse {
    success: false;
    error: string;
    code?: string;
    details?: any;
    stack?: string;
}
export interface ApiSuccessResponse<T = any> extends ApiResponse<T> {
    success: true;
    data: T;
}
/**
 * Send a successful response
 */
export declare function sendSuccess<T = any>(res: Response, data: T, message?: string, statusCode?: number): Response<ApiSuccessResponse<T>>;
/**
 * Send an error response
 */
export declare function sendError(res: Response, error: string | Error, statusCode?: number, details?: any): Response<ApiErrorResponse>;
/**
 * Send a validation error response
 */
export declare function sendValidationError(res: Response, errors: any, message?: string): Response<ApiErrorResponse>;
/**
 * Send a not found response
 */
export declare function sendNotFound(res: Response, resource?: string): Response<ApiErrorResponse>;
/**
 * Send an unauthorized response
 */
export declare function sendUnauthorized(res: Response, message?: string): Response<ApiErrorResponse>;
/**
 * Send a forbidden response
 */
export declare function sendForbidden(res: Response, message?: string): Response<ApiErrorResponse>;
/**
 * Send a bad request response
 */
export declare function sendBadRequest(res: Response, message?: string): Response<ApiErrorResponse>;
/**
 * Send a created response
 */
export declare function sendCreated<T = any>(res: Response, data: T, message?: string): Response<ApiSuccessResponse<T>>;
/**
 * Send a no content response
 */
export declare function sendNoContent(res: Response): Response;
/**
 * Wrap async route handlers to catch errors
 */
export declare function asyncHandler(fn: (req: any, res: any, next: any) => any): (req: any, res: any, next: any) => void;
/**
 * Standard error handler middleware
 */
export declare function apiErrorHandler(err: any, _req: any, res: any, next: any): any;
//# sourceMappingURL=apiResponse.d.ts.map