wwf
4 天以前 a430284aa21e3ae1f0d5654e55b2ad2852519cc2
service/common.ts
@@ -148,10 +148,6 @@
  return post<CommonResponse & { new_tenant: IWorkspace }>(url, { body })
}
export const updateWorkspaceInfo: Fetcher<ICurrentWorkspace, { url: string; body: Record<string, any> }> = ({ url, body }) => {
  return post<ICurrentWorkspace>(url, { body })
}
export const fetchDataSource: Fetcher<{ data: DataSourceNotion[] }, { url: string }> = ({ url }) => {
  return get<{ data: DataSourceNotion[] }>(url)
}
@@ -261,6 +257,10 @@
  return get<FileUploadConfigResponse>(url)
}
export const fetchFreeQuotaVerify: Fetcher<{ result: string; flag: boolean; reason: string }, string> = (url) => {
  return get(url) as Promise<{ result: string; flag: boolean; reason: string }>
}
export const fetchNotionConnection: Fetcher<{ data: string }, string> = (url) => {
  return get(url) as Promise<{ data: string }>
}
@@ -298,7 +298,7 @@
}
type RetrievalMethodsRes = {
  retrieval_method: RETRIEVE_METHOD[]
  'retrieval_method': RETRIEVE_METHOD[]
}
export const fetchSupportRetrievalMethods: Fetcher<RetrievalMethodsRes, string> = (url) => {
  return get<RetrievalMethodsRes>(url)
@@ -338,7 +338,7 @@
  post<CommonResponse & { data: string; message?: string; code?: string }>('/forgot-password', { body: { email, language } })
export const verifyResetPasswordCode = (body: { email: string; code: string; token: string }) =>
  post<CommonResponse & { is_valid: boolean; token: string }>('/forgot-password/validity', { body })
  post<CommonResponse & { is_valid: boolean }>('/forgot-password/validity', { body })
export const sendDeleteAccountCode = () =>
  get<CommonResponse & { data: string }>('/account/delete/verify')
@@ -348,6 +348,3 @@
export const submitDeleteAccountFeedback = (body: { feedback: string; email: string }) =>
  post<CommonResponse>('/account/delete/feedback', { body })
export const getDocDownloadUrl = (doc_name: string) =>
  get<{ url: string }>('/compliance/download', { params: { doc_name } }, { silent: true })