{"_id":"@attachmentav/virus-scan-sdk-ts","_rev":"9-5aae19fbabc5a0b9ca993fb84b325549","name":"@attachmentav/virus-scan-sdk-ts","dist-tags":{"latest":"0.8.0"},"versions":{"0.1.0":{"name":"@attachmentav/virus-scan-sdk-ts","version":"0.1.0","keywords":["virus","malware","scan","attachment","scanner","sdk","typescript"],"author":{"name":"Andreas Wittig"},"license":"MIT","_id":"@attachmentav/virus-scan-sdk-ts@0.1.0","maintainers":[{"name":"andreaswittig","email":"andreas@widdix.de"}],"homepage":"https://github.com/widdix/attachmentav-sdk-ts#readme","bugs":{"url":"https://github.com/widdix/attachmentav-sdk-ts/issues"},"dist":{"shasum":"afc973bcea4e59662dbb4072e7b367cdabb338ae","tarball":"https://registry.npmjs.org/@attachmentav/virus-scan-sdk-ts/-/virus-scan-sdk-ts-0.1.0.tgz","fileCount":15,"integrity":"sha512-kgQPHOopa3Amdoa77I2ca1trrnPKfQ/ahoZ0FN4X1Y/5bkRaKxirQsnr45JzoAjLeMvr+m1dBGPpTcZtSmESlg==","signatures":[{"sig":"MEQCIECAzXWnQ9sILmvpi79OKi0qTUC5buna9m1xBz7ptYaiAiAs5Ju1NAZJo7uDTc+dPMdJm4zGHjByL+/xCZ6l6OGrDg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49537},"main":"index.ts","gitHead":"957f9f61fcdba57e42dff013d10d352ef07f1f14","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"andreaswittig","email":"andreas@widdix.de"},"repository":{"url":"git+https://github.com/widdix/attachmentav-sdk-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"An SDK to integrate virus and malware scan capabilities into TypeScript applications. Scan files for viruses, trojans, and other kinds of malware with attachmentAV powered by Sophos.","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/virus-scan-sdk-ts_0.1.0_1753089935599_0.2895609195737876","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@attachmentav/virus-scan-sdk-ts","version":"0.2.0","keywords":["virus","malware","scan","attachment","scanner","sdk","typescript"],"author":{"name":"Andreas Wittig"},"license":"MIT","_id":"@attachmentav/virus-scan-sdk-ts@0.2.0","maintainers":[{"name":"andreaswittig","email":"andreas@widdix.de"},{"name":"hellomichibye","email":"post@michaelwittig.info"}],"homepage":"https://github.com/widdix/attachmentav-sdk-ts#readme","bugs":{"url":"https://github.com/widdix/attachmentav-sdk-ts/issues"},"dist":{"shasum":"40f4520698caae39e92ada3a3cce802740201f8a","tarball":"https://registry.npmjs.org/@attachmentav/virus-scan-sdk-ts/-/virus-scan-sdk-ts-0.2.0.tgz","fileCount":15,"integrity":"sha512-roz/s+KJQTT/facOJ2wIzkgq8r7rh2O7E+6DLp0NJPxPTtH8s3R9FWdiiseb2PgNlF8XQnRtBtOxiVYvXode/g==","signatures":[{"sig":"MEUCID7m9v7SxoUAC2QOiX6edM7aTncobrY0EN8hj6Xza59mAiEA//lxXxZPPd8PeLdKANcJxTzKvxBhQHUR0sor2wkwQJI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49545},"main":"index.ts","gitHead":"d3e8a9ad393a8f8e7f51d8c8676feae7233a879d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"hellomichibye","email":"post@michaelwittig.info"},"repository":{"url":"git+https://github.com/widdix/attachmentav-sdk-ts.git","type":"git"},"_npmVersion":"11.3.0","description":"An SDK to integrate virus and malware scan capabilities into TypeScript applications. Scan files for viruses, trojans, and other kinds of malware with attachmentAV powered by Sophos.","directories":{},"_nodeVersion":"24.0.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/virus-scan-sdk-ts_0.2.0_1758794226333_0.5378180273449389","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@attachmentav/virus-scan-sdk-ts","version":"0.3.0","keywords":["virus","malware","scan","attachment","scanner","sdk","typescript"],"author":{"name":"Andreas Wittig"},"license":"MIT","_id":"@attachmentav/virus-scan-sdk-ts@0.3.0","maintainers":[{"name":"andreaswittig","email":"andreas@widdix.de"},{"name":"hellomichibye","email":"post@michaelwittig.info"}],"homepage":"https://github.com/widdix/attachmentav-sdk-ts#readme","bugs":{"url":"https://github.com/widdix/attachmentav-sdk-ts/issues"},"dist":{"shasum":"846d8ebdc75b7568558ef61a542b5ebbd3d9f134","tarball":"https://registry.npmjs.org/@attachmentav/virus-scan-sdk-ts/-/virus-scan-sdk-ts-0.3.0.tgz","fileCount":9,"integrity":"sha512-n9N4jZiAIJUOioexceRlqL0UYVqFVq+jBAmYIMGFXv6piSZOl+/KRyfREAkNBhMD+LMPBEQRMT5tK7pzv57epw==","signatures":[{"sig":"MEQCICPkKG+iEJm9tu3kD2zp8Wj/PZDeXjdR102v7/sIKN1CAiBQ6Xmf1Q6bOg+Y5HORwb0T15/73UVX7XCSK1TBa38XeQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":208853},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"0ed42cb5c251bbeaf22f30a1e1b1f07843334666","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup"},"_npmUser":{"name":"hellomichibye","email":"post@michaelwittig.info"},"repository":{"url":"git+https://github.com/widdix/attachmentav-sdk-ts.git","type":"git"},"_npmVersion":"11.3.0","description":"An SDK to integrate virus and malware scan capabilities into TypeScript applications. Scan files for viruses, trojans, and other kinds of malware with attachmentAV powered by Sophos.","directories":{},"_nodeVersion":"24.0.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/virus-scan-sdk-ts_0.3.0_1758876746942_0.4865784706613918","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@attachmentav/virus-scan-sdk-ts","version":"0.4.0","keywords":["virus","malware","scan","attachment","scanner","sdk","typescript"],"author":{"name":"Andreas Wittig"},"license":"MIT","_id":"@attachmentav/virus-scan-sdk-ts@0.4.0","maintainers":[{"name":"andreaswittig","email":"andreas@widdix.de"},{"name":"hellomichibye","email":"post@michaelwittig.info"}],"homepage":"https://github.com/widdix/attachmentav-sdk-ts#readme","bugs":{"url":"https://github.com/widdix/attachmentav-sdk-ts/issues"},"dist":{"shasum":"049568414c6a08f29cb14c19781cc55596b882ea","tarball":"https://registry.npmjs.org/@attachmentav/virus-scan-sdk-ts/-/virus-scan-sdk-ts-0.4.0.tgz","fileCount":9,"integrity":"sha512-nMtvHQdV1l1XqD/O8JLECrrZboD9dNC95f8uzAoEvlYvdZZ3n4ZLnie0ujl53i7+N9RbY1lEx7oeqNYIha5OcA==","signatures":[{"sig":"MEUCIQD7BdM4p+ZYqAY8VrroJ8MMGLfGsTXtXPLTcdYOTCYP3gIgL+wL/KFoAvGfcDSji9azhAIRJwB56CjkO2w6rbwvIHw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":208879},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"abfdd9343a5b196cc9497d8bd5521703ad448d51","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup"},"_npmUser":{"name":"hellomichibye","email":"post@michaelwittig.info"},"repository":{"url":"git+https://github.com/widdix/attachmentav-sdk-ts.git","type":"git"},"_npmVersion":"11.3.0","description":"An SDK to integrate virus and malware scan capabilities into JavaScript / TypeScript applications. Scan files for viruses, trojans, and other kinds of malware with attachmentAV powered by Sophos.","directories":{},"_nodeVersion":"24.0.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/virus-scan-sdk-ts_0.4.0_1758879281886_0.5523048245337128","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@attachmentav/virus-scan-sdk-ts","version":"0.5.0","keywords":["virus","malware","scan","attachment","scanner","sdk","typescript"],"author":{"name":"Andreas Wittig"},"license":"MIT","_id":"@attachmentav/virus-scan-sdk-ts@0.5.0","maintainers":[{"name":"andreaswittig","email":"andreas@widdix.de"},{"name":"hellomichibye","email":"post@michaelwittig.info"}],"homepage":"https://github.com/widdix/attachmentav-sdk-ts#readme","bugs":{"url":"https://github.com/widdix/attachmentav-sdk-ts/issues"},"dist":{"shasum":"10e181909aa53370381f7b54104bd25ff5ef3822","tarball":"https://registry.npmjs.org/@attachmentav/virus-scan-sdk-ts/-/virus-scan-sdk-ts-0.5.0.tgz","fileCount":9,"integrity":"sha512-15txpWFxWfanq6VYIWeNppFke8u2Z81gYj/HvzHD/y+Rrp4hqCq8WRgDOlARdfZHXMg2LZPYCZCSpom/ZZjTnA==","signatures":[{"sig":"MEYCIQCegBFjIzJvRah2P4zodon0yZ4rK8avUyldUx4bmv+GkgIhALywrRU1D5sGaEF3eDaBACVTVm8haIktm9hRvPdmMfzK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":224148},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"9db21785288419b5c171ec578f556b2b72dabdc6","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup"},"_npmUser":{"name":"hellomichibye","email":"post@michaelwittig.info"},"repository":{"url":"git+https://github.com/widdix/attachmentav-sdk-ts.git","type":"git"},"_npmVersion":"11.3.0","description":"An SDK to integrate virus and malware scan capabilities into JavaScript / TypeScript applications. Scan files for viruses, trojans, and other kinds of malware with attachmentAV powered by Sophos.","directories":{},"_nodeVersion":"24.0.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/virus-scan-sdk-ts_0.5.0_1761306054025_0.6436708926820867","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@attachmentav/virus-scan-sdk-ts","version":"0.6.0","keywords":["virus","malware","scan","attachment","scanner","sdk","typescript"],"author":{"name":"Andreas Wittig"},"license":"MIT","_id":"@attachmentav/virus-scan-sdk-ts@0.6.0","maintainers":[{"name":"andreaswittig","email":"andreas@widdix.de"},{"name":"hellomichibye","email":"post@michaelwittig.info"}],"homepage":"https://github.com/widdix/attachmentav-sdk-ts#readme","bugs":{"url":"https://github.com/widdix/attachmentav-sdk-ts/issues"},"dist":{"shasum":"10d7e9e554ba79325bcafd1658dc7f8857914b59","tarball":"https://registry.npmjs.org/@attachmentav/virus-scan-sdk-ts/-/virus-scan-sdk-ts-0.6.0.tgz","fileCount":9,"integrity":"sha512-nhGngXPBAW0VsnW8GfxuH0uT5O14cvPY2F7N8bkBuRqj4A8XttXUs6ZssXdrZn1xng+PbHqtw9Msi6MPkP+pzA==","signatures":[{"sig":"MEUCIBjN72MIpdV2Al5FPZKGjxFnajFCZO3IxSlavW8TES2FAiEA84kwXllkoeCZQppATq/rRd3LJfp6Dnefu2JGwIP9jB8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":249636},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"849715900f2cdc9b171308cf9fed34893620d94b","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup"},"_npmUser":{"name":"andreaswittig","email":"andreas@widdix.de"},"repository":{"url":"git+https://github.com/widdix/attachmentav-sdk-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"An SDK to integrate virus and malware scan capabilities into JavaScript / TypeScript applications. Scan files for viruses, trojans, and other kinds of malware with attachmentAV powered by Sophos.","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/virus-scan-sdk-ts_0.6.0_1761819855489_0.48706724139903557","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@attachmentav/virus-scan-sdk-ts","version":"0.7.0","keywords":["virus","malware","scan","attachment","scanner","sdk","typescript"],"author":{"name":"Andreas Wittig"},"license":"MIT","_id":"@attachmentav/virus-scan-sdk-ts@0.7.0","maintainers":[{"name":"andreaswittig","email":"andreas@widdix.de"},{"name":"hellomichibye","email":"post@michaelwittig.info"}],"homepage":"https://github.com/widdix/attachmentav-sdk-ts#readme","bugs":{"url":"https://github.com/widdix/attachmentav-sdk-ts/issues"},"dist":{"shasum":"8ea17a16550df57d0e8f67ed8cf066e2c68a4d11","tarball":"https://registry.npmjs.org/@attachmentav/virus-scan-sdk-ts/-/virus-scan-sdk-ts-0.7.0.tgz","fileCount":9,"integrity":"sha512-Dl2jI+I7yNyw/tPdsAuTPJr8ZTmTsIfI7ovneppSvHkGe2PqmjKSGHjtYLdR8XOSFhxkdqqEltr21Xx6PFXuzA==","signatures":[{"sig":"MEUCIQD8rSMwC7/puVKgVEGj75NIBYxQfJxaduICRet+MTN3IgIgCVoSPYReg/EW6jSPnHnnOePBJQ2wGQEHjTQGBBg9Xtc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":266005},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"b00afef35e9c13cdf76f9522cd923583f3b6b34f","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup"},"_npmUser":{"name":"hellomichibye","email":"post@michaelwittig.info"},"repository":{"url":"git+https://github.com/widdix/attachmentav-sdk-ts.git","type":"git"},"_npmVersion":"11.3.0","description":"An SDK to integrate virus and malware scan capabilities into JavaScript / TypeScript applications. Scan files for viruses, trojans, and other kinds of malware with attachmentAV powered by Sophos.","directories":{},"_nodeVersion":"24.0.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/virus-scan-sdk-ts_0.7.0_1766065950969_0.5890914998969132","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@attachmentav/virus-scan-sdk-ts","version":"0.8.0","description":"An SDK to integrate virus and malware scan capabilities into JavaScript / TypeScript applications. Scan files for viruses, trojans, and other kinds of malware with attachmentAV powered by Sophos.","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"tsup","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/widdix/attachmentav-sdk-ts.git"},"keywords":["virus","malware","scan","attachment","scanner","sdk","typescript"],"author":{"name":"Andreas Wittig"},"license":"MIT","bugs":{"url":"https://github.com/widdix/attachmentav-sdk-ts/issues"},"homepage":"https://github.com/widdix/attachmentav-sdk-ts#readme","devDependencies":{"tsup":"8.5.1","typescript":"5.9.3"},"_id":"@attachmentav/virus-scan-sdk-ts@0.8.0","gitHead":"7ece632048120188a9c6019cd599c024b2547f41","_nodeVersion":"24.0.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-afgytfXuY7CpddXPjYDxPxfaJ0vpJzsOkLUWjFSDge0vrCzJJfUw4fT2QKiwVycPTy9aifJ+cM+QRnGUWDAxqQ==","shasum":"0a0824a0782f9f90f9588796b658d5dd9129c240","tarball":"https://registry.npmjs.org/@attachmentav/virus-scan-sdk-ts/-/virus-scan-sdk-ts-0.8.0.tgz","fileCount":9,"unpackedSize":325547,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEhIJ8sdU6tYg6fCwHqXcGqNsW/rdXShIwsZyG7/10cfAiBlqRFlONizfKbaTjwnATz5j2YP3jeQ1KNrr7ncVpR5qw=="}]},"_npmUser":{"name":"hellomichibye","email":"post@michaelwittig.info"},"directories":{},"maintainers":[{"name":"andreaswittig","email":"andreas@widdix.de"},{"name":"hellomichibye","email":"post@michaelwittig.info"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/virus-scan-sdk-ts_0.8.0_1783626410215_0.8536020355657254"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-21T09:25:35.472Z","modified":"2026-07-09T19:46:50.574Z","0.1.0":"2025-07-21T09:25:35.766Z","0.2.0":"2025-09-25T09:57:06.508Z","0.3.0":"2025-09-26T08:52:27.103Z","0.4.0":"2025-09-26T09:34:42.057Z","0.5.0":"2025-10-24T11:40:54.221Z","0.6.0":"2025-10-30T10:24:15.703Z","0.7.0":"2025-12-18T13:52:31.111Z","0.8.0":"2026-07-09T19:46:50.366Z"},"bugs":{"url":"https://github.com/widdix/attachmentav-sdk-ts/issues"},"author":{"name":"Andreas Wittig"},"license":"MIT","homepage":"https://github.com/widdix/attachmentav-sdk-ts#readme","keywords":["virus","malware","scan","attachment","scanner","sdk","typescript"],"repository":{"type":"git","url":"git+https://github.com/widdix/attachmentav-sdk-ts.git"},"description":"An SDK to integrate virus and malware scan capabilities into JavaScript / TypeScript applications. Scan files for viruses, trojans, and other kinds of malware with attachmentAV powered by Sophos.","maintainers":[{"name":"andreaswittig","email":"andreas@widdix.de"},{"name":"hellomichibye","email":"post@michaelwittig.info"}],"readme":"# attachmentav-sdk-ts\n\nAn SDK to integrate virus and malware scan capabilities into JavaScript / TypeScript applications. Scan files for viruses, trojans, and other kinds of malware with [attachmentAV](https://attachmentav.com) powered by Sophos.\n\n## Getting started\n\nFirst, install the module.\n\n```bash\nnpm i @attachmentav/virus-scan-sdk-ts\n```\n\nSecond, get an API key by [subscribing to the attachmentAV API (SaaS)](https://attachmentav.com/subscribe/api/).\n\nThird, send a scan request. Make sure to replace the `<API_KEY_PLACEHOLDER>` placeholder and `<API_ENDPOINT_PLACEHOLDER>` with the API endpoint.\n\n**API endpoints (SaaS)**\n* `https://eu.developer.attachmentav.com/v1/` (Europe)\n* `https://us.developer.attachmentav.com/v1/` (United States of America)\n* `https://canada.developer.attachmentav.com/v1/` (Canada)\n* `https://india.developer.attachmentav.com/v1/` (India)\n* `https://australia.developer.attachmentav.com/v1/` (Australia)\n\n**API endpoint (Self-hosted on AWS)**\n\nWhen following the setup guide, you specified the `ApiKeys` parameter for the CloudFormation stack. Replace `<API_KEY_PLACEHOLDER>` with one of those keys and `<API_ENDPOINT_PLACEHOLDER>` with the API endpoint.\n\nExample, replace `attachmentav.yourcompany.com` with the domain name of your [attachmentAV API installation](https://attachmentav.com/help/virus-malware-scan-api-aws/developer/definition.html#domain-name): \n`https://attachmentav.yourcompany.com/api/v1`.\n\n```javascript\nimport { AttachmentAVApi, Configuration } from '@attachmentav/virus-scan-sdk-ts';\nimport { readFileSync } from 'node:fs';\nimport { Blob } from 'node:buffer';\n\nconst config = new Configuration({\n  apiKey: '<API_KEY_PLACEHOLDER>',\n  basePath: '<API_ENDPOINT_PLACEHOLDER>'\n});\n\nconst api = new AttachmentAVApi(config);\n\nconst scanResult = await api.scanSyncBinaryPost({\n  body: new Blob([readFileSync('/path/to/file')])\n});\nconsole.log('Sync binary scan result:', scanResult);\n```\n\nThe request returns a scan result similar to the following example.\n\n```\nSync binary scan result: {\n  status: 'clean',\n  finding: undefined,\n  size: 8100,\n  realfiletype: 'ASCII text / 8-bit Unicode Transformation Format'\n}\n```\n\n## What is attachmentAV?\n\n[attachmentAV](https://attachmentav.com) offers antivirus for SaaS and cloud platforms. Scan your files and attachments stored in the cloud for viruses, worms, and trojans. attachmentAV detects malware in real-time. Supports Amazon S3, Atlassian, Cloudflare R2, Salesforce, WordPress, and more.\n\nThe [attachmentAV Virus and Malware Scan API](https://attachmentav.com/solution/virus-malware-scan-api/) provides a REST API that allows you to integrate malware scans into your application. The solution comes in two variants:\n\n* [attachmentAV Virus Scan API (SaaS)](https://attachmentav.com/help/virus-malware-scan-api/setup-guide/): Get started quickly with a fully managed service.\n* [attachmentAV Virus Scan API (self-hosted on AWS)](https://attachmentav.com/help/virus-malware-scan-api-aws/setup-guide/): Deploy the production-ready API on AWS.\n\nattachmentAV raises the bar for information security. Our solution is ISO 27001 certified and GDPR compliant. We are establishing, implementing, maintaining, and continually improving an information security management system (ISMS). Sensitive data is encrypted in transit as well as at rest and deleted immediately after processing. More than 1,000 customers trust our malware protection technology.\n\n## Install SDK\n\n```sh\nnpm i @attachmentav/virus-scan-sdk-ts\n```\n\n## Configure SDK\n\n### Configure SDK (SaaS)\n\nAn [active subscription and API key](https://attachmentav.com/help/virus-malware-scan-api/setup-guide/#api-key) are required. Replace `<API_KEY_PLACEHOLDER>` with the API key and `<API_ENDPOINT_PLACEHOLDER>` with the API endpoint. The API endpoint (region) must match with the region selected for the subscription. The default is `Europe`.\n\n* `https://eu.developer.attachmentav.com/v1/` (Europe)\n* `https://us.developer.attachmentav.com/v1/` (United States of America)\n* `https://canada.developer.attachmentav.com/v1/` (Canada)\n* `https://india.developer.attachmentav.com/v1/` (India)\n* `https://australia.developer.attachmentav.com/v1/` (Australia)\n\n```javascript\nimport { AttachmentAVApi, Configuration } from '@attachmentav/virus-scan-sdk-ts';\n\nconst config = new Configuration({\n  apiKey: '<API_KEY_PLACEHOLDER>',\n  basePath: '<API_ENDPOINT_PLACEHOLDER>'\n});\n\nconst api = new AttachmentAVApi(config);\n```\n\n### Configure SDK (self-hosted on AWS)\n\nWhen following the setup guide, you specified the `ApiKeys` parameter for the CloudFormation stack. Replace `<API_KEY_PLACEHOLDER>` with one of those keys and `<API_ENDPOINT_PLACEHOLDER>` with the API endpoint.\n\nExample, replace `attachmentav.yourcompany.com` with the domain name of your [attachmentAV API installation](https://attachmentav.com/help/virus-malware-scan-api-aws/developer/definition.html#domain-name): \n`https://attachmentav.yourcompany.com/api/v1`.\n\n```javascript\nimport { AttachmentAVApi, Configuration } from '@attachmentav/virus-scan-sdk-ts';\n\nconst config = new Configuration({\n  accessToken: '<API_KEY_PLACEHOLDER>',\n  basePath: '<API_ENDPOINT_PLACEHOLDER>'\n});\n\nconst api = new AttachmentAVApi(config);\n```\n\n## Examples\n\n\n### Sync Scan: File\n\nSend a file to the attachmentAV Virus Scan API and process the scan result.\n\nSee [ScanResult](sdk/models/ScanResult.ts) for details.\n\nThe maximum file size is 10 MB. The request timeout is 60 seconds.\n\n```javascript\nconst scanResult = await api.scanSyncBinaryPost({\n  body: new Blob([readFileSync('/path/to/file')])\n});\nconsole.log('Sync binary scan result:', scanResult);\n```\n\nFind full example: [ts](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/sync-binary.ts), [mjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/sync-binary.mjs), [cjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/sync-binary.cjs)\n\n### Sync Scan: Download\n\nSend a URL to the attachmentAV Virus Scan API. attachmentAV will download the file and return the scan result immediately.\n\n\nSee [SyncDownloadScanRequest](sdk/models/SyncDownloadScanRequest.ts) and [ScanResult](sdk/models/ScanResult.ts) for details.\n\nThe maximum file size is 10 MB. The request timeout is 60 seconds.\n\n```javascript\nconst scanResult = await api.scanSyncDownloadPost({\n  syncDownloadScanRequest: {\n    downloadUrl: 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf'\n  }\n});\nconsole.log('Sync download scan result:', scanResult);\n```\n\nFind full example: [ts](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/sync-download.ts), [mjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/sync-download.mjs), [cjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/sync-download.cjs)\n\n### Sync Scan: S3\n\nSend an S3 bucket name and object key to the attachmentAV Virus Scan API. attachmentAV will download the file and return the scan result immediately.\n\nSee [SyncS3ScanRequest](sdk/models/SyncS3ScanRequest.ts) and [ScanResult](sdk/models/ScanResult.ts) for details.\n\nThe maximum file size is 10 MB. The request timeout is 60 seconds.\n\n> A [bucket policy](https://attachmentav.com/help/virus-malware-scan-api/setup-guide/#s3-bucket-policy) is required to grant attachmentAV access to private S3 objects.\n\n```javascript\nconst scanResult = await api.scanSyncS3Post({\n  syncS3ScanRequest: {\n    bucket: '<BUCKET_NAME_PLACEHOLDER>',\n    key: '<OBJECT_KEY_PLACEHOLDER>'\n  }\n});\nconsole.log('Sync S3 scan result:', scanResult);\n```\n\nFind full example: [ts](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/sync-s3.ts), [mjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/sync-s3.mjs), [cjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/sync-s3.cjs)\n\n### Async Scan: Download (callback)\n\nSend a URL to the attachmentAV Virus Scan API. attachmentAV will download the file and send the scan result to the [callback](https://attachmentav.com/help/virus-malware-scan-api/developer/definition.html#callback).\n\nSee [AsyncDownloadScanRequest](sdk/models/AsyncDownloadScanRequest.ts) for details.\n\nThe maximum file size is 5 GB. The request timeout is 29 seconds; the asynchronous scan job is not affected by this limit.\n\n> Not supported by attachmentAV Virus Scan API (Self-hosted on AWS) yet. Contact [hello@attachmentav.com](hello@attachmentav.com) to let us know, in case you need this feature. \n\n```javascript\nawait api.scanAsyncDownloadPost({\n  asyncDownloadScanRequest: {\n    downloadUrl: 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf',\n    callbackUrl: 'https://api.yourcompany.com/attachmentav/callback'\n  }\n});\nconsole.log('Async download submitted');\n```\n\nFind full example: [ts](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/async-download.ts), [mjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/async-download.mjs), [cjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/async-download.cjs)\n\n### Async Scan: Download (polling)\n\nSend a URL to the attachmentAV Virus Scan API. attachmentAV will download the file and store the scan result for 24 hours.\n\nSee [AsyncDownloadScanRequest](sdk/models/AsyncDownloadScanRequest.ts) for details.\n\nThe maximum file size is 5 GB. The request timeout is 29 seconds; the asynchronous scan job is not affected by this limit.\n\n> Not supported by attachmentAV Virus Scan API (Self-hosted on AWS) yet. Contact [hello@attachmentav.com](hello@attachmentav.com) to let us know, in case you need this feature. \n\n```javascript\nconst traceId = crypto.randomUUID();\n\nawait api.scanAsyncDownloadPost({\n  asyncDownloadScanRequest: {\n    downloadUrl: 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf',\n    traceId\n  }\n});\nconsole.log('Async download submitted.');\n\n// wait some time...\n\nconst scanResult = await api.scanAsyncResultGet({\n  traceId\n});\nconsole.log('Async download scan result:', scanResult);\n```\n\nFind full example: [ts](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/async-download-polling.ts), [mjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/async-download-polling.mjs), [cjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/async-download-polling.cjs)\n\n### Async Scan: S3 (callback)\n\nSend an S3 bucket name and object key to the attachmentAV Virus Scan API. attachmentAV will download the file and send the scan result to the [callback](https://attachmentav.com/help/virus-malware-scan-api/developer/definition.html#callback).\n\nSee [AsyncS3ScanRequest](sdk/models/AsyncS3ScanRequest.ts) for details.\n\nThe maximum file size is 5 GB. The request timeout is 29 seconds; the asynchronous scan job is not affected by this limit.\n\n> A [bucket policy](https://attachmentav.com/help/virus-malware-scan-api/setup-guide/#s3-bucket-policy) is required to grant attachmentAV access to private S3 objects.\n\n> Not supported by attachmentAV Virus Scan API (Self-hosted on AWS) yet. Contact [hello@attachmentav.com](hello@attachmentav.com) to let us know, in case you need this feature.\n\n```javascript\nawait api.scanAsyncS3Post({\n  asyncS3ScanRequest: {\n    bucket: '<BUCKET_NAME_PLACEHOLDER>',\n    key: '<OBJECT_KEY_PLACEHOLDER>',\n    callbackUrl: 'https://api.yourcompany.com/attachmentav/callback'\n  }\n});\nconsole.log('Async S3 submitted');\n```\n\nFind full example: [ts](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/async-s3.ts), [mjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/async-s3.mjs), [cjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/async-s3.cjs)\n\n### Async Scan: S3 (polling)\n\nSend an S3 bucket name and object key to the attachmentAV Virus Scan API. attachmentAV will download the file and store the scan result for 24 hours.\n\nSee [AsyncS3ScanRequest](sdk/models/AsyncS3ScanRequest.ts) for details.\n\nThe maximum file size is 5 GB. The request timeout is 29 seconds; the asynchronous scan job is not affected by this limit.\n\n> A [bucket policy](https://attachmentav.com/help/virus-malware-scan-api/setup-guide/#s3-bucket-policy) is required to grant attachmentAV access to private S3 objects.\n\n> Not supported by attachmentAV Virus Scan API (Self-hosted on AWS) yet. Contact [hello@attachmentav.com](hello@attachmentav.com) to let us know, in case you need this feature.\n\n```javascript\nconst traceId = crypto.randomUUID();\n\nawait api.scanAsyncS3Post({\n  asyncS3ScanRequest: {\n    bucket: '<BUCKET_NAME_PLACEHOLDER>',\n    key: '<OBJECT_KEY_PLACEHOLDER>',\n    traceId\n  }\n});\nconsole.log('Async S3 submitted.');\n\n// wait some time...\n\nconst scanResult = await api.scanAsyncResultGet({\n  traceId\n});\nconsole.log('Async download scan result:', scanResult);\n```\n\nFind full example: [ts](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/async-s3-polling.ts), [mjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/async-s3-polling.mjs), [cjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/async-s3-polling.cjs)\n\n\n### List callback failures\n\nList callback failures that prevent attachmentAV from invoking the defined callback_url. Sorted by time in descending order (youngest failure is returned first). Callback failures are stored for 30 days.\n\nSee [CallbackFailures](sdk/models/CallbackFailures.ts) for details.\n\n> Not supported by attachmentAV Virus Scan API (Self-hosted on AWS).\n\n```javascript\nconst res = await api.callbackFailuresGet({\n  callbackUrl: 'https://api.yourcompany.com/attachmentav/callback'\n});\nconsole.log('Callback failures', res);\n```\n\nFind full example: [ts](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/callback-failures.ts), [mjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/callback-failures.mjs), [cjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/callback-failures.cjs)\n\n### Who Am I\n\nGet information about yourself.\n\nSee [Whoami](sdk/models/Whoami.ts) for details.\n\n> Not supported by attachmentAV Virus Scan API (Self-hosted on AWS).\n\n```javascript\nconst res = await api.whoamiGet();\nconsole.log('Who am I?', res);\n```\n\nFind full example: [ts](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/whoami.ts), [mjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/whoami.mjs), [cjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/whoami.cjs)\n\n### Usage\n\nGet remaining credits and quota.\n\nSee [Usage](sdk/models/Usage.ts) for details.\n\n> Not supported by attachmentAV Virus Scan API (Self-hosted on AWS).\n\n```javascript\nconst res = await api.usageGet();\nconsole.log('Usage', res);\n```\n\nFind full example: [ts](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/usage.ts), [mjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/usage.mjs), [cjs](https://github.com/widdix/attachmentav-sdk-ts/blob/main/examples/usage.cjs)\n\n## Model\n\nFor more details about the data model, please refer to the following pages.\n\n* [AsyncDownloadScanRequest](sdk/models/AsyncDownloadScanRequest.ts)\n* [AsyncS3ScanRequest](sdk/models/AsyncS3ScanRequest.ts)\n* [ScanResult](sdk/models/ScanResult.ts)\n* [SyncDownloadScanRequest](sdk/models/SyncDownloadScanRequest.ts)\n* [SyncS3ScanRequest](sdk/models/SyncS3ScanRequest.ts)\n* [Usage](sdk/models/Usage.ts)\n* [Whoami](sdk/models/Whoami.ts)\n* [AttachmentAVApi](sdk/apis/AttachmentAVApi.ts)\n\n## Need help?\n\nDo you need any help to get started with attachmentAV? [hello@attachmentav.com](mailto:hello@attachmentav.com).\n","readmeFilename":"README.md"}