-
public final class AegisUserAegis.usernamespace — typed PII + per-channel opt-in setters that delegate toAegis.identify()with pre-login buffering. Parity port of libs/web-sdk/src/core/user-namespace.ts (web SDK 1.13.0).Pre-login
setXcalls accumulate inpendingTraitsand flush as a singleidentify()whenlogin()fires — avoids polluting the contact graph with anonymous-id-as-userId rows.Contract pinned by libs/mobile-sdk/tests/drift/user-namespace-contract.json.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumAegisUser.OptInChannelOpt-in channels mirror libs/web-sdk OptInChannel.
public classAegisUser.Companion
-
Method Summary
Modifier and Type Method Description final Unitlogin(String userId, Map<String, Object> traits)Authoritative identity write. final Unitlogout()Drops the current userId and any pending pre-login traits. final UnitsetAttribute(String key, Object value)final UnitsetAttributes(Map<String, Object> map)final UnitsetEmail(String email)final UnitsetPhone(String phone)final UnitsetHashedEmail(String sha256Hex)final UnitsetHashedPhone(String sha256Hex)final UnitsetBirthDate(String iso)final UnitsetOptIn(AegisUser.OptInChannel channel, Boolean granted)final UnitsetSecureToken(String token)final Map<String, Object>getPendingTraitsForTest()Test/inspection hook — returns a copy of the pending traits buffer. -
-
Method Detail
-
login
final Unit login(String userId, Map<String, Object> traits)
Authoritative identity write. Flushes any pending pre-login traits along with the supplied traits as a single identify() call.
-
logout
final Unit logout()
Drops the current userId and any pending pre-login traits. Does NOT emit a server-side logout event — that's a separate explicit
track().
-
setAttribute
final Unit setAttribute(String key, Object value)
-
setAttributes
final Unit setAttributes(Map<String, Object> map)
-
setHashedEmail
final Unit setHashedEmail(String sha256Hex)
-
setHashedPhone
final Unit setHashedPhone(String sha256Hex)
-
setBirthDate
final Unit setBirthDate(String iso)
-
setOptIn
final Unit setOptIn(AegisUser.OptInChannel channel, Boolean granted)
-
setSecureToken
final Unit setSecureToken(String token)
-
getPendingTraitsForTest
final Map<String, Object> getPendingTraitsForTest()
Test/inspection hook — returns a copy of the pending traits buffer.
-
-
-
-