This commit is contained in:
2026-05-28 08:48:41 +02:00
parent 28da6f6165
commit a8b7622667
14 changed files with 2702 additions and 35 deletions
+134
View File
@@ -1,5 +1,21 @@
export namespace adif {
export class ExportResult {
path: string;
count: number;
size_kb: number;
static createFrom(source: any = {}) {
return new ExportResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.path = source["path"];
this.count = source["count"];
this.size_kb = source["size_kb"];
}
}
export class ImportResult {
total: number;
imported: number;
@@ -85,6 +101,88 @@ export namespace cat {
}
export namespace cluster {
export class ServerConfig {
id: number;
name: string;
host: string;
port: number;
login_override: string;
password?: string;
init_commands: string;
enabled: boolean;
sort_order: number;
static createFrom(source: any = {}) {
return new ServerConfig(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.name = source["name"];
this.host = source["host"];
this.port = source["port"];
this.login_override = source["login_override"];
this.password = source["password"];
this.init_commands = source["init_commands"];
this.enabled = source["enabled"];
this.sort_order = source["sort_order"];
}
}
export class ServerStatus {
server_id: number;
name: string;
host: string;
port: number;
state: string;
login?: string;
error?: string;
// Go type: time
connected_at?: any;
spots_count?: number;
retries?: number;
static createFrom(source: any = {}) {
return new ServerStatus(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.server_id = source["server_id"];
this.name = source["name"];
this.host = source["host"];
this.port = source["port"];
this.state = source["state"];
this.login = source["login"];
this.error = source["error"];
this.connected_at = this.convertValues(source["connected_at"], null);
this.spots_count = source["spots_count"];
this.retries = source["retries"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
}
export namespace lookup {
export class Result {
@@ -292,6 +390,42 @@ export namespace main {
this.has_elevation = source["has_elevation"];
}
}
export class SpotQuery {
call: string;
band: string;
mode: string;
static createFrom(source: any = {}) {
return new SpotQuery(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.call = source["call"];
this.band = source["band"];
this.mode = source["mode"];
}
}
export class SpotStatus {
call: string;
band: string;
mode: string;
country?: string;
status: string;
static createFrom(source: any = {}) {
return new SpotStatus(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.call = source["call"];
this.band = source["band"];
this.mode = source["mode"];
this.country = source["country"];
this.status = source["status"];
}
}
export class StartupStatus {
ok: boolean;
err: string;