diff --git a/dashboard/src/theme/constants.ts b/dashboard/src/theme/constants.ts index 7844da86d..f36c90dcf 100644 --- a/dashboard/src/theme/constants.ts +++ b/dashboard/src/theme/constants.ts @@ -1,2 +1,5 @@ export const LIGHT_THEME_NAME = "BlueBusinessTheme"; export const DARK_THEME_NAME = "BlueBusinessDarkTheme"; + +// Theme related types +export type ThemeMode = "light" | "dark" | "auto"; \ No newline at end of file diff --git a/dashboard/src/types/api.ts b/dashboard/src/types/api.ts new file mode 100644 index 000000000..efa99e99e --- /dev/null +++ b/dashboard/src/types/api.ts @@ -0,0 +1,37 @@ +// API Key related types +export interface ApiKey { + key_id: string; + name: string; + key_prefix: string; + scopes: string[]; + is_revoked: boolean; + is_expired: boolean; + last_used_at: string | null; + created_at: string; + expires_at: string | null; +} + +export type ApiKeyExpiresDays = 1 | 7 | 30 | 90 | "permanent"; + +export interface ApiKeyCreatePayload { + name: string; + scopes: string[]; + expires_in_days?: number; +} + +export interface ApiKeyListResponse { + status: "ok" | "error"; + data: ApiKey[]; + message?: string; +} + +export interface ApiKeyCreateResponse { + status: "ok" | "error"; + data?: ApiKey & { api_key: string }; // Include the full API key in the response + message?: string; +} + +export interface ApiKeyActionResponse { + status: "ok" | "error"; + message?: string; +} diff --git a/dashboard/src/types/themeTypes/ThemeType.ts b/dashboard/src/types/themeTypes/ThemeType.ts index 010a7a1c3..ae4cdd2d6 100644 --- a/dashboard/src/types/themeTypes/ThemeType.ts +++ b/dashboard/src/types/themeTypes/ThemeType.ts @@ -3,8 +3,8 @@ export type ThemeTypes = { dark: boolean; variables?: object; colors: { - primary?: string; - secondary?: string; + primary: string; + secondary: string; tertiary?: string; info?: string; success?: string; diff --git a/dashboard/src/views/Settings.vue b/dashboard/src/views/Settings.vue index aecbc2161..dc731779b 100644 --- a/dashboard/src/views/Settings.vue +++ b/dashboard/src/views/Settings.vue @@ -338,7 +338,7 @@