Installation
Requirements
Section titled “Requirements”- Node.js 18 or later
- A Forge app (created with
forge create) - npm, yarn, or pnpm
Install in a Forge Function app
Section titled “Install in a Forge Function app”npm install @forge-clients/core @forge-clients/jira# ornpm install @forge-clients/core @forge-clients/confluence# or bothnpm install @forge-clients/core @forge-clients/jira @forge-clients/confluenceInstall in a Custom UI app
Section titled “Install in a Custom UI app”Custom UI apps use the ForgeBridgeAdapter. Install in the static/ directory:
cd static/my-appnpm install @forge-clients/core @forge-clients/jiraInstall in a Forge Container app
Section titled “Install in a Forge Container app”Containers can use the ForgeContainerAdapter:
npm install @forge-clients/core @forge-clients/jira @forge-clients/confluenceTypeScript configuration
Section titled “TypeScript configuration”@forge-clients is published as ESM with TypeScript declarations. Your tsconfig.json
should target ES2020 or later:
{ "compilerOptions": { "target": "ES2020", "module": "commonjs", "moduleResolution": "node", "strict": true }}Available packages
Section titled “Available packages”| Package | npm install | Use when |
|---|---|---|
@forge-clients/core | Always required | Provides adapters, errors, retry, pagination |
@forge-clients/jira | Jira API calls | Any Jira REST API operation |
@forge-clients/confluence | Confluence API calls | Any Confluence REST API operation |
@forge-clients/generator | Dev tool only | Regenerating clients from updated specs |
Verifying the installation
Section titled “Verifying the installation”import { ForgeFunctionAdapter } from '@forge-clients/core';import { getCurrentUser } from '@forge-clients/jira/v3';
// If this typechecks, installation is correctconst adapter = new ForgeFunctionAdapter({ product: 'jira' });