feat: sync org from wecom, pref: member list pagination (#3549)
* feat: sync org * chore: fe * chore: loading * chore: type * pref: team member list change to pagination. Edit a sort of list apis. * feat: member update avatar * chore: user avatar move to tmb * chore: init scripts move user avatar * chore: sourceMember * fix: list api sourceMember * fix: member sync * fix: pagination * chore: adjust code * chore: move changeOwner to pro * chore: init v4819 script * chore: adjust code * chore: UserBox
This commit is contained in:
@@ -40,7 +40,7 @@ export type FastGPTConfigFileType = {
|
||||
|
||||
export type FastGPTFeConfigsType = {
|
||||
show_emptyChat?: boolean;
|
||||
register_method?: ['email' | 'phone'];
|
||||
register_method?: ['email' | 'phone' | 'sync'];
|
||||
login_method?: ['email' | 'phone']; // Attention: login method is diffrent with oauth
|
||||
find_password_method?: ['email' | 'phone'];
|
||||
bind_notification_method?: ['email' | 'phone'];
|
||||
@@ -76,7 +76,6 @@ export type FastGPTFeConfigsType = {
|
||||
wecom?: {
|
||||
corpid?: string;
|
||||
agentid?: string;
|
||||
secret?: string;
|
||||
};
|
||||
microsoft?: {
|
||||
clientId?: string;
|
||||
|
||||
4
packages/global/core/app/type.d.ts
vendored
4
packages/global/core/app/type.d.ts
vendored
@@ -12,8 +12,9 @@ import { TeamTagSchema as TeamTagsSchemaType } from '@fastgpt/global/support/use
|
||||
import { StoreEdgeItemType } from '../workflow/type/edge';
|
||||
import { AppPermission } from '../../support/permission/app/controller';
|
||||
import { ParentIdType } from '../../common/parentFolder/type';
|
||||
import { FlowNodeInputTypeEnum } from 'core/workflow/node/constant';
|
||||
import { FlowNodeInputTypeEnum } from '../../core/workflow/node/constant';
|
||||
import { WorkflowTemplateBasicType } from '@fastgpt/global/core/workflow/type';
|
||||
import { SourceMemberType } from '../../support/user/type';
|
||||
|
||||
export type AppSchema = {
|
||||
_id: string;
|
||||
@@ -63,6 +64,7 @@ export type AppListItemType = {
|
||||
permission: AppPermission;
|
||||
inheritPermission?: boolean;
|
||||
private?: boolean;
|
||||
sourceMember: SourceMemberType;
|
||||
};
|
||||
|
||||
export type AppDetailType = AppSchema & {
|
||||
|
||||
3
packages/global/core/app/version.d.ts
vendored
3
packages/global/core/app/version.d.ts
vendored
@@ -1,5 +1,7 @@
|
||||
import { TeamMemberStatusEnum } from 'support/user/team/constant';
|
||||
import { StoreEdgeItemType } from '../workflow/type/edge';
|
||||
import { AppChatConfigType, AppSchema } from './type';
|
||||
import { SourceMemberType } from 'support/user/type';
|
||||
|
||||
export type AppVersionSchemaType = {
|
||||
_id: string;
|
||||
@@ -20,4 +22,5 @@ export type VersionListItemType = {
|
||||
time: Date;
|
||||
isPublish: boolean | undefined;
|
||||
tmbId: string;
|
||||
sourceMember: SourceMemberType;
|
||||
};
|
||||
|
||||
2
packages/global/core/dataset/type.d.ts
vendored
2
packages/global/core/dataset/type.d.ts
vendored
@@ -11,6 +11,7 @@ import {
|
||||
import { DatasetPermission } from '../../support/permission/dataset/controller';
|
||||
import { Permission } from '../../support/permission/controller';
|
||||
import { APIFileServer, FeishuServer, YuqueServer } from './apiDataset';
|
||||
import { SourceMemberType } from 'support/user/type';
|
||||
|
||||
export type DatasetSchemaType = {
|
||||
_id: string;
|
||||
@@ -165,6 +166,7 @@ export type DatasetListItemType = {
|
||||
vectorModel: VectorModelItemType;
|
||||
inheritPermission: boolean;
|
||||
private?: boolean;
|
||||
sourceMember?: SourceMemberType;
|
||||
};
|
||||
|
||||
export type DatasetItemType = Omit<DatasetSchemaType, 'vectorModel' | 'agentModel'> & {
|
||||
|
||||
1
packages/global/core/workflow/type/node.d.ts
vendored
1
packages/global/core/workflow/type/node.d.ts
vendored
@@ -89,6 +89,7 @@ export type NodeTemplateListItemType = {
|
||||
hasTokenFee?: boolean; // 是否配置积分
|
||||
instructions?: string; // 使用说明
|
||||
courseUrl?: string; // 教程链接
|
||||
sourceMember?: SourceMember;
|
||||
};
|
||||
|
||||
export type NodeTemplateListType = {
|
||||
|
||||
@@ -12,6 +12,7 @@ export type CreateTeamProps = {
|
||||
avatar?: string;
|
||||
defaultTeam?: boolean;
|
||||
memberName?: string;
|
||||
memberAvatar?: string;
|
||||
};
|
||||
export type UpdateTeamProps = Omit<ThirdPartyAccountType, 'externalWorkflowVariable'> & {
|
||||
name?: string;
|
||||
|
||||
@@ -5,8 +5,6 @@ export const OrgMemberCollectionName = 'team_org_members';
|
||||
|
||||
export const getOrgChildrenPath = (org: OrgSchemaType) => `${org.path}/${org.pathId}`;
|
||||
|
||||
// export enum OrgMemberRole {
|
||||
// owner = 'owner',
|
||||
// admin = 'admin',
|
||||
// member = 'member'
|
||||
// }
|
||||
export enum SyncOrgSourceEnum {
|
||||
wecom = 'wecom'
|
||||
}
|
||||
|
||||
1
packages/global/support/user/team/type.d.ts
vendored
1
packages/global/support/user/team/type.d.ts
vendored
@@ -44,6 +44,7 @@ export type TeamMemberSchema = {
|
||||
name: string;
|
||||
role: `${TeamMemberRoleEnum}`;
|
||||
status: `${TeamMemberStatusEnum}`;
|
||||
avatar: string;
|
||||
defaultTeam: boolean;
|
||||
};
|
||||
|
||||
|
||||
10
packages/global/support/user/type.d.ts
vendored
10
packages/global/support/user/type.d.ts
vendored
@@ -1,12 +1,12 @@
|
||||
import { TeamPermission } from '../permission/user/controller';
|
||||
import { UserStatusEnum } from './constant';
|
||||
import { TeamMemberStatusEnum } from './team/constant';
|
||||
import { TeamTmbItemType } from './team/type';
|
||||
|
||||
export type UserModelSchema = {
|
||||
_id: string;
|
||||
username: string;
|
||||
password: string;
|
||||
avatar: string;
|
||||
promotionRate: number;
|
||||
inviterId?: string;
|
||||
openaiKey: string;
|
||||
@@ -22,7 +22,7 @@ export type UserModelSchema = {
|
||||
export type UserType = {
|
||||
_id: string;
|
||||
username: string;
|
||||
avatar: string;
|
||||
avatar: string; // it should be team member's avatar after 4.8.18
|
||||
timezone: string;
|
||||
promotionRate: UserModelSchema['promotionRate'];
|
||||
team: TeamTmbItemType;
|
||||
@@ -30,3 +30,9 @@ export type UserType = {
|
||||
notificationAccount?: string;
|
||||
permission: TeamPermission;
|
||||
};
|
||||
|
||||
export type SourceMemberType = {
|
||||
name: string;
|
||||
avatar: string;
|
||||
status: `${TeamMemberStatusEnum}`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user