aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Teams/ITeamManager.php
blob: 144a141f93eb74e2a8a34c0815613a55d038eed1 (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
<?php
/**
 * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

namespace OCP\Teams;

/**
 * @since 29.0.0
 */
interface ITeamManager {
	/**
	 * Get all providers that have registered as a team resource provider
	 *
	 * @return ITeamResourceProvider[]
	 * @since 29.0.0
	 */
	public function getProviders(): array;

	/**
	 * Get a specific team resource provider by its id
	 *
	 * @since 29.0.0
	 */
	public function getProvider(string $providerId): ITeamResourceProvider;

	/**
	 * Returns all team resources for a given team and user
	 *
	 * @return list<TeamResource>
	 * @since 29.0.0
	 */
	public function getSharedWith(string $teamId, string $userId): array;

	/**
	 * Returns all teams for a given resource and user
	 *
	 * @since 29.0.0
	 */
	public function getTeamsForResource(string $providerId, string $resourceId, string $userId): array;
}