🚨 fix: update TypeScript type for decodeJWT

This commit is contained in:
2026-02-13 19:38:16 +07:00
parent 08125dcb11
commit 588ac49e01

View File

@ -1,16 +1,7 @@
export interface JWTAuthToken { export interface JWTAuthToken {
id: string; id: string;
isAuthenticated: boolean; isAuthenticated: boolean;
userId: string;
deviceType: string;
deviceOs: string;
deviceIp: string;
isOnline: boolean;
lastOnline: Date;
validUntil: Date; validUntil: Date;
deletedAt: null;
createdAt: Date;
updatedAt: Date;
user: User; user: User;
iat: number; iat: number;
exp: number; exp: number;
@ -19,44 +10,21 @@ export interface JWTAuthToken {
interface User { interface User {
id: string; id: string;
name: string; name: string;
username: string;
email: string; email: string;
username: string;
avatar: string;
birthDate: null; birthDate: null;
gender: null;
phoneCC: null;
phoneNumber: null;
bioProfile: null; bioProfile: null;
profilePicture: null; preference: Preference;
commentPicture: null;
preferenceId: null;
verifiedAt: null;
disabledAt: null;
deletedAt: null;
createdAt: Date;
updatedAt: Date;
roles: Role[];
} }
interface Role { interface Preference {
id: string; id: string;
name: string; userId: string;
primaryColor: string; langPreference: null;
secondaryColor: string; adultFiltering: string;
pictureImage: string; adultAlert: string;
badgeImage: null; videoQuality: string;
isSuperadmin: boolean; serviceDefaultId: null;
canEditMedia: boolean; hideContries: any[];
canManageMedia: boolean;
canEditEpisodes: boolean;
canManageEpisodes: boolean;
canEditComment: boolean;
canManageComment: boolean;
canEditUser: boolean;
canManageUser: boolean;
canEditSystem: boolean;
canManageSystem: boolean;
createdBy: string;
deletedAt: null;
createdAt: Date;
updatedAt: Date;
} }