@cavuno/board

中文文档
4.64.0发布于 2026/11/06MITTypeScriptESM + CJS零依赖构建来源已验证近 30 天下载 6488

Build custom job boards and careers pages with Cavuno’s TypeScript SDK.

原始使用文档
文档目录11 节
  1. Installation
  2. Install as package
  3. Install via CDN
  4. Quick start
  5. Handle errors
  6. Authentication
  7. Make a request to a custom endpoint
  8. Set up with a coding agent
  9. Reporting problems
  10. Resources
  11. Advertising defaults

Cavuno Board SDK

Build custom job boards and careers pages with Cavuno’s TypeScript SDK.

@cavuno/board is the zero-dependency client for the Cavuno Board API. It runs in browsers, Node.js 20 or newer, and Cloudflare Workers, with TypeScript declarations generated from the API’s OpenAPI contract.

Documentation · Installing · SDK reference · API reference · Source

Installation

Install as package

npm install @cavuno/board

The package includes ESM and CommonJS builds. ESM imports are tree-shakeable, and helper packages such as @cavuno/board/format can be imported separately.

Install via CDN

No package manager or build step? Follow the CDN installation guide for a version-pinned build and its integrity hash. The CDN build is the same SDK downloaded as one file; package imports remain the recommended choice when they are available.

See Installing for every installation option.

Quick start

import { createBoardClient } from '@cavuno/board';

const board = createBoardClient({
  board: 'pk_your_publishable_key',
});

const [context, jobs] = await Promise.all([
  board.context(),
  board.jobs.list({ limit: 20 }),
]);

console.log(context.name);
console.log(jobs.data);

A pk_… key identifies a board and is public by design. Get it from Settings → Developer → SDK in Cavuno. The client connects to https://api.cavuno.com by default.

The client exposes typed namespaces for jobs and search, companies, salaries, blog, board-user authentication, saved jobs, applications, job alerts, messaging, employer workflows, checkout, candidate access, and SEO data.

Handle errors

Every non-2xx response throws a BoardApiError with the API status, code, details, and request ID.

import { BoardApiError, isNotFound } from '@cavuno/board';

try {
  await board.jobs.retrieve('missing-job');
} catch (error) {
  if (isNotFound(error)) {
    // Render your application's not-found state.
  } else if (error instanceof BoardApiError) {
    console.error(error.code, error.requestId);
  }
}

See Handle SDK errors for the complete error contract and guards.

Authentication

  • A pk_… publishable key identifies the board and may be included in browser code.
  • Candidate and employer sessions use board.auth.*. Choose browser storage deliberately; server-rendered applications should keep sessions in their own httpOnly cookies.
  • Operator and admin credentials must never be used with this SDK or exposed to frontend code.

Read Authentication and sessions before adding signed-in workflows.

Make a request to a custom endpoint

For an endpoint without a namespace method, board.client.fetch<T>(path, init) uses the same board base path, headers, bearer token, serialization, and hooks as the rest of the client. Treat the generic response type as your application’s assertion; custom responses are not generated from the public OpenAPI contract.

See board.client.fetch() for options and examples.

Set up with a coding agent

The package includes version-matched Agent Skills for Codex, Claude Code, Cursor, and other compatible coding agents:

npx @cavuno/board setup

Then ask your agent to set up the Cavuno board using the installed cavuno-board-setup skill. See Set up with an agent for the review and verification workflow.

Reporting problems

Coding agents (and people) can report anything in the Board API or SDK that got in the way: a missing capability, unclear documentation, a surprising response or an unhelpful error. Send an Agent Feedback Protocol v0.1 report to POST https://api.cavuno.com/v1/feedback; no credentials are needed, and the discovery document is at https://api.cavuno.com/.well-known/agent-feedback.

curl https://api.cavuno.com/v1/feedback \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{ "type": "missing_capability", "goal": "What you were trying to do", "message": "What got in the way", "agent": { "name": "my-agent", "model": "model-name" } }'

type, goal and message are required. Up to 20 reports every 5 minutes. Never include credentials or personal data.

Resources

MIT © Wollemia

Advertising defaults

board.context() returns ads.enabled, ads.clientId (the AdSense publisher ID), and ads.defaultSlotId (a Google-issued ad unit ID). Render ads only when enabled with a valid publisher and unit. The default reuses the board's existing advertising setup: the enabled jobs:list.footer unit takes priority, otherwise the first enabled valid unit in alphabetical placement-key order is used. No configured unit, disabled advertising, or an invalid publisher yields a null default. Google approval and an existing ad unit are still required.

Your frontend owns ad positions and sizes. Reuse the default across placements, or pass another Google-issued slot ID to an individual ad component; there is no SDK placement registry. Custom units should still respect ads.enabled and the board's consent requirements.

版本与发布记录

@cavuno/board 共发布 130 个版本,首次发布于 2026/06/12;过去 12 个月发布了 130 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
4.64.0latest2026/11/063 天前
4.63.02026/11/063 天前
4.62.02026/11/054 天前
4.61.02026/11/045 天前
4.60.02026/11/045 天前
4.59.12026/11/027 天前

其他发布通道:preview → 1.31.0-preview.0。

关于 @cavuno/board 的常见问题

@cavuno/board 是什么?

Build custom job boards and careers pages with Cavuno’s TypeScript SDK.

如何安装 @cavuno/board?

在项目目录运行 npm install @cavuno/board,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 cavuno-board,可以用 npx cavuno-board 直接运行。

@cavuno/board 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@cavuno/board 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@cavuno/board 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@cavuno/board 可以商用吗?

@cavuno/board 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@cavuno/board 的下载量有多少?

根据 npm 官方下载统计,@cavuno/board 在 2026/10/09 – 2026/11/07 这 30 天内被下载 6,488 次,日均约 216 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cavuno/board 还在维护吗?

最新版本 4.64.0 发布于 2026/11/06(3 天前);至今共发布 130 个版本,其中过去 12 个月发布了 130 个;首次发布于 2026/06/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。