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

@sinequa/atomic

v0.0.134

Published

<div align="center">

Readme

@sinequa/atomic

npm license TypeScript

A comprehensive TypeScript library for building modern search applications with Sinequa

DocumentationChangelogAPI Reference


📦 Installation

npm install @sinequa/atomic

🚀 Quick Start

import { 
  fetchQuery, 
  fetchAggregation, 
  isAuthenticated, 
  login 
} from '@sinequa/atomic';

// Check authentication status
if (!isAuthenticated()) {
  await login({ username: 'user', password: 'pass' });
}

// Perform a search query
const results = await fetchQuery({ 
  query: 'example search',
  pageSize: 10 
});

// Fetch aggregation data
const aggregations = await fetchAggregation({
  aggregation: 'category',
  query: 'example'
});

✨ Key Features

🔐 Authentication & Security

  • OAuth & SAML Support: Seamless integration with enterprise authentication providers
  • JWT Token Management: Automatic token handling and refresh
  • CSRF Protection: Built-in security measures
  • Credential-Based Authentication: Direct username/password authentication
  • User Session Management: Complete login/logout flow with user impersonation controls

🌐 Web API Integration

  • Type-Safe API Calls: Strongly-typed interfaces for all Sinequa APIs
  • Comprehensive Endpoints: Support for search, aggregations, datasets, preview, and more
  • Error Handling: Robust error management with fallback mechanisms
  • Response Processing: Automatic parsing and validation of API responses

🛠️ Utilities & Helpers

  • Metadata Processing: Parse and extract metadata with value pairs
  • Column Management: Generate engine-specific column configurations
  • Date Utilities: Advanced date formatting and manipulation
  • Query Parameters: URL query string handling
  • Logger: Structured logging with multiple levels
  • Notification System: User notification management

📊 Data Management

  • Aggregation Handling: Visual selection tracking and data aggregation
  • Filter Configuration: Configurable included/excluded filters
  • Type Definitions: Complete TypeScript types for all data structures
  • Password Management: Expired and forgotten password flows

📚 Core Modules

Authentication

import { 
  login, 
  logout, 
  isAuthenticated,
  getToken,
  setToken,
  tryOAuthAuthentication,
  trySAMLAuthentication 
} from '@sinequa/atomic';

Web APIs

import { 
  fetchApp,
  fetchQuery,
  fetchAggregation,
  fetchDatasets,
  fetchPreview,
  fetchPrincipal,
  fetchSimilarDocuments,
  fetchSponsoredLinks,
  fetchSuggest,
  fetchUserSettings
} from '@sinequa/atomic';

Helpers

import { 
  getMetadata,
  getMetadataWithValues,
  makeColumn,
  resolveToColumnName,
  escapeExpr,
  guid,
  isObject,
  isString
} from '@sinequa/atomic';

Utilities

import { 
  bisect,
  formatDate,
  parseDate,
  logger,
  queryParamsToString,
  syslang
} from '@sinequa/atomic';

🔄 Recent Updates (v0.0.125 - v0.0.129)

🎉 New Features

  • ✅ Credential-based authentication with automatic SSO bypass
  • ✅ Enhanced metadata parsing with comma-separated string support
  • ✅ Forgotten password and expired password handling
  • ✅ Visual selection tracking for aggregation items
  • ✅ Configurable filter bar with inclusion/exclusion options

🔒 Security Enhancements

  • 🛡️ Fixed user impersonation vulnerability during credential-based login
  • 🔐 JWT tokens now correctly reflect actual user identity

🐛 Bug Fixes & Improvements

  • ⚡ Enhanced error handling with fallback message fields
  • 📝 Improved type safety across all modules
  • 🧪 Added 560+ new test cases for better reliability
  • 🗂️ Reorganized test structure for better maintainability

📖 Documentation

  • 📚 Comprehensive JSDoc examples for all major functions
  • 📝 Enhanced inline code documentation
  • 🔗 API reference documentation

View Full Changelog

🧪 Testing

This package includes comprehensive test coverage with 560+ test cases:

npm test

Test coverage includes:

  • Authentication flows (OAuth, SAML, credentials)
  • API endpoint integration
  • Error handling scenarios
  • Metadata parsing and processing
  • Date utilities and formatters

📖 Documentation

🤝 Contributing

We welcome contributions! Please ensure:

  • ✅ All tests pass
  • ✅ Code follows the existing style (Biome linting)
  • ✅ New features include tests and documentation
  • ✅ Commit messages follow conventional commits

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


Built with ❤️ for the Sinequa Community

DocumentationReport BugRequest Feature