import type { LiftedAction, LiftedState } from '@redux-devtools/core'; import type { createApi, QueryCacheKey, QueryStatus } from '@reduxjs/toolkit/query'; import type { Action, AnyAction, Dispatch } from '@reduxjs/toolkit'; import type { ComponentType } from 'react'; import { base16Themes } from 'react-base16-styling'; import type { Base16Theme } from 'react-base16-styling'; import type { QueryComparators } from './utils/comparators.js'; import type { QueryFilters } from './utils/filters.js'; export declare enum QueryPreviewTabs { data = 0, queryinfo = 1, apiConfig = 2, querySubscriptions = 3, queryTags = 4, actions = 5 } export interface QueryFormValues { queryComparator: QueryComparators; isAscendingQueryComparatorOrder: boolean; searchValue: string; isRegexSearch: boolean; queryFilter: QueryFilters; } export interface RtkQueryMonitorState { readonly queryForm: { values: QueryFormValues; }; readonly selectedQueryKey: Pick | null; readonly selectedPreviewTab: QueryPreviewTabs; } export interface RtkQueryMonitorProps> extends LiftedState { dispatch: Dispatch>; theme: keyof typeof base16Themes | Base16Theme; invertTheme: boolean; } export type RtkQueryApiState = ReturnType['reducer']>; export type RtkQueryState = NonNullable; export type RtkMutationState = NonNullable; export type RtkQueryApiConfig = RtkQueryApiState['config']; export type FullTagDescription = { type: TagType; id?: number | string; }; export type RtkQueryProvidedTagsState = { [x: string]: { [id: string]: QueryCacheKey[]; [id: number]: QueryCacheKey[]; }; }; export type RtkQuery262ProvidedState = { keys: Record[]>; tags: RtkQueryProvidedTagsState; }; export declare function isRtkQuery262Provided(provided: Record): provided is RtkQuery262ProvidedState; export interface ExternalProps> { dispatch: Dispatch>; theme: keyof typeof base16Themes | Base16Theme; hideMainButtons?: boolean; invertTheme: boolean; } export interface QueryInfo { type: 'query'; state: RtkQueryState; queryKey: string; reducerPath: string; } export interface MutationInfo { type: 'mutation'; state: RtkMutationState; queryKey: string; reducerPath: string; } export type RtkResourceInfo = QueryInfo | MutationInfo; export interface ApiInfo { reducerPath: string; apiState: RtkQueryApiState; } export interface SelectOption { label: string; value: T; visible?: Record | boolean; } export interface SelectorsSource { userState: S | null; monitorState: RtkQueryMonitorState; currentStateIndex: number; actionsById: LiftedState['actionsById']; } export interface StyleUtils { readonly base16Theme: Base16Theme; readonly invertTheme: boolean; } export type RTKQuerySubscribers = NonNullable; export interface RtkQueryTag { type: string; id?: number | string; } interface Tally { count: number; } export type QueryTally = { [key in QueryStatus]?: number; } & Tally; export interface RtkRequestTiming { requestId: string; queryKey: string; endpointName: string; startedAt: string; completedAt: string; duration: string; } export interface QueryTimings { readonly oldest: RtkRequestTiming | null; readonly latest: RtkRequestTiming | null; readonly slowest: RtkRequestTiming | null; readonly fastest: RtkRequestTiming | null; readonly average: string; readonly median: string; } export interface ApiTimings { readonly queries: QueryTimings; readonly mutations: QueryTimings; } export interface ApiStats { readonly timings: ApiTimings; readonly tally: Readonly<{ subscriptions: number; cachedQueries: QueryTally; tagTypes: number; cachedMutations: QueryTally; }>; } export interface TabOption extends SelectOption { component: ComponentType

; } /** * It is Omit & { isFetching: boolean; } */ export interface RTKStatusFlags { readonly isUninitialized: boolean; readonly isFetching: boolean; readonly isSuccess: boolean; readonly isError: boolean; } export type RtkRequest = { status: QueryStatus; queryKey: string; requestId: string; endpointName: string; startedTimeStamp?: number; fulfilledTimeStamp?: number; }; export {};