@medialane/sdk 0.85.0 → 0.85.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -714,12 +714,21 @@ var ApiClient = class {
714
714
  appSource: options.appSource ?? "MEDIALANE_SDK"
715
715
  };
716
716
  if (options.chain) body.chain = options.chain;
717
+ if (options.emailVerificationToken) body.emailVerificationToken = options.emailVerificationToken;
718
+ if (options.email) body.email = options.email;
717
719
  return this.request("/v1/users/me", {
718
720
  method: "POST",
719
721
  body: JSON.stringify(body),
720
722
  headers: this.bearer(clerkToken)
721
723
  });
722
724
  }
725
+ /** Whether an email already has an account attached — used by io's onboarding to branch into an "already exists" message instead of creating a duplicate account. */
726
+ async checkEmailExists(email) {
727
+ const { exists } = await this.get(
728
+ `/v1/auth/email/exists?email=${encodeURIComponent(email)}`
729
+ );
730
+ return exists;
731
+ }
723
732
  /**
724
733
  * Get the authenticated user's stored wallet address from the backend DB.
725
734
  * Returns null if the user has not completed onboarding yet.