182 lines
4.7 KiB
TypeScript
182 lines
4.7 KiB
TypeScript
export const BunSQLiteTables = [
|
|
"users",
|
|
"user_types",
|
|
"media",
|
|
"media_paradigms",
|
|
"clients",
|
|
"hosts",
|
|
"client_rules",
|
|
"variables",
|
|
] as const
|
|
|
|
export type BUN_SQLITE_WGUI_USERS = {
|
|
/**
|
|
* The unique identifier of the record.
|
|
*/
|
|
id?: number | "";
|
|
/**
|
|
* The time when the record was created. (Unix Timestamp)
|
|
*/
|
|
created_at?: number | "";
|
|
/**
|
|
* The time when the record was updated. (Unix Timestamp)
|
|
*/
|
|
updated_at?: number | "";
|
|
first_name?: string;
|
|
last_name?: string;
|
|
email?: string;
|
|
username?: string;
|
|
password?: string;
|
|
bio?: string;
|
|
archived?: 0 | 1 | "";
|
|
}
|
|
|
|
export type BUN_SQLITE_WGUI_USER_TYPES = {
|
|
/**
|
|
* The unique identifier of the record.
|
|
*/
|
|
id?: number | "";
|
|
/**
|
|
* The time when the record was created. (Unix Timestamp)
|
|
*/
|
|
created_at?: number | "";
|
|
/**
|
|
* The time when the record was updated. (Unix Timestamp)
|
|
*/
|
|
updated_at?: number | "";
|
|
user_id?: number | "";
|
|
user_type?: "super_admin" | "admin" | "revoked" | "";
|
|
}
|
|
|
|
export type BUN_SQLITE_WGUI_MEDIA = {
|
|
/**
|
|
* The unique identifier of the record.
|
|
*/
|
|
id?: number | "";
|
|
/**
|
|
* The time when the record was created. (Unix Timestamp)
|
|
*/
|
|
created_at?: number | "";
|
|
/**
|
|
* The time when the record was updated. (Unix Timestamp)
|
|
*/
|
|
updated_at?: number | "";
|
|
user_id?: number | "";
|
|
title?: string;
|
|
description?: string;
|
|
summary?: string;
|
|
media_type?: "image" | "video" | "document" | "";
|
|
media_write_path?: string;
|
|
media_thumbnail_write_path?: string;
|
|
mime_type?: string;
|
|
text_content?: string;
|
|
is_primary?: 0 | 1 | "";
|
|
is_rag_ingested?: 0 | 1 | "";
|
|
is_private?: 0 | 1 | "";
|
|
archived?: 0 | 1 | "";
|
|
}
|
|
|
|
export type BUN_SQLITE_WGUI_MEDIA_PARADIGMS = {
|
|
/**
|
|
* The unique identifier of the record.
|
|
*/
|
|
id?: number | "";
|
|
/**
|
|
* The time when the record was created. (Unix Timestamp)
|
|
*/
|
|
created_at?: number | "";
|
|
/**
|
|
* The time when the record was updated. (Unix Timestamp)
|
|
*/
|
|
updated_at?: number | "";
|
|
media_id?: number | "";
|
|
media_paradigm?: "user-profile-image" | "generic" | "event" | "";
|
|
}
|
|
|
|
export type BUN_SQLITE_WGUI_CLIENTS = {
|
|
/**
|
|
* The unique identifier of the record.
|
|
*/
|
|
id?: number | "";
|
|
/**
|
|
* The time when the record was created. (Unix Timestamp)
|
|
*/
|
|
created_at?: number | "";
|
|
/**
|
|
* The time when the record was updated. (Unix Timestamp)
|
|
*/
|
|
updated_at?: number | "";
|
|
user_id?: number | "";
|
|
host_id?: number | "";
|
|
name?: string;
|
|
wg_ip_address?: string;
|
|
public_ip_address?: string;
|
|
public_key?: string;
|
|
allowed_ips?: string;
|
|
allow_all_ips?: 0 | 1 | "";
|
|
notes?: string;
|
|
}
|
|
|
|
export type BUN_SQLITE_WGUI_HOSTS = {
|
|
/**
|
|
* The unique identifier of the record.
|
|
*/
|
|
id?: number | "";
|
|
/**
|
|
* The time when the record was created. (Unix Timestamp)
|
|
*/
|
|
created_at?: number | "";
|
|
/**
|
|
* The time when the record was updated. (Unix Timestamp)
|
|
*/
|
|
updated_at?: number | "";
|
|
user_id?: number | "";
|
|
name?: string;
|
|
short_description?: string;
|
|
public_ip_address?: string;
|
|
listen_port?: number | "";
|
|
interface?: string;
|
|
wg_ip_address?: string;
|
|
public_key?: string;
|
|
}
|
|
|
|
export type BUN_SQLITE_WGUI_CLIENT_RULES = {
|
|
/**
|
|
* The unique identifier of the record.
|
|
*/
|
|
id?: number | "";
|
|
/**
|
|
* The time when the record was created. (Unix Timestamp)
|
|
*/
|
|
created_at?: number | "";
|
|
/**
|
|
* The time when the record was updated. (Unix Timestamp)
|
|
*/
|
|
updated_at?: number | "";
|
|
user_id?: number | "";
|
|
host_id?: number | "";
|
|
client_id?: number | "";
|
|
rule_type?: "all" | "destination" | "";
|
|
destination?: string;
|
|
ports?: string;
|
|
protocol?: "any" | "tcp" | "udp" | "";
|
|
}
|
|
|
|
export type BUN_SQLITE_WGUI_VARIABLES = {
|
|
/**
|
|
* The unique identifier of the record.
|
|
*/
|
|
id?: number | "";
|
|
/**
|
|
* The time when the record was created. (Unix Timestamp)
|
|
*/
|
|
created_at?: number | "";
|
|
/**
|
|
* The time when the record was updated. (Unix Timestamp)
|
|
*/
|
|
updated_at?: number | "";
|
|
key?: "main_host_wg_ip_address" | "main_host_public_ip_address" | "main_host_wg_public_key" | "main_host_wg_private_key" | "main_host_public_interface" | "";
|
|
value?: string;
|
|
}
|
|
|
|
export type BUN_SQLITE_WGUI_ALL_TYPEDEFS = BUN_SQLITE_WGUI_USERS & BUN_SQLITE_WGUI_USER_TYPES & BUN_SQLITE_WGUI_MEDIA & BUN_SQLITE_WGUI_MEDIA_PARADIGMS & BUN_SQLITE_WGUI_CLIENTS & BUN_SQLITE_WGUI_HOSTS & BUN_SQLITE_WGUI_CLIENT_RULES & BUN_SQLITE_WGUI_VARIABLES |