init laravel

This commit is contained in:
2026-05-15 16:33:21 +03:30
commit 553238b0fb
164 changed files with 28627 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
export type User = {
id: number;
name: string;
email: string;
avatar?: string;
email_verified_at: string | null;
two_factor_enabled?: boolean;
created_at: string;
updated_at: string;
[key: string]: unknown;
};
export type Auth = {
user: User | null;
};
export type TwoFactorSetupData = {
svg: string;
url: string;
};
export type TwoFactorSecretKey = {
secretKey: string;
};

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

@@ -0,0 +1,19 @@
import type { Auth } from '@/types/auth';
declare module 'react' {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface InputHTMLAttributes<T> {
passwordrules?: string;
}
}
declare module '@inertiajs/core' {
export interface InertiaConfig {
sharedPageProps: {
name: string;
auth: Auth;
sidebarOpen: boolean;
[key: string]: unknown;
};
}
}

View File

@@ -0,0 +1,4 @@
export type * from './auth';
export type * from './navigation';
export type * from './streaming';
export type * from './ui';

View File

@@ -0,0 +1,14 @@
import type { InertiaLinkProps } from '@inertiajs/react';
import type { LucideIcon } from 'lucide-react';
export type BreadcrumbItem = {
title: string;
href: NonNullable<InertiaLinkProps['href']>;
};
export type NavItem = {
title: string;
href: NonNullable<InertiaLinkProps['href']>;
icon?: LucideIcon | null;
isActive?: boolean;
};

View File

@@ -0,0 +1,70 @@
export type Category = {
id: number;
name: string;
slug: string;
};
export type ChannelCard = {
id: number;
slug: string;
display_name: string;
description: string | null;
thumbnail_path: string | null;
viewer_count: number;
followers_count: number;
category: Category | null;
broadcast: {
id: number;
title: string;
started_at: string | null;
} | null;
owner: {
id: number;
name: string;
};
};
export type ChannelDetail = {
id: number;
slug: string;
display_name: string;
description: string | null;
is_live: boolean;
viewer_count: number;
followers_count: number;
category: Category | null;
owner: {
id: number;
name: string;
};
};
export type BroadcastSummary = {
id: number;
title: string;
status?: string;
hls_url?: string | null;
recording_enabled: boolean;
started_at: string | null;
ended_at?: string | null;
has_vod?: boolean;
};
export type VodSummary = {
id: number;
title: string;
playback_url: string | null;
duration_seconds: number | null;
published_at: string | null;
expires_at: string | null;
};
export type ChatMessage = {
id: number;
body: string;
created_at: string | null;
user: {
id: number;
name: string;
};
};

21
resources/js/types/ui.ts Normal file
View File

@@ -0,0 +1,21 @@
import type { ReactNode } from 'react';
import type { BreadcrumbItem } from '@/types/navigation';
export type AppLayoutProps = {
children: ReactNode;
breadcrumbs?: BreadcrumbItem[];
};
export type AppVariant = 'header' | 'sidebar';
export type FlashToast = {
type: 'success' | 'info' | 'warning' | 'error';
message: string;
};
export type AuthLayoutProps = {
children?: ReactNode;
name?: string;
title?: string;
description?: string;
};

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

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