aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_status/lib/ResponseDefinitions.php
blob: 82f606dd301ee1759c6296ff03dd72e3730ce4cc (plain)
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
<?php

declare(strict_types=1);

/**
 * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

namespace OCA\UserStatus;

/**
 * @psalm-type UserStatusClearAtTimeType = "day"|"week"
 *
 * @psalm-type UserStatusClearAt = array{
 *     type: "period"|"end-of",
 *     time: int|UserStatusClearAtTimeType,
 * }
 *
 * @psalm-type UserStatusPredefined = array{
 *     id: string,
 *     icon: string,
 *     message: string,
 *     clearAt: ?UserStatusClearAt,
 * }
 *
 * @psalm-type UserStatusType = "online"|"away"|"dnd"|"busy"|"offline"|"invisible"
 *
 * @psalm-type UserStatusPublic = array{
 *     userId: string,
 *     message: ?string,
 *     icon: ?string,
 *     clearAt: ?int,
 *     status: UserStatusType,
 * }
 *
 * @psalm-type UserStatusPrivate = UserStatusPublic&array{
 *     messageId: ?string,
 *     messageIsPredefined: bool,
 *     statusIsUserDefined: bool,
 * }
 */
class ResponseDefinitions {
}