The invoke
bridge method enables UI Kit and custom UI apps to run backend FaaS functions hosted by Atlassian.
To use the invoke
bridge method, you need to define your functions using the
Forge UI resolver.
1 2function invoke( functionKey: string, payload?: { [key in number | string]: any } ): Promise<{ [key: string]: any } | void>;
functionKey
in one of your resolver function definitions.Promise
that resolves with the data returned from the invoked function.1 2import { invoke } from '@forge/bridge'; invoke('getText', { example: 'my-invoke-variable' }).then((data) => console.log(data));
Rate this page: