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'spublicUserscache 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
publicUserscache happened to hold whensyncFriends()ran.usernamemay be empty if the friend's public info hadn't been fetched yet — match byuserIdin 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]: unknownForward-compat for fields Snap adds to the public-info envelope.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
bitmojiPublicInfo? | BitmojiPublicInfo | Bitmoji avatar identifiers — see BitmojiPublicInfo. | api/friends/types.ts:157 |
creatorSubscriptionProductsInfo? | unknown | Creator-subscription products envelope; shape varies, kept untyped. | api/friends/types.ts:161 |
displayName? | string | Display name shown in the Snap UI. | api/friends/types.ts:145 |
isOfficial? | boolean | true for verified Snap-official accounts. | api/friends/types.ts:149 |
isPopular? | boolean | true for accounts Snap surfaces as popular (high follower count, public profile, etc.). | api/friends/types.ts:151 |
mutableUsername? | string | Current handle when the user has changed it (Snap retains the original username). | api/friends/types.ts:147 |
notFound? | true | Set only by IFriendsManager.getUsers when the server confirmed no record exists. | api/friends/types.ts:164 |
profileLogo? | unknown | Profile-logo envelope; shape varies, kept untyped. | api/friends/types.ts:159 |
profileTier? | number | Profile-tier int; semantics opaque (observed: 1 for typical accounts). | api/friends/types.ts:155 |
snapProId? | string | Snapchat+ subscription product id; empty string when not subscribed. | api/friends/types.ts:153 |
userId | string | Hyphenated UUID (string view of Snap's userId bytes). | api/friends/types.ts:140 |
username | string | Snap username (handle). May be empty when populated from a partial source. | api/friends/types.ts:142 |