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

@silentwitness/typescript-sdk

v0.1.4

Published

The official TypeScript SDK for the Silent Witness API

Downloads

15

Readme

Silent Witness TypeScript SDK

The official TypeScript SDK for the Silent Witness API. This SDK provides a type-safe, modern interface for interacting with Silent Witness services using Connect-RPC.

Features

  • Type-Safe: Full TypeScript support with generated types from Protocol Buffers
  • Modern: Built on Connect-RPC for efficient, modern API communication
  • Minimal Dependencies: Only 4 production dependencies for a small bundle size
  • Secure: Regular security audits and zero known vulnerabilities
  • Easy to Use: Simple, intuitive API design

Installation

Install using your preferred package manager:

# npm
npm install @silentwitness/typescript-sdk

# pnpm
pnpm add @silentwitness/typescript-sdk

# bun
bun add @silentwitness/typescript-sdk

# yarn
yarn add @silentwitness/typescript-sdk

Quick Start

import { createPromiseClient } from "@connectrpc/connect";
import { createConnectTransport } from "@connectrpc/connect-node";
import { CaseService } from "@silentwitness/typescript-sdk/v1/case_connect";

// Create transport with your API endpoint and key
const transport = createConnectTransport({
  baseUrl: "https://core.silentwitness.ai:50051",
  httpVersion: "2",
  interceptors: [
    (next) => async (req) => {
      req.header.set("Authorization", `Bearer ${process.env.SW_API_KEY}`);
      return await next(req);
    },
  ],
});

// Create client for the service
const client = createPromiseClient(CaseService, transport);

// Use the client
const response = await client.createCase({
  name: "My Case",
  description: "Case description",
});

console.log("Created case:", response.case?.id);

Available Services

The SDK provides clients for the following services:

  • CaseService: Manage cases for organizing files and analyses
  • CrashAnalysisService: Perform crash analysis operations
  • FileService: Upload and manage files
  • OrganizationService: Manage organization settings

Usage Examples

Creating a Case

const caseResponse = await client.createCase({
  name: "Vehicle Accident Case #123",
  description: "Analysis for insurance claim",
});

Listing Cases

const cases = await client.listCases({
  pageSize: 10,
  pageToken: "",
});

for (const case of cases.cases) {
  console.log(`Case: ${case.name} (${case.id})`);
}

Working with Files

import { FileService } from "@silentwitness/typescript-sdk/v1/file_connect";

const fileClient = createPromiseClient(FileService, transport);

// Upload a file
const uploadResponse = await fileClient.uploadFile({
  caseId: "case-id-here",
  filename: "accident-report.pdf",
  content: fileBuffer,
});

Authentication

The SDK requires an API key for authentication. Set your API key as an environment variable:

export SW_API_KEY="your-api-key-here"

Security Best Practice: Never hardcode API keys in your source code. Always use environment variables or secure credential management systems.

Security

Security Status

  • Zero known vulnerabilities (as of latest audit)
  • Minimal dependencies: Only 4 production dependencies
  • Trusted sources: All dependencies from @connectrpc and @bufbuild

Running Security Checks

To verify the security status of this SDK, run from the project root directory:

cd /path/to/core
make security-check

This command will:

  • Run vulnerability scans using npm audit
  • Check for outdated dependencies with npm outdated

Reporting Security Issues

If you discover a security vulnerability, please see our Security Policy for responsible disclosure guidelines.

Development

Build

bun run build

Watch Mode

bun run dev

Format Code

bun run format

Lint

bun run lint

Requirements

  • Node.js 18+ or Bun 1.0+
  • TypeScript 5.0+

Dependencies

This SDK maintains a minimal dependency footprint:

Production Dependencies (4)

  • @connectrpc/connect - Connect RPC core
  • @connectrpc/connect-web - Browser support
  • @connectrpc/connect-node - Node.js support
  • @bufbuild/protobuf - Protocol Buffer runtime

All dependencies are from trusted, actively maintained sources.

Support

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


Made with ❤️ by Silent Witness