IFClite TypeScript API
    Preparing search index...

    Interface FileSourceProvider

    interface FileSourceProvider {
        auth?: SourceAuth;
        manifest: PluginManifest;
        download(
            ctx: PluginContext,
            ref: SourceFileRef,
            options?: DownloadOptions,
        ): Promise<ArrayBuffer>;
        listContainers(
            ctx: PluginContext,
            projectId: string,
            parentId?: string,
            options?: ListOptions,
        ): Promise<Page<SourceContainer>>;
        listFiles(
            ctx: PluginContext,
            projectId: string,
            containerId: string,
            filter?: FileFilter,
            options?: ListOptions,
        ): Promise<Page<SourceFile>>;
        listProjects(
            ctx: PluginContext,
            options?: ListProjectsOptions,
        ): Promise<Page<SourceProject>>;
        listRevisions?(
            ctx: PluginContext,
            ref: SourceFileRef,
            options?: ListOptions,
        ): Promise<Page<SourceRevision>>;
        searchFiles?(
            ctx: PluginContext,
            projectId: string,
            query: string,
            filter?: FileFilter,
            options?: ListOptions,
        ): Promise<Page<SourceFile>>;
        testConnection?(ctx: PluginContext): Promise<ConnectionTestResult>;
        watchRevisions?(
            ctx: PluginContext,
            refs: readonly SourceFileRef[],
            cursor?: string,
            options?: ListOptions,
        ): Promise<RevisionWatchResult>;
    }

    Implemented by

    Index
    auth?: SourceAuth

    Required when manifest.auth === 'interactive'.

    manifest: PluginManifest
    • List containers within a project. parentId omitted means top level.

      The shape of the result is governed by capabilities.containerListing: direct-children returns only immediate children, flat-subtree returns the whole descendant set flattened with parentId links intact.

      Parameters

      Returns Promise<Page<SourceContainer>>

    • Optional: detect new revisions.

      Providers with a delta or change-feed endpoint should use cursor and ignore refs, returning a fresh cursor each call. Providers without one poll the given refs. Either way the host passes both, and the cost of the call is the provider's business rather than the host's guess.

      Parameters

      Returns Promise<RevisionWatchResult>