import type { ExtendedRoute } from '@netlify/zip-it-and-ship-it'; import type { MemoizeCache } from '@netlify/dev-utils'; import { type NormalizedCachedConfigConfig } from '../../utils/command-helpers.js'; import { type BlobsContextWithEdgeAccess } from '../blobs/blobs.js'; import type { AIGatewayContext } from '@netlify/ai/bootstrap'; import type { ServerSettings } from '../../utils/types.js'; import type { BaseBuildResult, InvokeFunctionResult, Runtime } from './runtimes/index.js'; export interface InvocationError { errorMessage: string; errorType: string; stackTrace: string[]; } export type InvokeFunctionResultWithError = { error: Error | InvocationError; result: null; }; export type InvokeFunctionResultWithSuccess = { error: null; result: InvokeFunctionResult; }; export type InvokeResult = InvokeFunctionResultWithError | InvokeFunctionResultWithSuccess; type MappedOmit = { [P in keyof T as P extends K ? never : P]: T[P]; }; export default class NetlifyFunction { private readonly aiGatewayContext?; private readonly blobsContext; private readonly config; private readonly deployEnvironment; private readonly directory?; private readonly projectRoot; private readonly timeoutBackground?; private readonly timeoutSynchronous?; private readonly settings; readonly displayName: string; mainFile: string; readonly name: string; readonly runtime: Runtime; schedule?: string; readonly srcPath: string; readonly isBackground: boolean; private buildQueue?; buildData?: MappedOmit | undefined; buildError: Error | null; private srcFiles; constructor({ aiGatewayContext, blobsContext, config, deployEnvironment, directory, displayName, mainFile, name, projectRoot, runtime, settings, srcPath, timeoutBackground, timeoutSynchronous, }: { aiGatewayContext?: AIGatewayContext | null; blobsContext: BlobsContextWithEdgeAccess; config: NormalizedCachedConfigConfig; deployEnvironment: { key: string; value: string; isSecret: boolean; }[]; directory?: string; displayName?: string; mainFile: string; name: string; projectRoot: string; runtime: Runtime; settings: Pick; srcPath: string; timeoutBackground?: number; timeoutSynchronous?: number; }); get filename(): string | null; getRecommendedExtension(): ".mjs" | ".mts" | undefined; hasValidName(): boolean; isScheduled(): Promise; isSupported(): boolean; isTypeScript(): boolean; getNextRun(): Promise; build({ cache }: { cache?: MemoizeCache>; }): Promise<{ includedFiles: string[]; srcFilesDiff: { added: Set; deleted: Set; }; error?: undefined; } | { error: unknown; includedFiles?: undefined; srcFilesDiff?: undefined; }>; getBuildData(): Promise; getSrcFilesDiff(newSrcFiles: Set): { added: Set; deleted: Set; }; invoke(event?: Record, context?: Record): Promise; /** * Matches all routes agains the incoming request. If a match is found, then the matched route is returned. * @returns matched route */ matchURLPath(rawPath: string, method: string, hasStaticFile: () => Promise): Promise; get runtimeAPIVersion(): 1 | NonNullable; get url(): string; } export {}; //# sourceMappingURL=netlify-function.d.ts.map