starmusic-pc
1export namespace main {
2
3 export class AppInfo {
4 version: string;
5 versionCode: number;
6 platform: string;
7 arch: string;
8 osName: string;
9 dataDir: string;
10 storageDir: string;
11 downloads: string;
12 configDir: string;
13 homeDir: string;
14 buildType: string;
15 goVersion: string;
16 screenWidth: number;
17 screenHeight: number;
18
19 static createFrom(source: any = {}) {
20 return new AppInfo(source);
21 }
22
23 constructor(source: any = {}) {
24 if ('string' === typeof source) source = JSON.parse(source);
25 this.version = source["version"];
26 this.versionCode = source["versionCode"];
27 this.platform = source["platform"];
28 this.arch = source["arch"];
29 this.osName = source["osName"];
30 this.dataDir = source["dataDir"];
31 this.storageDir = source["storageDir"];
32 this.downloads = source["downloads"];
33 this.configDir = source["configDir"];
34 this.homeDir = source["homeDir"];
35 this.buildType = source["buildType"];
36 this.goVersion = source["goVersion"];
37 this.screenWidth = source["screenWidth"];
38 this.screenHeight = source["screenHeight"];
39 }
40 }
41 export class DownloadResult {
42 path: string;
43 name: string;
44 size: number;
45 dir: string;
46
47 static createFrom(source: any = {}) {
48 return new DownloadResult(source);
49 }
50
51 constructor(source: any = {}) {
52 if ('string' === typeof source) source = JSON.parse(source);
53 this.path = source["path"];
54 this.name = source["name"];
55 this.size = source["size"];
56 this.dir = source["dir"];
57 }
58 }
59 export class HttpRequestOptions {
60 method: string;
61 url: string;
62 headers: Record<string, string>;
63 body: string;
64 timeoutMs: number;
65 binary: boolean;
66
67 static createFrom(source: any = {}) {
68 return new HttpRequestOptions(source);
69 }
70
71 constructor(source: any = {}) {
72 if ('string' === typeof source) source = JSON.parse(source);
73 this.method = source["method"];
74 this.url = source["url"];
75 this.headers = source["headers"];
76 this.body = source["body"];
77 this.timeoutMs = source["timeoutMs"];
78 this.binary = source["binary"];
79 }
80 }
81 export class HttpResponse {
82 statusCode: number;
83 header: Record<string, string>;
84 body: string;
85 binary: boolean;
86 url: string;
87
88 static createFrom(source: any = {}) {
89 return new HttpResponse(source);
90 }
91
92 constructor(source: any = {}) {
93 if ('string' === typeof source) source = JSON.parse(source);
94 this.statusCode = source["statusCode"];
95 this.header = source["header"];
96 this.body = source["body"];
97 this.binary = source["binary"];
98 this.url = source["url"];
99 }
100 }
101 export class PickedFile {
102 path: string;
103 name: string;
104 content: string;
105 size: number;
106
107 static createFrom(source: any = {}) {
108 return new PickedFile(source);
109 }
110
111 constructor(source: any = {}) {
112 if ('string' === typeof source) source = JSON.parse(source);
113 this.path = source["path"];
114 this.name = source["name"];
115 this.content = source["content"];
116 this.size = source["size"];
117 }
118 }
119 export class PickedImage {
120 path: string;
121 name: string;
122 dataUrl: string;
123 size: number;
124
125 static createFrom(source: any = {}) {
126 return new PickedImage(source);
127 }
128
129 constructor(source: any = {}) {
130 if ('string' === typeof source) source = JSON.parse(source);
131 this.path = source["path"];
132 this.name = source["name"];
133 this.dataUrl = source["dataUrl"];
134 this.size = source["size"];
135 }
136 }
137 export class UpdateDownloadResult {
138 path: string;
139 name: string;
140 size: number;
141 dir: string;
142 md5: string;
143
144 static createFrom(source: any = {}) {
145 return new UpdateDownloadResult(source);
146 }
147
148 constructor(source: any = {}) {
149 if ('string' === typeof source) source = JSON.parse(source);
150 this.path = source["path"];
151 this.name = source["name"];
152 this.size = source["size"];
153 this.dir = source["dir"];
154 this.md5 = source["md5"];
155 }
156 }
157
158}