2022-03-08 16:25:27 +00:00
|
|
|
import { IServerRoom } from '../../IRoom';
|
2022-03-03 02:22:59 +00:00
|
|
|
import { IServerTeamUpdateRoom, ITeam, TEAM_TYPE } from '../../ITeam';
|
2022-03-08 17:59:17 +00:00
|
|
|
import { PaginatedResult } from '../helpers/PaginatedResult';
|
2022-02-14 16:20:29 +00:00
|
|
|
|
|
|
|
export type TeamsEndpoints = {
|
|
|
|
'teams.removeRoom': {
|
2022-03-08 16:25:27 +00:00
|
|
|
POST: (params: { roomId: string; teamId: string }) => { room: IServerRoom };
|
2022-02-14 16:20:29 +00:00
|
|
|
};
|
2022-03-03 04:58:14 +00:00
|
|
|
'teams.listRoomsOfUser': {
|
2022-03-08 17:59:17 +00:00
|
|
|
GET: (params: { teamId: string; userId: string }) => PaginatedResult<{ rooms: IServerRoom[] }>;
|
2022-03-03 04:58:14 +00:00
|
|
|
};
|
2022-03-03 02:22:59 +00:00
|
|
|
'teams.updateRoom': {
|
|
|
|
POST: (params: { roomId: string; isDefault: boolean }) => { room: IServerTeamUpdateRoom };
|
|
|
|
};
|
2022-03-02 21:29:30 +00:00
|
|
|
'teams.convertToChannel': {
|
|
|
|
POST: (params: { teamId: string; roomsToRemove?: string[] }) => {};
|
|
|
|
};
|
2022-03-02 20:39:04 +00:00
|
|
|
'teams.removeMember': {
|
|
|
|
POST: (params: { teamId: string; userId: string; rooms?: string[] }) => {};
|
|
|
|
};
|
2022-03-02 20:28:58 +00:00
|
|
|
'teams.addRooms': {
|
2022-03-08 16:25:27 +00:00
|
|
|
POST: (params: { teamId: string; rooms: string[] }) => { rooms: IServerRoom[] };
|
2022-03-02 20:28:58 +00:00
|
|
|
};
|
2022-03-02 20:17:42 +00:00
|
|
|
'teams.create': {
|
|
|
|
POST: (params: {
|
|
|
|
name: string;
|
|
|
|
users: string[];
|
|
|
|
type: TEAM_TYPE;
|
|
|
|
room: { readOnly: boolean; extraData: { broadcast: boolean; encrypted: boolean } };
|
|
|
|
}) => { team: ITeam };
|
|
|
|
};
|
2022-03-08 17:59:17 +00:00
|
|
|
'teams.listRooms': {
|
|
|
|
GET: (params: {
|
|
|
|
teamId: string;
|
|
|
|
count: number;
|
|
|
|
offset: number;
|
|
|
|
type: string;
|
|
|
|
filter?: any;
|
|
|
|
}) => PaginatedResult<{ rooms: IServerTeamUpdateRoom[] }>;
|
|
|
|
};
|
2022-02-14 16:20:29 +00:00
|
|
|
};
|