tgplus 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/LICENSE +52 -0
  2. package/README.md +1512 -0
  3. package/dist/adapters.d.ts +46 -0
  4. package/dist/adapters.js +83 -0
  5. package/dist/adapters.js.map +1 -0
  6. package/dist/bot.d.ts +50 -0
  7. package/dist/bot.js +180 -0
  8. package/dist/bot.js.map +1 -0
  9. package/dist/client.d.ts +1139 -0
  10. package/dist/client.js +529 -0
  11. package/dist/client.js.map +1 -0
  12. package/dist/composer.d.ts +88 -0
  13. package/dist/composer.js +233 -0
  14. package/dist/composer.js.map +1 -0
  15. package/dist/context.d.ts +72 -0
  16. package/dist/context.js +149 -0
  17. package/dist/context.js.map +1 -0
  18. package/dist/decorators.d.ts +33 -0
  19. package/dist/decorators.js +39 -0
  20. package/dist/decorators.js.map +1 -0
  21. package/dist/filters.d.ts +19 -0
  22. package/dist/filters.js +81 -0
  23. package/dist/filters.js.map +1 -0
  24. package/dist/i18n.d.ts +30 -0
  25. package/dist/i18n.js +41 -0
  26. package/dist/i18n.js.map +1 -0
  27. package/dist/index.d.ts +16 -0
  28. package/dist/index.js +95 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/keyboard.d.ts +62 -0
  31. package/dist/keyboard.js +96 -0
  32. package/dist/keyboard.js.map +1 -0
  33. package/dist/rateLimit.d.ts +19 -0
  34. package/dist/rateLimit.js +32 -0
  35. package/dist/rateLimit.js.map +1 -0
  36. package/dist/richMessage.d.ts +111 -0
  37. package/dist/richMessage.js +221 -0
  38. package/dist/richMessage.js.map +1 -0
  39. package/dist/scenes.d.ts +57 -0
  40. package/dist/scenes.js +105 -0
  41. package/dist/scenes.js.map +1 -0
  42. package/dist/session-redis.d.ts +27 -0
  43. package/dist/session-redis.js +36 -0
  44. package/dist/session-redis.js.map +1 -0
  45. package/dist/session-sqlite.d.ts +29 -0
  46. package/dist/session-sqlite.js +34 -0
  47. package/dist/session-sqlite.js.map +1 -0
  48. package/dist/session.d.ts +30 -0
  49. package/dist/session.js +35 -0
  50. package/dist/session.js.map +1 -0
  51. package/dist/types.d.ts +2485 -0
  52. package/dist/types.js +11 -0
  53. package/dist/types.js.map +1 -0
  54. package/package.json +42 -0
package/dist/types.js ADDED
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * tgplus — Telegram Bot API type definitions
4
+ * Tracks Bot API 10.3 (2026-08-24), including Rich Messages, Ephemeral Messages, and Managed Bots.
5
+ * Not every field of every object is written by hand: `[key: string]: any`
6
+ * escape hatches are intentionally avoided here so you get real autocomplete,
7
+ * but `RawApiMethods` in client.ts covers any method not yet given a typed
8
+ * wrapper, so a new Bot API release never blocks you.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "tgplus",
3
+ "version": "1.0.0",
4
+ "description": "A friendlier, fully-typed Telegram Bot API library for Node.js/TypeScript — every method, three ways to write handlers, one bot.",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "type": "commonjs",
8
+ "files": ["dist/**/*", "README.md", "LICENSE"],
9
+ "scripts": {
10
+ "build": "tsc -p tsconfig.json",
11
+ "dev": "tsx examples/basic.ts",
12
+ "test": "npm run build && tsx --test test/*.test.ts && node test/smoke.plain-js.test.js && npm run test:decorators-real",
13
+ "test:decorators-real": "tsc -p test/decorator-smoke/tsconfig.json && node test/decorator-smoke/dist/source.js",
14
+ "docs:api": "node scripts/gen-api-reference.mjs",
15
+ "prepublishOnly": "npm test"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/crysnovax/TGplus.git"
20
+ },
21
+ "homepage": "https://www.npmjs.com/package/tgplus",
22
+ "keywords": ["telegram", "bot", "telegram-bot", "bot-api", "tgplus", "typescript"],
23
+ "author": "crysnovax (original author: @ayo)",
24
+ "license": "SEE LICENSE IN LICENSE",
25
+ "engines": { "node": ">=18" },
26
+ "dependencies": {},
27
+ "peerDependencies": {
28
+ "ioredis": ">=4",
29
+ "better-sqlite3": ">=8",
30
+ "redis": ">=4"
31
+ },
32
+ "peerDependenciesMeta": {
33
+ "ioredis": { "optional": true },
34
+ "better-sqlite3": { "optional": true },
35
+ "redis": { "optional": true }
36
+ },
37
+ "devDependencies": {
38
+ "typescript": "^5.5.4",
39
+ "tsx": "^4.19.0",
40
+ "@types/node": "^20.14.10"
41
+ }
42
+ }