generated from dave/wails-template
Rework the fuck of everything
This commit is contained in:
10
frontend/wailsjs/go/main/App.d.ts
vendored
10
frontend/wailsjs/go/main/App.d.ts
vendored
@@ -3,6 +3,8 @@
|
||||
import {main} from '../models';
|
||||
import {time} from '../models';
|
||||
|
||||
export function AddBill(arg1:string):Promise<main.WailsBill>;
|
||||
|
||||
export function Close():Promise<void>;
|
||||
|
||||
export function EmptyBill():Promise<main.Bill>;
|
||||
@@ -13,4 +15,12 @@ export function GetBills():Promise<main.WailsBills>;
|
||||
|
||||
export function GetPaymentsForMonth(arg1:time.Time):Promise<main.WailsPayments>;
|
||||
|
||||
export function MovePayment(arg1:number,arg2:time.Time,arg3:time.Time):Promise<main.WailsPayment>;
|
||||
|
||||
export function RemoveBill(arg1:number):Promise<main.WailsVoid>;
|
||||
|
||||
export function SetPaid(arg1:number,arg2:time.Time):Promise<main.WailsPayment>;
|
||||
|
||||
export function SetPaidWithDate(arg1:number,arg2:time.Time,arg3:time.Time):Promise<main.WailsPayment>;
|
||||
|
||||
export function UnmarkPaid(arg1:number,arg2:time.Time):Promise<main.WailsVoid>;
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
export function AddBill(arg1) {
|
||||
return window['go']['main']['App']['AddBill'](arg1);
|
||||
}
|
||||
|
||||
export function Close() {
|
||||
return window['go']['main']['App']['Close']();
|
||||
}
|
||||
@@ -22,6 +26,22 @@ export function GetPaymentsForMonth(arg1) {
|
||||
return window['go']['main']['App']['GetPaymentsForMonth'](arg1);
|
||||
}
|
||||
|
||||
export function MovePayment(arg1, arg2, arg3) {
|
||||
return window['go']['main']['App']['MovePayment'](arg1, arg2, arg3);
|
||||
}
|
||||
|
||||
export function RemoveBill(arg1) {
|
||||
return window['go']['main']['App']['RemoveBill'](arg1);
|
||||
}
|
||||
|
||||
export function SetPaid(arg1, arg2) {
|
||||
return window['go']['main']['App']['SetPaid'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function SetPaidWithDate(arg1, arg2, arg3) {
|
||||
return window['go']['main']['App']['SetPaidWithDate'](arg1, arg2, arg3);
|
||||
}
|
||||
|
||||
export function UnmarkPaid(arg1, arg2) {
|
||||
return window['go']['main']['App']['UnmarkPaid'](arg1, arg2);
|
||||
}
|
||||
|
||||
@@ -50,6 +50,40 @@ export namespace main {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
export class WailsBill {
|
||||
data: Bill;
|
||||
success: boolean;
|
||||
error: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new WailsBill(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.data = this.convertValues(source["data"], Bill);
|
||||
this.success = source["success"];
|
||||
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 class WailsBills {
|
||||
data: Bill[];
|
||||
success: boolean;
|
||||
@@ -152,6 +186,20 @@ export namespace main {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
export class WailsVoid {
|
||||
success: boolean;
|
||||
error: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new WailsVoid(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.success = source["success"];
|
||||
this.error = source["error"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user