{"_id":"@arunvaradharajalu/common.mongodb-api","_rev":"3-03847fa7a2e1f9bdf84e5cf3deccb16f","name":"@arunvaradharajalu/common.mongodb-api","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@arunvaradharajalu/common.mongodb-api","version":"1.0.0","keywords":["mongodb-api-wrapper"],"author":{"name":"Arun Varadharajalu"},"license":"ISC","_id":"@arunvaradharajalu/common.mongodb-api@1.0.0","maintainers":[{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"}],"homepage":"https://github.com/arunv11u/common.mongodb-api#readme","bugs":{"url":"https://github.com/arunv11u/common.mongodb-api/issues"},"dist":{"shasum":"52ed3d971ee3cfd5f6c69aa074af0aa63a5828eb","tarball":"https://registry.npmjs.org/@arunvaradharajalu/common.mongodb-api/-/common.mongodb-api-1.0.0.tgz","fileCount":29,"integrity":"sha512-I1zzkUySfk4komYSt7NVzrUn4ICTdBWUyS9m2W56RUa9bqCHSssE7/u6S/D2ngWeO6xPegSgrVTsC1wukkq/Xg==","signatures":[{"sig":"MEUCIQDeSKpBONsqWH7W9ydQ7d4mMygpbqlLl+ATvJSklRNu8AIgAaemRHCd1JF38VQ3M3e2skqIt4B5vhhgd11ssUZhZA0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47906},"jest":{"roots":["<rootDir>/test"],"preset":"ts-jest","reporters":["default",["./node_modules/jest-html-reporter",{"pageTitle":"MongoDB API Test Report"}]],"clearMocks":true,"globalSetup":"./test/global-setup.ts","globalTeardown":"./test/global-teardown.ts","testEnvironment":"node","setupFilesAfterEnv":["./test/setup.ts"]},"main":"./build/index.js","types":"./build/index.d.ts","gitHead":"931bc77c1cc6d5e7a0f1001920f34ea7a0397924","scripts":{"test":"jest --watchAll --verbose --no-cache --detectOpenHandles --env=node --coverage","build":"npm run clean && tsc --project tsconfig.build.json","clean":"rimraf build"},"_npmUser":{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"},"repository":{"url":"git+https://github.com/arunv11u/common.mongodb-api.git","type":"git"},"_npmVersion":"10.2.4","description":"This package contains wrapper for mongodb module","directories":{},"_nodeVersion":"20.11.0","dependencies":{"mongodb":"^6.7.0","mongodb-memory-server":"^8.12.2","@arunvaradharajalu/common.errors":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.7","ts-jest":"^29.1.4","@types/jest":"^29.5.12","@faker-js/faker":"^7.6.0","jest-html-reporter":"^3.10.2"},"_npmOperationalInternal":{"tmp":"tmp/common.mongodb-api_1.0.0_1718559381546_0.45835033436954653","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@arunvaradharajalu/common.mongodb-api","version":"1.1.0","keywords":["mongodb-api-wrapper"],"author":{"name":"Arun Varadharajalu"},"license":"ISC","_id":"@arunvaradharajalu/common.mongodb-api@1.1.0","maintainers":[{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"}],"homepage":"https://github.com/arunv11u/common.mongodb-api#readme","bugs":{"url":"https://github.com/arunv11u/common.mongodb-api/issues"},"dist":{"shasum":"3cb3b4b44e2d04028327079a8fda67c2d3a758cb","tarball":"https://registry.npmjs.org/@arunvaradharajalu/common.mongodb-api/-/common.mongodb-api-1.1.0.tgz","fileCount":31,"integrity":"sha512-9+DHa3Zv6dtoLXzI0U2lO4zPOQe8ac7TsWO6aQ+6FgzJ37zByi1RUUcR53EDPYl779wZxpRRbaun9wP1O4WrQw==","signatures":[{"sig":"MEQCIGbLMC2WQnAEIBCIrLEG8KSeksm40tr8ip0QAEta+oFcAiBvLWWGFc9DObPD0mv5djaA685qS/9VBEpLDqDcFB2wJQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51239},"jest":{"roots":["<rootDir>/test"],"preset":"ts-jest","reporters":["default",["./node_modules/jest-html-reporter",{"pageTitle":"MongoDB API Test Report"}]],"clearMocks":true,"globalSetup":"./test/global-setup.ts","globalTeardown":"./test/global-teardown.ts","testEnvironment":"node","setupFilesAfterEnv":["./test/setup.ts"]},"main":"./build/index.js","types":"./build/index.d.ts","gitHead":"d62d41c0db7ca44cf2562cd6fcd0fe0bd00541c3","scripts":{"test":"jest --watchAll --verbose --no-cache --detectOpenHandles --env=node --coverage","build":"npm run clean && tsc --project tsconfig.build.json","clean":"rimraf build"},"_npmUser":{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"},"repository":{"url":"git+https://github.com/arunv11u/common.mongodb-api.git","type":"git"},"_npmVersion":"10.2.4","description":"This package contains wrapper for mongodb module","directories":{},"_nodeVersion":"20.11.0","dependencies":{"mongodb":"^6.7.0","mongodb-memory-server":"^8.12.2","@arunvaradharajalu/common.errors":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.7","ts-jest":"^29.1.4","@types/jest":"^29.5.12","@faker-js/faker":"^7.6.0","jest-html-reporter":"^3.10.2"},"_npmOperationalInternal":{"tmp":"tmp/common.mongodb-api_1.1.0_1720163717636_0.36181569838436944","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@arunvaradharajalu/common.mongodb-api","version":"1.1.1","keywords":["mongodb-api-wrapper"],"author":{"name":"Arun Varadharajalu"},"license":"ISC","_id":"@arunvaradharajalu/common.mongodb-api@1.1.1","maintainers":[{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"}],"homepage":"https://github.com/arunv11u/common.mongodb-api#readme","bugs":{"url":"https://github.com/arunv11u/common.mongodb-api/issues"},"dist":{"shasum":"41c0c824b9ed6b69e034e051f44f3423246c0f40","tarball":"https://registry.npmjs.org/@arunvaradharajalu/common.mongodb-api/-/common.mongodb-api-1.1.1.tgz","fileCount":31,"integrity":"sha512-ZkOptP0qTw8hRB0KPjtN3tyz9ArbDDwWltJ1pHMP92RY9BCt4xpeCsqZB/AZ1AQagY4FSULRR8K2rE5ZMwBWrw==","signatures":[{"sig":"MEYCIQC/bE+Alg1rVBDRkK52/8MBcWXFvflomZC7dviCJZ/inQIhANbhjleZHxwW8wRGz/yKyuO+oKqb3nPFKf3kSiN9b6wW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51239},"jest":{"roots":["<rootDir>/test"],"preset":"ts-jest","reporters":["default",["./node_modules/jest-html-reporter",{"pageTitle":"MongoDB API Test Report"}]],"clearMocks":true,"globalSetup":"./test/global-setup.ts","globalTeardown":"./test/global-teardown.ts","testEnvironment":"node","setupFilesAfterEnv":["./test/setup.ts"]},"main":"./build/index.js","types":"./build/index.d.ts","gitHead":"434f17352b8131afbbb8b22dfad2dedea8c68d21","scripts":{"test":"jest --watchAll --verbose --no-cache --detectOpenHandles --env=node --coverage","build":"npm run clean && tsc --project tsconfig.build.json","clean":"rimraf build"},"_npmUser":{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"},"repository":{"url":"git+https://github.com/arunv11u/common.mongodb-api.git","type":"git"},"_npmVersion":"10.2.4","description":"This package contains wrapper for mongodb module","directories":{},"_nodeVersion":"20.11.0","dependencies":{"mongodb":"^6.7.0","@arunvaradharajalu/common.errors":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.7","ts-jest":"^29.1.4","@types/jest":"^29.5.12","@faker-js/faker":"^7.6.0","jest-html-reporter":"^3.10.2","mongodb-memory-server":"^8.12.2"},"_npmOperationalInternal":{"tmp":"tmp/common.mongodb-api_1.1.1_1720392337723_0.8404122989432958","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@arunvaradharajalu/common.mongodb-api","version":"1.2.0","description":"This package contains wrapper for mongodb module","main":"./build/index.js","types":"./build/index.d.ts","scripts":{"clean":"rimraf build","build":"npm run clean && tsc --project tsconfig.build.json","test":"jest --watchAll --verbose --no-cache --detectOpenHandles --env=node --coverage"},"jest":{"preset":"ts-jest","testEnvironment":"node","globalSetup":"./test/global-setup.ts","globalTeardown":"./test/global-teardown.ts","setupFilesAfterEnv":["./test/setup.ts"],"roots":["<rootDir>/test"],"clearMocks":true,"reporters":["default",["./node_modules/jest-html-reporter",{"pageTitle":"MongoDB API Test Report"}]]},"repository":{"type":"git","url":"git+https://github.com/arunv11u/common.mongodb-api.git"},"keywords":["mongodb-api-wrapper"],"author":{"name":"Arun Varadharajalu"},"license":"ISC","bugs":{"url":"https://github.com/arunv11u/common.mongodb-api/issues"},"homepage":"https://github.com/arunv11u/common.mongodb-api#readme","devDependencies":{"@faker-js/faker":"^7.6.0","@types/jest":"^29.5.12","jest-html-reporter":"^3.10.2","mongodb-memory-server":"^8.12.2","rimraf":"^5.0.7","ts-jest":"^29.1.4"},"dependencies":{"@arunvaradharajalu/common.errors":"^1.0.0","mongodb":"^6.7.0"},"_id":"@arunvaradharajalu/common.mongodb-api@1.2.0","gitHead":"c7a06c953c3da037bb56e964897d4a9364dbeba1","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-JSzhXSZVeFXig0p237QAiTlvm/2Rj3964E2RaStWyzMRZmOXd+d+iEHqTONHQkOZqOLnnbJSWHpZgidLgz+O1w==","shasum":"7470dbc6da65e5b896e73d7b9fa7b409e00a628e","tarball":"https://registry.npmjs.org/@arunvaradharajalu/common.mongodb-api/-/common.mongodb-api-1.2.0.tgz","fileCount":31,"unpackedSize":52582,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBxZOYLeVGWTpTG+WvErA//O3uEGNeK22hin9aGxh9HOAiEAn1SprQOcWZ4abvV4n2IHDIRVUL2PK1ueuVJ38Riabas="}]},"_npmUser":{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"},"directories":{},"maintainers":[{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/common.mongodb-api_1.2.0_1729962113595_0.18676047020733866"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-16T17:36:21.438Z","modified":"2024-10-26T17:01:54.050Z","1.0.0":"2024-06-16T17:36:21.747Z","1.1.0":"2024-07-05T07:15:17.781Z","1.1.1":"2024-07-07T22:45:37.882Z","1.2.0":"2024-10-26T17:01:53.866Z"},"bugs":{"url":"https://github.com/arunv11u/common.mongodb-api/issues"},"author":{"name":"Arun Varadharajalu"},"license":"ISC","homepage":"https://github.com/arunv11u/common.mongodb-api#readme","keywords":["mongodb-api-wrapper"],"repository":{"type":"git","url":"git+https://github.com/arunv11u/common.mongodb-api.git"},"description":"This package contains wrapper for mongodb module","maintainers":[{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"}],"readme":"# @arunvaradharajalu/common.mongodb-api\n\n[![npm version](https://badge.fury.io/js/%40arunvaradharajalu%2Fcommon.mongodb-api.svg)](https://badge.fury.io/js/%40arunvaradharajalu%2Fcommon.mongodb-api)\n[![GitHub issues](https://img.shields.io/github/issues/arunv11u/common.mongodb-api)](https://github.com/arunv11u/common.errors/mongodb-api)\n[![GitHub license](https://img.shields.io/github/license/arunv11u/common.mongodb-api)](https://github.com/arunv11u/common.mongodb-api/blob/master/LICENSE)\n\nThis package provides a wrapper for the MongoDB module, simplifying the usage of MongoDB operations within your Node.js applications.\n\n## Installation\n\nYou can install this package using npm:\n\n```bash\nnpm install @arunvaradharajalu/common.mongodb-api\n```\n\n## Usage\n\n### Setting Up the MongoDB Connection\n\nFirst, initialize and configure the MongoDB connection:\n\n```typescript\nimport { mongoDBConnect } from \"@arunvaradharajalu/common.mongodb-api\";\n\n// Set connection details\nmongoDBConnect.url = \"your-mongodb-url\";\nmongoDBConnect.dbName = \"your-database-name\";\nmongoDBConnect.username = \"your-username\";\nmongoDBConnect.password = \"your-password\";\n\n// Initialize and connect\nmongoDBConnect.init();\nawait mongoDBConnect.connect();\n```\n\n### Using the MongoDB Repository\n\nOnce the connection is established, you can use the MongoDBRepositoryImpl class to perform CRUD operations.\n\n```typescript\nimport { MongoDBRepositoryImpl } from \"@arunvaradharajalu/common.mongodb-api\";\n\nconst db = mongoDBConnect.dbContext;\nconst repository = new MongoDBRepositoryImpl(mongoDBConnect, db);\n\n// Example: Insert a document\nawait repository.add(\"your-collection-name\", { key: \"value\" });\n\n// Example: Find a document by ID\nconst document = await repository.get(\"your-collection-name\", \"document-id\");\nconsole.log(document);\n\n// Example: Update a document\nawait repository.update(\"your-collection-name\", { key: \"value\" }, { $set: { key: \"new-value\" } });\n\n// Example: Delete a document\nawait repository.remove(\"your-collection-name\", { key: \"value\" });\n```\n\n## Features\n\n- Simplified MongoDB connection handling\n- CRUD operations for MongoDB collections\n- Transaction support\n- Aggregation operations\n\n## Running Tests\n\nTo run the tests, use:\n\n```bash\nnpm test\n```\n\nThe test results will be generated in an HTML report with the title \"MongoDB API Test Report\".\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a pull request or open an issue for bug fixes, improvements, or new features.\n\n## Author\n\nArun Varadharajalu\n\n## License\n\nThis project is licensed under the ISC License.","readmeFilename":"README.md"}