| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Centralized, auto-generated client libraries for the Telegram Bot API, built from the official documentation and published per language. TypeScript is the only target today (@photon-ai/telegram-ts); the monorepo is structured so additional languages (telegram-py, telegram-go, …) can be added without restructuring.
telegram.org docs ──(daily)──▶ specs/telegram-bot-api.openapi.json ──▶ codegen ──▶ build ──▶ npm @gramio/schema-parser OpenAPI 3.0 (source of truth) @hey-api/openapi-ts tsdown @photon-ai/telegram-ts
The npm version mirrors the Telegram Bot API version: ${major}.${minor}.${patch} where major.minor track the Bot API release and patch covers spec/tooling changes within the same version. See scripts/compute-version.ts.
bun install
bun run generate:openapi # refresh specs/ from telegram.org
bun run generate:client # regenerate the TS client from the spec
bun run build # tsdown → dual ESM/CJS + .d.ts
bun run typecheck
bun run test
bun run check # ultracite (Biome) lint/format
bun run diff:surface # preview the API-surface diff (uses git: BASE_REF, default origin/main)
bun run compute:version # preview the next npm versionThe release workflow publishes via npm Trusted Publishing (OIDC) — no NPM_TOKEN. New packages have a chicken-and-egg: a Trusted Publisher can only be attached to a package/scope that exists. Do this once:
cd packages/telegram-ts
npm pkg set version=10.0.0
bun run build
npm publish --access public # creates @photon-ai/telegram-ts@10.0.0If you bootstrapped with a manual publish (step 2, second option), 10.0.0 is already live and the automation takes over on the next spec change — nothing else to run. If you used an org-level Trusted Publisher without a manual publish, re-run the release to cut 10.0.0: gh workflow run release.yaml --ref main.
| Path | Purpose |
|---|---|
| specs/ | Committed OpenAPI source of truth |
| scripts/ | Spec generation, version computation, surface diff |
| packages/telegram-ts/ | The published @photon-ai/telegram-ts package |
| .github/workflows/ | Daily spec update + release automation |
| Back | FazBrowse Home | New Git URL |