diff --git a/public/app/features/auth-config/index.ts b/public/app/features/auth-config/index.ts index 32a1301d920..fab10de59fc 100644 --- a/public/app/features/auth-config/index.ts +++ b/public/app/features/auth-config/index.ts @@ -1,6 +1,6 @@ -import { AuthProviderStatus, Settings, SettingsSection } from 'app/types'; +import { Settings, SettingsSection } from 'app/types'; -import { AuthProviderInfo, GetStatusHook } from './types'; +import { AuthProviderInfo, GetStatusHook, AuthProviderStatus } from './types'; export * from './types'; diff --git a/public/app/features/auth-config/state/actions.ts b/public/app/features/auth-config/state/actions.ts index 07ab3512c1c..16b369523e6 100644 --- a/public/app/features/auth-config/state/actions.ts +++ b/public/app/features/auth-config/state/actions.ts @@ -2,16 +2,10 @@ import { lastValueFrom } from 'rxjs'; import { getBackendSrv, isFetchError } from '@grafana/runtime'; import { contextSrv } from 'app/core/core'; -import { - AccessControlAction, - Settings, - ThunkResult, - SettingsError, - UpdateSettingsQuery, - AuthProviderStatus, -} from 'app/types'; +import { AccessControlAction, Settings, ThunkResult, UpdateSettingsQuery } from 'app/types'; import { getAuthProviderStatus, getRegisteredAuthProviders } from '..'; +import { AuthProviderStatus, SettingsError } from '../types'; import { loadingBegin, loadingEnd, providerStatusesLoaded, resetError, setError, settingsUpdated } from './reducers'; diff --git a/public/app/features/auth-config/state/reducers.ts b/public/app/features/auth-config/state/reducers.ts index 88e7674be05..8153760f1dd 100644 --- a/public/app/features/auth-config/state/reducers.ts +++ b/public/app/features/auth-config/state/reducers.ts @@ -1,6 +1,8 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit'; -import { AuthConfigState, AuthProviderStatus, Settings, SettingsError } from 'app/types'; +import { Settings } from 'app/types'; + +import { SettingsError, AuthProviderStatus, AuthConfigState } from '../types'; export const initialState: AuthConfigState = { settings: {}, diff --git a/public/app/features/auth-config/types.ts b/public/app/features/auth-config/types.ts index 5bbf127d1da..dfff571706e 100644 --- a/public/app/features/auth-config/types.ts +++ b/public/app/features/auth-config/types.ts @@ -1,4 +1,4 @@ -import { AuthProviderStatus } from 'app/types'; +import { Settings } from 'app/types'; export interface AuthProviderInfo { id: string; @@ -9,3 +9,23 @@ export interface AuthProviderInfo { } export type GetStatusHook = () => Promise; + +export interface AuthConfigState { + settings: Settings; + providerStatuses: Record; + isLoading?: boolean; + updateError?: SettingsError; + warning?: SettingsError; +} + +export interface AuthProviderStatus { + enabled: boolean; + configured: boolean; + configFoundInIniFile?: boolean; + hide?: boolean; +} + +export interface SettingsError { + message: string; + errors: string[]; +} diff --git a/public/app/types/configAuth.ts b/public/app/types/configAuth.ts deleted file mode 100644 index c72e05a038d..00000000000 --- a/public/app/types/configAuth.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Settings } from 'app/types'; - -export interface AuthConfigState { - settings: Settings; - providerStatuses: Record; - isLoading?: boolean; - updateError?: SettingsError; - warning?: SettingsError; -} - -export interface AuthProviderStatus { - enabled: boolean; - configured: boolean; - hide?: boolean; -} - -export interface SettingsError { - message: string; - errors: string[]; -} diff --git a/public/app/types/index.ts b/public/app/types/index.ts index fe3fb7a7f63..7ac6a9346e7 100644 --- a/public/app/types/index.ts +++ b/public/app/types/index.ts @@ -18,7 +18,6 @@ export * from './appEvent'; export * from './query'; export * from './accessControl'; export * from './supportBundles'; -export * from './configAuth'; export * from './settings'; import * as CoreEvents from './events';