@getpara/core-sdk 2.0.0-alpha.25 → 2.0.0-alpha.26
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/ParaCore.js
CHANGED
|
@@ -1056,6 +1056,7 @@ const _ParaCore = class _ParaCore {
|
|
|
1056
1056
|
/**
|
|
1057
1057
|
* Fetches the most recent OAuth account metadata for the signed-in user.
|
|
1058
1058
|
* If applicable, this will include the user's most recent metadata from their Google, Apple, Facebook, X, Discord, Farcaster, or Telegram account, the last time they signed in to your app.
|
|
1059
|
+
* @deprecated use `para.getLinkedAccounts({ withMetadata: true })` instead.
|
|
1059
1060
|
* @returns {Promise<AccountMetadata>} the user's account metadata.
|
|
1060
1061
|
*/
|
|
1061
1062
|
getAccountMetadata() {
|
|
@@ -2918,9 +2919,11 @@ const _ParaCore = class _ParaCore {
|
|
|
2918
2919
|
});
|
|
2919
2920
|
}
|
|
2920
2921
|
getLinkedAccounts() {
|
|
2921
|
-
return __async(this,
|
|
2922
|
+
return __async(this, arguments, function* ({
|
|
2923
|
+
withMetadata = false
|
|
2924
|
+
} = {}) {
|
|
2922
2925
|
const userId = this.assertUserId();
|
|
2923
|
-
const { accounts } = yield this.ctx.client.getLinkedAccounts({ userId });
|
|
2926
|
+
const { accounts } = yield this.ctx.client.getLinkedAccounts({ userId, withMetadata });
|
|
2924
2927
|
return __spreadValues({
|
|
2925
2928
|
userId
|
|
2926
2929
|
}, accounts);
|
package/dist/cjs/constants.js
CHANGED
|
@@ -40,7 +40,7 @@ __export(constants_exports, {
|
|
|
40
40
|
SHORT_POLLING_INTERVAL_MS: () => SHORT_POLLING_INTERVAL_MS
|
|
41
41
|
});
|
|
42
42
|
module.exports = __toCommonJS(constants_exports);
|
|
43
|
-
const PARA_CORE_VERSION = "2.0.0-alpha.
|
|
43
|
+
const PARA_CORE_VERSION = "2.0.0-alpha.25";
|
|
44
44
|
const PREFIX = "@CAPSULE/";
|
|
45
45
|
const LOCAL_STORAGE_AUTH_INFO = `${PREFIX}authInfo`;
|
|
46
46
|
const LOCAL_STORAGE_EMAIL = `${PREFIX}e-mail`;
|
package/dist/esm/ParaCore.js
CHANGED
|
@@ -1022,6 +1022,7 @@ const _ParaCore = class _ParaCore {
|
|
|
1022
1022
|
/**
|
|
1023
1023
|
* Fetches the most recent OAuth account metadata for the signed-in user.
|
|
1024
1024
|
* If applicable, this will include the user's most recent metadata from their Google, Apple, Facebook, X, Discord, Farcaster, or Telegram account, the last time they signed in to your app.
|
|
1025
|
+
* @deprecated use `para.getLinkedAccounts({ withMetadata: true })` instead.
|
|
1025
1026
|
* @returns {Promise<AccountMetadata>} the user's account metadata.
|
|
1026
1027
|
*/
|
|
1027
1028
|
getAccountMetadata() {
|
|
@@ -2884,9 +2885,11 @@ const _ParaCore = class _ParaCore {
|
|
|
2884
2885
|
});
|
|
2885
2886
|
}
|
|
2886
2887
|
getLinkedAccounts() {
|
|
2887
|
-
return __async(this,
|
|
2888
|
+
return __async(this, arguments, function* ({
|
|
2889
|
+
withMetadata = false
|
|
2890
|
+
} = {}) {
|
|
2888
2891
|
const userId = this.assertUserId();
|
|
2889
|
-
const { accounts } = yield this.ctx.client.getLinkedAccounts({ userId });
|
|
2892
|
+
const { accounts } = yield this.ctx.client.getLinkedAccounts({ userId, withMetadata });
|
|
2890
2893
|
return __spreadValues({
|
|
2891
2894
|
userId
|
|
2892
2895
|
}, accounts);
|
package/dist/esm/constants.js
CHANGED
package/dist/types/ParaCore.d.ts
CHANGED
|
@@ -287,6 +287,7 @@ export declare abstract class ParaCore implements CoreInterface {
|
|
|
287
287
|
/**
|
|
288
288
|
* Fetches the most recent OAuth account metadata for the signed-in user.
|
|
289
289
|
* If applicable, this will include the user's most recent metadata from their Google, Apple, Facebook, X, Discord, Farcaster, or Telegram account, the last time they signed in to your app.
|
|
290
|
+
* @deprecated use `para.getLinkedAccounts({ withMetadata: true })` instead.
|
|
290
291
|
* @returns {Promise<AccountMetadata>} the user's account metadata.
|
|
291
292
|
*/
|
|
292
293
|
getAccountMetadata(): Promise<AccountMetadata>;
|
|
@@ -672,7 +673,7 @@ export declare abstract class ParaCore implements CoreInterface {
|
|
|
672
673
|
protected getLoginUrl({ authMethod, shorten, portalTheme, sessionId, }: LoginUrlParams): Promise<string>;
|
|
673
674
|
signUpOrLogIn({ auth, ...urlOptions }: CoreMethodParams<'signUpOrLogIn'>): CoreMethodResponse<'signUpOrLogIn'>;
|
|
674
675
|
verifyNewAccount({ verificationCode, ...urlOptions }: CoreMethodParams<'verifyNewAccount'>): CoreMethodResponse<'verifyNewAccount'>;
|
|
675
|
-
getLinkedAccounts(): CoreMethodResponse<'getLinkedAccounts'>;
|
|
676
|
+
getLinkedAccounts({ withMetadata, }?: CoreMethodParams<'getLinkedAccounts'>): CoreMethodResponse<'getLinkedAccounts'>;
|
|
676
677
|
protected linkAccount(opts: InternalMethodParams<'linkAccount'>): InternalMethodResponse<'linkAccount'>;
|
|
677
678
|
protected unlinkAccount({ linkedAccountId, }: InternalMethodParams<'unlinkAccount'>): InternalMethodResponse<'unlinkAccount'>;
|
|
678
679
|
protected verifyLink({ accountLinkInProgress, ...opts }?: {
|
|
@@ -475,8 +475,12 @@ export type CoreMethods = Record<CoreMethodName, {
|
|
|
475
475
|
response: IssueJwtResponse;
|
|
476
476
|
};
|
|
477
477
|
getLinkedAccounts: {
|
|
478
|
-
params:
|
|
479
|
-
|
|
478
|
+
params: {
|
|
479
|
+
withMetadata?: boolean;
|
|
480
|
+
};
|
|
481
|
+
response: LinkedAccounts & {
|
|
482
|
+
userId: string;
|
|
483
|
+
};
|
|
480
484
|
};
|
|
481
485
|
};
|
|
482
486
|
export type InternalMethods = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/core-sdk",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.26",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@celo/utils": "^8.0.2",
|
|
11
11
|
"@cosmjs/encoding": "^0.32.4",
|
|
12
12
|
"@ethereumjs/util": "^9.1.0",
|
|
13
|
-
"@getpara/user-management-client": "2.0.0-alpha.
|
|
13
|
+
"@getpara/user-management-client": "2.0.0-alpha.26",
|
|
14
14
|
"@noble/hashes": "^1.5.0",
|
|
15
15
|
"base64url": "^3.0.1",
|
|
16
16
|
"libphonenumber-js": "1.11.2",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"require": "./dist/cjs/index.js"
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "c97be88dd7414041f25d6f4b9758ea26dcfb2694"
|
|
45
45
|
}
|