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

[FEAT]: adding meta field to @magic-sdk magic constructor #708

Conversation

bengriffin1
Copy link
Contributor

@bengriffin1 bengriffin1 commented Feb 9, 2024

πŸ“¦ Pull Request

Adding a meta field to the Magic constructor in the @magic-sdk package to allow arbitrary data to be sent to the Magic backend. Ping @bengriffin1 for more details.

βœ… Fixed Issues

n/a

🚨 Test instructions

No test needed as of now

⚠️ Don't forget to add a semver label!

Please only add one label:

  • patch: Bug Fix?
  • minor: New Feature?
  • major: Breaking Change?
  • skip-release: It's unnecessary to publish this change.
πŸ“¦ Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-sdk/[email protected]
npm install @magic-sdk/[email protected]
npm install @magic-sdk/[email protected]
npm install @magic-sdk/[email protected]
npm install @magic-sdk/[email protected]
npm install @magic-sdk/[email protected]
npm install [email protected]
# or 
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-sdk/[email protected]
yarn add @magic-sdk/[email protected]
yarn add @magic-sdk/[email protected]
yarn add @magic-sdk/[email protected]
yarn add @magic-sdk/[email protected]
yarn add @magic-sdk/[email protected]
yarn add [email protected]

@bengriffin1 bengriffin1 added the minor Increment the minor version when merged label Feb 9, 2024
@hcote hcote self-requested a review February 9, 2024 14:51
@Ethella Ethella self-requested a review February 9, 2024 15:47
@@ -118,6 +118,7 @@ export interface MagicSDKAdditionalConfiguration<
testMode?: boolean;
deferPreload?: boolean;
useStorageCache?: boolean;
meta?: any; // Generic field for clients to add metadata
Copy link
Member

Choose a reason for hiding this comment

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

Could you provide an example of well-structured metadata that our client, WC, has previously submitted? I'm interested in understanding the standards and quality they adhere to.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They'll be submitting something like this:

meta: {
projectId: "abcd123"
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But the idea is that the meta field is unopinionated, so that any client can put identifying info in there to reference in event logs later on. They could for example put in their internal user ID, or classification tags.

@bengriffin1 bengriffin1 added this pull request to the merge queue Feb 9, 2024
Merged via the queue into master with commit 672a5be Feb 9, 2024
4 checks passed
@bengriffin1 bengriffin1 deleted the feature/@magic-sdk/na/add-meta-field-to-magic-constructor branch February 9, 2024 19:02
@Ariflo Ariflo added the released This issue/pull request has been released. label Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants