-
public final class PrefetchBundleClientPrefetchBundleClient — single-round-trip SDK init for in-app state.
Mirrors the TypeScript PrefetchBundleClient (libs/web-sdk/src/core/ prefetch-bundle-client.ts). Fetches /v1/sdk/prefetch-bundle once at init and every pollIntervalMs thereafter; the armed-campaigns list
inbox first page land in memory so trigger-time rendering is zero-latency.
Identity mutations invalidate the ETag so the next fetch returns a fresh payload bound to the new identity instead of a 304.
SCAFFOLD NOTE: Compiles + matches the wire contract. Not yet wired into AegisInAppManager and not exercised on device. Production use needs:
Instrumentation test verifying the 5-min poll fires
Integration with AegisInAppManager so armed campaigns surface at trigger time instead of via the legacy /v1/in-app/active path
Link to AegisInbox so inbox.invalidate events call refresh()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classPrefetchBundleClient.BundleCampaignpublic final classPrefetchBundleClient.BundleInboxEntrypublic final classPrefetchBundleClient.BundleInboxpublic final classPrefetchBundleClient.Bundlepublic interfacePrefetchBundleClient.Listener
-
Method Summary
Modifier and Type Method Description final Unitstart()final Unitstop()final PrefetchBundleClient.BundlegetBundle()final List<PrefetchBundleClient.BundleCampaign>getCampaigns()final PrefetchBundleClient.BundleInboxgetInbox()final Function0<Unit>addListener(PrefetchBundleClient.Listener listener)final UnitupdateIdentity(String contactId, String userId, String organizationId, String propertyId)final <ERROR CLASS>refresh()final Unitdestroy()-
-
Method Detail
-
getBundle
final PrefetchBundleClient.Bundle getBundle()
-
getCampaigns
final List<PrefetchBundleClient.BundleCampaign> getCampaigns()
-
getInbox
final PrefetchBundleClient.BundleInbox getInbox()
-
addListener
final Function0<Unit> addListener(PrefetchBundleClient.Listener listener)
-
updateIdentity
final Unit updateIdentity(String contactId, String userId, String organizationId, String propertyId)
-
refresh
final <ERROR CLASS> refresh()
-
-
-
-