Namespaces
user
Methods and types of the `user` namespace (`client.user` / `bot.user`).
Interfaces
FileData
Properties
PreferencesData
Properties
UpdateUserData
Fields accepted when updating the current user's profile.
Properties
| Property | Type |
|---|---|
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
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
| Parameter | Type | Description |
|---|---|---|
client | default | The NuramaClient instance. |
Returns
An object containing the user-related methods.
| Name | Type | Description |
|---|---|---|
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. |