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

v1.0.1

Published

TypeScript type definitions for IndxCloudApi v1.0.2. 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 IndxCloudApi v1.0.2. This package provides complete, strongly-typed interfaces for search queries, filters, boosts, results, and system status based on the official Swagger specification.

Installation

npm install @indxsearch/indx-types

Features

  • Complete TypeScript type definitions for IndxCloudApi v1.0.2
  • 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 v1.0.0) provides types for IndxCloudApi v1.0.2. The types are generated directly from the Swagger specification to ensure accuracy and completeness.

Usage

Basic Query

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

const query: CloudQuery = {
  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: CloudQuery = {
  text: 'search term',
  enableBoost: true,
  boosts: [boost]
};

Coverage Setup

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

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

const query: CloudQuery = {
  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

  • CloudQuery - 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

Result Types

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

Boost Types

  • BoostProxy - Search result boost configuration

Status Types

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

Authentication

  • LoginInfo - Login credentials interface

Enums

SystemState

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

BoostStrength

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

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-intrface monorepo. See the main repository for contribution guidelines.