UNPKG

cnpmcore

Version:

Private NPM Registry for Enterprise

59 lines (58 loc) 2 kB
import { Context } from 'egg'; import { AbstractController } from './AbstractController.ts'; export declare class TeamController extends AbstractController { private readonly orgService; private readonly teamService; private readonly orgRepository; private readonly teamRepository; private isAllowScopeOrg; private findOrg; private requireOrgWriteAccess; private requireTeamWriteAccess; createTeam(ctx: Context, orgName: string, body: { name: string; description?: string; }): Promise<{ ok: boolean; }>; listTeams(ctx: Context, orgName: string): Promise<string[]>; showTeam(ctx: Context, orgName: string, teamName: string): Promise<{ name: string; description: string; created: Date; }>; removeTeam(ctx: Context, orgName: string, teamName: string): Promise<{ ok: boolean; }>; listTeamMembers(ctx: Context, orgName: string, teamName: string): Promise<string[]>; listTeamMembersWithRole(ctx: Context, orgName: string, teamName: string): Promise<{ user: string; role: string; }[]>; updateTeamMemberRole(ctx: Context, orgName: string, teamName: string, username: string, body: { role: string; }): Promise<{ ok: boolean; }>; addTeamMember(ctx: Context, orgName: string, teamName: string, body: { user: string; }): Promise<{ ok: boolean; }>; removeTeamMember(ctx: Context, orgName: string, teamName: string, body: { user: string; }): Promise<{ ok: boolean; }>; listTeamPackages(ctx: Context, orgName: string, teamName: string): Promise<Record<string, string>>; grantPackageAccess(ctx: Context, orgName: string, teamName: string, body: { package: string; }): Promise<{ ok: boolean; }>; revokePackageAccess(ctx: Context, orgName: string, teamName: string, body: { package: string; }): Promise<{ ok: boolean; }>; }