IFClite TypeScript API
    Preparing search index...

    Interface ResourceProvider

    A ResourceProvider can either:

    • enumerate concrete resources (list()) — useful for static resources
    • resolve URIs by pattern (match() + read()) — for dynamic ones (e.g. ifc-lite://model/{id}/entity/{globalId})

    Most providers do both: they enumerate the "manifest" resources and serve any URI that matches their patterns.

    interface ResourceProvider {
        name: string;
        list(
            ctx: ToolContext,
        ): ResourceDefinition[] | Promise<ResourceDefinition[]>;
        match(uri: string): boolean;
        read(
            uri: string,
            ctx: ToolContext,
        ): ResourceContents[] | Promise<ResourceContents[]>;
    }
    Index
    name: string

    Stable name for diagnostics.

    • True iff this provider can read the given URI.

      Parameters

      • uri: string

      Returns boolean