/** * Unified Jira Client Factory * * Standardizes Jira project lookups to use Cloud API when ATLASSIAN_USE_CLOUD_API=true * and OAuth credentials are available, otherwise falls back to PAT/site URL. */ import type { AuthMode } from '../../config/jiraConnection'; export interface UnifiedJiraClient { baseUrl: string; authHeaders: Record; authMode: AuthMode; cloudId?: string; jiraSite?: string; } export interface GetJiraClientOptions { requireCloud?: boolean; userId?: string; } /** * Get unified Jira client for current context * * Priority: * 1. Cloud API + OAuth (from DB-stored credential) - PRIMARY PATH for tenants * 2. Site API + PAT (fallback for superadmin/test only) * * @param options - Options for client creation * @returns Unified Jira client */ export declare function getJiraClientForCurrentContext(options?: GetJiraClientOptions): Promise; /** * Make a Jira API request using the unified client */ export declare function makeJiraRequest(path: string, options?: GetJiraClientOptions & { method?: string; body?: unknown; }): Promise; /** * Get diagnostic information about the current Jira connection */ export declare function getJiraConnectionDiagnostics(options?: GetJiraClientOptions): Promise<{ authMode: AuthMode; jiraSite?: string; cloudApiBase?: string; cloudId?: string; email?: string; baseUrl: string; }>; //# sourceMappingURL=unified-client.d.ts.map