cnpmcore
Version:
Private NPM Registry for Enterprise
36 lines (35 loc) • 1.09 kB
TypeScript
import { Context } from 'egg';
import { AbstractController } from './AbstractController.ts';
export declare class OrgController extends AbstractController {
private readonly orgService;
private readonly teamRepository;
createOrg(ctx: Context, body: {
name: string;
description?: string;
}): Promise<{
ok: boolean;
}>;
showOrg(ctx: Context, orgName: string): Promise<{
name: string;
description: string;
created: Date;
}>;
removeOrg(ctx: Context, orgName: string): Promise<{
ok: boolean;
}>;
listMembers(ctx: Context, orgName: string): Promise<Record<string, string>>;
addMember(ctx: Context, orgName: string, body: {
user: string;
role?: 'owner' | 'member';
}): Promise<{
ok: boolean;
}>;
removeMember(ctx: Context, orgName: string, username: string): Promise<{
ok: boolean;
}>;
listUserTeams(ctx: Context, orgName: string, username: string): Promise<{
name: string;
description: string;
role: string;
}[]>;
}