Files
FastGPT/packages/global/support/user/team/controller.d.ts
Archer 19c8a06d51 Permission (#1687)
Co-authored-by: Archer <545436317@qq.com>
Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
2024-06-04 17:52:00 +08:00

51 lines
1.2 KiB
TypeScript

import { PermissionValueType } from '../../permission/type';
import { TeamMemberRoleEnum } from './constant';
import { LafAccountType, TeamMemberSchema } from './type';
export type AuthTeamRoleProps = {
teamId: string;
tmbId: string;
role?: `${TeamMemberRoleEnum}`;
};
export type CreateTeamProps = {
name: string;
avatar?: string;
defaultTeam?: boolean;
lafAccount?: LafAccountType;
};
export type UpdateTeamProps = {
name?: string;
avatar?: string;
teamDomain?: string;
lafAccount?: null | LafAccountType;
};
/* ------------- member ----------- */
export type DelMemberProps = {
memberId: string;
};
export type UpdateTeamMemberProps = {
teamId: string;
memberId: string;
role?: TeamMemberSchema['role'];
status?: TeamMemberSchema['status'];
};
export type InviteMemberProps = {
teamId: string;
usernames: string[];
role: `${TeamMemberRoleEnum}`;
};
export type UpdateInviteProps = {
tmbId: string;
status: TeamMemberSchema['status'];
};
export type InviteMemberResponse = Record<
'invite' | 'inValid' | 'inTeam',
{ username: string; userId: string }[]
>;
export type UpdateTeamMemberPermissionProps = {
memberIds: string[];
permission: PermissionValueType;
};