grafana/public/app/features/preferences/api/index.ts
Alex Khomenko 7111c52e4c
Nav: Add items to saved (#89908)
* App events: Add info notification type

* Revert state

* Use info alert

* Nav: Enable saving items

* Use local state

* Use RTK query

* Revert go.work

* Revert

* User-specific queries

* Add memo

* Fix base URL

* Switch to ids

* Fix memo

* Add codeowners

* Generate API

* Separate user prefs API

* Remove tag

* Update export

* Use feature toggle
2024-07-05 16:01:10 +03:00

20 lines
543 B
TypeScript

import { generatedAPI } from './user/endpoints.gen';
export const { useGetUserPreferencesQuery, usePatchUserPreferencesMutation, useUpdateUserPreferencesMutation } =
generatedAPI;
export const userPreferencesAPI = generatedAPI.enhanceEndpoints({
addTagTypes: ['UserPreferences'],
endpoints: {
getUserPreferences: {
providesTags: ['UserPreferences'],
},
updateUserPreferences: {
invalidatesTags: ['UserPreferences'],
},
patchUserPreferences: {
invalidatesTags: ['UserPreferences'],
},
},
});