AI Notice: Most documentation right now was auto-generated by an LLM. Handwritten documentation will be implemented over time on the road to 1.0
MetadataProvider
Metadata provider - extracts structured metadata from files
Signature
interface MetadataProvider {
type: "metadata";
id: string;
name: string;
priority?: number;
extensions?: string[];
mimeTypes?: string[];
categories?: FileCategory[];
canHandle?: (file: FileEntry) => boolean;
extract: (file: FileEntry, rawMeta: RawMetadata, api: MetadataAPI) => Promise<ExtractedMetadata> | ExtractedMetadata;
schema?: MetadataSchema;
columnPolicy?: MetadataColumnPolicy;
getFilterValueOptions?: (fieldKey: string, api: MetadataAPI) => FilterValueOption[] | Promise<FilterValueOption[]>;
}Members
| Name | Type | Required | Description |
|---|---|---|---|
type | "metadata" | yes | — |
id | string | yes | — |
name | string | yes | — |
priority | number | no | — |
extensions | string[] | no | File matching criteria |
mimeTypes | string[] | no | — |
categories | FileCategory[] | no | — |
canHandle | (file: FileEntry) => boolean | no | — |
extract | (file: FileEntry, rawMeta: RawMetadata, api: MetadataAPI) => Promise<ExtractedMetadata> | ExtractedMetadata | yes | Extract metadata from file |
schema | MetadataSchema | no | Schema for extracted metadata (for UI rendering) |
columnPolicy | MetadataColumnPolicy | no | How this provider appears in Details column picker and auto-visible heuristics |
getFilterValueOptions | (fieldKey: string, api: MetadataAPI) => FilterValueOption[] | Promise<FilterValueOption[]> | no | Optional override for filter dropdown options on dynamic-enum schema fields. When absent or empty, Phials falls back to distinct-value scan over the listing. |