@cpod/sdk - v0.2.7
    Preparing search index...

    Function getDocumentSources

    • Get all available document sources

      Retrieves source information including document and file counts.

      Returns Promise<SourcesResponse>

      Promise resolving to SourcesResponse with sources array and total count

      401 - Not authenticated

      import { getDocumentSources, searchDocuments } from "@cpod/sdk";

      // Get available sources with counts
      const { sources, total } = await getDocumentSources();
      console.log(`Found ${total} sources`);

      for (const source of sources) {
      console.log(`${source.name}: ${source.documentCount} documents, ${source.fileCount} files`);
      }

      // Use sources to filter search
      const results = await searchDocuments({
      query: "vacation policy",
      sources: sources.map(s => s.id),
      });