Add host setup functions and client components
This commit is contained in:
@@ -186,6 +186,10 @@ const schema: BUN_SQLITE_DatabaseSchemaType = {
|
||||
fieldName: "allowed_ips",
|
||||
dataType: "TEXT",
|
||||
},
|
||||
{
|
||||
fieldName: "notes",
|
||||
dataType: "TEXT",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -209,6 +213,24 @@ const schema: BUN_SQLITE_DatabaseSchemaType = {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
tableName: "client_rules",
|
||||
tableDescription: `IP table rules for this client`,
|
||||
fields: [
|
||||
{
|
||||
fieldName: "user_id",
|
||||
dataType: "INTEGER",
|
||||
},
|
||||
{
|
||||
fieldName: "client_id",
|
||||
dataType: "INTEGER",
|
||||
},
|
||||
{
|
||||
fieldName: "rule",
|
||||
dataType: "TEXT",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
tableName: "variables",
|
||||
fields: [
|
||||
|
||||
+22
-2
@@ -5,6 +5,7 @@ export const BunSQLiteTables = [
|
||||
"media_paradigms",
|
||||
"clients",
|
||||
"hosts",
|
||||
"client_rules",
|
||||
"variables",
|
||||
] as const
|
||||
|
||||
@@ -113,6 +114,7 @@ export type BUN_SQLITE_WGUI_CLIENTS = {
|
||||
private_key?: string;
|
||||
public_key?: string;
|
||||
allowed_ips?: string;
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
export type BUN_SQLITE_WGUI_HOSTS = {
|
||||
@@ -134,6 +136,24 @@ export type BUN_SQLITE_WGUI_HOSTS = {
|
||||
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 | "";
|
||||
client_id?: number | "";
|
||||
rule?: string;
|
||||
}
|
||||
|
||||
export type BUN_SQLITE_WGUI_VARIABLES = {
|
||||
/**
|
||||
* The unique identifier of the record.
|
||||
@@ -147,8 +167,8 @@ export type BUN_SQLITE_WGUI_VARIABLES = {
|
||||
* The time when the record was updated. (Unix Timestamp)
|
||||
*/
|
||||
updated_at?: number | "";
|
||||
key?: "main_host_wg_ip_address" | "";
|
||||
key?: "main_host_wg_ip_address" | "main_host_wg_public_key" | "main_host_wg_private_key" | "";
|
||||
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_VARIABLES
|
||||
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
|
||||
Reference in New Issue
Block a user