desktop/frontend/wailsjs/go/models.ts
export namespace types {
export class AccountType {
id: number;
name: string;
id: number;
name: string;
static createFrom(source: any = {}) {
return new AccountType(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.name = source["name"];
this.id = source["id"];
this.name = source["name"];
}
}
export class Account {
id: number;
name: string;
description: string;
account_type: AccountType;
amount: string;
deleted: boolean;
static createFrom(source: any = {}) {
return new Account(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.name = source["name"];
this.description = source["description"];
this.account_type = this.convertValues(source["account_type"], AccountType);
this.amount = source["amount"];
this.deleted = source["deleted"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 AccountMatchRegex {
id: number;
regex: string;
static createFrom(source: any = {}) {
return new AccountMatchRegex(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.regex = source["regex"];
}
}
export class AccountMatch {
id: number;
name: string;
description: string;
deleted: boolean;
source_account: Account;
destination_account: Account;
regexes: AccountMatchRegex[];
static createFrom(source: any = {}) {
return new AccountMatch(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.name = source["name"];
this.description = source["description"];
this.deleted = source["deleted"];
this.source_account = this.convertValues(source["source_account"], Account);
this.destination_account = this.convertValues(source["destination_account"], Account);
this.regexes = this.convertValues(source["regexes"], AccountMatchRegex);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 AccountMatchRegexResponse {
success: boolean;
msg: string;
data: AccountMatchRegex;
static createFrom(source: any = {}) {
return new AccountMatchRegexResponse(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = this.convertValues(source["data"], AccountMatchRegex);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 AccountMatchResponse {
success: boolean;
msg: string;
data: AccountMatch;
static createFrom(source: any = {}) {
return new AccountMatchResponse(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = this.convertValues(source["data"], AccountMatch);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 AccountMatchesResponse {
success: boolean;
msg: string;
data: AccountMatch[];
static createFrom(source: any = {}) {
return new AccountMatchesResponse(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = this.convertValues(source["data"], AccountMatch);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 AccountResponse {
success: boolean;
msg: string;
data: Account;
static createFrom(source: any = {}) {
return new AccountResponse(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = this.convertValues(source["data"], Account);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 Attachment {
id: number;
name: string;
size: number;
data: number[];
static createFrom(source: any = {}) {
return new Attachment(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.name = source["name"];
this.size = source["size"];
this.data = source["data"];
}
}
export class AttachmentResponse {
success: boolean;
msg: string;
data: Attachment;
static createFrom(source: any = {}) {
return new AttachmentResponse(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = this.convertValues(source["data"], Attachment);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 AttachmentsResponse {
success: boolean;
msg: string;
data: Attachment[];
static createFrom(source: any = {}) {
return new AttachmentsResponse(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = this.convertValues(source["data"], Attachment);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 JSResp {
success: boolean;
msg: string;
data?: any;
static createFrom(source: any = {}) {
return new JSResp(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = source["data"];
}
}
export class Note {
id: number;
note: string;
static createFrom(source: any = {}) {
return new Note(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.note = source["note"];
}
}
export class NoteResponse {
success: boolean;
msg: string;
data: Note;
static createFrom(source: any = {}) {
return new NoteResponse(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = this.convertValues(source["data"], Note);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 Split {
id: number;
value_num: number;
value_denom: number;
amount: string;
account: Account;
static createFrom(source: any = {}) {
return new Split(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.value_num = source["value_num"];
this.value_denom = source["value_denom"];
this.amount = source["amount"];
this.account = this.convertValues(source["account"], Account);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 SplitResponse {
success: boolean;
msg: string;
data: Split;
static createFrom(source: any = {}) {
return new SplitResponse(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = this.convertValues(source["data"], Split);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 TagRegex {
id: number;
regex: string;
static createFrom(source: any = {}) {
return new TagRegex(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.regex = source["regex"];
}
}
export class Tag {
id: number;
name: string;
description: string;
deleted: boolean;
regexes: TagRegex[];
amount: string;
static createFrom(source: any = {}) {
return new Tag(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.name = source["name"];
this.description = source["description"];
this.deleted = source["deleted"];
this.regexes = this.convertValues(source["regexes"], TagRegex);
this.amount = source["amount"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 TagRegexResponse {
success: boolean;
msg: string;
data: TagRegex;
static createFrom(source: any = {}) {
return new TagRegexResponse(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = this.convertValues(source["data"], TagRegex);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 TagResponse {
success: boolean;
msg: string;
data: Tag;
static createFrom(source: any = {}) {
return new TagResponse(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = this.convertValues(source["data"], Tag);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 TagsResponse {
success: boolean;
msg: string;
data: Tag[];
static createFrom(source: any = {}) {
return new TagsResponse(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = this.convertValues(source["data"], Tag);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 TransactionDisplayAccount {
name: string;
id: number;
static createFrom(source: any = {}) {
return new TransactionDisplayAccount(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.id = source["id"];
}
}
export class TransactionDisplay {
account: TransactionDisplayAccount;
static createFrom(source: any = {}) {
return new TransactionDisplay(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.account = this.convertValues(source["account"], TransactionDisplayAccount);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 Transaction {
id: number;
memo: string;
date: string;
splits: Split[];
amount: string;
deleted: boolean;
display: TransactionDisplay;
id: number;
name: string;
static createFrom(source: any = {}) {
return new Transaction(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.memo = source["memo"];
this.date = source["date"];
this.splits = this.convertValues(source["splits"], Split);
this.amount = source["amount"];
this.deleted = source["deleted"];
this.display = this.convertValues(source["display"], TransactionDisplay);
this.id = source["id"];
this.name = source["name"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 TransactionResponse {
success: boolean;
msg: string;
data: Transaction;
static createFrom(source: any = {}) {
return new TransactionResponse(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = this.convertValues(source["data"], Transaction);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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 TransactionsNetAssetsResponse {
success: boolean;
msg: string;
data: string;
static createFrom(source: any = {}) {
return new TransactionsNetAssetsResponse(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = source["data"];
}
}
export class TransactionsResponse {
success: boolean;
msg: string;
data: Transaction[];
static createFrom(source: any = {}) {
return new TransactionsResponse(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.success = source["success"];
this.msg = source["msg"];
this.data = this.convertValues(source["data"], Transaction);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice) {
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;
}
}
}