@medialane/sdk 0.85.1 → 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 +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/{services-ZOliCaO0.d.cts → services-Cm9PVUkA.d.cts} +5 -0
- package/dist/{services-B-RntQSm.d.ts → services-DDAdIU4r.d.ts} +5 -0
- package/dist/starknet/index.cjs +8 -0
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +1 -1
- package/dist/starknet/index.d.ts +1 -1
- package/dist/starknet/index.js +8 -0
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -715,12 +715,20 @@ var ApiClient = class {
|
|
|
715
715
|
};
|
|
716
716
|
if (options.chain) body.chain = options.chain;
|
|
717
717
|
if (options.emailVerificationToken) body.emailVerificationToken = options.emailVerificationToken;
|
|
718
|
+
if (options.email) body.email = options.email;
|
|
718
719
|
return this.request("/v1/users/me", {
|
|
719
720
|
method: "POST",
|
|
720
721
|
body: JSON.stringify(body),
|
|
721
722
|
headers: this.bearer(clerkToken)
|
|
722
723
|
});
|
|
723
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
|
+
}
|
|
724
732
|
/**
|
|
725
733
|
* Get the authenticated user's stored wallet address from the backend DB.
|
|
726
734
|
* Returns null if the user has not completed onboarding yet.
|