4.8.19-feature (#3636)

* 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

* perf: scroll page code

* perf: list data

* docs:更新用户答疑 (#3576)

* docs: add custom uid docs (#3572)

* fix: pagination bug (#3577)

* 4.8.19 test (#3584)

* faet: dataset search filter

* fix: scroll page

* fix: collection list api old version (#3591)

* fix: collection list api format

* fix: type error of addSourceMemeber

* fix: scroll fetch (#3592)

* fix: yuque dataset file folder can enter (#3593)

* perf: load members;perf: yuque load;fix: workflow llm params cannot close (#3594)

* chat openapi doc

* feat: dataset openapi doc

* perf: load members

* perf: member load code

* perf: yuque load

* fix: workflow llm params cannot close

* fix: api dataset reference tag preview (#3600)

* perf: doc

* feat: chat page config

* fix: http parse (#3634)

* update doc

* fix: http parse

* fix code run node reset template (#3633)

Co-authored-by: Archer <545436317@qq.com>

* docs:faq (#3627)

* docs:faq

* docsFix

* perf: sleep plugin

* fix: selector

---------

Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: Jiangween <145003935+Jiangween@users.noreply.github.com>
Co-authored-by: heheer <heheer@sealos.io>
This commit is contained in:
Archer
2025-01-20 19:42:33 +08:00
committed by GitHub
parent 9f33729ca9
commit 3c97757e4d
170 changed files with 2317 additions and 1615 deletions

View File

@@ -1,6 +1,6 @@
import { GET, POST, PUT } from '@/web/common/api/request';
import { GET, POST } from '@/web/common/api/request';
import type { PromotionRecordType } from '@/global/support/api/userRes.d';
import { PagingData, type RequestPaging } from '@/types';
import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
/* get promotion init data */
export const getPromotionInitData = () =>
@@ -10,5 +10,8 @@ export const getPromotionInitData = () =>
}>('/proApi/support/activity/promotion/getPromotionData');
/* promotion records */
export const getPromotionRecords = (data: RequestPaging) =>
POST<PagingData<PromotionRecordType>>(`/proApi/support/activity/promotion/getPromotions`, data);
export const getPromotionRecords = (data: PaginationProps) =>
POST<PaginationResponse<PromotionRecordType>>(
`/proApi/support/activity/promotion/getPromotions`,
data
);

View File

@@ -90,3 +90,5 @@ export const getCaptchaPic = (username: string) =>
GET<{
captchaImage: string;
}>('/proApi/support/user/account/captcha/getImgCaptcha', { username });
export const postSyncMembers = () => POST('/proApi/support/user/team/org/sync');

View File

@@ -1,10 +1,10 @@
import { GET, POST, PUT } from '@/web/common/api/request';
import type { PagingData, RequestPaging } from '@/types';
import { GET, POST } from '@/web/common/api/request';
import type { UserInformSchema } from '@fastgpt/global/support/user/inform/type';
import { SystemMsgModalValueType } from '@fastgpt/service/support/user/inform/type';
import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
export const getInforms = (data: RequestPaging) =>
POST<PagingData<UserInformSchema>>(`/proApi/support/user/inform/list`, data);
export const getInforms = (data: PaginationProps) =>
POST<PaginationResponse<UserInformSchema>>(`/proApi/support/user/inform/list`, data);
export const getUnreadCount = () =>
GET<{

View File

@@ -19,6 +19,7 @@ import {
} from '@fastgpt/global/support/user/team/type.d';
import { FeTeamPlanStatusType, TeamSubSchema } from '@fastgpt/global/support/wallet/sub/type';
import { TeamInvoiceHeaderType } from '@fastgpt/global/support/user/team/type';
import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
/* --------------- team ---------------- */
export const getTeamList = (status: `${TeamMemberSchema['status']}`) =>
@@ -30,8 +31,8 @@ export const putSwitchTeam = (teamId: string) =>
PUT<string>(`/proApi/support/user/team/switch`, { teamId });
/* --------------- team member ---------------- */
export const getTeamMembers = () =>
GET<TeamMemberItemType[]>(`/proApi/support/user/team/member/list`);
export const getTeamMembers = (props: PaginationProps) =>
GET<PaginationResponse<TeamMemberItemType>>(`/proApi/support/user/team/member/list`, props);
export const postInviteTeamMember = (data: InviteMemberProps) =>
POST<InviteMemberResponse>(`/proApi/support/user/team/member/invite`, data);
export const putUpdateMemberName = (name: string) =>

View File

@@ -30,9 +30,6 @@ type State = {
teamPlanStatus: FeTeamPlanStatusType | null;
initTeamPlanStatus: () => Promise<any>;
teamMembers: TeamMemberItemType[];
loadAndGetTeamMembers: (init?: boolean) => Promise<TeamMemberItemType[]>;
teamMemberGroups: MemberGroupListType;
myGroups: MemberGroupListType;
loadAndGetGroups: (init?: boolean) => Promise<MemberGroupListType>;
@@ -102,7 +99,7 @@ export const useUserStore = create<State>()(
},
// team
teamPlanStatus: null,
initTeamPlanStatus() {
async initTeamPlanStatus() {
return getTeamPlanStatus().then((res) => {
set((state) => {
state.teamPlanStatus = res;
@@ -110,21 +107,6 @@ export const useUserStore = create<State>()(
return res;
});
},
teamMembers: [],
loadAndGetTeamMembers: async (init = false) => {
if (!useSystemStore.getState()?.feConfigs?.isPlus) return [];
const randomRefresh = Math.random() > 0.7;
if (!randomRefresh && !init && get().teamMembers?.length)
return Promise.resolve(get().teamMembers);
const res = await getTeamMembers();
set((state) => {
state.teamMembers = res;
});
return res;
},
teamMemberGroups: [],
teamOrgs: [],
myGroups: [],

View File

@@ -1,14 +1,14 @@
import { PagingData, RequestPaging } from '@/types';
import { GET, POST } from '@/web/common/api/request';
import { CreateBillProps, CreateBillResponse } from '@fastgpt/global/support/wallet/bill/api';
import { BillTypeEnum } from '@fastgpt/global/support/wallet/bill/constants';
import type { BillSchemaType } from '@fastgpt/global/support/wallet/bill/type.d';
import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
export const getBills = (
data: RequestPaging & {
data: PaginationProps<{
type?: BillTypeEnum;
}
) => POST<PagingData<BillSchemaType>>(`/proApi/support/wallet/bill/list`, data);
}>
) => POST<PaginationResponse<BillSchemaType>>(`/proApi/support/wallet/bill/list`, data);
export const getWxPayQRCode = (data: CreateBillProps) =>
POST<CreateBillResponse>(`/proApi/support/wallet/bill/create`, data);

View File

@@ -1,8 +1,8 @@
import { PagingData, RequestPaging } from '@/types';
import { GET, POST } from '@/web/common/api/request';
import { BillTypeEnum } from '@fastgpt/global/support/wallet/bill/constants';
import { InvoiceType } from '@fastgpt/global/support/wallet/bill/type';
import { InvoiceSchemaType } from '@fastgpt/global/support/wallet/bill/type';
import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
export type invoiceBillDataType = {
type: BillTypeEnum;
price: number;
@@ -16,5 +16,5 @@ export const getInvoiceBillsList = () =>
export const submitInvoice = (data: InvoiceType) =>
POST(`/proApi/support/wallet/bill/invoice/submit`, data);
export const getInvoiceRecords = (data: RequestPaging) =>
POST<PagingData<InvoiceSchemaType>>(`/proApi/support/wallet/bill/invoice/records`, data);
export const getInvoiceRecords = (data: PaginationProps) =>
POST<PaginationResponse<InvoiceSchemaType>>(`/proApi/support/wallet/bill/invoice/records`, data);

View File

@@ -1,10 +1,17 @@
import { GET, POST } from '@/web/common/api/request';
import { POST } from '@/web/common/api/request';
import { CreateTrainingUsageProps } from '@fastgpt/global/support/wallet/usage/api.d';
import type { PagingData, RequestPaging } from '@/types';
import { UsageSourceEnum } from '@fastgpt/global/support/wallet/usage/constants';
import type { UsageItemType } from '@fastgpt/global/support/wallet/usage/type';
import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
export const getUserUsages = (data: RequestPaging) =>
POST<PagingData<UsageItemType>>(`/proApi/support/wallet/usage/getUsage`, data);
export const getUserUsages = (
data: PaginationProps<{
dateStart: Date;
dateEnd: Date;
source?: UsageSourceEnum;
teamMemberId: string;
}>
) => POST<PaginationResponse<UsageItemType>>(`/proApi/support/wallet/usage/getUsage`, data);
export const postCreateTrainingUsage = (data: CreateTrainingUsageProps) =>
POST<string>(`/support/wallet/usage/createTrainingUsage`, data);