@formo/analytics 1.28.0 → 1.28.1
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/cjs/src/privy/types.d.ts +65 -64
- package/dist/cjs/src/privy/utils.js +26 -23
- package/dist/cjs/src/version.d.ts +1 -1
- package/dist/cjs/src/version.js +1 -1
- package/dist/esm/src/privy/types.d.ts +65 -64
- package/dist/esm/src/privy/utils.js +26 -23
- package/dist/esm/src/version.d.ts +1 -1
- package/dist/esm/src/version.js +1 -1
- package/dist/index.umd.min.js +1 -1
- package/package.json +1 -1
|
@@ -10,37 +10,36 @@
|
|
|
10
10
|
/**
|
|
11
11
|
* Valid Privy linked account type strings.
|
|
12
12
|
*/
|
|
13
|
-
export type PrivyAccountType = "email" | "phone" | "wallet" | "farcaster" | "telegram" | "apple_oauth" | "discord_oauth" | "github_oauth" | "google_oauth" | "instagram_oauth" | "linkedin_oauth" | "spotify_oauth" | "tiktok_oauth" | "twitter_oauth" | "
|
|
13
|
+
export type PrivyAccountType = "email" | "phone" | "wallet" | "smart_wallet" | "farcaster" | "telegram" | "apple_oauth" | "discord_oauth" | "github_oauth" | "google_oauth" | "instagram_oauth" | "linkedin_oauth" | "spotify_oauth" | "tiktok_oauth" | "twitter_oauth" | "twitch_oauth" | "line_oauth" | "custom_auth" | "passkey" | "cross_app" | "guest" | string;
|
|
14
14
|
/**
|
|
15
15
|
* A linked account entry from the Privy user object.
|
|
16
16
|
* Each linked account has a `type` discriminator and type-specific fields.
|
|
17
17
|
*/
|
|
18
18
|
export interface PrivyLinkedAccount {
|
|
19
19
|
type: PrivyAccountType;
|
|
20
|
-
address?: string;
|
|
21
|
-
number?: string;
|
|
22
|
-
username?: string;
|
|
23
|
-
name?: string;
|
|
24
|
-
displayName?: string;
|
|
25
|
-
subject?: string;
|
|
26
|
-
email?: string;
|
|
27
|
-
chainType?: string;
|
|
28
|
-
walletClient?: string;
|
|
29
|
-
walletClientType?: string;
|
|
30
|
-
connectorType?: string;
|
|
20
|
+
address?: string | null;
|
|
21
|
+
number?: string | null;
|
|
22
|
+
username?: string | null;
|
|
23
|
+
name?: string | null;
|
|
24
|
+
displayName?: string | null;
|
|
25
|
+
subject?: string | null;
|
|
26
|
+
email?: string | null;
|
|
27
|
+
chainType?: string | null;
|
|
28
|
+
walletClient?: string | null;
|
|
29
|
+
walletClientType?: string | null;
|
|
30
|
+
connectorType?: string | null;
|
|
31
31
|
delegated?: boolean;
|
|
32
|
-
fid?: number;
|
|
33
|
-
ownerAddress?: string;
|
|
34
|
-
bio?: string;
|
|
35
|
-
pfp?: string;
|
|
36
|
-
url?: string;
|
|
37
|
-
signerPublicKey?: string;
|
|
38
|
-
telegramUserId?: string;
|
|
39
|
-
firstName?: string;
|
|
40
|
-
lastName?: string;
|
|
41
|
-
firstVerifiedAt?:
|
|
42
|
-
latestVerifiedAt?:
|
|
43
|
-
verifiedAt?: number | null;
|
|
32
|
+
fid?: number | null;
|
|
33
|
+
ownerAddress?: string | null;
|
|
34
|
+
bio?: string | null;
|
|
35
|
+
pfp?: string | null;
|
|
36
|
+
url?: string | null;
|
|
37
|
+
signerPublicKey?: string | null;
|
|
38
|
+
telegramUserId?: string | null;
|
|
39
|
+
firstName?: string | null;
|
|
40
|
+
lastName?: string | null;
|
|
41
|
+
firstVerifiedAt?: Date | null;
|
|
42
|
+
latestVerifiedAt?: Date | null;
|
|
44
43
|
}
|
|
45
44
|
/**
|
|
46
45
|
* Privy user object as returned by the Privy React SDK.
|
|
@@ -53,7 +52,7 @@ export interface PrivyUser {
|
|
|
53
52
|
/** Privy user ID in DID format (e.g., "did:privy:cm3np...") */
|
|
54
53
|
id: string;
|
|
55
54
|
/** Account creation timestamp */
|
|
56
|
-
createdAt?:
|
|
55
|
+
createdAt?: Date;
|
|
57
56
|
/** All linked accounts */
|
|
58
57
|
linkedAccounts?: PrivyLinkedAccount[];
|
|
59
58
|
/** Optional custom metadata */
|
|
@@ -72,67 +71,69 @@ export interface PrivyUser {
|
|
|
72
71
|
connectorType?: string;
|
|
73
72
|
};
|
|
74
73
|
google?: {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
subject: string;
|
|
75
|
+
email: string;
|
|
76
|
+
name: string | null;
|
|
78
77
|
};
|
|
79
78
|
discord?: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
email
|
|
79
|
+
subject: string;
|
|
80
|
+
username: string | null;
|
|
81
|
+
email: string | null;
|
|
83
82
|
};
|
|
84
83
|
twitter?: {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
profilePictureUrl
|
|
84
|
+
subject: string;
|
|
85
|
+
username: string | null;
|
|
86
|
+
name: string | null;
|
|
87
|
+
profilePictureUrl: string | null;
|
|
89
88
|
};
|
|
90
89
|
farcaster?: {
|
|
91
|
-
fid
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
bio
|
|
96
|
-
pfp
|
|
90
|
+
fid: number | null;
|
|
91
|
+
ownerAddress: string;
|
|
92
|
+
username: string | null;
|
|
93
|
+
displayName: string | null;
|
|
94
|
+
bio: string | null;
|
|
95
|
+
pfp: string | null;
|
|
97
96
|
};
|
|
98
97
|
github?: {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
subject: string;
|
|
99
|
+
username: string | null;
|
|
100
|
+
name: string | null;
|
|
102
101
|
};
|
|
103
102
|
linkedin?: {
|
|
104
|
-
|
|
105
|
-
name
|
|
106
|
-
|
|
103
|
+
subject: string;
|
|
104
|
+
name: string | null;
|
|
105
|
+
email: string | null;
|
|
106
|
+
vanityName: string | null;
|
|
107
107
|
};
|
|
108
108
|
apple?: {
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
subject: string;
|
|
110
|
+
email: string;
|
|
111
111
|
};
|
|
112
112
|
instagram?: {
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
subject: string;
|
|
114
|
+
username: string | null;
|
|
115
115
|
};
|
|
116
116
|
spotify?: {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
subject: string;
|
|
118
|
+
email: string | null;
|
|
119
|
+
name: string | null;
|
|
120
120
|
};
|
|
121
121
|
tiktok?: {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
subject: string;
|
|
123
|
+
username: string | null;
|
|
124
|
+
name: string | null;
|
|
125
125
|
};
|
|
126
126
|
line?: {
|
|
127
|
-
|
|
128
|
-
name
|
|
129
|
-
|
|
127
|
+
subject: string;
|
|
128
|
+
name: string | null;
|
|
129
|
+
email: string | null;
|
|
130
130
|
};
|
|
131
131
|
telegram?: {
|
|
132
|
-
telegramUserId
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
telegramUserId: string;
|
|
133
|
+
firstName: string | null;
|
|
134
|
+
lastName: string | null;
|
|
135
|
+
username: string | null;
|
|
136
|
+
photoUrl: string | null;
|
|
136
137
|
};
|
|
137
138
|
/** MFA methods */
|
|
138
139
|
mfaMethods?: Array<string>;
|
|
@@ -28,52 +28,52 @@ exports.parsePrivyProperties = parsePrivyProperties;
|
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
function parsePrivyProperties(user) {
|
|
31
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
31
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
32
32
|
var accounts = user.linkedAccounts || [];
|
|
33
33
|
// Extract profile properties
|
|
34
34
|
var properties = {
|
|
35
35
|
privyDid: user.id,
|
|
36
|
-
privyCreatedAt: user.createdAt,
|
|
36
|
+
privyCreatedAt: (_a = user.createdAt) === null || _a === void 0 ? void 0 : _a.getTime(),
|
|
37
37
|
};
|
|
38
38
|
// Email
|
|
39
|
-
if ((
|
|
39
|
+
if ((_b = user.email) === null || _b === void 0 ? void 0 : _b.address) {
|
|
40
40
|
properties.email = user.email.address;
|
|
41
41
|
}
|
|
42
42
|
// Social accounts - extract usernames/identifiers
|
|
43
|
-
if ((
|
|
43
|
+
if ((_c = user.apple) === null || _c === void 0 ? void 0 : _c.email) {
|
|
44
44
|
properties.apple = user.apple.email;
|
|
45
45
|
}
|
|
46
|
-
if ((
|
|
46
|
+
if ((_d = user.discord) === null || _d === void 0 ? void 0 : _d.username) {
|
|
47
47
|
properties.discord = user.discord.username;
|
|
48
48
|
}
|
|
49
|
-
if ((
|
|
49
|
+
if ((_e = user.farcaster) === null || _e === void 0 ? void 0 : _e.username) {
|
|
50
50
|
properties.farcaster = user.farcaster.username;
|
|
51
51
|
}
|
|
52
|
-
if ((
|
|
52
|
+
if ((_f = user.github) === null || _f === void 0 ? void 0 : _f.username) {
|
|
53
53
|
properties.github = user.github.username;
|
|
54
54
|
}
|
|
55
|
-
if ((
|
|
55
|
+
if ((_g = user.google) === null || _g === void 0 ? void 0 : _g.email) {
|
|
56
56
|
properties.google = user.google.email;
|
|
57
57
|
}
|
|
58
|
-
if ((
|
|
58
|
+
if ((_h = user.instagram) === null || _h === void 0 ? void 0 : _h.username) {
|
|
59
59
|
properties.instagram = user.instagram.username;
|
|
60
60
|
}
|
|
61
|
-
if ((
|
|
61
|
+
if ((_j = user.line) === null || _j === void 0 ? void 0 : _j.email) {
|
|
62
62
|
properties.line = user.line.email;
|
|
63
63
|
}
|
|
64
|
-
if ((
|
|
64
|
+
if ((_k = user.linkedin) === null || _k === void 0 ? void 0 : _k.email) {
|
|
65
65
|
properties.linkedin = user.linkedin.email;
|
|
66
66
|
}
|
|
67
|
-
if ((
|
|
67
|
+
if ((_l = user.spotify) === null || _l === void 0 ? void 0 : _l.email) {
|
|
68
68
|
properties.spotify = user.spotify.email;
|
|
69
69
|
}
|
|
70
|
-
if ((
|
|
70
|
+
if ((_m = user.telegram) === null || _m === void 0 ? void 0 : _m.username) {
|
|
71
71
|
properties.telegram = user.telegram.username;
|
|
72
72
|
}
|
|
73
|
-
if ((
|
|
73
|
+
if ((_o = user.tiktok) === null || _o === void 0 ? void 0 : _o.username) {
|
|
74
74
|
properties.tiktok = user.tiktok.username;
|
|
75
75
|
}
|
|
76
|
-
if ((
|
|
76
|
+
if ((_p = user.twitter) === null || _p === void 0 ? void 0 : _p.username) {
|
|
77
77
|
properties.twitter = user.twitter.username;
|
|
78
78
|
}
|
|
79
79
|
// Fallback to linkedAccounts if convenience accessors are not populated
|
|
@@ -123,7 +123,7 @@ function parsePrivyProperties(user) {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
if (!properties.line) {
|
|
126
|
-
var lineAccount = accounts.find(function (a) { return a.type === "
|
|
126
|
+
var lineAccount = accounts.find(function (a) { return a.type === "line_oauth"; });
|
|
127
127
|
if (lineAccount === null || lineAccount === void 0 ? void 0 : lineAccount.email) {
|
|
128
128
|
properties.line = lineAccount.email;
|
|
129
129
|
}
|
|
@@ -176,13 +176,16 @@ function parsePrivyProperties(user) {
|
|
|
176
176
|
}
|
|
177
177
|
// Extract wallet addresses
|
|
178
178
|
var wallets = accounts
|
|
179
|
-
.filter(function (a) { return a.type === "wallet" && a.address; })
|
|
180
|
-
.map(function (a) {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
179
|
+
.filter(function (a) { return (a.type === "wallet" || a.type === "smart_wallet") && a.address; })
|
|
180
|
+
.map(function (a) {
|
|
181
|
+
var _a, _b;
|
|
182
|
+
return ({
|
|
183
|
+
address: a.address,
|
|
184
|
+
walletClient: (_a = (a.walletClientType || a.walletClient)) !== null && _a !== void 0 ? _a : undefined,
|
|
185
|
+
chainType: (_b = a.chainType) !== null && _b !== void 0 ? _b : undefined,
|
|
186
|
+
isEmbedded: a.walletClientType === "privy" || a.walletClient === "privy",
|
|
187
|
+
});
|
|
188
|
+
});
|
|
186
189
|
return { properties: properties, wallets: wallets };
|
|
187
190
|
}
|
|
188
191
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "1.28.
|
|
1
|
+
export declare const version = "1.28.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/cjs/src/version.js
CHANGED
|
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.version = void 0;
|
|
4
4
|
// This file is auto-generated by scripts/update-version.js during npm version
|
|
5
5
|
// Do not edit manually - it will be overwritten
|
|
6
|
-
exports.version = '1.28.
|
|
6
|
+
exports.version = '1.28.1';
|
|
7
7
|
//# sourceMappingURL=version.js.map
|
|
@@ -10,37 +10,36 @@
|
|
|
10
10
|
/**
|
|
11
11
|
* Valid Privy linked account type strings.
|
|
12
12
|
*/
|
|
13
|
-
export type PrivyAccountType = "email" | "phone" | "wallet" | "farcaster" | "telegram" | "apple_oauth" | "discord_oauth" | "github_oauth" | "google_oauth" | "instagram_oauth" | "linkedin_oauth" | "spotify_oauth" | "tiktok_oauth" | "twitter_oauth" | "
|
|
13
|
+
export type PrivyAccountType = "email" | "phone" | "wallet" | "smart_wallet" | "farcaster" | "telegram" | "apple_oauth" | "discord_oauth" | "github_oauth" | "google_oauth" | "instagram_oauth" | "linkedin_oauth" | "spotify_oauth" | "tiktok_oauth" | "twitter_oauth" | "twitch_oauth" | "line_oauth" | "custom_auth" | "passkey" | "cross_app" | "guest" | string;
|
|
14
14
|
/**
|
|
15
15
|
* A linked account entry from the Privy user object.
|
|
16
16
|
* Each linked account has a `type` discriminator and type-specific fields.
|
|
17
17
|
*/
|
|
18
18
|
export interface PrivyLinkedAccount {
|
|
19
19
|
type: PrivyAccountType;
|
|
20
|
-
address?: string;
|
|
21
|
-
number?: string;
|
|
22
|
-
username?: string;
|
|
23
|
-
name?: string;
|
|
24
|
-
displayName?: string;
|
|
25
|
-
subject?: string;
|
|
26
|
-
email?: string;
|
|
27
|
-
chainType?: string;
|
|
28
|
-
walletClient?: string;
|
|
29
|
-
walletClientType?: string;
|
|
30
|
-
connectorType?: string;
|
|
20
|
+
address?: string | null;
|
|
21
|
+
number?: string | null;
|
|
22
|
+
username?: string | null;
|
|
23
|
+
name?: string | null;
|
|
24
|
+
displayName?: string | null;
|
|
25
|
+
subject?: string | null;
|
|
26
|
+
email?: string | null;
|
|
27
|
+
chainType?: string | null;
|
|
28
|
+
walletClient?: string | null;
|
|
29
|
+
walletClientType?: string | null;
|
|
30
|
+
connectorType?: string | null;
|
|
31
31
|
delegated?: boolean;
|
|
32
|
-
fid?: number;
|
|
33
|
-
ownerAddress?: string;
|
|
34
|
-
bio?: string;
|
|
35
|
-
pfp?: string;
|
|
36
|
-
url?: string;
|
|
37
|
-
signerPublicKey?: string;
|
|
38
|
-
telegramUserId?: string;
|
|
39
|
-
firstName?: string;
|
|
40
|
-
lastName?: string;
|
|
41
|
-
firstVerifiedAt?:
|
|
42
|
-
latestVerifiedAt?:
|
|
43
|
-
verifiedAt?: number | null;
|
|
32
|
+
fid?: number | null;
|
|
33
|
+
ownerAddress?: string | null;
|
|
34
|
+
bio?: string | null;
|
|
35
|
+
pfp?: string | null;
|
|
36
|
+
url?: string | null;
|
|
37
|
+
signerPublicKey?: string | null;
|
|
38
|
+
telegramUserId?: string | null;
|
|
39
|
+
firstName?: string | null;
|
|
40
|
+
lastName?: string | null;
|
|
41
|
+
firstVerifiedAt?: Date | null;
|
|
42
|
+
latestVerifiedAt?: Date | null;
|
|
44
43
|
}
|
|
45
44
|
/**
|
|
46
45
|
* Privy user object as returned by the Privy React SDK.
|
|
@@ -53,7 +52,7 @@ export interface PrivyUser {
|
|
|
53
52
|
/** Privy user ID in DID format (e.g., "did:privy:cm3np...") */
|
|
54
53
|
id: string;
|
|
55
54
|
/** Account creation timestamp */
|
|
56
|
-
createdAt?:
|
|
55
|
+
createdAt?: Date;
|
|
57
56
|
/** All linked accounts */
|
|
58
57
|
linkedAccounts?: PrivyLinkedAccount[];
|
|
59
58
|
/** Optional custom metadata */
|
|
@@ -72,67 +71,69 @@ export interface PrivyUser {
|
|
|
72
71
|
connectorType?: string;
|
|
73
72
|
};
|
|
74
73
|
google?: {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
subject: string;
|
|
75
|
+
email: string;
|
|
76
|
+
name: string | null;
|
|
78
77
|
};
|
|
79
78
|
discord?: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
email
|
|
79
|
+
subject: string;
|
|
80
|
+
username: string | null;
|
|
81
|
+
email: string | null;
|
|
83
82
|
};
|
|
84
83
|
twitter?: {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
profilePictureUrl
|
|
84
|
+
subject: string;
|
|
85
|
+
username: string | null;
|
|
86
|
+
name: string | null;
|
|
87
|
+
profilePictureUrl: string | null;
|
|
89
88
|
};
|
|
90
89
|
farcaster?: {
|
|
91
|
-
fid
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
bio
|
|
96
|
-
pfp
|
|
90
|
+
fid: number | null;
|
|
91
|
+
ownerAddress: string;
|
|
92
|
+
username: string | null;
|
|
93
|
+
displayName: string | null;
|
|
94
|
+
bio: string | null;
|
|
95
|
+
pfp: string | null;
|
|
97
96
|
};
|
|
98
97
|
github?: {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
subject: string;
|
|
99
|
+
username: string | null;
|
|
100
|
+
name: string | null;
|
|
102
101
|
};
|
|
103
102
|
linkedin?: {
|
|
104
|
-
|
|
105
|
-
name
|
|
106
|
-
|
|
103
|
+
subject: string;
|
|
104
|
+
name: string | null;
|
|
105
|
+
email: string | null;
|
|
106
|
+
vanityName: string | null;
|
|
107
107
|
};
|
|
108
108
|
apple?: {
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
subject: string;
|
|
110
|
+
email: string;
|
|
111
111
|
};
|
|
112
112
|
instagram?: {
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
subject: string;
|
|
114
|
+
username: string | null;
|
|
115
115
|
};
|
|
116
116
|
spotify?: {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
subject: string;
|
|
118
|
+
email: string | null;
|
|
119
|
+
name: string | null;
|
|
120
120
|
};
|
|
121
121
|
tiktok?: {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
subject: string;
|
|
123
|
+
username: string | null;
|
|
124
|
+
name: string | null;
|
|
125
125
|
};
|
|
126
126
|
line?: {
|
|
127
|
-
|
|
128
|
-
name
|
|
129
|
-
|
|
127
|
+
subject: string;
|
|
128
|
+
name: string | null;
|
|
129
|
+
email: string | null;
|
|
130
130
|
};
|
|
131
131
|
telegram?: {
|
|
132
|
-
telegramUserId
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
telegramUserId: string;
|
|
133
|
+
firstName: string | null;
|
|
134
|
+
lastName: string | null;
|
|
135
|
+
username: string | null;
|
|
136
|
+
photoUrl: string | null;
|
|
136
137
|
};
|
|
137
138
|
/** MFA methods */
|
|
138
139
|
mfaMethods?: Array<string>;
|
|
@@ -25,52 +25,52 @@
|
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
export function parsePrivyProperties(user) {
|
|
28
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
28
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
29
29
|
var accounts = user.linkedAccounts || [];
|
|
30
30
|
// Extract profile properties
|
|
31
31
|
var properties = {
|
|
32
32
|
privyDid: user.id,
|
|
33
|
-
privyCreatedAt: user.createdAt,
|
|
33
|
+
privyCreatedAt: (_a = user.createdAt) === null || _a === void 0 ? void 0 : _a.getTime(),
|
|
34
34
|
};
|
|
35
35
|
// Email
|
|
36
|
-
if ((
|
|
36
|
+
if ((_b = user.email) === null || _b === void 0 ? void 0 : _b.address) {
|
|
37
37
|
properties.email = user.email.address;
|
|
38
38
|
}
|
|
39
39
|
// Social accounts - extract usernames/identifiers
|
|
40
|
-
if ((
|
|
40
|
+
if ((_c = user.apple) === null || _c === void 0 ? void 0 : _c.email) {
|
|
41
41
|
properties.apple = user.apple.email;
|
|
42
42
|
}
|
|
43
|
-
if ((
|
|
43
|
+
if ((_d = user.discord) === null || _d === void 0 ? void 0 : _d.username) {
|
|
44
44
|
properties.discord = user.discord.username;
|
|
45
45
|
}
|
|
46
|
-
if ((
|
|
46
|
+
if ((_e = user.farcaster) === null || _e === void 0 ? void 0 : _e.username) {
|
|
47
47
|
properties.farcaster = user.farcaster.username;
|
|
48
48
|
}
|
|
49
|
-
if ((
|
|
49
|
+
if ((_f = user.github) === null || _f === void 0 ? void 0 : _f.username) {
|
|
50
50
|
properties.github = user.github.username;
|
|
51
51
|
}
|
|
52
|
-
if ((
|
|
52
|
+
if ((_g = user.google) === null || _g === void 0 ? void 0 : _g.email) {
|
|
53
53
|
properties.google = user.google.email;
|
|
54
54
|
}
|
|
55
|
-
if ((
|
|
55
|
+
if ((_h = user.instagram) === null || _h === void 0 ? void 0 : _h.username) {
|
|
56
56
|
properties.instagram = user.instagram.username;
|
|
57
57
|
}
|
|
58
|
-
if ((
|
|
58
|
+
if ((_j = user.line) === null || _j === void 0 ? void 0 : _j.email) {
|
|
59
59
|
properties.line = user.line.email;
|
|
60
60
|
}
|
|
61
|
-
if ((
|
|
61
|
+
if ((_k = user.linkedin) === null || _k === void 0 ? void 0 : _k.email) {
|
|
62
62
|
properties.linkedin = user.linkedin.email;
|
|
63
63
|
}
|
|
64
|
-
if ((
|
|
64
|
+
if ((_l = user.spotify) === null || _l === void 0 ? void 0 : _l.email) {
|
|
65
65
|
properties.spotify = user.spotify.email;
|
|
66
66
|
}
|
|
67
|
-
if ((
|
|
67
|
+
if ((_m = user.telegram) === null || _m === void 0 ? void 0 : _m.username) {
|
|
68
68
|
properties.telegram = user.telegram.username;
|
|
69
69
|
}
|
|
70
|
-
if ((
|
|
70
|
+
if ((_o = user.tiktok) === null || _o === void 0 ? void 0 : _o.username) {
|
|
71
71
|
properties.tiktok = user.tiktok.username;
|
|
72
72
|
}
|
|
73
|
-
if ((
|
|
73
|
+
if ((_p = user.twitter) === null || _p === void 0 ? void 0 : _p.username) {
|
|
74
74
|
properties.twitter = user.twitter.username;
|
|
75
75
|
}
|
|
76
76
|
// Fallback to linkedAccounts if convenience accessors are not populated
|
|
@@ -120,7 +120,7 @@ export function parsePrivyProperties(user) {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
if (!properties.line) {
|
|
123
|
-
var lineAccount = accounts.find(function (a) { return a.type === "
|
|
123
|
+
var lineAccount = accounts.find(function (a) { return a.type === "line_oauth"; });
|
|
124
124
|
if (lineAccount === null || lineAccount === void 0 ? void 0 : lineAccount.email) {
|
|
125
125
|
properties.line = lineAccount.email;
|
|
126
126
|
}
|
|
@@ -173,13 +173,16 @@ export function parsePrivyProperties(user) {
|
|
|
173
173
|
}
|
|
174
174
|
// Extract wallet addresses
|
|
175
175
|
var wallets = accounts
|
|
176
|
-
.filter(function (a) { return a.type === "wallet" && a.address; })
|
|
177
|
-
.map(function (a) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
176
|
+
.filter(function (a) { return (a.type === "wallet" || a.type === "smart_wallet") && a.address; })
|
|
177
|
+
.map(function (a) {
|
|
178
|
+
var _a, _b;
|
|
179
|
+
return ({
|
|
180
|
+
address: a.address,
|
|
181
|
+
walletClient: (_a = (a.walletClientType || a.walletClient)) !== null && _a !== void 0 ? _a : undefined,
|
|
182
|
+
chainType: (_b = a.chainType) !== null && _b !== void 0 ? _b : undefined,
|
|
183
|
+
isEmbedded: a.walletClientType === "privy" || a.walletClient === "privy",
|
|
184
|
+
});
|
|
185
|
+
});
|
|
183
186
|
return { properties: properties, wallets: wallets };
|
|
184
187
|
}
|
|
185
188
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "1.28.
|
|
1
|
+
export declare const version = "1.28.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/esm/src/version.js
CHANGED