Feat/support to invite multiple users (#1011)

This commit is contained in:
Matri
2023-08-31 01:18:31 +08:00
committed by GitHub
parent 7df56ed617
commit d3f8ea2df0
12 changed files with 222 additions and 70 deletions

View File

@@ -5,7 +5,7 @@ import type {
DocumentsLimitResponse,
FileUploadConfigResponse,
ICurrentWorkspace,
IWorkspace, LangGeniusVersionResponse, Member,
IWorkspace, InvitationResponse, LangGeniusVersionResponse, Member,
OauthResponse, PluginProvider, Provider, ProviderAnthropicToken, ProviderAzureToken,
SetupStatusResponse, UserProfileOriginResponse,
} from '@/models/common'
@@ -70,8 +70,8 @@ export const fetchAccountIntegrates: Fetcher<{ data: AccountIntegrate[] | null }
return get(url, { params }) as Promise<{ data: AccountIntegrate[] | null }>
}
export const inviteMember: Fetcher<CommonResponse & { account: Member; invite_url: string }, { url: string; body: Record<string, any> }> = ({ url, body }) => {
return post(url, { body }) as Promise<CommonResponse & { account: Member; invite_url: string }>
export const inviteMember: Fetcher<InvitationResponse, { url: string; body: Record<string, any> }> = ({ url, body }) => {
return post(url, { body }) as Promise<InvitationResponse>
}
export const updateMemberRole: Fetcher<CommonResponse, { url: string; body: Record<string, any> }> = ({ url, body }) => {