ForgeFunctionAdapter
Defined in: packages/core/src/adapters/ForgeFunctionAdapter.ts:54
Adapter for Forge Functions (serverless backend).
Uses @forge/api’s requestJira / requestConfluence methods, which handle
all Forge authentication automatically. This is the most common adapter for
backend Forge apps.
Not available in Forge Containers — use ForgeContainerAdapter there.
Example
Section titled “Example”import { ForgeFunctionAdapter, asApp, asUser } from '@forge-clients/core';import { getIssue } from '@forge-clients/jira/v3';
const adapter = new ForgeFunctionAdapter({ product: 'jira' });
const appClient = asApp(adapter);const issue = await getIssue(appClient, { path: { issueIdOrKey: 'PROJ-1' } });
const userClient = asUser(adapter);const me = await getMyself(userClient);Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ForgeFunctionAdapter(
options):ForgeFunctionAdapter
Defined in: packages/core/src/adapters/ForgeFunctionAdapter.ts:62
Create a new ForgeFunctionAdapter.
Parameters
Section titled “Parameters”options
Section titled “options”Configuration including the target product and optional default auth context
Returns
Section titled “Returns”ForgeFunctionAdapter
Properties
Section titled “Properties”product
Section titled “product”
readonlyproduct:"jira"|"confluence"
Defined in: packages/core/src/adapters/ForgeFunctionAdapter.ts:55
The Atlassian product this adapter is configured to make requests to
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”fetch()
Section titled “fetch()”fetch(
options):Promise<Response>
Defined in: packages/core/src/adapters/ForgeFunctionAdapter.ts:71
Execute a request via @forge/api (requestJira or requestConfluence).
Authentication is handled automatically by the Forge runtime.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<Response>