import { CrowdinApi , Pagination , PatchRequest , ResponseList , ResponseObject } from '../core' ; export class Teams extends CrowdinApi { param projectId param request addTeamToProject ( projectId , request ) { const url = `${ this . url }/projects/${ projectId }/teams` ; return this . post ( url , request , this . defaultConfig ( ) ) ; } param limit param offset listTeams ( limit ? , offset ? ) { const url = `${ this . url }/teams` ; return this . getList ( url , limit , offset ) ; } param request addTeam ( request ) { const url = `${ this . url }/teams` ; return this . post ( url , request , this . defaultConfig ( ) ) ; } param teamId getTeam ( teamId ) { const url = `${ this . url }/teams/${ teamId }` ; return this . get ( url , this . defaultConfig ( ) ) ; } param teamId deleteTeam ( teamId ) { const url = `${ this . url }/teams/${ teamId }` ; return this . delete ( url , this . defaultConfig ( ) ) ; } param teamId param request editTeam ( teamId , request ) { const url = `${ this . url }/teams/${ teamId }` ; return this . patch ( url , request , this . defaultConfig ( ) ) ; } param teamId param limit param offset teamMembersList ( teamId , limit ? , offset ? ) { const url = `${ this . url }/teams/${ teamId }/members` ; return this . getList ( url , limit , offset ) ; } param teamId param request addTeamMembers ( teamId , request ) { const url = `${ this . url }/teams/${ teamId }/members` ; return this . post ( url , request , this . defaultConfig ( ) ) ; } param teamId deleteAllTeamMembers ( teamId ) { const url = `${ this . url }/teams/${ teamId }/members` ; return this . delete ( url , this . defaultConfig ( ) ) ; } param teamId param memberId deleteTeamMember ( teamId , memberId ) { const url = `${ this . url }/teams/${ teamId }/members/${ memberId }` ; return this . delete ( url , this . defaultConfig ( ) ) ; } } export namespace TeamsModel { export interface AddTeamToProjectRequest { teamId : number ; accessToAllWorkflowSteps ? : boolean ; managerAccess ? : boolean ; permissions ? : any ; } export interface ProjectTeamResources { skipped : ProjectTeamResource ; added : ProjectTeamResource ; } export interface ProjectTeamResource { id : number ; hasManagerAccess : boolean ; hasAccessToAllWorkflowSteps : boolean ; permissions : any ; } export interface Team { id : number ; name : string ; totalMembers : number ; createdAt : string ; updatedAt : string ; } export interface AddTeamRequest { name : string ; } export interface TeamMember { id : number ; username : string ; firstName : string ; lastName : string ; avatarUrl : string ; addedAt : string ; } export interface AddTeamMembersRequest { userIds : number [ ] ; } export interface AddTeamMembersResponse { skipped : ResponseObject < TeamMember > [ ] ; added : ResponseObject < TeamMember > [ ] ; pagination : Pagination ; } }