apigw-vtl-emulator
Version:
JavaScript VTL engine for AWS API Gateway mapping templates - works in both Node.js and browsers
31 lines • 843 B
TypeScript
/**
* VTL Processor - Main entry point for VTL template processing
*/
export interface VTLContext {
[key: string]: any;
}
export interface VTLProcessorOptions {
strictMode?: boolean;
customFunctions?: Record<string, Function>;
}
export declare class VTLProcessor {
private options;
constructor(options?: VTLProcessorOptions);
/**
* Process a VTL template with the given context and input data
*/
process(template: string, inputJson: string, contextJson: string): Promise<string>;
/**
* Parse JSON string safely
*/
private parseJson;
/**
* Create velocity context with AWS API Gateway functions
*/
private createVelocityContext;
/**
* Get processor capabilities
*/
getCapabilities(): Record<string, any>;
}
//# sourceMappingURL=vtl-processor.d.ts.map