Setup Inertia (#593)

This commit is contained in:
Saeed Vaziry
2025-05-10 10:10:11 +02:00
committed by GitHub
parent 6eb88c7c6e
commit 38bafd7654
305 changed files with 13378 additions and 15435 deletions

5
resources/js/types/global.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
import type { route as routeFn } from 'ziggy-js';
declare global {
const route: typeof routeFn;
}

57
resources/js/types/index.d.ts vendored Normal file
View File

@ -0,0 +1,57 @@
import { LucideIcon } from 'lucide-react';
import type { Config } from 'ziggy-js';
import type { Server } from '@/types/server';
export interface Auth {
user: User;
projects: Project[];
currentProject?: Project;
}
export interface BreadcrumbItem {
title: string;
href: string;
}
export interface NavGroup {
title: string;
items: NavItem[];
}
export interface NavItem {
title: string;
href: string;
activePath?: string;
icon?: LucideIcon | null;
isActive?: boolean;
}
export interface Configs {
server_providers: string[];
server_providers_custom_fields: {
[provider: string]: string[];
};
operating_systems: string[];
service_versions: {
[service: string]: string[];
};
webservers: string[];
databases: string[];
php_versions: string[];
[key: string]: unknown;
}
export interface SharedData {
name: string;
quote: { message: string; author: string };
auth: Auth;
ziggy: Config & { location: string };
sidebarOpen: boolean;
configs: Configs;
projectServers: Server[];
server?: Server;
publicKeyText: string;
[key: string]: unknown;
}

7
resources/js/types/project.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
export interface Project {
id: number;
name: string;
created_at: string;
updated_at: string;
[key: string]: unknown;
}

15
resources/js/types/server-log.d.ts vendored Normal file
View File

@ -0,0 +1,15 @@
export interface ServerLog {
id: number;
server_id: number;
site_id?: number;
type: string;
name: string;
disk: string;
is_remote: boolean;
created_at: string;
updated_at: string;
created_at_by_timezone: string;
updated_at_by_timezone: string;
[key: string]: unknown;
}

12
resources/js/types/server-provider.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
export interface ServerProvider {
id: number;
user_id: number;
name: string;
provider: string;
connected: boolean;
project_id?: number;
created_at: string;
updated_at: string;
[key: string]: unknown;
}

32
resources/js/types/server.d.ts vendored Normal file
View File

@ -0,0 +1,32 @@
export interface Server {
id: number;
project_id: number;
user_id: number;
name: string;
ssh_user: string;
ip: string;
local_ip?: string;
port: number;
os: string;
type: string;
type_data: string;
provider: string;
provider_id: number;
provider_data: string;
authentication: string;
public_key: string;
status: string;
auto_update: boolean;
available_updates: number;
security_updates: string;
progress?: string;
progress_step?: string;
updates?: string;
last_update_check?: string;
created_at: string;
updated_at: string;
created_at_by_timezone: string;
updated_at_by_timezone: string;
status_color: 'gray' | 'success' | 'info' | 'warning' | 'danger';
[key: string]: unknown;
}

10
resources/js/types/user.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
export interface User {
id: number;
name: string;
email: string;
avatar?: string;
email_verified_at: string | null;
created_at: string;
updated_at: string;
[key: string]: unknown; // This allows for additional properties...
}

1
resources/js/types/vite-env.d.ts vendored Normal file
View File

@ -0,0 +1 @@
/// <reference types="vite/client" />