@forge/bridge

5.18.0-next.1-experimental-44b7a125.18.0-next.2
out/invoke/invoke.d.ts
~out/invoke/invoke.d.tsModified
+3−3
Index: package/out/invoke/invoke.d.ts
===================================================================
--- package/out/invoke/invoke.d.ts
+++ package/out/invoke/invoke.d.ts
@@ -1,6 +1,6 @@
 import type { Definitions, DefArguments, DefResult } from '@forge/resolver/shared';
-import { InvokePayload, InvokeResponse } from '../types';
+import { InvokeMetadata, InvokePayload, InvokeResponse } from '../types';
 /**
  * Calls a resolver function with explicit payload and return types.
  *
  * The first generic is the payload shape and the second generic is the return type.
@@ -10,16 +10,16 @@
  * type Payload = { name: string };
  * type Response = { message: string };
  * const response = await invoke<Payload, Response>('greet', { name: 'Taylor' });
  */
-export declare function invoke<Payload extends InvokePayload, T = InvokeResponse>(functionKey: string, payload: Payload): Promise<T>;
+export declare function invoke<Payload extends InvokePayload, T = InvokeResponse>(functionKey: string, payload: Payload, metadata?: InvokeMetadata): Promise<InvokeResponse<T>>;
 /**
  * Calls a resolver function using the legacy generic form where the type argument is the return type.
  *
  * @example
  * const response = await invoke<{ message: string }>('greet', { name: 'Taylor' });
  */
-export declare function invoke<T = InvokeResponse>(functionKey: string, payload?: InvokePayload): Promise<T>;
+export declare function invoke<T = InvokeResponse>(functionKey: string, payload?: InvokePayload, metadata?: InvokeMetadata): Promise<InvokeResponse<T>>;
 declare type Invoke<Defs extends Definitions> = <Def extends keyof Defs & string>(call: Def, ...arg: DefArguments<Defs, Def>) => Promise<DefResult<Defs, Def>>;
 /**
  * Specialises the invoke function to a given Definitions type.
  *