@studyportals/sp-r2d2
Version:
A framework that contains various components used when developing projects that will be deployed via AWS λ.
17 lines (16 loc) • 1.19 kB
TypeScript
import { IResult, RawHttpResult } from '@studyportals/sp-r2d2-interface';
import { AuthorizationError, ValidationError, ExecutionError } from '../../../../application';
import { IResponseSender } from '../../../core/response-sending-interfaces/i-response-sender.interface';
import { BaseResponseSender } from '../../../core/response-sending/base-response-sender.class';
import { HttpResponse } from '../http-responses/http-response.class';
export declare class HttpResponseSender extends BaseResponseSender implements IResponseSender {
sendUncaughtError(error: Error): Promise<void>;
sendRequestAuthorizationError(error: AuthorizationError): Promise<void>;
sendRequestValidationError(error: ValidationError): Promise<void>;
sendRequestExecutionError(error: ExecutionError): Promise<void>;
sendExecutionOutcome(outcome: IResult): Promise<void>;
protected sendNotFoundResponse(error: ExecutionError): Promise<void>;
protected sendInternalServerErrorResponse(error: ExecutionError): Promise<void>;
protected sendHttpResponse(response: HttpResponse): Promise<void>;
protected sendRawHttpResponse(result: RawHttpResult): Promise<void>;
}