mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 12:48:30 +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:
@@ -1,7 +1,7 @@
|
||||
import { GET, POST, PUT } from '@/web/common/api/request';
|
||||
import { hashStr } from '@fastgpt/global/common/string/tools';
|
||||
import type { ResLogin } from '@/global/support/api/userRes.d';
|
||||
import { UserAuthTypeEnum } from '@fastgpt/global/support/user/constant';
|
||||
import { UserAuthTypeEnum } from '@fastgpt/global/support/user/auth/constants';
|
||||
import { UserUpdateParams } from '@/types/user';
|
||||
import { UserType } from '@fastgpt/global/support/user/type.d';
|
||||
import type {
|
||||
@@ -9,6 +9,7 @@ import type {
|
||||
OauthLoginProps,
|
||||
PostLoginProps
|
||||
} from '@fastgpt/global/support/user/api.d';
|
||||
import { GetWXLoginQRResponse } from '@fastgpt/global/support/user/login/api.d';
|
||||
|
||||
export const sendAuthCode = (data: {
|
||||
username: string;
|
||||
@@ -71,3 +72,9 @@ export const postLogin = ({ password, ...props }: PostLoginProps) =>
|
||||
export const loginOut = () => GET('/support/user/account/loginout');
|
||||
|
||||
export const putUserInfo = (data: UserUpdateParams) => PUT('/support/user/account/update', data);
|
||||
|
||||
export const getWXLoginQR = () =>
|
||||
GET<GetWXLoginQRResponse>('/proApi/support/user/account/login/wx/getQR');
|
||||
|
||||
export const getWXLoginResult = (code: string) =>
|
||||
GET<ResLogin>(`/proApi/support/user/account/login/wx/getResult`, { code });
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { useState, useMemo, useCallback } from 'react';
|
||||
import { sendAuthCode } from '@/web/support/user/api';
|
||||
import { UserAuthTypeEnum } from '@fastgpt/global/support/user/constant';
|
||||
import { UserAuthTypeEnum } from '@fastgpt/global/support/user/auth/constants';
|
||||
import { useToast } from '@fastgpt/web/hooks/useToast';
|
||||
import { getErrText } from '@fastgpt/global/common/error/utils';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
@@ -8,7 +8,7 @@ import {
|
||||
UpdateTeamMemberProps,
|
||||
UpdateTeamProps
|
||||
} from '@fastgpt/global/support/user/team/controller.d';
|
||||
import type { TeamTagsSchema } from '@fastgpt/global/support/user/team/type';
|
||||
import type { TeamTagItemType, TeamTagSchema } from '@fastgpt/global/support/user/team/type';
|
||||
import {
|
||||
TeamItemType,
|
||||
TeamMemberItemType,
|
||||
@@ -25,14 +25,6 @@ export const putUpdateTeam = (data: UpdateTeamProps) =>
|
||||
PUT(`/proApi/support/user/team/update`, data);
|
||||
export const putSwitchTeam = (teamId: string) =>
|
||||
PUT<string>(`/proApi/support/user/team/switch`, { teamId });
|
||||
export const updateTags = (teamId: string, tagsUrl: string) =>
|
||||
POST<TeamTagsSchema[]>(`/proApi/support/user/team/tags/asyncTags`, { teamId, tagsUrl });
|
||||
export const getTeamsTags = (teamId: string) =>
|
||||
GET(`/proApi/support/user/team/tags/list`, { teamId });
|
||||
export const putUpdateTeamTags = (data: any) =>
|
||||
PUT(`/proApi/support/user/team/tags/updateUrl`, data);
|
||||
export const insertTeamsTags = (tags: Array<any>) =>
|
||||
POST(`/proApi/support/user/team/tags/create`, tags);
|
||||
|
||||
/* --------------- team member ---------------- */
|
||||
export const getTeamMembers = (teamId: string) =>
|
||||
@@ -50,6 +42,11 @@ export const updateInviteResult = (data: UpdateInviteProps) =>
|
||||
export const delLeaveTeam = (teamId: string) =>
|
||||
DELETE('/proApi/support/user/team/member/leave', { teamId });
|
||||
|
||||
/* --------------- team tags ---------------- */
|
||||
export const getTeamsTags = () => GET<TeamTagSchema[]>(`/proApi/support/user/team/tag/list`);
|
||||
export const loadTeamTagsByDomain = (domain: string) =>
|
||||
GET<TeamTagItemType[]>(`/proApi/support/user/team/tag/async`, { domain });
|
||||
|
||||
/* team limit */
|
||||
export const checkTeamExportDatasetLimit = (datasetId: string) =>
|
||||
GET(`/support/user/team/limit/exportDatasetLimit`, { datasetId });
|
||||
|
Reference in New Issue
Block a user