import { type JobFrontmatter, type JobResourceClassification } from "../jobs/frontmatter.js"; import { type Resource } from "../resources/store.js"; import { type AutomationSharingGrantRole } from "./sharing-store.js"; export type AutomationEffectiveRole = "owner" | "collaborate" | "view"; export type AutomationAccessSource = "explicit" | "legacy"; export type AutomationEffectiveVisibility = "private" | "organization" | "shared"; export interface AutomationCapabilities { canEdit: boolean; canOperate: boolean; canDelete: boolean; canManageSharing: boolean; } export interface AutomationSharingGrantSummary { email: string; role: AutomationSharingGrantRole; name: string | null; avatar: string | null; } export interface AutomationSharingListSummary { source: AutomationAccessSource; visibility: AutomationEffectiveVisibility; organizationId: string | null; grantCount: number; grants?: AutomationSharingGrantSummary[]; } export interface AutomationCreatorSummary { email: string | null; label: string | null; } export interface AccessibleAutomation { resource: Resource; name: string; classification: JobResourceClassification; meta: JobFrontmatter; body: string; immutableCreator: string | null; owningOrganizationId: string | null; effectiveRole: AutomationEffectiveRole; capabilities: AutomationCapabilities; sharing: AutomationSharingListSummary; creator: AutomationCreatorSummary; } export interface AutomationAccessActor { userEmail: string; } export declare function listAccessibleAutomations(actor: AutomationAccessActor): Promise; export declare function resolveAutomationAccess(actor: AutomationAccessActor, resourceId: string): Promise;