@effect-ak/tg-bot-api
v1.9.0
Published
TypeScript types for Telegram Bot Api and Telegram Mini Apps
Maintainers
Readme
@effect-ak/tg-bot-api
Complete TypeScript types for Telegram Bot API and Mini Apps, auto-generated from official documentation.
Installation
npm install @effect-ak/tg-bot-apiFeatures
- Always Up-to-Date — generated from official Telegram docs via code generator
- WebApp Types — types for
Telegram.WebAppincluded - Smart Type Mapping —
Integer→number,True→boolean, enums → union literals, etc.
Documentation
Full documentation, codegen internals, and API reference: tg-bot-sdk.website
Updating Telegram Bot API Types
Use this checklist when a new Telegram Bot API version is released.
Project context
- Monorepo with pnpm workspaces.
packages/api/contains auto-generated TypeScript types from official Telegram Bot API HTML docs.- Codegen scrapes https://core.telegram.org/bots/api and https://core.telegram.org/bots/webapps.
- Downloaded HTML is cached in
packages/api/input/api.htmlandpackages/api/input/webapp.html. - Version files are
packages/api/bot-api-version.jsonandpackages/api/mini-app-version.json. - Stats are stored in
docs/src/data/bot-api-stats.json. - Badges are updated in
readme.mdandpackages/api/readme.md.
1. Delete cached HTML
Remove both cached files so codegen downloads fresh docs:
rm -f packages/api/input/api.html packages/api/input/webapp.html2. Run codegen
cd packages/api && pnpm run genThis will:
- Download fresh HTML from Telegram.
- Parse and generate TypeScript types into
src/specification/. - Update version files and stats automatically.
3. Check what changed
git diff --statLook at:
packages/api/bot-api-version.json- did the version number change?packages/api/src/specification/types.ts- new or changed interfaces.packages/api/src/specification/api.ts- new or changed methods.docs/src/data/bot-api-stats.json- updated type and method counts.
4. Analyze the changelog
Read packages/api/input/api.html and search for the changelog section near the top. Look for the latest version entry and summarize:
- New types added.
- New methods added.
- New or changed fields on existing types.
- Any breaking changes, such as removed or renamed fields.
5. Verify everything works
Run in sequence:
pnpm build
pnpm typecheck
pnpm testAll commands must pass with zero errors.
6. Report
Output a summary with:
- Previous version -> new version.
- Number of new types and methods.
- Key changes, including new types, methods, and fields.
- Build, typecheck, and test status.
- Reminder to create a changeset. A minor changeset on
@effect-ak/tg-bot-apiis enough becausefixedversioning in.changeset/config.jsonwill bump all three packages together.
License
MIT
