Skip to content

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.

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);

new ForgeFunctionAdapter(options): ForgeFunctionAdapter

Defined in: packages/core/src/adapters/ForgeFunctionAdapter.ts:62

Create a new ForgeFunctionAdapter.

ForgeFunctionAdapterOptions

Configuration including the target product and optional default auth context

ForgeFunctionAdapter

readonly product: "jira" | "confluence"

Defined in: packages/core/src/adapters/ForgeFunctionAdapter.ts:55

The Atlassian product this adapter is configured to make requests to

ForgeAdapter.product

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.

ForgeRequestOptions

Promise<Response>

ForgeAdapter.fetch