{"_id":"@airgram-dev/web","_rev":"15-c3bc7827f68b823f68f983e1448f2f04","name":"@airgram-dev/web","dist-tags":{"latest":"2.2.2","next":"2.3.0-next.7"},"versions":{"2.0.5-next.3":{"name":"@airgram-dev/web","version":"2.0.5-next.3","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^2.0.5-next.3","tdweb":"^1.4.3"},"gitHead":"7ed652032f5b7e0c5dc83704bb572b727f18a619","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@2.0.5-next.3","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (darwin)","dist":{"integrity":"sha512-en9KkXznIzZeip6TcQTDjeljCheVPFjVJHTFV30nlLwW1+a2BHzPfHOGfG8D6Q/flOhIaWk4aIEOdcO8sDwpxA==","shasum":"ff4aaee1f1e20b04f6de5970fcf203166567c9d1","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-2.0.5-next.3.tgz","fileCount":10,"unpackedSize":16371,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSrLsCRA9TVsSAnZWagAAshIP/R5KXheKC148RUzLneBU\nNYS8UB/PKuEBmFoMZZCgFyxnp8WYE+gZWRF3syHV1xPd/G5BdHojetzla8WI\n62Ui0bedKt9cJOF9zSQh5wybvpoX/hQE5CTcqKAa1DPy1pgXxU6sQXDkjm+P\nCm7wbF4k5etZUwipzDqIE9iwphNv4JsF0qQ+s8qxc9GTGLFUAQSDdSRixN4N\n8wyOTjgiNvhiTiTxJd21O332I44DnkjhNH0FNSgAg7cswenCk+twF2T2GmP1\nnd323DCLSad1+M+9NNmljjKtlkWqlr4Ns3DAW5ie9HNLeHBpCT/0Q/Eh87gP\nj+ENPWeyAWdCA47PYuk85C7s7igpX4Ezq8EM2BxaEXbRo+8qi6ZI1GIOo0AV\n/ihP9OxsmAanNnddgZ3lcL6yWHWxup5Vr9bC3n8ii/QxyGClhnOpVxRugxdc\nNmGh1G+Q7IEDukpH7VhrrisyQbrJ5Dy6N841HR/bIy2ogXVbgTQZ+xnkoWS+\nLscItvvO776nBgXOWigmRzBqxqc6lWO8IyGTi2Yvhq5+ErrZ4ixvG8jApyFY\nR01HxqCpg1ZxN1k1ehEYy06lbqSJP5doTBODpc20H6NXHXLjAQMrJcueoTf+\n30JV8x5yv6rYafWGxt7nxctZ9eIJU6bAysqUiMnPfEumoX32D7Narnn46S8f\nR3qa\r\n=xXKH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxmDETJ/rsYU6S0JyNkISgENGATqrq6dszbIdeeL+qfQIgdODkKkBIphJQTwPMOydzK/qE9nGao4S1dn5uOdrJI6M="}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_2.0.5-next.3_1565176555934_0.13165103493471064"},"_hasShrinkwrap":false},"2.0.5-next.4":{"name":"@airgram-dev/web","version":"2.0.5-next.4","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^2.0.5-next.4","tdweb":"^1.4.3"},"gitHead":"435cde6aa173afa545bc6faa8b9d286772d760a0","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@2.0.5-next.4","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (darwin)","dist":{"integrity":"sha512-KX+1sxreyi/ddugklDejskqSpKqjweF59bU5ZW2kdZDI0ns3RHs1VCBMEOI2Zmliw4vxqWMK8yZYJklqJ3Qjpg==","shasum":"e447e64ad5103b78d5d6729d05db168a75b4fedd","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-2.0.5-next.4.tgz","fileCount":10,"unpackedSize":18205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddJiQCRA9TVsSAnZWagAALykP/RX//ukb4QnbIXgCQIy5\nc0/4lJmNNIwJhWcJ4HxdR61AQ64Vv8EHaByGFrHHI0Sc8aweQ+2B/0Fo72gO\nTfFre1esyOrn8EK3ijC7UZH37amov9mtnJ63+NVBknUiwdgRjAW3wb37SzSu\nglhBPsxU2I9RjFWB1RhmgypFwL2r0LJvNCm1feWBmEJUfAR1fYGdkxdwXctM\nyrZfV2gq8Ctj2b8345K+lX08XRsmZXsPI75QHKBctSezP/T3TJMo/D4reeFR\nqUia6O9IEwaH+HTphvJuPrQ3Ax55lENQsrL4ER4ncQz3/bD6sgtGXHfO7xYj\n7OJGGmb/vjeQLAepCmyYCR+tCQRR4pmJmNSrn55APJqSEaanjs1QXzEHGnGT\ni3tYnNhjHqti2FT8S22UyB2/i3VuC2nSTjRR7SrYqEg8FNXyin9VZhmy/Tq/\n1lAogmJxtLWsBlkXvZHw+rI5//AxTFgGzN3/K43Xl9DhhPcEKh2gme2gkDub\niKnL0LxOzZXmmqBRT7sHqbndlqEpx4Kld1SV1YEHSXZ6SUbyaffB5UWz8ICt\noOR+FP+BO3xWo6kpecrfT2MhAkS4XiFAbqU3SDnv85HRVv7dvKomRnn4zhCg\nSM5kzmcW7E67YWYftQiiI1xCASilmDF4D4E1xQoXXE/W5owL7pm/OI1Zuh8K\nJgYj\r\n=EZ9T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTZJNcxqKwpphmphzKHo124vaZ+oWe82x5gNbCS+IpuQIgE5hJPteNADUvRJPU2UIYHm+MUFwB6J0KaSJSTfZWnr8="}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_2.0.5-next.4_1567922320313_0.045046256265297346"},"_hasShrinkwrap":false},"1.3.0-next.2":{"name":"@airgram-dev/web","version":"1.3.0-next.2","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^1.3.0-next.2","tdweb":"^1.5.0"},"gitHead":"7841d0af896ee9e0c2779f8d57ba2b03067f57f0","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@1.3.0-next.2","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (darwin)","dist":{"integrity":"sha512-kc9pWMtD3RutHXsf+i4hNAuoGKuZKNLuNuxf1BCbJxg02b/gwAgY8LX8jmjTfZ2KQPoepIbRlNhZ4MgNI8OBfw==","shasum":"2fdfeb1472de90de1f465c6edd23e05fe197ae98","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-1.3.0-next.2.tgz","fileCount":10,"unpackedSize":18205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddRqcCRA9TVsSAnZWagAALnIP/2Ml+t4TUU8bn5+ik0ac\n+12zexIH0Z2sI9gnujBbf4aGm1hM7kKWIm2lUHeZSNKWGEZYtYIbxv/XY9iV\nEpdMRDUxSlnqgvDYNmQ1PUWalZJbFkCn4Nksf8c5jz2dgcBDHpQCRj0pTjNe\nMxw2l2Cm2hiEx/Eayz5q08XIG3lbye/pvwg2JjEVXM4l566i0MYuQaPOlgl7\n8qcTiYenJRlXpWCkRdRXNDbtdK+KFLycNDN3rni0ShdyAcF4g1bGYSmcSiSN\nDmeg6g9NoWBv6CzU5q7c87Br0a13MdCtxN+/1rhXKYADcHqHxSGiCbTu10dw\n03KcCKHfTnEmnaJFiBKxtZv0urfgaqIDzp4w9NBJ67mVovxpGfRPzIurQBm0\nL8by54fydlx8Cr9Hz9TXz5W9IjlnU0jMzX5u2q6V2ZuMMfcBzaxwJcaaI1lV\nulWqzo89KDwI3ASQunbchK+Qdv6S3qoUeehUIRgukvl7D5LizoKyotQdfxRf\nrxZAqcQQksO/Rf1v9ameZq14YyJ1FQKSaekbMQvdkuxztTSNpXs7omst0ZcK\nIMddhbvtUPCWz9gsdivL2PHiR+7D/z2+qlGu3AEiG8RMVRs+bOyU3oWdxs38\ngxPIl6zyh6vyZKhWcS9O9vgvgc4gvDW75/s9vddw474JD6yRqLB+Eqh5SCTw\nf9+K\r\n=Ak3u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2kXsjTBEs3ej4L174D1LkgJ/HMLUeLSdtoPm7YioN9AIhANGRuo9PYyWIsADRhdG86gHOliMGmrfZXgCeGTsNKLtf"}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_1.3.0-next.2_1567955611544_0.7893371114024235"},"_hasShrinkwrap":false},"2.1.0":{"name":"@airgram-dev/web","version":"2.1.0","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^2.1.0","tdweb":"^1.4.3"},"gitHead":"9bc126e06d30a02016c9f1f582145835d6fa4ca1","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"readme":"# Airgram for `tdweb`\n\nUse [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.\n\n## Features\n\n- Strictly typed;\n- Documentation out of the box;\n- Supports models;\n- Built on middleware;\n\nAll TDLib classes and methods are described and have suitable wrappers in Airgram. There are only two differences:\n- All parameter names are represent in \"camelCase\".\n- Parameter `@type` renamed to `_`.\n\n## Documentation\n- [Installation](#installation) \n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Api reference](#api-reference)\n---\nCheck out `airgram` documentation:\n- [Middleware](https://github.com/airgram/airgram#middleware)\n- [Getting updates](https://github.com/airgram/airgram#getting-updates)\n---\nTDLib API reference:\n- [TDLib methods](https://github.com/airgram/airgram-api/tree/master/docs/td-methods.md)\n- [TDLib input types](https://github.com/airgram/airgram-api/tree/master/docs/td-inputs.md)\n- [TDLib output types](https://github.com/airgram/airgram-api/tree/master/docs/td-outputs.md)\n\n## Installation\n```bash\nnpm install tdweb-airgram\n```\n\n## Usage\n- [Webpack example](https://github.com/airgram/tdweb-airgram/tree/master/examples/webpack-config)\n- [Rollup example](https://github.com/airgram/tdweb-airgram/tree/master/examples/rollup-example)\n\n## Configuration\n\nThis section describes the options you can pass to `Airgram` constructor:\n\n```typescript\nimport { Airgram } from 'tdweb-airgram'\n\nconst airgram = new Airgram({\n  // options\n})\n```\n\n### TDLib options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `useTestDc` | `boolean` | If set to true, the Telegram test environment will be used instead of the production  environment |\n| `databaseDirectory` | `string` | The path to the directory for the persistent database |\n| `filesDirectory` | `string` | The path to the directory for storing files |\n| `useFileDatabase` | `boolean` | If set to true, information about downloaded and uploaded files will be saved between application restarts |\n| `useChatInfoDatabase` | `boolean` | If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies `useFileDatabase` |\n| `useMessageDatabase` | `boolean` | If set to true, the library will maintain a cache of chats and messages. Implies `useChatInfoDatabase` |\n| `useSecretChats` | `boolean` | If set to true, support for secret chats will be enabled |\n| `apiId` | `number` | Application identifier for Telegram API access, which can be obtained at https://my.telegram.org |\n| `apiHash` | `string` | Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org |\n| `systemLanguageCode` | `string` | IETF language tag of the user's operating system language |\n| `deviceModel` | `string` | Model of the device the application is being run on |\n| `systemVersion` | `string` | Version of the operating system the application is being run on |\n| `applicationVersion` | `string` | Application version |\n| `enableStorageOptimizer` | `boolean` | If set to true, old files will automatically be deleted |\n| `ignoreFileNames` | `boolean` | If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name |\n| `databaseEncryptionKey` | `string` | Encryption key |\n\n### `tdweb` options:\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `instanceName` | `string` | Name of the TDLib instance. Currently only one instance of TdClient with a given name is allowed. All but one instances with the same name will be automatically closed. Usually, the newest non-background instance is kept alive. Files will be stored in an IndexedDb table with the same name. |\n| `isBackground` | `boolean` | Pass true, if the instance is opened from the background. Default: `false` |\n| `jsLogVerbosityLevel` | `string` | The initial verbosity level of the JavaScript part of the code (one of 'error', 'warning', 'info', 'log', 'debug'). Default: `info` |\n| `logVerbosityLevel` | `number` | The initial verbosity level for the TDLib internal logging (0-1023). Default: 2 |\n| `useDatabase` | `boolean` | Pass false to use TDLib without database and secret chats. It will significantly improve loading time, but some functionality will be unavailable. Default: `true` |\n| `readOnly` | `boolean` | For debug only. Pass true to open TDLib database in read-only mode. Default: `false` |\n| `mode` | `string` | For debug only. The type of the TDLib build to use. 'asmjs' for asm.js and 'wasm' for WebAssembly. If mode == 'auto' WebAbassembly will be used if supported by browser, asm.js otherwise. Default: `auto` |\n\n\n### Other options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `models` | Function | Contains function, which converts plain JSON objects to models. [Details](https://github.com/airgram/airgram-use-models). |\n| `contextFactory` | Function | Function that returns custom middleware context. [Details](#ctx). |\n\n## API reference\n\nThis section describes public API of an `Airgram` instance:\n\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `api` | Object | Contains wrappers for all [TDLib methods](https://github.com/airgram/airgram-api/blob/master/docs/td-methods.md). |\n| `config` | Object | Airgram configuration. Readonly. |\n| `catch` | `(handler) => void` | Overrides default error handler. Argument `handler` takes a function: `(error: Error, ctx?: Record<string, any>) => void`  |\n\n## License\n\nThe source code is licensed under GPL v3. License is available [here](/LICENSE).\n","readmeFilename":"README.md","description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@2.1.0","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (darwin)","dist":{"integrity":"sha512-HLBCu1nkQ/nbpH92/tj+WbieKwBeHrV2TSBAhyjHjPdDMuUtyupggmaHj6JE62LDxN2j+Ml1Y3gPCTlhQRd+6w==","shasum":"fea540f1444caf2174ada08ab3a3b6ddead1f55e","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-2.1.0.tgz","fileCount":10,"unpackedSize":17595,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiysICRA9TVsSAnZWagAALd4P/3wc4rSnblo8NQ/DtlU+\noANRpGfxTm5j5VGDtG1vflVYkAW7TftVsKcfg7UAwOfMAQgX6zGvVJZdwrRl\niuO9sEwhXo/Un9HoY/eZDa6quIrF8lLX7HELHsxowCKaKxlkj2Rx5DndQYOf\no5y0KFwL1mjLoP8t1NZvKIdzi6czcmoNS5239btBq87qRhtCNJ/1RNQqItUr\nd2fXrN6iM2zl5ddogHM1HByuyRXJ+N38XM7BXXQobg8ol0tmtfYUVjmEGQDe\nyfKdcTAijfymzgmGY67kY6MPklrSN7Z2yNd5jbigBfsC7oXfazt0NlzwoZ19\n/V1j+0YDQ2JBWifhjb40XW+1bYaejkaT56PKyL3gZUvb5KEGAbI1ztD6Yh9S\nhW9ORQtoLQ8Ar4smsQVAOLXpTe7Czpgm3Uz91gmFM3q2mjaMDrnQr3WGvzJz\nErmwumsl1vvvh2Ks+hnMChDT9ckqno7ymv11T15tHHtXKFGHdLIywvFB+sYH\nAoLU+jGVZHEmDAduZXGEHqO8LZ1esYhZMxYkwHgBsF0nxoAIyAJU8RQTIJC0\n0FNajOSzGfKiws9Q0fqRQM6Skk4TtEXT56qZ89/eyYao6dkqcp8kUfo5lmPd\nxzVLJF2DglYaf6NKoeDJEyvVf+++qD5oAJZDmPfHoO4P2sChTTKpEzGuO8HL\nasg4\r\n=S2fz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEP1VtFRDWUD8w74b6w+/cvHsmtxAaQyXPFY63yvvp5QAiAjmDxjoz6LW1WJhSZNhihYLyiQBXUJRomiNQtr6tVNdQ=="}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_2.1.0_1569401607728_0.8061034868313139"},"_hasShrinkwrap":false},"2.2.1-next.0":{"name":"@airgram-dev/web","version":"2.2.1-next.0","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^2.2.1-next.0+a5de5e0","tdweb":"^1.4.3"},"gitHead":"a5de5e09598dfa2c683d8ebada56cf35257bc012","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"readme":"# Airgram for `tdweb`\n\nUse [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.\n\n## Features\n\n- Strictly typed;\n- Documentation out of the box;\n- Supports models;\n- Built on middleware;\n\nAll TDLib classes and methods are described and have suitable wrappers in Airgram. There are only two differences:\n- All parameter names are represent in \"camelCase\".\n- Parameter `@type` renamed to `_`.\n\n## Documentation\n- [Installation](#installation) \n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Api reference](#api-reference)\n---\nCheck out `airgram` documentation:\n- [Middleware](https://github.com/airgram/airgram#middleware)\n- [Getting updates](https://github.com/airgram/airgram#getting-updates)\n---\nTDLib API reference:\n- [TDLib methods](https://github.com/airgram/airgram-api/tree/master/docs/td-methods.md)\n- [TDLib input types](https://github.com/airgram/airgram-api/tree/master/docs/td-inputs.md)\n- [TDLib output types](https://github.com/airgram/airgram-api/tree/master/docs/td-outputs.md)\n\n## Installation\n```bash\nnpm install tdweb-airgram\n```\n\n## Usage\n- [Webpack example](https://github.com/airgram/tdweb-airgram/tree/master/examples/webpack-config)\n- [Rollup example](https://github.com/airgram/tdweb-airgram/tree/master/examples/rollup-example)\n\n## Configuration\n\nThis section describes the options you can pass to `Airgram` constructor:\n\n```typescript\nimport { Airgram } from 'tdweb-airgram'\n\nconst airgram = new Airgram({\n  // options\n})\n```\n\n### TDLib options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `useTestDc` | `boolean` | If set to true, the Telegram test environment will be used instead of the production  environment |\n| `databaseDirectory` | `string` | The path to the directory for the persistent database |\n| `filesDirectory` | `string` | The path to the directory for storing files |\n| `useFileDatabase` | `boolean` | If set to true, information about downloaded and uploaded files will be saved between application restarts |\n| `useChatInfoDatabase` | `boolean` | If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies `useFileDatabase` |\n| `useMessageDatabase` | `boolean` | If set to true, the library will maintain a cache of chats and messages. Implies `useChatInfoDatabase` |\n| `useSecretChats` | `boolean` | If set to true, support for secret chats will be enabled |\n| `apiId` | `number` | Application identifier for Telegram API access, which can be obtained at https://my.telegram.org |\n| `apiHash` | `string` | Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org |\n| `systemLanguageCode` | `string` | IETF language tag of the user's operating system language |\n| `deviceModel` | `string` | Model of the device the application is being run on |\n| `systemVersion` | `string` | Version of the operating system the application is being run on |\n| `applicationVersion` | `string` | Application version |\n| `enableStorageOptimizer` | `boolean` | If set to true, old files will automatically be deleted |\n| `ignoreFileNames` | `boolean` | If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name |\n| `databaseEncryptionKey` | `string` | Encryption key |\n\n### `tdweb` options:\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `instanceName` | `string` | Name of the TDLib instance. Currently only one instance of TdClient with a given name is allowed. All but one instances with the same name will be automatically closed. Usually, the newest non-background instance is kept alive. Files will be stored in an IndexedDb table with the same name. |\n| `isBackground` | `boolean` | Pass true, if the instance is opened from the background. Default: `false` |\n| `jsLogVerbosityLevel` | `string` | The initial verbosity level of the JavaScript part of the code (one of 'error', 'warning', 'info', 'log', 'debug'). Default: `info` |\n| `logVerbosityLevel` | `number` | The initial verbosity level for the TDLib internal logging (0-1023). Default: 2 |\n| `useDatabase` | `boolean` | Pass false to use TDLib without database and secret chats. It will significantly improve loading time, but some functionality will be unavailable. Default: `true` |\n| `readOnly` | `boolean` | For debug only. Pass true to open TDLib database in read-only mode. Default: `false` |\n| `mode` | `string` | For debug only. The type of the TDLib build to use. 'asmjs' for asm.js and 'wasm' for WebAssembly. If mode == 'auto' WebAbassembly will be used if supported by browser, asm.js otherwise. Default: `auto` |\n\n\n### Other options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `models` | Function | Contains function, which converts plain JSON objects to models. [Details](https://github.com/airgram/airgram-use-models). |\n| `contextFactory` | Function | Function that returns custom middleware context. [Details](#ctx). |\n\n## API reference\n\nThis section describes public API of an `Airgram` instance:\n\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `api` | Object | Contains wrappers for all [TDLib methods](https://github.com/airgram/airgram-api/blob/master/docs/td-methods.md). |\n| `config` | Object | Airgram configuration. Readonly. |\n| `catch` | `(handler) => void` | Overrides default error handler. Argument `handler` takes a function: `(error: Error, ctx?: Record<string, any>) => void`  |\n\n## License\n\nThe source code is licensed under GPL v3. License is available [here](/LICENSE).\n","readmeFilename":"README.md","description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@2.2.1-next.0","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (darwin)","dist":{"integrity":"sha512-SnI6JEpM41pF7/QquoQJ5hEs1gJQx2eElS+Gr29u2gx5dOwRziibyXOK/5FHhW3AZQs/10TsgxHz7ktQv3taCA==","shasum":"4aefdd4ad8b06ce9070dd2f3734597f10d17c8d2","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-2.2.1-next.0.tgz","fileCount":10,"unpackedSize":17620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkHxvCRA9TVsSAnZWagAADXYP/A7Yc/4aMpLMc2dZX8GW\nVtVM/znHh+t1uIH1h+ga+SC7p+WaPGBRS2eKDz8ErgqwG3r6EZXDBKwmQ1xc\n4qrH3IVcCydQr55+Ao53KZcnNr8YcaWCUAWR3ItPg8cwpJMalqpV5hatQ7dC\nu8UHQVMDeYPcXXt64Ou/OpRyl73SfH3v6XLRPdQwIBpxpNjEviNk+3RUGNCi\nm+WZXj70+B9Gq/2pgUmr0BP+6bmQdQCute6c30BzyNZFZdAPYvglRR0RlNLR\nYH/SBu3/YyqKixM9V2RcAKsXeIsIjxjfqp2/bhbNutbO0KizdLHnyy+ePIlm\nsNpBLlHR0j0DYe5gw+0dlKhV5o591WACd6KWTJSKnVOZaVvtPSW6sYU0sq8E\n5xy1kFfDPstOOKWuer2ql5YbD2DoVcVuQcrWL6+NGDBPivl88UR3pKPmPWJX\nQG9uTx5BFEjrGoJwdZw1R7CWQPLz+jLIlBDwjojnRgie3IAwyV4t2lLZMIfC\nVdo7nLoRL95fSjpD8tRTyEghVc8cSfJ3HEYkN7pD1RAH4gFsf20WhqQXgcaz\njVu3tEXCKYI2iK3aMtdliFPKgseWcSD1RCHXm92I+Ww0ya2WHr7jukSKNvTx\n/V2QgAhRp8ApBp9/kh33I+dxSG4xRDq8HyUo2ELVJorL8vpRFPZExxbdmJI2\nIbG+\r\n=Hhyq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkAExhiUj2/Q8p636SiDhgCt15wEGD2ZDGF55y8vjjWgIgCuzoEVWOABXcSR+3rfi85Yjf/1pih2I0JT9ej4n/ROM="}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_2.2.1-next.0_1569750126604_0.0485780569605605"},"_hasShrinkwrap":false},"2.2.1":{"name":"@airgram-dev/web","version":"2.2.1","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^2.2.1","tdweb":"^1.4.3"},"gitHead":"b20944361dfb3d4dd9b2646582094476db283c3e","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@2.2.1","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (darwin)","dist":{"integrity":"sha512-VFXu+wBVSiikiMNETMW3cIplYKe3VNjP37LTykPKfz0GBMH41o1SRyQMTTmNv+Nd6oLAiv0hV1fQDoxShyAoRw==","shasum":"d50597df6eaf6c4cdfdc03a426308c2df5993261","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-2.2.1.tgz","fileCount":10,"unpackedSize":17590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkH49CRA9TVsSAnZWagAAzC0QAJeZqCeDrdnfZWuwAms3\nhEl8Ydid9M+Oz5ymsKU6LjbZAyCQzD56X/Ee+8JwWRu92SR/w7INmuCoPJ2U\nDI1CUp8RWAB6qVEmi/co0FOEDqU/Ecie/3n+V9BBtN7QTvDMR1WspXLaeZBw\nzV41eP5VzPPN5NSmfj6T7t6Reo+lCyREKSeRFsNFHDE/uaojJzjqT6jnP+1C\nzYejCaatBJStPRFiuCag+i4zevLOqwP9Q0ORHiQDNfT3Zbh0KHhXSilMmDSV\nWqRU8SxabW7+WPCf7PFqB4AhD5OhqiMc2zkMIf3Ih7xh5OZqEI3az6MR1ZSx\ncmXlr+H/Z5m+S1LXuoFIg6es6rMJ+EuOL007zwpIj+20UrtJw4emCbjnArMn\n7uSax2BLW977U6YVgBs4NkD1RGV0oTdI2zvv+vE5v37rjelD6RLAu/HfA0CV\ncHPHqJWYYLX13wGNA5JhnwWC6kgntHiq0tbbF0OzklmbGNy3pMGFFy81IsDv\n+BvcptO6r0L41qz7TGB9tBVi3M3TcRpTxUQDObZzkRzs4gY5S47Z2dwwaRek\ncHodmTcfoHI6JHpONg3jzJKLQqRHXD7ackLOPwDdAa8mDyccfoilQ+iJzy2t\noSiiqAgQPoOsXv+8Znq34rFzcm2YWX6drQ/CQbFujsyihZicQmgLipSH5fln\nExkq\r\n=CzVD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqQwtP9uYYERa46bXVdRAfuBsR0uUTLAUKHR68/Cw6TgIgEkagRpUknqXHWqiqiW7RU6EYH/ToeEctNfSZf/QNrr0="}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_2.2.1_1569750589353_0.07888704162827365"},"_hasShrinkwrap":false},"2.2.2-next.0":{"name":"@airgram-dev/web","version":"2.2.2-next.0","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^2.2.1","tdweb":"^1.4.3"},"gitHead":"e4d58a16b320b22da723c97c8144c2177421a9e0","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"readme":"# Airgram for `tdweb`\n\nUse [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.\n\n## Features\n\n- Strictly typed;\n- Documentation out of the box;\n- Supports models;\n- Built on middleware;\n\nAll TDLib classes and methods are described and have suitable wrappers in Airgram. There are only two differences:\n- All parameter names are represent in \"camelCase\".\n- Parameter `@type` renamed to `_`.\n\n## Documentation\n- [Installation](#installation) \n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Api reference](#api-reference)\n---\nCheck out `airgram` documentation:\n- [Middleware](https://github.com/airgram/airgram#middleware)\n- [Getting updates](https://github.com/airgram/airgram#getting-updates)\n---\nTDLib API reference:\n- [TDLib methods](https://github.com/airgram/airgram-api/tree/master/docs/td-methods.md)\n- [TDLib input types](https://github.com/airgram/airgram-api/tree/master/docs/td-inputs.md)\n- [TDLib output types](https://github.com/airgram/airgram-api/tree/master/docs/td-outputs.md)\n\n## Installation\n```bash\nnpm install tdweb-airgram\n```\n\n## Usage\n- [Webpack example](https://github.com/airgram/tdweb-airgram/tree/master/examples/webpack-config)\n- [Rollup example](https://github.com/airgram/tdweb-airgram/tree/master/examples/rollup-example)\n\n## Configuration\n\nThis section describes the options you can pass to `Airgram` constructor:\n\n```typescript\nimport { Airgram } from 'tdweb-airgram'\n\nconst airgram = new Airgram({\n  // options\n})\n```\n\n### TDLib options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `useTestDc` | `boolean` | If set to true, the Telegram test environment will be used instead of the production  environment |\n| `databaseDirectory` | `string` | The path to the directory for the persistent database |\n| `filesDirectory` | `string` | The path to the directory for storing files |\n| `useFileDatabase` | `boolean` | If set to true, information about downloaded and uploaded files will be saved between application restarts |\n| `useChatInfoDatabase` | `boolean` | If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies `useFileDatabase` |\n| `useMessageDatabase` | `boolean` | If set to true, the library will maintain a cache of chats and messages. Implies `useChatInfoDatabase` |\n| `useSecretChats` | `boolean` | If set to true, support for secret chats will be enabled |\n| `apiId` | `number` | Application identifier for Telegram API access, which can be obtained at https://my.telegram.org |\n| `apiHash` | `string` | Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org |\n| `systemLanguageCode` | `string` | IETF language tag of the user's operating system language |\n| `deviceModel` | `string` | Model of the device the application is being run on |\n| `systemVersion` | `string` | Version of the operating system the application is being run on |\n| `applicationVersion` | `string` | Application version |\n| `enableStorageOptimizer` | `boolean` | If set to true, old files will automatically be deleted |\n| `ignoreFileNames` | `boolean` | If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name |\n| `databaseEncryptionKey` | `string` | Encryption key |\n\n### `tdweb` options:\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `instanceName` | `string` | Name of the TDLib instance. Currently only one instance of TdClient with a given name is allowed. All but one instances with the same name will be automatically closed. Usually, the newest non-background instance is kept alive. Files will be stored in an IndexedDb table with the same name. |\n| `isBackground` | `boolean` | Pass true, if the instance is opened from the background. Default: `false` |\n| `jsLogVerbosityLevel` | `string` | The initial verbosity level of the JavaScript part of the code (one of 'error', 'warning', 'info', 'log', 'debug'). Default: `info` |\n| `logVerbosityLevel` | `number` | The initial verbosity level for the TDLib internal logging (0-1023). Default: 2 |\n| `useDatabase` | `boolean` | Pass false to use TDLib without database and secret chats. It will significantly improve loading time, but some functionality will be unavailable. Default: `true` |\n| `readOnly` | `boolean` | For debug only. Pass true to open TDLib database in read-only mode. Default: `false` |\n| `mode` | `string` | For debug only. The type of the TDLib build to use. 'asmjs' for asm.js and 'wasm' for WebAssembly. If mode == 'auto' WebAbassembly will be used if supported by browser, asm.js otherwise. Default: `auto` |\n\n\n### Other options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `models` | Function | Contains function, which converts plain JSON objects to models. [Details](https://github.com/airgram/airgram-use-models). |\n| `contextFactory` | Function | Function that returns custom middleware context. [Details](#ctx). |\n\n## API reference\n\nThis section describes public API of an `Airgram` instance:\n\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `api` | Object | Contains wrappers for all [TDLib methods](https://github.com/airgram/airgram-api/blob/master/docs/td-methods.md). |\n| `config` | Object | Airgram configuration. Readonly. |\n| `catch` | `(handler) => void` | Overrides default error handler. Argument `handler` takes a function: `(error: Error, ctx?: Record<string, any>) => void`  |\n\n## License\n\nThe source code is licensed under GPL v3. License is available [here](/LICENSE).\n","readmeFilename":"README.md","description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@2.2.2-next.0","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (darwin)","dist":{"integrity":"sha512-ltZYjfpxjQPh5jRAgjl3C8pf9IWVltfB5GcKwFncLPcZlAMuo4rrc0bi79vDoNMIuUhC+leYUm38jvOorgEnLg==","shasum":"e306ca33397c9b9d55a554bc2d82edcfd49db9be","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-2.2.2-next.0.tgz","fileCount":10,"unpackedSize":17605,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkIDGCRA9TVsSAnZWagAAnNUP/AqzU7HrQZm1vkg/+kx/\nNtT184RszpcGBbhr+MsGDxobekvjTslSqw3vVeu1DufkG1OmeOYtLjtMxVxe\nqJJSq3dJUe8TAy9yDeq6akqb43zfIFVG0WvZzdoNve+Wlf4LOxdQ1fgjNZxt\nPy3Jhqdd8RElfQs9B9PcCfcQ6stTnaPaUDJ7GFYxxTudd5pN2WpajdbT7oZk\nUeHhd4MRizd06D0FJoY2RSDzzn31CeA0MVGrDGf9irUTofHZrjNv9rMvcwr5\ncRUvILKuEUVEz5s2OyGme2QKSR2Cc1SDTK34cAFsnXybM3O86BZOxLHyOMwQ\ndAf/T4V4ih5pdPGCnToGAMxo4EZ5kl4L4wiwbbLyFbfz4r/igZUlNLE8RyPd\nSVBmQG54aGZriUDWivF/0YX7QJx0/hhHJQzp6OgQ3OoSrB5j9XnuGtRRnxyz\nifIzl/g78Jbwg0IOmKUWZtcmps57QkrznE62+Z58YVTCkULIc9o2AydsRwJP\ndvNqPCpbxBS7Of/tEChOteScNdZ45wRwQB+DaqfFwiu33ze46xogfTaeSCVB\nlB6UA58Ymlp1W+bY0DqlLD/hnX4aumunrOhEe+6oHO2IqyaSqZlmFskdSjL3\n/TVeTICrFPbF31lJDbaV4uysXAxTnyL8XvBa1mimg/3gqPBDTd2bhjLCubl4\nWo+z\r\n=SIrh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHUQJFcwZeHqUxPyPHvOJ6xchoPBQA0+NKKRvNkFBcUyAiEAnVhdDT9qjdn/9Z/3YPYaDsLhW7lgD/J6/UpkkQroyzc="}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_2.2.2-next.0_1569751237378_0.3868824320681641"},"_hasShrinkwrap":false},"2.2.2":{"name":"@airgram-dev/web","version":"2.2.2","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^2.2.1","tdweb":"^1.4.3"},"gitHead":"6758f5c88377b7b4c78131e84e0a30e73fe3df99","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@2.2.2","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (darwin)","dist":{"integrity":"sha512-QCGfoihinJSce4xJuEc8Iat4h1IlwaUI5h/ENIWRk4F/bYTvQ4VR/5AdaPmGtCwa+wyy3IhfNo5IiIS3TOORxg==","shasum":"20b52844b3ad2c13f491a8e73a51e1837b386de6","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-2.2.2.tgz","fileCount":10,"unpackedSize":17590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkIfcCRA9TVsSAnZWagAAq6MP/2YxBx+y/nIu2N3MnhvP\nNAuTsdalaoi1nZsL1Fe6MyLbaWbFDBZlRqt2Dn1+OGmVM/aaHMGJrY3OxHMb\nALXbp2Wf0Yuz5dFfOCRcWKsNOqcoi+voOEtM+1LUBTL+otVk1yBymP7trxBW\n4Qr4J07OW+9AgZknJiXfUpilzWY8PmuSKzkoe/iO9h2CdzMVoV+KWfivtBEn\nO8HTkrMqCxU/eOgx6BuQsETNvCGHRpW5I/bpBzBhs4rBbbgBHEiJGrZP3y/6\n/Y3rD+DSffMbJN52BlmbadvRLqtQS8uhpnH198teEvZXpnc9dtKZfv/gr5Ok\nRevOmnHqchx3M76JGefqd2wHeKpGU0XGlvOrl4Yc2T8J8XDDCIRp9gHO6wS1\nUxBJuV+OGfOB9eIY6pPbmbRvtoPzxOWM/MPw3v5hMGTOv+GMRBvqpegRLXoa\nDDydLurUlh0aOKf9B5o9wR8+tTqyMeOHpr0JJuvRISNo7m8vWlC+yFADnTd7\n1zNxb8ccWiv9m21sarcmR6XNcLjvpFeTpB0LFO5xWT26AcrY9aIeo2hyOU3y\nbstxDcwFU7aXGZ1pncyufeaQzoslKAI72+TwUMX2VQ11CxaVvIPTTFsBG4qf\nAMDbdxUSW6188VjiD1GskdL5dsE7zkbEH20SET0GW/NW4aU318z89MC8XjpF\nGP6s\r\n=UMQ1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAomwb1mTVhLg/JLuhPNLyh1Njr/jgEk7zA9d2NsagCUAiA5iAj4oagXptd1WyKqEq+sCLF6rFBdR1qk1yaIv7BK1w=="}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_2.2.2_1569753052063_0.6876897993050106"},"_hasShrinkwrap":false},"2.2.3-next.0":{"name":"@airgram-dev/web","version":"2.2.3-next.0","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^2.2.1","tdweb":"^1.4.3"},"gitHead":"9e7c0fd4dcd3b0816d3d311a0f6221c7b3f08305","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"readme":"# Airgram for `tdweb`\n\nUse [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.\n\n## Features\n\n- Strictly typed;\n- Documentation out of the box;\n- Supports models;\n- Built on middleware;\n\nAll TDLib classes and methods are described and have suitable wrappers in Airgram. There are only two differences:\n- All parameter names are represent in \"camelCase\".\n- Parameter `@type` renamed to `_`.\n\n## Documentation\n- [Installation](#installation) \n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Api reference](#api-reference)\n---\nCheck out `airgram` documentation:\n- [Middleware](https://github.com/airgram/airgram#middleware)\n- [Getting updates](https://github.com/airgram/airgram#getting-updates)\n---\nTDLib API reference:\n- [TDLib methods](https://github.com/airgram/airgram-api/tree/master/docs/td-methods.md)\n- [TDLib input types](https://github.com/airgram/airgram-api/tree/master/docs/td-inputs.md)\n- [TDLib output types](https://github.com/airgram/airgram-api/tree/master/docs/td-outputs.md)\n\n## Installation\n```bash\nnpm install tdweb-airgram\n```\n\n## Usage\n- [Webpack example](https://github.com/airgram/tdweb-airgram/tree/master/examples/webpack-config)\n- [Rollup example](https://github.com/airgram/tdweb-airgram/tree/master/examples/rollup-example)\n\n## Configuration\n\nThis section describes the options you can pass to `Airgram` constructor:\n\n```typescript\nimport { Airgram } from 'tdweb-airgram'\n\nconst airgram = new Airgram({\n  // options\n})\n```\n\n### TDLib options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `useTestDc` | `boolean` | If set to true, the Telegram test environment will be used instead of the production  environment |\n| `databaseDirectory` | `string` | The path to the directory for the persistent database |\n| `filesDirectory` | `string` | The path to the directory for storing files |\n| `useFileDatabase` | `boolean` | If set to true, information about downloaded and uploaded files will be saved between application restarts |\n| `useChatInfoDatabase` | `boolean` | If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies `useFileDatabase` |\n| `useMessageDatabase` | `boolean` | If set to true, the library will maintain a cache of chats and messages. Implies `useChatInfoDatabase` |\n| `useSecretChats` | `boolean` | If set to true, support for secret chats will be enabled |\n| `apiId` | `number` | Application identifier for Telegram API access, which can be obtained at https://my.telegram.org |\n| `apiHash` | `string` | Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org |\n| `systemLanguageCode` | `string` | IETF language tag of the user's operating system language |\n| `deviceModel` | `string` | Model of the device the application is being run on |\n| `systemVersion` | `string` | Version of the operating system the application is being run on |\n| `applicationVersion` | `string` | Application version |\n| `enableStorageOptimizer` | `boolean` | If set to true, old files will automatically be deleted |\n| `ignoreFileNames` | `boolean` | If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name |\n| `databaseEncryptionKey` | `string` | Encryption key |\n\n### `tdweb` options:\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `instanceName` | `string` | Name of the TDLib instance. Currently only one instance of TdClient with a given name is allowed. All but one instances with the same name will be automatically closed. Usually, the newest non-background instance is kept alive. Files will be stored in an IndexedDb table with the same name. |\n| `isBackground` | `boolean` | Pass true, if the instance is opened from the background. Default: `false` |\n| `jsLogVerbosityLevel` | `string` | The initial verbosity level of the JavaScript part of the code (one of 'error', 'warning', 'info', 'log', 'debug'). Default: `info` |\n| `logVerbosityLevel` | `number` | The initial verbosity level for the TDLib internal logging (0-1023). Default: 2 |\n| `useDatabase` | `boolean` | Pass false to use TDLib without database and secret chats. It will significantly improve loading time, but some functionality will be unavailable. Default: `true` |\n| `readOnly` | `boolean` | For debug only. Pass true to open TDLib database in read-only mode. Default: `false` |\n| `mode` | `string` | For debug only. The type of the TDLib build to use. 'asmjs' for asm.js and 'wasm' for WebAssembly. If mode == 'auto' WebAbassembly will be used if supported by browser, asm.js otherwise. Default: `auto` |\n\n\n### Other options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `models` | Function | Contains function, which converts plain JSON objects to models. [Details](https://github.com/airgram/airgram-use-models). |\n| `contextFactory` | Function | Function that returns custom middleware context. [Details](#ctx). |\n\n## API reference\n\nThis section describes public API of an `Airgram` instance:\n\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `api` | Object | Contains wrappers for all [TDLib methods](https://github.com/airgram/airgram-api/blob/master/docs/td-methods.md). |\n| `config` | Object | Airgram configuration. Readonly. |\n| `catch` | `(handler) => void` | Overrides default error handler. Argument `handler` takes a function: `(error: Error, ctx?: Record<string, any>) => void`  |\n\n## License\n\nThe source code is licensed under GPL v3. License is available [here](/LICENSE).\n","readmeFilename":"README.md","description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@2.2.3-next.0","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (darwin)","dist":{"integrity":"sha512-ThJcUZ8dFUlEFd2FDtJBBEVFiRDjUxeH3Dk6xQBXaPVGjwhq20lv3A8qFwZ/FVBEYOBz3OQs/v6YxB82wy5IsA==","shasum":"88bf27e4c99bf116af2be3a4372c7fbc10c1edce","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-2.2.3-next.0.tgz","fileCount":10,"unpackedSize":17676,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoTjTCRA9TVsSAnZWagAAePsP/29q+Oiy7gSwT/uVWNMo\nyZBjydO2FKYZvSCWrNYe+ArtsM5Sqodasgbu/1hGjcZ7yiyeMUwC5+3DZw2x\nTkCZefjqOnu0biUP1WyNU8OC+XwX3JXdKYrCG/HI3NFpY0nFUfHXkw4KUg2c\nw0ek0nbozB8UyM2hdI1LIWFwwvR7uQiFVTOKwBBh5lVIIu/YhxwpK/8ywI2W\naURiBrIz/Zctxs33HGk/w6JkzF0W/Q9GiLI30WWUKTQV2vSUdHeBLevsNh4W\n4MtO01UJGsU5e5wJmGn1r7szjWev2ZYmaxaeIIFa9p7Qe8/8017XCa/+tvJK\nS2anuwsJwjjXKpkJbYT14cLfWHEFYmmXVa59ri95ZKbmOW9xm1cKduWK3vOY\n6JtseZ/zOMjuGSG1QaqnVmosd3+8TclhsxPg9GeqbcgnI47uhRzp9Nb6XKIj\neCYiGYFjMAofT5Y5xdmPYp2ssDu74/m6S+CZGokiG7RuEkcUFXrpebT20eKL\n/6BkIqA/Z1ioLi5udtH+8Cic6pTEQ6jGwWwFVSu+cPgCgp2zFun00LwfDUdK\n8GMYP9lJ/fEuJovYfxXfamuVJkugdHvAbzJcf2B94+hwxZ9xZ393Cj7CwmZM\ne8r80JHL+OgU2B1g0ar3aM8gc1UNVcwQvRYrrb9Cw7H5ik8ALAolIatlLjWl\nlQTw\r\n=9Tfh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFfN8jGPsmumH2gaNzjqzsxDnDP1BcqWXIAHSy44VHvQIhAOjLQg0pU1enh321KJPBVsHtNqWsUauvHbelNS6oeZ4X"}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_2.2.3-next.0_1570846930553_0.21138080744053123"},"_hasShrinkwrap":false},"2.2.3-next.1":{"name":"@airgram-dev/web","version":"2.2.3-next.1","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^2.3.0-next.0","tdweb":"^1.4.3"},"gitHead":"b5570fa683582e6fd34ae63960ba16ba8e3b6328","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"readme":"# Airgram for `tdweb`\n\nUse [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.\n\n## Features\n\n- Strictly typed;\n- Documentation out of the box;\n- Supports models;\n- Built on middleware;\n\nAll TDLib classes and methods are described and have suitable wrappers in Airgram. There are only two differences:\n- All parameter names are represent in \"camelCase\".\n- Parameter `@type` renamed to `_`.\n\n## Documentation\n- [Installation](#installation) \n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Api reference](#api-reference)\n---\nCheck out `airgram` documentation:\n- [Middleware](https://github.com/airgram/airgram#middleware)\n- [Getting updates](https://github.com/airgram/airgram#getting-updates)\n---\nTDLib API reference:\n- [TDLib methods](https://github.com/airgram/airgram-api/tree/master/docs/td-methods.md)\n- [TDLib input types](https://github.com/airgram/airgram-api/tree/master/docs/td-inputs.md)\n- [TDLib output types](https://github.com/airgram/airgram-api/tree/master/docs/td-outputs.md)\n\n## Installation\n```bash\nnpm install tdweb-airgram\n```\n\n## Usage\n- [Webpack example](https://github.com/airgram/tdweb-airgram/tree/master/examples/webpack-config)\n- [Rollup example](https://github.com/airgram/tdweb-airgram/tree/master/examples/rollup-example)\n\n## Configuration\n\nThis section describes the options you can pass to `Airgram` constructor:\n\n```typescript\nimport { Airgram } from 'tdweb-airgram'\n\nconst airgram = new Airgram({\n  // options\n})\n```\n\n### TDLib options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `useTestDc` | `boolean` | If set to true, the Telegram test environment will be used instead of the production  environment |\n| `databaseDirectory` | `string` | The path to the directory for the persistent database |\n| `filesDirectory` | `string` | The path to the directory for storing files |\n| `useFileDatabase` | `boolean` | If set to true, information about downloaded and uploaded files will be saved between application restarts |\n| `useChatInfoDatabase` | `boolean` | If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies `useFileDatabase` |\n| `useMessageDatabase` | `boolean` | If set to true, the library will maintain a cache of chats and messages. Implies `useChatInfoDatabase` |\n| `useSecretChats` | `boolean` | If set to true, support for secret chats will be enabled |\n| `apiId` | `number` | Application identifier for Telegram API access, which can be obtained at https://my.telegram.org |\n| `apiHash` | `string` | Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org |\n| `systemLanguageCode` | `string` | IETF language tag of the user's operating system language |\n| `deviceModel` | `string` | Model of the device the application is being run on |\n| `systemVersion` | `string` | Version of the operating system the application is being run on |\n| `applicationVersion` | `string` | Application version |\n| `enableStorageOptimizer` | `boolean` | If set to true, old files will automatically be deleted |\n| `ignoreFileNames` | `boolean` | If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name |\n| `databaseEncryptionKey` | `string` | Encryption key |\n\n### `tdweb` options:\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `instanceName` | `string` | Name of the TDLib instance. Currently only one instance of TdClient with a given name is allowed. All but one instances with the same name will be automatically closed. Usually, the newest non-background instance is kept alive. Files will be stored in an IndexedDb table with the same name. |\n| `isBackground` | `boolean` | Pass true, if the instance is opened from the background. Default: `false` |\n| `jsLogVerbosityLevel` | `string` | The initial verbosity level of the JavaScript part of the code (one of 'error', 'warning', 'info', 'log', 'debug'). Default: `info` |\n| `logVerbosityLevel` | `number` | The initial verbosity level for the TDLib internal logging (0-1023). Default: 2 |\n| `useDatabase` | `boolean` | Pass false to use TDLib without database and secret chats. It will significantly improve loading time, but some functionality will be unavailable. Default: `true` |\n| `readOnly` | `boolean` | For debug only. Pass true to open TDLib database in read-only mode. Default: `false` |\n| `mode` | `string` | For debug only. The type of the TDLib build to use. 'asmjs' for asm.js and 'wasm' for WebAssembly. If mode == 'auto' WebAbassembly will be used if supported by browser, asm.js otherwise. Default: `auto` |\n\n\n### Other options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `models` | Function | Contains function, which converts plain JSON objects to models. [Details](https://github.com/airgram/airgram-use-models). |\n| `contextFactory` | Function | Function that returns custom middleware context. [Details](#ctx). |\n\n## API reference\n\nThis section describes public API of an `Airgram` instance:\n\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `api` | Object | Contains wrappers for all [TDLib methods](https://github.com/airgram/airgram-api/blob/master/docs/td-methods.md). |\n| `config` | Object | Airgram configuration. Readonly. |\n| `catch` | `(handler) => void` | Overrides default error handler. Argument `handler` takes a function: `(error: Error, ctx?: Record<string, any>) => void`  |\n\n## License\n\nThe source code is licensed under GPL v3. License is available [here](/LICENSE).\n","readmeFilename":"README.md","description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@2.2.3-next.1","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (darwin)","dist":{"integrity":"sha512-Tw633wtNJ+46ljyB7PcGu3r+SDYSi6Y1ON3rQxMcBMAH/JT4PRo7p5QX38PcwZN9gRF7+tNUO6XBn7Riu3hJxA==","shasum":"49bb0b63c75e95841d1fbab5fcff0a21620f707e","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-2.2.3-next.1.tgz","fileCount":10,"unpackedSize":17683,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpFK6CRA9TVsSAnZWagAAfrQP/3LDVunp4Yt2KiP2AzXN\n7GWF4BTXJT4nyfEW/NYy68CxkXB4k8Z2zPc40D3E06vimtaeLbrhmREy4QHm\ncq0QBBP5RDgYUas82o78Y44m8NmVf0V8oQfDJXRm+2s7sF3eazpC0h2f+Y9/\nBoYOElHMuCtaD9NXb0N0FtJInMY3jhU+jQhWgGNH0/RwRyPgmkzAnKiEPhb0\nYLEPyfue1YOfEFc48abrPRd3F+lfmng0UeAVSweyM9XiDja/5OmAaZVYTycC\njy4Tr0Avw8LFtjKd2+J/ysKPHnxZ100SVKJHgVUHvavpE3RbE5jiJH0+WPxg\nQnZhw4TA8tiiPN11MVwoLb+E/bN52Ipdy8JobcFIwX4Ykb5Q+yn6uGO6Ckfo\nXeJokKiPbUqfM2Y06wKspQsVlftpuo0MgKMEas9Elituv+jrxY2NBzYesjDr\nxGOxGt1Hb1v1tUt9TE3WTlmGhxZERjubCBFT5/GlVlOuw2vnS7aWSkm30ltg\nrn+S5OJ0v/qRVLniTZaWPypBpkiFAAY8ppnd0vAwY7ox4SD80mJPl9vu/vtu\nZ/UzZl30b3adEN1cTrR4vIGuF1CPv5YY11WbIbQac9j91Wdg4tWz2UstX574\nhVB0URsUpm9OTN80CIDKkHqqPMqC2pYtkVK9vkCx5W29KoK6DzxzDu2Qmztj\nGDwc\r\n=u8IB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBYL6CEGNxMwY0IOWME+zezFTayyFkQqmBf9lyw/rvSxAiEAhBXYiN4SwkW99qBVjZC19dG7CBeRgcdFiW666q9Z09M="}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_2.2.3-next.1_1571050169736_0.24524771870144146"},"_hasShrinkwrap":false},"2.3.0-next.2":{"name":"@airgram-dev/web","version":"2.3.0-next.2","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^2.3.0-next.3","tdweb":"^1.4.3"},"gitHead":"5ed20a2322f8e1ee8ce4119ca3b93e95f3086fa4","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"readme":"# Airgram for `tdweb`\n\nUse [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.\n\n## Features\n\n- Strictly typed;\n- Documentation out of the box;\n- Supports models;\n- Built on middleware;\n\nAll TDLib classes and methods are described and have suitable wrappers in Airgram. There are only two differences:\n- All parameter names are represent in \"camelCase\".\n- Parameter `@type` renamed to `_`.\n\n## Documentation\n- [Installation](#installation) \n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Api reference](#api-reference)\n---\nCheck out `airgram` documentation:\n- [Middleware](https://github.com/airgram/airgram#middleware)\n- [Getting updates](https://github.com/airgram/airgram#getting-updates)\n---\nTDLib API reference:\n- [TDLib methods](https://github.com/airgram/airgram-api/tree/master/docs/td-methods.md)\n- [TDLib input types](https://github.com/airgram/airgram-api/tree/master/docs/td-inputs.md)\n- [TDLib output types](https://github.com/airgram/airgram-api/tree/master/docs/td-outputs.md)\n\n## Installation\n```bash\nnpm install tdweb-airgram\n```\n\n## Usage\n- [Webpack example](https://github.com/airgram/tdweb-airgram/tree/master/examples/webpack-config)\n- [Rollup example](https://github.com/airgram/tdweb-airgram/tree/master/examples/rollup-example)\n\n## Configuration\n\nThis section describes the options you can pass to `Airgram` constructor:\n\n```typescript\nimport { Airgram } from 'tdweb-airgram'\n\nconst airgram = new Airgram({\n  // options\n})\n```\n\n### TDLib options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `useTestDc` | `boolean` | If set to true, the Telegram test environment will be used instead of the production  environment |\n| `databaseDirectory` | `string` | The path to the directory for the persistent database |\n| `filesDirectory` | `string` | The path to the directory for storing files |\n| `useFileDatabase` | `boolean` | If set to true, information about downloaded and uploaded files will be saved between application restarts |\n| `useChatInfoDatabase` | `boolean` | If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies `useFileDatabase` |\n| `useMessageDatabase` | `boolean` | If set to true, the library will maintain a cache of chats and messages. Implies `useChatInfoDatabase` |\n| `useSecretChats` | `boolean` | If set to true, support for secret chats will be enabled |\n| `apiId` | `number` | Application identifier for Telegram API access, which can be obtained at https://my.telegram.org |\n| `apiHash` | `string` | Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org |\n| `systemLanguageCode` | `string` | IETF language tag of the user's operating system language |\n| `deviceModel` | `string` | Model of the device the application is being run on |\n| `systemVersion` | `string` | Version of the operating system the application is being run on |\n| `applicationVersion` | `string` | Application version |\n| `enableStorageOptimizer` | `boolean` | If set to true, old files will automatically be deleted |\n| `ignoreFileNames` | `boolean` | If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name |\n| `databaseEncryptionKey` | `string` | Encryption key |\n\n### `tdweb` options:\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `instanceName` | `string` | Name of the TDLib instance. Currently only one instance of TdClient with a given name is allowed. All but one instances with the same name will be automatically closed. Usually, the newest non-background instance is kept alive. Files will be stored in an IndexedDb table with the same name. |\n| `isBackground` | `boolean` | Pass true, if the instance is opened from the background. Default: `false` |\n| `jsLogVerbosityLevel` | `string` | The initial verbosity level of the JavaScript part of the code (one of 'error', 'warning', 'info', 'log', 'debug'). Default: `info` |\n| `logVerbosityLevel` | `number` | The initial verbosity level for the TDLib internal logging (0-1023). Default: 2 |\n| `useDatabase` | `boolean` | Pass false to use TDLib without database and secret chats. It will significantly improve loading time, but some functionality will be unavailable. Default: `true` |\n| `readOnly` | `boolean` | For debug only. Pass true to open TDLib database in read-only mode. Default: `false` |\n| `mode` | `string` | For debug only. The type of the TDLib build to use. 'asmjs' for asm.js and 'wasm' for WebAssembly. If mode == 'auto' WebAbassembly will be used if supported by browser, asm.js otherwise. Default: `auto` |\n\n\n### Other options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `models` | Function | Contains function, which converts plain JSON objects to models. [Details](https://github.com/airgram/airgram-use-models). |\n| `contextFactory` | Function | Function that returns custom middleware context. [Details](#ctx). |\n\n## API reference\n\nThis section describes public API of an `Airgram` instance:\n\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `api` | Object | Contains wrappers for all [TDLib methods](https://github.com/airgram/airgram-api/blob/master/docs/td-methods.md). |\n| `config` | Object | Airgram configuration. Readonly. |\n| `catch` | `(handler) => void` | Overrides default error handler. Argument `handler` takes a function: `(error: Error, ctx?: Record<string, any>) => void`  |\n\n## License\n\nThe source code is licensed under GPL v3. License is available [here](/LICENSE).\n","readmeFilename":"README.md","description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@2.3.0-next.2","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (darwin)","dist":{"integrity":"sha512-xM8YMl0y77Dxf2adfKH+a1ZG/c718lh9HhR3DqaEzo/OnM7/Hrq8Ug5iIvspsF7dqMHCVjcy5zEuuCb1j2hN/Q==","shasum":"807fac1635710425e96b77a19dc051ad2957d456","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-2.3.0-next.2.tgz","fileCount":20,"unpackedSize":29570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqsaxCRA9TVsSAnZWagAABA8P/jqWxdXyC7+Nc10tc5n7\nBfaZBWoJoPFW9TAx0hTncJA4tTD4j1CaphSMSnQbX8tnrGuMG8lQWLLOSu0W\nOkUvnoW9iJ/5SiR4br6m5e5amHQy4zOf9+zsZt3l/e3ZFoeEsI7lChIU1103\nmHSXQGGTm15PbuUTEgK+hu8FPLZueLQ54//P3fGeljMp4sU3wytgvtkMvHYp\nbP07pS2wqxDA9uZw7PvZKnvXCVssY4z+DjltDbRWLR7syGwusBaPf9ODgf/4\ngKX02BYeYuMyXXvQwGn/hFrwn3x7u4GvcInfXlnzG9QKX6pIwbXmZAY7EExM\nrf/E/bI8Z6dKeLjDwbjY0/Al3N0MyFmA5MMjAw6z+aXQhlf6gdEUP4knplc2\nnDAU/KZV4dkCPt2V1F1avqVPZPtZKYm56JGQfnmfHV28x5jDDYkX1x3cvngN\nweEn6oxTxmEhbPQC+oJamDiVyLwdlf+0iuyCTwZ4ezkewPn2bbKlxAAaXAWR\nf/vpO8jB23znU9SvQbOzjQYsOLLLHyCdJBDZKRw3JIpA4kOvhCit0ucLCK+Y\nnpUnVUD4SJhnP3G9xS60kJkMYuwmYf5fx6Xg+dikmusVfJYQ+fDrS23GrbuB\nT2q9RQWvkEtLZOycQ7tAYfmZy9DGRmazmmXCO92xpTpmbL8l2auoKmA7l6XB\nLG6J\r\n=q/Ey\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDym8yxoktyLDBvYT327brExB6awtFB2cARlCkY0z23oQIgcDqFOPNIGC4Q1wnI7oC0WsE1kXUN6JsRT0g/beyV9EQ="}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_2.3.0-next.2_1571473072736_0.9348768188714653"},"_hasShrinkwrap":false},"2.3.0-next.4":{"name":"@airgram-dev/web","version":"2.3.0-next.4","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^2.3.0-next.5","tdweb":"^1.4.3"},"gitHead":"98f048b211be03c09f45067f32e03abae6d70579","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"readme":"# Airgram for `tdweb`\n\nUse [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.\n\n## Features\n\n- Strictly typed;\n- Documentation out of the box;\n- Supports models;\n- Built on middleware;\n\nAll TDLib classes and methods are described and have suitable wrappers in Airgram. There are only two differences:\n- All parameter names are represent in \"camelCase\".\n- Parameter `@type` renamed to `_`.\n\n## Documentation\n- [Installation](#installation) \n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Api reference](#api-reference)\n---\nCheck out `airgram` documentation:\n- [Middleware](https://github.com/airgram/airgram#middleware)\n- [Getting updates](https://github.com/airgram/airgram#getting-updates)\n---\nTDLib API reference:\n- [TDLib methods](https://github.com/airgram/airgram-api/tree/master/docs/td-methods.md)\n- [TDLib input types](https://github.com/airgram/airgram-api/tree/master/docs/td-inputs.md)\n- [TDLib output types](https://github.com/airgram/airgram-api/tree/master/docs/td-outputs.md)\n\n## Installation\n```bash\nnpm install tdweb-airgram\n```\n\n## Usage\n- [Webpack example](https://github.com/airgram/tdweb-airgram/tree/master/examples/webpack-config)\n- [Rollup example](https://github.com/airgram/tdweb-airgram/tree/master/examples/rollup-example)\n\n## Configuration\n\nThis section describes the options you can pass to `Airgram` constructor:\n\n```typescript\nimport { Airgram } from 'tdweb-airgram'\n\nconst airgram = new Airgram({\n  // options\n})\n```\n\n### TDLib options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `useTestDc` | `boolean` | If set to true, the Telegram test environment will be used instead of the production  environment |\n| `databaseDirectory` | `string` | The path to the directory for the persistent database |\n| `filesDirectory` | `string` | The path to the directory for storing files |\n| `useFileDatabase` | `boolean` | If set to true, information about downloaded and uploaded files will be saved between application restarts |\n| `useChatInfoDatabase` | `boolean` | If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies `useFileDatabase` |\n| `useMessageDatabase` | `boolean` | If set to true, the library will maintain a cache of chats and messages. Implies `useChatInfoDatabase` |\n| `useSecretChats` | `boolean` | If set to true, support for secret chats will be enabled |\n| `apiId` | `number` | Application identifier for Telegram API access, which can be obtained at https://my.telegram.org |\n| `apiHash` | `string` | Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org |\n| `systemLanguageCode` | `string` | IETF language tag of the user's operating system language |\n| `deviceModel` | `string` | Model of the device the application is being run on |\n| `systemVersion` | `string` | Version of the operating system the application is being run on |\n| `applicationVersion` | `string` | Application version |\n| `enableStorageOptimizer` | `boolean` | If set to true, old files will automatically be deleted |\n| `ignoreFileNames` | `boolean` | If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name |\n| `databaseEncryptionKey` | `string` | Encryption key |\n\n### `tdweb` options:\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `instanceName` | `string` | Name of the TDLib instance. Currently only one instance of TdClient with a given name is allowed. All but one instances with the same name will be automatically closed. Usually, the newest non-background instance is kept alive. Files will be stored in an IndexedDb table with the same name. |\n| `isBackground` | `boolean` | Pass true, if the instance is opened from the background. Default: `false` |\n| `jsLogVerbosityLevel` | `string` | The initial verbosity level of the JavaScript part of the code (one of 'error', 'warning', 'info', 'log', 'debug'). Default: `info` |\n| `logVerbosityLevel` | `number` | The initial verbosity level for the TDLib internal logging (0-1023). Default: 2 |\n| `useDatabase` | `boolean` | Pass false to use TDLib without database and secret chats. It will significantly improve loading time, but some functionality will be unavailable. Default: `true` |\n| `readOnly` | `boolean` | For debug only. Pass true to open TDLib database in read-only mode. Default: `false` |\n| `mode` | `string` | For debug only. The type of the TDLib build to use. 'asmjs' for asm.js and 'wasm' for WebAssembly. If mode == 'auto' WebAbassembly will be used if supported by browser, asm.js otherwise. Default: `auto` |\n\n\n### Other options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `models` | Function | Contains function, which converts plain JSON objects to models. [Details](https://github.com/airgram/airgram-use-models). |\n| `contextFactory` | Function | Function that returns custom middleware context. [Details](#ctx). |\n\n## API reference\n\nThis section describes public API of an `Airgram` instance:\n\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `api` | Object | Contains wrappers for all [TDLib methods](https://github.com/airgram/airgram-api/blob/master/docs/td-methods.md). |\n| `config` | Object | Airgram configuration. Readonly. |\n| `catch` | `(handler) => void` | Overrides default error handler. Argument `handler` takes a function: `(error: Error, ctx?: Record<string, any>) => void`  |\n\n## License\n\nThe source code is licensed under GPL v3. License is available [here](/LICENSE).\n","readmeFilename":"README.md","description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@2.3.0-next.4","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (darwin)","dist":{"integrity":"sha512-BaDcvlwWmH6c1KULNuiRtlhKp/XTXs33sduKoyLr4oJGhhkQR2rIMfVY2Pk58qwe72W7RYw5wBUS8HNVFeT0kw==","shasum":"d78004e81aa7b650a369bb0f779359e12799d188","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-2.3.0-next.4.tgz","fileCount":20,"unpackedSize":29589,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdq8qiCRA9TVsSAnZWagAATScP/iSzo42LgFhF2vnTh/n0\nrjRU4gzejl8nnT9XUnn1xELd1o8Rf1tLOveN03v1LMHEaLzI7TNnD1ClLNc1\nKs/sQZfi21xKfE0FNX7B28BNbR9K4hYWPEwIl1u/5O8Fi6ETKCkOmb8KdMmA\n3EhtbITTo5LZ7wqHdr5dQ3uFElM0xbTpkMECnZ4xoG3BJkLD1u10FQyW5RGl\nACo3tMaDNxvIB0h6plpfK0Wu0NjqlBAVCQifjFD4OJXuiTc4c/4EhE3QN2J5\nZTh328ACLKVkt3iBaW7z229uckmsR6HdtQRRXchFZGAlebpyjFjj19d4w/Se\n2rCfqEnhUTNIbkLAg/YbLPr+2oNXoeQTQGYUqpPheL83CfBPesecwu+cYwJe\n6moVBq6ZKHFRDhfUe/vD62/QFOfywvdlCKDMVusw8hzrr+xZ7qXoOQOp/0lz\nGItBuqQjlkGrmal3AvljzXXX5Lytm6JRX43MMKRFpyxlC12rPnKKAmBUUnzt\niS3Ju4buicBHw52PKbu6aWsXSdzeZCwO/JgACmtf6oPTQqFK31/SdWRZUSPt\nyahmfokBMIpIjgaRhjun6krdhlFW0qQ1iwUYJqEsQQLAYQSgzDndepj/uJv5\nPOrs9j9av3usDaxAWhy1qZKOGf1nvqCLoMfMyRkqG5Ro6ypuwxIjqchxOfwf\nLY62\r\n=4LME\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHuwaN6nxSMnO8vwbeYxIiddtJSrIvWNpV1+LUACCGOkAiAbi1kftZTNUhqe7InMFQiM9TVipHGxtSnwBwjggqknXQ=="}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_2.3.0-next.4_1571539618308_0.497527503965574"},"_hasShrinkwrap":false},"2.3.0-next.5":{"name":"@airgram-dev/web","version":"2.3.0-next.5","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^2.3.0-next.6","tdweb":"~1.5.0"},"gitHead":"7a64648285f93c619985591a3e372abe916a5662","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"readme":"# Airgram for `tdweb`\n\nUse [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.\n\n## Features\n\n- Strictly typed;\n- Documentation out of the box;\n- Supports models;\n- Built on middleware;\n\nAll TDLib classes and methods are described and have suitable wrappers in Airgram. There are only two differences:\n- All parameter names are represent in \"camelCase\".\n- Parameter `@type` renamed to `_`.\n\n## Documentation\n- [Installation](#installation) \n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Api reference](#api-reference)\n---\nCheck out `airgram` documentation:\n- [Middleware](https://github.com/airgram/airgram#middleware)\n- [Getting updates](https://github.com/airgram/airgram#getting-updates)\n---\nTDLib API reference:\n- [TDLib methods](https://github.com/airgram/airgram-api/tree/master/docs/td-methods.md)\n- [TDLib input types](https://github.com/airgram/airgram-api/tree/master/docs/td-inputs.md)\n- [TDLib output types](https://github.com/airgram/airgram-api/tree/master/docs/td-outputs.md)\n\n## Installation\n```bash\nnpm install tdweb-airgram\n```\n\n## Usage\n- [Webpack example](https://github.com/airgram/tdweb-airgram/tree/master/examples/webpack-config)\n- [Rollup example](https://github.com/airgram/tdweb-airgram/tree/master/examples/rollup-example)\n\n## Configuration\n\nThis section describes the options you can pass to `Airgram` constructor:\n\n```typescript\nimport { Airgram } from 'tdweb-airgram'\n\nconst airgram = new Airgram({\n  // options\n})\n```\n\n### TDLib options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `useTestDc` | `boolean` | If set to true, the Telegram test environment will be used instead of the production  environment |\n| `databaseDirectory` | `string` | The path to the directory for the persistent database |\n| `filesDirectory` | `string` | The path to the directory for storing files |\n| `useFileDatabase` | `boolean` | If set to true, information about downloaded and uploaded files will be saved between application restarts |\n| `useChatInfoDatabase` | `boolean` | If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies `useFileDatabase` |\n| `useMessageDatabase` | `boolean` | If set to true, the library will maintain a cache of chats and messages. Implies `useChatInfoDatabase` |\n| `useSecretChats` | `boolean` | If set to true, support for secret chats will be enabled |\n| `apiId` | `number` | Application identifier for Telegram API access, which can be obtained at https://my.telegram.org |\n| `apiHash` | `string` | Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org |\n| `systemLanguageCode` | `string` | IETF language tag of the user's operating system language |\n| `deviceModel` | `string` | Model of the device the application is being run on |\n| `systemVersion` | `string` | Version of the operating system the application is being run on |\n| `applicationVersion` | `string` | Application version |\n| `enableStorageOptimizer` | `boolean` | If set to true, old files will automatically be deleted |\n| `ignoreFileNames` | `boolean` | If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name |\n| `databaseEncryptionKey` | `string` | Encryption key |\n\n### `tdweb` options:\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `instanceName` | `string` | Name of the TDLib instance. Currently only one instance of TdClient with a given name is allowed. All but one instances with the same name will be automatically closed. Usually, the newest non-background instance is kept alive. Files will be stored in an IndexedDb table with the same name. |\n| `isBackground` | `boolean` | Pass true, if the instance is opened from the background. Default: `false` |\n| `jsLogVerbosityLevel` | `string` | The initial verbosity level of the JavaScript part of the code (one of 'error', 'warning', 'info', 'log', 'debug'). Default: `info` |\n| `logVerbosityLevel` | `number` | The initial verbosity level for the TDLib internal logging (0-1023). Default: 2 |\n| `useDatabase` | `boolean` | Pass false to use TDLib without database and secret chats. It will significantly improve loading time, but some functionality will be unavailable. Default: `true` |\n| `readOnly` | `boolean` | For debug only. Pass true to open TDLib database in read-only mode. Default: `false` |\n| `mode` | `string` | For debug only. The type of the TDLib build to use. 'asmjs' for asm.js and 'wasm' for WebAssembly. If mode == 'auto' WebAbassembly will be used if supported by browser, asm.js otherwise. Default: `auto` |\n\n\n### Other options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `models` | Function | Contains function, which converts plain JSON objects to models. [Details](https://github.com/airgram/airgram-use-models). |\n| `contextFactory` | Function | Function that returns custom middleware context. [Details](#ctx). |\n\n## API reference\n\nThis section describes public API of an `Airgram` instance:\n\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `api` | Object | Contains wrappers for all [TDLib methods](https://github.com/airgram/airgram-api/blob/master/docs/td-methods.md). |\n| `config` | Object | Airgram configuration. Readonly. |\n| `catch` | `(handler) => void` | Overrides default error handler. Argument `handler` takes a function: `(error: Error, ctx?: Record<string, any>) => void`  |\n\n## License\n\nThe source code is licensed under GPL v3. License is available [here](/LICENSE).\n","readmeFilename":"README.md","description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@2.3.0-next.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.16.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-iuLD6vl55csJSITHTO4r6N8bQlu/HGn73awHcdCS/Jvyth2hb3h0UnCKLK/ebqAjb5w6i8sV87iB+seG27hgqQ==","shasum":"460ed833541a83252b5db431ab85b29b0fcd923e","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-2.3.0-next.5.tgz","fileCount":20,"unpackedSize":29589,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyl0kCRA9TVsSAnZWagAALAAP/jkFU8FzaEdobryO2C6a\nxk9ZyWVOSNc8M307mvz090gFwFElxK7LsR8uXh7rl3+2727lCvsypHgCa2im\n0ex8F28lXFlZ1W4YDa77m0fDRWMAImfFQYdIs4uQ0yc+1mos4gDRAUo61XaD\n1D0QB1tKkywDlWgP2Q1BnjbVWBw0nHWRnu1SI7YGJZ9pjxIJoZwzUw9W34h5\nD49FSuwThLPht2nLmE49Cxk5T9SHHDdtyemD+yBmFHgp2tcBO1FndNqhW7hn\ni0C8F++E+roGzIuixCeCN6yOe5jngz32H4ofmWu92C9NAbzSQUU9NigCUSFl\nmNkbPUNcr0i8mS2EueVB1xsBaXfCm1ZT7XUJsIZtucRoc1BbkQwfG/37i6X0\nCscrzPfVQBNlsEixzPIr3j/StipPMddaG0pGkiEm32DBmHbTnNwV65AlQSOu\nsha9FR0UAuJgEQICtlqejJMbWA077jRtkbm8QMAvN+p/aaB94I66j668O5ef\nzkd/WBZcHoWzVt1oZwIBAXqMq+DMA/qPB/Cgbw/18aS7N2a7s1mYBqpgLvUG\nNwnk7wvpHzrELKF/0+Fgc38m9WCd6DC+GD400oFRyYISnBi2GSordWZ/Q8BR\nHv71fgW2SES4vaRo8ccatIaxgt5LuF9poYfnviOPYJ3FWBPkkwlsvu4fAWes\nWk5y\r\n=4Wrw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUAtuxyA6dCZ9mH+Iktxr+bVS9kmV/dL3Rj5NDtMyjKgIgLJTTRQ84z4PfCH9ROzfw0kgHvchm13Wb5FqsUX6TNiI="}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_2.3.0-next.5_1573543204139_0.20155257604041954"},"_hasShrinkwrap":false},"2.3.0-next.6":{"name":"@airgram-dev/web","version":"2.3.0-next.6","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^2.3.0-next.7","tdweb":"~1.5.0"},"gitHead":"781b4f7ed68718e2625289c5bc83be3bb4507204","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"readme":"# Airgram for `tdweb`\n\nUse [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.\n\n## Features\n\n- Strictly typed;\n- Documentation out of the box;\n- Supports models;\n- Built on middleware;\n\nAll TDLib classes and methods are described and have suitable wrappers in Airgram. There are only two differences:\n- All parameter names are represent in \"camelCase\".\n- Parameter `@type` renamed to `_`.\n\n## Documentation\n- [Installation](#installation) \n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Api reference](#api-reference)\n---\nCheck out `airgram` documentation:\n- [Middleware](https://github.com/airgram/airgram#middleware)\n- [Getting updates](https://github.com/airgram/airgram#getting-updates)\n---\nTDLib API reference:\n- [TDLib methods](https://github.com/airgram/airgram-api/tree/master/docs/td-methods.md)\n- [TDLib input types](https://github.com/airgram/airgram-api/tree/master/docs/td-inputs.md)\n- [TDLib output types](https://github.com/airgram/airgram-api/tree/master/docs/td-outputs.md)\n\n## Installation\n```bash\nnpm install tdweb-airgram\n```\n\n## Usage\n- [Webpack example](https://github.com/airgram/tdweb-airgram/tree/master/examples/webpack-config)\n- [Rollup example](https://github.com/airgram/tdweb-airgram/tree/master/examples/rollup-example)\n\n## Configuration\n\nThis section describes the options you can pass to `Airgram` constructor:\n\n```typescript\nimport { Airgram } from 'tdweb-airgram'\n\nconst airgram = new Airgram({\n  // options\n})\n```\n\n### TDLib options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `useTestDc` | `boolean` | If set to true, the Telegram test environment will be used instead of the production  environment |\n| `databaseDirectory` | `string` | The path to the directory for the persistent database |\n| `filesDirectory` | `string` | The path to the directory for storing files |\n| `useFileDatabase` | `boolean` | If set to true, information about downloaded and uploaded files will be saved between application restarts |\n| `useChatInfoDatabase` | `boolean` | If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies `useFileDatabase` |\n| `useMessageDatabase` | `boolean` | If set to true, the library will maintain a cache of chats and messages. Implies `useChatInfoDatabase` |\n| `useSecretChats` | `boolean` | If set to true, support for secret chats will be enabled |\n| `apiId` | `number` | Application identifier for Telegram API access, which can be obtained at https://my.telegram.org |\n| `apiHash` | `string` | Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org |\n| `systemLanguageCode` | `string` | IETF language tag of the user's operating system language |\n| `deviceModel` | `string` | Model of the device the application is being run on |\n| `systemVersion` | `string` | Version of the operating system the application is being run on |\n| `applicationVersion` | `string` | Application version |\n| `enableStorageOptimizer` | `boolean` | If set to true, old files will automatically be deleted |\n| `ignoreFileNames` | `boolean` | If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name |\n| `databaseEncryptionKey` | `string` | Encryption key |\n\n### `tdweb` options:\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `instanceName` | `string` | Name of the TDLib instance. Currently only one instance of TdClient with a given name is allowed. All but one instances with the same name will be automatically closed. Usually, the newest non-background instance is kept alive. Files will be stored in an IndexedDb table with the same name. |\n| `isBackground` | `boolean` | Pass true, if the instance is opened from the background. Default: `false` |\n| `jsLogVerbosityLevel` | `string` | The initial verbosity level of the JavaScript part of the code (one of 'error', 'warning', 'info', 'log', 'debug'). Default: `info` |\n| `logVerbosityLevel` | `number` | The initial verbosity level for the TDLib internal logging (0-1023). Default: 2 |\n| `useDatabase` | `boolean` | Pass false to use TDLib without database and secret chats. It will significantly improve loading time, but some functionality will be unavailable. Default: `true` |\n| `readOnly` | `boolean` | For debug only. Pass true to open TDLib database in read-only mode. Default: `false` |\n| `mode` | `string` | For debug only. The type of the TDLib build to use. 'asmjs' for asm.js and 'wasm' for WebAssembly. If mode == 'auto' WebAbassembly will be used if supported by browser, asm.js otherwise. Default: `auto` |\n\n\n### Other options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `models` | Function | Contains function, which converts plain JSON objects to models. [Details](https://github.com/airgram/airgram-use-models). |\n| `contextFactory` | Function | Function that returns custom middleware context. [Details](#ctx). |\n\n## API reference\n\nThis section describes public API of an `Airgram` instance:\n\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `api` | Object | Contains wrappers for all [TDLib methods](https://github.com/airgram/airgram-api/blob/master/docs/td-methods.md). |\n| `config` | Object | Airgram configuration. Readonly. |\n| `catch` | `(handler) => void` | Overrides default error handler. Argument `handler` takes a function: `(error: Error, ctx?: Record<string, any>) => void`  |\n\n## License\n\nThe source code is licensed under GPL v3. License is available [here](/LICENSE).\n","readmeFilename":"README.md","description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@2.3.0-next.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.16.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-E8fmNLhM4D3t1Yz/DuMsnyPHZvW039GC3XpWJl3ESWpT2zKeTGr4LmrXhPeUl7O3phOxqfrmtGnFSPwkuIFAvw==","shasum":"b7063e5de410b0dedad2251cf8784ea74433fb0d","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-2.3.0-next.6.tgz","fileCount":20,"unpackedSize":29589,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdymPKCRA9TVsSAnZWagAA6eQP+gNGWiOdiF7Az3mjWx8Q\nx097wsCQ70VkUiDfLQq7zq9FbvcZ2Z7+SKjo8NIlYeHN+C/gUkxa9RSLhBcw\nidT1iEjFRR695z1MprlqX7tPicEnt6aMafv+apUZYHptcDzIKBhWogykRPdD\nF7TI3R3Y7s8/0uY7KvKQCNTrgvrOyp5trbaoDPkuiv1KVTbVEPmXiZRse6QU\nr+3jFNj+sge9yc7vjn64yL16YwCZtPWH3f9meqljhW70M6+mhPCn47JIwZ8Q\nqS1t8V57ij15SL+XG9FTdDXMyMky4xdZd8X4Pxfktc9sDZX5XDAMUOHl0CbL\n5zvGs34qEAm6l2wN1oY30VYOxQbwqiMOplbL9JV98HEEkgKoZ/8kVFGYDYKp\nQHiMr4mGM71V4SnfVd7NQ78Ul95jVEbEaMKKS/VmtcxCD1CL/eTnBTB/YHtI\npQMr5BIezYmKZ10AGPIGXKxZe/VrNLehD99sRYQnleuuUJwlliqlucmEWBMP\nyxCzAw0bXKauG7+3Ss59qrx8r29WI7eXROmlAigmhaXDzm7kiTxaKLtfxaB3\nK8OPuhUSIoWLbFLgiRJaehECIlRpBqcFLZRChCvg1DvyzadX2AYNA5ArCf41\n2RBBPGuqYF7xVadYSN5VDFLwxuVIQKmp0lanAwlhCa7aNa8tq9hkIPd04SN6\nPDDH\r\n=Q6ew\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDooumg7la2EmFXzI6u0I2nDU0/+yD6tShsa5uEc4/AsgIhAMkljZlq4GOna0SSrUXuVaoUBDSFVilwXkPxnN29oO8G"}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_2.3.0-next.6_1573544906244_0.30902363069493366"},"_hasShrinkwrap":false},"2.3.0-next.7":{"name":"@airgram-dev/web","version":"2.3.0-next.7","private":false,"main":"index.js","types":"index.d.ts","keywords":["telegram","tdweb","airgram"],"publishConfig":{"access":"public"},"dependencies":{"@airgram-dev/core":"^2.3.0-next.8","tdweb":"~1.5.0"},"gitHead":"66d8a2f6d8fa31f10610a442d2abb4401452e4ca","sideEffects":false,"author":{"name":"Alexander Krisko"},"homepage":"https://airgram.io","repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"readme":"# Airgram for `tdweb`\n\nUse [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.\n\n## Features\n\n- Strictly typed;\n- Documentation out of the box;\n- Supports models;\n- Built on middleware;\n\nAll TDLib classes and methods are described and have suitable wrappers in Airgram. There are only two differences:\n- All parameter names are represent in \"camelCase\".\n- Parameter `@type` renamed to `_`.\n\n## Documentation\n- [Installation](#installation) \n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Api reference](#api-reference)\n---\nCheck out `airgram` documentation:\n- [Middleware](https://github.com/airgram/airgram#middleware)\n- [Getting updates](https://github.com/airgram/airgram#getting-updates)\n---\nTDLib API reference:\n- [TDLib methods](https://github.com/airgram/airgram-api/tree/master/docs/td-methods.md)\n- [TDLib input types](https://github.com/airgram/airgram-api/tree/master/docs/td-inputs.md)\n- [TDLib output types](https://github.com/airgram/airgram-api/tree/master/docs/td-outputs.md)\n\n## Installation\n```bash\nnpm install tdweb-airgram\n```\n\n## Usage\n- [Webpack example](https://github.com/airgram/tdweb-airgram/tree/master/examples/webpack-config)\n- [Rollup example](https://github.com/airgram/tdweb-airgram/tree/master/examples/rollup-example)\n\n## Configuration\n\nThis section describes the options you can pass to `Airgram` constructor:\n\n```typescript\nimport { Airgram } from 'tdweb-airgram'\n\nconst airgram = new Airgram({\n  // options\n})\n```\n\n### TDLib options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `useTestDc` | `boolean` | If set to true, the Telegram test environment will be used instead of the production  environment |\n| `databaseDirectory` | `string` | The path to the directory for the persistent database |\n| `filesDirectory` | `string` | The path to the directory for storing files |\n| `useFileDatabase` | `boolean` | If set to true, information about downloaded and uploaded files will be saved between application restarts |\n| `useChatInfoDatabase` | `boolean` | If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies `useFileDatabase` |\n| `useMessageDatabase` | `boolean` | If set to true, the library will maintain a cache of chats and messages. Implies `useChatInfoDatabase` |\n| `useSecretChats` | `boolean` | If set to true, support for secret chats will be enabled |\n| `apiId` | `number` | Application identifier for Telegram API access, which can be obtained at https://my.telegram.org |\n| `apiHash` | `string` | Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org |\n| `systemLanguageCode` | `string` | IETF language tag of the user's operating system language |\n| `deviceModel` | `string` | Model of the device the application is being run on |\n| `systemVersion` | `string` | Version of the operating system the application is being run on |\n| `applicationVersion` | `string` | Application version |\n| `enableStorageOptimizer` | `boolean` | If set to true, old files will automatically be deleted |\n| `ignoreFileNames` | `boolean` | If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name |\n| `databaseEncryptionKey` | `string` | Encryption key |\n\n### `tdweb` options:\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `instanceName` | `string` | Name of the TDLib instance. Currently only one instance of TdClient with a given name is allowed. All but one instances with the same name will be automatically closed. Usually, the newest non-background instance is kept alive. Files will be stored in an IndexedDb table with the same name. |\n| `isBackground` | `boolean` | Pass true, if the instance is opened from the background. Default: `false` |\n| `jsLogVerbosityLevel` | `string` | The initial verbosity level of the JavaScript part of the code (one of 'error', 'warning', 'info', 'log', 'debug'). Default: `info` |\n| `logVerbosityLevel` | `number` | The initial verbosity level for the TDLib internal logging (0-1023). Default: 2 |\n| `useDatabase` | `boolean` | Pass false to use TDLib without database and secret chats. It will significantly improve loading time, but some functionality will be unavailable. Default: `true` |\n| `readOnly` | `boolean` | For debug only. Pass true to open TDLib database in read-only mode. Default: `false` |\n| `mode` | `string` | For debug only. The type of the TDLib build to use. 'asmjs' for asm.js and 'wasm' for WebAssembly. If mode == 'auto' WebAbassembly will be used if supported by browser, asm.js otherwise. Default: `auto` |\n\n\n### Other options\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `models` | Function | Contains function, which converts plain JSON objects to models. [Details](https://github.com/airgram/airgram-use-models). |\n| `contextFactory` | Function | Function that returns custom middleware context. [Details](#ctx). |\n\n## API reference\n\nThis section describes public API of an `Airgram` instance:\n\n\n| Key                | Type                     | Note                                                        |\n| ------------------ | ------------------------ | ----------------------------------------------------------- |\n| `api` | Object | Contains wrappers for all [TDLib methods](https://github.com/airgram/airgram-api/blob/master/docs/td-methods.md). |\n| `config` | Object | Airgram configuration. Readonly. |\n| `catch` | `(handler) => void` | Overrides default error handler. Argument `handler` takes a function: `(error: Error, ctx?: Record<string, any>) => void`  |\n\n## License\n\nThe source code is licensed under GPL v3. License is available [here](/LICENSE).\n","readmeFilename":"README.md","description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","bugs":{"url":"https://github.com/airgram/airgram/issues"},"_id":"@airgram-dev/web@2.3.0-next.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.16.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-AmbtlwabOu69WzfEFH0Y8USTXtlmE9kXLxw51VGC9+QSHw89Kcc8RNU7JH20AgOHDvDbLwlYg0wmWRyN5gYtFA==","shasum":"e60a4700c19be35fd7e52cd3862f77bf6af750e7","tarball":"https://registry.npmjs.org/@airgram-dev/web/-/web-2.3.0-next.7.tgz","fileCount":20,"unpackedSize":29589,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdymdECRA9TVsSAnZWagAAKB4P/1aRl2ni7cTkZHM4yL8O\nlMG20qYEWr6LS9/V99Yq9s/2yzwjfJ8tELesyoa9HWf/DjpCPxOKRrlcMjI6\niNSlPoQEyq6rsIT2SOVRb5rPr3Pj2f1JEHLPf4JDwuH6/Qdf3U8jwWY6FvLz\ngHGfJGyw+N6KMqJB5Aatq+c2M0i8d98VU/TaAuJCOMTIrMFzblUykW9wzXGb\naRfAJK4Qfp2XnepxFRnBdnF7AxPdjU5WAz8BAcJ4J055NxzZR9nzxGkpYUHk\nRL0MhH5Upzz0hgecr+kWCTFiuNAY3e7fqDxmv3+MCRv7J+C3FTUI2PzC+tzD\nenOW6a6MUUv3NnUFfB9Xhj2GatLipNut/wdlw1JAK+l6Ef2zQotM/ppch6hG\nEEekorJCwHNiHGFmEIkETwJe2oIXQyuK9o0j2iIm571SgFHGFV1LnAzEVqAO\nxIb5zyiD6K1TRoH7cCMU0bjhFNexqJlhUxmbWQZ3QMsbUVlLZOUq7S0I1u/3\nxtTTznx4my00dQfZO3hzWKENnIhZwqkb5I1g9ftNQ5EJlbYbjkS08HaC9FMq\nntYhfmHU1w8r5wYT+BjeTZcuyYcUV3ydF8CE7HbcAvuu2qda2pz+G5qOgnD0\n0D0UGs+4zLsyjftbddoEAOI+sZg2PedP1IHieLqwqpvHy4C699Xzmkgh+zEo\nUfum\r\n=KpD9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEqXXw/dN/AITsDwezNSt4op6G+lGvRfT575gyAxqfIOAiEA3pLKDDaR0TIrpEFC70CWjQC2S3O08UCdjukK4zZQo38="}]},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"_npmUser":{"name":"esindger","email":"esindger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web_2.3.0-next.7_1573545795706_0.8540471261092344"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-07T11:15:55.726Z","2.0.5-next.3":"2019-08-07T11:15:56.057Z","modified":"2022-04-04T12:22:20.916Z","2.0.5-next.4":"2019-09-08T05:58:40.484Z","1.3.0-next.2":"2019-09-08T15:13:31.767Z","2.1.0":"2019-09-25T08:53:27.884Z","2.2.1-next.0":"2019-09-29T09:42:06.717Z","2.2.1":"2019-09-29T09:49:49.471Z","2.2.2-next.0":"2019-09-29T10:00:37.839Z","2.2.2":"2019-09-29T10:30:52.192Z","2.2.3-next.0":"2019-10-12T02:22:10.742Z","2.2.3-next.1":"2019-10-14T10:49:29.849Z","2.3.0-next.2":"2019-10-19T08:17:52.893Z","2.3.0-next.4":"2019-10-20T02:46:58.443Z","2.3.0-next.5":"2019-11-12T07:20:04.284Z","2.3.0-next.6":"2019-11-12T07:48:26.345Z","2.3.0-next.7":"2019-11-12T08:03:15.824Z"},"maintainers":[{"name":"esindger","email":"esindger@gmail.com"}],"description":"Use [`tdweb`](https://github.com/tdlib/td/tree/master/example/web/tdweb) on steroids.","homepage":"https://airgram.io","keywords":["telegram","tdweb","airgram"],"repository":{"type":"git","url":"git+https://github.com/airgram/airgram.git"},"author":{"name":"Alexander Krisko"},"bugs":{"url":"https://github.com/airgram/airgram/issues"},"readme":"","readmeFilename":""}