UNPKG

modrinthjs

Version:
68 lines (67 loc) 2.5 kB
import type { ModifyTeamMemberBody } from '../models/ModifyTeamMemberBody'; import type { TeamMember } from '../models/TeamMember'; import type { UserIdentifier } from '../models/UserIdentifier'; import type { CancelablePromise } from '../core/CancelablePromise'; export declare class TeamsService { /** * Get a project's team members * @param idSlug The ID or slug of the project * @returns TeamMember Expected response to a valid request * @throws ApiError */ static getProjectTeamMembers(idSlug: string): CancelablePromise<Array<TeamMember>>; /** * Get a team's members * @param id The ID of the team * @returns TeamMember Expected response to a valid request * @throws ApiError */ static getTeamMembers(id: string): CancelablePromise<Array<TeamMember>>; /** * Add a user to a team * @param id The ID of the team * @param requestBody User to be added (must be the ID, usernames cannot be used here) * @returns void * @throws ApiError */ static addTeamMember(id: string, requestBody?: UserIdentifier): CancelablePromise<void>; /** * Get the members of multiple teams * @param ids The IDs of the teams * @returns TeamMember Expected response to a valid request * @throws ApiError */ static getTeams(ids: string): CancelablePromise<Array<Array<TeamMember>>>; /** * Join a team * @param id The ID of the team * @returns void * @throws ApiError */ static joinTeam(id: string): CancelablePromise<void>; /** * Modify a team member's information * @param id The ID of the team * @param idUsername The ID or username of the user * @param requestBody Contents to be modified * @returns void * @throws ApiError */ static modifyTeamMember(id: string, idUsername: string, requestBody?: ModifyTeamMemberBody): CancelablePromise<void>; /** * Remove a member from a team * @param id The ID of the team * @param idUsername The ID or username of the user * @returns void * @throws ApiError */ static deleteTeamMember(id: string, idUsername: string): CancelablePromise<void>; /** * Transfer team's ownership to another user * @param id The ID of the team * @param requestBody New owner's ID * @returns void * @throws ApiError */ static transferTeamOwnership(id: string, requestBody?: UserIdentifier): CancelablePromise<void>; }