@frak-labs/core-sdk 0.2.1-beta.06c52c98 → 0.2.1-beta.1c24fe7c
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/cdn/bundle.js +26 -26
- package/dist/actions.cjs +1 -1
- package/dist/actions.d.cts +3 -3
- package/dist/actions.d.ts +3 -3
- package/dist/actions.js +1 -1
- package/dist/bundle.cjs +1 -1
- package/dist/bundle.d.cts +4 -4
- package/dist/bundle.d.ts +4 -4
- package/dist/bundle.js +1 -1
- package/dist/{computeLegacyProductId-BP-ciVsp.d.cts → computeLegacyProductId-fKvxbC4k.d.ts} +71 -3
- package/dist/{computeLegacyProductId-DiJd7RNo.d.ts → computeLegacyProductId-rYIvY4c3.d.cts} +71 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/{openSso-B8v3Vtnh.d.ts → openSso-CMZM06uR.d.ts} +143 -3
- package/dist/{openSso-n_B4LSuW.d.cts → openSso-CebB8mFv.d.cts} +143 -3
- package/dist/setupClient-B_XMB52l.cjs +13 -0
- package/dist/setupClient-jYx-fbxB.js +13 -0
- package/dist/siweAuthenticate-CWcVvP-G.cjs +1 -0
- package/dist/siweAuthenticate-DQfdb5UQ.js +1 -0
- package/dist/{siweAuthenticate-yITE-iKh.d.cts → siweAuthenticate-Dc_Yg9Bg.d.cts} +95 -4
- package/dist/{siweAuthenticate-CDCsp8EJ.d.ts → siweAuthenticate-Ddhl-o4N.d.ts} +95 -4
- package/dist/trackEvent-Ce1XlsIE.js +1 -0
- package/dist/trackEvent-CvbJTTqA.cjs +1 -0
- package/package.json +2 -2
- package/src/actions/displaySharingPage.ts +49 -0
- package/src/actions/getMerchantInformation.test.ts +13 -1
- package/src/actions/getMerchantInformation.ts +20 -5
- package/src/actions/getUserReferralStatus.ts +42 -0
- package/src/actions/index.ts +7 -1
- package/src/actions/referral/setupReferral.test.ts +79 -0
- package/src/actions/referral/setupReferral.ts +32 -0
- package/src/clients/createIFrameFrakClient.ts +2 -0
- package/src/index.ts +12 -1
- package/src/types/index.ts +7 -0
- package/src/types/resolvedConfig.ts +20 -2
- package/src/types/rpc/displaySharingPage.ts +77 -0
- package/src/types/rpc/userReferralStatus.ts +20 -0
- package/src/types/rpc.ts +35 -0
- package/src/utils/cache/index.ts +7 -0
- package/src/utils/cache/lruMap.test.ts +55 -0
- package/src/utils/cache/lruMap.ts +38 -0
- package/src/utils/cache/withCache.test.ts +162 -0
- package/src/utils/cache/withCache.ts +105 -0
- package/src/utils/inAppBrowser.ts +60 -0
- package/src/utils/index.ts +6 -0
- package/src/utils/sdkConfigStore.ts +21 -35
- package/dist/setupClient-Dr_UYfTD.cjs +0 -13
- package/dist/setupClient-TuhDjVJx.js +0 -13
- package/dist/siweAuthenticate-0UPcUqI1.js +0 -1
- package/dist/siweAuthenticate-CfQibjZR.cjs +0 -1
- package/dist/trackEvent-5j5kkOCj.js +0 -1
- package/dist/trackEvent-B2uom25e.cjs +0 -1
package/dist/actions.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-CvbJTTqA.cjs`),t=require(`./siweAuthenticate-CWcVvP-G.cjs`);exports.REFERRAL_SUCCESS_EVENT=t.o,exports.displayEmbeddedWallet=t._,exports.displayModal=t.g,exports.displaySharingPage=t.h,exports.ensureIdentity=t.m,exports.getMerchantInformation=t.p,exports.getUserReferralStatus=t.f,exports.modalBuilder=t.r,exports.openSso=e.d,exports.prepareSso=t.d,exports.processReferral=t.l,exports.referralInteraction=t.c,exports.sendInteraction=t.u,exports.sendTransaction=t.n,exports.setupReferral=t.s,exports.siweAuthenticate=t.t,exports.trackPurchaseStatus=t.a,exports.watchWalletStatus=t.i;
|
package/dist/actions.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as openSso } from "./openSso-
|
|
2
|
-
import { _ as
|
|
3
|
-
export { type ModalBuilder, type ModalStepBuilder, type ProcessReferralOptions, type SendTransactionParams, type SiweAuthenticateModalParams, displayEmbeddedWallet, displayModal, ensureIdentity, getMerchantInformation, modalBuilder, openSso, prepareSso, processReferral, referralInteraction, sendInteraction, sendTransaction, siweAuthenticate, trackPurchaseStatus, watchWalletStatus };
|
|
1
|
+
import { t as openSso } from "./openSso-CebB8mFv.cjs";
|
|
2
|
+
import { S as displayEmbeddedWallet, _ as getUserReferralStatus, a as ModalBuilder, b as displaySharingPage, c as watchWalletStatus, d as REFERRAL_SUCCESS_EVENT, f as setupReferral, g as prepareSso, h as processReferral, i as sendTransaction, l as trackPurchaseStatus, m as ProcessReferralOptions, n as siweAuthenticate, o as ModalStepBuilder, p as referralInteraction, r as SendTransactionParams, s as modalBuilder, t as SiweAuthenticateModalParams, u as sendInteraction, v as getMerchantInformation, x as displayModal, y as ensureIdentity } from "./siweAuthenticate-Dc_Yg9Bg.cjs";
|
|
3
|
+
export { type ModalBuilder, type ModalStepBuilder, type ProcessReferralOptions, REFERRAL_SUCCESS_EVENT, type SendTransactionParams, type SiweAuthenticateModalParams, displayEmbeddedWallet, displayModal, displaySharingPage, ensureIdentity, getMerchantInformation, getUserReferralStatus, modalBuilder, openSso, prepareSso, processReferral, referralInteraction, sendInteraction, sendTransaction, setupReferral, siweAuthenticate, trackPurchaseStatus, watchWalletStatus };
|
package/dist/actions.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as openSso } from "./openSso-
|
|
2
|
-
import { _ as
|
|
3
|
-
export { type ModalBuilder, type ModalStepBuilder, type ProcessReferralOptions, type SendTransactionParams, type SiweAuthenticateModalParams, displayEmbeddedWallet, displayModal, ensureIdentity, getMerchantInformation, modalBuilder, openSso, prepareSso, processReferral, referralInteraction, sendInteraction, sendTransaction, siweAuthenticate, trackPurchaseStatus, watchWalletStatus };
|
|
1
|
+
import { t as openSso } from "./openSso-CMZM06uR.js";
|
|
2
|
+
import { S as displayEmbeddedWallet, _ as getUserReferralStatus, a as ModalBuilder, b as displaySharingPage, c as watchWalletStatus, d as REFERRAL_SUCCESS_EVENT, f as setupReferral, g as prepareSso, h as processReferral, i as sendTransaction, l as trackPurchaseStatus, m as ProcessReferralOptions, n as siweAuthenticate, o as ModalStepBuilder, p as referralInteraction, r as SendTransactionParams, s as modalBuilder, t as SiweAuthenticateModalParams, u as sendInteraction, v as getMerchantInformation, x as displayModal, y as ensureIdentity } from "./siweAuthenticate-Ddhl-o4N.js";
|
|
3
|
+
export { type ModalBuilder, type ModalStepBuilder, type ProcessReferralOptions, REFERRAL_SUCCESS_EVENT, type SendTransactionParams, type SiweAuthenticateModalParams, displayEmbeddedWallet, displayModal, displaySharingPage, ensureIdentity, getMerchantInformation, getUserReferralStatus, modalBuilder, openSso, prepareSso, processReferral, referralInteraction, sendInteraction, sendTransaction, setupReferral, siweAuthenticate, trackPurchaseStatus, watchWalletStatus };
|
package/dist/actions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{d as e}from"./trackEvent-Ce1XlsIE.js";import{_ as t,a as n,c as r,d as i,f as a,g as o,h as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as _}from"./siweAuthenticate-DQfdb5UQ.js";export{f as REFERRAL_SUCCESS_EVENT,t as displayEmbeddedWallet,o as displayModal,s as displaySharingPage,u as ensureIdentity,p as getMerchantInformation,a as getUserReferralStatus,m as modalBuilder,e as openSso,i as prepareSso,l as processReferral,r as referralInteraction,_ as sendInteraction,d as sendTransaction,h as setupReferral,g as siweAuthenticate,n as trackPurchaseStatus,c as watchWalletStatus};
|
package/dist/bundle.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-CvbJTTqA.cjs`),t=require(`./setupClient-B_XMB52l.cjs`),n=require(`./siweAuthenticate-CWcVvP-G.cjs`);exports.DEEP_LINK_SCHEME=t.y,exports.DebugInfoGatherer=t.r,exports.FrakContextManager=e.r,exports.REFERRAL_SUCCESS_EVENT=n.o,exports.base64urlDecode=e.g,exports.base64urlEncode=e._,exports.baseIframeProps=t.s,exports.clearAllCache=e.s,exports.compressJsonToB64=e.h,exports.computeLegacyProductId=e.v,exports.createIFrameFrakClient=t.n,exports.createIframe=t.c,exports.decompressJsonFromB64=e.o,exports.displayEmbeddedWallet=n._,exports.displayModal=n.g,exports.displaySharingPage=n.h,exports.ensureIdentity=n.m,exports.findIframeInOpener=t.l,exports.formatAmount=t.d,exports.generateSsoUrl=e.m,exports.getBackendUrl=e.u,exports.getCache=e.c,exports.getClientId=e.y,exports.getCurrencyAmountKey=t.u,exports.getMerchantInformation=n.p,exports.getSupportedCurrency=t.p,exports.getSupportedLocale=t.f,exports.getUserReferralStatus=n.f,exports.isChromiumAndroid=t.h,exports.isFrakDeepLink=t.g,exports.isIOS=t.i,exports.isInAppBrowser=t.a,exports.isV1Context=e.i,exports.isV2Context=e.a,exports.locales=t.m,exports.modalBuilder=n.r,exports.openSso=e.d,exports.prepareSso=n.d,exports.processReferral=n.l,exports.redirectToExternalBrowser=t.o,exports.referralInteraction=n.c,exports.sdkConfigStore=e.n,exports.sendInteraction=n.u,exports.sendTransaction=n.n,exports.setupClient=t.t,exports.setupReferral=n.s,exports.siweAuthenticate=n.t,exports.ssoPopupFeatures=e.f,exports.ssoPopupName=e.p,exports.toAndroidIntentUrl=t._,exports.trackEvent=e.t,exports.trackPurchaseStatus=n.a,exports.triggerDeepLinkWithFallback=t.v,exports.watchWalletStatus=n.i,exports.withCache=e.l;
|
package/dist/bundle.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { A as
|
|
3
|
-
import { _ as
|
|
4
|
-
export { AppSpecificSsoMetadata, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, DeepLinkFallbackOptions, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, EmbeddedViewActionReferred, EmbeddedViewActionSharing, EstimatedReward, FinalActionType, FinalModalStepType, FrakClient, FrakContext, FrakContextManager, FrakContextV1, FrakContextV2, FrakEvent, FrakLifecycleEvent, FrakWalletSdkConfig, FullSsoParams, GetMerchantInformationReturnType, HashProtectedData, I18nConfig, IFrameLifecycleEvent, IFrameRpcSchema, IFrameTransport, InteractionTypeKey, KeyProvider, Language, LocalesKey, LocalizedI18nConfig, LoggedInEmbeddedView, LoggedOutEmbeddedView, LoginModalStepType, MerchantConfigResponse, ModalBuilder, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepBuilder, ModalStepMetadata, ModalStepTypes, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, ProcessReferralOptions, ResolvedPlacement, ResolvedSdkConfig, RewardTier, SdkResolvedConfig, SendInteractionParamsType, SendTransactionModalStepType, SendTransactionParams, SendTransactionReturnType, SendTransactionTxType, SiweAuthenticateModalParams, SiweAuthenticateModalStepType, SiweAuthenticateReturnType, SiweAuthenticationParams, SsoMetadata, TokenAmountType, TrackArrivalParams, TrackArrivalResult, UtmParams, WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, displayEmbeddedWallet, displayModal, ensureIdentity, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getMerchantInformation, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isV1Context, isV2Context, locales, modalBuilder, openSso, prepareSso, processReferral, referralInteraction, sdkConfigStore, sendInteraction, sendTransaction, setupClient, siweAuthenticate, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, trackPurchaseStatus, triggerDeepLinkWithFallback, watchWalletStatus };
|
|
1
|
+
import { $ as ResolvedPlacement, A as ModalRpcMetadata, B as LoginModalStepType, C as EmbeddedViewActionReferred, D as DisplaySharingPageResultType, E as DisplaySharingPageParamsType, F as SendTransactionReturnType, G as SsoMetadata, H as OpenSsoReturnType, I as SendTransactionTxType, J as ModalStepMetadata, K as FinalActionType, L as SiweAuthenticateModalStepType, M as ModalRpcStepsResultType, N as ModalStepTypes, O as SharingPageProduct, P as SendTransactionModalStepType, Q as MerchantConfigResponse, R as SiweAuthenticateReturnType, S as LoggedOutEmbeddedView, T as LoggedInEmbeddedView, U as PrepareSsoParamsType, V as OpenSsoParamsType, W as PrepareSsoReturnType, X as IFrameLifecycleEvent, Y as InteractionTypeKey, Z as ClientLifecycleEvent, _ as RewardTier, a as FrakContextV1, at as Language, b as DisplayEmbeddedWalletParamsType, c as isV2Context, d as IFrameTransport, et as ResolvedSdkConfig, f as IFrameRpcSchema, g as GetMerchantInformationReturnType, h as EstimatedReward, i as FrakContext, it as I18nConfig, j as ModalRpcStepsInput, k as DisplayModalParamsType, l as FrakClient, m as UserReferralStatusType, n as ssoPopupFeatures, nt as Currency, o as FrakContextV2, ot as LocalizedI18nConfig, p as WalletStatusReturnType, q as FinalModalStepType, r as ssoPopupName, rt as FrakWalletSdkConfig, s as isV1Context, t as openSso, tt as SdkResolvedConfig, u as FrakLifecycleEvent, v as TokenAmountType, w as EmbeddedViewActionSharing, x as DisplayEmbeddedWalletResultType, y as SendInteractionParamsType, z as SiweAuthenticationParams } from "./openSso-CebB8mFv.cjs";
|
|
2
|
+
import { A as getClientId, B as TrackArrivalParams, C as toAndroidIntentUrl, D as compressJsonToB64, E as decompressJsonFromB64, F as LocalesKey, G as KeyProvider, H as UtmParams, I as locales, L as setupClient, M as getCache, N as withCache, O as base64urlDecode, P as getBackendUrl, R as DebugInfoGatherer, S as isFrakDeepLink, T as DEEP_LINK_SCHEME, U as CompressedData, V as TrackArrivalResult, W as HashProtectedData, _ as getCurrencyAmountKey, a as CompressedSsoData, b as DeepLinkFallbackOptions, c as sdkConfigStore, d as redirectToExternalBrowser, f as baseIframeProps, g as getSupportedCurrency, h as getSupportedLocale, i as AppSpecificSsoMetadata, j as clearAllCache, k as base64urlEncode, l as isIOS, m as findIframeInOpener, n as FrakEvent, o as FullSsoParams, p as createIframe, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as isInAppBrowser, v as formatAmount, w as triggerDeepLinkWithFallback, x as isChromiumAndroid, y as FrakContextManager, z as createIFrameFrakClient } from "./computeLegacyProductId-rYIvY4c3.cjs";
|
|
3
|
+
import { S as displayEmbeddedWallet, _ as getUserReferralStatus, a as ModalBuilder, b as displaySharingPage, c as watchWalletStatus, d as REFERRAL_SUCCESS_EVENT, f as setupReferral, g as prepareSso, h as processReferral, i as sendTransaction, l as trackPurchaseStatus, m as ProcessReferralOptions, n as siweAuthenticate, o as ModalStepBuilder, p as referralInteraction, r as SendTransactionParams, s as modalBuilder, t as SiweAuthenticateModalParams, u as sendInteraction, v as getMerchantInformation, x as displayModal, y as ensureIdentity } from "./siweAuthenticate-Dc_Yg9Bg.cjs";
|
|
4
|
+
export { AppSpecificSsoMetadata, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, DeepLinkFallbackOptions, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, DisplaySharingPageParamsType, DisplaySharingPageResultType, EmbeddedViewActionReferred, EmbeddedViewActionSharing, EstimatedReward, FinalActionType, FinalModalStepType, FrakClient, FrakContext, FrakContextManager, FrakContextV1, FrakContextV2, FrakEvent, FrakLifecycleEvent, FrakWalletSdkConfig, FullSsoParams, GetMerchantInformationReturnType, HashProtectedData, I18nConfig, IFrameLifecycleEvent, IFrameRpcSchema, IFrameTransport, InteractionTypeKey, KeyProvider, Language, LocalesKey, LocalizedI18nConfig, LoggedInEmbeddedView, LoggedOutEmbeddedView, LoginModalStepType, MerchantConfigResponse, ModalBuilder, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepBuilder, ModalStepMetadata, ModalStepTypes, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, ProcessReferralOptions, REFERRAL_SUCCESS_EVENT, ResolvedPlacement, ResolvedSdkConfig, RewardTier, SdkResolvedConfig, SendInteractionParamsType, SendTransactionModalStepType, SendTransactionParams, SendTransactionReturnType, SendTransactionTxType, SharingPageProduct, SiweAuthenticateModalParams, SiweAuthenticateModalStepType, SiweAuthenticateReturnType, SiweAuthenticationParams, SsoMetadata, TokenAmountType, TrackArrivalParams, TrackArrivalResult, UserReferralStatusType, UtmParams, WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, clearAllCache, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, displayEmbeddedWallet, displayModal, displaySharingPage, ensureIdentity, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getCache, getClientId, getCurrencyAmountKey, getMerchantInformation, getSupportedCurrency, getSupportedLocale, getUserReferralStatus, isChromiumAndroid, isFrakDeepLink, isIOS, isInAppBrowser, isV1Context, isV2Context, locales, modalBuilder, openSso, prepareSso, processReferral, redirectToExternalBrowser, referralInteraction, sdkConfigStore, sendInteraction, sendTransaction, setupClient, setupReferral, siweAuthenticate, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, trackPurchaseStatus, triggerDeepLinkWithFallback, watchWalletStatus, withCache };
|
package/dist/bundle.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { A as
|
|
3
|
-
import { _ as
|
|
4
|
-
export { AppSpecificSsoMetadata, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, DeepLinkFallbackOptions, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, EmbeddedViewActionReferred, EmbeddedViewActionSharing, EstimatedReward, FinalActionType, FinalModalStepType, FrakClient, FrakContext, FrakContextManager, FrakContextV1, FrakContextV2, FrakEvent, FrakLifecycleEvent, FrakWalletSdkConfig, FullSsoParams, GetMerchantInformationReturnType, HashProtectedData, I18nConfig, IFrameLifecycleEvent, IFrameRpcSchema, IFrameTransport, InteractionTypeKey, KeyProvider, Language, LocalesKey, LocalizedI18nConfig, LoggedInEmbeddedView, LoggedOutEmbeddedView, LoginModalStepType, MerchantConfigResponse, ModalBuilder, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepBuilder, ModalStepMetadata, ModalStepTypes, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, ProcessReferralOptions, ResolvedPlacement, ResolvedSdkConfig, RewardTier, SdkResolvedConfig, SendInteractionParamsType, SendTransactionModalStepType, SendTransactionParams, SendTransactionReturnType, SendTransactionTxType, SiweAuthenticateModalParams, SiweAuthenticateModalStepType, SiweAuthenticateReturnType, SiweAuthenticationParams, SsoMetadata, TokenAmountType, TrackArrivalParams, TrackArrivalResult, UtmParams, WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, displayEmbeddedWallet, displayModal, ensureIdentity, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getMerchantInformation, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isV1Context, isV2Context, locales, modalBuilder, openSso, prepareSso, processReferral, referralInteraction, sdkConfigStore, sendInteraction, sendTransaction, setupClient, siweAuthenticate, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, trackPurchaseStatus, triggerDeepLinkWithFallback, watchWalletStatus };
|
|
1
|
+
import { $ as ResolvedPlacement, A as ModalRpcMetadata, B as LoginModalStepType, C as EmbeddedViewActionReferred, D as DisplaySharingPageResultType, E as DisplaySharingPageParamsType, F as SendTransactionReturnType, G as SsoMetadata, H as OpenSsoReturnType, I as SendTransactionTxType, J as ModalStepMetadata, K as FinalActionType, L as SiweAuthenticateModalStepType, M as ModalRpcStepsResultType, N as ModalStepTypes, O as SharingPageProduct, P as SendTransactionModalStepType, Q as MerchantConfigResponse, R as SiweAuthenticateReturnType, S as LoggedOutEmbeddedView, T as LoggedInEmbeddedView, U as PrepareSsoParamsType, V as OpenSsoParamsType, W as PrepareSsoReturnType, X as IFrameLifecycleEvent, Y as InteractionTypeKey, Z as ClientLifecycleEvent, _ as RewardTier, a as FrakContextV1, at as Language, b as DisplayEmbeddedWalletParamsType, c as isV2Context, d as IFrameTransport, et as ResolvedSdkConfig, f as IFrameRpcSchema, g as GetMerchantInformationReturnType, h as EstimatedReward, i as FrakContext, it as I18nConfig, j as ModalRpcStepsInput, k as DisplayModalParamsType, l as FrakClient, m as UserReferralStatusType, n as ssoPopupFeatures, nt as Currency, o as FrakContextV2, ot as LocalizedI18nConfig, p as WalletStatusReturnType, q as FinalModalStepType, r as ssoPopupName, rt as FrakWalletSdkConfig, s as isV1Context, t as openSso, tt as SdkResolvedConfig, u as FrakLifecycleEvent, v as TokenAmountType, w as EmbeddedViewActionSharing, x as DisplayEmbeddedWalletResultType, y as SendInteractionParamsType, z as SiweAuthenticationParams } from "./openSso-CMZM06uR.js";
|
|
2
|
+
import { A as getClientId, B as TrackArrivalParams, C as toAndroidIntentUrl, D as compressJsonToB64, E as decompressJsonFromB64, F as LocalesKey, G as KeyProvider, H as UtmParams, I as locales, L as setupClient, M as getCache, N as withCache, O as base64urlDecode, P as getBackendUrl, R as DebugInfoGatherer, S as isFrakDeepLink, T as DEEP_LINK_SCHEME, U as CompressedData, V as TrackArrivalResult, W as HashProtectedData, _ as getCurrencyAmountKey, a as CompressedSsoData, b as DeepLinkFallbackOptions, c as sdkConfigStore, d as redirectToExternalBrowser, f as baseIframeProps, g as getSupportedCurrency, h as getSupportedLocale, i as AppSpecificSsoMetadata, j as clearAllCache, k as base64urlEncode, l as isIOS, m as findIframeInOpener, n as FrakEvent, o as FullSsoParams, p as createIframe, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as isInAppBrowser, v as formatAmount, w as triggerDeepLinkWithFallback, x as isChromiumAndroid, y as FrakContextManager, z as createIFrameFrakClient } from "./computeLegacyProductId-fKvxbC4k.js";
|
|
3
|
+
import { S as displayEmbeddedWallet, _ as getUserReferralStatus, a as ModalBuilder, b as displaySharingPage, c as watchWalletStatus, d as REFERRAL_SUCCESS_EVENT, f as setupReferral, g as prepareSso, h as processReferral, i as sendTransaction, l as trackPurchaseStatus, m as ProcessReferralOptions, n as siweAuthenticate, o as ModalStepBuilder, p as referralInteraction, r as SendTransactionParams, s as modalBuilder, t as SiweAuthenticateModalParams, u as sendInteraction, v as getMerchantInformation, x as displayModal, y as ensureIdentity } from "./siweAuthenticate-Ddhl-o4N.js";
|
|
4
|
+
export { AppSpecificSsoMetadata, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, DeepLinkFallbackOptions, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, DisplaySharingPageParamsType, DisplaySharingPageResultType, EmbeddedViewActionReferred, EmbeddedViewActionSharing, EstimatedReward, FinalActionType, FinalModalStepType, FrakClient, FrakContext, FrakContextManager, FrakContextV1, FrakContextV2, FrakEvent, FrakLifecycleEvent, FrakWalletSdkConfig, FullSsoParams, GetMerchantInformationReturnType, HashProtectedData, I18nConfig, IFrameLifecycleEvent, IFrameRpcSchema, IFrameTransport, InteractionTypeKey, KeyProvider, Language, LocalesKey, LocalizedI18nConfig, LoggedInEmbeddedView, LoggedOutEmbeddedView, LoginModalStepType, MerchantConfigResponse, ModalBuilder, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepBuilder, ModalStepMetadata, ModalStepTypes, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, ProcessReferralOptions, REFERRAL_SUCCESS_EVENT, ResolvedPlacement, ResolvedSdkConfig, RewardTier, SdkResolvedConfig, SendInteractionParamsType, SendTransactionModalStepType, SendTransactionParams, SendTransactionReturnType, SendTransactionTxType, SharingPageProduct, SiweAuthenticateModalParams, SiweAuthenticateModalStepType, SiweAuthenticateReturnType, SiweAuthenticationParams, SsoMetadata, TokenAmountType, TrackArrivalParams, TrackArrivalResult, UserReferralStatusType, UtmParams, WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, clearAllCache, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, displayEmbeddedWallet, displayModal, displaySharingPage, ensureIdentity, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getCache, getClientId, getCurrencyAmountKey, getMerchantInformation, getSupportedCurrency, getSupportedLocale, getUserReferralStatus, isChromiumAndroid, isFrakDeepLink, isIOS, isInAppBrowser, isV1Context, isV2Context, locales, modalBuilder, openSso, prepareSso, processReferral, redirectToExternalBrowser, referralInteraction, sdkConfigStore, sendInteraction, sendTransaction, setupClient, setupReferral, siweAuthenticate, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, trackPurchaseStatus, triggerDeepLinkWithFallback, watchWalletStatus, withCache };
|
package/dist/bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,n as u,o as d,p as f,r as p,s as m,t as h,u as g,v as _,y as v}from"./trackEvent-Ce1XlsIE.js";import{_ as y,a as b,c as x,d as S,f as C,g as w,h as T,i as E,l as D,m as O,n as k,o as A,p as j,r as M,s as N,t as P,u as F,v as I,y as L}from"./setupClient-jYx-fbxB.js";import{_ as R,a as z,c as B,d as V,f as H,g as U,h as W,i as G,l as K,m as q,n as J,o as Y,p as X,r as Z,s as Q,t as $,u as ee}from"./siweAuthenticate-DQfdb5UQ.js";export{L as DEEP_LINK_SCHEME,M as DebugInfoGatherer,p as FrakContextManager,Y as REFERRAL_SUCCESS_EVENT,a as base64urlDecode,e as base64urlEncode,N as baseIframeProps,m as clearAllCache,o as compressJsonToB64,_ as computeLegacyProductId,k as createIFrameFrakClient,x as createIframe,d as decompressJsonFromB64,R as displayEmbeddedWallet,U as displayModal,W as displaySharingPage,q as ensureIdentity,D as findIframeInOpener,S as formatAmount,l as generateSsoUrl,g as getBackendUrl,n as getCache,v as getClientId,F as getCurrencyAmountKey,X as getMerchantInformation,j as getSupportedCurrency,C as getSupportedLocale,H as getUserReferralStatus,T as isChromiumAndroid,w as isFrakDeepLink,E as isIOS,b as isInAppBrowser,s as isV1Context,t as isV2Context,O as locales,Z as modalBuilder,r as openSso,V as prepareSso,K as processReferral,A as redirectToExternalBrowser,B as referralInteraction,u as sdkConfigStore,ee as sendInteraction,J as sendTransaction,P as setupClient,Q as setupReferral,$ as siweAuthenticate,i as ssoPopupFeatures,f as ssoPopupName,y as toAndroidIntentUrl,h as trackEvent,z as trackPurchaseStatus,I as triggerDeepLinkWithFallback,G as watchWalletStatus,c as withCache};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { RpcMessage, RpcResponse } from "@frak-labs/frame-connector";
|
|
1
|
+
import { G as SsoMetadata, Q as MerchantConfigResponse, U as PrepareSsoParamsType, a as FrakContextV1, at as Language, i as FrakContext, l as FrakClient, nt as Currency, o as FrakContextV2, rt as FrakWalletSdkConfig, tt as SdkResolvedConfig, v as TokenAmountType } from "./openSso-CMZM06uR.js";
|
|
3
2
|
import { Address, Hex } from "viem";
|
|
3
|
+
import { RpcMessage, RpcResponse } from "@frak-labs/frame-connector";
|
|
4
4
|
|
|
5
5
|
//#region src/types/compression.d.ts
|
|
6
6
|
/**
|
|
@@ -143,6 +143,50 @@ declare const locales: {
|
|
|
143
143
|
*/
|
|
144
144
|
declare function getBackendUrl(walletUrl?: string): string;
|
|
145
145
|
//#endregion
|
|
146
|
+
//#region src/utils/cache/withCache.d.ts
|
|
147
|
+
type WithCacheOptions = {
|
|
148
|
+
/** The key to cache the data against */cacheKey: string; /** Time in ms that cached data will remain valid. Default: 30_000 (30s). Set to 0 to disable caching. */
|
|
149
|
+
cacheTime?: number;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Returns the result of a given promise, and caches the result for
|
|
153
|
+
* subsequent invocations against a provided cache key.
|
|
154
|
+
*
|
|
155
|
+
* Also deduplicates concurrent calls — if multiple callers request the same
|
|
156
|
+
* cache key while the promise is pending, they share the same promise.
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```ts
|
|
160
|
+
* // First call fetches, subsequent calls return cached data for 30s
|
|
161
|
+
* const data = await withCache(
|
|
162
|
+
* () => client.request({ method: "frak_getMerchantInformation" }),
|
|
163
|
+
* { cacheKey: "merchantInfo", cacheTime: 30_000 }
|
|
164
|
+
* );
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
declare function withCache<TData>(fn: () => Promise<TData>, {
|
|
168
|
+
cacheKey,
|
|
169
|
+
cacheTime
|
|
170
|
+
}: WithCacheOptions): Promise<TData>;
|
|
171
|
+
/**
|
|
172
|
+
* Get a cache handle for a specific key, useful for manual invalidation.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```ts
|
|
176
|
+
* // Invalidate merchant info cache after a mutation
|
|
177
|
+
* getCache("frak_getMerchantInformation").clear();
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
declare function getCache(cacheKey: string): {
|
|
181
|
+
/** Clear both the pending promise and the cached response */clear: () => void; /** Check if a non-expired response exists */
|
|
182
|
+
has: (cacheTime?: number) => boolean;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Clear all cached data (both pending promises and resolved responses).
|
|
186
|
+
* Called automatically when the client is destroyed.
|
|
187
|
+
*/
|
|
188
|
+
declare function clearAllCache(): void;
|
|
189
|
+
//#endregion
|
|
146
190
|
//#region src/utils/clientId.d.ts
|
|
147
191
|
/**
|
|
148
192
|
* Client ID utilities for anonymous tracking
|
|
@@ -415,6 +459,30 @@ declare function createIframe({
|
|
|
415
459
|
*/
|
|
416
460
|
declare function findIframeInOpener(pathname?: string): Window | null;
|
|
417
461
|
//#endregion
|
|
462
|
+
//#region src/utils/inAppBrowser.d.ts
|
|
463
|
+
/**
|
|
464
|
+
* Whether the current device runs iOS (including iPadOS 13+).
|
|
465
|
+
*/
|
|
466
|
+
declare const isIOS: boolean;
|
|
467
|
+
/**
|
|
468
|
+
* Whether the current browser is a social media in-app browser
|
|
469
|
+
* (Instagram, Facebook).
|
|
470
|
+
*/
|
|
471
|
+
declare const isInAppBrowser: boolean;
|
|
472
|
+
/**
|
|
473
|
+
* Redirect to external browser from in-app WebView.
|
|
474
|
+
*
|
|
475
|
+
* - **iOS**: Uses `x-safari-https://` scheme — server-side 302 redirects
|
|
476
|
+
* to custom URL schemes are silently swallowed by WKWebView.
|
|
477
|
+
* Direct `window.location.href` assignment works (confirmed iOS 17+).
|
|
478
|
+
*
|
|
479
|
+
* - **Android**: Uses backend `/common/social` endpoint which returns a PDF
|
|
480
|
+
* Content-Type response, forcing the WebView to hand off to the default browser.
|
|
481
|
+
*
|
|
482
|
+
* @param targetUrl - The URL to open in the external browser
|
|
483
|
+
*/
|
|
484
|
+
declare function redirectToExternalBrowser(targetUrl: string): void;
|
|
485
|
+
//#endregion
|
|
418
486
|
//#region src/utils/sdkConfigStore.d.ts
|
|
419
487
|
declare const GLOBAL_KEY = "__frakSdkConfig";
|
|
420
488
|
declare global {
|
|
@@ -520,4 +588,4 @@ declare function computeLegacyProductId({
|
|
|
520
588
|
domain?: string;
|
|
521
589
|
}): `0x${string}`;
|
|
522
590
|
//#endregion
|
|
523
|
-
export {
|
|
591
|
+
export { getClientId as A, TrackArrivalParams as B, toAndroidIntentUrl as C, compressJsonToB64 as D, decompressJsonFromB64 as E, LocalesKey as F, KeyProvider as G, UtmParams as H, locales as I, setupClient as L, getCache as M, withCache as N, base64urlDecode as O, getBackendUrl as P, DebugInfoGatherer as R, isFrakDeepLink as S, DEEP_LINK_SCHEME as T, CompressedData as U, TrackArrivalResult as V, HashProtectedData as W, getCurrencyAmountKey as _, CompressedSsoData as a, DeepLinkFallbackOptions as b, sdkConfigStore as c, redirectToExternalBrowser as d, baseIframeProps as f, getSupportedCurrency as g, getSupportedLocale as h, AppSpecificSsoMetadata as i, clearAllCache as j, base64urlEncode as k, isIOS as l, findIframeInOpener as m, FrakEvent as n, FullSsoParams as o, createIframe as p, trackEvent as r, generateSsoUrl as s, computeLegacyProductId as t, isInAppBrowser as u, formatAmount as v, triggerDeepLinkWithFallback as w, isChromiumAndroid as x, FrakContextManager as y, createIFrameFrakClient as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Address, Hex } from "viem";
|
|
1
|
+
import { G as SsoMetadata, Q as MerchantConfigResponse, U as PrepareSsoParamsType, a as FrakContextV1, at as Language, i as FrakContext, l as FrakClient, nt as Currency, o as FrakContextV2, rt as FrakWalletSdkConfig, tt as SdkResolvedConfig, v as TokenAmountType } from "./openSso-CebB8mFv.cjs";
|
|
3
2
|
import { RpcMessage, RpcResponse } from "@frak-labs/frame-connector";
|
|
3
|
+
import { Address, Hex } from "viem";
|
|
4
4
|
|
|
5
5
|
//#region src/types/compression.d.ts
|
|
6
6
|
/**
|
|
@@ -143,6 +143,50 @@ declare const locales: {
|
|
|
143
143
|
*/
|
|
144
144
|
declare function getBackendUrl(walletUrl?: string): string;
|
|
145
145
|
//#endregion
|
|
146
|
+
//#region src/utils/cache/withCache.d.ts
|
|
147
|
+
type WithCacheOptions = {
|
|
148
|
+
/** The key to cache the data against */cacheKey: string; /** Time in ms that cached data will remain valid. Default: 30_000 (30s). Set to 0 to disable caching. */
|
|
149
|
+
cacheTime?: number;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Returns the result of a given promise, and caches the result for
|
|
153
|
+
* subsequent invocations against a provided cache key.
|
|
154
|
+
*
|
|
155
|
+
* Also deduplicates concurrent calls — if multiple callers request the same
|
|
156
|
+
* cache key while the promise is pending, they share the same promise.
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```ts
|
|
160
|
+
* // First call fetches, subsequent calls return cached data for 30s
|
|
161
|
+
* const data = await withCache(
|
|
162
|
+
* () => client.request({ method: "frak_getMerchantInformation" }),
|
|
163
|
+
* { cacheKey: "merchantInfo", cacheTime: 30_000 }
|
|
164
|
+
* );
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
declare function withCache<TData>(fn: () => Promise<TData>, {
|
|
168
|
+
cacheKey,
|
|
169
|
+
cacheTime
|
|
170
|
+
}: WithCacheOptions): Promise<TData>;
|
|
171
|
+
/**
|
|
172
|
+
* Get a cache handle for a specific key, useful for manual invalidation.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```ts
|
|
176
|
+
* // Invalidate merchant info cache after a mutation
|
|
177
|
+
* getCache("frak_getMerchantInformation").clear();
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
declare function getCache(cacheKey: string): {
|
|
181
|
+
/** Clear both the pending promise and the cached response */clear: () => void; /** Check if a non-expired response exists */
|
|
182
|
+
has: (cacheTime?: number) => boolean;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Clear all cached data (both pending promises and resolved responses).
|
|
186
|
+
* Called automatically when the client is destroyed.
|
|
187
|
+
*/
|
|
188
|
+
declare function clearAllCache(): void;
|
|
189
|
+
//#endregion
|
|
146
190
|
//#region src/utils/clientId.d.ts
|
|
147
191
|
/**
|
|
148
192
|
* Client ID utilities for anonymous tracking
|
|
@@ -415,6 +459,30 @@ declare function createIframe({
|
|
|
415
459
|
*/
|
|
416
460
|
declare function findIframeInOpener(pathname?: string): Window | null;
|
|
417
461
|
//#endregion
|
|
462
|
+
//#region src/utils/inAppBrowser.d.ts
|
|
463
|
+
/**
|
|
464
|
+
* Whether the current device runs iOS (including iPadOS 13+).
|
|
465
|
+
*/
|
|
466
|
+
declare const isIOS: boolean;
|
|
467
|
+
/**
|
|
468
|
+
* Whether the current browser is a social media in-app browser
|
|
469
|
+
* (Instagram, Facebook).
|
|
470
|
+
*/
|
|
471
|
+
declare const isInAppBrowser: boolean;
|
|
472
|
+
/**
|
|
473
|
+
* Redirect to external browser from in-app WebView.
|
|
474
|
+
*
|
|
475
|
+
* - **iOS**: Uses `x-safari-https://` scheme — server-side 302 redirects
|
|
476
|
+
* to custom URL schemes are silently swallowed by WKWebView.
|
|
477
|
+
* Direct `window.location.href` assignment works (confirmed iOS 17+).
|
|
478
|
+
*
|
|
479
|
+
* - **Android**: Uses backend `/common/social` endpoint which returns a PDF
|
|
480
|
+
* Content-Type response, forcing the WebView to hand off to the default browser.
|
|
481
|
+
*
|
|
482
|
+
* @param targetUrl - The URL to open in the external browser
|
|
483
|
+
*/
|
|
484
|
+
declare function redirectToExternalBrowser(targetUrl: string): void;
|
|
485
|
+
//#endregion
|
|
418
486
|
//#region src/utils/sdkConfigStore.d.ts
|
|
419
487
|
declare const GLOBAL_KEY = "__frakSdkConfig";
|
|
420
488
|
declare global {
|
|
@@ -520,4 +588,4 @@ declare function computeLegacyProductId({
|
|
|
520
588
|
domain?: string;
|
|
521
589
|
}): `0x${string}`;
|
|
522
590
|
//#endregion
|
|
523
|
-
export {
|
|
591
|
+
export { getClientId as A, TrackArrivalParams as B, toAndroidIntentUrl as C, compressJsonToB64 as D, decompressJsonFromB64 as E, LocalesKey as F, KeyProvider as G, UtmParams as H, locales as I, setupClient as L, getCache as M, withCache as N, base64urlDecode as O, getBackendUrl as P, DebugInfoGatherer as R, isFrakDeepLink as S, DEEP_LINK_SCHEME as T, CompressedData as U, TrackArrivalResult as V, HashProtectedData as W, getCurrencyAmountKey as _, CompressedSsoData as a, DeepLinkFallbackOptions as b, sdkConfigStore as c, redirectToExternalBrowser as d, baseIframeProps as f, getSupportedCurrency as g, getSupportedLocale as h, AppSpecificSsoMetadata as i, clearAllCache as j, base64urlEncode as k, isIOS as l, findIframeInOpener as m, FrakEvent as n, FullSsoParams as o, createIframe as p, trackEvent as r, generateSsoUrl as s, computeLegacyProductId as t, isInAppBrowser as u, formatAmount as v, triggerDeepLinkWithFallback as w, isChromiumAndroid as x, FrakContextManager as y, createIFrameFrakClient as z };
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-CvbJTTqA.cjs`),t=require(`./setupClient-B_XMB52l.cjs`);exports.DEEP_LINK_SCHEME=t.y,exports.DebugInfoGatherer=t.r,exports.FrakContextManager=e.r,exports.base64urlDecode=e.g,exports.base64urlEncode=e._,exports.baseIframeProps=t.s,exports.clearAllCache=e.s,exports.compressJsonToB64=e.h,exports.computeLegacyProductId=e.v,exports.createIFrameFrakClient=t.n,exports.createIframe=t.c,exports.decompressJsonFromB64=e.o,exports.findIframeInOpener=t.l,exports.formatAmount=t.d,exports.generateSsoUrl=e.m,exports.getBackendUrl=e.u,exports.getCache=e.c,exports.getClientId=e.y,exports.getCurrencyAmountKey=t.u,exports.getSupportedCurrency=t.p,exports.getSupportedLocale=t.f,exports.isChromiumAndroid=t.h,exports.isFrakDeepLink=t.g,exports.isIOS=t.i,exports.isInAppBrowser=t.a,exports.isV1Context=e.i,exports.isV2Context=e.a,exports.locales=t.m,exports.redirectToExternalBrowser=t.o,exports.sdkConfigStore=e.n,exports.setupClient=t.t,exports.ssoPopupFeatures=e.f,exports.ssoPopupName=e.p,exports.toAndroidIntentUrl=t._,exports.trackEvent=e.t,exports.triggerDeepLinkWithFallback=t.v,exports.withCache=e.l;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { A as
|
|
3
|
-
export { type AppSpecificSsoMetadata, type ClientLifecycleEvent, type CompressedData, type CompressedSsoData, type Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, type DeepLinkFallbackOptions, type DisplayEmbeddedWalletParamsType, type DisplayEmbeddedWalletResultType, type DisplayModalParamsType, type EmbeddedViewActionReferred, type EmbeddedViewActionSharing, type EstimatedReward, type FinalActionType, type FinalModalStepType, type FrakClient, type FrakContext, FrakContextManager, type FrakContextV1, type FrakContextV2, type FrakEvent, type FrakLifecycleEvent, type FrakWalletSdkConfig, type FullSsoParams, type GetMerchantInformationReturnType, type HashProtectedData, type I18nConfig, type IFrameLifecycleEvent, type IFrameRpcSchema, type IFrameTransport, type InteractionTypeKey, type KeyProvider, type Language, type LocalesKey, type LocalizedI18nConfig, type LoggedInEmbeddedView, type LoggedOutEmbeddedView, type LoginModalStepType, type MerchantConfigResponse, type ModalRpcMetadata, type ModalRpcStepsInput, type ModalRpcStepsResultType, type ModalStepMetadata, type ModalStepTypes, type OpenSsoParamsType, type OpenSsoReturnType, type PrepareSsoParamsType, type PrepareSsoReturnType, type ResolvedPlacement, type ResolvedSdkConfig, type RewardTier, type SdkResolvedConfig, type SendInteractionParamsType, type SendTransactionModalStepType, type SendTransactionReturnType, type SendTransactionTxType, type SiweAuthenticateModalStepType, type SiweAuthenticateReturnType, type SiweAuthenticationParams, type SsoMetadata, type TokenAmountType, type TrackArrivalParams, type TrackArrivalResult, type UtmParams, type WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isV1Context, isV2Context, locales, sdkConfigStore, setupClient, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, triggerDeepLinkWithFallback };
|
|
1
|
+
import { $ as ResolvedPlacement, A as ModalRpcMetadata, B as LoginModalStepType, C as EmbeddedViewActionReferred, D as DisplaySharingPageResultType, E as DisplaySharingPageParamsType, F as SendTransactionReturnType, G as SsoMetadata, H as OpenSsoReturnType, I as SendTransactionTxType, J as ModalStepMetadata, K as FinalActionType, L as SiweAuthenticateModalStepType, M as ModalRpcStepsResultType, N as ModalStepTypes, O as SharingPageProduct, P as SendTransactionModalStepType, Q as MerchantConfigResponse, R as SiweAuthenticateReturnType, S as LoggedOutEmbeddedView, T as LoggedInEmbeddedView, U as PrepareSsoParamsType, V as OpenSsoParamsType, W as PrepareSsoReturnType, X as IFrameLifecycleEvent, Y as InteractionTypeKey, Z as ClientLifecycleEvent, _ as RewardTier, a as FrakContextV1, at as Language, b as DisplayEmbeddedWalletParamsType, c as isV2Context, d as IFrameTransport, et as ResolvedSdkConfig, f as IFrameRpcSchema, g as GetMerchantInformationReturnType, h as EstimatedReward, i as FrakContext, it as I18nConfig, j as ModalRpcStepsInput, k as DisplayModalParamsType, l as FrakClient, m as UserReferralStatusType, n as ssoPopupFeatures, nt as Currency, o as FrakContextV2, ot as LocalizedI18nConfig, p as WalletStatusReturnType, q as FinalModalStepType, r as ssoPopupName, rt as FrakWalletSdkConfig, s as isV1Context, tt as SdkResolvedConfig, u as FrakLifecycleEvent, v as TokenAmountType, w as EmbeddedViewActionSharing, x as DisplayEmbeddedWalletResultType, y as SendInteractionParamsType, z as SiweAuthenticationParams } from "./openSso-CebB8mFv.cjs";
|
|
2
|
+
import { A as getClientId, B as TrackArrivalParams, C as toAndroidIntentUrl, D as compressJsonToB64, E as decompressJsonFromB64, F as LocalesKey, G as KeyProvider, H as UtmParams, I as locales, L as setupClient, M as getCache, N as withCache, O as base64urlDecode, P as getBackendUrl, R as DebugInfoGatherer, S as isFrakDeepLink, T as DEEP_LINK_SCHEME, U as CompressedData, V as TrackArrivalResult, W as HashProtectedData, _ as getCurrencyAmountKey, a as CompressedSsoData, b as DeepLinkFallbackOptions, c as sdkConfigStore, d as redirectToExternalBrowser, f as baseIframeProps, g as getSupportedCurrency, h as getSupportedLocale, i as AppSpecificSsoMetadata, j as clearAllCache, k as base64urlEncode, l as isIOS, m as findIframeInOpener, n as FrakEvent, o as FullSsoParams, p as createIframe, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as isInAppBrowser, v as formatAmount, w as triggerDeepLinkWithFallback, x as isChromiumAndroid, y as FrakContextManager, z as createIFrameFrakClient } from "./computeLegacyProductId-rYIvY4c3.cjs";
|
|
3
|
+
export { type AppSpecificSsoMetadata, type ClientLifecycleEvent, type CompressedData, type CompressedSsoData, type Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, type DeepLinkFallbackOptions, type DisplayEmbeddedWalletParamsType, type DisplayEmbeddedWalletResultType, type DisplayModalParamsType, type DisplaySharingPageParamsType, type DisplaySharingPageResultType, type EmbeddedViewActionReferred, type EmbeddedViewActionSharing, type EstimatedReward, type FinalActionType, type FinalModalStepType, type FrakClient, type FrakContext, FrakContextManager, type FrakContextV1, type FrakContextV2, type FrakEvent, type FrakLifecycleEvent, type FrakWalletSdkConfig, type FullSsoParams, type GetMerchantInformationReturnType, type HashProtectedData, type I18nConfig, type IFrameLifecycleEvent, type IFrameRpcSchema, type IFrameTransport, type InteractionTypeKey, type KeyProvider, type Language, type LocalesKey, type LocalizedI18nConfig, type LoggedInEmbeddedView, type LoggedOutEmbeddedView, type LoginModalStepType, type MerchantConfigResponse, type ModalRpcMetadata, type ModalRpcStepsInput, type ModalRpcStepsResultType, type ModalStepMetadata, type ModalStepTypes, type OpenSsoParamsType, type OpenSsoReturnType, type PrepareSsoParamsType, type PrepareSsoReturnType, type ResolvedPlacement, type ResolvedSdkConfig, type RewardTier, type SdkResolvedConfig, type SendInteractionParamsType, type SendTransactionModalStepType, type SendTransactionReturnType, type SendTransactionTxType, type SharingPageProduct, type SiweAuthenticateModalStepType, type SiweAuthenticateReturnType, type SiweAuthenticationParams, type SsoMetadata, type TokenAmountType, type TrackArrivalParams, type TrackArrivalResult, type UserReferralStatusType, type UtmParams, type WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, clearAllCache, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getCache, getClientId, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isIOS, isInAppBrowser, isV1Context, isV2Context, locales, redirectToExternalBrowser, sdkConfigStore, setupClient, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, triggerDeepLinkWithFallback, withCache };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { A as
|
|
3
|
-
export { type AppSpecificSsoMetadata, type ClientLifecycleEvent, type CompressedData, type CompressedSsoData, type Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, type DeepLinkFallbackOptions, type DisplayEmbeddedWalletParamsType, type DisplayEmbeddedWalletResultType, type DisplayModalParamsType, type EmbeddedViewActionReferred, type EmbeddedViewActionSharing, type EstimatedReward, type FinalActionType, type FinalModalStepType, type FrakClient, type FrakContext, FrakContextManager, type FrakContextV1, type FrakContextV2, type FrakEvent, type FrakLifecycleEvent, type FrakWalletSdkConfig, type FullSsoParams, type GetMerchantInformationReturnType, type HashProtectedData, type I18nConfig, type IFrameLifecycleEvent, type IFrameRpcSchema, type IFrameTransport, type InteractionTypeKey, type KeyProvider, type Language, type LocalesKey, type LocalizedI18nConfig, type LoggedInEmbeddedView, type LoggedOutEmbeddedView, type LoginModalStepType, type MerchantConfigResponse, type ModalRpcMetadata, type ModalRpcStepsInput, type ModalRpcStepsResultType, type ModalStepMetadata, type ModalStepTypes, type OpenSsoParamsType, type OpenSsoReturnType, type PrepareSsoParamsType, type PrepareSsoReturnType, type ResolvedPlacement, type ResolvedSdkConfig, type RewardTier, type SdkResolvedConfig, type SendInteractionParamsType, type SendTransactionModalStepType, type SendTransactionReturnType, type SendTransactionTxType, type SiweAuthenticateModalStepType, type SiweAuthenticateReturnType, type SiweAuthenticationParams, type SsoMetadata, type TokenAmountType, type TrackArrivalParams, type TrackArrivalResult, type UtmParams, type WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isV1Context, isV2Context, locales, sdkConfigStore, setupClient, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, triggerDeepLinkWithFallback };
|
|
1
|
+
import { $ as ResolvedPlacement, A as ModalRpcMetadata, B as LoginModalStepType, C as EmbeddedViewActionReferred, D as DisplaySharingPageResultType, E as DisplaySharingPageParamsType, F as SendTransactionReturnType, G as SsoMetadata, H as OpenSsoReturnType, I as SendTransactionTxType, J as ModalStepMetadata, K as FinalActionType, L as SiweAuthenticateModalStepType, M as ModalRpcStepsResultType, N as ModalStepTypes, O as SharingPageProduct, P as SendTransactionModalStepType, Q as MerchantConfigResponse, R as SiweAuthenticateReturnType, S as LoggedOutEmbeddedView, T as LoggedInEmbeddedView, U as PrepareSsoParamsType, V as OpenSsoParamsType, W as PrepareSsoReturnType, X as IFrameLifecycleEvent, Y as InteractionTypeKey, Z as ClientLifecycleEvent, _ as RewardTier, a as FrakContextV1, at as Language, b as DisplayEmbeddedWalletParamsType, c as isV2Context, d as IFrameTransport, et as ResolvedSdkConfig, f as IFrameRpcSchema, g as GetMerchantInformationReturnType, h as EstimatedReward, i as FrakContext, it as I18nConfig, j as ModalRpcStepsInput, k as DisplayModalParamsType, l as FrakClient, m as UserReferralStatusType, n as ssoPopupFeatures, nt as Currency, o as FrakContextV2, ot as LocalizedI18nConfig, p as WalletStatusReturnType, q as FinalModalStepType, r as ssoPopupName, rt as FrakWalletSdkConfig, s as isV1Context, tt as SdkResolvedConfig, u as FrakLifecycleEvent, v as TokenAmountType, w as EmbeddedViewActionSharing, x as DisplayEmbeddedWalletResultType, y as SendInteractionParamsType, z as SiweAuthenticationParams } from "./openSso-CMZM06uR.js";
|
|
2
|
+
import { A as getClientId, B as TrackArrivalParams, C as toAndroidIntentUrl, D as compressJsonToB64, E as decompressJsonFromB64, F as LocalesKey, G as KeyProvider, H as UtmParams, I as locales, L as setupClient, M as getCache, N as withCache, O as base64urlDecode, P as getBackendUrl, R as DebugInfoGatherer, S as isFrakDeepLink, T as DEEP_LINK_SCHEME, U as CompressedData, V as TrackArrivalResult, W as HashProtectedData, _ as getCurrencyAmountKey, a as CompressedSsoData, b as DeepLinkFallbackOptions, c as sdkConfigStore, d as redirectToExternalBrowser, f as baseIframeProps, g as getSupportedCurrency, h as getSupportedLocale, i as AppSpecificSsoMetadata, j as clearAllCache, k as base64urlEncode, l as isIOS, m as findIframeInOpener, n as FrakEvent, o as FullSsoParams, p as createIframe, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as isInAppBrowser, v as formatAmount, w as triggerDeepLinkWithFallback, x as isChromiumAndroid, y as FrakContextManager, z as createIFrameFrakClient } from "./computeLegacyProductId-fKvxbC4k.js";
|
|
3
|
+
export { type AppSpecificSsoMetadata, type ClientLifecycleEvent, type CompressedData, type CompressedSsoData, type Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, type DeepLinkFallbackOptions, type DisplayEmbeddedWalletParamsType, type DisplayEmbeddedWalletResultType, type DisplayModalParamsType, type DisplaySharingPageParamsType, type DisplaySharingPageResultType, type EmbeddedViewActionReferred, type EmbeddedViewActionSharing, type EstimatedReward, type FinalActionType, type FinalModalStepType, type FrakClient, type FrakContext, FrakContextManager, type FrakContextV1, type FrakContextV2, type FrakEvent, type FrakLifecycleEvent, type FrakWalletSdkConfig, type FullSsoParams, type GetMerchantInformationReturnType, type HashProtectedData, type I18nConfig, type IFrameLifecycleEvent, type IFrameRpcSchema, type IFrameTransport, type InteractionTypeKey, type KeyProvider, type Language, type LocalesKey, type LocalizedI18nConfig, type LoggedInEmbeddedView, type LoggedOutEmbeddedView, type LoginModalStepType, type MerchantConfigResponse, type ModalRpcMetadata, type ModalRpcStepsInput, type ModalRpcStepsResultType, type ModalStepMetadata, type ModalStepTypes, type OpenSsoParamsType, type OpenSsoReturnType, type PrepareSsoParamsType, type PrepareSsoReturnType, type ResolvedPlacement, type ResolvedSdkConfig, type RewardTier, type SdkResolvedConfig, type SendInteractionParamsType, type SendTransactionModalStepType, type SendTransactionReturnType, type SendTransactionTxType, type SharingPageProduct, type SiweAuthenticateModalStepType, type SiweAuthenticateReturnType, type SiweAuthenticationParams, type SsoMetadata, type TokenAmountType, type TrackArrivalParams, type TrackArrivalResult, type UserReferralStatusType, type UtmParams, type WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, clearAllCache, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getCache, getClientId, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isIOS, isInAppBrowser, isV1Context, isV2Context, locales, redirectToExternalBrowser, sdkConfigStore, setupClient, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, triggerDeepLinkWithFallback, withCache };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{_ as e,a as t,c as n,f as r,g as i,h as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h,v as g,y as _}from"./trackEvent-Ce1XlsIE.js";import{_ as v,a as y,c as b,d as x,f as S,g as C,h as w,i as T,l as E,m as D,n as O,o as k,p as A,r as j,s as M,t as N,u as P,v as F,y as I}from"./setupClient-jYx-fbxB.js";export{I as DEEP_LINK_SCHEME,j as DebugInfoGatherer,f as FrakContextManager,i as base64urlDecode,e as base64urlEncode,M as baseIframeProps,p as clearAllCache,a as compressJsonToB64,g as computeLegacyProductId,O as createIFrameFrakClient,b as createIframe,u as decompressJsonFromB64,E as findIframeInOpener,x as formatAmount,c as generateSsoUrl,h as getBackendUrl,n as getCache,_ as getClientId,P as getCurrencyAmountKey,A as getSupportedCurrency,S as getSupportedLocale,w as isChromiumAndroid,C as isFrakDeepLink,T as isIOS,y as isInAppBrowser,o as isV1Context,t as isV2Context,D as locales,k as redirectToExternalBrowser,l as sdkConfigStore,N as setupClient,r as ssoPopupFeatures,d as ssoPopupName,v as toAndroidIntentUrl,m as trackEvent,F as triggerDeepLinkWithFallback,s as withCache};
|
|
@@ -147,18 +147,36 @@ type ResolvedPlacement = {
|
|
|
147
147
|
buttonShare?: {
|
|
148
148
|
text?: string;
|
|
149
149
|
noRewardText?: string;
|
|
150
|
-
clickAction?: "embedded-wallet" | "share-modal";
|
|
150
|
+
clickAction?: "embedded-wallet" | "share-modal" | "sharing-page";
|
|
151
151
|
useReward?: boolean;
|
|
152
152
|
css?: string;
|
|
153
153
|
};
|
|
154
154
|
buttonWallet?: {
|
|
155
|
-
position?: "
|
|
155
|
+
position?: "right" | "left";
|
|
156
156
|
css?: string;
|
|
157
157
|
};
|
|
158
158
|
openInApp?: {
|
|
159
159
|
text?: string;
|
|
160
160
|
css?: string;
|
|
161
161
|
};
|
|
162
|
+
postPurchase?: {
|
|
163
|
+
refereeText?: string;
|
|
164
|
+
refereeNoRewardText?: string;
|
|
165
|
+
referrerText?: string;
|
|
166
|
+
referrerNoRewardText?: string;
|
|
167
|
+
ctaText?: string;
|
|
168
|
+
ctaNoRewardText?: string;
|
|
169
|
+
css?: string;
|
|
170
|
+
};
|
|
171
|
+
banner?: {
|
|
172
|
+
referralTitle?: string;
|
|
173
|
+
referralDescription?: string;
|
|
174
|
+
referralCta?: string;
|
|
175
|
+
inappTitle?: string;
|
|
176
|
+
inappDescription?: string;
|
|
177
|
+
inappCta?: string;
|
|
178
|
+
css?: string;
|
|
179
|
+
};
|
|
162
180
|
};
|
|
163
181
|
targetInteraction?: string; /** Already flattened: default + lang-specific merged into one record */
|
|
164
182
|
translations?: Record<string, string>; /** Global placement CSS (applied to modals/listener) */
|
|
@@ -604,6 +622,80 @@ type DisplayModalParamsType<T extends ModalStepTypes[]> = {
|
|
|
604
622
|
metadata?: ModalRpcMetadata;
|
|
605
623
|
};
|
|
606
624
|
//#endregion
|
|
625
|
+
//#region src/types/rpc/displaySharingPage.d.ts
|
|
626
|
+
/**
|
|
627
|
+
* Product information to display on the sharing page
|
|
628
|
+
* @group Sharing Page
|
|
629
|
+
*/
|
|
630
|
+
type SharingPageProduct = {
|
|
631
|
+
/**
|
|
632
|
+
* The product title / name
|
|
633
|
+
*/
|
|
634
|
+
title: string;
|
|
635
|
+
/**
|
|
636
|
+
* Optional product image URL
|
|
637
|
+
*/
|
|
638
|
+
imageUrl?: string;
|
|
639
|
+
};
|
|
640
|
+
/**
|
|
641
|
+
* Parameters to display the sharing page
|
|
642
|
+
* @group Sharing Page
|
|
643
|
+
* @group RPC Schema
|
|
644
|
+
*/
|
|
645
|
+
type DisplaySharingPageParamsType = {
|
|
646
|
+
/**
|
|
647
|
+
* Products to showcase on the sharing page
|
|
648
|
+
* If provided, they will be displayed in a product card section
|
|
649
|
+
*/
|
|
650
|
+
products?: SharingPageProduct[];
|
|
651
|
+
/**
|
|
652
|
+
* Optional link override for sharing
|
|
653
|
+
* If not provided, the sharing link will be generated from the current page URL + merchant context
|
|
654
|
+
*/
|
|
655
|
+
link?: string;
|
|
656
|
+
/**
|
|
657
|
+
* Optional metadata overrides for the sharing page
|
|
658
|
+
*/
|
|
659
|
+
metadata?: {
|
|
660
|
+
/**
|
|
661
|
+
* Logo override for the sharing page header
|
|
662
|
+
*/
|
|
663
|
+
logo?: string;
|
|
664
|
+
/**
|
|
665
|
+
* Link to the homepage of the calling website
|
|
666
|
+
*/
|
|
667
|
+
homepageLink?: string;
|
|
668
|
+
/**
|
|
669
|
+
* The target interaction behind this sharing page
|
|
670
|
+
*/
|
|
671
|
+
targetInteraction?: InteractionTypeKey;
|
|
672
|
+
/**
|
|
673
|
+
* i18n overrides for the sharing page
|
|
674
|
+
*/
|
|
675
|
+
i18n?: I18nConfig;
|
|
676
|
+
};
|
|
677
|
+
};
|
|
678
|
+
/**
|
|
679
|
+
* Result of the sharing page display
|
|
680
|
+
* @group Sharing Page
|
|
681
|
+
* @group RPC Schema
|
|
682
|
+
*/
|
|
683
|
+
type DisplaySharingPageResultType = {
|
|
684
|
+
/**
|
|
685
|
+
* The action the user took
|
|
686
|
+
* - "shared": User used the native share dialog
|
|
687
|
+
* - "copied": User copied the link to clipboard
|
|
688
|
+
* - "dismissed": User dismissed the sharing page without acting
|
|
689
|
+
*/
|
|
690
|
+
action: "shared" | "copied" | "dismissed";
|
|
691
|
+
/**
|
|
692
|
+
* The install URL for the Frak app
|
|
693
|
+
* Can be used as a fallback to redirect the user to the install page
|
|
694
|
+
* from the merchant's top-level page (e.g. via `window.location.href`)
|
|
695
|
+
*/
|
|
696
|
+
installUrl?: string;
|
|
697
|
+
};
|
|
698
|
+
//#endregion
|
|
607
699
|
//#region src/types/rpc/embedded/loggedIn.d.ts
|
|
608
700
|
/**
|
|
609
701
|
* The different type of action we can have on the embedded view (once the user is logged in)
|
|
@@ -841,6 +933,28 @@ type GetMerchantInformationReturnType = {
|
|
|
841
933
|
}[];
|
|
842
934
|
};
|
|
843
935
|
//#endregion
|
|
936
|
+
//#region src/types/rpc/userReferralStatus.d.ts
|
|
937
|
+
/**
|
|
938
|
+
* User referral status returned by `frak_getUserReferralStatus`.
|
|
939
|
+
*
|
|
940
|
+
* Generic referral context for the current user on a merchant.
|
|
941
|
+
* Used by components like `<frak-post-purchase>` and `<frak-referred-banner>`
|
|
942
|
+
* to adapt their display based on the user's referral relationship.
|
|
943
|
+
*
|
|
944
|
+
* Returns `null` when the user's identity cannot be resolved
|
|
945
|
+
* (e.g. no clientId and no wallet session).
|
|
946
|
+
*
|
|
947
|
+
* @group RPC Schema
|
|
948
|
+
*/
|
|
949
|
+
type UserReferralStatusType = {
|
|
950
|
+
/**
|
|
951
|
+
* Whether the user was referred to this merchant by someone else.
|
|
952
|
+
*
|
|
953
|
+
* `true` means a referral link exists where this user is the referee.
|
|
954
|
+
*/
|
|
955
|
+
isReferred: boolean;
|
|
956
|
+
};
|
|
957
|
+
//#endregion
|
|
844
958
|
//#region src/types/rpc/walletStatus.d.ts
|
|
845
959
|
/**
|
|
846
960
|
* RPC Response for the method `frak_listenToWalletStatus`
|
|
@@ -905,6 +1019,11 @@ type WalletNotConnected = {
|
|
|
905
1019
|
* - Params: [request: {@link DisplayEmbeddedWalletParamsType}, metadata: {@link FrakWalletSdkConfig}["metadata"], placement?: string]
|
|
906
1020
|
* - Returns: {@link DisplayEmbeddedWalletResultType}
|
|
907
1021
|
* - Response Type: promise (one-shot)
|
|
1022
|
+
*
|
|
1023
|
+
* #### frak_displaySharingPage
|
|
1024
|
+
* - Params: [request: {@link DisplaySharingPageParamsType}, configMetadata: {@link FrakWalletSdkConfig}["metadata"], placement?: string]
|
|
1025
|
+
* - Returns: {@link DisplaySharingPageResultType}
|
|
1026
|
+
* - Response Type: promise (one-shot)
|
|
908
1027
|
*/
|
|
909
1028
|
type IFrameRpcSchema = [
|
|
910
1029
|
/**
|
|
@@ -979,6 +1098,27 @@ type IFrameRpcSchema = [
|
|
|
979
1098
|
clientId?: string;
|
|
980
1099
|
}];
|
|
981
1100
|
ReturnType: undefined;
|
|
1101
|
+
},
|
|
1102
|
+
/**
|
|
1103
|
+
* Method to get the current user's referral status on this merchant.
|
|
1104
|
+
* Returns whether the user was referred (has a referral link as referee).
|
|
1105
|
+
* Returns null when the user's identity cannot be resolved.
|
|
1106
|
+
* This is a one-shot request.
|
|
1107
|
+
*/
|
|
1108
|
+
{
|
|
1109
|
+
Method: "frak_getUserReferralStatus";
|
|
1110
|
+
Parameters?: undefined;
|
|
1111
|
+
ReturnType: UserReferralStatusType | null;
|
|
1112
|
+
},
|
|
1113
|
+
/**
|
|
1114
|
+
* Method to display a sharing page with product info and sharing buttons
|
|
1115
|
+
* Resolves on first user action (share/copy) but the page stays visible
|
|
1116
|
+
* This is a one-shot request
|
|
1117
|
+
*/
|
|
1118
|
+
{
|
|
1119
|
+
Method: "frak_displaySharingPage";
|
|
1120
|
+
Parameters: [request: DisplaySharingPageParamsType, configMetadata: FrakWalletSdkConfig["metadata"], placement?: string];
|
|
1121
|
+
ReturnType: DisplaySharingPageResultType;
|
|
982
1122
|
}];
|
|
983
1123
|
//#endregion
|
|
984
1124
|
//#region src/types/transport.d.ts
|
|
@@ -1124,4 +1264,4 @@ declare const ssoPopupName = "frak-sso";
|
|
|
1124
1264
|
*/
|
|
1125
1265
|
declare function openSso(client: FrakClient, args: OpenSsoParamsType): Promise<OpenSsoReturnType>;
|
|
1126
1266
|
//#endregion
|
|
1127
|
-
export {
|
|
1267
|
+
export { ResolvedPlacement as $, ModalRpcMetadata as A, LoginModalStepType as B, EmbeddedViewActionReferred as C, DisplaySharingPageResultType as D, DisplaySharingPageParamsType as E, SendTransactionReturnType as F, SsoMetadata as G, OpenSsoReturnType as H, SendTransactionTxType as I, ModalStepMetadata as J, FinalActionType as K, SiweAuthenticateModalStepType as L, ModalRpcStepsResultType as M, ModalStepTypes as N, SharingPageProduct as O, SendTransactionModalStepType as P, MerchantConfigResponse as Q, SiweAuthenticateReturnType as R, LoggedOutEmbeddedView as S, LoggedInEmbeddedView as T, PrepareSsoParamsType as U, OpenSsoParamsType as V, PrepareSsoReturnType as W, IFrameLifecycleEvent as X, InteractionTypeKey as Y, ClientLifecycleEvent as Z, RewardTier as _, FrakContextV1 as a, Language as at, DisplayEmbeddedWalletParamsType as b, isV2Context as c, IFrameTransport as d, ResolvedSdkConfig as et, IFrameRpcSchema as f, GetMerchantInformationReturnType as g, EstimatedReward as h, FrakContext as i, I18nConfig as it, ModalRpcStepsInput as j, DisplayModalParamsType as k, FrakClient as l, UserReferralStatusType as m, ssoPopupFeatures as n, Currency as nt, FrakContextV2 as o, LocalizedI18nConfig as ot, WalletStatusReturnType as p, FinalModalStepType as q, ssoPopupName as r, FrakWalletSdkConfig as rt, isV1Context as s, openSso as t, SdkResolvedConfig as tt, FrakLifecycleEvent as u, TokenAmountType as v, EmbeddedViewActionSharing as w, DisplayEmbeddedWalletResultType as x, SendInteractionParamsType as y, SiweAuthenticationParams as z };
|