user-login-event.dto.ts 521 B

12345678910111213141516
  1. // libs/common/src/events/user-login-event.dto.ts
  2. export interface UserLoginEventPayload {
  3. uid: string; // device ID
  4. ip: string; // login IP
  5. userAgent?: string; // optional, but useful
  6. appVersion?: string; // optional
  7. os?: string; // iOS / Android / Browser / Web
  8. channelId?: string; // required channel ID
  9. machine?: string; // required machine model
  10. tokenId?: string; // JWT jti or session token ID (optional for now)
  11. // epoch millis; will be stored as BigInt in Mongo
  12. loginAt: number | bigint;
  13. }