diff --git a/app/definitions/rest/v1/teams.ts b/app/definitions/rest/v1/teams.ts index 29047149d..cc6bfd620 100644 --- a/app/definitions/rest/v1/teams.ts +++ b/app/definitions/rest/v1/teams.ts @@ -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 }; + }; }; diff --git a/app/lib/rocketchat/services/restApi.ts b/app/lib/rocketchat/services/restApi.ts index 19217ef12..b5947efae 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -148,7 +148,7 @@ export const createTeam = ({ readOnly: boolean; broadcast: boolean; encrypted: boolean; -}): any => { +}) => { const params = { name, users, @@ -162,8 +162,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 =>