IUser interface
Home > @cbnsndwch/zrocket-contracts > IUser
IUser interface
Represents a user entity in the chat system.
IEntityBase - Provides base entity properties like id IHasCreatedAt - Provides creation timestamp functionality
This interface defines the structure for a user object containing personal information, contact details, presence status, and user preferences.
Signature:
interface IUser extends IEntityBase, IHasCreatedAt, IHasName, IHasUsernameExtends: IEntityBase, IHasCreatedAt, IHasName, IHasUsername
Example
const user: IUser = {
id: 'user123',
email: 'john.doe@example.com',
name: 'John Doe',
username: 'johndoe',
active: true,
presence: UserPresenceStatus.ONLINE,
profile: {},
createdAt: new Date()
};Properties
Property
Modifiers
Type
Description
boolean
Whether the user's profile is currently active (enabled) in the system.
string[]
(Optional) The user's additional email addresses.
string
(Optional) The URL of the user's avatar image.
string
(Optional) A short text bio or description of the user.
(Optional) Default presence status of the user.
string
(Optional) The default room that the user has set for quick access.
string
The user's preferred email address.
(Optional) If the user signed up using an external provider, this field contains the user's id on that provider.
The format is <providerId>/<userId>, e.g. google/1234567890 where google is the provider id and 1234567890 is the user's Google Id.
Dict
(Optional) User preferences stored as a dictionary.
(Optional) Current presence status of the user.
string
(Optional) Text that describes the user's current presence status.
Dict
Additional user profile information stored as a dictionary.
How was this page?