award
This commit is contained in:
@@ -85,10 +85,33 @@ export namespace award {
|
||||
export class Def {
|
||||
code: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
valid: boolean;
|
||||
protected?: boolean;
|
||||
url?: string;
|
||||
download_url?: string;
|
||||
ref_url?: string;
|
||||
valid_from?: string;
|
||||
valid_to?: string;
|
||||
alias?: string;
|
||||
type?: string;
|
||||
field: string;
|
||||
match_by?: string;
|
||||
exact_match?: boolean;
|
||||
pattern: string;
|
||||
leading_str?: string;
|
||||
trailing_str?: string;
|
||||
multi?: boolean;
|
||||
dynamic?: boolean;
|
||||
add_prefixes?: string[];
|
||||
dxcc_filter: number[];
|
||||
valid_bands?: string[];
|
||||
valid_modes?: string[];
|
||||
emission?: string[];
|
||||
confirm: string[];
|
||||
validate?: string[];
|
||||
grant_codes?: string;
|
||||
export_credit_granted?: boolean;
|
||||
total: number;
|
||||
builtin: boolean;
|
||||
|
||||
@@ -100,10 +123,33 @@ export namespace award {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.code = source["code"];
|
||||
this.name = source["name"];
|
||||
this.description = source["description"];
|
||||
this.valid = source["valid"];
|
||||
this.protected = source["protected"];
|
||||
this.url = source["url"];
|
||||
this.download_url = source["download_url"];
|
||||
this.ref_url = source["ref_url"];
|
||||
this.valid_from = source["valid_from"];
|
||||
this.valid_to = source["valid_to"];
|
||||
this.alias = source["alias"];
|
||||
this.type = source["type"];
|
||||
this.field = source["field"];
|
||||
this.match_by = source["match_by"];
|
||||
this.exact_match = source["exact_match"];
|
||||
this.pattern = source["pattern"];
|
||||
this.leading_str = source["leading_str"];
|
||||
this.trailing_str = source["trailing_str"];
|
||||
this.multi = source["multi"];
|
||||
this.dynamic = source["dynamic"];
|
||||
this.add_prefixes = source["add_prefixes"];
|
||||
this.dxcc_filter = source["dxcc_filter"];
|
||||
this.valid_bands = source["valid_bands"];
|
||||
this.valid_modes = source["valid_modes"];
|
||||
this.emission = source["emission"];
|
||||
this.confirm = source["confirm"];
|
||||
this.validate = source["validate"];
|
||||
this.grant_codes = source["grant_codes"];
|
||||
this.export_credit_granted = source["export_credit_granted"];
|
||||
this.total = source["total"];
|
||||
this.builtin = source["builtin"];
|
||||
}
|
||||
@@ -111,8 +157,11 @@ export namespace award {
|
||||
export class Ref {
|
||||
ref: string;
|
||||
name?: string;
|
||||
group?: string;
|
||||
subgrp?: string;
|
||||
worked: boolean;
|
||||
confirmed: boolean;
|
||||
validated: boolean;
|
||||
bands: string[];
|
||||
confirmed_bands: string[];
|
||||
|
||||
@@ -124,8 +173,11 @@ export namespace award {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.ref = source["ref"];
|
||||
this.name = source["name"];
|
||||
this.group = source["group"];
|
||||
this.subgrp = source["subgrp"];
|
||||
this.worked = source["worked"];
|
||||
this.confirmed = source["confirmed"];
|
||||
this.validated = source["validated"];
|
||||
this.bands = source["bands"];
|
||||
this.confirmed_bands = source["confirmed_bands"];
|
||||
}
|
||||
@@ -136,6 +188,7 @@ export namespace award {
|
||||
field: string;
|
||||
worked: number;
|
||||
confirmed: number;
|
||||
validated: number;
|
||||
total: number;
|
||||
bands: BandCount[];
|
||||
refs: Ref[];
|
||||
@@ -152,6 +205,7 @@ export namespace award {
|
||||
this.field = source["field"];
|
||||
this.worked = source["worked"];
|
||||
this.confirmed = source["confirmed"];
|
||||
this.validated = source["validated"];
|
||||
this.total = source["total"];
|
||||
this.bands = this.convertValues(source["bands"], BandCount);
|
||||
this.refs = this.convertValues(source["refs"], Ref);
|
||||
@@ -179,6 +233,87 @@ export namespace award {
|
||||
|
||||
}
|
||||
|
||||
export namespace awardref {
|
||||
|
||||
export class Ref {
|
||||
code: string;
|
||||
name: string;
|
||||
dxcc: number;
|
||||
group: string;
|
||||
subgrp: string;
|
||||
dxcc_list?: number[];
|
||||
pattern?: string;
|
||||
valid: boolean;
|
||||
valid_from?: string;
|
||||
valid_to?: string;
|
||||
score?: number;
|
||||
bonus?: number;
|
||||
gridsquare?: string;
|
||||
alias?: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Ref(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.code = source["code"];
|
||||
this.name = source["name"];
|
||||
this.dxcc = source["dxcc"];
|
||||
this.group = source["group"];
|
||||
this.subgrp = source["subgrp"];
|
||||
this.dxcc_list = source["dxcc_list"];
|
||||
this.pattern = source["pattern"];
|
||||
this.valid = source["valid"];
|
||||
this.valid_from = source["valid_from"];
|
||||
this.valid_to = source["valid_to"];
|
||||
this.score = source["score"];
|
||||
this.bonus = source["bonus"];
|
||||
this.gridsquare = source["gridsquare"];
|
||||
this.alias = source["alias"];
|
||||
}
|
||||
}
|
||||
export class Preset {
|
||||
key: string;
|
||||
name: string;
|
||||
field: string;
|
||||
dxcc: number;
|
||||
refs: Ref[];
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Preset(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.key = source["key"];
|
||||
this.name = source["name"];
|
||||
this.field = source["field"];
|
||||
this.dxcc = source["dxcc"];
|
||||
this.refs = this.convertValues(source["refs"], Ref);
|
||||
}
|
||||
|
||||
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 {
|
||||
@@ -523,6 +658,24 @@ export namespace main {
|
||||
this.mic_gain = source["mic_gain"];
|
||||
}
|
||||
}
|
||||
export class AwardRefMeta {
|
||||
code: string;
|
||||
count: number;
|
||||
updated_at: string;
|
||||
can_update: boolean;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new AwardRefMeta(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.code = source["code"];
|
||||
this.count = source["count"];
|
||||
this.updated_at = source["updated_at"];
|
||||
this.can_update = source["can_update"];
|
||||
}
|
||||
}
|
||||
export class BackupSettings {
|
||||
enabled: boolean;
|
||||
folder: string;
|
||||
@@ -796,6 +949,24 @@ export namespace main {
|
||||
this.qrzcom_confirmed = source["qrzcom_confirmed"];
|
||||
}
|
||||
}
|
||||
export class QSOAwardRef {
|
||||
code: string;
|
||||
ref: string;
|
||||
name?: string;
|
||||
pickable: boolean;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new QSOAwardRef(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.code = source["code"];
|
||||
this.ref = source["ref"];
|
||||
this.name = source["name"];
|
||||
this.pickable = source["pickable"];
|
||||
}
|
||||
}
|
||||
export class RotatorHeading {
|
||||
enabled: boolean;
|
||||
ok: boolean;
|
||||
|
||||
Reference in New Issue
Block a user