more type fixes ❇️

This commit is contained in:
Gilles De Mey 2025-10-06 14:59:37 +02:00
parent 957642ebe4
commit 7db96fb27c
5 changed files with 6 additions and 1110 deletions

View File

@ -1,5 +1,5 @@
import { RoutingTree } from '../../api/v0alpha1/api.gen';
import { LabelMatcherFactory, RouteFactory } from '../../api/v0alpha1/mocks/fakes/Routes';
import { LabelMatcherFactory, RouteFactory } from '../../api/notifications/v0alpha1/mocks/fakes/Routes';
import { RoutingTree } from '../../api/notifications/v0alpha1/notifications.api.gen';
import { Label } from '../../matchers/types';
import { matchInstancesToRouteTrees } from './useMatchPolicies';

View File

@ -2,13 +2,13 @@ import { configureStore } from '@reduxjs/toolkit';
import { useEffect } from 'react';
import { Provider } from 'react-redux';
import { notificationsAPI } from '../src/unstable';
import { notificationsAPIv0alpha1 } from '../src/unstable';
// create an empty store
export const store = configureStore({
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(notificationsAPI.middleware),
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(notificationsAPIv0alpha1.middleware),
reducer: {
[notificationsAPI.reducerPath]: notificationsAPI.reducer,
[notificationsAPIv0alpha1.reducerPath]: notificationsAPIv0alpha1.reducer,
},
});
@ -35,7 +35,7 @@ export const getDefaultWrapper = () => {
function useResetQueryCacheAfterUnmount() {
useEffect(() => {
return () => {
store.dispatch(notificationsAPI.util.resetApiState());
store.dispatch(notificationsAPIv0alpha1.util.resetApiState());
};
}, []);
}

View File

@ -1,14 +0,0 @@
import { createApi } from '@reduxjs/toolkit/query/react';
import { createBaseQuery } from 'app/api/createBaseQuery';
import { getAPIBaseURL } from 'app/api/utils';
export const BASE_URL = getAPIBaseURL('rules.alerting.grafana.app', 'v0alpha1');
export const api = createApi({
reducerPath: 'rulesAPIv0alpha1',
baseQuery: createBaseQuery({
baseURL: BASE_URL,
}),
endpoints: () => ({}),
});

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
import { generatedAPI } from './endpoints.gen';
export const rulesAPIv0alpha1 = generatedAPI.enhanceEndpoints({});