@xbibzlibrary/telebibz 0.1.3 → 0.1.5

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 (40) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/CODE_OF_CONDUCT.md +37 -0
  3. package/CONTRIBUTING.md +54 -0
  4. package/CONTRIBUTION_RULES.md +41 -0
  5. package/GOVERNANCE.md +47 -0
  6. package/NOTICE.md +7 -0
  7. package/README.id.md +16 -2
  8. package/README.md +15 -3
  9. package/README.zh-CN.md +16 -2
  10. package/SECURITY.md +36 -4
  11. package/SUPPORT.md +30 -0
  12. package/dist/src/approval/approval.d.ts.map +1 -1
  13. package/dist/src/approval/approval.js +3 -1
  14. package/dist/src/approval/approval.js.map +1 -1
  15. package/dist/src/branding/branding.d.ts +17 -0
  16. package/dist/src/branding/branding.d.ts.map +1 -0
  17. package/dist/src/branding/branding.js +35 -0
  18. package/dist/src/branding/branding.js.map +1 -0
  19. package/dist/src/core/bot.d.ts +3 -0
  20. package/dist/src/core/bot.d.ts.map +1 -1
  21. package/dist/src/core/bot.js +15 -3
  22. package/dist/src/core/bot.js.map +1 -1
  23. package/dist/src/index.d.ts +2 -0
  24. package/dist/src/index.d.ts.map +1 -1
  25. package/dist/src/index.js +2 -0
  26. package/dist/src/index.js.map +1 -1
  27. package/dist/src/observability/logger.d.ts +45 -0
  28. package/dist/src/observability/logger.d.ts.map +1 -0
  29. package/dist/src/observability/logger.js +111 -0
  30. package/dist/src/observability/logger.js.map +1 -0
  31. package/dist-cjs/src/approval/approval.js +3 -1
  32. package/dist-cjs/src/branding/branding.js +39 -0
  33. package/dist-cjs/src/core/bot.js +15 -3
  34. package/dist-cjs/src/index.js +2 -0
  35. package/dist-cjs/src/observability/logger.js +117 -0
  36. package/docs/API.id.md +4 -4
  37. package/docs/API.md +4 -4
  38. package/docs/API.zh-CN.md +4 -4
  39. package/docs/README.md +9 -1
  40. package/package.json +8 -2
package/docs/API.id.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  [English](API.md) · **Bahasa Indonesia** · [简体中文](API.zh-CN.md)
4
4
 
