wip 6
This commit is contained in:
@@ -34,24 +34,34 @@ import type {
|
||||
import type {
|
||||
ActivityResponse,
|
||||
CreateDocumentBody,
|
||||
DirectoryListResponse,
|
||||
DocumentResponse,
|
||||
DocumentsResponse,
|
||||
ErrorResponse,
|
||||
GetActivityParams,
|
||||
GetAdmin200,
|
||||
GetDocumentsParams,
|
||||
GetImportDirectoryParams,
|
||||
GetLogsParams,
|
||||
GetProgressListParams,
|
||||
GetSearchParams,
|
||||
GraphDataResponse,
|
||||
HomeResponse,
|
||||
ImportResultsResponse,
|
||||
LoginRequest,
|
||||
LoginResponse,
|
||||
LogsResponse,
|
||||
PostAdminActionBody,
|
||||
PostImportBody,
|
||||
PostSearchBody,
|
||||
ProgressListResponse,
|
||||
ProgressResponse,
|
||||
SearchResponse,
|
||||
SettingsResponse,
|
||||
StreaksResponse,
|
||||
UserStatisticsResponse
|
||||
UpdateUserBody,
|
||||
UserStatisticsResponse,
|
||||
UsersResponse
|
||||
} from './model';
|
||||
|
||||
|
||||
@@ -1412,3 +1422,670 @@ export const usePostSearch = <TError = AxiosError<ErrorResponse>,
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Get admin page data
|
||||
*/
|
||||
export const getAdmin = (
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<AxiosResponse<GetAdmin200>> => {
|
||||
|
||||
|
||||
return axios.default.get(
|
||||
`/api/v1/admin`,options
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getGetAdminQueryKey = () => {
|
||||
return [
|
||||
`/api/v1/admin`
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getGetAdminQueryOptions = <TData = Awaited<ReturnType<typeof getAdmin>>, TError = AxiosError<ErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAdmin>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, axios: axiosOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetAdminQueryKey();
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getAdmin>>> = ({ signal }) => getAdmin({ signal, ...axiosOptions });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getAdmin>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type GetAdminQueryResult = NonNullable<Awaited<ReturnType<typeof getAdmin>>>
|
||||
export type GetAdminQueryError = AxiosError<ErrorResponse>
|
||||
|
||||
|
||||
export function useGetAdmin<TData = Awaited<ReturnType<typeof getAdmin>>, TError = AxiosError<ErrorResponse>>(
|
||||
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAdmin>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getAdmin>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getAdmin>>
|
||||
> , 'initialData'
|
||||
>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetAdmin<TData = Awaited<ReturnType<typeof getAdmin>>, TError = AxiosError<ErrorResponse>>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAdmin>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getAdmin>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getAdmin>>
|
||||
> , 'initialData'
|
||||
>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetAdmin<TData = Awaited<ReturnType<typeof getAdmin>>, TError = AxiosError<ErrorResponse>>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAdmin>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary Get admin page data
|
||||
*/
|
||||
|
||||
export function useGetAdmin<TData = Awaited<ReturnType<typeof getAdmin>>, TError = AxiosError<ErrorResponse>>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAdmin>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getGetAdminQueryOptions(options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @summary Perform admin action (backup, restore, etc.)
|
||||
*/
|
||||
export const postAdminAction = (
|
||||
postAdminActionBody: PostAdminActionBody, options?: AxiosRequestConfig
|
||||
): Promise<AxiosResponse<Blob>> => {
|
||||
|
||||
const formUrlEncoded = new URLSearchParams();
|
||||
formUrlEncoded.append(`action`, postAdminActionBody.action)
|
||||
if(postAdminActionBody.backup_types !== undefined) {
|
||||
postAdminActionBody.backup_types.forEach(value => formUrlEncoded.append(`backup_types`, value));
|
||||
}
|
||||
if(postAdminActionBody.restore_file !== undefined) {
|
||||
formUrlEncoded.append(`restore_file`, postAdminActionBody.restore_file)
|
||||
}
|
||||
|
||||
return axios.default.post(
|
||||
`/api/v1/admin`,
|
||||
formUrlEncoded,{
|
||||
responseType: 'blob',
|
||||
...options,}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getPostAdminActionMutationOptions = <TError = AxiosError<ErrorResponse>,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postAdminAction>>, TError,{data: PostAdminActionBody}, TContext>, axios?: AxiosRequestConfig}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof postAdminAction>>, TError,{data: PostAdminActionBody}, TContext> => {
|
||||
|
||||
const mutationKey = ['postAdminAction'];
|
||||
const {mutation: mutationOptions, axios: axiosOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, axios: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof postAdminAction>>, {data: PostAdminActionBody}> = (props) => {
|
||||
const {data} = props ?? {};
|
||||
|
||||
return postAdminAction(data,axiosOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type PostAdminActionMutationResult = NonNullable<Awaited<ReturnType<typeof postAdminAction>>>
|
||||
export type PostAdminActionMutationBody = PostAdminActionBody
|
||||
export type PostAdminActionMutationError = AxiosError<ErrorResponse>
|
||||
|
||||
/**
|
||||
* @summary Perform admin action (backup, restore, etc.)
|
||||
*/
|
||||
export const usePostAdminAction = <TError = AxiosError<ErrorResponse>,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postAdminAction>>, TError,{data: PostAdminActionBody}, TContext>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postAdminAction>>,
|
||||
TError,
|
||||
{data: PostAdminActionBody},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getPostAdminActionMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Get all users
|
||||
*/
|
||||
export const getUsers = (
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<AxiosResponse<UsersResponse>> => {
|
||||
|
||||
|
||||
return axios.default.get(
|
||||
`/api/v1/admin/users`,options
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getGetUsersQueryKey = () => {
|
||||
return [
|
||||
`/api/v1/admin/users`
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getGetUsersQueryOptions = <TData = Awaited<ReturnType<typeof getUsers>>, TError = AxiosError<ErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, axios: axiosOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetUsersQueryKey();
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getUsers>>> = ({ signal }) => getUsers({ signal, ...axiosOptions });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type GetUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getUsers>>>
|
||||
export type GetUsersQueryError = AxiosError<ErrorResponse>
|
||||
|
||||
|
||||
export function useGetUsers<TData = Awaited<ReturnType<typeof getUsers>>, TError = AxiosError<ErrorResponse>>(
|
||||
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getUsers>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getUsers>>
|
||||
> , 'initialData'
|
||||
>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetUsers<TData = Awaited<ReturnType<typeof getUsers>>, TError = AxiosError<ErrorResponse>>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getUsers>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getUsers>>
|
||||
> , 'initialData'
|
||||
>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetUsers<TData = Awaited<ReturnType<typeof getUsers>>, TError = AxiosError<ErrorResponse>>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary Get all users
|
||||
*/
|
||||
|
||||
export function useGetUsers<TData = Awaited<ReturnType<typeof getUsers>>, TError = AxiosError<ErrorResponse>>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getGetUsersQueryOptions(options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @summary Create, update, or delete user
|
||||
*/
|
||||
export const updateUser = (
|
||||
updateUserBody: UpdateUserBody, options?: AxiosRequestConfig
|
||||
): Promise<AxiosResponse<UsersResponse>> => {
|
||||
|
||||
const formUrlEncoded = new URLSearchParams();
|
||||
formUrlEncoded.append(`operation`, updateUserBody.operation)
|
||||
formUrlEncoded.append(`user`, updateUserBody.user)
|
||||
if(updateUserBody.password !== undefined) {
|
||||
formUrlEncoded.append(`password`, updateUserBody.password)
|
||||
}
|
||||
if(updateUserBody.is_admin !== undefined) {
|
||||
formUrlEncoded.append(`is_admin`, updateUserBody.is_admin.toString())
|
||||
}
|
||||
|
||||
return axios.default.post(
|
||||
`/api/v1/admin/users`,
|
||||
formUrlEncoded,options
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getUpdateUserMutationOptions = <TError = AxiosError<ErrorResponse>,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateUser>>, TError,{data: UpdateUserBody}, TContext>, axios?: AxiosRequestConfig}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof updateUser>>, TError,{data: UpdateUserBody}, TContext> => {
|
||||
|
||||
const mutationKey = ['updateUser'];
|
||||
const {mutation: mutationOptions, axios: axiosOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, axios: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof updateUser>>, {data: UpdateUserBody}> = (props) => {
|
||||
const {data} = props ?? {};
|
||||
|
||||
return updateUser(data,axiosOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type UpdateUserMutationResult = NonNullable<Awaited<ReturnType<typeof updateUser>>>
|
||||
export type UpdateUserMutationBody = UpdateUserBody
|
||||
export type UpdateUserMutationError = AxiosError<ErrorResponse>
|
||||
|
||||
/**
|
||||
* @summary Create, update, or delete user
|
||||
*/
|
||||
export const useUpdateUser = <TError = AxiosError<ErrorResponse>,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateUser>>, TError,{data: UpdateUserBody}, TContext>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateUser>>,
|
||||
TError,
|
||||
{data: UpdateUserBody},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getUpdateUserMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Get import directory list
|
||||
*/
|
||||
export const getImportDirectory = (
|
||||
params?: GetImportDirectoryParams, options?: AxiosRequestConfig
|
||||
): Promise<AxiosResponse<DirectoryListResponse>> => {
|
||||
|
||||
|
||||
return axios.default.get(
|
||||
`/api/v1/admin/import`,{
|
||||
...options,
|
||||
params: {...params, ...options?.params},}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getGetImportDirectoryQueryKey = (params?: GetImportDirectoryParams,) => {
|
||||
return [
|
||||
`/api/v1/admin/import`, ...(params ? [params]: [])
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getGetImportDirectoryQueryOptions = <TData = Awaited<ReturnType<typeof getImportDirectory>>, TError = AxiosError<ErrorResponse>>(params?: GetImportDirectoryParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getImportDirectory>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, axios: axiosOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetImportDirectoryQueryKey(params);
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getImportDirectory>>> = ({ signal }) => getImportDirectory(params, { signal, ...axiosOptions });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getImportDirectory>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type GetImportDirectoryQueryResult = NonNullable<Awaited<ReturnType<typeof getImportDirectory>>>
|
||||
export type GetImportDirectoryQueryError = AxiosError<ErrorResponse>
|
||||
|
||||
|
||||
export function useGetImportDirectory<TData = Awaited<ReturnType<typeof getImportDirectory>>, TError = AxiosError<ErrorResponse>>(
|
||||
params: undefined | GetImportDirectoryParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getImportDirectory>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getImportDirectory>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getImportDirectory>>
|
||||
> , 'initialData'
|
||||
>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetImportDirectory<TData = Awaited<ReturnType<typeof getImportDirectory>>, TError = AxiosError<ErrorResponse>>(
|
||||
params?: GetImportDirectoryParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getImportDirectory>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getImportDirectory>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getImportDirectory>>
|
||||
> , 'initialData'
|
||||
>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetImportDirectory<TData = Awaited<ReturnType<typeof getImportDirectory>>, TError = AxiosError<ErrorResponse>>(
|
||||
params?: GetImportDirectoryParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getImportDirectory>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary Get import directory list
|
||||
*/
|
||||
|
||||
export function useGetImportDirectory<TData = Awaited<ReturnType<typeof getImportDirectory>>, TError = AxiosError<ErrorResponse>>(
|
||||
params?: GetImportDirectoryParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getImportDirectory>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getGetImportDirectoryQueryOptions(params,options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @summary Perform import
|
||||
*/
|
||||
export const postImport = (
|
||||
postImportBody: PostImportBody, options?: AxiosRequestConfig
|
||||
): Promise<AxiosResponse<ImportResultsResponse>> => {
|
||||
|
||||
const formUrlEncoded = new URLSearchParams();
|
||||
formUrlEncoded.append(`directory`, postImportBody.directory)
|
||||
formUrlEncoded.append(`type`, postImportBody.type)
|
||||
|
||||
return axios.default.post(
|
||||
`/api/v1/admin/import`,
|
||||
formUrlEncoded,options
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getPostImportMutationOptions = <TError = AxiosError<ErrorResponse>,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postImport>>, TError,{data: PostImportBody}, TContext>, axios?: AxiosRequestConfig}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof postImport>>, TError,{data: PostImportBody}, TContext> => {
|
||||
|
||||
const mutationKey = ['postImport'];
|
||||
const {mutation: mutationOptions, axios: axiosOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, axios: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof postImport>>, {data: PostImportBody}> = (props) => {
|
||||
const {data} = props ?? {};
|
||||
|
||||
return postImport(data,axiosOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type PostImportMutationResult = NonNullable<Awaited<ReturnType<typeof postImport>>>
|
||||
export type PostImportMutationBody = PostImportBody
|
||||
export type PostImportMutationError = AxiosError<ErrorResponse>
|
||||
|
||||
/**
|
||||
* @summary Perform import
|
||||
*/
|
||||
export const usePostImport = <TError = AxiosError<ErrorResponse>,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postImport>>, TError,{data: PostImportBody}, TContext>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postImport>>,
|
||||
TError,
|
||||
{data: PostImportBody},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getPostImportMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Get import results
|
||||
*/
|
||||
export const getImportResults = (
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<AxiosResponse<ImportResultsResponse>> => {
|
||||
|
||||
|
||||
return axios.default.get(
|
||||
`/api/v1/admin/import-results`,options
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getGetImportResultsQueryKey = () => {
|
||||
return [
|
||||
`/api/v1/admin/import-results`
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getGetImportResultsQueryOptions = <TData = Awaited<ReturnType<typeof getImportResults>>, TError = AxiosError<ErrorResponse>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getImportResults>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, axios: axiosOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetImportResultsQueryKey();
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getImportResults>>> = ({ signal }) => getImportResults({ signal, ...axiosOptions });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getImportResults>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type GetImportResultsQueryResult = NonNullable<Awaited<ReturnType<typeof getImportResults>>>
|
||||
export type GetImportResultsQueryError = AxiosError<ErrorResponse>
|
||||
|
||||
|
||||
export function useGetImportResults<TData = Awaited<ReturnType<typeof getImportResults>>, TError = AxiosError<ErrorResponse>>(
|
||||
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getImportResults>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getImportResults>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getImportResults>>
|
||||
> , 'initialData'
|
||||
>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetImportResults<TData = Awaited<ReturnType<typeof getImportResults>>, TError = AxiosError<ErrorResponse>>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getImportResults>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getImportResults>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getImportResults>>
|
||||
> , 'initialData'
|
||||
>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetImportResults<TData = Awaited<ReturnType<typeof getImportResults>>, TError = AxiosError<ErrorResponse>>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getImportResults>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary Get import results
|
||||
*/
|
||||
|
||||
export function useGetImportResults<TData = Awaited<ReturnType<typeof getImportResults>>, TError = AxiosError<ErrorResponse>>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getImportResults>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getGetImportResultsQueryOptions(options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @summary Get logs with optional filter
|
||||
*/
|
||||
export const getLogs = (
|
||||
params?: GetLogsParams, options?: AxiosRequestConfig
|
||||
): Promise<AxiosResponse<LogsResponse>> => {
|
||||
|
||||
|
||||
return axios.default.get(
|
||||
`/api/v1/admin/logs`,{
|
||||
...options,
|
||||
params: {...params, ...options?.params},}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getGetLogsQueryKey = (params?: GetLogsParams,) => {
|
||||
return [
|
||||
`/api/v1/admin/logs`, ...(params ? [params]: [])
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getGetLogsQueryOptions = <TData = Awaited<ReturnType<typeof getLogs>>, TError = AxiosError<ErrorResponse>>(params?: GetLogsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getLogs>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, axios: axiosOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetLogsQueryKey(params);
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getLogs>>> = ({ signal }) => getLogs(params, { signal, ...axiosOptions });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getLogs>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type GetLogsQueryResult = NonNullable<Awaited<ReturnType<typeof getLogs>>>
|
||||
export type GetLogsQueryError = AxiosError<ErrorResponse>
|
||||
|
||||
|
||||
export function useGetLogs<TData = Awaited<ReturnType<typeof getLogs>>, TError = AxiosError<ErrorResponse>>(
|
||||
params: undefined | GetLogsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getLogs>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getLogs>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getLogs>>
|
||||
> , 'initialData'
|
||||
>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetLogs<TData = Awaited<ReturnType<typeof getLogs>>, TError = AxiosError<ErrorResponse>>(
|
||||
params?: GetLogsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getLogs>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getLogs>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getLogs>>
|
||||
> , 'initialData'
|
||||
>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetLogs<TData = Awaited<ReturnType<typeof getLogs>>, TError = AxiosError<ErrorResponse>>(
|
||||
params?: GetLogsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getLogs>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary Get logs with optional filter
|
||||
*/
|
||||
|
||||
export function useGetLogs<TData = Awaited<ReturnType<typeof getLogs>>, TError = AxiosError<ErrorResponse>>(
|
||||
params?: GetLogsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getLogs>>, TError, TData>>, axios?: AxiosRequestConfig}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getGetLogsQueryOptions(params,options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,9 +7,13 @@
|
||||
*/
|
||||
|
||||
export interface Activity {
|
||||
id: string;
|
||||
user_id: string;
|
||||
document_id: string;
|
||||
activity_type: string;
|
||||
timestamp: string;
|
||||
device_id: string;
|
||||
start_time: string;
|
||||
title?: string;
|
||||
author?: string;
|
||||
duration: number;
|
||||
start_percentage: number;
|
||||
end_percentage: number;
|
||||
read_percentage: number;
|
||||
}
|
||||
|
||||
16
frontend/src/generated/model/backupType.ts
Normal file
16
frontend/src/generated/model/backupType.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
|
||||
export type BackupType = typeof BackupType[keyof typeof BackupType];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const BackupType = {
|
||||
COVERS: 'COVERS',
|
||||
DOCUMENTS: 'DOCUMENTS',
|
||||
} as const;
|
||||
12
frontend/src/generated/model/directoryItem.ts
Normal file
12
frontend/src/generated/model/directoryItem.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
|
||||
export interface DirectoryItem {
|
||||
name?: string;
|
||||
path?: string;
|
||||
}
|
||||
13
frontend/src/generated/model/directoryListResponse.ts
Normal file
13
frontend/src/generated/model/directoryListResponse.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
import type { DirectoryItem } from './directoryItem';
|
||||
|
||||
export interface DirectoryListResponse {
|
||||
current_path?: string;
|
||||
items?: DirectoryItem[];
|
||||
}
|
||||
12
frontend/src/generated/model/getAdmin200.ts
Normal file
12
frontend/src/generated/model/getAdmin200.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
import type { DatabaseInfo } from './databaseInfo';
|
||||
|
||||
export type GetAdmin200 = {
|
||||
database_info?: DatabaseInfo;
|
||||
};
|
||||
12
frontend/src/generated/model/getImportDirectoryParams.ts
Normal file
12
frontend/src/generated/model/getImportDirectoryParams.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
|
||||
export type GetImportDirectoryParams = {
|
||||
directory?: string;
|
||||
select?: string;
|
||||
};
|
||||
11
frontend/src/generated/model/getLogsParams.ts
Normal file
11
frontend/src/generated/model/getLogsParams.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
|
||||
export type GetLogsParams = {
|
||||
filter?: string;
|
||||
};
|
||||
16
frontend/src/generated/model/importResult.ts
Normal file
16
frontend/src/generated/model/importResult.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
import type { ImportResultStatus } from './importResultStatus';
|
||||
|
||||
export interface ImportResult {
|
||||
id?: string;
|
||||
name?: string;
|
||||
path?: string;
|
||||
status?: ImportResultStatus;
|
||||
error?: string;
|
||||
}
|
||||
17
frontend/src/generated/model/importResultStatus.ts
Normal file
17
frontend/src/generated/model/importResultStatus.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
|
||||
export type ImportResultStatus = typeof ImportResultStatus[keyof typeof ImportResultStatus];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const ImportResultStatus = {
|
||||
FAILED: 'FAILED',
|
||||
SUCCESS: 'SUCCESS',
|
||||
EXISTS: 'EXISTS',
|
||||
} as const;
|
||||
12
frontend/src/generated/model/importResultsResponse.ts
Normal file
12
frontend/src/generated/model/importResultsResponse.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
import type { ImportResult } from './importResult';
|
||||
|
||||
export interface ImportResultsResponse {
|
||||
results?: ImportResult[];
|
||||
}
|
||||
16
frontend/src/generated/model/importType.ts
Normal file
16
frontend/src/generated/model/importType.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
|
||||
export type ImportType = typeof ImportType[keyof typeof ImportType];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const ImportType = {
|
||||
DIRECT: 'DIRECT',
|
||||
COPY: 'COPY',
|
||||
} as const;
|
||||
@@ -8,25 +8,41 @@
|
||||
|
||||
export * from './activity';
|
||||
export * from './activityResponse';
|
||||
export * from './backupType';
|
||||
export * from './createDocumentBody';
|
||||
export * from './databaseInfo';
|
||||
export * from './device';
|
||||
export * from './directoryItem';
|
||||
export * from './directoryListResponse';
|
||||
export * from './document';
|
||||
export * from './documentResponse';
|
||||
export * from './documentsResponse';
|
||||
export * from './errorResponse';
|
||||
export * from './getActivityParams';
|
||||
export * from './getAdmin200';
|
||||
export * from './getDocumentsParams';
|
||||
export * from './getImportDirectoryParams';
|
||||
export * from './getLogsParams';
|
||||
export * from './getProgressListParams';
|
||||
export * from './getSearchParams';
|
||||
export * from './getSearchSource';
|
||||
export * from './graphDataPoint';
|
||||
export * from './graphDataResponse';
|
||||
export * from './homeResponse';
|
||||
export * from './importResult';
|
||||
export * from './importResultStatus';
|
||||
export * from './importResultsResponse';
|
||||
export * from './importType';
|
||||
export * from './leaderboardData';
|
||||
export * from './leaderboardEntry';
|
||||
export * from './logEntry';
|
||||
export * from './loginRequest';
|
||||
export * from './loginResponse';
|
||||
export * from './logsResponse';
|
||||
export * from './operationType';
|
||||
export * from './postAdminActionBody';
|
||||
export * from './postAdminActionBodyAction';
|
||||
export * from './postImportBody';
|
||||
export * from './postSearchBody';
|
||||
export * from './progress';
|
||||
export * from './progressListResponse';
|
||||
@@ -36,7 +52,10 @@ export * from './searchResponse';
|
||||
export * from './setting';
|
||||
export * from './settingsResponse';
|
||||
export * from './streaksResponse';
|
||||
export * from './updateUserBody';
|
||||
export * from './user';
|
||||
export * from './userData';
|
||||
export * from './userStatisticsResponse';
|
||||
export * from './userStreak';
|
||||
export * from './usersResponse';
|
||||
export * from './wordCount';
|
||||
9
frontend/src/generated/model/logEntry.ts
Normal file
9
frontend/src/generated/model/logEntry.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
|
||||
export type LogEntry = string;
|
||||
13
frontend/src/generated/model/logsResponse.ts
Normal file
13
frontend/src/generated/model/logsResponse.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
import type { LogEntry } from './logEntry';
|
||||
|
||||
export interface LogsResponse {
|
||||
logs?: LogEntry[];
|
||||
filter?: string;
|
||||
}
|
||||
17
frontend/src/generated/model/operationType.ts
Normal file
17
frontend/src/generated/model/operationType.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
|
||||
export type OperationType = typeof OperationType[keyof typeof OperationType];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const OperationType = {
|
||||
CREATE: 'CREATE',
|
||||
UPDATE: 'UPDATE',
|
||||
DELETE: 'DELETE',
|
||||
} as const;
|
||||
15
frontend/src/generated/model/postAdminActionBody.ts
Normal file
15
frontend/src/generated/model/postAdminActionBody.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
import type { PostAdminActionBodyAction } from './postAdminActionBodyAction';
|
||||
import type { BackupType } from './backupType';
|
||||
|
||||
export type PostAdminActionBody = {
|
||||
action: PostAdminActionBodyAction;
|
||||
backup_types?: BackupType[];
|
||||
restore_file?: Blob;
|
||||
};
|
||||
18
frontend/src/generated/model/postAdminActionBodyAction.ts
Normal file
18
frontend/src/generated/model/postAdminActionBodyAction.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
|
||||
export type PostAdminActionBodyAction = typeof PostAdminActionBodyAction[keyof typeof PostAdminActionBodyAction];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const PostAdminActionBodyAction = {
|
||||
BACKUP: 'BACKUP',
|
||||
RESTORE: 'RESTORE',
|
||||
METADATA_MATCH: 'METADATA_MATCH',
|
||||
CACHE_TABLES: 'CACHE_TABLES',
|
||||
} as const;
|
||||
13
frontend/src/generated/model/postImportBody.ts
Normal file
13
frontend/src/generated/model/postImportBody.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
import type { ImportType } from './importType';
|
||||
|
||||
export type PostImportBody = {
|
||||
directory: string;
|
||||
type: ImportType;
|
||||
};
|
||||
15
frontend/src/generated/model/updateUserBody.ts
Normal file
15
frontend/src/generated/model/updateUserBody.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
import type { OperationType } from './operationType';
|
||||
|
||||
export type UpdateUserBody = {
|
||||
operation: OperationType;
|
||||
user: string;
|
||||
password?: string;
|
||||
is_admin?: boolean;
|
||||
};
|
||||
13
frontend/src/generated/model/user.ts
Normal file
13
frontend/src/generated/model/user.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
|
||||
export interface User {
|
||||
id: string;
|
||||
admin: boolean;
|
||||
created_at: string;
|
||||
}
|
||||
12
frontend/src/generated/model/usersResponse.ts
Normal file
12
frontend/src/generated/model/usersResponse.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* AnthoLume API v1
|
||||
* REST API for AnthoLume document management system
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*/
|
||||
import type { User } from './user';
|
||||
|
||||
export interface UsersResponse {
|
||||
users?: User[];
|
||||
}
|
||||
Reference in New Issue
Block a user