import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue'; import { AnalysisArtifactDetail, AnalysisArtifactMetadataUpdate, AnalysisArtifactStatusFilter, AnalysisArtifactSummary, AnalysisArtifactTarget } from '../types/analysisArtifactTypes'; export { ANALYSIS_FILE_ARTIFACT_SCHEMA } from '../types/analysisArtifactTypes'; export interface UseAnalysisArtifactsOptions { /** Experiment id; defaults to platform injection or URL. Refetches when it changes. */ experimentId?: MaybeRefOrGetter; /** Override API base URL. */ apiBaseUrl?: string; /** Scope to a single owning plugin; omit or null to keep all plugins. */ pluginId?: MaybeRefOrGetter; /** Always request archived artifacts alongside active ones. */ includeArchived?: MaybeRefOrGetter; /** Fetch as soon as an experiment id is available. */ immediate?: boolean; } export interface UseAnalysisArtifactsReturn { /** Fetched artifacts, scoped to pluginId when set. */ artifacts: ComputedRef; /** Artifacts after applying statusFilter, pluginFilter, and search. */ visibleArtifacts: ComputedRef; /** Detail loaded by the last successful getDetail call, or null. */ selectedDetail: Ref; /** Resolved experiment id from options, platform injection, or URL. */ currentExperimentId: ComputedRef; /** Whether an experiment id is available. */ hasCurrentExperiment: ComputedRef; /** Whether any list or detail fetch is in progress. */ isLoading: ComputedRef; /** Whether any archive/restore/metadata mutation is in progress. */ isMutating: ComputedRef; /** Error message from the last failed operation, or null. */ error: Ref; /** Timestamp of the last successful load, or null. */ lastLoadedAt: Ref; /** Case-insensitive filter over display_name and artifact_key. */ search: Ref; /** Lifecycle filter; widening past "active" refetches with include_archived. */ statusFilter: Ref; /** Plugin filter applied to visibleArtifacts, or null for all plugins. */ pluginFilter: Ref; /** Fetch the artifact list for the current experiment. */ list: () => Promise; /** Alias of list. */ refresh: () => Promise; /** Fetch one artifact with its result payload; null when it fails or is superseded. */ getDetail: (artifactId: number) => Promise; /** Resolve and fetch the exact stable artifact identity. */ resolveTarget: (target: AnalysisArtifactTarget) => Promise; /** Update display_name and/or note; resolves to the updated summary or null. */ updateMetadata: (artifactId: number, updates: AnalysisArtifactMetadataUpdate) => Promise; /** Archive an artifact; resolves to the updated summary or null. */ archive: (artifactId: number) => Promise; /** Restore an archived artifact; resolves to the updated summary or null. */ restore: (artifactId: number) => Promise; /** Whether a key exists in the loaded artifacts (no network call). */ hasArtifactKey: (artifactKey: string) => boolean; /** Reset artifacts, selection, and error. */ clear: () => void; } /** * Lists and manages analysis artifacts through the user-facing platform API. * * @example Recommended * ```ts * const artifacts = useAnalysisArtifacts({ pluginId: 'LEAF' }) * await artifacts.list() * ``` */ export declare function useAnalysisArtifacts(options?: UseAnalysisArtifactsOptions): UseAnalysisArtifactsReturn;