import type { DateFormatDescriptor, LocaleDescriptor, TimeZoneDescriptor } from "./Settings"; import type { UserGroup } from "./UserGroup"; import type { EntityBase } from "./Entity"; import type { Issue } from "./Issue"; import type { Tag } from "./Tag"; export type User = EntityBase<"User"> & { login: string; fullName: string; email: string | null; ringId: string | null; guest: boolean; online: boolean; banned: boolean; banBadge: string | null; isEmailVerified: boolean; canReadProfile: boolean; isLocked: boolean; userType: UserType; tags: Tag[]; savedQueries: SavedQuery[]; avatarUrl: string; profiles: UserProfiles; }; export type UserType = EntityBase<"UserType">; export type Reaction = EntityBase<"Reaction"> & { author: User | null; reaction: string | null; }; export type SavedQuery = EntityBase<"SavedQuery"> & { query: string | null; issues: Issue[]; readSharingSettings: WatchFolderSharingSettings; updateSharingSettings: WatchFolderSharingSettings; owner: User | null; name: string | null; }; export type WatchFolderSharingSettings = EntityBase<"WatchFolderSharingSettings"> & { permittedGroups: UserGroup[]; permittedUsers: User[]; }; export type UserProfiles = EntityBase<"UserProfiles"> & { general: GeneralUserProfile; notifications: NotificationsUserProfile; timetracking: TimeTrackingUserProfile; }; export type GeneralUserProfile = EntityBase<"GeneralUserProfile"> & { dateFieldFormat: DateFormatDescriptor; timezone: TimeZoneDescriptor; locale: LocaleDescriptor; }; export type NotificationsUserProfile = EntityBase<"NotificationsUserProfile"> & { notifyOnOwnChanges: boolean; emailNotificationsEnabled: boolean; mentionNotificationsEnabled: boolean; duplicateClusterNotificationsEnabled: boolean; mailboxIntegrationNotificationsEnabled: boolean; usePlainTextEmails: boolean; autoWatchOnComment: boolean; autoWatchOnCreate: boolean; autoWatchOnVote: boolean; autoWatchOnUpdate: boolean; }; export type TimeTrackingUserProfile = EntityBase<"TimeTrackingUserProfile"> & { periodFormat: PeriodFieldFormat; }; export type PeriodFieldFormat = EntityBase<"PeriodFieldFormat"> & { id: "FULL" | "DAYS_HOURS_MINUTES" | "HOURS_MINUTES" | "MINUTES"; };