Chore: Migrate REST API - addRoomsToTeam to TS (#3797)

* Migrate REST API `teams.addRooms` to TypeScript
This commit is contained in:
Gerzon Z 2022-03-02 16:28:58 -04:00 committed by GitHub
parent 1da4f01dcb
commit 270f6e0fef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -5,6 +5,9 @@ export type TeamsEndpoints = {
'teams.removeRoom': { 'teams.removeRoom': {
POST: (params: { roomId: string; teamId: string }) => { room: IRoom }; POST: (params: { roomId: string; teamId: string }) => { room: IRoom };
}; };
'teams.addRooms': {
POST: (params: { teamId: string; rooms: string[] }) => { rooms: IRoom[] };
};
'teams.create': { 'teams.create': {
POST: (params: { POST: (params: {
name: string; name: string;

View File

@ -164,10 +164,8 @@ export const createTeam = ({
// RC 3.13.0 // RC 3.13.0
return sdk.post('teams.create', params); return sdk.post('teams.create', params);
}; };
export const addRoomsToTeam = ({ teamId, rooms }: { teamId: string; rooms: string[] }): any => export const addRoomsToTeam = ({ teamId, rooms }: { teamId: string; rooms: string[] }) =>
// RC 3.13.0 // RC 3.13.0
// TODO: missing definitions from server
// @ts-ignore
sdk.post('teams.addRooms', { teamId, rooms }); sdk.post('teams.addRooms', { teamId, rooms });
export const removeTeamRoom = ({ roomId, teamId }: { roomId: string; teamId: string }) => export const removeTeamRoom = ({ roomId, teamId }: { roomId: string; teamId: string }) =>