Releases: fabiosenracorrea/dynamodb-provider
Releases · fabiosenracorrea/dynamodb-provider
v1.1.11
v1.1.10
v1.1.10
- Feature: SingleTable config is exposed if you want to reference an index, etc
v1.1.9
- Fix:
extend
Entity x Collection parser reference - safety checks added
v1.1.8
- Fix:
extend
Entity x Collection retrieval. Entity parser was not being applied when retrieving the collection
v1.1.7
- Fix:
extend
Entity interaction fixed.fromEntity
creations were not passing it down properly to get it called
v1.1.6
- Fix:
autoGen
was not respecting values already present on create/update values
v1.1.5
- Feature:
getEntityByType
helper added to thesingleTable.schema
to facilitate dynamic entity extractions - Fix:
GenericIndexMappingFns
return types were not properly defined as aRecord<string, ...>
1.1.4
- Fix:
swapParams
typing for partition param matching when creating an entity/index fix. If we had an incomplete paramMatch before, the resulting type for the keyGetter would not be properly merged.
Quick example:
export const pProjectPartition = schema.createPartition({
name: 'PROJECT_PARTITION',
getPartitionKey: ({ projectId }: { projectId: string }) => ['PROJECT', projectId],
entries: {
comments: ({ timestamp, taskId }: { projectId: string; taskId: string }) => [
'TASK',
taskId,
'COMMENT',
timestamp,
],
// ...other entries
},
});
interface TaskComment {
project: string;
task: string;
timestamp: string;
user: string;
id: string;
text: string;
}
export const eTaskComment = pProjectPartition
.use('comments')
.create<TaskComment>()
.entity({
type: 'TASK_COMMENT',
paramMatch: {
projectId: 'project',
taskId: 'task',
// we do not need to match timestamp, as the prop exists on TaskComment
},
autoGen: {
onCreate: {
timestamp: 'timestamp',
id: 'KSUID',
},
onUpdate: {
updatedAt: 'timestamp',
},
},
});
// before the fix: eTaskComment.getKey() params would be inferred as project/timestamp only
// now: correctly infers project/task/timestamp as the valid key params
v1.1.3
- Fix:
IndexPartition
type forrangeQueries
- it was typed as the parsed obj (which happens at the entity level) instead of a pass-through. - Fix: Double low level transact params log on single table removed
v1.1.2
Type Enhance: Resolved entity type when extend is present was reworked to present some weird behavior with Omit