snapcap
API ReferenceInterfaces

FriendsUser

Interface: FriendsUser

Defined in: api/friends/types.ts:138

A user surfaced from search / lookup / friends list. Mirrors the shape of Snap's GetSnapchatterPublicInfo response — every public field Snap returns is typed here, with the same camel-cased names.

Remarks

Field availability depends on the source of the record:

  • From IFriendsManager.getUsers (cache-hit or RPC) — the full envelope: displayName, mutableUsername, isOfficial, isPopular, snapProId, profileTier, bitmojiPublicInfo, profileLogo, creatorSubscriptionProductsInfo. Cache-only hits carry the subset the bundle's publicUsers cache stores (PublicUserRecord: username, mutableUsername, displayName); RPC hits carry everything Snap returned.
  • From IFriendsManager.search — only userId, username, displayName. The search index never returns the richer flags.
  • From IFriendsManager.list (via Friend) — populated from whatever the bundle's publicUsers cache happened to hold when syncFriends() ran. username may be empty if the friend's public info hadn't been fetched yet — match by userId in that case and call IFriendsManager.getUsers to backfill.

notFound is set ONLY by IFriendsManager.getUsers when the server explicitly returned no record for the requested userId — the account was deleted, blocked the caller, or never existed. It distinguishes "we asked, server said no" from "we just haven't fetched it yet" (the empty-username case). Never set by list() / search().

The [k: string]: unknown index keeps consumers forward-compatible with future Snap fields the SDK hasn't typed yet — read them defensively ((user as any).newField).

See

Extended by

Indexable

[k: string]: unknown

Forward-compat for fields Snap adds to the public-info envelope.

Properties

PropertyTypeDescriptionDefined in
bitmojiPublicInfo?BitmojiPublicInfoBitmoji avatar identifiers — see BitmojiPublicInfo.api/friends/types.ts:157
creatorSubscriptionProductsInfo?unknownCreator-subscription products envelope; shape varies, kept untyped.api/friends/types.ts:161
displayName?stringDisplay name shown in the Snap UI.api/friends/types.ts:145
isOfficial?booleantrue for verified Snap-official accounts.api/friends/types.ts:149
isPopular?booleantrue for accounts Snap surfaces as popular (high follower count, public profile, etc.).api/friends/types.ts:151
mutableUsername?stringCurrent handle when the user has changed it (Snap retains the original username).api/friends/types.ts:147
notFound?trueSet only by IFriendsManager.getUsers when the server confirmed no record exists.api/friends/types.ts:164
profileLogo?unknownProfile-logo envelope; shape varies, kept untyped.api/friends/types.ts:159
profileTier?numberProfile-tier int; semantics opaque (observed: 1 for typical accounts).api/friends/types.ts:155
snapProId?stringSnapchat+ subscription product id; empty string when not subscribed.api/friends/types.ts:153
userIdstringHyphenated UUID (string view of Snap's userId bytes).api/friends/types.ts:140
usernamestringSnap username (handle). May be empty when populated from a partial source.api/friends/types.ts:142

On this page