chore(wailsjs): regenerate Go bindings for the AniList Browse feature
Re-run the Wails binding generator so the frontend reflects the browse Go types that were added in earlier commits (AniListBrowse plus the Media / MediaList model refinements): - App.d.ts / App.js: expose the new AniListBrowse() method - models.ts: add the Media model, the anonymous tags element type, and type MediaList.media as Media instead of a generic object
This commit is contained in:
Vendored
+2
@@ -2,6 +2,8 @@
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
import {main} from '../models';
|
||||
|
||||
export function AniListBrowse(arg1:number,arg2:number,arg3:number,arg4:boolean,arg5:string,arg6:Array<string>,arg7:string,arg8:string,arg9:string,arg10:string,arg11:number,arg12:string,arg13:boolean,arg14:number,arg15:number,arg16:number,arg17:number,arg18:number,arg19:number,arg20:number,arg21:number,arg22:number,arg23:number,arg24:Array<number>,arg25:boolean,arg26:Array<string>,arg27:Array<string>,arg28:Array<string>,arg29:Array<string>,arg30:number,arg31:Array<string>):Promise<main.AniListCurrentUserWatchList>;
|
||||
|
||||
export function AniListDeleteEntry(arg1:number):Promise<main.DeleteAniListReturn>;
|
||||
|
||||
export function AniListLogin():Promise<void>;
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
export function AniListBrowse(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, arg24, arg25, arg26, arg27, arg28, arg29, arg30, arg31) {
|
||||
return window['go']['main']['App']['AniListBrowse'](arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, arg24, arg25, arg26, arg27, arg28, arg29, arg30, arg31);
|
||||
}
|
||||
|
||||
export function AniListDeleteEntry(arg1) {
|
||||
return window['go']['main']['App']['AniListDeleteEntry'](arg1);
|
||||
}
|
||||
|
||||
@@ -359,13 +359,125 @@ export namespace main {
|
||||
this.updated_at = source["updated_at"];
|
||||
}
|
||||
}
|
||||
export class {
|
||||
id: number;
|
||||
name: string;
|
||||
description: string;
|
||||
rank: number;
|
||||
isMediaSpoiler: boolean;
|
||||
isAdult: boolean;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new (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.rank = source["rank"];
|
||||
this.isMediaSpoiler = source["isMediaSpoiler"];
|
||||
this.isAdult = source["isAdult"];
|
||||
}
|
||||
}
|
||||
export class Media {
|
||||
id: number;
|
||||
idMal: number;
|
||||
// Go type: struct { UserPreferred string "json:\"userPreferred\""; Romaji string "json:\"romaji\""; English string "json:\"english\""; Native string "json:\"native\"" }
|
||||
title: any;
|
||||
description: string;
|
||||
// Go type: struct { ExtraLarge string; Large string "json:\"large\""; Medium string; Color string }
|
||||
coverImage: any;
|
||||
BannerImage: string;
|
||||
Format: string;
|
||||
season: string;
|
||||
seasonYear: number;
|
||||
status: string;
|
||||
episodes: number;
|
||||
Duration: number;
|
||||
CountryOfOrigin: string;
|
||||
Source: string;
|
||||
Synonyms: string[];
|
||||
AverageScore: number;
|
||||
MeanScore: number;
|
||||
Popularity: number;
|
||||
Trending: number;
|
||||
Favourites: number;
|
||||
// Go type: struct { nodes struct { id int; Title struct { UserPreferred string "json:\"userPreferred\""; Romaji string "json:\"romaji\""; English string "json:\"english\""; Native string "json:\"native\"" } "json:\"title\"" } }
|
||||
Relations: any;
|
||||
// Go type: struct { Year int; Month int; Day int }
|
||||
StartDate: any;
|
||||
// Go type: struct { Year int; Month int; Day int }
|
||||
EndDate: any;
|
||||
// Go type: struct { AiringAt int "json:\"airingAt\""; TimeUntilAiring int "json:\"timeUntilAiring\""; Episode int "json:\"episode\"" }
|
||||
nextAiringEpisode: any;
|
||||
// Go type: struct { Nodes struct { Id int; AiringAt int; TimeUntilAiring int; Episode int; MediaId int } }
|
||||
AiringSchedule: any;
|
||||
genres: string[];
|
||||
tags: [];
|
||||
isAdult: boolean;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Media(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.idMal = source["idMal"];
|
||||
this.title = this.convertValues(source["title"], Object);
|
||||
this.description = source["description"];
|
||||
this.coverImage = this.convertValues(source["coverImage"], Object);
|
||||
this.BannerImage = source["BannerImage"];
|
||||
this.Format = source["Format"];
|
||||
this.season = source["season"];
|
||||
this.seasonYear = source["seasonYear"];
|
||||
this.status = source["status"];
|
||||
this.episodes = source["episodes"];
|
||||
this.Duration = source["Duration"];
|
||||
this.CountryOfOrigin = source["CountryOfOrigin"];
|
||||
this.Source = source["Source"];
|
||||
this.Synonyms = source["Synonyms"];
|
||||
this.AverageScore = source["AverageScore"];
|
||||
this.MeanScore = source["MeanScore"];
|
||||
this.Popularity = source["Popularity"];
|
||||
this.Trending = source["Trending"];
|
||||
this.Favourites = source["Favourites"];
|
||||
this.Relations = this.convertValues(source["Relations"], Object);
|
||||
this.StartDate = this.convertValues(source["StartDate"], Object);
|
||||
this.EndDate = this.convertValues(source["EndDate"], Object);
|
||||
this.nextAiringEpisode = this.convertValues(source["nextAiringEpisode"], Object);
|
||||
this.AiringSchedule = this.convertValues(source["AiringSchedule"], Object);
|
||||
this.genres = source["genres"];
|
||||
this.tags = this.convertValues(source["tags"], );
|
||||
this.isAdult = source["isAdult"];
|
||||
}
|
||||
|
||||
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 MediaList {
|
||||
id: number;
|
||||
mediaId: number;
|
||||
userId: number;
|
||||
// Go type: struct { ID int "json:\"id\""; IDMal int "json:\"idMal\""; Title struct { Romaji string "json:\"romaji\""; English string "json:\"english\""; Native string "json:\"native\"" } "json:\"title\""; Description string "json:\"description\""; CoverImage struct { Large string "json:\"large\"" } "json:\"coverImage\""; Season string "json:\"season\""; SeasonYear int "json:\"seasonYear\""; Status string "json:\"status\""; Episodes int "json:\"episodes\""; NextAiringEpisode struct { AiringAt int "json:\"airingAt\""; TimeUntilAiring int "json:\"timeUntilAiring\""; Episode int "json:\"episode\"" } "json:\"nextAiringEpisode\""; Genres []string "json:\"genres\""; Tags []struct { Id int "json:\"id\""; Name string "json:\"name\""; Description string "json:\"description\""; Rank int "json:\"rank\""; IsMediaSpoiler bool "json:\"isMediaSpoiler\""; IsAdult bool "json:\"isAdult\"" } "json:\"tags\""; IsAdult bool "json:\"isAdult\"" }
|
||||
media: any;
|
||||
status: string;
|
||||
media: Media;
|
||||
// Go type: struct { Year int "json:\"year\""; Month int "json:\"month\""; Day int "json:\"day\"" }
|
||||
startedAt: any;
|
||||
// Go type: struct { Year int "json:\"year\""; Month int "json:\"month\""; Day int "json:\"day\"" }
|
||||
@@ -386,8 +498,8 @@ export namespace main {
|
||||
this.id = source["id"];
|
||||
this.mediaId = source["mediaId"];
|
||||
this.userId = source["userId"];
|
||||
this.media = this.convertValues(source["media"], Object);
|
||||
this.status = source["status"];
|
||||
this.media = this.convertValues(source["media"], Media);
|
||||
this.startedAt = this.convertValues(source["startedAt"], Object);
|
||||
this.completedAt = this.convertValues(source["completedAt"], Object);
|
||||
this.notes = source["notes"];
|
||||
|
||||
Reference in New Issue
Block a user