mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-25 06:14:06 +00:00
v4.6.9-alpha (#918)
Co-authored-by: Mufei <327958099@qq.com> Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
4
packages/global/support/outLink/type.d.ts
vendored
4
packages/global/support/outLink/type.d.ts
vendored
@@ -1,3 +1,4 @@
|
||||
import { AppSchema } from 'core/app/type';
|
||||
import { OutLinkTypeEnum } from './constant';
|
||||
|
||||
export type OutLinkSchema = {
|
||||
@@ -18,6 +19,9 @@ export type OutLinkSchema = {
|
||||
hookUrl?: string;
|
||||
};
|
||||
};
|
||||
export type OutLinkWithAppType = Omit<OutLinkSchema, 'appId'> & {
|
||||
appId: AppSchema;
|
||||
};
|
||||
|
||||
export type OutLinkEditType = {
|
||||
_id?: string;
|
||||
|
9
packages/global/support/permission/chat.d.ts
vendored
Normal file
9
packages/global/support/permission/chat.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
type ShareChatAuthProps = {
|
||||
shareId?: string;
|
||||
outLinkUid?: string;
|
||||
};
|
||||
type TeamChatAuthProps = {
|
||||
teamId?: string;
|
||||
teamToken?: string;
|
||||
};
|
||||
export type OutLinkChatAuthProps = ShareChatAuthProps & TeamChatAuthProps;
|
@@ -2,7 +2,8 @@ export enum AuthUserTypeEnum {
|
||||
token = 'token',
|
||||
root = 'root',
|
||||
apikey = 'apikey',
|
||||
outLink = 'outLink'
|
||||
outLink = 'outLink',
|
||||
teamDomain = 'teamDomain'
|
||||
}
|
||||
|
||||
export enum PermissionTypeEnum {
|
||||
|
6
packages/global/support/user/api.d.ts
vendored
6
packages/global/support/user/api.d.ts
vendored
@@ -10,7 +10,11 @@ export type OauthLoginProps = {
|
||||
code: string;
|
||||
callbackUrl: string;
|
||||
inviterId?: string;
|
||||
tmbId?: string;
|
||||
};
|
||||
|
||||
export type WxLoginProps = {
|
||||
inviterId?: string;
|
||||
code: string;
|
||||
};
|
||||
|
||||
export type FastLoginProps = {
|
||||
|
11
packages/global/support/user/auth/constants.ts
Normal file
11
packages/global/support/user/auth/constants.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export enum UserAuthTypeEnum {
|
||||
register = 'register',
|
||||
findPassword = 'findPassword',
|
||||
wxLogin = 'wxLogin'
|
||||
}
|
||||
|
||||
export const userAuthTypeMap = {
|
||||
[UserAuthTypeEnum.register]: 'register',
|
||||
[UserAuthTypeEnum.findPassword]: 'findPassword',
|
||||
[UserAuthTypeEnum.wxLogin]: 'wxLogin'
|
||||
};
|
@@ -13,10 +13,6 @@ export const userStatusMap = {
|
||||
|
||||
export enum OAuthEnum {
|
||||
github = 'github',
|
||||
google = 'google'
|
||||
}
|
||||
|
||||
export enum UserAuthTypeEnum {
|
||||
register = 'register',
|
||||
findPassword = 'findPassword'
|
||||
google = 'google',
|
||||
wechat = 'wechat'
|
||||
}
|
||||
|
4
packages/global/support/user/login/api.d.ts
vendored
Normal file
4
packages/global/support/user/login/api.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export type GetWXLoginQRResponse = {
|
||||
code: string;
|
||||
codeUrl: string;
|
||||
};
|
@@ -15,7 +15,7 @@ export type UpdateTeamProps = {
|
||||
teamId: string;
|
||||
name?: string;
|
||||
avatar?: string;
|
||||
tagsUrl?: string;
|
||||
teamDomain?: string;
|
||||
};
|
||||
|
||||
/* ------------- member ----------- */
|
||||
|
14
packages/global/support/user/team/tag.d.ts
vendored
Normal file
14
packages/global/support/user/team/tag.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
export type AuthTeamTagTokenProps = {
|
||||
teamId: string;
|
||||
teamToken: string;
|
||||
};
|
||||
|
||||
export type AuthTokenFromTeamDomainResponse = {
|
||||
success: boolean;
|
||||
msg?: string;
|
||||
message?: string;
|
||||
data: {
|
||||
uid: string;
|
||||
tags: string[];
|
||||
};
|
||||
};
|
20
packages/global/support/user/team/type.d.ts
vendored
20
packages/global/support/user/team/type.d.ts
vendored
@@ -8,22 +8,19 @@ export type TeamSchema = {
|
||||
avatar: string;
|
||||
createTime: Date;
|
||||
balance: number;
|
||||
maxSize: number;
|
||||
tagsUrl: string;
|
||||
teamDomain: string;
|
||||
limit: {
|
||||
lastExportDatasetTime: Date;
|
||||
lastWebsiteSyncTime: Date;
|
||||
};
|
||||
};
|
||||
export type tagsType = {
|
||||
label: string,
|
||||
key: string
|
||||
}
|
||||
export type TeamTagsSchema = {
|
||||
_id: string;
|
||||
label: string;
|
||||
teamId: string;
|
||||
key: string;
|
||||
};
|
||||
export type TeamTagSchema = TeamTagItemType & {
|
||||
_id: string;
|
||||
teamId: string;
|
||||
createTime: Date;
|
||||
};
|
||||
|
||||
@@ -56,11 +53,11 @@ export type TeamItemType = {
|
||||
avatar: string;
|
||||
balance: number;
|
||||
tmbId: string;
|
||||
teamDomain: string;
|
||||
defaultTeam: boolean;
|
||||
role: `${TeamMemberRoleEnum}`;
|
||||
status: `${TeamMemberStatusEnum}`;
|
||||
canWrite: boolean;
|
||||
maxSize: number;
|
||||
};
|
||||
|
||||
export type TeamMemberItemType = {
|
||||
@@ -72,3 +69,8 @@ export type TeamMemberItemType = {
|
||||
role: `${TeamMemberRoleEnum}`;
|
||||
status: `${TeamMemberStatusEnum}`;
|
||||
};
|
||||
|
||||
export type TeamTagItemType = {
|
||||
label: string;
|
||||
key: string;
|
||||
};
|
||||
|
@@ -21,9 +21,9 @@ export type BillSchemaType = {
|
||||
};
|
||||
};
|
||||
|
||||
export type ChatModuleBillType = {
|
||||
export type ChatModuleUsageType = {
|
||||
tokens?: number;
|
||||
totalPoints: number;
|
||||
moduleName: string;
|
||||
model?: string;
|
||||
charsLength?: number;
|
||||
};
|
||||
|
@@ -20,7 +20,6 @@ export type CreateUsageProps = {
|
||||
appName: string;
|
||||
appId?: string;
|
||||
totalPoints: number;
|
||||
// inputTokens: number;
|
||||
source: `${UsageSourceEnum}`;
|
||||
list: UsageListItemType[];
|
||||
};
|
||||
|
@@ -2,6 +2,7 @@ import { CreateUsageProps } from './api';
|
||||
import { UsageSourceEnum } from './constants';
|
||||
|
||||
export type UsageListItemCountType = {
|
||||
tokens?: number;
|
||||
charsLength?: number;
|
||||
duration?: number;
|
||||
};
|
||||
|
Reference in New Issue
Block a user