Initial commit

This commit is contained in:
AI
2026-05-03 07:26:12 +00:00
commit 776d374b59
57 changed files with 15968 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
export interface ApiRequestOptions {
signal?: AbortSignal
}
export interface ExampleHealthResponse {
status: 'ok'
}
export interface ExampleWelcomeResponse {
message: string
}
export interface ExampleApi {
getHealth: (options?: ApiRequestOptions) => Promise<ExampleHealthResponse>
getWelcome: (options?: ApiRequestOptions) => Promise<ExampleWelcomeResponse>
}
export interface ApiClients {
example: ExampleApi
}
+15
View File
@@ -0,0 +1,15 @@
import type { ComputedRef, Ref } from 'vue'
import type { AuthUser } from '~/stores/auth'
export type AuthMode = 'disabled' | 'mock' | 'userinfo'
export interface AuthClient {
mode: AuthMode
isEnabled: boolean
isReady: Ref<boolean>
isAuthenticated: ComputedRef<boolean>
user: Ref<AuthUser | null>
ensureInitialized: () => Promise<void>
login: () => void | Promise<void>
logout: () => void | Promise<void>
}
+21
View File
@@ -0,0 +1,21 @@
import type { LoggerApi } from '~/composables/useLogger'
import type { AuthClient } from '~/types/auth'
import type { ApiClients } from '~/types/api'
declare module '#app' {
interface NuxtApp {
$api: ApiClients
$auth: AuthClient
$logger: LoggerApi
}
}
declare module 'vue' {
interface ComponentCustomProperties {
$api: ApiClients
$auth: AuthClient
$logger: LoggerApi
}
}
export {}
+11
View File
@@ -0,0 +1,11 @@
import 'vue-router'
declare module 'vue-router' {
interface RouteMeta {
public?: boolean
requiresAuth?: boolean
roles?: string[]
}
}
export {}