import { UseMutationOptions, UseMutationResult, UseQueryResult } from 'react-query'; import { UseQueryOptions } from 'react-query/types/react/types'; import { AxiosError } from 'axios'; import { Notification } from './model'; import { ApiContext, ApiError, ListRequestQuery, PaginatedList, RequestBody, RequestQuery } from '../../api'; export type GetNotificationQuery = RequestQuery; export declare function getNotification(api: ApiContext, id: string, query?: GetNotificationQuery): Promise; export declare function useNotification(id?: string, query?: GetNotificationQuery, options?: Omit, 'queryFn' | 'queryKey'>): UseQueryResult; export interface NotificationList extends PaginatedList<'notifications', Notification> { total_unseen?: number; total_unread?: number; } export interface GetNotificationsQuery extends ListRequestQuery { is_seen?: boolean; is_read?: boolean; } export declare function getNotifications(api: ApiContext, query?: GetNotificationsQuery): Promise; export interface UseNotificationsOptions { onCreated?: (notification: Notification) => unknown; onUpdated?: (notification: Notification) => unknown; } export declare function useNotifications(query?: GetNotificationsQuery, options?: UseNotificationsOptions): UseQueryResult; export interface NotificationBody extends RequestBody { is_seen?: boolean | string; is_read?: boolean | string; } export declare function putNotification(api: ApiContext, id: string, body: NotificationBody): Promise; export type PutNotificationVariables = NotificationBody & { id: string; }; export declare function usePutNotification(options?: Omit, 'mutationFn'>): UseMutationResult; export declare function seeAllNotifications(api: ApiContext, query?: GetNotificationsQuery): Promise; export declare function useSeeAllNotifications(query?: GetNotificationsQuery, options?: Omit, 'mutationFn'>): UseMutationResult;