@medialane/sdk 0.85.1 → 0.85.3
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 +9 -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 +9 -0
- package/dist/index.js.map +1 -1
- package/dist/{services-B-RntQSm.d.ts → services-14BcGiDF.d.ts} +6 -0
- package/dist/{services-ZOliCaO0.d.cts → services-Yy1coqTe.d.cts} +6 -0
- package/dist/starknet/index.cjs +9 -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 +9 -0
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -715,12 +715,21 @@ 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;
|
|
719
|
+
if (options.accountToken) body.accountToken = options.accountToken;
|
|
718
720
|
return this.request("/v1/users/me", {
|
|
719
721
|
method: "POST",
|
|
720
722
|
body: JSON.stringify(body),
|
|
721
723
|
headers: this.bearer(clerkToken)
|
|
722
724
|
});
|
|
723
725
|
}
|
|
726
|
+
/** 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. */
|
|
727
|
+
async checkEmailExists(email) {
|
|
728
|
+
const { exists } = await this.get(
|
|
729
|
+
`/v1/auth/email/exists?email=${encodeURIComponent(email)}`
|
|
730
|
+
);
|
|
731
|
+
return exists;
|
|
732
|
+
}
|
|
724
733
|
/**
|
|
725
734
|
* Get the authenticated user's stored wallet address from the backend DB.
|
|
726
735
|
* Returns null if the user has not completed onboarding yet.
|