Class representing a document loader for loading pages from Confluence.

Example

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

Hierarchy

Constructors

Properties

baseUrl: string
limit: number
spaceKey: string
accessToken?: string
personalAccessToken?: string
username?: string

Methods

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

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

    Promise resolving to an array of Document instances.

  • Loads the documents and splits them using a specified text splitter.

    Parameters

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

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

  • Fetches data from the Confluence API using the provided URL.

    Parameters

    • url: string

      The URL to fetch data from.

    Returns Promise<ConfluenceAPIResponse>

    Promise resolving to the JSON response from the API.

Generated using TypeDoc