mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-23 10:51:02 +00:00
feat: add local notifications management and UI integration
This commit is contained in:
@@ -144,6 +144,10 @@ export interface FriendRequestSync {
|
||||
friendRequestCount: number;
|
||||
}
|
||||
|
||||
export interface NotificationSync {
|
||||
notificationCount: number;
|
||||
}
|
||||
|
||||
export interface FriendRequest {
|
||||
id: string;
|
||||
displayName: string;
|
||||
@@ -312,6 +316,58 @@ export interface GameArtifact {
|
||||
isFrozen: boolean;
|
||||
}
|
||||
|
||||
export type NotificationType =
|
||||
| "FRIEND_REQUEST_RECEIVED"
|
||||
| "FRIEND_REQUEST_ACCEPTED"
|
||||
| "BADGE_RECEIVED"
|
||||
| "REVIEW_UPVOTE";
|
||||
|
||||
export type LocalNotificationType =
|
||||
| "EXTRACTION_COMPLETE"
|
||||
| "DOWNLOAD_COMPLETE"
|
||||
| "UPDATE_AVAILABLE"
|
||||
| "ACHIEVEMENT_UNLOCKED";
|
||||
|
||||
export interface Notification {
|
||||
id: string;
|
||||
type: NotificationType;
|
||||
variables: Record<string, string>;
|
||||
pictureUrl: string | null;
|
||||
url: string | null;
|
||||
isRead: boolean;
|
||||
priority: number;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface LocalNotification {
|
||||
id: string;
|
||||
type: LocalNotificationType;
|
||||
title: string;
|
||||
description: string;
|
||||
pictureUrl: string | null;
|
||||
url: string | null;
|
||||
isRead: boolean;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export type MergedNotification =
|
||||
| (Notification & { source: "api" })
|
||||
| (LocalNotification & { source: "local" });
|
||||
|
||||
export interface NotificationsResponse {
|
||||
notifications: Notification[];
|
||||
pagination: {
|
||||
total: number;
|
||||
take: number;
|
||||
skip: number;
|
||||
hasMore: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface NotificationCountResponse {
|
||||
count: number;
|
||||
}
|
||||
|
||||
export interface ComparedAchievements {
|
||||
achievementsPointsTotal: number;
|
||||
owner: {
|
||||
|
||||
Reference in New Issue
Block a user