import { APIGatewayProxyEvent, Context } from 'aws-lambda'; import { RouterConfig } from '../Router.js'; import RouteResolver from '../RouteResolver.js'; /** * Represents a server that handles serverless events and routes them to appropriate handlers. */ export default class Server { /** * The configuration object for the router. * @readonly * @type {RouterConfig} */ protected readonly config: RouterConfig; /** * A protected property that holds a RouteResolver object. * The RouteResolver is responsible for resolving routes and returning the appropriate response. * @type {RouteResolver} */ protected readonly routeResolver: RouteResolver; /** * Constructs a new instance of the Router class. * @param {RouterConfig} config - The configuration object for the router. * @returns None */ constructor(config: RouterConfig); /** * Returns a callable function that is bound to the `handleServerlessEvent` method of the current object. * @returns {CallableFunction} - A callable function that is bound to the `handleServerlessEvent` method. */ getExport(): CallableFunction; /** * Handles a serverless event by executing a transaction and resolving the route based on the event. * @param {APIGatewayProxyEvent} event - The serverless event object. * @param {Context} context - The serverless context object. * @returns None */ handleServerlessEvent(event: APIGatewayProxyEvent, context: Context): Promise; /** * Parses the path parameters from the request URL based on the given route path. * @param {Request} req - The request object. * @param {string} routePath - The route path pattern to match against. * @returns None */ private parsePathParams; }