This commit is contained in:
2026-06-05 17:22:38 +02:00
parent cf9dbf26f3
commit 88623f55df
21 changed files with 2123 additions and 50 deletions
+169
View File
@@ -64,6 +64,121 @@ export namespace audio {
}
export namespace award {
export class BandCount {
band: string;
worked: number;
confirmed: number;
static createFrom(source: any = {}) {
return new BandCount(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.band = source["band"];
this.worked = source["worked"];
this.confirmed = source["confirmed"];
}
}
export class Def {
code: string;
name: string;
field: string;
pattern: string;
dxcc_filter: number[];
confirm: string[];
total: number;
builtin: boolean;
static createFrom(source: any = {}) {
return new Def(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.code = source["code"];
this.name = source["name"];
this.field = source["field"];
this.pattern = source["pattern"];
this.dxcc_filter = source["dxcc_filter"];
this.confirm = source["confirm"];
this.total = source["total"];
this.builtin = source["builtin"];
}
}
export class Ref {
ref: string;
name?: string;
worked: boolean;
confirmed: boolean;
bands: string[];
confirmed_bands: string[];
static createFrom(source: any = {}) {
return new Ref(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.ref = source["ref"];
this.name = source["name"];
this.worked = source["worked"];
this.confirmed = source["confirmed"];
this.bands = source["bands"];
this.confirmed_bands = source["confirmed_bands"];
}
}
export class Result {
code: string;
name: string;
field: string;
worked: number;
confirmed: number;
total: number;
bands: BandCount[];
refs: Ref[];
error?: string;
static createFrom(source: any = {}) {
return new Result(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.code = source["code"];
this.name = source["name"];
this.field = source["field"];
this.worked = source["worked"];
this.confirmed = source["confirmed"];
this.total = source["total"];
this.bands = this.convertValues(source["bands"], BandCount);
this.refs = this.convertValues(source["refs"], Ref);
this.error = source["error"];
}
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 cat {
export class RigState {
@@ -1137,6 +1252,22 @@ export namespace qso {
this.status = source["status"];
}
}
export class Condition {
field: string;
op: string;
value: string;
static createFrom(source: any = {}) {
return new Condition(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.field = source["field"];
this.op = source["op"];
this.value = source["value"];
}
}
export class ListFilter {
callsign?: string;
band?: string;
@@ -1387,6 +1518,44 @@ export namespace qso {
return a;
}
}
export class QueryFilter {
quick_callsign?: string;
conditions?: Condition[];
match?: string;
limit?: number;
offset?: number;
static createFrom(source: any = {}) {
return new QueryFilter(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.quick_callsign = source["quick_callsign"];
this.conditions = this.convertValues(source["conditions"], Condition);
this.match = source["match"];
this.limit = source["limit"];
this.offset = source["offset"];
}
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 class UploadRow {
id: number;
qso_date: string;