## API Report File for "amplify-function-plugin-interface"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

// @public (undocumented)
export type BuildRequest = {
    buildType: BuildType;
    srcRoot: string;
    runtime: string;
    legacyBuildHookParams?: {
        projectRoot: string;
        resourceName: string;
    };
    lastBuildTimeStamp?: Date;
    lastBuildType?: BuildType;
    service?: string;
};

// @public (undocumented)
export type BuildResult = {
    rebuilt: boolean;
};

// @public (undocumented)
export enum BuildType {
    // (undocumented)
    DEV = "DEV",
    // (undocumented)
    PROD = "PROD"
}

// @public (undocumented)
export type CheckDependenciesResult = {
    hasRequiredDependencies: boolean;
    errorMessage?: string;
};

// @public (undocumented)
export interface Contributor<T extends Partial<FunctionParameters>, K> {
    // (undocumented)
    contribute(request: K): Promise<T>;
}

// @public (undocumented)
export interface ExternalLayer {
    // (undocumented)
    arn: string | {
        'Fn::Sub': string;
    } | {
        Ref: string;
    };
    // (undocumented)
    type: 'ExternalLayer';
}

// @public (undocumented)
export interface FunctionBreadcrumbs {
    // (undocumented)
    defaultEditorFile: string;
    // (undocumented)
    functionRuntime: string;
    // (undocumented)
    pluginId: string;
    // (undocumented)
    scripts?: Record<'build' & 'package', FunctionScript>;
    // (undocumented)
    useLegacyBuild: boolean;
}

// @public (undocumented)
export interface FunctionDependency {
    // (undocumented)
    attributeEnvMap?: {
        [name: string]: string;
    };
    // (undocumented)
    attributes: string[];
    // (undocumented)
    category: string;
    // (undocumented)
    resourceName: string;
}

// @public (undocumented)
export type FunctionParameters = {
    providerContext: ProviderContext;
    cloudResourceTemplatePath: string;
    resourceName: string;
    functionName: string;
    runtime: FunctionRuntime;
    roleName: string;
    dependsOn?: FunctionDependency[];
    functionTemplate?: FunctionTemplate;
    categoryPolicies?: object[];
    skipEdit?: boolean;
    mutableParametersState?: any;
    environmentMap?: Record<string, any>;
    triggerEventSourceMappings?: any;
    topLevelComment?: string;
    runtimePluginId: string;
    cloudwatchRule?: string;
    lambdaLayers: LambdaLayer[];
    environmentVariables?: Record<string, string>;
    secretDeltas?: SecretDeltas;
    template?: string;
    defaultRuntime?: string;
    skipAdvancedSection?: boolean;
    skipNextSteps?: boolean;
};

// @public (undocumented)
export interface FunctionRuntime {
    // (undocumented)
    cloudTemplateValue: string;
    // (undocumented)
    defaultHandler: string;
    // (undocumented)
    layerDefaultFiles?: LayerFiles[];
    // (undocumented)
    layerExecutablePath?: string;
    // (undocumented)
    name: string;
    // (undocumented)
    runtimePluginId?: string;
    // (undocumented)
    value: string;
}

// Warning: (ae-forgotten-export) The symbol "FunctionContributorCondition" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export type FunctionRuntimeCondition = Pick<FunctionContributorCondition, 'provider' | 'services'>;

// @public (undocumented)
export type FunctionRuntimeContributorFactory = (context: any) => Contributor<FunctionRuntimeParameters, RuntimeContributionRequest> & FunctionRuntimeLifecycleManager;

// @public (undocumented)
export interface FunctionRuntimeLifecycleManager {
    // (undocumented)
    build(request: BuildRequest): Promise<BuildResult>;
    // (undocumented)
    checkDependencies(runtimeValue: string): Promise<CheckDependenciesResult>;
    // (undocumented)
    invoke(request: InvocationRequest): Promise<any>;
    // (undocumented)
    package(request: PackageRequest): Promise<PackageResult>;
}

// @public (undocumented)
export type FunctionRuntimeParameters = Pick<FunctionParameters, 'runtime'>;

// @public (undocumented)
export interface FunctionScript {
    // (undocumented)
    type: 'file' | 'inline';
    // (undocumented)
    value: string;
}

