@bitblit/epsilon
Version:
Tiny adapter to simplify building API gateway Lambda APIS
27 lines (26 loc) • 1.6 kB
TypeScript
import { Context } from 'aws-lambda';
import { ExtendedAPIGatewayEvent } from '../config/http/extended-api-gateway-event';
import { BackgroundQueueResponseInternal } from './background-queue-response-internal';
import { BackgroundConfig } from '../config/background/background-config';
import { BackgroundMetaResponseInternal } from './background-meta-response-internal';
import { BackgroundTransactionLog } from '../config/background/background-transaction-log';
import { BackgroundManagerLike } from './manager/background-manager-like';
import { ModelValidator } from '@bitblit/ratchet/model-validator';
/**
* We use a FIFO queue so that 2 different Lambdas don't both work on the same
* thing at the same time.
*/
export declare class BackgroundHttpAdapterHandler {
private backgroundConfig;
private modelValidator;
private backgroundManager;
private maxWaitInMsForBackgroundJobToStart;
constructor(backgroundConfig: BackgroundConfig, modelValidator: ModelValidator, backgroundManager: BackgroundManagerLike, maxWaitInMsForBackgroundJobToStart?: number);
get httpMetaEndpoint(): string;
get httpSubmissionPath(): string;
get httpStatusPath(): string;
get implyTypeFromPathSuffix(): boolean;
handleBackgroundStatusRequest(evt: ExtendedAPIGatewayEvent, context: Context): Promise<BackgroundTransactionLog>;
handleBackgroundMetaRequest(evt: ExtendedAPIGatewayEvent, context: Context): Promise<BackgroundMetaResponseInternal>;
handleBackgroundSubmission(evt: ExtendedAPIGatewayEvent, context: Context): Promise<BackgroundQueueResponseInternal>;
}