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

@inai-dev/types

v1.7.0

Published

TypeScript types for the InAI Auth SDK

Downloads

1,111

Readme

@inai-dev/types

TypeScript type definitions for the InAI Auth SDK. This package contains all shared interfaces and types used across the SDK.

Installation

npm install @inai-dev/types

Note: You typically don't need to install this directly. It's included as a dependency of all other @inai-dev/* packages.

Auth Types

import type {
  AuthObject,            // Base auth object (userId, tenantId, orgId, has(), getToken())
  ServerAuthObject,      // Extends AuthObject with protect() and redirectToSignIn()
  ProtectedAuthObject,   // AuthObject with non-null userId (after protect())
  JWTClaims,             // Decoded JWT payload (sub, tenant_id, roles, permissions, ...)
} from "@inai-dev/types";

Resource Types

import type {
  UserResource,          // App user (id, email, firstName, lastName, roles, ...)
  PlatformUserResource,  // Platform admin user
  SessionResource,       // User session (id, userId, tenantId, expiresAt)
  OrganizationResource,  // Organization (id, name, slug, metadata)
  ApplicationResource,   // Application (id, name, slug, environments)
  EnvironmentResource,   // Environment (id, name, publishableKey)
  ApplicationStats,      // App statistics (totalUsers, activeSessions, ...)
  ApiKeyResource,        // API key (id, name, keyPrefix, keyType)
  PaginatedResult,       // Paginated response wrapper (data, total, page, limit)
} from "@inai-dev/types";

Config Types

import type {
  InAIAuthConfig,        // Client config (publishableKey, tenantId, jwksUrl)
  InAIMiddlewareConfig,  // Middleware config (publicRoutes, signInUrl, beforeAuth, afterAuth)
  InAIAuthSDKConfig,     // SDK-wide config (signInUrl, signUpUrl, afterSignInUrl, publishableKey)
} from "@inai-dev/types";

Result Types

import type {
  LoginParams,           // { email, password }
  LoginResult,           // { access_token?, mfa_required?, mfa_token? }
  MFAChallengeParams,    // { mfa_token, code }
  TokenPair,             // { access_token, refresh_token, token_type, expires_in }
  SignInResult,           // { status, mfa_token?, user?, error? }
  SignUpResult,           // { status, user?, error? }
  InAIAuthErrorBody,     // { code, detail, field? }
} from "@inai-dev/types";

Exports Reference

| Type | Category | Description | |---|---|---| | AuthObject | Auth | Base authentication state | | ServerAuthObject | Auth | Server-side auth with protect/redirect | | ProtectedAuthObject | Auth | Guaranteed authenticated state | | JWTClaims | Auth | Decoded JWT token claims | | UserResource | Resource | App user data | | PlatformUserResource | Resource | Platform admin data | | SessionResource | Resource | Session data | | OrganizationResource | Resource | Organization data | | ApplicationResource | Resource | Application data | | EnvironmentResource | Resource | Environment data | | ApplicationStats | Resource | Application statistics | | ApiKeyResource | Resource | API key data | | PaginatedResult<T> | Resource | Paginated response | | InAIAuthConfig | Config | Client configuration (publishableKey, apiUrl, tenantId, jwksUrl) | | InAIMiddlewareConfig | Config | Middleware configuration | | InAIAuthSDKConfig | Config | SDK global configuration | | LoginParams | Result | Login request parameters | | LoginResult | Result | Login response | | MFAChallengeParams | Result | MFA challenge parameters | | TokenPair | Result | Token pair response | | SignInResult | Result | Sign-in flow result | | SignUpResult | Result | Sign-up flow result | | InAIAuthErrorBody | Result | Error response body |

Questions & Support

Visit https://inai.dev for documentation, guides, and support.

License

MIT