up
This commit is contained in:
Vendored
+6
@@ -21,6 +21,8 @@ export function AddQSO(arg1:qso.QSO):Promise<number>;
|
||||
|
||||
export function ApplyAwardPreset(arg1:string,arg2:string):Promise<number>;
|
||||
|
||||
export function AwardCellQSOs(arg1:string,arg2:string,arg3:string):Promise<Array<qso.QSO>>;
|
||||
|
||||
export function AwardFields():Promise<Array<string>>;
|
||||
|
||||
export function ClearLookupCache():Promise<void>;
|
||||
@@ -97,12 +99,16 @@ export function GetActiveProfile():Promise<profile.Profile>;
|
||||
|
||||
export function GetAudioSettings():Promise<main.AudioSettings>;
|
||||
|
||||
export function GetAward(arg1:string):Promise<award.Result>;
|
||||
|
||||
export function GetAwardDefs():Promise<Array<award.Def>>;
|
||||
|
||||
export function GetAwardPresets():Promise<Array<awardref.Preset>>;
|
||||
|
||||
export function GetAwardReferenceMeta():Promise<Array<main.AwardRefMeta>>;
|
||||
|
||||
export function GetAwardStats(arg1:string):Promise<main.AwardStatsResult>;
|
||||
|
||||
export function GetAwards():Promise<Array<award.Result>>;
|
||||
|
||||
export function GetBackupSettings():Promise<main.BackupSettings>;
|
||||
|
||||
@@ -14,6 +14,10 @@ export function ApplyAwardPreset(arg1, arg2) {
|
||||
return window['go']['main']['App']['ApplyAwardPreset'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function AwardCellQSOs(arg1, arg2, arg3) {
|
||||
return window['go']['main']['App']['AwardCellQSOs'](arg1, arg2, arg3);
|
||||
}
|
||||
|
||||
export function AwardFields() {
|
||||
return window['go']['main']['App']['AwardFields']();
|
||||
}
|
||||
@@ -166,6 +170,10 @@ export function GetAudioSettings() {
|
||||
return window['go']['main']['App']['GetAudioSettings']();
|
||||
}
|
||||
|
||||
export function GetAward(arg1) {
|
||||
return window['go']['main']['App']['GetAward'](arg1);
|
||||
}
|
||||
|
||||
export function GetAwardDefs() {
|
||||
return window['go']['main']['App']['GetAwardDefs']();
|
||||
}
|
||||
@@ -178,6 +186,10 @@ export function GetAwardReferenceMeta() {
|
||||
return window['go']['main']['App']['GetAwardReferenceMeta']();
|
||||
}
|
||||
|
||||
export function GetAwardStats(arg1) {
|
||||
return window['go']['main']['App']['GetAwardStats'](arg1);
|
||||
}
|
||||
|
||||
export function GetAwards() {
|
||||
return window['go']['main']['App']['GetAwards']();
|
||||
}
|
||||
|
||||
@@ -164,6 +164,7 @@ export namespace award {
|
||||
validated: boolean;
|
||||
bands: string[];
|
||||
confirmed_bands: string[];
|
||||
validated_bands: string[];
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Ref(source);
|
||||
@@ -180,6 +181,7 @@ export namespace award {
|
||||
this.validated = source["validated"];
|
||||
this.bands = source["bands"];
|
||||
this.confirmed_bands = source["confirmed_bands"];
|
||||
this.validated_bands = source["validated_bands"];
|
||||
}
|
||||
}
|
||||
export class Result {
|
||||
@@ -676,6 +678,58 @@ export namespace main {
|
||||
this.can_update = source["can_update"];
|
||||
}
|
||||
}
|
||||
export class AwardStatRow {
|
||||
label: string;
|
||||
cells: number[];
|
||||
total: number;
|
||||
grand_total: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new AwardStatRow(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.label = source["label"];
|
||||
this.cells = source["cells"];
|
||||
this.total = source["total"];
|
||||
this.grand_total = source["grand_total"];
|
||||
}
|
||||
}
|
||||
export class AwardStatsResult {
|
||||
code: string;
|
||||
bands: string[];
|
||||
rows: AwardStatRow[];
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new AwardStatsResult(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.code = source["code"];
|
||||
this.bands = source["bands"];
|
||||
this.rows = this.convertValues(source["rows"], AwardStatRow);
|
||||
}
|
||||
|
||||
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 BackupSettings {
|
||||
enabled: boolean;
|
||||
folder: string;
|
||||
|
||||
Reference in New Issue
Block a user