forked from ezsystems/ezpublish-api
/
NotificationService.php
66 lines (55 loc) · 1.92 KB
/
NotificationService.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
namespace eZ\Publish\API\Repository;
use eZ\Publish\API\Repository\Values\Notification\CreateStruct;
use eZ\Publish\API\Repository\Values\Notification\Notification;
use eZ\Publish\API\Repository\Values\Notification\NotificationList;
interface NotificationService
{
/**
* Get currently logged user notifications.
* @param int $offset
* @param int $limit
*
* @return \eZ\Publish\API\Repository\Values\Notification\NotificationList
*/
public function loadNotifications(int $offset, int $limit): NotificationList;
/**
* @param int $notificationId
*
* @return \eZ\Publish\API\Repository\Values\Notification\Notification
*/
public function getNotification(int $notificationId): Notification;
/**
* Mark notification as read so it no longer bother the user.
*
* @param \eZ\Publish\API\Repository\Values\Notification\Notification $notification
*/
public function markNotificationAsRead(Notification $notification): void;
/**
* Get count of unread users notifications.
*
* @return int
*/
public function getPendingNotificationCount(): int;
/**
* Get count of total users notifications.
*
* @return int
*/
public function getNotificationCount(): int;
/**
* @param \eZ\Publish\API\Repository\Values\Notification\Notification $notification
*/
public function deleteNotification(Notification $notification): void;
/**
* @param \eZ\Publish\API\Repository\Values\Notification\CreateStruct $createStruct
*
* @return \eZ\Publish\API\Repository\Values\Notification\Notification
*/
public function createNotification(CreateStruct $createStruct): Notification;
}