Reporting: Add API skeleton

This commit is contained in:
Juan Cabanas
2025-05-02 10:05:46 -03:00
committed by GitHub
parent d8ffe6170e
commit 847b07dee2
3 changed files with 15 additions and 0 deletions
@@ -0,0 +1,11 @@
import { createApi } from '@reduxjs/toolkit/query/react';
import { createBaseQuery } from '../../createBaseQuery';
export const BASE_URL = '/api/reports';
export const reportingAPI = createApi({
baseQuery: createBaseQuery({ baseURL: BASE_URL }),
reducerPath: 'reportingAPI',
endpoints: () => ({}),
});
+2
View File
@@ -32,6 +32,7 @@ import { folderAPI } from '../../api/clients/folder';
import { iamAPI } from '../../api/clients/iam';
import { playlistAPI } from '../../api/clients/playlist';
import { provisioningAPI } from '../../api/clients/provisioning';
import { reportingAPI } from '../../api/clients/reporting/baseAPI';
import { alertingApi } from '../../features/alerting/unified/api/alertingApi';
import { userPreferencesAPI } from '../../features/preferences/api';
import { cleanUpAction } from '../actions/cleanUp';
@@ -71,6 +72,7 @@ const rootReducers = {
[provisioningAPI.reducerPath]: provisioningAPI.reducer,
[folderAPI.reducerPath]: folderAPI.reducer,
[advisorAPI.reducerPath]: advisorAPI.reducer,
[reportingAPI.reducerPath]: reportingAPI.reducer,
// PLOP_INJECT_REDUCER
// Used by the API client generator
};
+2
View File
@@ -2,6 +2,7 @@ import { configureStore as reduxConfigureStore, createListenerMiddleware } from
import { setupListeners } from '@reduxjs/toolkit/query';
import { Middleware } from 'redux';
import { reportingAPI } from 'app/api/clients/reporting/baseAPI';
import { browseDashboardsAPI } from 'app/features/browse-dashboards/api/browseDashboardsAPI';
import { publicDashboardApi } from 'app/features/dashboard/api/publicDashboardApi';
import { cloudMigrationAPI } from 'app/features/migrate-to-cloud/api';
@@ -51,6 +52,7 @@ export function configureStore(initialState?: Partial<StoreState>) {
provisioningAPI.middleware,
folderAPI.middleware,
advisorAPI.middleware,
reportingAPI.middleware,
// PLOP_INJECT_MIDDLEWARE
// Used by the API client generator
...extraMiddleware