@particle-academy/telegram-js 0.2.0 → 0.3.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.
- package/CHANGELOG.md +35 -0
- package/README.md +34 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,40 @@ The four packages share one version, because they are generated from one
|
|
|
8
8
|
`provider/` definition and a version that meant something different in each
|
|
9
9
|
would be a version nobody could reason about.
|
|
10
10
|
|
|
11
|
+
## [0.3.0] — 2026-08-24
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **The README now says how to SET THIS CONNECTOR UP**, in the package itself.
|
|
16
|
+
|
|
17
|
+
Until now it explained what the four packages are, what they cost and why the
|
|
18
|
+
repo is generated — and said nothing about credentials, scopes, sandboxes or
|
|
19
|
+
operations. Somebody who installed it could not learn from it which credentials
|
|
20
|
+
a connection needs, where a human GETS them, which scopes to request, or what
|
|
21
|
+
the connector can actually do. All of that was already in the definition; the
|
|
22
|
+
one document a consumer reads was the one that omitted everything actionable.
|
|
23
|
+
|
|
24
|
+
The new **Setting it up** section carries:
|
|
25
|
+
|
|
26
|
+
- every credential, with the text saying where the value comes from, whether it
|
|
27
|
+
is **per installation** or **per connected account**, and whether it is secret;
|
|
28
|
+
- the OAuth authorize and token URLs and the exact scopes, verbatim;
|
|
29
|
+
- the access-token lifetime, and where refresh tokens ROTATE, the two things a
|
|
30
|
+
host must not do — retry a failed refresh, or refresh concurrently — because a
|
|
31
|
+
replay revokes the entire grant and nothing in the failure says why;
|
|
32
|
+
- the estate in this provider's own terms, including the cases where a
|
|
33
|
+
successful-looking run reaches nobody, or reaches the real one;
|
|
34
|
+
- every action and trigger with its method, path, inputs, and whether it is safe
|
|
35
|
+
to replay;
|
|
36
|
+
- a trigger's provider-side setup, which nobody can derive from anything else.
|
|
37
|
+
|
|
38
|
+
It is **generated from `provider/manifest.json`**, so it cannot drift from what
|
|
39
|
+
the packages do — which is the point at a few hundred providers, where a
|
|
40
|
+
hand-written setup section is a few hundred documents going quietly stale.
|
|
41
|
+
|
|
42
|
+
No code changed. This release exists because a registry and an installing agent
|
|
43
|
+
read the PUBLISHED artifact, and the artifact carried the old README.
|
|
44
|
+
|
|
11
45
|
## [0.2.0] — 2026-08-24
|
|
12
46
|
|
|
13
47
|
### Changed
|
|
@@ -86,3 +120,4 @@ rules say not to take on a consumer's behalf.
|
|
|
86
120
|
|
|
87
121
|
[0.1.0]: https://github.com/Fancy-Friends/telegram/releases/tag/v0.1.0
|
|
88
122
|
[0.2.0]: https://github.com/Fancy-Friends/telegram/releases/tag/v0.2.0
|
|
123
|
+
[0.3.0]: https://github.com/Fancy-Friends/telegram/releases/tag/v0.3.0
|
package/README.md
CHANGED
|
@@ -27,6 +27,40 @@ dependencies.
|
|
|
27
27
|
subject to the kit's full approval bar, and one per provider is hundreds of
|
|
28
28
|
dependencies nobody is tracking.
|
|
29
29
|
|
|
30
|
+
## Setting it up
|
|
31
|
+
|
|
32
|
+
Everything below is generated from `provider/manifest.json`, so it cannot disagree with what the packages do.
|
|
33
|
+
|
|
34
|
+
### Credentials
|
|
35
|
+
|
|
36
|
+
A Telegram connection holds 1 value.
|
|
37
|
+
|
|
38
|
+
Every value here is `account` scope: one per connected account, not one per installation.
|
|
39
|
+
|
|
40
|
+
| Field | Scope | Secret | Where it comes from |
|
|
41
|
+
|---|---|---|---|
|
|
42
|
+
| **Bot token** | per connected account | **secret** | From @BotFather — 123456:ABC-DEF… . A bot registered in the test environment is a DIFFERENT bot with a different token; the same token does not reach both. |
|
|
43
|
+
|
|
44
|
+
### The estate
|
|
45
|
+
|
|
46
|
+
Telegram has a test estate on the same host, reached with credentials from a SEPARATE test account you register. Selecting sandbox mode uses those credentials.
|
|
47
|
+
|
|
48
|
+
> Telegram's test environment is a genuinely SEPARATE ACCOUNT: you create a new account inside it and register a new bot there, so the sandbox credential is a different token rather than the same one pointed elsewhere. The `/test` path segment is how you reach it; the account is what makes it separate. Flood limits are NOT relaxed there, so it is a place to test, not a place to hammer.
|
|
49
|
+
|
|
50
|
+
## What it can do
|
|
51
|
+
|
|
52
|
+
### Triggers
|
|
53
|
+
|
|
54
|
+
#### `get_updates` — Telegram message
|
|
55
|
+
|
|
56
|
+
Start a run when a Telegram bot receives an update (long polling, not a webhook).
|
|
57
|
+
|
|
58
|
+
Polls Telegram, no more often than every 1 seconds.
|
|
59
|
+
|
|
60
|
+
**You have to set this up with the provider first:**
|
|
61
|
+
|
|
62
|
+
The host polls getUpdates on a schedule and persists the `offset` cursor between calls, passing the last `cursor` back in — Telegram queues nothing once an offset has acknowledged it, so a lost cursor is lost updates. getUpdates and setWebhook are MUTUALLY EXCLUSIVE for one bot: a host running both gets neither.
|
|
63
|
+
|
|
30
64
|
## Run it before you have credentials
|
|
31
65
|
|
|
32
66
|
Every operation ships a **faker**, whether or not Telegram has a sandbox. Set a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-academy/telegram-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Telegram for Node — the service descriptor, its faker, its webhook verification, and one function per operation. Plain HTTP on @particle-academy/fancy-connector-core; no vendor SDK.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@particle-academy/fancy-flow": ">=0.47.1 <2.0",
|
|
55
|
-
"@particle-academy/telegram-ui": "0.
|
|
55
|
+
"@particle-academy/telegram-ui": "0.3.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependenciesMeta": {
|
|
58
58
|
"@particle-academy/fancy-flow": {
|