{"_id":"@belyaev_dev/nestjs-amo","_rev":"4-e8928bf1b549bf55cdd43b68cdd938e2","name":"@belyaev_dev/nestjs-amo","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@belyaev_dev/nestjs-amo","version":"0.1.0","keywords":["nestjs","amocrm","kommo","api","oauth2.0"],"author":{"name":"Yaroslav Tolstoy","email":"t.me/yatolstoy"},"license":"MIT","_id":"@belyaev_dev/nestjs-amo@0.1.0","maintainers":[{"name":"belyaev_dev","email":"battler73@yandex.ru"}],"homepage":"https://github.com/yatolstoy/nestjs-amo#readme","bugs":{"url":"https://github.com/yatolstoy/nestjs-amo/issues"},"dist":{"shasum":"a95dfb79ca306455a270789e35e08e0c634093a1","tarball":"https://registry.npmjs.org/@belyaev_dev/nestjs-amo/-/nestjs-amo-0.1.0.tgz","fileCount":30,"integrity":"sha512-dyKs3ayKp6KdnIe/fM3QPjAt9U1nLoIG4wbgONkhgR/WTWfblm2k7TXVjEKY7CwOKcUvGAxB+9HhD52+yY6FXg==","signatures":[{"sig":"MEUCIC8ymg8yBWRVhWYFPMLI532xiA6bnwGH7ez11IeGrLjrAiEA8isbZTilBQAhwr//cHfVs2JW35CQ5eZUae/7/9Towzs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":130382},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"b3318d63edd59e899190897e845edd2f72cd0c13","scripts":{"lint":"eslint  \"lib/**/*.ts\" --fix","build":"tsc","format":"prettier --write \"lib/**/*.ts\"","prepare":"npm run build","changelog":"npx conventional-changelog-cli conventional-changelog -p angular -i ./CHANGELOG.md -s","start:dev":"tsc -w"},"_npmUser":{"name":"belyaev_dev","email":"battler73@yandex.ru"},"repository":{"url":"git+https://github.com/yatolstoy/nestjs-amo.git","type":"git"},"_npmVersion":"10.8.2","description":"Wrapper over the @shevernitskiy/amo library for interacting with the amoCRM API from a NestJS application.","directories":{},"_nodeVersion":"20.18.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"8.52.0","prettier":"3.2.3","typescript":"^5.1.3","@types/node":"^16.18.25","@nestjs/common":"10.3.7","@shevernitskiy/amo":"^0.2.9","eslint-config-prettier":"9.0.0","eslint-plugin-prettier":"5.0.1","@typescript-eslint/parser":"6.9.1","@typescript-eslint/eslint-plugin":"6.9.1","prettier-plugin-organize-imports":"^3.2.4"},"peerDependencies":{"@nestjs/common":"^9.0.0 || ^10.0.0","@shevernitskiy/amo":"^0.1.0 || ^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-amo_0.1.0_1729112992028_0.5098551511440468","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@belyaev_dev/nestjs-amo","version":"0.1.1","keywords":["nestjs","amocrm","kommo","api","oauth2.0"],"author":{"name":"Yaroslav Tolstoy","email":"t.me/yatolstoy"},"license":"MIT","_id":"@belyaev_dev/nestjs-amo@0.1.1","maintainers":[{"name":"belyaev_dev","email":"battler73@yandex.ru"}],"homepage":"https://github.com/yatolstoy/nestjs-amo#readme","bugs":{"url":"https://github.com/yatolstoy/nestjs-amo/issues"},"dist":{"shasum":"87b02711a29e719f75bb33f9ad22e8ba15403a89","tarball":"https://registry.npmjs.org/@belyaev_dev/nestjs-amo/-/nestjs-amo-0.1.1.tgz","fileCount":32,"integrity":"sha512-xsXYHm0FilAcboOYygdb9hyLrpyOAypJZQz9iyKJB87Sdr0XcBBgkl5rZ8mt8sOFz9tMP+gq6aTBZVUWlw/zeQ==","signatures":[{"sig":"MEUCIAoaAAbkAKKJlLokNEsLpcYv5g/eD5TIDwSVs8SqqnwEAiEA8x0vX0Cy+3d1JawNYeH6rwRFhHv+OYuCSUwyGnuYWt8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236691},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"0f94e1588d809c131b987d8fad15f003c8800bdb","scripts":{"lint":"eslint  \"lib/**/*.ts\" --fix","build":"tsc -p tsconfig.lib.json","format":"prettier --write \"lib/**/*.ts\"","prepare":"npm run build","changelog":"npx conventional-changelog-cli conventional-changelog -p angular -i ./CHANGELOG.md -s","start:dev":"tsc -w"},"_npmUser":{"name":"belyaev_dev","email":"battler73@yandex.ru"},"repository":{"url":"git+https://github.com/yatolstoy/nestjs-amo.git","type":"git"},"_npmVersion":"10.8.2","description":"Wrapper over the @shevernitskiy/amo library for interacting with the amoCRM API from a NestJS application.","directories":{},"_nodeVersion":"20.18.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"8.52.0","prettier":"3.2.3","typescript":"^5.1.3","@types/node":"^16.18.25","@nestjs/common":"10.3.7","@shevernitskiy/amo":"^0.2.9","eslint-config-prettier":"9.0.0","eslint-plugin-prettier":"5.0.1","@typescript-eslint/parser":"6.9.1","@typescript-eslint/eslint-plugin":"6.9.1","prettier-plugin-organize-imports":"^3.2.4"},"peerDependencies":{"@nestjs/common":"^9.0.0 || ^10.0.0","@shevernitskiy/amo":"^0.1.0 || ^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-amo_0.1.1_1729180032001_0.7354856126618257","host":"s3://npm-registry-packages"}},"0.1.3":{"name":"@belyaev_dev/nestjs-amo","version":"0.1.3","keywords":["nestjs","amocrm","kommo","api","oauth2.0"],"author":{"name":"Yaroslav Tolstoy","email":"t.me/yatolstoy"},"license":"MIT","_id":"@belyaev_dev/nestjs-amo@0.1.3","maintainers":[{"name":"belyaev_dev","email":"battler73@yandex.ru"}],"homepage":"https://github.com/belyaev-dev/nestjs-amo#readme","bugs":{"url":"https://github.com/belyaev-dev/nestjs-amo/issues"},"dist":{"shasum":"0a97f8eb26a13587246b8e50e4171719fa01ed97","tarball":"https://registry.npmjs.org/@belyaev_dev/nestjs-amo/-/nestjs-amo-0.1.3.tgz","fileCount":30,"integrity":"sha512-ZhV7f1d2xZJCY7JDdPAahasXnqOQtOdSfWUZhTg3GU75D1ZfHN//MAChcNMl/NOxBn3BIyaEP68OZVlTwZMEWA==","signatures":[{"sig":"MEYCIQDner+romFUiGN/UODTyMCq9qem9lG9Kkx+SVw9U6bsdAIhALZzsa2OgX7d/IBsd6+5NbndfbHqgyStmrmKOpQBMcba","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25041},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"7b02cb152e6b183b1e52bd1a2074ce814b451d4f","scripts":{"lint":"eslint  \"lib/**/*.ts\" --fix","build":"tsc -p tsconfig.lib.json","format":"prettier --write \"lib/**/*.ts\"","prepare":"npm run build","changelog":"npx conventional-changelog-cli conventional-changelog -p angular -i ./CHANGELOG.md -s","start:dev":"tsc -w"},"_npmUser":{"name":"belyaev_dev","email":"battler73@yandex.ru"},"repository":{"url":"git+https://github.com/belyaev-dev/nestjs-amo.git","type":"git"},"_npmVersion":"11.6.2","description":"Wrapper over the @shevernitskiy/amo library for interacting with the amoCRM API from a NestJS application.","directories":{},"_nodeVersion":"24.11.1","_hasShrinkwrap":false,"devDependencies":{"eslint":"10.0.3","prettier":"3.8.1","typescript":"^5.9.3","@types/node":"^25.3.5","@nestjs/common":"11.1.16","@shevernitskiy/amo":"^0.2.15","eslint-config-prettier":"10.1.8","eslint-plugin-prettier":"5.5.5","@typescript-eslint/parser":"8.56.1","@typescript-eslint/eslint-plugin":"8.56.1","prettier-plugin-organize-imports":"^4.3.0"},"peerDependencies":{"@nestjs/common":"^9.0.0 || ^10.0.0 || ^11.0.0","@shevernitskiy/amo":"^0.1.0 || ^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-amo_0.1.3_1772949549967_0.9892301545559545","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@belyaev_dev/nestjs-amo","version":"0.1.4","description":"Wrapper over the @shevernitskiy/amo library for interacting with the amoCRM API from a NestJS application.","scripts":{"start:dev":"tsc -w","build":"tsc -p tsconfig.lib.json","prepare":"npm run build","format":"prettier --write \"lib/**/*.ts\"","lint":"eslint  \"lib/**/*.ts\" --fix","changelog":"npx conventional-changelog-cli conventional-changelog -p angular -i ./CHANGELOG.md -s"},"keywords":["nestjs","amocrm","kommo","api","oauth2.0"],"author":{"name":"Yaroslav Tolstoy","email":"t.me/yatolstoy"},"license":"MIT","main":"dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/belyaev-dev/nestjs-amo.git"},"bugs":{"url":"https://github.com/belyaev-dev/nestjs-amo/issues"},"homepage":"https://github.com/belyaev-dev/nestjs-amo#readme","peerDependencies":{"@nestjs/common":"^9.0.0 || ^10.0.0 || ^11.0.0","@shevernitskiy/amo":"^0.1.0 || ^0.2.0"},"devDependencies":{"@shevernitskiy/amo":"^0.2.15","@nestjs/common":"11.1.16","@types/node":"^25.3.5","@typescript-eslint/eslint-plugin":"8.56.1","@typescript-eslint/parser":"8.56.1","eslint":"10.0.3","eslint-config-prettier":"10.1.8","eslint-plugin-prettier":"5.5.5","prettier":"3.8.1","prettier-plugin-organize-imports":"^4.3.0","typescript":"^5.9.3"},"gitHead":"f7ef8885d3bce7c688ab1a409c2e501677481bb7","_id":"@belyaev_dev/nestjs-amo@0.1.4","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-awKdm5TvI5v8wf71G2do+tGOLdXyqlAR/A8WDHvbb+fhwKCFcFMnaRPNHG8Xq+BJiIe3DGLXchGp+oOu+cmzZQ==","shasum":"22609e1dbb3ced17846cc699701e7eff4064ce26","tarball":"https://registry.npmjs.org/@belyaev_dev/nestjs-amo/-/nestjs-amo-0.1.4.tgz","fileCount":30,"unpackedSize":25790,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCl+ElllJer9zG5QfPsgwUhZOMSQaA9Vjpc28NBrUBhUgIgVTXLIymmKWz0hYEulzKTB14MidwhTnmpiFQ+f/L9+l0="}]},"_npmUser":{"name":"belyaev_dev","email":"battler73@yandex.ru"},"directories":{},"maintainers":[{"name":"belyaev_dev","email":"battler73@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nestjs-amo_0.1.4_1773612828649_0.6104136222829233"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-16T21:09:51.933Z","modified":"2026-03-15T22:13:48.903Z","0.1.0":"2024-10-16T21:09:52.198Z","0.1.1":"2024-10-17T15:47:12.234Z","0.1.3":"2026-03-08T05:59:10.105Z","0.1.4":"2026-03-15T22:13:48.803Z"},"bugs":{"url":"https://github.com/belyaev-dev/nestjs-amo/issues"},"author":{"name":"Yaroslav Tolstoy","email":"t.me/yatolstoy"},"license":"MIT","homepage":"https://github.com/belyaev-dev/nestjs-amo#readme","keywords":["nestjs","amocrm","kommo","api","oauth2.0"],"repository":{"type":"git","url":"git+https://github.com/belyaev-dev/nestjs-amo.git"},"description":"Wrapper over the @shevernitskiy/amo library for interacting with the amoCRM API from a NestJS application.","maintainers":[{"name":"belyaev_dev","email":"battler73@yandex.ru"}],"readme":"<h1 align=\"center\"></h1>\n\n<div align=\"center\">\n  <a href=\"http://nestjs.com/\" target=\"_blank\">\n    <img src=\"https://nestjs.com/img/logo_text.svg\" width=\"150\" alt=\"Nest Logo\" />\n  </a>\n</div>\n\n<h3 align=\"center\">@belyaev_dev/nestjs-amo</h3>\n<a href=\"https://www.npmjs.com/package/@belyaev_dev/nestjs-amo\"><img src=\"https://img.shields.io/npm/v/%40belyaev_dev%2Fnestjs-amo.svg\" alt=\"NPM Version\" /></a>\n<a href=\"https://www.npmjs.com/package/@belyaev_dev/nestjs-amo\"><img src=\"https://img.shields.io/npm/l/%40belyaev_dev%2Fnestjs-amo.svg\" alt=\"Package License\" /></a>\n<a href=\"https://www.npmjs.com/package/@belyaev_dev/nestjs-amo\"><img src=\"https://img.shields.io/npm/dm/%40belyaev_dev%2Fnestjs-amo.svg\" alt=\"NPM Downloads\" /></a>\n\n<div align=\"center\">\n  <a href=\"https://nestjs.com\" target=\"_blank\">\n    <img src=\"https://img.shields.io/badge/built%20with-NestJs-red.svg\" alt=\"Built with NestJS\">\n  </a>\n</div>\n\n### Introduction\n\nThis is a simple wrapper of\n[@shevernitskiy/amo](https://www.npmjs.com/package/@shevernitskiy/amo) library.\nWith this module you can interact with the amoCRM/Kommo API from a NestJS\napplication.\n\n### Installation\n\n```bash\n# npm\nnpm install @belyaev_dev/nestjs-amo\n\n# yarn\nyarn add @belyaev_dev/nestjs-amo\n```\n\nFurthermore, install\n[@shevernitskiy/amo](https://www.npmjs.com/package/@shevernitskiy/amo) in your\nNestJS application, if you haven't already.\n\n```sh\n# npm\nnpm install @shevernitskiy/amo\n\n# yarn\nyarn add @shevernitskiy/amo\n```\n\n### Usage\n\nAdd `AmoModule` to the `imports` section in your `AppModule` or other modules to\ngain access to `AmoService`.\n\n#### Static import\n\n```ts\nimport { Module } from \"@nestjs/common\";\nimport { AmoModule } from \"@belyaev_dev/nestjs-amo\";\n\n@Module({\n\timports: [\n\t\tAmoModule.forRoot({\n\t\t\tisGlobal: true,\n\t\t\tamoServiceOptions: {\n\t\t\t\twidget_settings: {\n\t\t\t\t\tclient_id: \"1111-2222-3333\",\n\t\t\t\t\tclient_secret: \"myclientsecret\",\n\t\t\t\t\tredirect_uri: \"https://myredirect.org\",\n\t\t\t\t},\n\t\t\t\tgetCredentials: async (amoId) => {\n\t\t\t\t\t// Implement your logic to retrieve a token from your long-term storage facility\n\t\t\t\t\treturn {\n\t\t\t\t\t\taccess_token: \"some token\",\n\t\t\t\t\t\texpires_at: 86400,\n\t\t\t\t\t\texpires_in: 1693211983,\n\t\t\t\t\t\trefresh_token: \"saved token\",\n\t\t\t\t\t\tdomain: \"https://example.ru\",\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tonTokenUpdate: async (amoId, token) => {\n\t\t\t\t\t// Implement your logic for saving authorization keys to long-term storage\n\t\t\t\t\tconsole.log(\"New token obtained\", amoId, token);\n\t\t\t\t},\n\t\t\t},\n\t\t}),\n\t],\n})\nexport class AppModule {}\n```\n\nAdditionally, `AmoModule` provides a `forRootAsync` to pass options\nasynchronously.\n\n#### Async configuration\n\n```ts\nimport { Module } from \"@nestjs/common\";\nimport { AmoModule } from \"@belyaev_dev/nestjs-amo\";\n\n@Module({\n\timports: [\n\t\tAmoModule.forRootAync({\n\t\t\tisGlobal: true,\n\t\t\tuseFactory: async () => {\n\t\t\t\treturn {\n\t\t\t\t\twidget_settings: {\n\t\t\t\t\t\tclient_id: \"1111-2222-3333\",\n\t\t\t\t\t\tclient_secret: \"myclientsecret\",\n\t\t\t\t\t\tredirect_uri: \"https://myredirect.org\",\n\t\t\t\t\t},\n\t\t\t\t\tgetCredentials: async (amoId) => {\n\t\t\t\t\t\t// Implement your logic to retrieve a token from your long-term storage facility\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\taccess_token: \"some token\",\n\t\t\t\t\t\t\texpires_at: 86400,\n\t\t\t\t\t\t\texpires_in: 1693211983,\n\t\t\t\t\t\t\trefresh_token: \"saved token\",\n\t\t\t\t\t\t\tdomain: \"https://example.ru\",\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t\tonTokenUpdate: async (amoId, token) => {\n\t\t\t\t\t\t// Implement your logic for saving authorization keys to long-term storage\n\t\t\t\t\t\tconsole.log(\"New token obtained\", amoId, token);\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t},\n\t\t}),\n\t],\n})\nexport class AppModule {}\n```\n\nYou can inject dependencies such as `ConfigModule` to load options from .env\nfiles.\n\n```ts\nimport { Module } from \"@nestjs/common\";\nimport { ConfigModule, ConfigService } from \"@nestjs/config\";\nimport { AmoModule } from \"@belyaev_dev/nestjs-amo\";\n\n@Module({\n\timports: [\n\t\tConfigModule.forRoot({\n\t\t\tisGlobal: true,\n\t\t}),\n\t\tAmoModule.forRootAync({\n\t\t\tisGlobal: true,\n\t\t\tuseFactory: async (configService: ConfigService) => {\n\t\t\t\treturn {\n\t\t\t\t\twidget_settings: {\n\t\t\t\t\t\tclient_id: configService.get(\"AMO_CLIENT_ID\"),\n\t\t\t\t\t\tclient_secret: configService.get(\"AMO_CLIENT_SECRET\"),\n\t\t\t\t\t\tredirect_uri: configService.get(\"AMO_REDIRECT_URI\"),\n\t\t\t\t\t},\n\t\t\t\t\tgetCredentials: async (amoId) => {\n\t\t\t\t\t\t// Implement your logic to retrieve a token from your long-term storage facility\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\taccess_token: \"some token\",\n\t\t\t\t\t\t\texpires_at: 86400,\n\t\t\t\t\t\t\texpires_in: 1693211983,\n\t\t\t\t\t\t\trefresh_token: \"saved token\",\n\t\t\t\t\t\t\tdomain: \"https://example.ru\",\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t\tonTokenUpdate: async (amoId, token) => {\n\t\t\t\t\t\t// Implement your logic for saving authorization keys to long-term storage\n\t\t\t\t\t\tconsole.log(\"New token obtained\", amoId, token);\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t},\n\t\t\tinject: [ConfigService],\n\t\t}),\n\t],\n})\nexport class AppModule {}\n```\n\n#### Calling send method\n\n```typescript\nimport { AmoService } from \"@belyaev_dev/nestjs-amo\";\n\n@Injectable()\nexport class YourService {\n\tconstructor(private amoService: AmoService) {}\n\n\tasync method() {\n\t\tconst amoApi = await this.amoService.create(123);\n\t\treturn amoApi.account.getAccount({ with: [\"version\"] });\n\t}\n}\n```\n\n#### Calling custom endpoint\n\n```typescript\nimport { AmoService } from \"@belyaev_dev/nestjs-amo\";\n\n@Injectable()\nexport class YourService {\n\tconstructor(private amoService: AmoService) {}\n\n\tasync method() {\n\t\tconst amoApi = await this.amoService.create(123);\n\t\treturn amoApi.raw.get({\n\t\t\turl: \"/ajax/merge/leads/save\",\n\t\t\theaders: {\n\t\t\t\t\"X-Requested-With\": \"XMLHttpRequest\",\n\t\t\t},\n\t\t\tpayload: \"some payload\",\n\t\t});\n\t}\n}\n```\n\n## Contributing\n\nContributions welcome! See [Contributing](CONTRIBUTING.md).\n\n## Notes\n\nThis project is not endorsed by or affiliated with\n[AmoCRM](http://www.amocrm.ru).\n\n## Author\n\n**Yaroslav Tolstoy - [GitHub](https://github.com/yatolstoy)**\n\n## License\n\nLicensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","readmeFilename":"README.md"}