Nurama Developers
Namespaces

user

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

Interfaces

FileData

Properties

PropertyType
checksumstring
namestring
sizeInMBnumber

PreferencesData

Properties

PropertyTypeDescription
dailyTips?{ disabled?: boolean; lastShownDate?: string; }Daily-tips carousel state. disabled opts out entirely; lastShownDate (local YYYY-MM-DD) gates the once-per-day rule cumulatively across workspaces and devices. Merged one level deep by the server.
dailyTips.disabled?boolean-
dailyTips.lastShownDate?string-
dateFormat?"european" | "american" | "iso"Preferred date display format. Seeded at registration from the registrant's country (European unless month-first, e.g. the US → american); European is the fallback when unset. User-overridable, incl. ISO (YYYY-MM-DD).
dismissed?{ todos?: string[]; }Per-user UX dismissals — anything the user has explicitly opted out of seeing again. The server merges this object one level deep, so a write to one dismissed.* key preserves its siblings. For each inner array the server treats the value as the full list — callers should merge the new id into the existing array before sending.
dismissed.todos?string[]-
featureIntros?Record<string, string[]>Per-project feature-intro tutorials the user has seen, keyed by project id. Merged one level deep by the server.
hide?string[]-

UpdateUserData

Fields accepted when updating the current user's profile.

Properties

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

UserTodo

Structural shape only — the response carries no display strings. Map id to your own localized title, description and action label; the API stays language-agnostic.

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