refactor(act-center): move activity center functions to the new backend (#131)

This commit is contained in:
Jonathan Rainville 2021-12-13 09:18:44 -05:00 committed by saledjenic
parent 81aed1a302
commit 0e2d98da80
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
import json
import core, utils
import response_type
export response_type
proc rpcActivityCenterNotifications*(cursorVal: JsonNode, limit: int): RpcResponse[JsonNode] {.raises: [Exception].} =
callPrivateRPC("activityCenterNotifications".prefix, %* [cursorVal, limit])
proc markAllActivityCenterNotificationsRead*(): RpcResponse[JsonNode] {.raises: [Exception].} =
callPrivateRPC("markAllActivityCenterNotificationsRead".prefix, %*[])
proc markActivityCenterNotificationsRead*(ids: seq[string]): RpcResponse[JsonNode] {.raises: [Exception].} =
callPrivateRPC("markActivityCenterNotificationsRead".prefix, %*[ids])
proc markActivityCenterNotificationsUnread*(ids: seq[string]): RpcResponse[JsonNode] {.raises: [Exception].} =
callPrivateRPC("markActivityCenterNotificationsUnread".prefix, %*[ids])
proc acceptActivityCenterNotifications*(ids: seq[string]): RpcResponse[JsonNode] {.raises: [Exception].} =
callPrivateRPC("acceptActivityCenterNotifications".prefix, %*[ids])
proc dismissActivityCenterNotifications*(ids: seq[string]): RpcResponse[JsonNode] {.raises: [Exception].} =
result = callPrivateRPC("dismissActivityCenterNotifications".prefix, %*[ids])
proc unreadActivityCenterNotificationsCount*(): RpcResponse[JsonNode] {.raises: [Exception].} =
callPrivateRPC("unreadActivityCenterNotificationsCount".prefix, %*[])