-
Notifications
You must be signed in to change notification settings - Fork 175
feat(parser): implemented a helper function Base64Encoded
to decode base64 encoded payloads
#4413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use the new helper in the Kinsis schema here (packages/parser/src/schemas/kinesis.ts
) similar to how we use the DynamoDB one in the DynamoDB schema here?
@dreamorosi The dynamodb helper doesn't seem to be used in that schema, it's only referenced in the comments. It's using |
If I understand the new helper correctly, you should be able to replace these lines here with something like this: const KinesisDataStreamRecordPayload = z.object({
kinesisSchemaVersion: z.string(),
partitionKey: z.string(),
sequenceNumber: z.string(),
approximateArrivalTimestamp: z.number(),
data: Base64Encoded(z.any()), // or z.unknown()
}); and also remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this
|
Summary
This PR adds a helper function which decodes a base64 encoded payload and parses the decoded payload with the schema passed to the function
Changes
Issue number: closes #4412
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.