Init
This commit is contained in:
36
resources/js/types/auth/config.ts
Normal file
36
resources/js/types/auth/config.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
export interface AuthFeatures {
|
||||
registration: boolean
|
||||
password_reset: boolean
|
||||
remember_me: boolean
|
||||
email_verification: boolean
|
||||
}
|
||||
|
||||
export interface AuthPageConfig {
|
||||
title: string
|
||||
description: string
|
||||
icon: string
|
||||
submit_label: string
|
||||
}
|
||||
|
||||
export interface AuthProvider {
|
||||
key: string
|
||||
label: string
|
||||
icon: string
|
||||
}
|
||||
|
||||
export interface AuthLegal {
|
||||
terms_url: string | null
|
||||
privacy_url: string | null
|
||||
show_in_register: boolean
|
||||
}
|
||||
|
||||
export interface AuthConfig {
|
||||
appName: string
|
||||
features: AuthFeatures
|
||||
login: AuthPageConfig
|
||||
register: AuthPageConfig
|
||||
forgotPassword: AuthPageConfig
|
||||
resetPassword: AuthPageConfig
|
||||
providers: AuthProvider[]
|
||||
legal: AuthLegal
|
||||
}
|
||||
1
resources/js/types/auth/index.ts
Normal file
1
resources/js/types/auth/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './config'
|
||||
4
resources/js/types/index.ts
Normal file
4
resources/js/types/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// Re-export all types for convenience
|
||||
export * from './auth'
|
||||
export * from './inertia'
|
||||
export * from './models'
|
||||
6
resources/js/types/inertia/flash.ts
Normal file
6
resources/js/types/inertia/flash.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export interface Flash {
|
||||
success: string | null
|
||||
error: string | null
|
||||
message: string | null
|
||||
status: string | null
|
||||
}
|
||||
2
resources/js/types/inertia/index.ts
Normal file
2
resources/js/types/inertia/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './flash'
|
||||
export * from './page-props'
|
||||
11
resources/js/types/inertia/page-props.ts
Normal file
11
resources/js/types/inertia/page-props.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { AuthConfig } from '../auth'
|
||||
import type { User } from '../models'
|
||||
import type { Flash } from './flash'
|
||||
|
||||
export interface PageProps {
|
||||
auth: {
|
||||
user: User | null
|
||||
}
|
||||
flash: Flash
|
||||
authConfig: AuthConfig
|
||||
}
|
||||
1
resources/js/types/models/index.ts
Normal file
1
resources/js/types/models/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './user'
|
||||
11
resources/js/types/models/user.ts
Normal file
11
resources/js/types/models/user.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export interface User {
|
||||
id: number
|
||||
username: string
|
||||
first_name: string
|
||||
last_name: string
|
||||
full_name: string
|
||||
email: string
|
||||
email_verified_at: string | null
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
Reference in New Issue
Block a user