Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/definitions/rest/v1/teams.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
import { IRoom } from '../../IRoom';
import { ITeam, TEAM_TYPE } from '../../ITeam';

export type TeamsEndpoints = {
'teams.removeRoom': {
POST: (params: { roomId: string; teamId: string }) => { room: IRoom };
};
'teams.create': {
POST: (params: {
name: string;
users: string[];
type: TEAM_TYPE;
room: { readOnly: boolean; extraData: { broadcast: boolean; encrypted: boolean } };
}) => { team: ITeam };
};
};
4 changes: 1 addition & 3 deletions app/lib/rocketchat/services/restApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const createTeam = ({
readOnly: boolean;
broadcast: boolean;
encrypted: boolean;
}): any => {
}) => {
const params = {
name,
users,
Expand All @@ -167,8 +167,6 @@ export const createTeam = ({
}
};
// RC 3.13.0
// TODO: missing definitions from server
// @ts-ignore
return sdk.post('teams.create', params);
};
export const addRoomsToTeam = ({ teamId, rooms }: { teamId: string; rooms: string[] }): any =>
Expand Down