@dynamic-labs-sdk/client 1.9.0 → 1.10.0
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/{InvalidParamError-DIPFT3sS.esm.js → InvalidParamError-BmFmxeXx.esm.js} +2 -2
- package/dist/{InvalidParamError-DIPFT3sS.esm.js.map → InvalidParamError-BmFmxeXx.esm.js.map} +1 -1
- package/dist/{InvalidParamError-YG7yXCq5.native.esm.js → InvalidParamError-BxBgwLQB.native.esm.js} +2 -2
- package/dist/{InvalidParamError-YG7yXCq5.native.esm.js.map → InvalidParamError-BxBgwLQB.native.esm.js.map} +1 -1
- package/dist/{InvalidParamError-C7LLi2cZ.cjs → InvalidParamError-CGZRSAOn.cjs} +3 -3
- package/dist/{InvalidParamError-C7LLi2cZ.cjs.map → InvalidParamError-CGZRSAOn.cjs.map} +1 -1
- package/dist/{NotWaasWalletAccountError-Cd2o0wr0.native.esm.js → NotWaasWalletAccountError-CkH85cm5.native.esm.js} +2 -2
- package/dist/{NotWaasWalletAccountError-Cd2o0wr0.native.esm.js.map → NotWaasWalletAccountError-CkH85cm5.native.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-BWrDQFe8.esm.js → NotWaasWalletAccountError-DO313zza.esm.js} +2 -2
- package/dist/{NotWaasWalletAccountError-BWrDQFe8.esm.js.map → NotWaasWalletAccountError-DO313zza.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-C8ex1YA_.cjs → NotWaasWalletAccountError-cIj987D7.cjs} +2 -2
- package/dist/{NotWaasWalletAccountError-C8ex1YA_.cjs.map → NotWaasWalletAccountError-cIj987D7.cjs.map} +1 -1
- package/dist/core.cjs +10 -10
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +5 -5
- package/dist/core.native.esm.js +7 -7
- package/dist/core.native.esm.js.map +1 -1
- package/dist/errors/FlowSessionTokenMissingError.d.ts +7 -0
- package/dist/errors/FlowSessionTokenMissingError.d.ts.map +1 -0
- package/dist/exports/index.d.ts +28 -18
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-CBGWQS_K.cjs → getNetworkProviderFromNetworkId-2wYAIZ6w.cjs} +20 -20
- package/dist/{getNetworkProviderFromNetworkId-CBGWQS_K.cjs.map → getNetworkProviderFromNetworkId-2wYAIZ6w.cjs.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-D-wj5mPl.esm.js → getNetworkProviderFromNetworkId-CsAg0JU7.esm.js} +18 -18
- package/dist/{getNetworkProviderFromNetworkId-D-wj5mPl.esm.js.map → getNetworkProviderFromNetworkId-CsAg0JU7.esm.js.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-C46TeXs8.native.esm.js → getNetworkProviderFromNetworkId-CxGbMwFL.native.esm.js} +8 -8
- package/dist/getNetworkProviderFromNetworkId-CxGbMwFL.native.esm.js.map +1 -0
- package/dist/{getSignedSessionId-DdKTM3Rh.native.esm.js → getSignedSessionId-BZHJglv0.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-DdKTM3Rh.native.esm.js.map → getSignedSessionId-BZHJglv0.native.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-CCHKjoeP.cjs → getSignedSessionId-E3o2_FL7.cjs} +3 -3
- package/dist/{getSignedSessionId-CCHKjoeP.cjs.map → getSignedSessionId-E3o2_FL7.cjs.map} +1 -1
- package/dist/{getSignedSessionId-Dy04984p.esm.js → getSignedSessionId-E9JM9zum.esm.js} +3 -3
- package/dist/{getSignedSessionId-Dy04984p.esm.js.map → getSignedSessionId-E9JM9zum.esm.js.map} +1 -1
- package/dist/{getWaasWalletProviderFromWalletAccount-5-EJK6a_.cjs → getWaasWalletProviderFromWalletAccount-BaxUhLEp.cjs} +3 -3
- package/dist/{getWaasWalletProviderFromWalletAccount-5-EJK6a_.cjs.map → getWaasWalletProviderFromWalletAccount-BaxUhLEp.cjs.map} +1 -1
- package/dist/{getWaasWalletProviderFromWalletAccount-AhhyxkKQ.esm.js → getWaasWalletProviderFromWalletAccount-CXv6xEJZ.esm.js} +3 -3
- package/dist/{getWaasWalletProviderFromWalletAccount-AhhyxkKQ.esm.js.map → getWaasWalletProviderFromWalletAccount-CXv6xEJZ.esm.js.map} +1 -1
- package/dist/{getWaasWalletProviderFromWalletAccount-EnCRdI3w.native.esm.js → getWaasWalletProviderFromWalletAccount-CeoFLRbo.native.esm.js} +3 -3
- package/dist/{getWaasWalletProviderFromWalletAccount-EnCRdI3w.native.esm.js.map → getWaasWalletProviderFromWalletAccount-CeoFLRbo.native.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-BFCM2wnx.esm.js → getWalletProviderByKey-AQmQQpmk.esm.js} +10 -10
- package/dist/getWalletProviderByKey-AQmQQpmk.esm.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-Dsca691m.native.esm.js → getWalletProviderByKey-C5w8qJ0f.native.esm.js} +10 -10
- package/dist/getWalletProviderByKey-C5w8qJ0f.native.esm.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-BtIVDer3.cjs → getWalletProviderByKey-DMNpwDEn.cjs} +10 -10
- package/dist/getWalletProviderByKey-DMNpwDEn.cjs.map +1 -0
- package/dist/index.cjs +2436 -2204
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +2405 -2178
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +2497 -2266
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-BrmFODJQ.esm.js → isMfaRequiredForAction-BNgq1huY.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-BrmFODJQ.esm.js.map → isMfaRequiredForAction-BNgq1huY.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-DAfjBLvz.native.esm.js → isMfaRequiredForAction-BmJKVaMQ.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-DAfjBLvz.native.esm.js.map → isMfaRequiredForAction-BmJKVaMQ.native.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-aX0vdwv-.cjs → isMfaRequiredForAction-C9Fw0v_g.cjs} +2 -2
- package/dist/{isMfaRequiredForAction-aX0vdwv-.cjs.map → isMfaRequiredForAction-C9Fw0v_g.cjs.map} +1 -1
- package/dist/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.d.ts +1 -1
- package/dist/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.types.d.ts +8 -0
- package/dist/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.types.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts +7 -1
- package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts.map +1 -1
- package/dist/modules/flow/attachFlowSource/attachFlowSource.d.ts +45 -0
- package/dist/modules/flow/attachFlowSource/attachFlowSource.d.ts.map +1 -0
- package/dist/modules/flow/attachFlowSource/index.d.ts +3 -0
- package/dist/modules/flow/attachFlowSource/index.d.ts.map +1 -0
- package/dist/modules/flow/events.d.ts +27 -0
- package/dist/modules/flow/events.d.ts.map +1 -0
- package/dist/modules/flow/flow.types.d.ts +8 -0
- package/dist/modules/flow/flow.types.d.ts.map +1 -0
- package/dist/modules/flow/getFlow/getFlow.d.ts +15 -0
- package/dist/modules/flow/getFlow/getFlow.d.ts.map +1 -0
- package/dist/modules/flow/getFlow/index.d.ts +3 -0
- package/dist/modules/flow/getFlow/index.d.ts.map +1 -0
- package/dist/modules/flow/getFlowQuote/getFlowQuote.d.ts +28 -0
- package/dist/modules/flow/getFlowQuote/getFlowQuote.d.ts.map +1 -0
- package/dist/modules/flow/getFlowQuote/index.d.ts +3 -0
- package/dist/modules/flow/getFlowQuote/index.d.ts.map +1 -0
- package/dist/modules/flow/prepareFlowSigning/index.d.ts +3 -0
- package/dist/modules/flow/prepareFlowSigning/index.d.ts.map +1 -0
- package/dist/modules/flow/prepareFlowSigning/prepareFlowSigning.d.ts +28 -0
- package/dist/modules/flow/prepareFlowSigning/prepareFlowSigning.d.ts.map +1 -0
- package/dist/modules/flow/utils/clearFlowSessionToken/clearFlowSessionToken.d.ts +22 -0
- package/dist/modules/flow/utils/clearFlowSessionToken/clearFlowSessionToken.d.ts.map +1 -0
- package/dist/modules/flow/utils/clearFlowSessionToken/index.d.ts +3 -0
- package/dist/modules/flow/utils/clearFlowSessionToken/index.d.ts.map +1 -0
- package/dist/modules/flow/utils/createFlowApiClient/createFlowApiClient.d.ts +14 -0
- package/dist/modules/flow/utils/createFlowApiClient/createFlowApiClient.d.ts.map +1 -0
- package/dist/modules/flow/utils/createFlowApiClient/index.d.ts +2 -0
- package/dist/modules/flow/utils/createFlowApiClient/index.d.ts.map +1 -0
- package/dist/modules/flow/utils/createFlowSessionTokenStorageKey/createFlowSessionTokenStorageKey.d.ts +3 -0
- package/dist/modules/flow/utils/createFlowSessionTokenStorageKey/createFlowSessionTokenStorageKey.d.ts.map +1 -0
- package/dist/modules/flow/utils/createFlowSessionTokenStorageKey/index.d.ts +2 -0
- package/dist/modules/flow/utils/createFlowSessionTokenStorageKey/index.d.ts.map +1 -0
- package/dist/modules/flow/utils/withFlowSessionTokenCleanupOn401/index.d.ts +3 -0
- package/dist/modules/flow/utils/withFlowSessionTokenCleanupOn401/index.d.ts.map +1 -0
- package/dist/modules/flow/utils/withFlowSessionTokenCleanupOn401/withFlowSessionTokenCleanupOn401.d.ts +16 -0
- package/dist/modules/flow/utils/withFlowSessionTokenCleanupOn401/withFlowSessionTokenCleanupOn401.d.ts.map +1 -0
- package/dist/{refreshAuth-B2kFf0pl.native.esm.js → refreshAuth-CVUpYNs6.native.esm.js} +3 -3
- package/dist/{refreshAuth-B2kFf0pl.native.esm.js.map → refreshAuth-CVUpYNs6.native.esm.js.map} +1 -1
- package/dist/{refreshAuth-B8xd2JUm.esm.js → refreshAuth-D8dU3BLP.esm.js} +3 -3
- package/dist/{refreshAuth-B8xd2JUm.esm.js.map → refreshAuth-D8dU3BLP.esm.js.map} +1 -1
- package/dist/{refreshAuth-BMtIp1do.cjs → refreshAuth-DfcR3CWf.cjs} +4 -4
- package/dist/{refreshAuth-BMtIp1do.cjs.map → refreshAuth-DfcR3CWf.cjs.map} +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/waas.cjs +9 -9
- package/dist/waas.cjs.map +1 -1
- package/dist/waas.esm.js +4 -4
- package/dist/waas.native.esm.js +4 -4
- package/dist/waasCore.cjs +4 -4
- package/dist/waasCore.esm.js +4 -4
- package/dist/waasCore.native.esm.js +4 -4
- package/package.json +3 -3
- package/dist/getNetworkProviderFromNetworkId-C46TeXs8.native.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-BFCM2wnx.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-BtIVDer3.cjs.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-Dsca691m.native.esm.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/flow/utils/clearFlowSessionToken/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SDKApi } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
import type { DynamicClient } from '../../../../client/types';
|
|
3
|
+
type CreateFlowApiClientParams = {
|
|
4
|
+
flowId: string;
|
|
5
|
+
};
|
|
6
|
+
type FlowApiClientResult = {
|
|
7
|
+
apiClient: SDKApi;
|
|
8
|
+
environmentId: string;
|
|
9
|
+
sessionToken: string;
|
|
10
|
+
};
|
|
11
|
+
/** @not-instrumented */
|
|
12
|
+
export declare const createFlowApiClient: ({ flowId }: CreateFlowApiClientParams, client: DynamicClient) => Promise<FlowApiClientResult>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=createFlowApiClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFlowApiClient.d.ts","sourceRoot":"","sources":["../../../../../src/modules/flow/utils/createFlowApiClient/createFlowApiClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAK9D,KAAK,yBAAyB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAwB;AACxB,eAAO,MAAM,mBAAmB,eAClB,yBAAyB,UAC7B,aAAa,KACpB,OAAO,CAAC,mBAAmB,CAiB7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/flow/utils/createFlowApiClient/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFlowSessionTokenStorageKey.d.ts","sourceRoot":"","sources":["../../../../../src/modules/flow/utils/createFlowSessionTokenStorageKey/createFlowSessionTokenStorageKey.ts"],"names":[],"mappings":"AAIA,wBAAwB;AAExB,eAAO,MAAM,gCAAgC,WAAY,MAAM,oEAK9D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/flow/utils/createFlowSessionTokenStorageKey/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/flow/utils/withFlowSessionTokenCleanupOn401/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,YAAY,EAAE,sCAAsC,EAAE,MAAM,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DynamicClient } from '../../../../client/types';
|
|
2
|
+
export type WithFlowSessionTokenCleanupOn401Params<T> = {
|
|
3
|
+
call: () => Promise<T>;
|
|
4
|
+
flowId: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Flow mutation routes are guarded server-side only by session-token
|
|
8
|
+
* validation, so a 401 means the token is dead (revoked, expired, deleted,
|
|
9
|
+
* or invalid). Leaving a dead token in `localStorage` widens the XSS
|
|
10
|
+
* exfiltration surface for no benefit and makes the next SDK load attempt
|
|
11
|
+
* requests that are guaranteed to fail.
|
|
12
|
+
*
|
|
13
|
+
* @not-instrumented
|
|
14
|
+
*/
|
|
15
|
+
export declare const withFlowSessionTokenCleanupOn401: <T>({ call, flowId }: WithFlowSessionTokenCleanupOn401Params<T>, client: DynamicClient) => Promise<T>;
|
|
16
|
+
//# sourceMappingURL=withFlowSessionTokenCleanupOn401.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withFlowSessionTokenCleanupOn401.d.ts","sourceRoot":"","sources":["../../../../../src/modules/flow/utils/withFlowSessionTokenCleanupOn401/withFlowSessionTokenCleanupOn401.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAI9D,MAAM,MAAM,sCAAsC,CAAC,CAAC,IAAI;IACtD,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC,GAAU,CAAC,oBACpC,sCAAsC,CAAC,CAAC,CAAC,UACnD,aAAa,KACpB,OAAO,CAAC,CAAC,CAgBX,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { J as getDefaultClient, L as instrumentFunction, Q as getCore, b as createApiClient } from "./InvalidParamError-
|
|
2
|
-
import { r as updateAuthFromVerifyResponse } from "./
|
|
1
|
+
import { J as getDefaultClient, L as instrumentFunction, Q as getCore, b as createApiClient } from "./InvalidParamError-BxBgwLQB.native.esm.js";
|
|
2
|
+
import { r as updateAuthFromVerifyResponse } from "./getWalletProviderByKey-C5w8qJ0f.native.esm.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/user/refreshAuth/refreshAuth.ts
|
|
5
5
|
/**
|
|
@@ -35,4 +35,4 @@ const __refreshAuth_wrapped = instrumentFunction({
|
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
37
|
export { __refreshAuth_wrapped as t };
|
|
38
|
-
//# sourceMappingURL=refreshAuth-
|
|
38
|
+
//# sourceMappingURL=refreshAuth-CVUpYNs6.native.esm.js.map
|
package/dist/{refreshAuth-B2kFf0pl.native.esm.js.map → refreshAuth-CVUpYNs6.native.esm.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshAuth-
|
|
1
|
+
{"version":3,"file":"refreshAuth-CVUpYNs6.native.esm.js","names":[],"sources":["../src/modules/user/refreshAuth/refreshAuth.ts"],"sourcesContent":["import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\nimport { updateAuthFromVerifyResponse } from '../../auth/updateAuthFromVerifyResponse';\n\n/**\n * Refreshes the current user's data from the server.\n *\n * This function fetches the latest user information and token from the backend\n * updating the local user and token states with any changes.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the verify response.\n * @instrumented\n * @redact-params\n */\nexport const refreshAuth = async (\n client = getDefaultClient()\n): Promise<VerifyResponse> => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const response = await apiClient.refreshAuth({\n environmentId: core.environmentId,\n });\n\n updateAuthFromVerifyResponse({ response }, client);\n\n return response;\n};\n"],"mappings":";;;;;;;;;;;;;;;AAqBA,MAAE,cAAa,OACb,SAAM,kBAAY;CAElB,MAAM,OAAA,QAAW,OAAM;wBACN,gBAAK,EAAa,EAAA,OAAA,eAGnC,eAAA,KAAA;AAGD,8BAAA,EAAA,UAAA,EAAA,OAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as createApiClient, ct as getCore, it as getDefaultClient, q as instrumentFunction } from "./InvalidParamError-
|
|
2
|
-
import { r as updateAuthFromVerifyResponse } from "./
|
|
1
|
+
import { A as createApiClient, ct as getCore, it as getDefaultClient, q as instrumentFunction } from "./InvalidParamError-BmFmxeXx.esm.js";
|
|
2
|
+
import { r as updateAuthFromVerifyResponse } from "./getWalletProviderByKey-AQmQQpmk.esm.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/user/refreshAuth/refreshAuth.ts
|
|
5
5
|
/**
|
|
@@ -35,4 +35,4 @@ const __refreshAuth_wrapped = instrumentFunction({
|
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
37
|
export { __refreshAuth_wrapped as t };
|
|
38
|
-
//# sourceMappingURL=refreshAuth-
|
|
38
|
+
//# sourceMappingURL=refreshAuth-D8dU3BLP.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshAuth-
|
|
1
|
+
{"version":3,"file":"refreshAuth-D8dU3BLP.esm.js","names":[],"sources":["../src/modules/user/refreshAuth/refreshAuth.ts"],"sourcesContent":["import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\nimport { updateAuthFromVerifyResponse } from '../../auth/updateAuthFromVerifyResponse';\n\n/**\n * Refreshes the current user's data from the server.\n *\n * This function fetches the latest user information and token from the backend\n * updating the local user and token states with any changes.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the verify response.\n * @instrumented\n * @redact-params\n */\nexport const refreshAuth = async (\n client = getDefaultClient()\n): Promise<VerifyResponse> => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const response = await apiClient.refreshAuth({\n environmentId: core.environmentId,\n });\n\n updateAuthFromVerifyResponse({ response }, client);\n\n return response;\n};\n"],"mappings":";;;;;;;;;;;;;;;AAqBA,MAAE,cAAa,OACb,SAAM,kBAAY;CAElB,MAAM,OAAA,QAAW,OAAM;wBACN,gBAAK,EAAa,EAAA,OAAA,eAGnC,eAAA,KAAA;AAGD,8BAAA,EAAA,UAAA,EAAA,OAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_InvalidParamError = require('./InvalidParamError-
|
|
2
|
-
const
|
|
1
|
+
const require_InvalidParamError = require('./InvalidParamError-CGZRSAOn.cjs');
|
|
2
|
+
const require_getWalletProviderByKey = require('./getWalletProviderByKey-DMNpwDEn.cjs');
|
|
3
3
|
|
|
4
4
|
//#region src/modules/user/refreshAuth/refreshAuth.ts
|
|
5
5
|
/**
|
|
@@ -16,7 +16,7 @@ const require_getVerifiedCredentialForWalletAccount = require('./getVerifiedCred
|
|
|
16
16
|
const refreshAuth = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
17
17
|
const core = require_InvalidParamError.getCore(client);
|
|
18
18
|
const response = await require_InvalidParamError.createApiClient({}, client).refreshAuth({ environmentId: core.environmentId });
|
|
19
|
-
|
|
19
|
+
require_getWalletProviderByKey.updateAuthFromVerifyResponse({ response }, client);
|
|
20
20
|
return response;
|
|
21
21
|
};
|
|
22
22
|
const __refreshAuth_impl = refreshAuth;
|
|
@@ -40,4 +40,4 @@ Object.defineProperty(exports, '__refreshAuth_wrapped', {
|
|
|
40
40
|
return __refreshAuth_wrapped;
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
//# sourceMappingURL=refreshAuth-
|
|
43
|
+
//# sourceMappingURL=refreshAuth-DfcR3CWf.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshAuth-
|
|
1
|
+
{"version":3,"file":"refreshAuth-DfcR3CWf.cjs","names":[],"sources":["../src/modules/user/refreshAuth/refreshAuth.ts"],"sourcesContent":["import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\nimport { updateAuthFromVerifyResponse } from '../../auth/updateAuthFromVerifyResponse';\n\n/**\n * Refreshes the current user's data from the server.\n *\n * This function fetches the latest user information and token from the backend\n * updating the local user and token states with any changes.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the verify response.\n * @instrumented\n * @redact-params\n */\nexport const refreshAuth = async (\n client = getDefaultClient()\n): Promise<VerifyResponse> => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const response = await apiClient.refreshAuth({\n environmentId: core.environmentId,\n });\n\n updateAuthFromVerifyResponse({ response }, client);\n\n return response;\n};\n"],"mappings":";;;;;;;;;;;;;;;AAqBA,MAAE,cAAa,OACb,SAAM,4CAAY;CAElB,MAAM,OAAA,kCAAW,OAAM;wBACN,0CAAK,EAAa,EAAA,OAAA,eAGnC,eAAA,KAAA;AAGD,6DAAA,EAAA,UAAA,EAAA,OAAA"}
|