{"_id":"@api-core/verify","_rev":"3-5e231e5a6a5b0c02fa945909dd8bca6e","name":"@api-core/verify","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@api-core/verify","version":"0.0.1","keywords":["api","client","verification","assert","testing","contract","type-safe","typescript"],"author":{"url":"https://github.com/shanmukaanem","name":"Shanmuka Chandra Teja Anem"},"license":"MIT","_id":"@api-core/verify@0.0.1","maintainers":[{"name":"shanmukaanem","email":"shanmukaanem@gmail.com"}],"contributors":[{"name":"Shanmuka Chandra Teja Anem"}],"homepage":"https://github.com/QECore/api-core#readme","bugs":{"url":"https://github.com/QECore/api-core/issues"},"dist":{"shasum":"7edc5a3f73969185c98db284129aa6c3da5f4b1a","tarball":"https://registry.npmjs.org/@api-core/verify/-/verify-0.0.1.tgz","fileCount":5,"integrity":"sha512-ysY7BjptvGUPoj1VlwkSP6CXGluHBMpu7Fz2U6WrrfnQtV4st6wA8Kdj3oMUOccp7r+rP4j7ITIuO2P/Uh/ReQ==","signatures":[{"sig":"MEQCIEbfudFavV70LWVxyVZuZK8BNGVJu60+rd2XaTDrpJorAiBz0GboGeQWoxUEjqx2oARSg27kalSqLFbDjAjORrxZ+Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23285},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"b3afa2689b9fd48a2eb27955ec8ca91e2ebf241f","scripts":{"test":"tsx --test tests/verify.test.ts","build":"tsup src/index.ts --format esm --dts --clean --external @api-core/client"},"_npmUser":{"name":"shanmukaanem","email":"shanmukaanem@gmail.com"},"repository":{"url":"git+https://github.com/QECore/api-core.git","type":"git"},"_npmVersion":"10.8.2","description":"Framework-agnostic API verification DSL and contract validation for API-CORE","directories":{},"sideEffects":false,"_nodeVersion":"20.19.0","dependencies":{"@api-core/client":"^0.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/verify_0.0.1_1784829509947_0.7069074055536542","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@api-core/verify","version":"0.0.2","keywords":["api","client","verification","assert","testing","contract","type-safe","typescript"],"author":{"url":"https://github.com/shanmukaanem","name":"Shanmuka Chandra Teja Anem"},"license":"MIT","_id":"@api-core/verify@0.0.2","maintainers":[{"name":"shanmukaanem","email":"shanmukaanem@gmail.com"}],"contributors":[{"name":"Shanmuka Chandra Teja Anem"}],"homepage":"https://github.com/QECore/api-core#readme","bugs":{"url":"https://github.com/QECore/api-core/issues"},"dist":{"shasum":"e3568ad828ace47f05bdfeb1ab7f35ccfedb1e96","tarball":"https://registry.npmjs.org/@api-core/verify/-/verify-0.0.2.tgz","fileCount":6,"integrity":"sha512-OJsYRdJWwCbMU+zIE8xFSRQFH1qPfty26SVFHpQ2LdPoU/iYbxJng+gvT8mmOqjgHmOTHbJKXBJzvKKu+IE3PA==","signatures":[{"sig":"MEUCIQCeV6nS5VZ6ucftPu93vycwKpA01+Nb7eYmM1vjYSQNTgIgGl3pQJxedN6hLWPfnfTYRMcR1IrlNN2WeZ4teAs1aBA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39427},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"03a78282d287a3199d80d9ec7e738663b64fa70e","scripts":{"test":"tsx --test tests/verify.test.ts","build":"tsup && node ../../packages/build/cleanup.cjs"},"_npmUser":{"name":"shanmukaanem","email":"shanmukaanem@gmail.com"},"repository":{"url":"git+https://github.com/QECore/api-core.git","type":"git"},"_npmVersion":"10.8.2","description":"Framework-agnostic API verification DSL and contract validation for API-CORE","directories":{},"sideEffects":false,"_nodeVersion":"20.19.0","dependencies":{"@api-core/client":"^0.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/verify_0.0.2_1786575473486_0.5708288239278252","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"_id":"@api-core/verify@0.0.3","bugs":{"url":"https://github.com/QECore/api-core/issues"},"dist":{"shasum":"8e146a55c48d0bdcb6388f60c5310d69143bcf5e","tarball":"https://registry.npmjs.org/@api-core/verify/-/verify-0.0.3.tgz","fileCount":6,"integrity":"sha512-V3r+mkhj+FtPehMXOPYk1Gjz8vGToQxruSvpC2wZpfLJke1JG1X14vZkv1kqhL3OubRiLGPSwvib6sii4nkl8w==","signatures":[{"sig":"MEUCIHza3IQo3fiIxuuz3Fto2UrNUCaGIJ1CKZIIqk8JtjvqAiEA1KPv9c+WK8JW/abSdmVEw/ywmc0GvbKI9N0TpeS4FKo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEwxCbARggAO7Mhv9EIx2fGdoywJ42BFt8y9YZ1t6kPDAiEA0pdudS74fMZSZrSOExmrgBPu/2xnSwGR/oIaGOo2lP8="}],"unpackedSize":19661},"main":"./dist/index.cjs","name":"@api-core/verify","type":"module","types":"./dist/index.d.ts","author":{"url":"https://github.com/shanmukaanem","name":"Shanmuka Chandra Teja Anem"},"module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"fd4996f8de62b6dbe753efc2a109dc62758adb23","license":"MIT","scripts":{"test":"tsx --test tests/verify.test.ts","build":"tsup && node ../../packages/build/cleanup.cjs"},"version":"0.0.3","_npmUser":{"name":"shanmukaanem","email":"shanmukaanem@gmail.com"},"homepage":"https://github.com/QECore/api-core#readme","keywords":["api","client","verification","assert","testing","contract","type-safe","typescript"],"repository":{"url":"git+https://github.com/QECore/api-core.git","type":"git"},"_npmVersion":"10.9.8","description":"Framework-agnostic API verification DSL and contract validation for API-CORE","directories":{},"maintainers":[{"name":"shanmukaanem","email":"shanmukaanem@gmail.com"}],"sideEffects":false,"_nodeVersion":"22.23.2","contributors":[{"name":"Shanmuka Chandra Teja Anem"}],"dependencies":{"@api-core/client":"^0.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/verify_0.0.3_1788465560955_0.07954589081260388"}}},"time":{"created":"2026-07-23T17:58:29.761Z","modified":"2026-09-03T19:59:21.317Z","0.0.1":"2026-07-23T17:58:30.070Z","0.0.2":"2026-08-12T22:57:53.658Z","0.0.3":"2026-09-03T19:59:21.050Z"},"bugs":{"url":"https://github.com/QECore/api-core/issues"},"author":{"url":"https://github.com/shanmukaanem","name":"Shanmuka Chandra Teja Anem"},"license":"MIT","homepage":"https://github.com/QECore/api-core#readme","keywords":["api","client","verification","assert","testing","contract","type-safe","typescript"],"repository":{"url":"git+https://github.com/QECore/api-core.git","type":"git"},"description":"Framework-agnostic API verification DSL and contract validation for API-CORE","contributors":[{"name":"Shanmuka Chandra Teja Anem"}],"maintainers":[{"name":"shanmukaanem","email":"shanmukaanem@gmail.com"}],"readme":"# @api-core/verify\n\nFramework-agnostic API verification DSL and contract validation for **API-Core**. It provides expressive assert methods to validate HTTP responses, status codes, headers, cookies, and schemas.\n\n## Installation\n\n```bash\nnpm install @api-core/verify @api-core/client\n```\n\n## Quick Start\n\n```ts\nimport { verify } from '@api-core/verify';\n\n// Inside a test\nconst response = await client.call('comment.getComment', { path: { id: 5 } });\n\nverify(response)\n  .toBeSuccessful()\n  .toHaveHeader('content-type', /json/)\n  .toHaveStatus(200);\n```\n\n## Features\n\n- **Expressive Assertions**: Verify status codes (`toHaveStatus`, `toBeSuccessful`), headers (`toHaveHeader`), and cookies.\n- **Deep Object & Schema Validation**: Validate response body schemas and objects with strict deep-equality matching.\n- **Custom Verifiers**: Extend the assertion chain with asynchronous custom verifiers.\n\n## Example\n\nFor details on verify suite capabilities, see [tests/verify.test.ts](./tests/verify.test.ts) or [tests/tests/users.test.ts](../../tests/tests/users.test.ts).\n\n## API Overview\n\n### `verify(response)`\nInitiates the assertion chain. Supported assertions:\n- `toHaveStatus(code)` / `toHaveStatusIn(codes[])`\n- `toBeSuccessful()` / `toBeFailure()`\n- `toHaveHeader(name, valueOrRegex)`\n- `toHaveBody(expectedBody)`\n- `toContainBody(partialBody)`\n- `custom(callback)` (Async custom assertion)\n\n## License\n\nMIT © Shanmuka Chandra Teja Anem\n\n## Contributing\n\nContributions are welcome! Please read the root contributing guidelines, open an issue, or submit a pull request.\n","readmeFilename":"README.md"}