Skip to content
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

create runtime types for reserved metadata #111

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

csmccarthy
Copy link
Member

Internal Changelog

Creating a runtime type for our new reserved metadata, mostly so that we can pull it out in the lambda and store it in the preference store as a top level key

@csmccarthy csmccarthy requested a review from a team November 21, 2023 19:54
});

const ReservedMetadata = t.partial({
tcmp: t.partial({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not the most update to date but what does tcmp represent?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we're storing some "reserved" metadata that we don't want customers to access, and rather than putting them as top level keys where we might have to worry about collisions our communicating to customers to avoid these keywords, we're grouping them all under a tcmp field to shrink the chance of collision as much as possible

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So a tcmp field is just a nested field to sorta hide these values that we don't want the customer to see?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, exactly! Then the values themselves are just arbitrary module data that we want synced

@csmccarthy csmccarthy merged commit 2a0d7c8 into main Nov 21, 2023
10 checks passed
@delete-merged-branch delete-merged-branch bot deleted the csmccarthy/reserved-metadata-io-ts branch November 21, 2023 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants