{"_id":"@aezakmiproject/telemt-sdk","_rev":"4-d50dc770e4486df27027bacff43c834d","name":"@aezakmiproject/telemt-sdk","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@aezakmiproject/telemt-sdk","version":"1.0.0","keywords":["aezakmi","aezakmiproject","telemt","sdk","mtproto","telegram","proxy","typescript"],"author":{"name":"ABRAMOVI4CH"},"license":"ISC","_id":"@aezakmiproject/telemt-sdk@1.0.0","maintainers":[{"name":"abramovi4ch","email":"winvertg@gmail.com"}],"homepage":"https://www.npmjs.com/package/@aezakmiproject/telemt-sdk","dist":{"shasum":"6f9e53cb3ddc623895d37411efcf90956d9148c2","tarball":"https://registry.npmjs.org/@aezakmiproject/telemt-sdk/-/telemt-sdk-1.0.0.tgz","fileCount":290,"integrity":"sha512-dpUCnj9fQBevGLhdlwCoJ2FHoGxE5k71Bpa6SOf83FqJu1fZS7wI7Oo0IwLhktegOthZK9aUIfkD/b2Hee+e5g==","signatures":[{"sig":"MEUCIQDJJJhQiaGPHkejeD4RuXCZj9Dzp5chwuno2OjojTssKAIgJt/ah5HTMntiPLWcO98OEpCVEgf8eb4//lvGokA3PNQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":156966},"main":"dist/index.js","_from":"file:aezakmiproject-telemt-sdk-1.0.0.tgz","types":"dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","clean":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"","watch":"tsc -p tsconfig.json --watch","test:e2e":"vitest run -c vitest.e2e.config.ts","typecheck":"tsc -p tsconfig.json --noEmit","pack:check":"npm pack --dry-run","test:watch":"vitest"},"_npmUser":{"name":"abramovi4ch","email":"winvertg@gmail.com"},"_resolved":"/private/var/folders/zx/mnv8rs8x4p1_wysykvhxqbs00000gn/T/fa141ee451616c5bcbedb8c7fe1d042d/aezakmiproject-telemt-sdk-1.0.0.tgz","_integrity":"sha512-dpUCnj9fQBevGLhdlwCoJ2FHoGxE5k71Bpa6SOf83FqJu1fZS7wI7Oo0IwLhktegOthZK9aUIfkD/b2Hee+e5g==","_npmVersion":"11.8.0","description":"TypeScript SDK for the Telemt Control API","directories":{},"sideEffects":false,"_nodeVersion":"24.13.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.11","typescript":"^5.7.2","@types/node":"^22.20.1"},"_npmOperationalInternal":{"tmp":"tmp/telemt-sdk_1.0.0_1788199775353_0.6428584146970733","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aezakmiproject/telemt-sdk","version":"1.0.2","keywords":["aezakmi","aezakmiproject","telemt","sdk","mtproto","telegram","proxy","typescript"],"author":{"name":"ABRAMOVI4CH"},"license":"ISC","_id":"@aezakmiproject/telemt-sdk@1.0.2","maintainers":[{"name":"abramovi4ch","email":"winvertg@gmail.com"}],"homepage":"https://github.com/AezakmiProject/telemt-sdk#readme","bugs":{"url":"https://github.com/AezakmiProject/telemt-sdk/issues"},"dist":{"shasum":"17e9f33197780a404af9f8ac9a7474fee114ece3","tarball":"https://registry.npmjs.org/@aezakmiproject/telemt-sdk/-/telemt-sdk-1.0.2.tgz","fileCount":290,"integrity":"sha512-bt5g48X3nRrVlMz6VHT9ie25NCHm5xcMuohwJ+o4YXgWzPboPAsI3f+0kncZmHZbFXRzR82srj56+soizKXDiw==","signatures":[{"sig":"MEYCIQCXsuPw7cgzqp/+/H6GgSMWpomsZwU8hTBM9Yb5IoY8qgIhAIVzTPsY/OGetCOjJsiCEXxtR10I3kNm//zCWrcStCAT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aezakmiproject%2ftelemt-sdk@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":157147},"main":"dist/index.js","_from":"file:aezakmiproject-telemt-sdk-1.0.2.tgz","types":"dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","clean":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"","watch":"tsc -p tsconfig.json --watch","test:e2e":"vitest run -c vitest.e2e.config.ts","typecheck":"tsc -p tsconfig.json --noEmit","pack:check":"npm pack --dry-run","test:watch":"vitest"},"_npmUser":{"name":"abramovi4ch","email":"winvertg@gmail.com"},"_resolved":"/tmp/029fa8851872ce0505bb075962059a1b/aezakmiproject-telemt-sdk-1.0.2.tgz","_integrity":"sha512-bt5g48X3nRrVlMz6VHT9ie25NCHm5xcMuohwJ+o4YXgWzPboPAsI3f+0kncZmHZbFXRzR82srj56+soizKXDiw==","repository":{"url":"git+https://github.com/AezakmiProject/telemt-sdk.git","type":"git"},"_npmVersion":"11.17.0","description":"TypeScript SDK for the Telemt Control API","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.11","typescript":"^5.7.2","@types/node":"^22.20.1"},"_npmOperationalInternal":{"tmp":"tmp/telemt-sdk_1.0.2_1788203876189_0.9291737141091705","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@aezakmiproject/telemt-sdk","version":"1.1.0","keywords":["telemt","mtproto","telegram","proxy","typescript","sdk","api-client","rest-client","typescript-sdk","telegram-proxy","proxy-server","zero-dependencies","http-client","node","aezakmi"],"author":{"name":"ABRAMOVI4CH"},"license":"ISC","_id":"@aezakmiproject/telemt-sdk@1.1.0","maintainers":[{"name":"abramovi4ch","email":"winvertg@gmail.com"}],"homepage":"https://github.com/AezakmiProject/telemt-sdk#readme","bugs":{"url":"https://github.com/AezakmiProject/telemt-sdk/issues"},"dist":{"shasum":"81c0ec4dbaab9bfc2166608ee0dd5f22ffe7ace5","tarball":"https://registry.npmjs.org/@aezakmiproject/telemt-sdk/-/telemt-sdk-1.1.0.tgz","fileCount":864,"integrity":"sha512-jRRJOnJD278/jkT7ZPDXpOdoI/lQcaF3XlCY51Fp9C7S5wc75RMcP5WfOiwPkbsz2+uPAgCfUIeCrN60vQqwhw==","signatures":[{"sig":"MEYCIQCXS0AR13nxipDjWE34n5YAjYxWkMMRdkI+FrZl2fZy4QIhAPilO6vJnDa2CNocl5soXyrihve/FchyxsfVpnKCjpA4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aezakmiproject%2ftelemt-sdk@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":332703},"main":"dist/cjs/index.js","_from":"file:aezakmiproject-telemt-sdk-1.1.0.tgz","types":"dist/types/index.d.ts","module":"dist/esm/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"test":"vitest run","build":"pnpm run clean && pnpm run build:cjs && pnpm run build:esm","clean":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"","watch":"tsc -p tsconfig.esm.json --watch","test:e2e":"vitest run -c vitest.e2e.config.ts","build:cjs":"tsc -p tsconfig.cjs.json && node -e \"require('node:fs').writeFileSync('dist/cjs/package.json', JSON.stringify({type:'commonjs'}))\"","build:esm":"tsc -p tsconfig.esm.json && node -e \"require('node:fs').writeFileSync('dist/esm/package.json', JSON.stringify({type:'module'}))\"","typecheck":"tsc -p tsconfig.json --noEmit","pack:check":"npm pack --dry-run","test:watch":"vitest"},"_npmUser":{"name":"abramovi4ch","email":"winvertg@gmail.com"},"_resolved":"/tmp/9136f734560e4befea43ecd959e7c6a1/aezakmiproject-telemt-sdk-1.1.0.tgz","_integrity":"sha512-jRRJOnJD278/jkT7ZPDXpOdoI/lQcaF3XlCY51Fp9C7S5wc75RMcP5WfOiwPkbsz2+uPAgCfUIeCrN60vQqwhw==","repository":{"url":"git+https://github.com/AezakmiProject/telemt-sdk.git","type":"git"},"_npmVersion":"11.17.0","description":"Zero-dependency TypeScript client for the Telemt MTProto proxy Control API — typed services, no-throw responses, Node 18+","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.11","typescript":"^5.7.2","@types/node":"^22.20.1"},"_npmOperationalInternal":{"tmp":"tmp/telemt-sdk_1.1.0_1788356069562_0.8563928118843147","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@aezakmiproject/telemt-sdk","version":"1.2.0","description":"Zero-dependency TypeScript client for the Telemt MTProto proxy Control API — typed services, no-throw responses, Node 18+","license":"ISC","author":{"name":"ABRAMOVI4CH"},"keywords":["telemt","mtproto","telegram","proxy","typescript","sdk","api-client","rest-client","typescript-sdk","telegram-proxy","proxy-server","zero-dependencies","http-client","node","aezakmi"],"homepage":"https://github.com/AezakmiProject/telemt-sdk#readme","repository":{"type":"git","url":"git+https://github.com/AezakmiProject/telemt-sdk.git"},"bugs":{"url":"https://github.com/AezakmiProject/telemt-sdk/issues"},"main":"dist/cjs/index.js","module":"dist/esm/index.js","types":"dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"sideEffects":false,"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"devDependencies":{"@types/node":"^22.20.1","typescript":"^5.7.2","vitest":"^4.1.11"},"engines":{"node":">=18"},"scripts":{"clean":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"","build:cjs":"tsc -p tsconfig.cjs.json && node -e \"require('node:fs').writeFileSync('dist/cjs/package.json', JSON.stringify({type:'commonjs'}))\"","build:esm":"tsc -p tsconfig.esm.json && node -e \"require('node:fs').writeFileSync('dist/esm/package.json', JSON.stringify({type:'module'}))\"","build":"pnpm run clean && pnpm run build:cjs && pnpm run build:esm","watch":"tsc -p tsconfig.esm.json --watch","typecheck":"tsc -p tsconfig.json --noEmit","pack:check":"npm pack --dry-run","test":"vitest run","test:watch":"vitest","test:e2e":"vitest run -c vitest.e2e.config.ts"},"_id":"@aezakmiproject/telemt-sdk@1.2.0","_integrity":"sha512-fUa2RsCXbaO5TuZd04yVOYlf04ulUIMPCGf09upDL0R8QYTuWtWMfmtjRu8QfXW0tBLJf2LyvCiQCzvCIeGnxA==","_resolved":"/tmp/b27825004c753b83255624908a496f86/aezakmiproject-telemt-sdk-1.2.0.tgz","_from":"file:aezakmiproject-telemt-sdk-1.2.0.tgz","_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-fUa2RsCXbaO5TuZd04yVOYlf04ulUIMPCGf09upDL0R8QYTuWtWMfmtjRu8QfXW0tBLJf2LyvCiQCzvCIeGnxA==","shasum":"9a08049484b0d3485b16f74ba9c4a520a43606ab","tarball":"https://registry.npmjs.org/@aezakmiproject/telemt-sdk/-/telemt-sdk-1.2.0.tgz","fileCount":1050,"unpackedSize":460849,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aezakmiproject%2ftelemt-sdk@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDIw2zPzN5dJg0gw9z/zoBGjnwtz8l4FVP6E0ZbgJYlmAiEA4hLHry4d599Lf4SMD+zkceRjPRTfGq0zu9ndOuXAock="}]},"_npmUser":{"name":"abramovi4ch","email":"winvertg@gmail.com"},"directories":{},"maintainers":[{"name":"abramovi4ch","email":"winvertg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/telemt-sdk_1.2.0_1788393753227_0.395595578827425"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-31T18:09:35.126Z","modified":"2026-09-03T00:02:33.771Z","1.0.0":"2026-08-31T18:09:35.489Z","1.0.2":"2026-08-31T19:17:56.328Z","1.1.0":"2026-09-02T13:34:29.709Z","1.2.0":"2026-09-03T00:02:33.456Z"},"bugs":{"url":"https://github.com/AezakmiProject/telemt-sdk/issues"},"author":{"name":"ABRAMOVI4CH"},"license":"ISC","homepage":"https://github.com/AezakmiProject/telemt-sdk#readme","keywords":["telemt","mtproto","telegram","proxy","typescript","sdk","api-client","rest-client","typescript-sdk","telegram-proxy","proxy-server","zero-dependencies","http-client","node","aezakmi"],"repository":{"type":"git","url":"git+https://github.com/AezakmiProject/telemt-sdk.git"},"description":"Zero-dependency TypeScript client for the Telemt MTProto proxy Control API — typed services, no-throw responses, Node 18+","maintainers":[{"name":"abramovi4ch","email":"winvertg@gmail.com"}],"readme":"# @aezakmiproject/telemt-sdk\n\n[![npm](https://img.shields.io/npm/v/@aezakmiproject/telemt-sdk.svg)](https://www.npmjs.com/package/@aezakmiproject/telemt-sdk)\n[![License: ISC](https://img.shields.io/badge/license-ISC-blue.svg)](LICENSE)\n[![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg)](package.json)\n\nTypeScript client for the [Telemt](https://github.com/telemt/telemt) Control API (`/v1`).\n\nTyped services over HTTP/1.1 REST: users, config, reload, stats, runtime diagnostics, health, security, and limits. Zero runtime dependencies. Methods never throw — every call returns a flat [`ISdkResponse<T>`](docs/client.md#isdkresponset).\n\nRequires **Node.js 18+** (uses global `fetch` and `AbortSignal.timeout`).\n\nThis project is an independent open-source client. It is not affiliated with Telegram or the Telemt authors.\n\n## Install\n\n```bash\nnpm install @aezakmiproject/telemt-sdk\n# or\npnpm add @aezakmiproject/telemt-sdk\n```\n\n## Quick start\n\n```ts\nimport { TelemtAPI } from '@aezakmiproject/telemt-sdk';\n\nconst api = new TelemtAPI({\n  apiUrl: 'http://127.0.0.1:9091',\n  auth: 'telemt-sdk-dev-token', // exact value of [server.api].auth_header\n});\n\nconst res = await api.users.getAll();\nif (!res.isOk) {\n  console.error(res.code, res.message);\n  return;\n}\n\nfor (const user of res.data) {\n  console.log(user.username, user.in_runtime, user.links.secure);\n}\n```\n\n`auth` is sent verbatim as `Authorization`. Telemt does constant-time string comparison, not Bearer/OAuth parsing — do not prefix `Bearer ` unless that prefix is literally part of `auth_header`.\n\n## Services\n\n| Property | What it covers |\n| --- | --- |\n| `api.users` | CRUD, enable/disable, rotate secret, reset quota |\n| `api.config` | Read / merge-patch `config.toml` |\n| `api.system` | Build info, reload, `waitForReload` |\n| `api.health` | Liveness and readiness |\n| `api.stats` | Counters, upstreams, DCs, ME writers |\n| `api.runtime` | Gates, ME pool/quality, events, TLS fingerprints |\n| `api.security` | API posture and IP whitelist |\n| `api.limits` | Effective timeouts / pool / per-user limits |\n\nFull method list, request/response types, and feature gates: **[docs/api.md](docs/api.md)**.\n\nWEB-proxy session control (`api.web`) is **not implemented** yet.\n\n## Responses\n\nEvery method returns the same shape. Success and transport failure both land here — there is no `try/catch` around SDK calls.\n\n```ts\ninterface ISdkResponse<T> {\n  isOk: boolean;\n  data?: T;\n  code?: TelemtErrorCode;\n  message?: string;\n  revision?: string;   // success only — SHA-256 of config.toml\n  requestId?: number;  // Telemt-side errors only\n}\n```\n\nA `202` from a user mutation is still `isOk: true`. The write is on disk; check `UserInfo.in_runtime` (or call `api.system.reload()`) before treating the user as live.\n\nOptimistic locking: pass `{ ifMatch: true }` on mutations to send the last seen `revision` as `If-Match`.\n\nDetails: [Client & responses](docs/client.md) · [Error codes](docs/errors.md)\n\n## Documentation\n\n| Doc | Contents |\n| --- | --- |\n| [Getting started](docs/getting-started.md) | Install, first call, local stand |\n| [Client & responses](docs/client.md) | Envelope, `If-Match`, 202 vs 200 |\n| [API reference](docs/api.md) | Every service method |\n| [Errors](docs/errors.md) | Server and `sdk_*` codes |\n| [Development](docs/development.md) | Docker stand, tests, examples |\n| [Integration contract](docs/INTEGRATION.md) | Wire format, gates, server constraints |\n| [Decisions](docs/decisions.md) | Why the types look the way they do |\n\nRunnable scripts live in [`examples/`](examples/).\n\n## Local Telemt stand\n\n```bash\ncd docker && docker compose up -d\n```\n\n| | |\n| --- | --- |\n| API | `http://127.0.0.1:9091` |\n| `Authorization` | `telemt-sdk-dev-token` |\n| Seeded users | `alice`, `bob`, `web-user` |\n\nPorts bind to `127.0.0.1` only. The API token and user secrets in `docker/` are **lab fixtures** — do not reuse them in production. See [Development](docs/development.md).\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md). Please follow the [Code of Conduct](CODE_OF_CONDUCT.md).\n\n## Security\n\nSee [SECURITY.md](SECURITY.md). Do not file public issues for vulnerabilities.\n\n## License\n\n[ISC](LICENSE)\n","readmeFilename":"README.md"}