TypeScript SDK for twitterapi.io, generated from the OpenAPI spec using Hey API.
npm install twitterapiioRequires Node.js >= 22.13.0.
Generate the SDK from the pinned OpenAPI spec:
npm run generateBuild distributable files (requires generate to have been run first):
npm run buildPrepare package for publishing (runs generation + build):
npm packThe spec is pinned to openapi.json in the repo for reproducible builds. To pull the latest version:
npm run refresh-specThen re-run npm run generate and review the diff before committing.
Publishing is fully automated via GitHub Actions on v* tag pushes. Do not run npm publish locally.
npm version patch # bumps package.json, commits, creates tag e.g. v0.0.2
git push origin main --follow-tags # pushes commit + tag → triggers publish.ymlThe workflow runs npm ci → generate → build → test → verifies the tag matches package.json version → npm publish --provenance --access public, authenticated via OIDC Trusted Publishing (no long-lived secrets required).