feat: implement Live Activity registration service and enhance notifications handling

This commit is contained in:
2026-05-24 23:53:40 +07:00
parent d991d06f17
commit 802d32e9a0
13 changed files with 379 additions and 154 deletions
@@ -9,7 +9,15 @@ actor NotificationsAPIService {
// MARK: - Notifications
func getNotifications(limit: Int = 50, offset: Int = 0, unreadOnly: Bool = false, scope: String? = nil) async throws -> NotificationsPage {
try await client.request(.getNotifications(limit: limit, offset: offset, unreadOnly: unreadOnly, scope: scope))
let (list, pagination): (NotificationsList, Pagination) = try await client.requestPaginated(
.getNotifications(limit: limit, offset: offset, unreadOnly: unreadOnly, scope: scope)
)
return NotificationsPage(
notifications: list.notifications,
unreadCount: list.unreadCount,
total: pagination.total,
hasMore: pagination.hasMore
)
}
func markAsRead(id: UUID) async throws {