mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00

* feat: team permission refine (#4402) * chore: team permission extend * feat: manage team permission * chore: api auth * fix: i18n * feat: add initv493 * fix: test, org auth manager * test: app test for refined permission * update init sh * fix: add/remove manage permission (#4427) * fix: add/remove manage permission * fix: github action fastgpt-test * fix: mock create model * fix: team write permission * fix: ts * account permission --------- Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
31 lines
681 B
TypeScript
31 lines
681 B
TypeScript
import { RequireAtLeastOne, RequireOnlyOne } from '../../common/type/utils';
|
|
import { Permission } from './controller';
|
|
import { PermissionValueType } from './type';
|
|
|
|
export type CollaboratorItemType = {
|
|
teamId: string;
|
|
permission: Permission;
|
|
name: string;
|
|
avatar: string;
|
|
} & RequireOnlyOne<{
|
|
tmbId: string;
|
|
groupId: string;
|
|
orgId: string;
|
|
}>;
|
|
|
|
export type UpdateClbPermissionProps<addOnly = false> = {
|
|
members?: string[];
|
|
groups?: string[];
|
|
orgs?: string[];
|
|
} & (addOnly extends true
|
|
? {}
|
|
: {
|
|
permission: PermissionValueType;
|
|
});
|
|
|
|
export type DeletePermissionQuery = RequireOnlyOne<{
|
|
tmbId?: string;
|
|
groupId?: string;
|
|
orgId?: string;
|
|
}>;
|