import { ExternalActorContinuation } from "@opengeni/contracts/external-identities"; import type { AccessGrant, ScheduledTask } from "@opengeni/contracts"; import { GoogleDriveOAuthStartResponse, type GoogleDriveDisconnectRequest, type GoogleDriveLifecycleActionRequest, type GoogleDriveOAuthStartRequest } from "@opengeni/contracts/google-drive"; import { IntegrationFacetMutationResult } from "@opengeni/contracts"; import type { ApiRouteDeps } from "@opengeni/core"; import { getConnectionMetadata } from "@opengeni/db"; export declare function wakeGoogleDriveSourcesFromWorkspaceEvent(deps: ApiRouteDeps, input: { accountId: string; workspaceId: string; connectionId: string; connectionOwnerSubjectId: string; eventId: string; driveId: string | null; }): Promise<{ enabled: boolean; triggered: number; }>; type GoogleDriveConnectionRecord = NonNullable>>; export declare function startGoogleDriveOAuth(deps: ApiRouteDeps, input: { accountId: string; workspaceId: string; subjectId: string; requestUrl: string; payload: GoogleDriveOAuthStartRequest; connectAttemptId?: string; externalContinuation?: ExternalActorContinuation; }): Promise; export declare function completeGoogleDriveOAuthCallback(deps: ApiRouteDeps, input: { code?: string | undefined; state?: string | undefined; error?: string | undefined; pickedFileIds?: string | undefined; requestUrl: string; }): Promise<{ redirectTo: string; exactReturn?: boolean; }>; export declare function transitionGoogleDriveLifecycle(deps: ApiRouteDeps, input: { workspaceId: string; subjectId: string; connectionId: string; payload: GoogleDriveLifecycleActionRequest; }): Promise; export declare function disconnectGoogleDrive(deps: ApiRouteDeps, input: { workspaceId: string; subjectId: string; connection: GoogleDriveConnectionRecord; payload: GoogleDriveDisconnectRequest; }): Promise; export declare function browseGoogleDrive(deps: ApiRouteDeps, input: { workspaceId: string; subjectId: string; connectionId: string; parentId: string; pageToken?: string | undefined; }): 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; }; parentId: string; current: { id: string; name: string; mimeType: string; kind: "file" | "folder"; driveId: string | null; modifiedTime: string | null; size: string | null; webViewLink: string | null; } | null; items: { id: string; name: string; mimeType: string; kind: "file" | "folder"; driveId: string | null; modifiedTime: string | null; size: string | null; webViewLink: string | null; }[]; nextPageToken: string | null; incompleteSearch: boolean; }>; export declare function browseGoogleDriveFacetSource(deps: ApiRouteDeps, input: { workspaceId: string; subjectId: string; capabilityId: string; instanceKey: string; facetKey: string; parentId: string; pageToken?: string | undefined; }): 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; }; parentId: string; current: { id: string; name: string; mimeType: string; kind: "file" | "folder"; driveId: string | null; modifiedTime: string | null; size: string | null; webViewLink: string | null; } | null; items: { id: string; name: string; mimeType: string; kind: "file" | "folder"; driveId: string | null; modifiedTime: string | null; size: string | null; webViewLink: string | null; }[]; nextPageToken: string | null; incompleteSearch: boolean; }>; export declare function saveGoogleDriveFacetSource(deps: ApiRouteDeps, input: { accountId: string; workspaceId: string; subjectId: string; capabilityId: string; instanceKey: string; facetKey: string; payload: unknown; canManageOrganizationDestination: boolean; canManageWorkspaceDestination: boolean; canManagePersonalDestination: boolean; }): Promise; export declare function saveGoogleDriveSource(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 preflightKnowledgeSourceScheduleAuthorization(deps: ApiRouteDeps, input: { task: ScheduledTask; subjectId: string; }): Promise; export declare function revokeKnowledgeSourceScheduleAuthorization(deps: ApiRouteDeps, input: { task: ScheduledTask; subjectId: string; }): Promise; export declare function cleanupKnowledgeSourceScheduleAuthorization(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 {};