1 |
|
2 | import { Files, Config } from './types';
|
3 | interface Environment {
|
4 | [key: string]: string;
|
5 | }
|
6 | interface LambdaOptions {
|
7 | zipBuffer: Buffer;
|
8 | handler: string;
|
9 | runtime: string;
|
10 | memory?: number;
|
11 | maxDuration?: number;
|
12 | environment: Environment;
|
13 | }
|
14 | interface CreateLambdaOptions {
|
15 | files: Files;
|
16 | handler: string;
|
17 | runtime: string;
|
18 | memory?: number;
|
19 | maxDuration?: number;
|
20 | environment?: Environment;
|
21 | }
|
22 | interface GetLambdaOptionsFromFunctionOptions {
|
23 | sourceFile: string;
|
24 | config?: Config;
|
25 | }
|
26 | export declare class Lambda {
|
27 | type: 'Lambda';
|
28 | zipBuffer: Buffer;
|
29 | handler: string;
|
30 | runtime: string;
|
31 | memory?: number;
|
32 | maxDuration?: number;
|
33 | environment: Environment;
|
34 | constructor({ zipBuffer, handler, runtime, maxDuration, memory, environment, }: LambdaOptions);
|
35 | }
|
36 | export declare function createLambda({ files, handler, runtime, memory, maxDuration, environment, }: CreateLambdaOptions): Promise<Lambda>;
|
37 | export declare function createZip(files: Files): Promise<Buffer>;
|
38 | export declare function getLambdaOptionsFromFunction({ sourceFile, config, }: GetLambdaOptionsFromFunctionOptions): Promise<Pick<LambdaOptions, 'memory' | 'maxDuration'>>;
|
39 | export {};
|