import { ExternalActorContinuation } from "@opengeni/contracts/external-identities"; import type { AccessGrant, ScheduledTask } from "@opengeni/contracts"; import { AtlassianOAuthStartResponse, type AtlassianDisconnectRequest, type AtlassianLifecycleActionRequest, type AtlassianOAuthStartRequest } from "@opengeni/contracts/atlassian"; import { type ApiRouteDeps } from "@opengeni/core"; import { getConnectionMetadata } from "@opengeni/db"; type AtlassianConnectionRecord = NonNullable>>; export declare function startAtlassianOAuth(deps: ApiRouteDeps, input: { accountId: string; workspaceId: string; subjectId: string; requestUrl: string; payload: AtlassianOAuthStartRequest; connectAttemptId?: string; externalContinuation?: ExternalActorContinuation; }): Promise; export declare function completeAtlassianOAuthCallback(deps: ApiRouteDeps, input: { code?: string | undefined; state?: string | undefined; error?: string | undefined; requestUrl: string; }): Promise<{ redirectTo: string; exactReturn?: boolean; }>; export declare function browseAtlassianSources(deps: ApiRouteDeps, input: { workspaceId: string; subjectId: string; connectionId: string; }): Promise<{ connection: { id: string; authorityId?: string | undefined; accountId: string; workspaceId: string; subjectId: string | null; providerDomain: string; kind: "api_key" | "app_install" | "delegated" | "oauth2"; status: "active" | "error" | "needs_reauth" | "revoked"; grantedScopes: string[]; expiresAt: string | null; lastRefreshAt: string | null; lastUsedAt: string | null; lastError: string | null; version: number; verifiedInstallAt?: string | null | undefined; verifiedInstallVersion?: number | null | undefined; metadata: Record; createdBySubjectId: string | null; updatedBySubjectId: string | null; createdAt: string; updatedAt: string; }; items: { id: string; cloudId: string; siteName: string; siteUrl: string; resourceId: string; key: string; name: string; kind: "confluence_space" | "jira_project"; description: string | null; webUrl: string; }[]; }>; export declare function searchAtlassianLive(deps: ApiRouteDeps, input: { workspaceId: string; subjectId: string; connectionId: string; query: string; product?: "jira" | "confluence" | undefined; limit: number; }): Promise<({ kind: "jira_issue"; id: string; key: string; title: string; sourceId: string | null; sourceName: string | null; status: string | null; updatedAt: string | null; url: string; } | { kind: "confluence_page"; id: string; key: null; title: string; sourceId: string | null; sourceName: string | null; status: null; updatedAt: string | null; url: string; })[]>; export declare function getAtlassianLiveItem(deps: ApiRouteDeps, input: { workspaceId: string; subjectId: string; connectionId: string; kind: "jira_issue" | "confluence_page"; id: string; }): Promise<{ kind: "jira_issue"; id: string; key: string; title: string; source: { id: string; name: string; siteName: string; }; status: string | null; issueType: string | null; priority: string | null; assignee: string | null; reporter: string | null; labels: string[]; createdAt: string | null; updatedAt: string | null; description: string; comments: { author: string | null; createdAt: string | null; body: string; }[]; url: string; content?: never; } | { key?: never; issueType?: never; priority?: never; assignee?: never; reporter?: never; labels?: never; description?: never; kind: "confluence_page"; id: string; title: string; source: { id: string; name: string; siteName: string; }; status: string | null; createdAt: string | null; updatedAt: string | null; content: string; comments: { createdAt: string | null; content: string; }[]; url: string; }>; export declare function saveAtlassianSources(deps: ApiRouteDeps, input: { accountId: string; workspaceId: string; subjectId: string; connectionId: string; grant: AccessGrant; payload: unknown; canManageOrganizationDestination: boolean; canManageWorkspaceDestination: boolean; canManagePersonalDestination: boolean; }): Promise; export declare function transitionAtlassianLifecycle(deps: ApiRouteDeps, input: { workspaceId: string; subjectId: string; connectionId: string; payload: AtlassianLifecycleActionRequest; }): Promise; export declare function disconnectAtlassian(deps: ApiRouteDeps, input: { workspaceId: string; subjectId: string; connection: AtlassianConnectionRecord; payload: AtlassianDisconnectRequest; }): Promise; export declare function preflightAtlassianScheduleAuthorization(deps: ApiRouteDeps, input: { task: ScheduledTask; subjectId: string; }): Promise; export declare function revokeAtlassianScheduleAuthorization(deps: ApiRouteDeps, input: { task: ScheduledTask; subjectId: string; }): Promise; export declare function cleanupAtlassianScheduleAuthorization(deps: ApiRouteDeps, input: { taskId: string; accountId: string; workspaceId: string; connectionId: string; connectionVersion: number; sourceId: string; sourceLifecycleGeneration: number; sourceConfigGeneration: number; externalSourceId: string; subjectId: string; }): Promise; export declare function isSelectableConfluenceSpaceType(value: unknown): boolean; export declare function confluenceNextUrl(cloudId: string, next: string): URL; export {};