@effiprint-nomi/auto-nomi-sdk
v0.2.2
Published
Auto Nomi Developer API TypeScript SDK
Readme
@effiprint-nomi/auto-nomi-sdk
Auto Nomi Developer API 的 TypeScript SDK。Developer API 地址由调用方显式传入,例如:
import { AutoNomiClient } from '@effiprint-nomi/auto-nomi-sdk'
const client = new AutoNomiClient({
baseURL: 'https://wh.indexcb.com/developer-api',
accessToken: process.env.AUTO_NOMI_ACCESS_TOKEN,
})
console.log(await client.me())
console.log(await client.listTables())
console.log(await client.describeTable('sla_node_status'))
console.log(await client.queryTable('sla_node_status', {
select: ['id', 'entity_type', 'entity_id', 'sla_status'],
where: {
and: [
{ field: 'entity_type', op: 'in', value: ['order', 'workorder'] },
{ field: 'sla_status', op: 'in', value: [1, 2] },
],
},
limit: 20,
}))Node.js 版本要求为 20 或更高。
SDK 的默认 HTTPS 传输使用 Node 原生 https 并固定 TLS 1.2,证书校验保持开启,
不需要设置 NODE_OPTIONS。表查询只接受
Developer API 管理员已启用并分配给当前账号的资源、字段和操作符,不接受 SQL。候选
资源只来自独立查询账号拥有的列级 SELECT。复杂查询支持受控的
and、or、比较、in、between 和 is_null 条件;服务端最终执行深度、数量、
类型和字段白名单校验。
