UNPKG

@bitblit/ratchet-epsilon-common

Version:

Tiny adapter to simplify building API gateway Lambda APIS

23 lines (22 loc) 1.53 kB
import { Context } from 'aws-lambda'; import { ExtendedAPIGatewayEvent } from '../config/http/extended-api-gateway-event.js'; import { BackgroundQueueResponseInternal } from './background-queue-response-internal.js'; import { BackgroundConfig } from '../config/background/background-config.js'; import { ModelValidator } from '@bitblit/ratchet-misc/model-validator/model-validator'; import { BackgroundMetaResponseInternal } from './background-meta-response-internal.js'; import { BackgroundTransactionLog } from '../config/background/background-transaction-log.js'; import { BackgroundManagerLike } from './manager/background-manager-like.js'; 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>; }