5
- ![telebibz overview](../assets/telebibz-readme-preview.png)
5
+ ![telebibz overview](https://raw.githubusercontent.com/XbibzOfficial777/telebibz/main/assets/telebibz-readme-preview.png)
6
6
 
7
- Dokumen ini adalah referensi API untuk `@xbibzlibrary/telebibz@0.1.2`. Seluruh signature dan perilaku yang dijelaskan di sini dipetakan dari source TypeScript yang diekspor package. Jika suatu tipe Telegram belum memiliki pemetaan parameter/result khusus, package tetap menyediakan akses runtime melalui API dinamis, tetapi tipe parameternya masih generik.
7
+ Dokumen ini adalah referensi API untuk `@xbibzlibrary/telebibz@0.1.4`. Seluruh signature dan perilaku yang dijelaskan di sini dipetakan dari source TypeScript yang diekspor package. Jika suatu tipe Telegram belum memiliki pemetaan parameter/result khusus, package tetap menyediakan akses runtime melalui API dinamis, tetapi tipe parameternya masih generik.
8
8
 
9
- > **Status implementasi.** Dokumentasi ini menjelaskan kemampuan yang benar-benar tersedia pada rilis saat ini. `MemoryStorage`, `MemoryCache`, `TaskQueue`, dan `Scheduler` adalah primitif in-memory; adapter terdistribusi, persistensi eksternal, dan pengetikan skema penuh untuk seluruh Telegram Bot API belum termasuk dalam rilis ini.
9
+ > **Status implementasi.** Dokumentasi ini menjelaskan kemampuan yang tersedia pada rilis saat ini. `JsonFileStorage`, storage Redis/SQL/Mongo berbasis driver, session/conversation berbasis Storage, cron lima field lengkap, `MenuController`, approval message branded, structured logging dengan redaction, validasi Web App, `PaymentsClient`, dan declaration `TelegramTypes` sudah tersedia. Core method map tetap khusus untuk inferensi request/result tertentu, sedangkan `api.raw()` tersedia untuk method Telegram berikutnya.
10
10
 
11
11
  ## Instalasi dan import
12
12
 
@@ -1780,7 +1780,7 @@ const bot = new Bot({ token: process.env.TELEGRAM_BOT_TOKEN!, session });
1780
1780
 
1781
1781
  ### Namespace deklarasi Telegram lengkap
1782
1782
 
1783
- Package memvendorkan declaration Telegram berlisensi MIT dan mengeksposnya sebagai type-only export melalui `TelegramTypes`, serta alias seperti `TelegramUser`, `TelegramMessage`, `TelegramUpdate`, dan `TelegramApiMethods`. Declaration ini mencakup surface object, union, enum, dan method tanpa runtime dependency tambahan. Map method inti telebibz tetap khusus untuk method yang memiliki pemetaan parameter/result langsung.
1783
+ Package memvendorkan declaration Telegram berlisensi MIT dan mengeksposnya sebagai type-only export melalui `TelegramTypes`, serta alias seperti `TelegramUser`, `TelegramMessage`, `TelegramUpdate`, dan `TelegramApiMethods`. Approval notification memakai kotak Unicode berwarna dengan attribution `Library Bot Telegram By @xbibzofficial`. `Logger` menghasilkan JSON terstruktur dengan level, redaction, ringkasan update, dan opt-in untuk isi pesan user/callback. Declaration ini mencakup surface object, union, enum, dan method tanpa runtime dependency tambahan. Map method inti telebibz tetap khusus untuk method yang memiliki pemetaan parameter/result langsung.
1784
1784
 
1785
1785
  ---
1786
1786
 
package/docs/API.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # telebibz API Reference — English
2
2
  [English](API.md) · [Bahasa Indonesia](API.id.md) · [简体中文](API.zh-CN.md)
3
3
 
4
- ![telebibz overview](../assets/telebibz-readme-preview.png)
4
+ ![telebibz overview](https://raw.githubusercontent.com/XbibzOfficial777/telebibz/main/assets/telebibz-readme-preview.png)
5
5
 
6
- This document is the API reference for `@xbibzlibrary/telebibz@0.1.2`. All signatures and behaviors described here are mapped from the package's exported TypeScript source. If a Telegram type does not have a specific parameter/result mapping, the package still provides runtime access via a dynamic API, but the parameter types remain generic.
6
+ This document is the API reference for `@xbibzlibrary/telebibz@0.1.4`. All signatures and behaviors described here are mapped from the package's exported TypeScript source. If a Telegram type does not have a specific parameter/result mapping, the package still provides runtime access via a dynamic API, but the parameter types remain generic.
7
7
 
8
- > **Implementation status.** This documentation describes the capabilities that are actually available in the current release. `MemoryStorage`, `MemoryCache`, `TaskQueue`, and `Scheduler` are in-memory primitives; distributed adapters, external persistence, and full schema typing for the entire Telegram Bot API are not included in this release.
8
+ > **Implementation status.** This documentation describes the capabilities available in the current release. `JsonFileStorage`, driver-based Redis/SQL/Mongo storage, storage-backed sessions/conversations, full five-field cron, `MenuController`, branded approval messages, structured redacted logging, Web App validation, PaymentsClient, and vendored `TelegramTypes` declarations are included. The core method map remains specialized for selected request/result inference, while `api.raw()` remains available for future Telegram methods.
9
9
 
10
10
  ## Installation and import
11
11
 
@@ -1780,7 +1780,7 @@ const bot = new Bot({ token: process.env.TELEGRAM_BOT_TOKEN!, session });
1780
1780
 
1781
1781
  ### Complete Telegram declaration namespace
1782
1782
 
1783
- The package vendors MIT-licensed Telegram declarations and exposes them as type-only exports through `TelegramTypes`, plus aliases such as `TelegramUser`, `TelegramMessage`, `TelegramUpdate`, and `TelegramApiMethods`. These declarations cover the complete object, union, enum, and method declaration surface without adding a runtime dependency. Core telebibz method maps remain specialized for the methods with direct request/result mappings.
1783
+ The package vendors MIT-licensed Telegram declarations and exposes them as type-only exports through `TelegramTypes`, plus aliases such as `TelegramUser`, `TelegramMessage`, `TelegramUpdate`, and `TelegramApiMethods`. Approval notifications use a colored Unicode box and the attribution `Library Bot Telegram By @xbibzofficial`. `Logger` emits structured JSON entries with configurable levels, redaction, update summaries, and opt-in user message/callback content. These declarations cover the complete object, union, enum, and method declaration surface without adding a runtime dependency. Core telebibz method maps remain specialized for the methods with direct request/result mappings.
1784
1784
 
1785
1785
  ---
1786
1786
  ## 19. Compatibility and limitations to be aware of
package/docs/API.zh-CN.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  [English](API.md) · [Bahasa Indonesia](API.id.md) · **简体中文**
4
4
 
5
- ![telebibz 概览](../assets/telebibz-readme-preview.png)
5
+ ![telebibz 概览](https://raw.githubusercontent.com/XbibzOfficial777/telebibz/main/assets/telebibz-readme-preview.png)
6
6
 
7
- 本文件是 `@xbibzlibrary/telebibz@0.1.2` 的 API 参考。此处描述的所有签名和行为均映射自该包导出的 TypeScript 源代码。如果某个 Telegram 类型尚未有特定的参数/结果映射,该包仍通过动态 API 提供运行时访问,但其参数类型仍为通用类型。
7
+ 本文件是 `@xbibzlibrary/telebibz@0.1.4` 的 API 参考。此处描述的所有签名和行为均映射自该包导出的 TypeScript 源代码。如果某个 Telegram 类型尚未有特定的参数/结果映射,该包仍通过动态 API 提供运行时访问,但其参数类型仍为通用类型。
8
8
 
9
- > **实现状态。** 本文档说明了当前发布版本中实际可用的功能。`MemoryStorage`、`MemoryCache`、`TaskQueue` 和 `Scheduler` 是内存原语;分布式适配器、外部持久化,以及针对整个 Telegram Bot API 的完整模式类型尚未包含在本次发布中。
9
+ > **实现状态。** 本文档说明当前版本中可用的功能。`JsonFileStorage`、基于 driver 的 Redis/SQL/Mongo storage、基于 Storage 的 session/conversation、完整五字段 cron、`MenuController`、带 branding 的 approval message、带 redaction 的 structured logging、Web App 验证、`PaymentsClient` 和 `TelegramTypes` declaration 均已提供。core method map 仍主要为特定 request/result inference 提供类型,未来 Telegram method 可通过 `api.raw()` 访问。
10
10
 
11
11
  ## 安装与导入
12
12
 
@@ -1774,7 +1774,7 @@ const bot = new Bot({ token: process.env.TELEGRAM_BOT_TOKEN!, session });
1774
1774
 
1775
1775
  ### 完整 Telegram declaration namespace
1776
1776
 
1777
- Package 内置 MIT 许可的 Telegram declaration,并通过 type-only export 暴露 `TelegramTypes`,同时提供 `TelegramUser`、`TelegramMessage`、`TelegramUpdate` 和 `TelegramApiMethods` 等 alias。这些 declaration 覆盖完整的 object、union、enum 和 method surface,不增加 runtime dependency。telebibz core method map 仍专门为具有直接参数/结果映射的 method 提供类型。
1777
+ Package 内置 MIT 许可的 Telegram declaration,并通过 type-only export 暴露 `TelegramTypes`,同时提供 `TelegramUser`、`TelegramMessage`、`TelegramUpdate` 和 `TelegramApiMethods` 等 alias。Approval notification 使用带颜色的 Unicode box,并包含 attribution `Library Bot Telegram By @xbibzofficial`。`Logger` 输出带 level、redaction、update summary 的结构化 JSON,并支持 opt-in 记录 user message/callback content。这些 declaration 覆盖完整的 object、union、enum 和 method surface,不增加 runtime dependency。telebibz core method map 仍专门为具有直接参数/结果映射的 method 提供类型。
1778
1778
 
1779
1779
  ---
1780
1780
 
package/docs/README.md CHANGED
@@ -8,7 +8,7 @@ The default documentation language is **English**. Translated README and API ref
8
8
  | Bahasa Indonesia | [`README.id.md`](../README.id.md) | [`API.id.md`](API.id.md) |
9
9
  | 简体中文 | [`README.zh-CN.md`](../README.zh-CN.md) | [`API.zh-CN.md`](API.zh-CN.md) |
10
10
 
11
- ![telebibz overview](../assets/telebibz-readme-preview.png)
11
+ ![telebibz overview](https://raw.githubusercontent.com/XbibzOfficial777/telebibz/main/assets/telebibz-readme-preview.png)
12
12
 
13
13
  The API references are organized by lifecycle: bot startup and shutdown, API client and transport, update routing, middleware and context, state/session, interaction UI, background work, deployment, testing, and migration boundaries.
14
14
 
@@ -26,6 +26,14 @@ The API references are organized by lifecycle: bot startup and shutdown, API cli
26
26
  | Mini Apps, payments, business features | Web App signature validation and PaymentsClient wrappers available; UI is application-owned |
27
27
  | Testing and security | Unit, integration, type-level, gated E2E, CI, and security policy available |
28
28
  | Deployment and migration | Release automation is documented in `RELEASE_AUTOMATION.md` |
29
+ | Governance and community | `CODE_OF_CONDUCT.md`, `GOVERNANCE.md`, `CONTRIBUTING.md`, and `CONTRIBUTION_RULES.md` |
30
+ | Security and support | `SECURITY.md` and `SUPPORT.md` |
31
+ | Third-party notices | `NOTICE.md` and `LICENSE` |
32
+ | GitHub contribution templates | Bug, feature, documentation, question/support, security notice, and pull request templates under `.github/` |
33
+
34
+ ## GitHub templates
35
+
36
+ Issue forms are available for bug reports, feature requests, documentation problems, and support questions. A security notice template redirects reporters to the private process in `SECURITY.md`; vulnerabilities must not be disclosed in public issues. Pull requests use `.github/PULL_REQUEST_TEMPLATE/pull_request_template.md` to require tests, documentation, compatibility, and security checks.
29
37
 
30
38
  ## Documentation principle
31
39
 
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@xbibzlibrary/telebibz",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Production-grade, strongly typed Telegram Bot API SDK and framework for Node.js and TypeScript.",
5
5
  "type": "module",
6
6
  "private": false,
7
7
  "publishConfig": {
8
8
  "access": "public",
9
- "provenance": true
9
+ "provenance": false
10
10
  },
11
11
  "license": "MIT",
12
12
  "repository": {
@@ -75,6 +75,12 @@
75
75
  "LICENSE",
76
76
  "CHANGELOG.md",
77
77
  "SECURITY.md",
78
+ "CODE_OF_CONDUCT.md",
79
+ "CONTRIBUTING.md",
80
+ "CONTRIBUTION_RULES.md",
81
+ "GOVERNANCE.md",
82
+ "SUPPORT.md",
83
+ "NOTICE.md",
78
84
  "APPROVAL_FEATURE.md",
79
85
  "RELEASE_POLICY.md",
80
86
  "RELEASE_AUTOMATION.md",