Files
FastGPT/packages/global/support/user/team/controller.d.ts
Archer 1e48922bc9 Context extract support value type (#1620)
* perf: chat box components

* perf: chatbox context

* feat: extract support value type

* workflow performance

* update doc

* feat: error response

* feat: error response

* oauth sort

* perf: logo

* fix: update laf account

* perf: team permission api

* update type
2024-05-28 23:33:05 +08:00

53 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 = {
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;
};