@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 +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-IzFS_1ge.d.cts → services-Cm9PVUkA.d.cts} +6 -0
- package/dist/{services-L8GY_ETW.d.ts → services-DDAdIU4r.d.ts} +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
|
@@ -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;
|
|
@@ -1373,7 +1375,11 @@ declare class ApiClient {
|
|
|
1373
1375
|
walletType?: string;
|
|
1374
1376
|
appSource?: ApiAppSource;
|
|
1375
1377
|
chain?: ApiChain;
|
|
1378
|
+
emailVerificationToken?: string;
|
|
1379
|
+
email?: string;
|
|
1376
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>;
|
|
1377
1383
|
/**
|
|
1378
1384
|
* Get the authenticated user's stored wallet address from the backend DB.
|
|
1379
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;
|
|
@@ -1373,7 +1375,11 @@ declare class ApiClient {
|
|
|
1373
1375
|
walletType?: string;
|
|
1374
1376
|
appSource?: ApiAppSource;
|
|
1375
1377
|
chain?: ApiChain;
|
|
1378
|
+
emailVerificationToken?: string;
|
|
1379
|
+
email?: string;
|
|
1376
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>;
|
|
1377
1383
|
/**
|
|
1378
1384
|
* Get the authenticated user's stored wallet address from the backend DB.
|
|
1379
1385
|
* Returns null if the user has not completed onboarding yet.
|
package/dist/starknet/index.cjs
CHANGED
|
@@ -705,12 +705,21 @@ var ApiClient = class {
|
|
|
705
705
|
appSource: options.appSource ?? "MEDIALANE_SDK"
|
|
706
706
|
};
|
|
707
707
|
if (options.chain) body.chain = options.chain;
|
|
708
|
+
if (options.emailVerificationToken) body.emailVerificationToken = options.emailVerificationToken;
|
|
709
|
+
if (options.email) body.email = options.email;
|
|
708
710
|
return this.request("/v1/users/me", {
|
|
709
711
|
method: "POST",
|
|
710
712
|
body: JSON.stringify(body),
|
|
711
713
|
headers: this.bearer(clerkToken)
|
|
712
714
|
});
|
|
713
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
|
+
}
|
|
714
723
|
/**
|
|
715
724
|
* Get the authenticated user's stored wallet address from the backend DB.
|
|
716
725
|
* Returns null if the user has not completed onboarding yet.
|