import { Construct, IConstruct } from "constructs";
import { Role } from "aws-cdk-lib/aws-iam";
import { IVersion, IFunction as CdkIFunction } from "aws-cdk-lib/aws-lambda";
import { SSTConstruct } from "./Construct.js";
import { NodeJSProps } from "./Function.js";
import { Size } from "./util/size.js";
import { Duration } from "./util/duration.js";
import { Permissions } from "./util/permission.js";
export interface EdgeFunctionProps {
    bundle?: string;
    handler: string;
    runtime: "nodejs14.x" | "nodejs16.x" | "nodejs18.x";
    timeout: number | Duration;
    memorySize: number | Size;
    permissions?: Permissions;
    environment?: Record<string, string>;
    bind?: SSTConstruct[];
    nodejs?: NodeJSProps;
    scopeOverride?: IConstruct;
}
export declare class EdgeFunction extends Construct {
    role: Role;
    functionArn: string;
    function: CdkIFunction;
    private functionCR;
    private assetReplacer;
    private assetReplacerPolicy;
    private scope;
    private versionId;
    private bindingEnvs;
    private props;
    constructor(scope: Construct, id: string, props: EdgeFunctionProps);
    get currentVersion(): IVersion;
    build(): Promise<void>;
    attachPermissions(permissions: Permissions): void;
    addEnvironment(key: string, value: string): void;
    private buildAssetFromHandler;
    private buildAssetFromBundle;
    private bind;
    private createCodeReplacer;
    private updateCodeReplacer;
    private createRole;
    private createSingletonBucketInUsEast1;
    private createFunctionInUsEast1;
    private updateFunctionInUsEast1;
    private createVersionInUsEast1;
    private getHandlerExtension;
    private trimFromStart;
    private calculateHash;
}
