npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@elqnt/docs

v2.0.10

Published

Document management utilities for Eloquent platform

Readme

@elqnt/docs

Document management utilities for Eloquent platform. Provides API functions for managing document libraries, folders, and document references.

Installation

pnpm add @elqnt/docs

Quick Start

import {
  listLibrariesApi,
  getDefaultLibraryApi,
  listDocumentsApi,
  createDocumentApi,
} from "@elqnt/docs/api";

// Get the default library
const defaultLib = await getDefaultLibraryApi({
  baseUrl: "https://api.elqnt.ai",
  orgId: "org-uuid",
});

// List documents in a library
const docs = await listDocumentsApi(defaultLib.data.library.id, {
  baseUrl: "https://api.elqnt.ai",
  orgId: "org-uuid",
  page: 1,
  pageSize: 20,
});

Exports

| Import Path | Description | |-------------|-------------| | @elqnt/docs | All exports | | @elqnt/docs/api | Browser API functions |

API Reference

Libraries

| Function | Description | |----------|-------------| | listLibrariesApi(options) | List all document libraries | | getDefaultLibraryApi(options) | Get the default library | | getLibraryApi(libraryId, options) | Get a specific library | | createLibraryApi(library, options) | Create a new library | | updateLibraryApi(libraryId, updates, options) | Update a library | | deleteLibraryApi(libraryId, options) | Delete a library |

import {
  listLibrariesApi,
  createLibraryApi,
} from "@elqnt/docs/api";

// List libraries for a specific owner
const libraries = await listLibrariesApi({
  baseUrl: "https://api.elqnt.ai",
  orgId: "org-uuid",
  ownerEmail: "[email protected]",
});

// Create a new library
const newLib = await createLibraryApi(
  { name: "Project Documents", description: "Docs for Project X" },
  { baseUrl: "https://api.elqnt.ai", orgId: "org-uuid" }
);

Folders

| Function | Description | |----------|-------------| | listFoldersApi(libraryId, options) | List folders in a library | | createFolderApi(folder, options) | Create a new folder | | updateFolderApi(folderId, updates, options) | Update a folder | | deleteFolderApi(folderId, options) | Delete a folder | | moveFolderApi(folderId, destination, options) | Move folder to new location | | copyFolderApi(folderId, destination, options) | Copy folder |

import { listFoldersApi, createFolderApi } from "@elqnt/docs/api";

// List folders in a library
const folders = await listFoldersApi(libraryId, {
  baseUrl: "https://api.elqnt.ai",
  orgId: "org-uuid",
  parentFolderId: "parent-folder-id", // Optional: filter by parent
});

// Create a subfolder
const folder = await createFolderApi(
  { libraryId, name: "Reports", parentFolderId: "parent-id" },
  { baseUrl: "https://api.elqnt.ai", orgId: "org-uuid" }
);

Documents

| Function | Description | |----------|-------------| | listDocumentsApi(libraryId, options) | List documents in a library | | createDocumentApi(document, options) | Create a document reference | | updateDocumentApi(referenceId, updates, options) | Update document metadata | | deleteDocumentApi(referenceId, options) | Delete a document | | moveDocumentApi(referenceId, destination, options) | Move document | | copyDocumentApi(referenceId, destination, options) | Copy document |

import { listDocumentsApi, createDocumentApi } from "@elqnt/docs/api";

// List documents with pagination
const docs = await listDocumentsApi(libraryId, {
  baseUrl: "https://api.elqnt.ai",
  orgId: "org-uuid",
  folderId: "folder-id",  // Optional: filter by folder
  page: 1,
  pageSize: 50,
});

// Create a document reference
const doc = await createDocumentApi(
  {
    libraryId,
    folderId: "folder-id",
    name: "report.pdf",
    mimeType: "application/pdf",
    url: "https://storage.example.com/files/report.pdf",
  },
  { baseUrl: "https://api.elqnt.ai", orgId: "org-uuid" }
);

Document Analysis

import { getRawDocumentAnalysisApi } from "@elqnt/docs/api";

// Analyze a document (e.g., extract text from PDF)
const analysis = await getRawDocumentAnalysisApi(
  {
    fileUrl: "https://storage.example.com/files/report.pdf",
    model: "document-ai",
    fromPage: 1,
    toPage: 10,
    outputMarkdown: true,
  },
  { baseUrl: "https://api.elqnt.ai", orgId: "org-uuid" }
);

Project Sources

import {
  persistProjectSourcesApi,
  saveDocumentToProjectSourcesApi,
} from "@elqnt/docs/api";

// Save document sources for a project
await persistProjectSourcesApi(
  projectId,
  [
    { type: "document", id: "doc-1", name: "Report.pdf" },
    { type: "url", url: "https://example.com/data" },
  ],
  { baseUrl: "https://api.elqnt.ai", orgId: "org-uuid" }
);

// Add a single document to project sources
await saveDocumentToProjectSourcesApi(
  projectId,
  documentId,
  { baseUrl: "https://api.elqnt.ai", orgId: "org-uuid" }
);

Types

import type {
  // Libraries
  DocLibrary,

  // Folders
  DocFolder,
  FolderTreeNode,

  // Documents
  DocReference,

  // Projects
  ProjectSource,
  EloquentProject,
  ProjectChatSummary,
} from "@elqnt/docs/api";

DocLibrary

interface DocLibrary {
  id: string;
  name: string;
  description?: string;
  isDefault?: boolean;
  ownerEmail?: string;
  createdAt?: string;
  updatedAt?: string;
}

DocFolder

interface DocFolder {
  id: string;
  libraryId: string;
  name: string;
  parentFolderId?: string;
  createdAt?: string;
  updatedAt?: string;
}

DocReference

interface DocReference {
  id: string;
  libraryId: string;
  folderId?: string;
  name: string;
  mimeType?: string;
  size?: number;
  url?: string;
  metadata?: Record<string, unknown>;
  createdAt?: string;
  updatedAt?: string;
}

Response Types

import type {
  LibraryResponse,
  LibrariesListResponse,
  FolderResponse,
  FoldersListResponse,
  DocumentResponse,
  DocumentsListResponse,
} from "@elqnt/docs/api";

// Example response structure
interface DocumentsListResponse {
  references: DocReference[];
  totalCount?: number;
  metadata: ResponseMetadata;
}

Peer Dependencies

  • react ^18.0.0 || ^19.0.0

License

Private - Eloquent Platform