// @public (undocumented)
export interface FunctionTemplate {
    // (undocumented)
    defaultEditorFile?: string;
    // (undocumented)
    destMap?: {
        [name: string]: string;
    };
    // (undocumented)
    handler?: string;
    // (undocumented)
    parameters?: any;
    // (undocumented)
    sourceFiles: string[];
    // (undocumented)
    sourceRoot: string;
}

// @public (undocumented)
export type FunctionTemplateCondition = FunctionContributorCondition;

// @public (undocumented)
export type FunctionTemplateContributorFactory = (context: any) => Contributor<Partial<FunctionParameters>, TemplateContributionRequest>;

// @public (undocumented)
export type FunctionTemplateParameters = Pick<FunctionParameters, 'dependsOn' | 'functionTemplate' | 'triggerEventSourceMappings'>;

// @public (undocumented)
export interface FunctionTriggerParameters {
    // (undocumented)
    cloudResourceTemplatePath?: string;
    // (undocumented)
    environmentVariables?: Record<string, string>;
    // (undocumented)
    functionName: string;
    // (undocumented)
    functionTemplate?: FunctionTemplate;
    // (undocumented)
    key: string;
    // (undocumented)
    modules: any[];
    // (undocumented)
    parentResource: string;
    // (undocumented)
    parentStack: string;
    // (undocumented)
    resourceName: string;
    // (undocumented)
    roleName: string;
    // (undocumented)
    skipEdit: boolean;
    // (undocumented)
    skipNextSteps?: boolean;
    // (undocumented)
    trigger: boolean;
    // (undocumented)
    triggerDir: string;
    // (undocumented)
    triggerEnvs: any;
    // (undocumented)
    triggerEventPath: string;
    // (undocumented)
    triggerIndexPath: string;
    // (undocumented)
    triggerPackagePath: string;
    // (undocumented)
    triggerTemplate: string;
}

// @public (undocumented)
export type InvocationRequest = {
    srcRoot: string;
    runtime: string;
    handler: string;
    event: string;
    envVars?: {
        [key: string]: string;
    };
};

// @public (undocumented)
export type LambdaLayer = ProjectLayer | ExternalLayer;

// @public (undocumented)
export interface LayerFiles {
    // (undocumented)
    content?: any;
    // (undocumented)
    filename: string;
    // (undocumented)
    path: string;
}

// @public (undocumented)
export type PackageRequest = {
    env: string;
    srcRoot: string;
    dstFilename: string;
    runtime: string;
    lastBuildTimeStamp: Date;
    lastPackageTimeStamp?: Date;
    skipHashing?: boolean;
    service?: string;
    currentHash?: boolean;
};

// @public (undocumented)
export type PackageResult = {
    packageHash?: string;
    zipEntries?: ZipEntry[];
};

// @public (undocumented)
export interface ProjectLayer {
    // (undocumented)
    env: string;
    // (undocumented)
    isLatestVersionSelected: boolean;
    // (undocumented)
    resourceName: string;
    // (undocumented)
    type: 'ProjectLayer';
    // (undocumented)
    version: number | string;
}

// @public (undocumented)
export interface ProviderContext {
    // (undocumented)
    projectName: string;
    // (undocumented)
    provider: string;
    // (undocumented)
    service: string;
}

// @public (undocumented)
export type RemoveSecret = {
    operation: 'remove';
};

// @public (undocumented)
export const removeSecret: RemoveSecret;

// @public (undocumented)
export type RetainSecret = {
    operation: 'retain';
};

// @public (undocumented)
export const retainSecret: RetainSecret;

// @public (undocumented)
export type RuntimeContributionRequest = {
    selection: string;
    contributionContext: {
        functionName: string;
        resourceName: string;
    };
};

// @public (undocumented)
export type SecretDelta = RetainSecret | RemoveSecret | SetSecret;

// @public (undocumented)
export type SecretDeltas = Record<SecretName, SecretDelta>;

// @public (undocumented)
export type SecretName = string;

// @public (undocumented)
export type SetSecret = {
    operation: 'set';
    value: string;
};

// @public (undocumented)
export const setSecret: (value: string) => SetSecret;

// @public (undocumented)
export type TemplateContributionRequest = {
    selection: string;
    contributionContext: {
        runtime: FunctionRuntime;
        functionName: string;
        resourceName: string;
    };
};

// @public (undocumented)
export type ZipEntry = {
    sourceFolder?: string;
    packageFolder?: string;
    ignoreFiles?: string[];
};

// (No @packageDocumentation comment for this package)

```
