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

fix(types): allow custom fields in BranchLinkControlParams #1036

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zakwalters
Copy link

Reference

SDK-XXXX -- <TITLE>.

Summary

Updates the BranchLinkControlParams to allow custom entries.

Motivation

The documentation says this is how custom data, such as referring_user_id should be added to deep links, but the types didn't allow for this. Ignoring the types and testing link generation showed that values were passed through successfully, so no change was needed on the code side.

From my testing, all values passed here (strings, numbers, booleans, nulls) were stringified, so I went with Record<string, string> as the type so that users will expect strings on the other side. I also found that passing an explicit undefined would drop the key entirely from the result, so I thought the Record approach was better than [custom: string]: string | undefined, where users might expect the key to be present but with no value, or a null when they handle the deep link.

Type Of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Testing Instructions

cc @BranchMetrics/saas-sdk-devs for visibility.


As an aside, your CONTRIBUTING.md still points to an issue tracker, even though issues seem to have been disabled for this repo.

@zakwalters
Copy link
Author

@nsingh-branch not sure if the PRs are monitored given the lack of response, tagging for some visibility

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.

1 participant