@@ -110,7 +110,7 @@ export interface LegacyEvent {
110110// @public
111111export interface OpenFunction {
112112 // (undocumented)
113- (ctx : OpenFunctionRuntime , data : {} ): any ;
113+ (ctx : OpenFunctionRuntime , data : object ): any ;
114114}
115115
116116// @public
@@ -136,8 +136,8 @@ export interface OpenFunctionContext {
136136 name: string ;
137137 outputs? : OpenFunctionBinding ;
138138 port? : string ;
139- postPlugins? : Array < string | Plugin_2 | undefined > ;
140- prePlugins? : Array < string | Plugin_2 | undefined > ;
139+ postPlugins? : string [] ;
140+ prePlugins? : string [] ;
141141 runtime: ` ${RuntimeType } ` | ` ${Capitalize <RuntimeType >} ` | ` ${Uppercase <RuntimeType >} ` ;
142142 version: string ;
143143}
@@ -146,6 +146,8 @@ export interface OpenFunctionContext {
146146export abstract class OpenFunctionRuntime {
147147 constructor (context : OpenFunctionContext );
148148 protected readonly context: OpenFunctionContext ;
149+ getPlugin(name : string ): Plugin_2 ;
150+ readonly locals: Record <string , any >;
149151 static Parse(context : OpenFunctionContext ): OpenFunctionRuntime ;
150152 static ProxyContext(context : OpenFunctionContext ): OpenFunctionRuntime ;
151153 get req(): Request_3 <ParamsDictionary , any , any , ParsedQs , Record <string , any >> | undefined ;
@@ -158,17 +160,17 @@ export abstract class OpenFunctionRuntime {
158160 };
159161 // Warning: (ae-forgotten-export) The symbol "OpenFunctionTrigger" needs to be exported by the entry point index.d.ts
160162 protected trigger? : OpenFunctionTrigger ;
163+ static WrapUserFunction(userFunction : OpenFunction , context : OpenFunctionContext | OpenFunctionRuntime ): (data : any ) => Promise <void >;
161164}
162165
163166// @public
164167class Plugin_2 {
165- execPostHook(ctx ? : OpenFunctionRuntime ): Promise <void >;
166- execPreHook(ctx ? : OpenFunctionRuntime ): Promise <void >;
167- get(filedName : string ): string ;
168- // (undocumented)
169- static OFN_PLUGIN_NAME: string ;
170- // (undocumented)
171- static OFN_PLUGIN_VERSION: string ;
168+ constructor (name : string , version ? : string );
169+ execPostHook(ctx : OpenFunctionRuntime | null , plugins : Record <string , Plugin_2 >): Promise <void >;
170+ execPreHook(ctx : OpenFunctionRuntime | null , plugins : Record <string , Plugin_2 >): Promise <void >;
171+ get(prop : string ): any ;
172+ readonly name: string ;
173+ readonly version: string ;
172174}
173175export { Plugin_2 as Plugin }
174176
0 commit comments