mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00

* Permission (#1442) * Revert "lafAccount add pat & re request when token invalid (#76)" (#77) This reverts commit 83d85dfe37adcaef4833385ea52ee79fd84720be. * feat: add permission display in the team manager modal * feat: add permission i18n * feat: let team module acquire permission ablity * feat: add ownerPermission property into metaData * feat: team premission system * feat: extract the resourcePermission from resource schemas * fix: move enum definition to constant * feat: auth member permission handler, invite user * feat: permission manage * feat: adjust the style * feat: team card style - add a new icon * feat: team permission in guest mode * chore: change the type * chore: delete useless file * chore: delete useless code * feat: do not show owner in PermissionManage view * chore: fix style * fix: icon remove fill * feat: adjust the codes --------- Co-authored-by: Archer <545436317@qq.com> * perf: permission modal * lock --------- Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
54 lines
1.2 KiB
TypeScript
54 lines
1.2 KiB
TypeScript
import { PermissionValueType } from 'support/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 = {
|
|
teamId: string;
|
|
name?: string;
|
|
avatar?: string;
|
|
teamDomain?: string;
|
|
lafAccount?: null | LafAccountType;
|
|
};
|
|
|
|
/* ------------- member ----------- */
|
|
export type DelMemberProps = {
|
|
teamId: string;
|
|
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 = {
|
|
teamId: string;
|
|
memberIds: string[];
|
|
permission: PermissionValueType;
|
|
};
|