@@ -0,0 +1,36 @@
|
||||
export type User = {
|
||||
id: number;
|
||||
name: string;
|
||||
email: string;
|
||||
avatar?: string;
|
||||
email_verified_at: string | null;
|
||||
two_factor_enabled?: boolean;
|
||||
tenant_id: number | null;
|
||||
is_platform_admin: boolean;
|
||||
is_active: boolean;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
|
||||
export type Auth = {
|
||||
user: User;
|
||||
permissions: string[];
|
||||
};
|
||||
|
||||
export type Passkey = {
|
||||
id: number;
|
||||
name: string;
|
||||
authenticator: string | null;
|
||||
created_at_diff: string;
|
||||
last_used_at_diff: string | null;
|
||||
};
|
||||
|
||||
export type TwoFactorSetupData = {
|
||||
svg: string;
|
||||
url: string;
|
||||
};
|
||||
|
||||
export type TwoFactorSecretKey = {
|
||||
secretKey: string;
|
||||
};
|
||||
Vendored
+19
@@ -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;
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export type * from './auth';
|
||||
export type * from './navigation';
|
||||
export type * from './ui';
|
||||
@@ -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;
|
||||
};
|
||||
@@ -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;
|
||||
};
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
Reference in New Issue
Block a user