@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
|
@@ -1038,6 +1038,8 @@ type ApiAppSource = "MEDIALANE_STARKNET" | "MEDIALANE_IO" | "MEDIALANE_PORTAL" |
|
|
|
1038
1038
|
type ApiChain = "STARKNET" | "ETHEREUM" | "SOLANA" | "BASE" | "BITCOIN";
|
|
1039
1039
|
interface ApiUserWallet {
|
|
1040
1040
|
walletAddress: string;
|
|
1041
|
+
email?: string | null;
|
|
1042
|
+
emailVerified?: boolean;
|
|
1041
1043
|
}
|
|
1042
1044
|
interface ApiCollectionClaim {
|
|
1043
1045
|
id: string;
|
|
@@ -1374,7 +1376,10 @@ declare class ApiClient {
|
|
|
1374
1376
|
appSource?: ApiAppSource;
|
|
1375
1377
|
chain?: ApiChain;
|
|
1376
1378
|
emailVerificationToken?: string;
|
|
1379
|
+
email?: string;
|
|
1377
1380
|
}): Promise<ApiUserWallet>;
|
|
1381
|
+
/** 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. */
|
|
1382
|
+
checkEmailExists(email: string): Promise<boolean>;
|
|
1378
1383
|
/**
|
|
1379
1384
|
* Get the authenticated user's stored wallet address from the backend DB.
|
|
1380
1385
|
* Returns null if the user has not completed onboarding yet.
|
|
@@ -1038,6 +1038,8 @@ type ApiAppSource = "MEDIALANE_STARKNET" | "MEDIALANE_IO" | "MEDIALANE_PORTAL" |
|
|
|
1038
1038
|
type ApiChain = "STARKNET" | "ETHEREUM" | "SOLANA" | "BASE" | "BITCOIN";
|
|
1039
1039
|
interface ApiUserWallet {
|
|
1040
1040
|
walletAddress: string;
|
|
1041
|
+
email?: string | null;
|
|
1042
|
+
emailVerified?: boolean;
|
|
1041
1043
|
}
|
|
1042
1044
|
interface ApiCollectionClaim {
|
|
1043
1045
|
id: string;
|
|
@@ -1374,7 +1376,10 @@ declare class ApiClient {
|
|
|
1374
1376
|
appSource?: ApiAppSource;
|
|
1375
1377
|
chain?: ApiChain;
|
|
1376
1378
|
emailVerificationToken?: string;
|
|
1379
|
+
email?: string;
|
|
1377
1380
|
}): Promise<ApiUserWallet>;
|
|
1381
|
+
/** 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. */
|
|
1382
|
+
checkEmailExists(email: string): Promise<boolean>;
|
|
1378
1383
|
/**
|
|
1379
1384
|
* Get the authenticated user's stored wallet address from the backend DB.
|
|
1380
1385
|
* Returns null if the user has not completed onboarding yet.
|
package/dist/starknet/index.cjs
CHANGED
|
@@ -706,12 +706,20 @@ var ApiClient = class {
|
|
|
706
706
|
};
|
|
707
707
|
if (options.chain) body.chain = options.chain;
|
|
708
708
|
if (options.emailVerificationToken) body.emailVerificationToken = options.emailVerificationToken;
|
|
709
|
+
if (options.email) body.email = options.email;
|
|
709
710
|
return this.request("/v1/users/me", {
|
|
710
711
|
method: "POST",
|
|
711
712
|
body: JSON.stringify(body),
|
|
712
713
|
headers: this.bearer(clerkToken)
|
|
713
714
|
});
|
|
714
715
|
}
|
|
716
|
+
/** 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. */
|
|
717
|
+
async checkEmailExists(email) {
|
|
718
|
+
const { exists } = await this.get(
|
|
719
|
+
`/v1/auth/email/exists?email=${encodeURIComponent(email)}`
|
|
720
|
+
);
|
|
721
|
+
return exists;
|
|
722
|
+
}
|
|
715
723
|
/**
|
|
716
724
|
* Get the authenticated user's stored wallet address from the backend DB.
|
|
717
725
|
* Returns null if the user has not completed onboarding yet.
|