Nurama Developers
Namespaces

user

Methods and types of the `user` namespace (`client.user` / `bot.user`).

Interfaces

FileData

Properties

PropertyType
checksumstring
namestring
sizeInMBnumber

PreferencesData

Properties

PropertyType
dailyTips?{ disabled?: boolean; lastShownDate?: string; }
dailyTips.disabled?boolean
dailyTips.lastShownDate?string
dateFormat?"european" | "american" | "iso"
dismissed?{ todos?: string[]; }
dismissed.todos?string[]
featureIntros?Record<string, string[]>
hide?string[]

UpdateUserData

Properties

PropertyType
allowOauthAutolink?boolean
color?string
company?string
displayName?string
email?string
firstName?string
lastName?string
middleName?string
password?string
userName?string

UserTodo

Properties

PropertyType
dismissibleboolean
idstring

Functions

default()

function default(client): {
  createAvatar: Promise<any>;
  deleteCurrentUser: Promise<void>;
  getSelf: Promise<PublicUser>;
  getTodos: Promise<{
     todos: UserTodo[];
  }>;
  getUser: Promise<PublicUser>;
  markSeen: Promise<User>;
  unmarkSeen: Promise<User>;
  updateAvatar: Promise<any>;
  updatePreferences: Promise<User>;
  updateSelf: Promise<User>;
};

Defines user-related methods for the NuramaClient.

Parameters

ParameterTypeDescription
clientdefaultThe NuramaClient instance.

Returns

An object containing the user-related methods.

NameTypeDescription
createAvatar()(fileData) => Promise<any>Creates a new avatar for the user.
deleteCurrentUser()() => Promise<void>Deletes the current user. Requires authentication.
getSelf()() => Promise<PublicUser>Retrieves the current user's profile. Requires authentication. Throws If no user ID is found in the token.
getTodos()() => Promise<{ todos: UserTodo[]; }>Get the current user's active site-level Todos for the onboarding drawer. Returns only todos whose completion condition isn't met and (for dismissibles) that the user hasn't opted out of. Server computes from live state — no caching on the server side, so a fresh call always reflects ground truth.
getUser()(userId) => Promise<PublicUser>Retrieves the public profile of a specific user. Requires authentication.
markSeen()(element) => Promise<User>Record that the current user has seen a one-time UI element (welcome video, tutorial coachmark). Idempotent. Returns the updated user.
unmarkSeen()(elements?) => Promise<User>Remove one-time UI elements from the current user's hasSeen so they display again. Pass specific element keys, or omit to clear ALL. Returns the updated user.
updateAvatar()(fileData) => Promise<any>Updates the user's avatar.
updatePreferences()(preferenceData) => Promise<User>Updates the user's preferences.
updateSelf()(updateData) => Promise<User>Updates the logged-in user's profile. Requires authentication. At least one field must be provided.

On this page