awslabs / kinesis-aggregation

AWS libraries/modules for working with Kinesis aggregated record data
Apache License 2.0
376 stars 154 forks source link

Fix node typings #124

Closed stevegoossens closed 3 years ago

stevegoossens commented 3 years ago

Issue #, if available:

This should resolve #104 and resolve #118

Description of changes:

Just use KinesisStreamRecordPayload (from aws-lambda/triggers/kinesis-stream) instead of Record (from aws-sdk/clients/kinesis).

KinesisStreamRecordPayload has camelCase properties, e.g. data, which matches the code in kpl-deagg.js:

https://github.com/awslabs/kinesis-aggregation/blob/f9f2a28be83204f2e3c29d38a58bb94a804d7e7c/node/lib/kpl-deagg.js#L39

whereas the current typing of Record has PascalCase properties, e.g. Data.

The type mismatch prevents TypeScript compiling/transpiling.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.