import type { AccessGrantAuthorization } from "@opengeni/core"; import type { UserResourceAuthoritySummary } from "@opengeni/db"; import { type IssueConnectionUseGrantRequest as IssueConnectionUseGrantRequestValue } from "@opengeni/contracts/connection-authority"; /** * Personal connection authority is available only to the exact authenticated * human. API keys, delegated bearers, services, and agent attempts cannot name * or substitute a personal owner. */ export declare function requireConnectionAuthorityOwner(access: AccessGrantAuthorization): string; /** Removes generic resource kind and refuses non-connection grant actions. */ export declare function projectSelfConnectionAuthorities(page: { authorities: UserResourceAuthoritySummary[]; nextCursor: string | null; }): { scope: "user"; authorities: { authorityId: string; resourceId: string; originWorkspaceId: string | null; generation: number; status: "active" | "retained" | "revoked"; grants: { grantId: string; targetWorkspaceId: string; targetSessionId: string | null; mode: "always" | "once" | "session"; context: "user_private" | "workspace_shared"; authorityEpoch: number | null; generation: number; status: "active" | "consumed" | "expired" | "revoked"; expiresAt: string | null; delegation: { authorityId: string; grantId: string; organizationId: string; workspaceId: string; sessionId: string | null; action: string; mode: "always" | "once" | "session"; context: "user_private" | "workspace_shared"; authorityEpoch: number | null; authorityGeneration: number; grantGeneration: number; resourceVersionId?: string | null | undefined; }; action: "connection.use"; }[]; }[]; nextCursor: string | null; }; /** The API owns the action; callers supply neither action nor owner identity. */ export declare function connectionUseGrantLifecycleInput(input: unknown): { action: "connection.use"; mode: IssueConnectionUseGrantRequestValue["mode"]; context: IssueConnectionUseGrantRequestValue["context"]; sessionId: string | null; expectedAuthorityEpoch: number | null; workspaceSharedAcknowledged: boolean; };