@faceteer/cdk
Version:
CDK 2.0 constructs and helpers that make composing a Lambda powered service easier.
16 lines (15 loc) • 826 B
TypeScript
import { CronHandlerDefinition, EventHandlerDefinition, NotificationHandlerDefinition } from '../handlers';
import type { ApiHandlerDefinition } from '../handlers/api-handler';
import { QueueHandlerDefinition } from '../handlers/queue-handler';
export interface HandlerNameAndPath {
name: string;
path: string;
}
export type FullHandlerDefinition<T> = T & HandlerNameAndPath;
export declare function extractHandlers(basePath: string): {
api: Record<string, FullHandlerDefinition<ApiHandlerDefinition>>;
queue: Record<string, FullHandlerDefinition<QueueHandlerDefinition>>;
event: Record<string, FullHandlerDefinition<EventHandlerDefinition>>;
notification: Record<string, FullHandlerDefinition<NotificationHandlerDefinition>>;
cron: Record<string, FullHandlerDefinition<CronHandlerDefinition>>;
};