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

@indxsearch/indx-types

v2.3.0

Published

TypeScript type definitions for Indx v2. Provides complete types for search queries, filters, boosts, results, and system status based on the official Swagger specification.

Readme

@indxsearch/indx-types

TypeScript type definitions for Indx v2.0. This package provides complete, strongly-typed interfaces for search queries, filters, boosts, results, and system status.

Installation

npm install @indxsearch/indx-types

Features

  • Complete TypeScript type definitions for Indx v2.0
  • Zero runtime dependencies (types-only package)
  • Matches official Swagger API specification exactly
  • Full IntelliSense support in VS Code and other IDEs
  • Supports both ESM and CommonJS

Version Compatibility

This package (@indxsearch/indx-types 2.x) provides types for Indx v2.0 (IndxSearchLib v5). The shapes are generated from and verified against the live v5 OpenAPI spec.

Usage

Basic Query

import type { QueryProxy, Result } from '@indxsearch/indx-types';

const query: QueryProxy = {
  text: 'search term',
  maxNumberOfRecordsToReturn: 10,
};

// Use with your API client
const result: Result = await apiClient.search(query);

Filters

import type {
  RangeFilterProxy,
  ValueFilterProxy,
  CombinedFilterProxy
} from '@indxsearch/indx-types';

// Range filter
const rangeFilter: RangeFilterProxy = {
  fieldName: 'price',
  lowerLimit: 10,
  upperLimit: 100
};

// Value filter
const valueFilter: ValueFilterProxy = {
  fieldName: 'category',
  value: 'electronics'
};

// Combined filter
const combinedFilter: CombinedFilterProxy = {
  a: rangeFilter,
  b: valueFilter,
  useAndOperation: true
};

Boosts

import type { BoostProxy, BoostStrength } from '@indxsearch/indx-types';

const boost: BoostProxy = {
  boostStrength: BoostStrength.High,
  filterProxy: {
    hashString: 'filter-hash'
  }
};

const query: QueryProxy = {
  text: 'search term',
  enableBoost: true,
  boosts: [boost]
};

Coverage Setup

import type { CoverageSetup, QueryProxy } from '@indxsearch/indx-types';

const coverageSetup: CoverageSetup = {
  coverWholeQuery: true,
  coverWholeWords: true,
  coverFuzzyWords: true,
  minWordSize: 2,
  levenshteinMaxWordSize: 20,
  truncate: true,
  truncationScore: 255
};

const query: QueryProxy = {
  text: 'search term',
  enableCoverage: true,
  coverageSetup
};

System Status

import type { SystemStatus, SystemState } from '@indxsearch/indx-types';

const status: SystemStatus = await apiClient.getStatus();

if (status.systemState === SystemState.Ready) {
  console.log('System is ready');
  console.log(`Documents indexed: ${status.documentCount}`);
}

API Reference

Types

Query Types

  • QueryProxy - Main search query interface
  • CoverageSetup - Coverage configuration options

Filter Types

  • FilterProxy - Base filter interface
  • RangeFilterProxy - Numeric range filter
  • ValueFilterProxy - Value-based filter
  • CombinedFilterProxy - Combined filter with AND/OR operations
  • UpdateFieldProxy - Field value update payload (fieldName, value)
  • FilterFieldUpdateProxy - Field update applied to documents matching a filter

Result Types

  • Result - Search result interface
  • ScoreEntry - Individual result entry with score

Field Types

  • FieldProxy - Field metadata and indexing flags (searchable, filterable, weight, BM25 params)

Boost Types

  • BoostProxy - Search result boost configuration
  • QueryProxy.fieldBoosts - Per-field boost map (Record<string, number>) on QueryProxy

Vector / Hybrid Types

  • VectorQueryProxy - Embedding vector search query (field, vector, max results, filter)
  • HybridQueryProxy - Combined text + vector search query with alpha blend
  • EmbeddingResultEntry - Single vector match (documentKey, score)

Status Types

  • SystemStatus - System status and health information
  • LicenseInfo - License validation details

Authentication

Auth is bearer-token only — create a token on the Indx Dashboard and pass it as preAuthenticatedToken. The email/password login flow is deprecated and being removed.

  • ChangePasswordRequest - Password change payload (currentPassword, newPassword)
  • LoginInfo / LoginResponse - Deprecated — legacy email/password login types, being removed in favour of token-only auth.

Error Types

  • ParseResult - JSON parse outcome for a token (progress, record index, error info)
  • ProcessError - A processing error (source, message, optional parseError)
  • ProcessErrorCount - A ProcessError paired with its occurrence count

Dataset Types

  • DataSetListDto - A dataset from GET /api/me/datasets: its name, the owning teamName, and the caller's role ("Admin" | "Editor" | "Viewer")

Common Types

  • StringInt32KeyValuePair - { key: string; value: number } pair
  • StringSingleValueTuple - { Item1: string; Item2: number } tuple

Enums

SystemState

  • Hibernated = -1
  • Created = 0
  • Loading = 1
  • Loaded = 2
  • Indexing = 3
  • Ready = 4
  • Error = 255

BoostStrength

  • Low = 1
  • Medium = 2
  • High = 3

JsonErrorType

  • None = 0
  • ControlCharacters = 1
  • TrailingComma = 2
  • UnescapedQuotes = 3
  • UnescapedBackslash = 4
  • StructuralError = 5
  • UnknownError = 6

TypeScript Configuration

This package is designed to work seamlessly with TypeScript. Add it to your tsconfig.json:

{
  "compilerOptions": {
    "types": ["@indxsearch/indx-types"]
  }
}

For monorepo development with path mapping:

{
  "compilerOptions": {
    "paths": {
      "@indxsearch/indx-types": ["../indx-types/src"]
    }
  }
}

Related Packages

Documentation

License

Apache-2.0

Contributing

This package is part of the indx-react monorepo. See the main repository for contribution guidelines.