feat: upload to external services clublog qrz

This commit is contained in:
2026-05-28 22:52:50 +02:00
parent e82e30dd02
commit 5c004f5e2f
26 changed files with 1710 additions and 31 deletions
+67
View File
@@ -183,6 +183,67 @@ export namespace cluster {
}
export namespace extsvc {
export class ServiceConfig {
api_key: string;
email: string;
password: string;
callsign: string;
force_station_callsign: string;
auto_upload: boolean;
upload_mode: string;
static createFrom(source: any = {}) {
return new ServiceConfig(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.api_key = source["api_key"];
this.email = source["email"];
this.password = source["password"];
this.callsign = source["callsign"];
this.force_station_callsign = source["force_station_callsign"];
this.auto_upload = source["auto_upload"];
this.upload_mode = source["upload_mode"];
}
}
export class ExternalServices {
qrz: ServiceConfig;
clublog: ServiceConfig;
static createFrom(source: any = {}) {
return new ExternalServices(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.qrz = this.convertValues(source["qrz"], ServiceConfig);
this.clublog = this.convertValues(source["clublog"], ServiceConfig);
}
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 {
@@ -403,6 +464,7 @@ export namespace main {
eqsl_rcvd: string;
clublog_status: string;
hrdlog_status: string;
qrzcom_status: string;
static createFrom(source: any = {}) {
return new QSLDefaults(source);
@@ -418,6 +480,7 @@ export namespace main {
this.eqsl_rcvd = source["eqsl_rcvd"];
this.clublog_status = source["clublog_status"];
this.hrdlog_status = source["hrdlog_status"];
this.qrzcom_status = source["qrzcom_status"];
}
}
export class RotatorSettings {
@@ -847,6 +910,8 @@ export namespace qso {
clublog_qso_upload_status?: string;
hrdlog_qso_upload_date?: string;
hrdlog_qso_upload_status?: string;
qrzcom_qso_upload_date?: string;
qrzcom_qso_upload_status?: string;
contest_id?: string;
srx?: number;
stx?: number;
@@ -950,6 +1015,8 @@ export namespace qso {
this.clublog_qso_upload_status = source["clublog_qso_upload_status"];
this.hrdlog_qso_upload_date = source["hrdlog_qso_upload_date"];
this.hrdlog_qso_upload_status = source["hrdlog_qso_upload_status"];
this.qrzcom_qso_upload_date = source["qrzcom_qso_upload_date"];
this.qrzcom_qso_upload_status = source["qrzcom_qso_upload_status"];
this.contest_id = source["contest_id"];
this.srx = source["srx"];
this.stx = source["stx"];