Dyna-Record (v0.7.2) is a strongly typed TypeScript ORM and data modeler for Amazon DynamoDB that implements the single-table design and adjacency list patterns with ACID-compliant transactions. Released on npm with a monthly cadence, it requires Node.js >=22 and TypeScript >=6. Key differentiators from other DynamoDB ORMs like DynamoDB Toolbox include native decorator-based entity definitions, runtime schema validation, and full ESM support. Ships TypeScript types.
npm install dyna-recordNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a DynamoDB table, an entity class, and creates a record using CRUD operations.
Use dynamic import(): `const DynaRecord = await import('dyna-record')` or upgrade Node to 22.12+ with ESM.Remove `experimentalDecorators` from tsconfig.json; use TypeScript >=5.0.
Replace `createTable('my-table')` with `@Table({ name: 'my-table' })`.Ensure all entity properties have matching @Attribute decorators with correct types.
Use partition key alias pattern (e.g., 'USER#<id>') consistently; avoid generic keys.
Run `npm install dyna-record`. Ensure typeRoots includes node_modules or use `esModuleInterop`.
Replace `const DynaRecord = require('dyna-record')` with `import DynaRecord from 'dyna-record'` or `await import('dyna-record')`.Remove `experimentalDecorators: true` from tsconfig.json.
Use lazy import or forward references for related entities.