{"_id":"@0to10/aws-dynamodb","_rev":"4-aa0f2d6e574cb1dabbc48c362fe9a564","name":"@0to10/aws-dynamodb","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"@0to10/aws-dynamodb","version":"0.1.0","keywords":["aws","dynamodb","lambda","repository"],"author":{"name":"0TO10","email":"open-source-software@0to10.nl"},"license":"MIT","_id":"@0to10/aws-dynamodb@0.1.0","maintainers":[{"name":"0to10-dev","email":"open-source-software@0to10.nl"}],"homepage":"https://0to10.nl","bugs":{"url":"https://github.com/0to10/aws-dynamodb-library-ts/issues"},"dist":{"shasum":"029ae2a9b0206e71c4fa48d4355a3a44d2bed881","tarball":"https://registry.npmjs.org/@0to10/aws-dynamodb/-/aws-dynamodb-0.1.0.tgz","fileCount":45,"integrity":"sha512-Yr49qz/97OGoEVBdhLuPZ9sXsgFoGGrIbcoeEhpMAgE1WEsF8Jl650/fCHrll+36Ka54O6Pbw0MuBiABCnPV4A==","signatures":[{"sig":"MEUCIAmx3jMCGHZz1cetFg6O5OxsiSqiOdtqc7EQjxg+Ct6RAiEAwksHyQZxaSvs+yPTlJggP9u5aqL2MJeczw+W4WEix9c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31292},"main":"dist/cjs/index.js","types":"./dist/cjs/index.d.ts","module":"dist/esm/index.js","gitHead":"2a0dd06d3136305fd841b36313130b17de8a1a06","scripts":{"lint":"eslint . --ext .ts","test":"jest","build":"tsc -p tsconfig.json && node_modules/.bin/tsc -p tsconfig-cjs.json","lint:fix":"eslint --fix . --ext .ts","build:clean":"(rm -r dist || true) && npm run build","prepublishOnly":"npm run build:clean"},"_npmUser":{"name":"0to10-dev","email":"open-source-software@0to10.nl"},"repository":{"url":"git+https://github.com/0to10/aws-dynamodb-library-ts.git","type":"git"},"_npmVersion":"10.2.4","description":"Typescript library for working with DynamoDB tables","directories":{"test":"tests"},"_nodeVersion":"18.19.1","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","tslib":"^2.2.0","eslint":"^8.56.0","ts-jest":"^29.1.0","@types/node":"~18.17.19","@jest/globals":"^29.5.0","@types/aws-lambda":"~8.10.122","@aws-sdk/util-dynamodb":"~3.606.0","@aws-sdk/client-dynamodb":"^3.629.0","@typescript-eslint/parser":"^6.19.0","eslint-plugin-deprecation":"^2.0.0","license-checker-rseidelsohn":"^4.3.0","@typescript-eslint/eslint-plugin":"^6.19.0"},"_npmOperationalInternal":{"tmp":"tmp/aws-dynamodb_0.1.0_1739132481630_0.7106476093520291","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@0to10/aws-dynamodb","version":"0.2.0","keywords":["aws","dynamodb","lambda","repository"],"author":{"name":"0TO10","email":"open-source-software@0to10.nl"},"license":"MIT","_id":"@0to10/aws-dynamodb@0.2.0","maintainers":[{"name":"0to10-dev","email":"open-source-software@0to10.nl"}],"homepage":"https://0to10.nl","bugs":{"url":"https://github.com/0to10/aws-dynamodb-library-ts/issues"},"dist":{"shasum":"340328f6252568db2bb0380bc8e3eabe275f4229","tarball":"https://registry.npmjs.org/@0to10/aws-dynamodb/-/aws-dynamodb-0.2.0.tgz","fileCount":45,"integrity":"sha512-CXROHAWie67a2DNUUWpRSL0cVpzy7qUPLxirXnHpHcakH1DDv6/kSQNdr3MQV4SlQd9d5RPRBkSiWam/lqZE+g==","signatures":[{"sig":"MEUCIGZEFP9UeIT+97IZ9lCkjmdzpo49op3dQwVhmaxZeMAeAiEAiRFPbhaiFxC9UXm7intthm46ineAa0+8ZcqUpX9j8Uw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32504},"main":"dist/cjs/index.js","types":"./dist/cjs/index.d.ts","module":"dist/esm/index.js","gitHead":"482fb80df6a8288676458611047a5f27cf3e168b","scripts":{"lint":"eslint . --ext .ts","test":"jest","build":"tsc -p tsconfig.json && node_modules/.bin/tsc -p tsconfig-cjs.json","lint:fix":"eslint --fix . --ext .ts","build:clean":"(rm -r dist || true) && npm run build","prepublishOnly":"npm run build:clean"},"_npmUser":{"name":"0to10-dev","email":"open-source-software@0to10.nl"},"repository":{"url":"git+https://github.com/0to10/aws-dynamodb-library-ts.git","type":"git"},"_npmVersion":"10.2.4","description":"Typescript library for working with DynamoDB tables","directories":{"test":"tests"},"_nodeVersion":"18.19.1","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","tslib":"^2.2.0","eslint":"^8.56.0","ts-jest":"^29.1.0","@types/node":"~18.17.19","@jest/globals":"^29.5.0","@types/aws-lambda":"~8.10.122","@aws-sdk/util-dynamodb":"~3.606.0","@aws-sdk/client-dynamodb":"^3.629.0","@typescript-eslint/parser":"^6.19.0","eslint-plugin-deprecation":"^2.0.0","license-checker-rseidelsohn":"^4.3.0","@typescript-eslint/eslint-plugin":"^6.19.0"},"_npmOperationalInternal":{"tmp":"tmp/aws-dynamodb_0.2.0_1739133638825_0.4387812201640069","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@0to10/aws-dynamodb","version":"0.3.0","keywords":["aws","dynamodb","lambda","repository"],"author":{"name":"0TO10","email":"open-source-software@0to10.nl"},"license":"MIT","_id":"@0to10/aws-dynamodb@0.3.0","maintainers":[{"name":"0to10-dev","email":"open-source-software@0to10.nl"}],"homepage":"https://0to10.nl","bugs":{"url":"https://github.com/0to10/aws-dynamodb-library-ts/issues"},"dist":{"shasum":"2bdcb3179b3a83eddf034a3bc9e41450933bd0cb","tarball":"https://registry.npmjs.org/@0to10/aws-dynamodb/-/aws-dynamodb-0.3.0.tgz","fileCount":45,"integrity":"sha512-36L3MGjg58xV8ykxxck4n7N3IbW2F74WvODEGiwvvrRQfsItXbkEfTIyGV5v8nyDoHaWppZ3BbT0EhZWURjPMQ==","signatures":[{"sig":"MEUCIQDb2kg8coILw51n/MBZ4f5T+iQ++W0lSHnYep1rigafigIgObwv+b0RE/ThZOxze2uwmeuJgOCElc8O7ILYQ+UhYOY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33030},"main":"dist/cjs/index.js","types":"./dist/cjs/index.d.ts","module":"dist/esm/index.js","gitHead":"9c5544057167769a59f20e9404ebee1702b173c5","scripts":{"lint":"eslint . --ext .ts","test":"jest","build":"tsc -p tsconfig.json && node_modules/.bin/tsc -p tsconfig-cjs.json","lint:fix":"eslint --fix . --ext .ts","build:clean":"(rm -r dist || true) && npm run build","prepublishOnly":"npm run build:clean"},"_npmUser":{"name":"0to10-dev","email":"open-source-software@0to10.nl"},"repository":{"url":"git+https://github.com/0to10/aws-dynamodb-library-ts.git","type":"git"},"_npmVersion":"10.2.4","description":"Typescript library for working with DynamoDB tables","directories":{"test":"tests"},"_nodeVersion":"18.19.1","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","tslib":"^2.2.0","eslint":"^8.56.0","ts-jest":"^29.1.0","@types/node":"~18.17.19","@jest/globals":"^29.5.0","@types/aws-lambda":"~8.10.122","@aws-sdk/util-dynamodb":"~3.606.0","@aws-sdk/client-dynamodb":"^3.629.0","@typescript-eslint/parser":"^6.19.0","eslint-plugin-deprecation":"^2.0.0","license-checker-rseidelsohn":"^4.3.0","@typescript-eslint/eslint-plugin":"^6.19.0"},"_npmOperationalInternal":{"tmp":"tmp/aws-dynamodb_0.3.0_1739373453873_0.8185000788779386","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@0to10/aws-dynamodb","version":"0.4.0","keywords":["aws","dynamodb","lambda","repository"],"author":{"name":"0TO10","email":"open-source-software@0to10.nl"},"license":"MIT","_id":"@0to10/aws-dynamodb@0.4.0","maintainers":[{"name":"0to10-dev","email":"open-source-software@0to10.nl"}],"homepage":"https://0to10.nl","bugs":{"url":"https://github.com/0to10/aws-dynamodb-library-ts/issues"},"dist":{"shasum":"72fec44411f14ed911f0433269341c96969e5fc6","tarball":"https://registry.npmjs.org/@0to10/aws-dynamodb/-/aws-dynamodb-0.4.0.tgz","fileCount":57,"integrity":"sha512-xUA1yBReMUppp9QHfcl4/XNvWX2JlBSVo00B1MnowDZ7NXfC7PftF9Qsqq0lumceJSFLv9f2Cw6mJ1U+PDkeFA==","signatures":[{"sig":"MEQCIA6fAZjBqr7/e8ledYtYkTJBAXM1RwZfnV57NeVDwQ2UAiBGI62FLiyHEzOINsdy9vVjq0rGIROhIZihXU7oXLUW9w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37432},"main":"dist/cjs/index.js","types":"./dist/cjs/index.d.ts","module":"dist/esm/index.js","gitHead":"b233496ec07ec59885a1ca20f853189ef02b7de5","scripts":{"lint":"eslint . --ext .ts","test":"jest","build":"tsc -p tsconfig.json && node_modules/.bin/tsc -p tsconfig-cjs.json","lint:fix":"eslint --fix . --ext .ts","build:clean":"(rm -r dist || true) && npm run build","prepublishOnly":"npm run build:clean"},"_npmUser":{"name":"0to10-dev","email":"open-source-software@0to10.nl"},"repository":{"url":"git+https://github.com/0to10/aws-dynamodb-library-ts.git","type":"git"},"_npmVersion":"10.2.4","description":"Typescript library for working with DynamoDB tables","directories":{"test":"tests"},"_nodeVersion":"18.19.1","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","tslib":"^2.2.0","eslint":"^8.56.0","ts-jest":"^29.1.0","@types/node":"~18.17.19","@jest/globals":"^29.5.0","@types/aws-lambda":"~8.10.122","@aws-sdk/util-dynamodb":"~3.606.0","@aws-sdk/client-dynamodb":"^3.629.0","@typescript-eslint/parser":"^6.19.0","eslint-plugin-deprecation":"^2.0.0","license-checker-rseidelsohn":"^4.3.0","@typescript-eslint/eslint-plugin":"^6.19.0"},"_npmOperationalInternal":{"tmp":"tmp/aws-dynamodb_0.4.0_1739793155336_0.040743645228619174","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@0to10/aws-dynamodb","description":"Typescript library for working with DynamoDB tables","version":"1.0.0","author":{"name":"0TO10","email":"open-source-software@0to10.nl"},"homepage":"https://0to10.nl","keywords":["aws","dynamodb","lambda","repository"],"main":"dist/cjs/index.js","module":"dist/esm/index.js","directories":{"test":"tests"},"scripts":{"build":"tsc -p tsconfig.json && node_modules/.bin/tsc -p tsconfig-cjs.json","build:clean":"(rm -r dist || true) && npm run build","lint":"eslint . --ext .ts","lint:fix":"eslint --fix . --ext .ts","test":"jest","prepublishOnly":"npm run build:clean"},"repository":{"type":"git","url":"git+https://github.com/0to10/aws-dynamodb-library-ts.git"},"license":"MIT","bugs":{"url":"https://github.com/0to10/aws-dynamodb-library-ts/issues"},"dependencies":{},"devDependencies":{"@aws-sdk/client-dynamodb":"^3.629.0","@aws-sdk/util-dynamodb":"~3.606.0","@jest/globals":"^29.5.0","@types/aws-lambda":"~8.10.122","@types/node":"~18.17.19","@typescript-eslint/eslint-plugin":"^6.19.0","@typescript-eslint/parser":"^6.19.0","eslint":"^8.56.0","eslint-plugin-deprecation":"^2.0.0","jest":"^29.5.0","license-checker-rseidelsohn":"^4.3.0","ts-jest":"^29.1.0","tslib":"^2.2.0"},"_id":"@0to10/aws-dynamodb@1.0.0","gitHead":"571029a07c97dd4b539343b57d29af8d1cbe68f0","types":"./dist/cjs/index.d.ts","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-eeXEd+m4+oEkRB3xpWyZWWOWvYa0mXL31OWG+drKjW6LxXIgxmqdBzENRbkjPVcgRJY3oHXjd4AS6FzgsN9K9Q==","shasum":"17168dd4554c2183e58f4ca4ac14e3a1c92f6874","tarball":"https://registry.npmjs.org/@0to10/aws-dynamodb/-/aws-dynamodb-1.0.0.tgz","fileCount":57,"unpackedSize":39856,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDd3pn3J9VkVynZHC0bx/C/FgLihxOD5Kjipqb+gTFKIgIgfMnotPhMUA/w5hBPe01s9kiH2iAvoJ2mliO+5CQ3T18="}]},"_npmUser":{"name":"0to10-dev","email":"open-source-software@0to10.nl"},"maintainers":[{"name":"0to10-dev","email":"open-source-software@0to10.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/aws-dynamodb_1.0.0_1740308197420_0.7322626861215809"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-09T20:21:21.507Z","modified":"2025-02-23T10:56:37.865Z","0.1.0":"2025-02-09T20:21:21.852Z","0.2.0":"2025-02-09T20:40:39.029Z","0.3.0":"2025-02-12T15:17:34.069Z","0.4.0":"2025-02-17T11:52:35.515Z","1.0.0":"2025-02-23T10:56:37.648Z"},"bugs":{"url":"https://github.com/0to10/aws-dynamodb-library-ts/issues"},"author":{"name":"0TO10","email":"open-source-software@0to10.nl"},"license":"MIT","homepage":"https://0to10.nl","keywords":["aws","dynamodb","lambda","repository"],"repository":{"type":"git","url":"git+https://github.com/0to10/aws-dynamodb-library-ts.git"},"description":"Typescript library for working with DynamoDB tables","maintainers":[{"name":"0to10-dev","email":"open-source-software@0to10.nl"}],"readme":"# AWS DynamoDB library\n\nThis repository provides a library to work with DynamoDB tables.\n\n\n## Getting started\n\nGet started quickly by following the instructions below.\n\n\n### Installation\n\nUse [NPM](https://www.npmjs.com/) to install this library into your project:\n\n```shell\nnpm install --save @0to10/aws-dynamodb\n```\n\n\n### Basic usage\n\nImplementing a repository is easy. Create a new class and extend the abstract `Repository` class\nthat the library exposes.\n\nAfter implementing the abstract `hydrate` method you can start using the `findBy` and `findOneBy` methods\nof the repository right away. No additional configuration or methods are needed.\n\nThe `findBy` and `findOneBy` methods both accept an object of criteria, where the key is the field that\nis matched and the value is the value of the field. You may use a wildcard at the end of a value to perform\na \"begins_with\" search on the DynamoDB table.\n\nThe `findBy` method accepts a second argument to adjust the limit of the query.\n\n```typescript\n'use strict';\n\nimport {NativeAttributeValue} from '@aws-sdk/util-dynamodb';\n\nimport {Repository} from '@0to10/aws-dynamodb';\n\nclass EntityRepository extends Repository<Entity> {\n\n    protected hydrate(item: Record<string, NativeAttributeValue>): Entity {\n        return new Entity(item);\n    }\n\n}\n```\n\n\n### Additional methods\n\nAny convenience methods may be added to the repository:\n\nIn the example below, two methods have been added: `findOneByName` and `findByName`. You may choose to\nrun a custom query by calling the protected `query` method or call any of the public methods.\n\n```typescript\n'use strict';\n\nimport {QueryCommandInput} from '@aws-sdk/client-dynamodb';\nimport {NativeAttributeValue} from '@aws-sdk/util-dynamodb';\n\nimport {Repository} from '@0to10/aws-dynamodb';\n\nclass EntityRepository extends Repository<Entity> {\n\n    public async findOneByName(name: string): Promise<Entity> {\n        const params: QueryCommandInput = {\n            // Define your search params\n        };\n\n        return this.query(params);\n    }\n\n    public async findByName(name: string): Promise<Entity[]> {\n        return this.findBy({\n            name_field: name,\n        });\n    }\n\n    protected hydrate(item: Record<string, NativeAttributeValue>): Entity {\n        return new Entity(item);\n    }\n\n}\n```\n\n\n## Return values\n\nWhen using and implementing a `Repository` class, please note:\n\n* The `hydrate` method must always return a single hydrated document\n* The `findOneBy` method will always return a single entity or `undefined` if no result was found\n* The `findBy` method always returns an array of entities (which may be empty)\n\nYou may typehint for an Array-like return when using the `findBy` method, but be aware that the actual\nreturn type is a `Collection` (which extends Array). The `Collection` class exposes a `LastEvaluatedKey`\nvariable with which you can run consecutive queries for when you need more results than the specified\nlimit.\n","readmeFilename":"README.md"}