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

@seerapi/client

v103.2.3

Published

SeerAPI TypeScript SDK, generated with @hey-api/openapi-ts

Downloads

211

Readme

SeerAPI TypeScript SDK

这是 SeerAPI 的官方 TypeScript SDK,由 @hey-api/openapi-ts 自动生成。它提供了与 SeerAPI 交互的类型安全客户端,并集成了 Drizzle ORM 以支持本地 SQLite 数据库操作。

特性

  • 全自动生成: 无论是 API 客户端还是数据库 Schema,均通过自动化工具生成,确保与服务端定义高度一致。
  • 类型安全: 完全基于 OpenAPI 规范生成的 TypeScript 类型定义。
  • 多种客户端支持: 内置对 Axios 的支持。
  • 本地数据库集成: 使用 Drizzle ORM 和 LibSQL (SQLite) 管理本地数据,Schema 自动同步。
  • 自动转换: 支持日期等复杂类型的自动转换。

安装

npm install @seerapi/client
# 或者
yarn add @seerapi/client
# 或者
pnpm add @seerapi/client

快速开始

API 客户端使用

import { createClient } from '@seerapi/client';

const client = createClient({
  baseURL: 'https://api.seerapi.com', // 替换为实际 API 地址
});

// 使用生成的 SDK 方法
async function fetchData() {
  try {
    const response = await client.getSomeEndpoint();
    console.log(response.data);
  } catch (error) {
    console.error('Error fetching data:', error);
  }
}

数据库操作 (Drizzle ORM)

项目内置了自动生成的 SQLite 数据库 Schema:

import { db } from '@seerapi/client/db';
import { pet, skill } from '@seerapi/client/db/schema';

async function queryDb() {
  // 所有的表定义均根据 SeerAPI 的 SQLite 数据库自动生成
  const allPets = await db.select().from(pet).limit(10).all();
  console.log(allPets);
}

许可证

MIT

相关链接