import 'reflect-metadata'; import { CustomFunctionParams, SharedFunctionApp, SharedFunctionFactory, Utilities } from '../types'; export declare const FUNCTION_EXPORT_NAMESPACE = "handler"; export declare const SHARED_FUNCTION_FACTORY_EXPORT_NAMESPACE = "sharedFunctionFactory"; export declare class Function { private innerHandler; constructor(params: CustomFunctionParams); attachHandler(exportModule: any): void; } export declare function generateFunction(params: CustomFunctionParams): Function<{}>; /** * Build a shared custom function from its async factory. Awaits the factory once * and compiles the lambda handler. * * Pass `input` to also resolve the `resources` declaration — the build-time path, * where an authenticated services bag exists (see `createUtilities`). Without it * `describeResources()` is empty, which is what the lambda wants: it serves from * the scopes the backend sends, not from a local list. */ export declare function generateSharedFunction(factory: SharedFunctionFactory, input?: Utilities): Promise; /** * Authoring entry for a shared function. Because `generateSharedFunction` is * async but `module.exports.handler` must exist synchronously at import time, * this attaches a lazy-memoised handler: the first invocation awaits (and caches) * the build; subsequent invocations reuse the compiled handler. * * A failed build is NOT memoised — the next invocation retries. Caching the * rejected promise would let one bad cold start poison every later request on * the same warm container. * * The factory is also re-exported as `sharedFunctionFactory`: the builder * requires the bundled entry at build time to enumerate resource descriptors, * and cannot recover the factory from the handler's closure. */ export declare function attachSharedFunction(exportModule: any, factory: SharedFunctionFactory): void; //# sourceMappingURL=function.d.ts.map