Skip to content

Releases: fabiosenracorrea/dynamodb-provider

v1.1.11

27 Feb 12:37
Compare
Choose a tag to compare
  • Fix: Entity index config now correctly throws if the same index is reference multiple times.

v1.1.10

26 Feb 15:43
Compare
Choose a tag to compare

v1.1.10

  • Feature: SingleTable config is exposed if you want to reference an index, etc

v1.1.9

21 Feb 03:21
Compare
Choose a tag to compare
  • Fix: extend Entity x Collection parser reference - safety checks added

v1.1.8

21 Feb 02:41
Compare
Choose a tag to compare
  • Fix: extend Entity x Collection retrieval. Entity parser was not being applied when retrieving the collection

v1.1.7

19 Feb 15:32
Compare
Choose a tag to compare
  • Fix: extend Entity interaction fixed. fromEntity creations were not passing it down properly to get it called

v1.1.6

17 Feb 18:21
Compare
Choose a tag to compare
  • Fix: autoGen was not respecting values already present on create/update values

v1.1.5

17 Dec 18:48
Compare
Choose a tag to compare
  • Feature: getEntityByType helper added to the singleTable.schema to facilitate dynamic entity extractions
  • Fix: GenericIndexMappingFns return types were not properly defined as a Record<string, ...>

1.1.4

12 Dec 12:37
Compare
Choose a tag to compare
  • 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

11 Dec 23:18
Compare
Choose a tag to compare
  • Fix: IndexPartition type for rangeQueries - 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

23 Nov 21:10
Compare
Choose a tag to compare

Type Enhance: Resolved entity type when extend is present was reworked to present some weird behavior with Omit