Class representing a document loader for loading pages from Confluence.

const loader = new ConfluencePagesLoader({
baseUrl: "https:
spaceKey: "~EXAMPLE362906de5d343d49dcdbae5dEXAMPLE",
username: "your-username",
accessToken: "your-access-token",
});
const documents = await loader.load();
console.log(documents);

Hierarchy (view full)

Constructors

Properties

accessToken?: string
baseUrl: string
expand?: string

expand parameter for confluence rest api description can be found at https://developer.atlassian.com/server/confluence/expansions-in-the-rest-api/

limit: number
maxRetries: number
personalAccessToken?: string
spaceKey: string
username?: string

Methods

  • Fetches all the pages in the specified space and converts each page to a Document instance.

    Parameters

    • Optionaloptions: {
          limit?: number;
          start?: number;
      }

      the extra options of the load function

      • Optionallimit?: number

        The limit parameter to overwrite the size to fetch pages.

      • Optionalstart?: number

        The start parameter to set inital offset to fetch pages.

    Returns Promise<Document<Record<string, any>>[]>

    Promise resolving to an array of Document instances.

  • Parameters

    • Optionalsplitter: BaseDocumentTransformer<DocumentInterface<Record<string, any>>[], DocumentInterface<Record<string, any>>[]>

    Returns Promise<Document<Record<string, any>>[]>

    A Promise that resolves with an array of Document instances, each split according to the provided TextSplitter.

    Use this.load() and splitter.splitDocuments() individually. Loads the documents and splits them using a specified text splitter.