@multicloud/sls-aws
Version:
Amazon AWS specific middleware and components for Serverless @multicloud.
30 lines (29 loc) • 918 B
TypeScript
import "reflect-metadata";
import { CloudResponse, StringParams } from "@multicloud/sls-core";
import { AwsContext } from ".";
/**
* Implementation of Cloud Response for AWS Lambda
*/
export declare class AwsResponse implements CloudResponse {
/** The AWS runtime callback */
private callback;
/** The HTTP response body */
body: any;
/** The HTTP response status code */
status: number;
/** Headers of HTTP Response */
headers?: StringParams;
/**
* Initialize new AWS Response, injecting Cloud Context
* @param context Current CloudContext
*/
constructor(context: AwsContext);
/**
* Send HTTP response via provided callback
* @param body Body of HTTP response
* @param status Status code of HTTP response
* @param callback Callback function to call with response
*/
send(body: any, status?: number): void;
flush(): void;
}