Node.js SDK
SOVR Node.js SDK 提供了完整的 TypeScript/JavaScript 客户端库。
安装
bash
npm install @sovr/sdk
# 或
pnpm add @sovr/sdk快速开始
typescript
import { SOVRClient } from '@sovr/sdk';
const client = new SOVRClient({
baseUrl: 'https://api.sovr.ai',
apiKey: 'your-api-key'
});
// 创建决策
const decision = await client.createDecision({
action: 'send_email',
context: { to: 'user@example.com' },
riskLevel: 'low'
});文档
- SOVRClient - 主客户端类
- TrustBundle - 信任包管理
- Decision - 决策管理
- 错误处理 - 错误和异常