{"_id":"@claritylift/sdk","name":"@claritylift/sdk","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@claritylift/sdk","version":"0.1.0","description":"Official TypeScript SDK for the ClarityLift public API.","license":"Apache-2.0","author":{"name":"Startvest LLC"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.json","prepublishOnly":"npm run build"},"keywords":["claritylift","team-health","organizational-health-intelligence"],"engines":{"node":">=18"},"repository":{"type":"git","url":"git+https://github.com/Startvest-LLC/claritylift.git","directory":"packages/sdk-node"},"devDependencies":{"typescript":"^5.3.0"},"_id":"@claritylift/sdk@0.1.0","gitHead":"796a3e45104fd0acb0116d719fd4eba01e5d49c3","bugs":{"url":"https://github.com/Startvest-LLC/claritylift/issues"},"homepage":"https://github.com/Startvest-LLC/claritylift#readme","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-ocXMJ56zDdONwJ9f+lkEqFzGgv3DbigVtL8sgYUz6s8gu8Tx+9Kz+kOztBWYZNBhVwrA5Nzo5cabrC1iiWXWmA==","shasum":"40bda08509a534104ffb87d6f9baa2a07515a600","tarball":"https://registry.npmjs.org/@claritylift/sdk/-/sdk-0.1.0.tgz","fileCount":18,"unpackedSize":55036,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA0qo8J5FfCiY/LvA2xjo7B6UEXHlWVNwzph5SfxbegOAiEA7tskmhEp9BUIRgZeRC+Ie96+hMV53Riy9k1rIhcUacU="}]},"_npmUser":{"name":"startvest","email":"tom@startvest.ai"},"directories":{},"maintainers":[{"name":"startvest","email":"tom@startvest.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.1.0_1777230303633_0.44044640583457295"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-26T19:05:03.552Z","0.1.0":"2026-04-26T19:05:03.850Z","modified":"2026-04-26T19:05:04.045Z"},"maintainers":[{"name":"startvest","email":"tom@startvest.ai"}],"description":"Official TypeScript SDK for the ClarityLift public API.","homepage":"https://github.com/Startvest-LLC/claritylift#readme","keywords":["claritylift","team-health","organizational-health-intelligence"],"repository":{"type":"git","url":"git+https://github.com/Startvest-LLC/claritylift.git","directory":"packages/sdk-node"},"author":{"name":"Startvest LLC"},"bugs":{"url":"https://github.com/Startvest-LLC/claritylift/issues"},"license":"Apache-2.0","readme":"# @claritylift/sdk\n\nOfficial TypeScript SDK for the [ClarityLift](https://claritylift.ai) public API.\n\n## Install\n\n```bash\nnpm install @claritylift/sdk\n```\n\n## Quickstart\n\n```ts\nimport { ClarityLiftClient } from '@claritylift/sdk';\n\nconst client = new ClarityLiftClient({\n  token: process.env.CLARITYLIFT_API_TOKEN!, // clift_<base64url>\n});\n\nconst { data: teams } = await client.teams.list();\nfor (const team of teams) {\n  if (team.kind === 'scored') {\n    console.log(team.name, team.score, team.deviationLabel);\n  }\n}\n\nconst trends = await client.topics.trending({ window: '30d' });\n\nconst topic = await client.topics.query({\n  q: 'benefits plan',\n  window: '30d',\n});\nif (topic.belowFloor) {\n  console.log('Insufficient volume for this query.');\n} else {\n  console.log(topic.synthesis);\n}\n```\n\n## Scopes\n\nCreate tokens at `/dashboard/settings/api-tokens`. Minimum scope per call:\n\n| Method | Scope |\n|---|---|\n| `teams.list / signals / scoresTimeseries` | `read:teams` / `read:signals` / `read:scores` |\n| `topics.trending / query` | `read:topics` |\n| `interventions.create` | `write:interventions` |\n| `goals.create / update / archive` | `write:goals` |\n| `webhooks.*` | `write:webhooks` |\n\n## Idempotency\n\nEvery write accepts an optional `idempotencyKey`:\n\n```ts\nawait client.interventions.create(\n  { signalId, notes: '1:1 scheduled', confidence: 'medium' },\n  { idempotencyKey: 'action-2026-04-22-abc' },\n);\n```\n\nReplays within 24 hours return the original response.\n\n## Rate limits\n\nPer-token default: 600 requests/hour. On 429 the client waits for the\n`Retry-After` seconds and retries once. Subsequent 429s throw\n`ApiError` — let the caller back off.\n\n## Error handling\n\n```ts\nimport type { ApiError } from '@claritylift/sdk';\n\ntry {\n  await client.goals.create({ name: 'Ship Q2 rollout' });\n} catch (err) {\n  const e = err as ApiError;\n  console.error(e.status, e.code, e.message);\n}\n```\n\n## Spec reference\n\nThe OpenAPI definition lives at\n[`/api/public/v1/openapi.json`](https://claritylift-app.azurewebsites.net/api/public/v1/openapi.json).\nThis SDK tracks it but does not generate from it — see the\n`ladder-gap-closeout.md` spec for the hand-rolled rationale.\n","readmeFilename":"README.md","_rev":"1-2decfd88612fc8a63052818d3de58925"}