Initialize Nuxt.js project with Docker deployment setup
- Add core Nuxt.js application structure with TypeScript - Include Docker configuration and deployment guide - Set up project scaffolding with pages, composables, and middleware - Add environment configuration and Git ignore rules
This commit is contained in:
104
utils/types.ts
Normal file
104
utils/types.ts
Normal file
@@ -0,0 +1,104 @@
|
||||
// utils/types.ts
|
||||
export interface User {
|
||||
id: string;
|
||||
email: string;
|
||||
name: string;
|
||||
groups?: string[];
|
||||
tier?: string;
|
||||
}
|
||||
|
||||
export interface AuthState {
|
||||
authenticated: boolean;
|
||||
user: User | null;
|
||||
groups: string[];
|
||||
}
|
||||
|
||||
export interface ApiResponse<T = any> {
|
||||
success: boolean;
|
||||
data?: T;
|
||||
error?: string;
|
||||
message?: string;
|
||||
}
|
||||
|
||||
export interface FileUpload {
|
||||
fieldName: string;
|
||||
fileName: string;
|
||||
originalName: string;
|
||||
size: number;
|
||||
contentType: string;
|
||||
}
|
||||
|
||||
export interface DatabaseRecord {
|
||||
id: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export interface HealthCheck {
|
||||
status: 'healthy' | 'degraded' | 'unhealthy';
|
||||
timestamp: string;
|
||||
checks: {
|
||||
server: string;
|
||||
database: string;
|
||||
storage: string;
|
||||
auth: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface TokenResponse {
|
||||
access_token: string;
|
||||
refresh_token: string;
|
||||
id_token: string;
|
||||
token_type: string;
|
||||
expires_in: number;
|
||||
}
|
||||
|
||||
export interface UserInfo {
|
||||
sub: string;
|
||||
email: string;
|
||||
given_name?: string;
|
||||
family_name?: string;
|
||||
name?: string;
|
||||
groups?: string[];
|
||||
tier?: string;
|
||||
}
|
||||
|
||||
export interface SessionData {
|
||||
user: {
|
||||
id: string;
|
||||
email: string;
|
||||
name: string;
|
||||
groups?: string[];
|
||||
tier?: string;
|
||||
};
|
||||
tokens: {
|
||||
accessToken: string;
|
||||
refreshToken: string;
|
||||
expiresAt: number;
|
||||
};
|
||||
createdAt: number;
|
||||
lastActivity: number;
|
||||
}
|
||||
|
||||
export interface KeycloakConfig {
|
||||
issuer: string;
|
||||
clientId: string;
|
||||
clientSecret: string;
|
||||
callbackUrl: string;
|
||||
}
|
||||
|
||||
export interface NocoDBConfig {
|
||||
url: string;
|
||||
token: string;
|
||||
baseId: string;
|
||||
}
|
||||
|
||||
export interface MinIOConfig {
|
||||
endPoint: string;
|
||||
port: number;
|
||||
useSSL: boolean;
|
||||
accessKey: string;
|
||||
secretKey: string;
|
||||
bucketName: string;
|
||||
}
|
||||
Reference in New Issue
Block a user