/// import * as ts from 'typescript'; import { EventEmitter } from 'events'; export interface Hooks { precompile?: string; postcompile?: string; preinstall?: string; postinstall?: string; prezip?: string; postzip?: string; predeploy?: string; postdeploy?: string; prebuild?: string; postbuild?: string; } export interface FunctionOptions { projectName: string; name: string; description: string; memory?: number; timeout?: number; role?: string; runtime?: string; environment: { [index: string]: string; }; handler: string; buildDir: string; installCmd?: string; hooks?: Hooks; deploy?: { using: string; }; } export interface TemplateContext { [index: string]: any; } export interface CompileResultSuccess { diagnostics: ts.Diagnostic[]; externals: ts.ResolvedModuleFull[]; success: true; } export interface CompileResultFailure { diagnostics: ts.Diagnostic[]; success: false; } export declare type CompileResult = CompileResultSuccess | CompileResultFailure; export interface AlttEnvironment { } export declare type AnyPromise = Promise; export declare type TaskFunction = (input?: any) => AnyPromise; export interface Task extends EventEmitter { name: string; error: boolean; done: boolean; running: boolean; run(): Promise; } export declare type Deployer = (environment: AlttEnvironment, argv: string[]) => Promise; export interface AlttFunction { alttOptions: FunctionOptions; name: string; env: AlttEnvironment; root: string; dir: string; buildDir: string; entry: string; tsOptions: ts.CompilerOptions; zipPath: string; prepare(): Promise; compile(): Promise; installDependencies(): Promise; zip(): Promise; } export interface LambdaClientContext { client: { installation_id: string; app_title: string; app_version_name: string; app_version_code: string; app_package_name: string; }; Custom: any; env: { platform_version: string; platform: string; make: string; model: string; locale: string; }; } export interface LambdaContext { getRemainingTimeInMillis(): number; callbackWaitsForEmptyEventLoop: boolean; functionName: string; functionVersion: string; invokedFunctionArn: string; memoryLimitInMB: number; awsRequestId: string; logGroupName: string; logStreamName: string; identity: string | null; clientContext: LambdaClientContext | null; } export declare type LambdaCallback = (error: any, result: T) => void;