ffplayout/types/index.d.ts

118 lines
2.4 KiB
TypeScript
Raw Normal View History

2024-02-21 17:18:23 +01:00
import { type JwtPayload } from 'jwt-decode'
2023-11-16 12:44:12 +01:00
export {}
2023-01-11 10:54:25 +01:00
declare global {
2024-02-21 17:18:23 +01:00
interface JwtPayloadExt extends JwtPayload {
role: string
}
interface LoginObj {
message: string
user?: {
id: number
mail: string
username: string
token
}
}
2023-09-26 09:29:46 +02:00
interface GuiConfig {
id: number
config_path: string
extra_extensions: string | string[]
name: string
preview_url: string
service: string
uts_offset?: number
}
interface User {
username: String
2023-11-23 22:37:35 +01:00
mail?: String
2023-09-26 09:29:46 +02:00
password?: String
confirm?: String
admin?: Boolean
2023-09-26 09:29:46 +02:00
role_id?: Number
}
2023-11-16 12:44:12 +01:00
interface Crumb {
2023-01-11 10:54:25 +01:00
text: string
path: string
}
interface Payload {
2023-11-16 12:44:12 +01:00
method: string
headers: any
body?: any
}
2023-01-11 10:54:25 +01:00
interface PlaylistItem {
uid: string
begin: number
source: string
duration: number
in: number
out: number
audio?: string
category?: string
custom_filter?: string
class?: string
}
interface FileObject {
name: string
duration: number
}
interface Folder {
uid: string
name: string
}
interface FileFolderObject {
2023-01-11 10:54:25 +01:00
source: string
parent: string
2024-04-07 23:27:52 +02:00
parent_folders: Folder[]
folders: Folder[]
2023-01-11 10:54:25 +01:00
files: FileObject[]
}
interface FolderObject {
source: string
parent: string
folders: Folder[]
}
2023-01-11 10:54:25 +01:00
interface SourceObject {
type: string
src: string
}
interface TemplateItem {
start: string
duration: string
shuffle: boolean
paths: string[]
}
interface Template {
sources: TemplateItem[]
}
interface BodyObject {
paths?: string[]
template?: Template
}
2023-11-16 12:44:12 +01:00
interface SystemStatistics {
cpu: { cores: number; usage: number }
load: { one: number; five: number; fifteen: number }
memory: { total: number; used: number; free: number }
network?: { name: String; current_in: number; current_out: number; total_in: number; total_out: number }
storage?: { path: String; total: number; used: number }
swap: { total: number; used: number; free: number }
2024-01-29 08:19:37 +01:00
system: { name?: String; kernel?: String; version?: String, ffp_version?: string }
2023-11-16 12:44:12 +01:00
}
2023-01-11 10:54:25 +01:00
}