models.js 116 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982
  1. // @ts-check
  2. // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
  3. // This file is automatically generated. DO NOT EDIT
  4. // eslint-disable-next-line @typescript-eslint/ban-ts-comment
  5. // @ts-ignore: Unused imports
  6. import { Create as $Create } from "@wailsio/runtime";
  7. /**
  8. * APIStatus API 服务运行状态,供「主机」页展示
  9. */
  10. export class APIStatus {
  11. /**
  12. * Creates a new APIStatus instance.
  13. * @param {Partial<APIStatus>} [$$source = {}] - The source object to create the APIStatus.
  14. */
  15. constructor($$source = {}) {
  16. if (!("addr" in $$source)) {
  17. /**
  18. * 当前监听地址
  19. * @member
  20. * @type {string}
  21. */
  22. this["addr"] = "";
  23. }
  24. if (!("running" in $$source)) {
  25. /**
  26. * 是否正在监听
  27. * @member
  28. * @type {boolean}
  29. */
  30. this["running"] = false;
  31. }
  32. if (!("startedAt" in $$source)) {
  33. /**
  34. * 启动时间
  35. * @member
  36. * @type {string}
  37. */
  38. this["startedAt"] = "";
  39. }
  40. if (!("error" in $$source)) {
  41. /**
  42. * 最近错误信息
  43. * @member
  44. * @type {string}
  45. */
  46. this["error"] = "";
  47. }
  48. Object.assign(this, $$source);
  49. }
  50. /**
  51. * Creates a new APIStatus instance from a string or object.
  52. * @param {any} [$$source = {}]
  53. * @returns {APIStatus}
  54. */
  55. static createFrom($$source = {}) {
  56. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  57. return new APIStatus(/** @type {Partial<APIStatus>} */($$parsedSource));
  58. }
  59. }
  60. /**
  61. * AppSettings 保存全部可自定义配置,序列化为 JSON 存于用户配置目录
  62. */
  63. export class AppSettings {
  64. /**
  65. * Creates a new AppSettings instance.
  66. * @param {Partial<AppSettings>} [$$source = {}] - The source object to create the AppSettings.
  67. */
  68. constructor($$source = {}) {
  69. if (!("theme" in $$source)) {
  70. /**
  71. * 界面主题:dark / light
  72. * @member
  73. * @type {string}
  74. */
  75. this["theme"] = "";
  76. }
  77. if (!("autostart" in $$source)) {
  78. /**
  79. * 系统启动时运行
  80. * @member
  81. * @type {boolean}
  82. */
  83. this["autostart"] = false;
  84. }
  85. if (!("alwaysOnTop" in $$source)) {
  86. /**
  87. * 窗口置顶
  88. * @member
  89. * @type {boolean}
  90. */
  91. this["alwaysOnTop"] = false;
  92. }
  93. if (!("startCompact" in $$source)) {
  94. /**
  95. * 启动时自动收拢为圆点(窗口缩小)
  96. * @member
  97. * @type {boolean}
  98. */
  99. this["startCompact"] = false;
  100. }
  101. if (!("windowWidth" in $$source)) {
  102. /**
  103. * 主窗口宽度(px),随窗口调整自动保存
  104. * @member
  105. * @type {number}
  106. */
  107. this["windowWidth"] = 0;
  108. }
  109. if (!("windowHeight" in $$source)) {
  110. /**
  111. * 主窗口高度(px),随窗口调整自动保存
  112. * @member
  113. * @type {number}
  114. */
  115. this["windowHeight"] = 0;
  116. }
  117. if (!("hotkey" in $$source)) {
  118. /**
  119. * 呼出(显示)窗口的全局热键
  120. * @member
  121. * @type {string}
  122. */
  123. this["hotkey"] = "";
  124. }
  125. if (!("quickHotkey" in $$source)) {
  126. /**
  127. * 在鼠标位置弹出「快捷」菜单的全局热键
  128. * @member
  129. * @type {string}
  130. */
  131. this["quickHotkey"] = "";
  132. }
  133. if (!("proxyHotkey" in $$source)) {
  134. /**
  135. * 开关「网络代理」的全局热键(空=不设热键)
  136. * @member
  137. * @type {string}
  138. */
  139. this["proxyHotkey"] = "";
  140. }
  141. if (!("soundAlert" in $$source)) {
  142. /**
  143. * 声音提示:mute(静音默认)/ding/beep/system/qq
  144. * @member
  145. * @type {string}
  146. */
  147. this["soundAlert"] = "";
  148. }
  149. if (!("tabOrder" in $$source)) {
  150. /**
  151. * Tab 显示顺序(tabId 列表,未列出的追加到末尾)
  152. * @member
  153. * @type {string[]}
  154. */
  155. this["tabOrder"] = [];
  156. }
  157. if (!("stockCodes" in $$source)) {
  158. /**
  159. * 股市页展示的股票代码列表
  160. * @member
  161. * @type {string[]}
  162. */
  163. this["stockCodes"] = [];
  164. }
  165. if (!("links" in $$source)) {
  166. /**
  167. * 常用网址列表(扁平,未分组;分组请用 LinkGroups)
  168. * @member
  169. * @type {LinkItem[]}
  170. */
  171. this["links"] = [];
  172. }
  173. if (!("linkGroups" in $$source)) {
  174. /**
  175. * 「网址」页分组(缩进层级定义,空 Name 表示未分组)
  176. * @member
  177. * @type {LinkGroup[]}
  178. */
  179. this["linkGroups"] = [];
  180. }
  181. if (!("newsKeywords" in $$source)) {
  182. /**
  183. * 新闻关注关键词,逗号分隔
  184. * @member
  185. * @type {string}
  186. */
  187. this["newsKeywords"] = "";
  188. }
  189. if (!("biliCookie" in $$source)) {
  190. /**
  191. * B站登录 cookie(含 SESSDATA),用于抓取「关注的人最新动态」
  192. * @member
  193. * @type {string}
  194. */
  195. this["biliCookie"] = "";
  196. }
  197. if (!("biliRefreshToken" in $$source)) {
  198. /**
  199. * B站 refresh_token,用于 cookie 自动续期(可选)
  200. * @member
  201. * @type {string}
  202. */
  203. this["biliRefreshToken"] = "";
  204. }
  205. if (!("biliPopularEnabled" in $$source)) {
  206. /**
  207. * 新闻页是否显示 B站热门/关注区块(默认开启)
  208. * @member
  209. * @type {boolean}
  210. */
  211. this["biliPopularEnabled"] = false;
  212. }
  213. if (!("githubRepos" in $$source)) {
  214. /**
  215. * 关注的 GitHub 仓库列表
  216. * @member
  217. * @type {RepoItem[]}
  218. */
  219. this["githubRepos"] = [];
  220. }
  221. if (!("customTabs" in $$source)) {
  222. /**
  223. * 用户自定义 Tab 页面(名字 + 网址)
  224. * @member
  225. * @type {CustomTab[]}
  226. */
  227. this["customTabs"] = [];
  228. }
  229. if (!("localTools" in $$source)) {
  230. /**
  231. * 「本地」页资源(标题|启动命令|说明,在设置中维护)
  232. * @member
  233. * @type {LocalTool[]}
  234. */
  235. this["localTools"] = [];
  236. }
  237. if (!("quickGroups" in $$source)) {
  238. /**
  239. * 「快捷」页分组(缩进分层,名称|路径|说明 条目)
  240. * @member
  241. * @type {QuickGroup[]}
  242. */
  243. this["quickGroups"] = [];
  244. }
  245. if (!("controlKeys" in $$source)) {
  246. /**
  247. * 控制页按键配置(前 5 键固定 上/下/左/右/休眠,第 6 键起为额外按键)
  248. * @member
  249. * @type {ControlKeyConfig[]}
  250. */
  251. this["controlKeys"] = [];
  252. }
  253. if (!("controlRepeatSecs" in $$source)) {
  254. /**
  255. * 控制页长按连发频率(秒,0.0-10.0,默认 1.0)
  256. * @member
  257. * @type {number}
  258. */
  259. this["controlRepeatSecs"] = 0;
  260. }
  261. if (!("apiAddr" in $$source)) {
  262. /**
  263. * 内置 API 服务监听地址
  264. * @member
  265. * @type {string}
  266. */
  267. this["apiAddr"] = "";
  268. }
  269. if (!("serviceAddr" in $$source)) {
  270. /**
  271. * Windows 服务模式(--service)监听地址,仅电源类接口
  272. * @member
  273. * @type {string}
  274. */
  275. this["serviceAddr"] = "";
  276. }
  277. if (!("apiAutoStart" in $$source)) {
  278. /**
  279. * 应用启动时自动启动内置 API 服务(默认开启)
  280. * @member
  281. * @type {boolean}
  282. */
  283. this["apiAutoStart"] = false;
  284. }
  285. if (!("uploadPassword" in $$source)) {
  286. /**
  287. * 文件上传密码(空=不启用上传/下载接口)
  288. * @member
  289. * @type {string}
  290. */
  291. this["uploadPassword"] = "";
  292. }
  293. if (!("uploadDir" in $$source)) {
  294. /**
  295. * 文件上传保存目录(空=程序所在目录/上传)
  296. * @member
  297. * @type {string}
  298. */
  299. this["uploadDir"] = "";
  300. }
  301. if (!("uploadMaxSize" in $$source)) {
  302. /**
  303. * 单个上传文件大小上限(MB),<=0 用默认 512
  304. * @member
  305. * @type {number}
  306. */
  307. this["uploadMaxSize"] = 0;
  308. }
  309. if (!("todoPath" in $$source)) {
  310. /**
  311. * 待办(TODO)文件路径
  312. * @member
  313. * @type {string}
  314. */
  315. this["todoPath"] = "";
  316. }
  317. if (!("recordPath" in $$source)) {
  318. /**
  319. * 记录(Record)文件路径:每行「姓名|名称|值」(保留兼容)
  320. * @member
  321. * @type {string}
  322. */
  323. this["recordPath"] = "";
  324. }
  325. if (!("recordDBPath" in $$source)) {
  326. /**
  327. * 记录数据库路径:SQLite3 数据库文件(记录 Tab 实际存储)
  328. * @member
  329. * @type {string}
  330. */
  331. this["recordDBPath"] = "";
  332. }
  333. if (!("tagDBPath" in $$source)) {
  334. /**
  335. * 文件标签数据库路径:SQLite3(资源管理器右键「标签」与悬停标签提示使用)
  336. * @member
  337. * @type {string}
  338. */
  339. this["tagDBPath"] = "";
  340. }
  341. if (!("tagMenuEnabled" in $$source)) {
  342. /**
  343. * 资源管理器右键「标签」功能开关:false=关闭右键菜单+停止监听悬停(默认启用)
  344. * @member
  345. * @type {boolean}
  346. */
  347. this["tagMenuEnabled"] = false;
  348. }
  349. if (!("backupDir" in $$source)) {
  350. /**
  351. * 文本文件备份目录(文件类自定义 Tab「备份」按钮使用)
  352. * @member
  353. * @type {string}
  354. */
  355. this["backupDir"] = "";
  356. }
  357. if (!("stockTicker" in $$source)) {
  358. /**
  359. * 股票滚动条配置
  360. * @member
  361. * @type {TickerConfig}
  362. */
  363. this["stockTicker"] = (new TickerConfig());
  364. }
  365. if (!("newsTicker" in $$source)) {
  366. /**
  367. * 新闻滚动条配置
  368. * @member
  369. * @type {TickerConfig}
  370. */
  371. this["newsTicker"] = (new TickerConfig());
  372. }
  373. if (!("poem" in $$source)) {
  374. /**
  375. * 随机古诗显示配置
  376. * @member
  377. * @type {PoemConfig}
  378. */
  379. this["poem"] = (new PoemConfig());
  380. }
  381. if (!("mouseAlert" in $$source)) {
  382. /**
  383. * 系统级鼠标提醒气泡配置
  384. * @member
  385. * @type {MouseAlertConfig}
  386. */
  387. this["mouseAlert"] = (new MouseAlertConfig());
  388. }
  389. if (!("browserPath" in $$source)) {
  390. /**
  391. * 指定浏览器 exe 路径(空=系统默认浏览器)
  392. * @member
  393. * @type {string}
  394. */
  395. this["browserPath"] = "";
  396. }
  397. if (!("ledColor" in $$source)) {
  398. /**
  399. * LED 滚动文字点阵颜色(如 #ff4d4d)
  400. * @member
  401. * @type {string}
  402. */
  403. this["ledColor"] = "";
  404. }
  405. if (!("stockUpColor" in $$source)) {
  406. /**
  407. * 股票上涨颜色
  408. * @member
  409. * @type {string}
  410. */
  411. this["stockUpColor"] = "";
  412. }
  413. if (!("stockDownColor" in $$source)) {
  414. /**
  415. * 股票下跌颜色
  416. * @member
  417. * @type {string}
  418. */
  419. this["stockDownColor"] = "";
  420. }
  421. if (!("stockRefreshSecs" in $$source)) {
  422. /**
  423. * 股市自动刷新间隔(秒)
  424. * @member
  425. * @type {number}
  426. */
  427. this["stockRefreshSecs"] = 0;
  428. }
  429. if (!("stockClosedRefreshSecs" in $$source)) {
  430. /**
  431. * 股市休市时自动刷新间隔(秒)
  432. * @member
  433. * @type {number}
  434. */
  435. this["stockClosedRefreshSecs"] = 0;
  436. }
  437. if (!("newsRefreshMinutes" in $$source)) {
  438. /**
  439. * 新闻自动刷新间隔(分钟)
  440. * @member
  441. * @type {number}
  442. */
  443. this["newsRefreshMinutes"] = 0;
  444. }
  445. if (!("newsCount" in $$source)) {
  446. /**
  447. * 新闻页显示条数
  448. * @member
  449. * @type {number}
  450. */
  451. this["newsCount"] = 0;
  452. }
  453. if (!("githubRefreshMinutes" in $$source)) {
  454. /**
  455. * Github 自动刷新间隔(分钟)
  456. * @member
  457. * @type {number}
  458. */
  459. this["githubRefreshMinutes"] = 0;
  460. }
  461. if (!("fontDelta" in $$source)) {
  462. /**
  463. * 全局字号偏移(px),+-3 范围内调整
  464. * @member
  465. * @type {number}
  466. */
  467. this["fontDelta"] = 0;
  468. }
  469. if (!("localSend" in $$source)) {
  470. /**
  471. * LocalSend 文件互传配置(本机名/接收目录/接收模式等)
  472. * @member
  473. * @type {LocalSendConfig}
  474. */
  475. this["localSend"] = (new LocalSendConfig());
  476. }
  477. if (!("croc" in $$source)) {
  478. /**
  479. * Croc 传送配置(发送/接收共用密码)
  480. * @member
  481. * @type {CrocConfig}
  482. */
  483. this["croc"] = (new CrocConfig());
  484. }
  485. if (!("ytdlp" in $$source)) {
  486. /**
  487. * 视频下载配置(yt-dlp 保存目录)
  488. * @member
  489. * @type {YTDLPConfig}
  490. */
  491. this["ytdlp"] = (new YTDLPConfig());
  492. }
  493. if (!("meitu" in $$source)) {
  494. /**
  495. * 美图工具配置(悬停预览大图最大边长等)
  496. * @member
  497. * @type {MeituConfig}
  498. */
  499. this["meitu"] = (new MeituConfig());
  500. }
  501. if (!("generalDownloadDir" in $$source)) {
  502. /**
  503. * 通用下载目录(美图等保存文件);空=系统下载目录
  504. * @member
  505. * @type {string}
  506. */
  507. this["generalDownloadDir"] = "";
  508. }
  509. if (!("memos" in $$source)) {
  510. /**
  511. * Memos 速记配置(地址/访问令牌)
  512. * @member
  513. * @type {MemosConfig}
  514. */
  515. this["memos"] = (new MemosConfig());
  516. }
  517. if (!("brightness" in $$source)) {
  518. /**
  519. * 显示器亮度配置(记住亮度、启动恢复)
  520. * @member
  521. * @type {BrightnessConfig}
  522. */
  523. this["brightness"] = (new BrightnessConfig());
  524. }
  525. if (!("footerDocsLabel" in $$source)) {
  526. /**
  527. * 页面右下角「官方文档」显示的标题文字
  528. * @member
  529. * @type {string}
  530. */
  531. this["footerDocsLabel"] = "";
  532. }
  533. if (!("footerDocsURL" in $$source)) {
  534. /**
  535. * 页面右下角标题文字点击打开的网址
  536. * @member
  537. * @type {string}
  538. */
  539. this["footerDocsURL"] = "";
  540. }
  541. if (!("toolOrder" in $$source)) {
  542. /**
  543. * 工具页卡片显示顺序(工具 id 列表,未列出的追加到末尾)
  544. * @member
  545. * @type {string[]}
  546. */
  547. this["toolOrder"] = [];
  548. }
  549. if (!("gitLab" in $$source)) {
  550. /**
  551. * 私有 GitLab 自动升级配置
  552. * @member
  553. * @type {GitLabConfig}
  554. */
  555. this["gitLab"] = (new GitLabConfig());
  556. }
  557. if (!("skippedUpdateVersion" in $$source)) {
  558. /**
  559. * 已跳过的版本(启动检查时视为无更新)
  560. * @member
  561. * @type {string}
  562. */
  563. this["skippedUpdateVersion"] = "";
  564. }
  565. if (!("proxy" in $$source)) {
  566. /**
  567. * 网络代理配置(工具页「网络代理」卡片)
  568. * @member
  569. * @type {ProxyConfig}
  570. */
  571. this["proxy"] = (new ProxyConfig());
  572. }
  573. if (!("resources" in $$source)) {
  574. /**
  575. * 设置-资源栏配置(下载 ffmpeg/croc 等外部工具)
  576. * @member
  577. * @type {ResourcesConfig}
  578. */
  579. this["resources"] = (new ResourcesConfig());
  580. }
  581. if (!("serviceZipUrl" in $$source)) {
  582. /**
  583. * 服务模式独立程序包地址(启用时缺失则下载解压)
  584. * @member
  585. * @type {string}
  586. */
  587. this["serviceZipUrl"] = "";
  588. }
  589. Object.assign(this, $$source);
  590. }
  591. /**
  592. * Creates a new AppSettings instance from a string or object.
  593. * @param {any} [$$source = {}]
  594. * @returns {AppSettings}
  595. */
  596. static createFrom($$source = {}) {
  597. const $$createField10_0 = $$createType0;
  598. const $$createField11_0 = $$createType0;
  599. const $$createField12_0 = $$createType2;
  600. const $$createField13_0 = $$createType4;
  601. const $$createField18_0 = $$createType6;
  602. const $$createField19_0 = $$createType8;
  603. const $$createField20_0 = $$createType10;
  604. const $$createField21_0 = $$createType12;
  605. const $$createField22_0 = $$createType14;
  606. const $$createField36_0 = $$createType15;
  607. const $$createField37_0 = $$createType15;
  608. const $$createField38_0 = $$createType16;
  609. const $$createField39_0 = $$createType17;
  610. const $$createField50_0 = $$createType18;
  611. const $$createField51_0 = $$createType19;
  612. const $$createField52_0 = $$createType20;
  613. const $$createField53_0 = $$createType21;
  614. const $$createField55_0 = $$createType22;
  615. const $$createField56_0 = $$createType23;
  616. const $$createField59_0 = $$createType0;
  617. const $$createField60_0 = $$createType24;
  618. const $$createField62_0 = $$createType25;
  619. const $$createField63_0 = $$createType26;
  620. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  621. if ("tabOrder" in $$parsedSource) {
  622. $$parsedSource["tabOrder"] = $$createField10_0($$parsedSource["tabOrder"]);
  623. }
  624. if ("stockCodes" in $$parsedSource) {
  625. $$parsedSource["stockCodes"] = $$createField11_0($$parsedSource["stockCodes"]);
  626. }
  627. if ("links" in $$parsedSource) {
  628. $$parsedSource["links"] = $$createField12_0($$parsedSource["links"]);
  629. }
  630. if ("linkGroups" in $$parsedSource) {
  631. $$parsedSource["linkGroups"] = $$createField13_0($$parsedSource["linkGroups"]);
  632. }
  633. if ("githubRepos" in $$parsedSource) {
  634. $$parsedSource["githubRepos"] = $$createField18_0($$parsedSource["githubRepos"]);
  635. }
  636. if ("customTabs" in $$parsedSource) {
  637. $$parsedSource["customTabs"] = $$createField19_0($$parsedSource["customTabs"]);
  638. }
  639. if ("localTools" in $$parsedSource) {
  640. $$parsedSource["localTools"] = $$createField20_0($$parsedSource["localTools"]);
  641. }
  642. if ("quickGroups" in $$parsedSource) {
  643. $$parsedSource["quickGroups"] = $$createField21_0($$parsedSource["quickGroups"]);
  644. }
  645. if ("controlKeys" in $$parsedSource) {
  646. $$parsedSource["controlKeys"] = $$createField22_0($$parsedSource["controlKeys"]);
  647. }
  648. if ("stockTicker" in $$parsedSource) {
  649. $$parsedSource["stockTicker"] = $$createField36_0($$parsedSource["stockTicker"]);
  650. }
  651. if ("newsTicker" in $$parsedSource) {
  652. $$parsedSource["newsTicker"] = $$createField37_0($$parsedSource["newsTicker"]);
  653. }
  654. if ("poem" in $$parsedSource) {
  655. $$parsedSource["poem"] = $$createField38_0($$parsedSource["poem"]);
  656. }
  657. if ("mouseAlert" in $$parsedSource) {
  658. $$parsedSource["mouseAlert"] = $$createField39_0($$parsedSource["mouseAlert"]);
  659. }
  660. if ("localSend" in $$parsedSource) {
  661. $$parsedSource["localSend"] = $$createField50_0($$parsedSource["localSend"]);
  662. }
  663. if ("croc" in $$parsedSource) {
  664. $$parsedSource["croc"] = $$createField51_0($$parsedSource["croc"]);
  665. }
  666. if ("ytdlp" in $$parsedSource) {
  667. $$parsedSource["ytdlp"] = $$createField52_0($$parsedSource["ytdlp"]);
  668. }
  669. if ("meitu" in $$parsedSource) {
  670. $$parsedSource["meitu"] = $$createField53_0($$parsedSource["meitu"]);
  671. }
  672. if ("memos" in $$parsedSource) {
  673. $$parsedSource["memos"] = $$createField55_0($$parsedSource["memos"]);
  674. }
  675. if ("brightness" in $$parsedSource) {
  676. $$parsedSource["brightness"] = $$createField56_0($$parsedSource["brightness"]);
  677. }
  678. if ("toolOrder" in $$parsedSource) {
  679. $$parsedSource["toolOrder"] = $$createField59_0($$parsedSource["toolOrder"]);
  680. }
  681. if ("gitLab" in $$parsedSource) {
  682. $$parsedSource["gitLab"] = $$createField60_0($$parsedSource["gitLab"]);
  683. }
  684. if ("proxy" in $$parsedSource) {
  685. $$parsedSource["proxy"] = $$createField62_0($$parsedSource["proxy"]);
  686. }
  687. if ("resources" in $$parsedSource) {
  688. $$parsedSource["resources"] = $$createField63_0($$parsedSource["resources"]);
  689. }
  690. return new AppSettings(/** @type {Partial<AppSettings>} */($$parsedSource));
  691. }
  692. }
  693. /**
  694. * BiliDynamicItem 一条 B站动态,供「新闻」页展示
  695. */
  696. export class BiliDynamicItem {
  697. /**
  698. * Creates a new BiliDynamicItem instance.
  699. * @param {Partial<BiliDynamicItem>} [$$source = {}] - The source object to create the BiliDynamicItem.
  700. */
  701. constructor($$source = {}) {
  702. if (!("source" in $$source)) {
  703. /**
  704. * 来源:B站动态
  705. * @member
  706. * @type {string}
  707. */
  708. this["source"] = "";
  709. }
  710. if (!("title" in $$source)) {
  711. /**
  712. * 标题(动态文案或视频标题)
  713. * @member
  714. * @type {string}
  715. */
  716. this["title"] = "";
  717. }
  718. if (!("url" in $$source)) {
  719. /**
  720. * 详情页地址
  721. * @member
  722. * @type {string}
  723. */
  724. this["url"] = "";
  725. }
  726. if (!("matched" in $$source)) {
  727. /**
  728. * 是否命中关注关键词
  729. * @member
  730. * @type {boolean}
  731. */
  732. this["matched"] = false;
  733. }
  734. Object.assign(this, $$source);
  735. }
  736. /**
  737. * Creates a new BiliDynamicItem instance from a string or object.
  738. * @param {any} [$$source = {}]
  739. * @returns {BiliDynamicItem}
  740. */
  741. static createFrom($$source = {}) {
  742. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  743. return new BiliDynamicItem(/** @type {Partial<BiliDynamicItem>} */($$parsedSource));
  744. }
  745. }
  746. /**
  747. * BiliFeedResult B站动态抓取结果:列表 + 需要提示用户的说明(如 cookie 过期后回退热门)
  748. */
  749. export class BiliFeedResult {
  750. /**
  751. * Creates a new BiliFeedResult instance.
  752. * @param {Partial<BiliFeedResult>} [$$source = {}] - The source object to create the BiliFeedResult.
  753. */
  754. constructor($$source = {}) {
  755. if (!("items" in $$source)) {
  756. /**
  757. * @member
  758. * @type {BiliDynamicItem[]}
  759. */
  760. this["items"] = [];
  761. }
  762. if (!("notice" in $$source)) {
  763. /**
  764. * @member
  765. * @type {string}
  766. */
  767. this["notice"] = "";
  768. }
  769. Object.assign(this, $$source);
  770. }
  771. /**
  772. * Creates a new BiliFeedResult instance from a string or object.
  773. * @param {any} [$$source = {}]
  774. * @returns {BiliFeedResult}
  775. */
  776. static createFrom($$source = {}) {
  777. const $$createField0_0 = $$createType28;
  778. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  779. if ("items" in $$parsedSource) {
  780. $$parsedSource["items"] = $$createField0_0($$parsedSource["items"]);
  781. }
  782. return new BiliFeedResult(/** @type {Partial<BiliFeedResult>} */($$parsedSource));
  783. }
  784. }
  785. /**
  786. * BiliQRPollResult 轮询结果
  787. * Status: pending(未扫码) / scanned(已扫码未确认) / success(登录成功) / expired(失效) / error
  788. * Message: 附加说明(如风控提示)
  789. */
  790. export class BiliQRPollResult {
  791. /**
  792. * Creates a new BiliQRPollResult instance.
  793. * @param {Partial<BiliQRPollResult>} [$$source = {}] - The source object to create the BiliQRPollResult.
  794. */
  795. constructor($$source = {}) {
  796. if (!("status" in $$source)) {
  797. /**
  798. * @member
  799. * @type {string}
  800. */
  801. this["status"] = "";
  802. }
  803. if (!("message" in $$source)) {
  804. /**
  805. * @member
  806. * @type {string}
  807. */
  808. this["message"] = "";
  809. }
  810. if (/** @type {any} */(false)) {
  811. /**
  812. * 仅 success 时返回新 cookie(供前端回填)
  813. * @member
  814. * @type {string | undefined}
  815. */
  816. this["cookie"] = undefined;
  817. }
  818. if (/** @type {any} */(false)) {
  819. /**
  820. * 仅 success 时返回新 refresh_token(供前端回填)
  821. * @member
  822. * @type {string | undefined}
  823. */
  824. this["refreshToken"] = undefined;
  825. }
  826. Object.assign(this, $$source);
  827. }
  828. /**
  829. * Creates a new BiliQRPollResult instance from a string or object.
  830. * @param {any} [$$source = {}]
  831. * @returns {BiliQRPollResult}
  832. */
  833. static createFrom($$source = {}) {
  834. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  835. return new BiliQRPollResult(/** @type {Partial<BiliQRPollResult>} */($$parsedSource));
  836. }
  837. }
  838. /**
  839. * BiliQRResult 二维码生成结果:qrcodeKey 供轮询,imageDataURI 为二维码 PNG data URI
  840. */
  841. export class BiliQRResult {
  842. /**
  843. * Creates a new BiliQRResult instance.
  844. * @param {Partial<BiliQRResult>} [$$source = {}] - The source object to create the BiliQRResult.
  845. */
  846. constructor($$source = {}) {
  847. if (!("qrcodeKey" in $$source)) {
  848. /**
  849. * @member
  850. * @type {string}
  851. */
  852. this["qrcodeKey"] = "";
  853. }
  854. if (!("imageDataURI" in $$source)) {
  855. /**
  856. * data:image/png;base64,...
  857. * @member
  858. * @type {string}
  859. */
  860. this["imageDataURI"] = "";
  861. }
  862. if (!("expireAt" in $$source)) {
  863. /**
  864. * 二维码过期时间戳(毫秒)
  865. * @member
  866. * @type {number}
  867. */
  868. this["expireAt"] = 0;
  869. }
  870. Object.assign(this, $$source);
  871. }
  872. /**
  873. * Creates a new BiliQRResult instance from a string or object.
  874. * @param {any} [$$source = {}]
  875. * @returns {BiliQRResult}
  876. */
  877. static createFrom($$source = {}) {
  878. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  879. return new BiliQRResult(/** @type {Partial<BiliQRResult>} */($$parsedSource));
  880. }
  881. }
  882. /**
  883. * BrightnessConfig 显示器亮度配置:记住各显示器亮度(按显示器名称),供启动时恢复
  884. */
  885. export class BrightnessConfig {
  886. /**
  887. * Creates a new BrightnessConfig instance.
  888. * @param {Partial<BrightnessConfig>} [$$source = {}] - The source object to create the BrightnessConfig.
  889. */
  890. constructor($$source = {}) {
  891. if (!("restoreOnStart" in $$source)) {
  892. /**
  893. * 启动应用时恢复上次亮度
  894. * @member
  895. * @type {boolean}
  896. */
  897. this["restoreOnStart"] = false;
  898. }
  899. if (!("levels" in $$source)) {
  900. /**
  901. * 显示器名称 -> 亮度百分比(0-100)
  902. * @member
  903. * @type {{ [_ in string]?: number }}
  904. */
  905. this["levels"] = {};
  906. }
  907. Object.assign(this, $$source);
  908. }
  909. /**
  910. * Creates a new BrightnessConfig instance from a string or object.
  911. * @param {any} [$$source = {}]
  912. * @returns {BrightnessConfig}
  913. */
  914. static createFrom($$source = {}) {
  915. const $$createField1_0 = $$createType29;
  916. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  917. if ("levels" in $$parsedSource) {
  918. $$parsedSource["levels"] = $$createField1_0($$parsedSource["levels"]);
  919. }
  920. return new BrightnessConfig(/** @type {Partial<BrightnessConfig>} */($$parsedSource));
  921. }
  922. }
  923. /**
  924. * CommitItem 仓库的一条提交记录
  925. */
  926. export class CommitItem {
  927. /**
  928. * Creates a new CommitItem instance.
  929. * @param {Partial<CommitItem>} [$$source = {}] - The source object to create the CommitItem.
  930. */
  931. constructor($$source = {}) {
  932. if (!("title" in $$source)) {
  933. /**
  934. * 提交标题(首行)
  935. * @member
  936. * @type {string}
  937. */
  938. this["title"] = "";
  939. }
  940. if (!("url" in $$source)) {
  941. /**
  942. * 提交详情页地址
  943. * @member
  944. * @type {string}
  945. */
  946. this["url"] = "";
  947. }
  948. if (!("updated" in $$source)) {
  949. /**
  950. * 提交时间(MM-DD HH:MM)
  951. * @member
  952. * @type {string}
  953. */
  954. this["updated"] = "";
  955. }
  956. Object.assign(this, $$source);
  957. }
  958. /**
  959. * Creates a new CommitItem instance from a string or object.
  960. * @param {any} [$$source = {}]
  961. * @returns {CommitItem}
  962. */
  963. static createFrom($$source = {}) {
  964. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  965. return new CommitItem(/** @type {Partial<CommitItem>} */($$parsedSource));
  966. }
  967. }
  968. /**
  969. * ControlKeyConfig 控制页方向盘单个按键配置(图标 + 命令 URL)
  970. */
  971. export class ControlKeyConfig {
  972. /**
  973. * Creates a new ControlKeyConfig instance.
  974. * @param {Partial<ControlKeyConfig>} [$$source = {}] - The source object to create the ControlKeyConfig.
  975. */
  976. constructor($$source = {}) {
  977. if (!("icon" in $$source)) {
  978. /**
  979. * 按钮显示字符,如 ↑、↓、←、→、休眠
  980. * @member
  981. * @type {string}
  982. */
  983. this["icon"] = "";
  984. }
  985. if (!("cmd" in $$source)) {
  986. /**
  987. * 点击时 GET 请求的完整 URL;空则回退旧指令信箱模式
  988. * @member
  989. * @type {string}
  990. */
  991. this["cmd"] = "";
  992. }
  993. Object.assign(this, $$source);
  994. }
  995. /**
  996. * Creates a new ControlKeyConfig instance from a string or object.
  997. * @param {any} [$$source = {}]
  998. * @returns {ControlKeyConfig}
  999. */
  1000. static createFrom($$source = {}) {
  1001. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1002. return new ControlKeyConfig(/** @type {Partial<ControlKeyConfig>} */($$parsedSource));
  1003. }
  1004. }
  1005. /**
  1006. * CrocConfig 是 Croc 传送的配置(发送/接收共用密码)。
  1007. */
  1008. export class CrocConfig {
  1009. /**
  1010. * Creates a new CrocConfig instance.
  1011. * @param {Partial<CrocConfig>} [$$source = {}] - The source object to create the CrocConfig.
  1012. */
  1013. constructor($$source = {}) {
  1014. if (!("password" in $$source)) {
  1015. /**
  1016. * 发送/接收共用密码:作为 croc 传输码(--code),空=使用随机传输码
  1017. * @member
  1018. * @type {string}
  1019. */
  1020. this["password"] = "";
  1021. }
  1022. if (!("dir" in $$source)) {
  1023. /**
  1024. * 接收保存目录,空=当前工作目录
  1025. * @member
  1026. * @type {string}
  1027. */
  1028. this["dir"] = "";
  1029. }
  1030. Object.assign(this, $$source);
  1031. }
  1032. /**
  1033. * Creates a new CrocConfig instance from a string or object.
  1034. * @param {any} [$$source = {}]
  1035. * @returns {CrocConfig}
  1036. */
  1037. static createFrom($$source = {}) {
  1038. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1039. return new CrocConfig(/** @type {Partial<CrocConfig>} */($$parsedSource));
  1040. }
  1041. }
  1042. /**
  1043. * CrocInfo 描述本机 croc 的可用性,用于前端决定是否展示工具卡片。
  1044. */
  1045. export class CrocInfo {
  1046. /**
  1047. * Creates a new CrocInfo instance.
  1048. * @param {Partial<CrocInfo>} [$$source = {}] - The source object to create the CrocInfo.
  1049. */
  1050. constructor($$source = {}) {
  1051. if (!("available" in $$source)) {
  1052. /**
  1053. * PATH 中是否找到 croc
  1054. * @member
  1055. * @type {boolean}
  1056. */
  1057. this["available"] = false;
  1058. }
  1059. if (!("path" in $$source)) {
  1060. /**
  1061. * croc 可执行文件路径
  1062. * @member
  1063. * @type {string}
  1064. */
  1065. this["path"] = "";
  1066. }
  1067. if (!("version" in $$source)) {
  1068. /**
  1069. * 版本信息(croc --version 输出)
  1070. * @member
  1071. * @type {string}
  1072. */
  1073. this["version"] = "";
  1074. }
  1075. Object.assign(this, $$source);
  1076. }
  1077. /**
  1078. * Creates a new CrocInfo instance from a string or object.
  1079. * @param {any} [$$source = {}]
  1080. * @returns {CrocInfo}
  1081. */
  1082. static createFrom($$source = {}) {
  1083. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1084. return new CrocInfo(/** @type {Partial<CrocInfo>} */($$parsedSource));
  1085. }
  1086. }
  1087. /**
  1088. * CustomTab 用户自定义 Tab 页面
  1089. */
  1090. export class CustomTab {
  1091. /**
  1092. * Creates a new CustomTab instance.
  1093. * @param {Partial<CustomTab>} [$$source = {}] - The source object to create the CustomTab.
  1094. */
  1095. constructor($$source = {}) {
  1096. if (!("name" in $$source)) {
  1097. /**
  1098. * 页面名称(Tab 按钮显示文字)
  1099. * @member
  1100. * @type {string}
  1101. */
  1102. this["name"] = "";
  1103. }
  1104. if (!("url" in $$source)) {
  1105. /**
  1106. * 页面地址(iframe 加载)
  1107. * @member
  1108. * @type {string}
  1109. */
  1110. this["url"] = "";
  1111. }
  1112. if (!("desc" in $$source)) {
  1113. /**
  1114. * 备注/提示信息(可空),Tab 说明文字优先显示
  1115. * @member
  1116. * @type {string}
  1117. */
  1118. this["desc"] = "";
  1119. }
  1120. Object.assign(this, $$source);
  1121. }
  1122. /**
  1123. * Creates a new CustomTab instance from a string or object.
  1124. * @param {any} [$$source = {}]
  1125. * @returns {CustomTab}
  1126. */
  1127. static createFrom($$source = {}) {
  1128. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1129. return new CustomTab(/** @type {Partial<CustomTab>} */($$parsedSource));
  1130. }
  1131. }
  1132. /**
  1133. * GitLabConfig 自动升级配置(静态更新站方案)。
  1134. * BaseURL 为静态站目录地址,清单固定放在 {BaseURL}/manifest.json,无需鉴权。
  1135. * ProjectPath / PrivateToken / Branch 为旧私有仓库方案遗留字段,不再参与,保留以兼容旧配置。
  1136. */
  1137. export class GitLabConfig {
  1138. /**
  1139. * Creates a new GitLabConfig instance.
  1140. * @param {Partial<GitLabConfig>} [$$source = {}] - The source object to create the GitLabConfig.
  1141. */
  1142. constructor($$source = {}) {
  1143. if (!("baseUrl" in $$source)) {
  1144. /**
  1145. * 静态更新站目录地址,如 https://i.scwy.net/down/toolsbox
  1146. * @member
  1147. * @type {string}
  1148. */
  1149. this["baseUrl"] = "";
  1150. }
  1151. if (!("projectPath" in $$source)) {
  1152. /**
  1153. * (旧字段,不再使用)
  1154. * @member
  1155. * @type {string}
  1156. */
  1157. this["projectPath"] = "";
  1158. }
  1159. if (!("privateToken" in $$source)) {
  1160. /**
  1161. * (旧字段,不再使用)
  1162. * @member
  1163. * @type {string}
  1164. */
  1165. this["privateToken"] = "";
  1166. }
  1167. if (!("branch" in $$source)) {
  1168. /**
  1169. * (旧字段,不再使用)
  1170. * @member
  1171. * @type {string}
  1172. */
  1173. this["branch"] = "";
  1174. }
  1175. Object.assign(this, $$source);
  1176. }
  1177. /**
  1178. * Creates a new GitLabConfig instance from a string or object.
  1179. * @param {any} [$$source = {}]
  1180. * @returns {GitLabConfig}
  1181. */
  1182. static createFrom($$source = {}) {
  1183. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1184. return new GitLabConfig(/** @type {Partial<GitLabConfig>} */($$parsedSource));
  1185. }
  1186. }
  1187. /**
  1188. * KLineBar 日 K 的一根柱子
  1189. */
  1190. export class KLineBar {
  1191. /**
  1192. * Creates a new KLineBar instance.
  1193. * @param {Partial<KLineBar>} [$$source = {}] - The source object to create the KLineBar.
  1194. */
  1195. constructor($$source = {}) {
  1196. if (!("date" in $$source)) {
  1197. /**
  1198. * 交易日
  1199. * @member
  1200. * @type {string}
  1201. */
  1202. this["date"] = "";
  1203. }
  1204. if (!("open" in $$source)) {
  1205. /**
  1206. * 开盘价
  1207. * @member
  1208. * @type {number}
  1209. */
  1210. this["open"] = 0;
  1211. }
  1212. if (!("close" in $$source)) {
  1213. /**
  1214. * 收盘价
  1215. * @member
  1216. * @type {number}
  1217. */
  1218. this["close"] = 0;
  1219. }
  1220. if (!("high" in $$source)) {
  1221. /**
  1222. * 最高价
  1223. * @member
  1224. * @type {number}
  1225. */
  1226. this["high"] = 0;
  1227. }
  1228. if (!("low" in $$source)) {
  1229. /**
  1230. * 最低价
  1231. * @member
  1232. * @type {number}
  1233. */
  1234. this["low"] = 0;
  1235. }
  1236. if (!("volume" in $$source)) {
  1237. /**
  1238. * 成交量(手)
  1239. * @member
  1240. * @type {number}
  1241. */
  1242. this["volume"] = 0;
  1243. }
  1244. Object.assign(this, $$source);
  1245. }
  1246. /**
  1247. * Creates a new KLineBar instance from a string or object.
  1248. * @param {any} [$$source = {}]
  1249. * @returns {KLineBar}
  1250. */
  1251. static createFrom($$source = {}) {
  1252. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1253. return new KLineBar(/** @type {Partial<KLineBar>} */($$parsedSource));
  1254. }
  1255. }
  1256. /**
  1257. * LinkGroup 「网址」页分组(设置中以缩进层级定义,类似快捷启动)
  1258. * 未分组的条目放在 LinkGroups 的第一个 Name 为空分组的 Items 中(前端解析时统一按组渲染)
  1259. */
  1260. export class LinkGroup {
  1261. /**
  1262. * Creates a new LinkGroup instance.
  1263. * @param {Partial<LinkGroup>} [$$source = {}] - The source object to create the LinkGroup.
  1264. */
  1265. constructor($$source = {}) {
  1266. if (!("name" in $$source)) {
  1267. /**
  1268. * 分组名(空表示未分组)
  1269. * @member
  1270. * @type {string}
  1271. */
  1272. this["name"] = "";
  1273. }
  1274. if (!("items" in $$source)) {
  1275. /**
  1276. * 组内网址
  1277. * @member
  1278. * @type {LinkItem[]}
  1279. */
  1280. this["items"] = [];
  1281. }
  1282. Object.assign(this, $$source);
  1283. }
  1284. /**
  1285. * Creates a new LinkGroup instance from a string or object.
  1286. * @param {any} [$$source = {}]
  1287. * @returns {LinkGroup}
  1288. */
  1289. static createFrom($$source = {}) {
  1290. const $$createField1_0 = $$createType2;
  1291. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1292. if ("items" in $$parsedSource) {
  1293. $$parsedSource["items"] = $$createField1_0($$parsedSource["items"]);
  1294. }
  1295. return new LinkGroup(/** @type {Partial<LinkGroup>} */($$parsedSource));
  1296. }
  1297. }
  1298. /**
  1299. * LinkItem 常用网址条目
  1300. */
  1301. export class LinkItem {
  1302. /**
  1303. * Creates a new LinkItem instance.
  1304. * @param {Partial<LinkItem>} [$$source = {}] - The source object to create the LinkItem.
  1305. */
  1306. constructor($$source = {}) {
  1307. if (!("name" in $$source)) {
  1308. /**
  1309. * 网站名称
  1310. * @member
  1311. * @type {string}
  1312. */
  1313. this["name"] = "";
  1314. }
  1315. if (!("url" in $$source)) {
  1316. /**
  1317. * 网站地址
  1318. * @member
  1319. * @type {string}
  1320. */
  1321. this["url"] = "";
  1322. }
  1323. Object.assign(this, $$source);
  1324. }
  1325. /**
  1326. * Creates a new LinkItem instance from a string or object.
  1327. * @param {any} [$$source = {}]
  1328. * @returns {LinkItem}
  1329. */
  1330. static createFrom($$source = {}) {
  1331. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1332. return new LinkItem(/** @type {Partial<LinkItem>} */($$parsedSource));
  1333. }
  1334. }
  1335. /**
  1336. * LocalSendConfig 是 LocalSend 的运行时配置。
  1337. */
  1338. export class LocalSendConfig {
  1339. /**
  1340. * Creates a new LocalSendConfig instance.
  1341. * @param {Partial<LocalSendConfig>} [$$source = {}] - The source object to create the LocalSendConfig.
  1342. */
  1343. constructor($$source = {}) {
  1344. if (!("enabled" in $$source)) {
  1345. /**
  1346. * 是否已启动服务
  1347. * @member
  1348. * @type {boolean}
  1349. */
  1350. this["enabled"] = false;
  1351. }
  1352. if (!("alias" in $$source)) {
  1353. /**
  1354. * 本机名称(广播给其他设备)
  1355. * @member
  1356. * @type {string}
  1357. */
  1358. this["alias"] = "";
  1359. }
  1360. if (!("receiveDir" in $$source)) {
  1361. /**
  1362. * 接收文件保存目录
  1363. * @member
  1364. * @type {string}
  1365. */
  1366. this["receiveDir"] = "";
  1367. }
  1368. if (!("autoAccept" in $$source)) {
  1369. /**
  1370. * true=自动接收;false=手动确认
  1371. * @member
  1372. * @type {boolean}
  1373. */
  1374. this["autoAccept"] = false;
  1375. }
  1376. if (!("port" in $$source)) {
  1377. /**
  1378. * 监听端口
  1379. * @member
  1380. * @type {number}
  1381. */
  1382. this["port"] = 0;
  1383. }
  1384. if (!("fingerprint" in $$source)) {
  1385. /**
  1386. * 本机证书指纹
  1387. * @member
  1388. * @type {string}
  1389. */
  1390. this["fingerprint"] = "";
  1391. }
  1392. Object.assign(this, $$source);
  1393. }
  1394. /**
  1395. * Creates a new LocalSendConfig instance from a string or object.
  1396. * @param {any} [$$source = {}]
  1397. * @returns {LocalSendConfig}
  1398. */
  1399. static createFrom($$source = {}) {
  1400. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1401. return new LocalSendConfig(/** @type {Partial<LocalSendConfig>} */($$parsedSource));
  1402. }
  1403. }
  1404. /**
  1405. * LocalTool 本地资源/工具配置项(「本地」页,在设置中维护)
  1406. */
  1407. export class LocalTool {
  1408. /**
  1409. * Creates a new LocalTool instance.
  1410. * @param {Partial<LocalTool>} [$$source = {}] - The source object to create the LocalTool.
  1411. */
  1412. constructor($$source = {}) {
  1413. if (!("title" in $$source)) {
  1414. /**
  1415. * 显示标题
  1416. * @member
  1417. * @type {string}
  1418. */
  1419. this["title"] = "";
  1420. }
  1421. if (!("cmd" in $$source)) {
  1422. /**
  1423. * 启动命令(程序/脚本,可带参数与环境变量)
  1424. * @member
  1425. * @type {string}
  1426. */
  1427. this["cmd"] = "";
  1428. }
  1429. if (!("desc" in $$source)) {
  1430. /**
  1431. * 说明文字(可空)
  1432. * @member
  1433. * @type {string}
  1434. */
  1435. this["desc"] = "";
  1436. }
  1437. Object.assign(this, $$source);
  1438. }
  1439. /**
  1440. * Creates a new LocalTool instance from a string or object.
  1441. * @param {any} [$$source = {}]
  1442. * @returns {LocalTool}
  1443. */
  1444. static createFrom($$source = {}) {
  1445. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1446. return new LocalTool(/** @type {Partial<LocalTool>} */($$parsedSource));
  1447. }
  1448. }
  1449. /**
  1450. * MeituConfig 美图工具配置
  1451. */
  1452. export class MeituConfig {
  1453. /**
  1454. * Creates a new MeituConfig instance.
  1455. * @param {Partial<MeituConfig>} [$$source = {}] - The source object to create the MeituConfig.
  1456. */
  1457. constructor($$source = {}) {
  1458. if (!("maxSize" in $$source)) {
  1459. /**
  1460. * 悬停预览大图最大边长(px),默认 400
  1461. * @member
  1462. * @type {number}
  1463. */
  1464. this["maxSize"] = 0;
  1465. }
  1466. Object.assign(this, $$source);
  1467. }
  1468. /**
  1469. * Creates a new MeituConfig instance from a string or object.
  1470. * @param {any} [$$source = {}]
  1471. * @returns {MeituConfig}
  1472. */
  1473. static createFrom($$source = {}) {
  1474. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1475. return new MeituConfig(/** @type {Partial<MeituConfig>} */($$parsedSource));
  1476. }
  1477. }
  1478. /**
  1479. * MemosConfig 保存 Memos 速记所需的配置。
  1480. */
  1481. export class MemosConfig {
  1482. /**
  1483. * Creates a new MemosConfig instance.
  1484. * @param {Partial<MemosConfig>} [$$source = {}] - The source object to create the MemosConfig.
  1485. */
  1486. constructor($$source = {}) {
  1487. if (!("url" in $$source)) {
  1488. /**
  1489. * 实例地址,如 https://m.scwy.net
  1490. * @member
  1491. * @type {string}
  1492. */
  1493. this["url"] = "";
  1494. }
  1495. if (!("token" in $$source)) {
  1496. /**
  1497. * 个人访问令牌(PAT),只存本地
  1498. * @member
  1499. * @type {string}
  1500. */
  1501. this["token"] = "";
  1502. }
  1503. Object.assign(this, $$source);
  1504. }
  1505. /**
  1506. * Creates a new MemosConfig instance from a string or object.
  1507. * @param {any} [$$source = {}]
  1508. * @returns {MemosConfig}
  1509. */
  1510. static createFrom($$source = {}) {
  1511. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1512. return new MemosConfig(/** @type {Partial<MemosConfig>} */($$parsedSource));
  1513. }
  1514. }
  1515. /**
  1516. * MinuteChart 分时图数据
  1517. */
  1518. export class MinuteChart {
  1519. /**
  1520. * Creates a new MinuteChart instance.
  1521. * @param {Partial<MinuteChart>} [$$source = {}] - The source object to create the MinuteChart.
  1522. */
  1523. constructor($$source = {}) {
  1524. if (!("code" in $$source)) {
  1525. /**
  1526. * 股票代码
  1527. * @member
  1528. * @type {string}
  1529. */
  1530. this["code"] = "";
  1531. }
  1532. if (!("prevClose" in $$source)) {
  1533. /**
  1534. * 昨收,作为分时基准线
  1535. * @member
  1536. * @type {number}
  1537. */
  1538. this["prevClose"] = 0;
  1539. }
  1540. if (!("points" in $$source)) {
  1541. /**
  1542. * 分时点序列
  1543. * @member
  1544. * @type {MinutePoint[]}
  1545. */
  1546. this["points"] = [];
  1547. }
  1548. Object.assign(this, $$source);
  1549. }
  1550. /**
  1551. * Creates a new MinuteChart instance from a string or object.
  1552. * @param {any} [$$source = {}]
  1553. * @returns {MinuteChart}
  1554. */
  1555. static createFrom($$source = {}) {
  1556. const $$createField2_0 = $$createType31;
  1557. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1558. if ("points" in $$parsedSource) {
  1559. $$parsedSource["points"] = $$createField2_0($$parsedSource["points"]);
  1560. }
  1561. return new MinuteChart(/** @type {Partial<MinuteChart>} */($$parsedSource));
  1562. }
  1563. }
  1564. /**
  1565. * MinutePoint 分时图上的一个点
  1566. */
  1567. export class MinutePoint {
  1568. /**
  1569. * Creates a new MinutePoint instance.
  1570. * @param {Partial<MinutePoint>} [$$source = {}] - The source object to create the MinutePoint.
  1571. */
  1572. constructor($$source = {}) {
  1573. if (!("time" in $$source)) {
  1574. /**
  1575. * HH:MM
  1576. * @member
  1577. * @type {string}
  1578. */
  1579. this["time"] = "";
  1580. }
  1581. if (!("price" in $$source)) {
  1582. /**
  1583. * 当前价
  1584. * @member
  1585. * @type {number}
  1586. */
  1587. this["price"] = 0;
  1588. }
  1589. if (!("avg" in $$source)) {
  1590. /**
  1591. * 均价
  1592. * @member
  1593. * @type {number}
  1594. */
  1595. this["avg"] = 0;
  1596. }
  1597. Object.assign(this, $$source);
  1598. }
  1599. /**
  1600. * Creates a new MinutePoint instance from a string or object.
  1601. * @param {any} [$$source = {}]
  1602. * @returns {MinutePoint}
  1603. */
  1604. static createFrom($$source = {}) {
  1605. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1606. return new MinutePoint(/** @type {Partial<MinutePoint>} */($$parsedSource));
  1607. }
  1608. }
  1609. /**
  1610. * MonitorBrightnessInfo 单个显示器的亮度状态(返回给前端渲染滑块)
  1611. */
  1612. export class MonitorBrightnessInfo {
  1613. /**
  1614. * Creates a new MonitorBrightnessInfo instance.
  1615. * @param {Partial<MonitorBrightnessInfo>} [$$source = {}] - The source object to create the MonitorBrightnessInfo.
  1616. */
  1617. constructor($$source = {}) {
  1618. if (!("index" in $$source)) {
  1619. /**
  1620. * 显示器序号(与 SetBrightness 的 index 一致)
  1621. * @member
  1622. * @type {number}
  1623. */
  1624. this["index"] = 0;
  1625. }
  1626. if (!("name" in $$source)) {
  1627. /**
  1628. * 显示器名称(物理监视器描述,取不到时用设备名)
  1629. * @member
  1630. * @type {string}
  1631. */
  1632. this["name"] = "";
  1633. }
  1634. if (!("percent" in $$source)) {
  1635. /**
  1636. * 当前亮度百分比 0-100
  1637. * @member
  1638. * @type {number}
  1639. */
  1640. this["percent"] = 0;
  1641. }
  1642. if (!("hardware" in $$source)) {
  1643. /**
  1644. * true=DDC/CI 硬件调光;false=Gamma 软件调光
  1645. * @member
  1646. * @type {boolean}
  1647. */
  1648. this["hardware"] = false;
  1649. }
  1650. Object.assign(this, $$source);
  1651. }
  1652. /**
  1653. * Creates a new MonitorBrightnessInfo instance from a string or object.
  1654. * @param {any} [$$source = {}]
  1655. * @returns {MonitorBrightnessInfo}
  1656. */
  1657. static createFrom($$source = {}) {
  1658. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1659. return new MonitorBrightnessInfo(/** @type {Partial<MonitorBrightnessInfo>} */($$parsedSource));
  1660. }
  1661. }
  1662. /**
  1663. * MouseAlertConfig 系统级鼠标提醒气泡的显示配置
  1664. */
  1665. export class MouseAlertConfig {
  1666. /**
  1667. * Creates a new MouseAlertConfig instance.
  1668. * @param {Partial<MouseAlertConfig>} [$$source = {}] - The source object to create the MouseAlertConfig.
  1669. */
  1670. constructor($$source = {}) {
  1671. if (!("fontSize" in $$source)) {
  1672. /**
  1673. * 字号(px)
  1674. * @member
  1675. * @type {number}
  1676. */
  1677. this["fontSize"] = 0;
  1678. }
  1679. if (!("width" in $$source)) {
  1680. /**
  1681. * 气泡窗口宽度(px)
  1682. * @member
  1683. * @type {number}
  1684. */
  1685. this["width"] = 0;
  1686. }
  1687. if (!("speed" in $$source)) {
  1688. /**
  1689. * 超长文字滚动速度(px/s)
  1690. * @member
  1691. * @type {number}
  1692. */
  1693. this["speed"] = 0;
  1694. }
  1695. if (!("color" in $$source)) {
  1696. /**
  1697. * 文字颜色
  1698. * @member
  1699. * @type {string}
  1700. */
  1701. this["color"] = "";
  1702. }
  1703. if (!("background" in $$source)) {
  1704. /**
  1705. * 气泡背景色(COLORKEY 抠成透明,仅作底色参考)
  1706. * @member
  1707. * @type {string}
  1708. */
  1709. this["background"] = "";
  1710. }
  1711. if (!("duration" in $$source)) {
  1712. /**
  1713. * 显示时长(秒)
  1714. * @member
  1715. * @type {number}
  1716. */
  1717. this["duration"] = 0;
  1718. }
  1719. if (!("outlineColor" in $$source)) {
  1720. /**
  1721. * 文字描边颜色(白边/黑边,与文字形成反差)
  1722. * @member
  1723. * @type {string}
  1724. */
  1725. this["outlineColor"] = "";
  1726. }
  1727. if (!("outlineWidth" in $$source)) {
  1728. /**
  1729. * 文字描边宽度(px),0 表示关闭描边
  1730. * @member
  1731. * @type {number}
  1732. */
  1733. this["outlineWidth"] = 0;
  1734. }
  1735. if (!("scroll" in $$source)) {
  1736. /**
  1737. * Scroll 是否滚动显示超长文字:nil 表示未设置(兼容旧配置,用 Speed>0 决定);
  1738. * true=超长时水平滚动跑马灯,false=超长部分右侧裁剪不滚动。
  1739. * @member
  1740. * @type {boolean | null}
  1741. */
  1742. this["scroll"] = null;
  1743. }
  1744. Object.assign(this, $$source);
  1745. }
  1746. /**
  1747. * Creates a new MouseAlertConfig instance from a string or object.
  1748. * @param {any} [$$source = {}]
  1749. * @returns {MouseAlertConfig}
  1750. */
  1751. static createFrom($$source = {}) {
  1752. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1753. return new MouseAlertConfig(/** @type {Partial<MouseAlertConfig>} */($$parsedSource));
  1754. }
  1755. }
  1756. /**
  1757. * NewsItem 一条新闻标题,供「新闻」页与新闻滚动条使用
  1758. */
  1759. export class NewsItem {
  1760. /**
  1761. * Creates a new NewsItem instance.
  1762. * @param {Partial<NewsItem>} [$$source = {}] - The source object to create the NewsItem.
  1763. */
  1764. constructor($$source = {}) {
  1765. if (!("source" in $$source)) {
  1766. /**
  1767. * 来源:煎蛋 / 腾讯 / Solidot / 财联社 / 热榜
  1768. * @member
  1769. * @type {string}
  1770. */
  1771. this["source"] = "";
  1772. }
  1773. if (!("title" in $$source)) {
  1774. /**
  1775. * 标题
  1776. * @member
  1777. * @type {string}
  1778. */
  1779. this["title"] = "";
  1780. }
  1781. if (!("url" in $$source)) {
  1782. /**
  1783. * 详情页地址
  1784. * @member
  1785. * @type {string}
  1786. */
  1787. this["url"] = "";
  1788. }
  1789. if (!("matched" in $$source)) {
  1790. /**
  1791. * 是否命中关注关键词
  1792. * @member
  1793. * @type {boolean}
  1794. */
  1795. this["matched"] = false;
  1796. }
  1797. if (!("hits" in $$source)) {
  1798. /**
  1799. * 命中的关键词个数(越多排越前,前端按档位配色)
  1800. * @member
  1801. * @type {number}
  1802. */
  1803. this["hits"] = 0;
  1804. }
  1805. Object.assign(this, $$source);
  1806. }
  1807. /**
  1808. * Creates a new NewsItem instance from a string or object.
  1809. * @param {any} [$$source = {}]
  1810. * @returns {NewsItem}
  1811. */
  1812. static createFrom($$source = {}) {
  1813. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1814. return new NewsItem(/** @type {Partial<NewsItem>} */($$parsedSource));
  1815. }
  1816. }
  1817. /**
  1818. * PCStatus 电源命令状态快照,供 API 与「主机」页查询
  1819. */
  1820. export class PCStatus {
  1821. /**
  1822. * Creates a new PCStatus instance.
  1823. * @param {Partial<PCStatus>} [$$source = {}] - The source object to create the PCStatus.
  1824. */
  1825. constructor($$source = {}) {
  1826. if (!("command" in $$source)) {
  1827. /**
  1828. * 最近一次命令类型
  1829. * @member
  1830. * @type {string}
  1831. */
  1832. this["command"] = "";
  1833. }
  1834. if (!("pending" in $$source)) {
  1835. /**
  1836. * 是否有待执行命令
  1837. * @member
  1838. * @type {boolean}
  1839. */
  1840. this["pending"] = false;
  1841. }
  1842. if (!("executeAt" in $$source)) {
  1843. /**
  1844. * 计划执行时间
  1845. * @member
  1846. * @type {string}
  1847. */
  1848. this["executeAt"] = "";
  1849. }
  1850. if (!("remainingSecs" in $$source)) {
  1851. /**
  1852. * 剩余秒数
  1853. * @member
  1854. * @type {number}
  1855. */
  1856. this["remainingSecs"] = 0;
  1857. }
  1858. if (!("clientIp" in $$source)) {
  1859. /**
  1860. * 最近一次请求的客户端 IP
  1861. * @member
  1862. * @type {string}
  1863. */
  1864. this["clientIp"] = "";
  1865. }
  1866. if (!("requestTime" in $$source)) {
  1867. /**
  1868. * 最近一次请求时间
  1869. * @member
  1870. * @type {string}
  1871. */
  1872. this["requestTime"] = "";
  1873. }
  1874. if (!("requested" in $$source)) {
  1875. /**
  1876. * 是否收到过请求
  1877. * @member
  1878. * @type {boolean}
  1879. */
  1880. this["requested"] = false;
  1881. }
  1882. Object.assign(this, $$source);
  1883. }
  1884. /**
  1885. * Creates a new PCStatus instance from a string or object.
  1886. * @param {any} [$$source = {}]
  1887. * @returns {PCStatus}
  1888. */
  1889. static createFrom($$source = {}) {
  1890. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1891. return new PCStatus(/** @type {Partial<PCStatus>} */($$parsedSource));
  1892. }
  1893. }
  1894. /**
  1895. * PhoneADBInfo 描述本机 ADB 的可用性,用于前端决定是否展示下载入口。
  1896. */
  1897. export class PhoneADBInfo {
  1898. /**
  1899. * Creates a new PhoneADBInfo instance.
  1900. * @param {Partial<PhoneADBInfo>} [$$source = {}] - The source object to create the PhoneADBInfo.
  1901. */
  1902. constructor($$source = {}) {
  1903. if (!("available" in $$source)) {
  1904. /**
  1905. * PATH 中是否找到 adb
  1906. * @member
  1907. * @type {boolean}
  1908. */
  1909. this["available"] = false;
  1910. }
  1911. if (!("path" in $$source)) {
  1912. /**
  1913. * adb 可执行文件路径
  1914. * @member
  1915. * @type {string}
  1916. */
  1917. this["path"] = "";
  1918. }
  1919. if (!("version" in $$source)) {
  1920. /**
  1921. * 版本信息(adb version 输出)
  1922. * @member
  1923. * @type {string}
  1924. */
  1925. this["version"] = "";
  1926. }
  1927. if (!("scrcpyAvailable" in $$source)) {
  1928. /**
  1929. * 录屏依赖的 scrcpy 可用性:未找到时前端不应展示「录屏」功能(仅保留截图)。
  1930. * 是否找到 scrcpy(PATH 或资源目录)
  1931. * @member
  1932. * @type {boolean}
  1933. */
  1934. this["scrcpyAvailable"] = false;
  1935. }
  1936. if (!("scrcpyPath" in $$source)) {
  1937. /**
  1938. * scrcpy 可执行文件路径(空=未找到)
  1939. * @member
  1940. * @type {string}
  1941. */
  1942. this["scrcpyPath"] = "";
  1943. }
  1944. Object.assign(this, $$source);
  1945. }
  1946. /**
  1947. * Creates a new PhoneADBInfo instance from a string or object.
  1948. * @param {any} [$$source = {}]
  1949. * @returns {PhoneADBInfo}
  1950. */
  1951. static createFrom($$source = {}) {
  1952. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1953. return new PhoneADBInfo(/** @type {Partial<PhoneADBInfo>} */($$parsedSource));
  1954. }
  1955. }
  1956. /**
  1957. * PhoneAppInfo 单个已安装应用信息。
  1958. */
  1959. export class PhoneAppInfo {
  1960. /**
  1961. * Creates a new PhoneAppInfo instance.
  1962. * @param {Partial<PhoneAppInfo>} [$$source = {}] - The source object to create the PhoneAppInfo.
  1963. */
  1964. constructor($$source = {}) {
  1965. if (!("package" in $$source)) {
  1966. /**
  1967. * 包名
  1968. * @member
  1969. * @type {string}
  1970. */
  1971. this["package"] = "";
  1972. }
  1973. if (!("system" in $$source)) {
  1974. /**
  1975. * 是否为系统应用(非三方)
  1976. * @member
  1977. * @type {boolean}
  1978. */
  1979. this["system"] = false;
  1980. }
  1981. Object.assign(this, $$source);
  1982. }
  1983. /**
  1984. * Creates a new PhoneAppInfo instance from a string or object.
  1985. * @param {any} [$$source = {}]
  1986. * @returns {PhoneAppInfo}
  1987. */
  1988. static createFrom($$source = {}) {
  1989. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1990. return new PhoneAppInfo(/** @type {Partial<PhoneAppInfo>} */($$parsedSource));
  1991. }
  1992. }
  1993. /**
  1994. * PhoneDevice 单个已连接(或已发现)的 Android 设备。
  1995. */
  1996. export class PhoneDevice {
  1997. /**
  1998. * Creates a new PhoneDevice instance.
  1999. * @param {Partial<PhoneDevice>} [$$source = {}] - The source object to create the PhoneDevice.
  2000. */
  2001. constructor($$source = {}) {
  2002. if (!("serial" in $$source)) {
  2003. /**
  2004. * 设备序列号(adb devices 第一列)
  2005. * @member
  2006. * @type {string}
  2007. */
  2008. this["serial"] = "";
  2009. }
  2010. if (!("state" in $$source)) {
  2011. /**
  2012. * 设备状态(device / unauthorized / offline)
  2013. * @member
  2014. * @type {string}
  2015. */
  2016. this["state"] = "";
  2017. }
  2018. Object.assign(this, $$source);
  2019. }
  2020. /**
  2021. * Creates a new PhoneDevice instance from a string or object.
  2022. * @param {any} [$$source = {}]
  2023. * @returns {PhoneDevice}
  2024. */
  2025. static createFrom($$source = {}) {
  2026. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2027. return new PhoneDevice(/** @type {Partial<PhoneDevice>} */($$parsedSource));
  2028. }
  2029. }
  2030. /**
  2031. * PhoneDeviceInfo 设备信息快照(信息/系统/屏幕/电池)。
  2032. */
  2033. export class PhoneDeviceInfo {
  2034. /**
  2035. * Creates a new PhoneDeviceInfo instance.
  2036. * @param {Partial<PhoneDeviceInfo>} [$$source = {}] - The source object to create the PhoneDeviceInfo.
  2037. */
  2038. constructor($$source = {}) {
  2039. if (!("model" in $$source)) {
  2040. /**
  2041. * 设备型号(ro.product.model)
  2042. * @member
  2043. * @type {string}
  2044. */
  2045. this["model"] = "";
  2046. }
  2047. if (!("manufacturer" in $$source)) {
  2048. /**
  2049. * 制造商(ro.product.manufacturer)
  2050. * @member
  2051. * @type {string}
  2052. */
  2053. this["manufacturer"] = "";
  2054. }
  2055. if (!("androidVer" in $$source)) {
  2056. /**
  2057. * Android 版本(ro.build.version.release)
  2058. * @member
  2059. * @type {string}
  2060. */
  2061. this["androidVer"] = "";
  2062. }
  2063. if (!("sdk" in $$source)) {
  2064. /**
  2065. * API 级别(ro.build.version.sdk)
  2066. * @member
  2067. * @type {string}
  2068. */
  2069. this["sdk"] = "";
  2070. }
  2071. if (!("resolution" in $$source)) {
  2072. /**
  2073. * 屏幕分辨率(wm size,如 1080x2400)
  2074. * @member
  2075. * @type {string}
  2076. */
  2077. this["resolution"] = "";
  2078. }
  2079. if (!("density" in $$source)) {
  2080. /**
  2081. * 屏幕密度(wm density)
  2082. * @member
  2083. * @type {string}
  2084. */
  2085. this["density"] = "";
  2086. }
  2087. if (!("battery" in $$source)) {
  2088. /**
  2089. * 电池电量(dumpsys battery level)
  2090. * @member
  2091. * @type {string}
  2092. */
  2093. this["battery"] = "";
  2094. }
  2095. if (!("chargeState" in $$source)) {
  2096. /**
  2097. * 充电状态(dumpsys battery status)
  2098. * @member
  2099. * @type {string}
  2100. */
  2101. this["chargeState"] = "";
  2102. }
  2103. Object.assign(this, $$source);
  2104. }
  2105. /**
  2106. * Creates a new PhoneDeviceInfo instance from a string or object.
  2107. * @param {any} [$$source = {}]
  2108. * @returns {PhoneDeviceInfo}
  2109. */
  2110. static createFrom($$source = {}) {
  2111. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2112. return new PhoneDeviceInfo(/** @type {Partial<PhoneDeviceInfo>} */($$parsedSource));
  2113. }
  2114. }
  2115. /**
  2116. * PhoneDevicesPayload 设备列表事件负载(phone:devices)。
  2117. */
  2118. export class PhoneDevicesPayload {
  2119. /**
  2120. * Creates a new PhoneDevicesPayload instance.
  2121. * @param {Partial<PhoneDevicesPayload>} [$$source = {}] - The source object to create the PhoneDevicesPayload.
  2122. */
  2123. constructor($$source = {}) {
  2124. if (!("available" in $$source)) {
  2125. /**
  2126. * adb 是否可用
  2127. * @member
  2128. * @type {boolean}
  2129. */
  2130. this["available"] = false;
  2131. }
  2132. if (!("devices" in $$source)) {
  2133. /**
  2134. * 发现的设备列表(含未授权/离线,前端按需过滤)
  2135. * @member
  2136. * @type {PhoneDevice[]}
  2137. */
  2138. this["devices"] = [];
  2139. }
  2140. if (!("error" in $$source)) {
  2141. /**
  2142. * 轮询错误(adb 执行失败时),空 = 正常
  2143. * @member
  2144. * @type {string}
  2145. */
  2146. this["error"] = "";
  2147. }
  2148. Object.assign(this, $$source);
  2149. }
  2150. /**
  2151. * Creates a new PhoneDevicesPayload instance from a string or object.
  2152. * @param {any} [$$source = {}]
  2153. * @returns {PhoneDevicesPayload}
  2154. */
  2155. static createFrom($$source = {}) {
  2156. const $$createField1_0 = $$createType33;
  2157. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2158. if ("devices" in $$parsedSource) {
  2159. $$parsedSource["devices"] = $$createField1_0($$parsedSource["devices"]);
  2160. }
  2161. return new PhoneDevicesPayload(/** @type {Partial<PhoneDevicesPayload>} */($$parsedSource));
  2162. }
  2163. }
  2164. /**
  2165. * PoemConfig 古诗显示的配置
  2166. */
  2167. export class PoemConfig {
  2168. /**
  2169. * Creates a new PoemConfig instance.
  2170. * @param {Partial<PoemConfig>} [$$source = {}] - The source object to create the PoemConfig.
  2171. */
  2172. constructor($$source = {}) {
  2173. if (!("enabled" in $$source)) {
  2174. /**
  2175. * 是否启用古诗显示
  2176. * @member
  2177. * @type {boolean}
  2178. */
  2179. this["enabled"] = false;
  2180. }
  2181. if (!("color" in $$source)) {
  2182. /**
  2183. * 文字颜色
  2184. * @member
  2185. * @type {string}
  2186. */
  2187. this["color"] = "";
  2188. }
  2189. if (!("fontSize" in $$source)) {
  2190. /**
  2191. * 字号(px)
  2192. * @member
  2193. * @type {number}
  2194. */
  2195. this["fontSize"] = 0;
  2196. }
  2197. if (!("tts" in $$source)) {
  2198. /**
  2199. * 允许 TTS 阅读(显示朗读按钮)
  2200. * @member
  2201. * @type {boolean}
  2202. */
  2203. this["tts"] = false;
  2204. }
  2205. if (!("interval" in $$source)) {
  2206. /**
  2207. * 自动换诗间隔(秒),0 表示不自动换
  2208. * @member
  2209. * @type {number}
  2210. */
  2211. this["interval"] = 0;
  2212. }
  2213. if (!("speed" in $$source)) {
  2214. /**
  2215. * 滚动速度(秒/轮),即滚动一个文本周期所需秒数,越小越快
  2216. * @member
  2217. * @type {number}
  2218. */
  2219. this["speed"] = 0;
  2220. }
  2221. Object.assign(this, $$source);
  2222. }
  2223. /**
  2224. * Creates a new PoemConfig instance from a string or object.
  2225. * @param {any} [$$source = {}]
  2226. * @returns {PoemConfig}
  2227. */
  2228. static createFrom($$source = {}) {
  2229. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2230. return new PoemConfig(/** @type {Partial<PoemConfig>} */($$parsedSource));
  2231. }
  2232. }
  2233. /**
  2234. * PoemData 一首古诗的完整数据(从接口解析)
  2235. */
  2236. export class PoemData {
  2237. /**
  2238. * Creates a new PoemData instance.
  2239. * @param {Partial<PoemData>} [$$source = {}] - The source object to create the PoemData.
  2240. */
  2241. constructor($$source = {}) {
  2242. if (!("title" in $$source)) {
  2243. /**
  2244. * 题目
  2245. * @member
  2246. * @type {string}
  2247. */
  2248. this["title"] = "";
  2249. }
  2250. if (!("author" in $$source)) {
  2251. /**
  2252. * 作者
  2253. * @member
  2254. * @type {string}
  2255. */
  2256. this["author"] = "";
  2257. }
  2258. if (!("dynasty" in $$source)) {
  2259. /**
  2260. * 朝代
  2261. * @member
  2262. * @type {string}
  2263. */
  2264. this["dynasty"] = "";
  2265. }
  2266. if (!("content" in $$source)) {
  2267. /**
  2268. * 每句诗(数组,按行显示)
  2269. * @member
  2270. * @type {string[]}
  2271. */
  2272. this["content"] = [];
  2273. }
  2274. if (!("type" in $$source)) {
  2275. /**
  2276. * 体裁,如 五言律诗
  2277. * @member
  2278. * @type {string}
  2279. */
  2280. this["type"] = "";
  2281. }
  2282. Object.assign(this, $$source);
  2283. }
  2284. /**
  2285. * Creates a new PoemData instance from a string or object.
  2286. * @param {any} [$$source = {}]
  2287. * @returns {PoemData}
  2288. */
  2289. static createFrom($$source = {}) {
  2290. const $$createField3_0 = $$createType0;
  2291. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2292. if ("content" in $$parsedSource) {
  2293. $$parsedSource["content"] = $$createField3_0($$parsedSource["content"]);
  2294. }
  2295. return new PoemData(/** @type {Partial<PoemData>} */($$parsedSource));
  2296. }
  2297. }
  2298. /**
  2299. * ProxyConfig 网络代理配置(工具页「网络代理」卡片)。
  2300. * 仅保存地址,开关状态由系统代理注册表(ProxyEnable)实时决定,不在配置里持久化。
  2301. */
  2302. export class ProxyConfig {
  2303. /**
  2304. * Creates a new ProxyConfig instance.
  2305. * @param {Partial<ProxyConfig>} [$$source = {}] - The source object to create the ProxyConfig.
  2306. */
  2307. constructor($$source = {}) {
  2308. if (!("server" in $$source)) {
  2309. /**
  2310. * 代理服务器地址,如 127.0.0.1:7890
  2311. * @member
  2312. * @type {string}
  2313. */
  2314. this["server"] = "";
  2315. }
  2316. Object.assign(this, $$source);
  2317. }
  2318. /**
  2319. * Creates a new ProxyConfig instance from a string or object.
  2320. * @param {any} [$$source = {}]
  2321. * @returns {ProxyConfig}
  2322. */
  2323. static createFrom($$source = {}) {
  2324. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2325. return new ProxyConfig(/** @type {Partial<ProxyConfig>} */($$parsedSource));
  2326. }
  2327. }
  2328. /**
  2329. * ProxyStatus 网络代理当前状态
  2330. */
  2331. export class ProxyStatus {
  2332. /**
  2333. * Creates a new ProxyStatus instance.
  2334. * @param {Partial<ProxyStatus>} [$$source = {}] - The source object to create the ProxyStatus.
  2335. */
  2336. constructor($$source = {}) {
  2337. if (!("enabled" in $$source)) {
  2338. /**
  2339. * 系统代理是否开启
  2340. * @member
  2341. * @type {boolean}
  2342. */
  2343. this["enabled"] = false;
  2344. }
  2345. if (!("server" in $$source)) {
  2346. /**
  2347. * 代理服务器地址(如 127.0.0.1:7890)
  2348. * @member
  2349. * @type {string}
  2350. */
  2351. this["server"] = "";
  2352. }
  2353. if (!("configured" in $$source)) {
  2354. /**
  2355. * 配置里是否保存了代理地址(用于前端区分「未设置」)
  2356. * @member
  2357. * @type {boolean}
  2358. */
  2359. this["configured"] = false;
  2360. }
  2361. Object.assign(this, $$source);
  2362. }
  2363. /**
  2364. * Creates a new ProxyStatus instance from a string or object.
  2365. * @param {any} [$$source = {}]
  2366. * @returns {ProxyStatus}
  2367. */
  2368. static createFrom($$source = {}) {
  2369. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2370. return new ProxyStatus(/** @type {Partial<ProxyStatus>} */($$parsedSource));
  2371. }
  2372. }
  2373. /**
  2374. * QuickGroup 快捷启动分组(「快捷」页)。
  2375. * 设置文本中顶层无缩进行为分组名,其下缩进的「名称|路径|说明」条目归入该组;
  2376. * 未缩进但在某分组之前直接出现的条目归入「未分组」。
  2377. */
  2378. export class QuickGroup {
  2379. /**
  2380. * Creates a new QuickGroup instance.
  2381. * @param {Partial<QuickGroup>} [$$source = {}] - The source object to create the QuickGroup.
  2382. */
  2383. constructor($$source = {}) {
  2384. if (!("name" in $$source)) {
  2385. /**
  2386. * 分组名(顶层无缩进行;空表示未分组)
  2387. * @member
  2388. * @type {string}
  2389. */
  2390. this["name"] = "";
  2391. }
  2392. if (!("items" in $$source)) {
  2393. /**
  2394. * 分组内快捷项(缩进条目)
  2395. * @member
  2396. * @type {QuickItem[]}
  2397. */
  2398. this["items"] = [];
  2399. }
  2400. Object.assign(this, $$source);
  2401. }
  2402. /**
  2403. * Creates a new QuickGroup instance from a string or object.
  2404. * @param {any} [$$source = {}]
  2405. * @returns {QuickGroup}
  2406. */
  2407. static createFrom($$source = {}) {
  2408. const $$createField1_0 = $$createType35;
  2409. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2410. if ("items" in $$parsedSource) {
  2411. $$parsedSource["items"] = $$createField1_0($$parsedSource["items"]);
  2412. }
  2413. return new QuickGroup(/** @type {Partial<QuickGroup>} */($$parsedSource));
  2414. }
  2415. }
  2416. /**
  2417. * QuickItem 快捷启动项(「快捷」页,设置中以缩进分层编辑)。
  2418. * 与 Biniware Run 类似:每项为「名称|程序路径|说明」,说明可省略。
  2419. */
  2420. export class QuickItem {
  2421. /**
  2422. * Creates a new QuickItem instance.
  2423. * @param {Partial<QuickItem>} [$$source = {}] - The source object to create the QuickItem.
  2424. */
  2425. constructor($$source = {}) {
  2426. if (!("title" in $$source)) {
  2427. /**
  2428. * 显示名称
  2429. * @member
  2430. * @type {string}
  2431. */
  2432. this["title"] = "";
  2433. }
  2434. if (!("path" in $$source)) {
  2435. /**
  2436. * 程序路径(可执行文件,可带参数与 %VAR% 环境变量)
  2437. * @member
  2438. * @type {string}
  2439. */
  2440. this["path"] = "";
  2441. }
  2442. if (!("desc" in $$source)) {
  2443. /**
  2444. * 说明文字(可空)
  2445. * @member
  2446. * @type {string}
  2447. */
  2448. this["desc"] = "";
  2449. }
  2450. Object.assign(this, $$source);
  2451. }
  2452. /**
  2453. * Creates a new QuickItem instance from a string or object.
  2454. * @param {any} [$$source = {}]
  2455. * @returns {QuickItem}
  2456. */
  2457. static createFrom($$source = {}) {
  2458. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2459. return new QuickItem(/** @type {Partial<QuickItem>} */($$parsedSource));
  2460. }
  2461. }
  2462. /**
  2463. * RecordItem 一条记录:姓名 + 名称 + 值 + 备注 + 录入时间,供记录 Tab 列表与柱状图使用
  2464. */
  2465. export class RecordItem {
  2466. /**
  2467. * Creates a new RecordItem instance.
  2468. * @param {Partial<RecordItem>} [$$source = {}] - The source object to create the RecordItem.
  2469. */
  2470. constructor($$source = {}) {
  2471. if (!("name" in $$source)) {
  2472. /**
  2473. * 姓名
  2474. * @member
  2475. * @type {string}
  2476. */
  2477. this["name"] = "";
  2478. }
  2479. if (!("item" in $$source)) {
  2480. /**
  2481. * 名称
  2482. * @member
  2483. * @type {string}
  2484. */
  2485. this["item"] = "";
  2486. }
  2487. if (!("value" in $$source)) {
  2488. /**
  2489. * 值
  2490. * @member
  2491. * @type {number}
  2492. */
  2493. this["value"] = 0;
  2494. }
  2495. if (!("remark" in $$source)) {
  2496. /**
  2497. * 备注(可选)
  2498. * @member
  2499. * @type {string}
  2500. */
  2501. this["remark"] = "";
  2502. }
  2503. if (!("createdAt" in $$source)) {
  2504. /**
  2505. * 录入时间 YYYY-MM-DD HH:MM:SS(前端新增时生成;为空时后端用当前时间)
  2506. * @member
  2507. * @type {string}
  2508. */
  2509. this["createdAt"] = "";
  2510. }
  2511. Object.assign(this, $$source);
  2512. }
  2513. /**
  2514. * Creates a new RecordItem instance from a string or object.
  2515. * @param {any} [$$source = {}]
  2516. * @returns {RecordItem}
  2517. */
  2518. static createFrom($$source = {}) {
  2519. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2520. return new RecordItem(/** @type {Partial<RecordItem>} */($$parsedSource));
  2521. }
  2522. }
  2523. /**
  2524. * ReleaseItem 一个 GitHub release 的简略信息,用于列出 Latest 之后的版本(Pre-release 等)
  2525. */
  2526. export class ReleaseItem {
  2527. /**
  2528. * Creates a new ReleaseItem instance.
  2529. * @param {Partial<ReleaseItem>} [$$source = {}] - The source object to create the ReleaseItem.
  2530. */
  2531. constructor($$source = {}) {
  2532. if (!("tagName" in $$source)) {
  2533. /**
  2534. * 版本标签,如 v1.3.0-beta.1
  2535. * @member
  2536. * @type {string}
  2537. */
  2538. this["tagName"] = "";
  2539. }
  2540. if (!("name" in $$source)) {
  2541. /**
  2542. * release 显示名称(标题),可能比 tag 更完整,如 "Rolling: v2.1.0-..."
  2543. * @member
  2544. * @type {string}
  2545. */
  2546. this["name"] = "";
  2547. }
  2548. if (!("url" in $$source)) {
  2549. /**
  2550. * release 详情页地址
  2551. * @member
  2552. * @type {string}
  2553. */
  2554. this["url"] = "";
  2555. }
  2556. if (!("isPrerelease" in $$source)) {
  2557. /**
  2558. * 是否预发布版本
  2559. * @member
  2560. * @type {boolean}
  2561. */
  2562. this["isPrerelease"] = false;
  2563. }
  2564. if (!("isDraft" in $$source)) {
  2565. /**
  2566. * 是否草稿版本
  2567. * @member
  2568. * @type {boolean}
  2569. */
  2570. this["isDraft"] = false;
  2571. }
  2572. if (!("publishedAt" in $$source)) {
  2573. /**
  2574. * 发布时间(MM-DD HH:MM)
  2575. * @member
  2576. * @type {string}
  2577. */
  2578. this["publishedAt"] = "";
  2579. }
  2580. Object.assign(this, $$source);
  2581. }
  2582. /**
  2583. * Creates a new ReleaseItem instance from a string or object.
  2584. * @param {any} [$$source = {}]
  2585. * @returns {ReleaseItem}
  2586. */
  2587. static createFrom($$source = {}) {
  2588. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2589. return new ReleaseItem(/** @type {Partial<ReleaseItem>} */($$parsedSource));
  2590. }
  2591. }
  2592. /**
  2593. * RepoFeed 一个 GitHub 仓库的最新提交摘要
  2594. */
  2595. export class RepoFeed {
  2596. /**
  2597. * Creates a new RepoFeed instance.
  2598. * @param {Partial<RepoFeed>} [$$source = {}] - The source object to create the RepoFeed.
  2599. */
  2600. constructor($$source = {}) {
  2601. if (!("url" in $$source)) {
  2602. /**
  2603. * 仓库地址(设置中配置)
  2604. * @member
  2605. * @type {string}
  2606. */
  2607. this["url"] = "";
  2608. }
  2609. if (!("desc" in $$source)) {
  2610. /**
  2611. * 项目说明
  2612. * @member
  2613. * @type {string}
  2614. */
  2615. this["desc"] = "";
  2616. }
  2617. if (!("repo" in $$source)) {
  2618. /**
  2619. * owner/repo 短名
  2620. * @member
  2621. * @type {string}
  2622. */
  2623. this["repo"] = "";
  2624. }
  2625. if (!("version" in $$source)) {
  2626. /**
  2627. * 本地已安装版本(设置中配置)
  2628. * @member
  2629. * @type {string}
  2630. */
  2631. this["version"] = "";
  2632. }
  2633. if (!("versionTime" in $$source)) {
  2634. /**
  2635. * 本地版本对应 release 的发布时间(MM-DD HH:MM),用于鼠标提示
  2636. * @member
  2637. * @type {string}
  2638. */
  2639. this["versionTime"] = "";
  2640. }
  2641. if (!("latest" in $$source)) {
  2642. /**
  2643. * 最新正式 release 版本号,无正式 release 时为空
  2644. * @member
  2645. * @type {string}
  2646. */
  2647. this["latest"] = "";
  2648. }
  2649. if (!("latestTime" in $$source)) {
  2650. /**
  2651. * 最新正式 release 发布时间(MM-DD HH:MM),用于鼠标提示
  2652. * @member
  2653. * @type {string}
  2654. */
  2655. this["latestTime"] = "";
  2656. }
  2657. if (!("hasUpdate" in $$source)) {
  2658. /**
  2659. * 是否存在可用更新(本地版本低于最新正式 release)
  2660. * @member
  2661. * @type {boolean}
  2662. */
  2663. this["hasUpdate"] = false;
  2664. }
  2665. if (!("releaseURL" in $$source)) {
  2666. /**
  2667. * 最新正式 release 的下载 / 详情页地址
  2668. * @member
  2669. * @type {string}
  2670. */
  2671. this["releaseURL"] = "";
  2672. }
  2673. if (!("newer" in $$source)) {
  2674. /**
  2675. * Latest 之后的版本(Pre-release 等,仅列出不参与更新比较)
  2676. * @member
  2677. * @type {ReleaseItem[]}
  2678. */
  2679. this["newer"] = [];
  2680. }
  2681. if (!("commits" in $$source)) {
  2682. /**
  2683. * 最近提交(最多 5 条)
  2684. * @member
  2685. * @type {CommitItem[]}
  2686. */
  2687. this["commits"] = [];
  2688. }
  2689. if (!("error" in $$source)) {
  2690. /**
  2691. * 抓取失败原因,为空表示正常
  2692. * @member
  2693. * @type {string}
  2694. */
  2695. this["error"] = "";
  2696. }
  2697. Object.assign(this, $$source);
  2698. }
  2699. /**
  2700. * Creates a new RepoFeed instance from a string or object.
  2701. * @param {any} [$$source = {}]
  2702. * @returns {RepoFeed}
  2703. */
  2704. static createFrom($$source = {}) {
  2705. const $$createField9_0 = $$createType37;
  2706. const $$createField10_0 = $$createType39;
  2707. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2708. if ("newer" in $$parsedSource) {
  2709. $$parsedSource["newer"] = $$createField9_0($$parsedSource["newer"]);
  2710. }
  2711. if ("commits" in $$parsedSource) {
  2712. $$parsedSource["commits"] = $$createField10_0($$parsedSource["commits"]);
  2713. }
  2714. return new RepoFeed(/** @type {Partial<RepoFeed>} */($$parsedSource));
  2715. }
  2716. }
  2717. /**
  2718. * RepoItem 关注的 GitHub 仓库条目
  2719. */
  2720. export class RepoItem {
  2721. /**
  2722. * Creates a new RepoItem instance.
  2723. * @param {Partial<RepoItem>} [$$source = {}] - The source object to create the RepoItem.
  2724. */
  2725. constructor($$source = {}) {
  2726. if (!("url" in $$source)) {
  2727. /**
  2728. * 仓库地址,如 https://github.com/wailsapp/wails
  2729. * @member
  2730. * @type {string}
  2731. */
  2732. this["url"] = "";
  2733. }
  2734. if (!("desc" in $$source)) {
  2735. /**
  2736. * 项目说明
  2737. * @member
  2738. * @type {string}
  2739. */
  2740. this["desc"] = "";
  2741. }
  2742. if (!("version" in $$source)) {
  2743. /**
  2744. * 本地已安装版本(用于与最新 release 比较),可为空
  2745. * @member
  2746. * @type {string}
  2747. */
  2748. this["version"] = "";
  2749. }
  2750. Object.assign(this, $$source);
  2751. }
  2752. /**
  2753. * Creates a new RepoItem instance from a string or object.
  2754. * @param {any} [$$source = {}]
  2755. * @returns {RepoItem}
  2756. */
  2757. static createFrom($$source = {}) {
  2758. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2759. return new RepoItem(/** @type {Partial<RepoItem>} */($$parsedSource));
  2760. }
  2761. }
  2762. /**
  2763. * ResourceStatus 资源条目 + 本机安装状态,供前端列表渲染
  2764. */
  2765. export class ResourceStatus {
  2766. /**
  2767. * Creates a new ResourceStatus instance.
  2768. * @param {Partial<ResourceStatus>} [$$source = {}] - The source object to create the ResourceStatus.
  2769. */
  2770. constructor($$source = {}) {
  2771. if (!("name" in $$source)) {
  2772. /**
  2773. * 唯一标识,如 ffmpeg
  2774. * @member
  2775. * @type {string}
  2776. */
  2777. this["name"] = "";
  2778. }
  2779. if (!("version" in $$source)) {
  2780. /**
  2781. * 版本号,如 6.1.1
  2782. * @member
  2783. * @type {string}
  2784. */
  2785. this["version"] = "";
  2786. }
  2787. if (!("url" in $$source)) {
  2788. /**
  2789. * 主下载地址(优先 GitHub;空=无主源,改用镜像)
  2790. * @member
  2791. * @type {string}
  2792. */
  2793. this["url"] = "";
  2794. }
  2795. if (!("mirrorUrl" in $$source)) {
  2796. /**
  2797. * 镜像/资源站下载地址(备选源,可手动选择)
  2798. * @member
  2799. * @type {string}
  2800. */
  2801. this["mirrorUrl"] = "";
  2802. }
  2803. if (!("size" in $$source)) {
  2804. /**
  2805. * 字节,0=未知
  2806. * @member
  2807. * @type {number}
  2808. */
  2809. this["size"] = 0;
  2810. }
  2811. if (!("desc" in $$source)) {
  2812. /**
  2813. * 说明文字
  2814. * @member
  2815. * @type {string}
  2816. */
  2817. this["desc"] = "";
  2818. }
  2819. if (!("platform" in $$source)) {
  2820. /**
  2821. * 目标平台,如 windows-amd64
  2822. * @member
  2823. * @type {string}
  2824. */
  2825. this["platform"] = "";
  2826. }
  2827. if (!("os" in $$source)) {
  2828. /**
  2829. * 目标操作系统,如 windows/linux/darwin;空=不限(本机可用)
  2830. * @member
  2831. * @type {string}
  2832. */
  2833. this["os"] = "";
  2834. }
  2835. if (!("homepage" in $$source)) {
  2836. /**
  2837. * 官网地址,点击名称可在浏览器打开;空=不可点击
  2838. * @member
  2839. * @type {string}
  2840. */
  2841. this["homepage"] = "";
  2842. }
  2843. if (!("installed" in $$source)) {
  2844. /**
  2845. * 是否已安装到目标目录
  2846. * @member
  2847. * @type {boolean}
  2848. */
  2849. this["installed"] = false;
  2850. }
  2851. if (!("installedVersion" in $$source)) {
  2852. /**
  2853. * 已安装版本(从目录/可执行文件探测)
  2854. * @member
  2855. * @type {string}
  2856. */
  2857. this["installedVersion"] = "";
  2858. }
  2859. if (!("path" in $$source)) {
  2860. /**
  2861. * 安装后可执行文件/目录路径
  2862. * @member
  2863. * @type {string}
  2864. */
  2865. this["path"] = "";
  2866. }
  2867. Object.assign(this, $$source);
  2868. }
  2869. /**
  2870. * Creates a new ResourceStatus instance from a string or object.
  2871. * @param {any} [$$source = {}]
  2872. * @returns {ResourceStatus}
  2873. */
  2874. static createFrom($$source = {}) {
  2875. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2876. return new ResourceStatus(/** @type {Partial<ResourceStatus>} */($$parsedSource));
  2877. }
  2878. }
  2879. /**
  2880. * ResourcesConfig 「设置-资源」栏配置:允许下载外部工具(ffmpeg/croc 等)
  2881. */
  2882. export class ResourcesConfig {
  2883. /**
  2884. * Creates a new ResourcesConfig instance.
  2885. * @param {Partial<ResourcesConfig>} [$$source = {}] - The source object to create the ResourcesConfig.
  2886. */
  2887. constructor($$source = {}) {
  2888. if (!("serverURL" in $$source)) {
  2889. /**
  2890. * 自定义资源清单服务器地址;空=使用内置默认清单
  2891. * @member
  2892. * @type {string}
  2893. */
  2894. this["serverURL"] = "";
  2895. }
  2896. if (!("downloadDir" in $$source)) {
  2897. /**
  2898. * 下载/解压目标目录;空=程序目录/resources
  2899. * @member
  2900. * @type {string}
  2901. */
  2902. this["downloadDir"] = "";
  2903. }
  2904. if (!("autoInstallPath" in $$source)) {
  2905. /**
  2906. * 下载成功后是否加入用户 PATH,默认 true
  2907. * @member
  2908. * @type {boolean}
  2909. */
  2910. this["autoInstallPath"] = false;
  2911. }
  2912. Object.assign(this, $$source);
  2913. }
  2914. /**
  2915. * Creates a new ResourcesConfig instance from a string or object.
  2916. * @param {any} [$$source = {}]
  2917. * @returns {ResourcesConfig}
  2918. */
  2919. static createFrom($$source = {}) {
  2920. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2921. return new ResourcesConfig(/** @type {Partial<ResourcesConfig>} */($$parsedSource));
  2922. }
  2923. }
  2924. /**
  2925. * ServiceModeStatus 服务模式运行状态(服务页展示)
  2926. */
  2927. export class ServiceModeStatus {
  2928. /**
  2929. * Creates a new ServiceModeStatus instance.
  2930. * @param {Partial<ServiceModeStatus>} [$$source = {}] - The source object to create the ServiceModeStatus.
  2931. */
  2932. constructor($$source = {}) {
  2933. if (!("addr" in $$source)) {
  2934. /**
  2935. * 服务模式监听地址
  2936. * @member
  2937. * @type {string}
  2938. */
  2939. this["addr"] = "";
  2940. }
  2941. if (!("running" in $$source)) {
  2942. /**
  2943. * 该地址上的电源 API 是否可用
  2944. * @member
  2945. * @type {boolean}
  2946. */
  2947. this["running"] = false;
  2948. }
  2949. if (!("managed" in $$source)) {
  2950. /**
  2951. * true=由真正的 Windows 服务提供;false=界面进程兜底
  2952. * @member
  2953. * @type {boolean}
  2954. */
  2955. this["managed"] = false;
  2956. }
  2957. if (!("installed" in $$source)) {
  2958. /**
  2959. * Windows 服务是否已注册(与运行与否无关,「删除服务模式」按钮依据)
  2960. * @member
  2961. * @type {boolean}
  2962. */
  2963. this["installed"] = false;
  2964. }
  2965. if (!("occupied" in $$source)) {
  2966. /**
  2967. * 端口被其他程序占用(既非服务模式也非本程序)
  2968. * @member
  2969. * @type {boolean}
  2970. */
  2971. this["occupied"] = false;
  2972. }
  2973. if (!("version" in $$source)) {
  2974. /**
  2975. * 服务端版本(可用时)
  2976. * @member
  2977. * @type {string}
  2978. */
  2979. this["version"] = "";
  2980. }
  2981. Object.assign(this, $$source);
  2982. }
  2983. /**
  2984. * Creates a new ServiceModeStatus instance from a string or object.
  2985. * @param {any} [$$source = {}]
  2986. * @returns {ServiceModeStatus}
  2987. */
  2988. static createFrom($$source = {}) {
  2989. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2990. return new ServiceModeStatus(/** @type {Partial<ServiceModeStatus>} */($$parsedSource));
  2991. }
  2992. }
  2993. /**
  2994. * StockQuote 单只股票的行情快照,供前端「股市」页展示
  2995. */
  2996. export class StockQuote {
  2997. /**
  2998. * Creates a new StockQuote instance.
  2999. * @param {Partial<StockQuote>} [$$source = {}] - The source object to create the StockQuote.
  3000. */
  3001. constructor($$source = {}) {
  3002. if (!("code" in $$source)) {
  3003. /**
  3004. * 带市场前缀的代码,如 sh600519
  3005. * @member
  3006. * @type {string}
  3007. */
  3008. this["code"] = "";
  3009. }
  3010. if (!("name" in $$source)) {
  3011. /**
  3012. * 股票名称
  3013. * @member
  3014. * @type {string}
  3015. */
  3016. this["name"] = "";
  3017. }
  3018. if (!("price" in $$source)) {
  3019. /**
  3020. * 当前价
  3021. * @member
  3022. * @type {number}
  3023. */
  3024. this["price"] = 0;
  3025. }
  3026. if (!("change" in $$source)) {
  3027. /**
  3028. * 涨跌额
  3029. * @member
  3030. * @type {number}
  3031. */
  3032. this["change"] = 0;
  3033. }
  3034. if (!("changePercent" in $$source)) {
  3035. /**
  3036. * 涨跌幅(%)
  3037. * @member
  3038. * @type {number}
  3039. */
  3040. this["changePercent"] = 0;
  3041. }
  3042. if (!("amount" in $$source)) {
  3043. /**
  3044. * 成交额(万元)
  3045. * @member
  3046. * @type {number}
  3047. */
  3048. this["amount"] = 0;
  3049. }
  3050. if (!("time" in $$source)) {
  3051. /**
  3052. * 行情时间 HH:MM:SS
  3053. * @member
  3054. * @type {string}
  3055. */
  3056. this["time"] = "";
  3057. }
  3058. Object.assign(this, $$source);
  3059. }
  3060. /**
  3061. * Creates a new StockQuote instance from a string or object.
  3062. * @param {any} [$$source = {}]
  3063. * @returns {StockQuote}
  3064. */
  3065. static createFrom($$source = {}) {
  3066. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3067. return new StockQuote(/** @type {Partial<StockQuote>} */($$parsedSource));
  3068. }
  3069. }
  3070. /**
  3071. * TagInfo 一条文件标签:完整路径 + 标签 + 备注 + 更新时间。
  3072. * 供前端设置页/标签管理 UI 与后端悬停提示使用。
  3073. */
  3074. export class TagInfo {
  3075. /**
  3076. * Creates a new TagInfo instance.
  3077. * @param {Partial<TagInfo>} [$$source = {}] - The source object to create the TagInfo.
  3078. */
  3079. constructor($$source = {}) {
  3080. if (!("path" in $$source)) {
  3081. /**
  3082. * 完整路径(已规范化:小写 + Clean)
  3083. * @member
  3084. * @type {string}
  3085. */
  3086. this["path"] = "";
  3087. }
  3088. if (!("tag" in $$source)) {
  3089. /**
  3090. * 标签(可空)
  3091. * @member
  3092. * @type {string}
  3093. */
  3094. this["tag"] = "";
  3095. }
  3096. if (!("note" in $$source)) {
  3097. /**
  3098. * 备注(可空)
  3099. * @member
  3100. * @type {string}
  3101. */
  3102. this["note"] = "";
  3103. }
  3104. if (!("updatedAt" in $$source)) {
  3105. /**
  3106. * 最近更新时间 YYYY-MM-DD HH:MM:SS
  3107. * @member
  3108. * @type {string}
  3109. */
  3110. this["updatedAt"] = "";
  3111. }
  3112. Object.assign(this, $$source);
  3113. }
  3114. /**
  3115. * Creates a new TagInfo instance from a string or object.
  3116. * @param {any} [$$source = {}]
  3117. * @returns {TagInfo}
  3118. */
  3119. static createFrom($$source = {}) {
  3120. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3121. return new TagInfo(/** @type {Partial<TagInfo>} */($$parsedSource));
  3122. }
  3123. }
  3124. /**
  3125. * TickerConfig 置顶滚动条(股票 / 新闻)的显示配置
  3126. */
  3127. export class TickerConfig {
  3128. /**
  3129. * Creates a new TickerConfig instance.
  3130. * @param {Partial<TickerConfig>} [$$source = {}] - The source object to create the TickerConfig.
  3131. */
  3132. constructor($$source = {}) {
  3133. if (!("enabled" in $$source)) {
  3134. /**
  3135. * 是否显示滚动条窗口
  3136. * @member
  3137. * @type {boolean}
  3138. */
  3139. this["enabled"] = false;
  3140. }
  3141. if (!("width" in $$source)) {
  3142. /**
  3143. * 窗口宽度(px),0 表示默认 1400
  3144. * @member
  3145. * @type {number}
  3146. */
  3147. this["width"] = 0;
  3148. }
  3149. if (!("fontSize" in $$source)) {
  3150. /**
  3151. * 字号(px)
  3152. * @member
  3153. * @type {number}
  3154. */
  3155. this["fontSize"] = 0;
  3156. }
  3157. if (!("color" in $$source)) {
  3158. /**
  3159. * 文字颜色
  3160. * @member
  3161. * @type {string}
  3162. */
  3163. this["color"] = "";
  3164. }
  3165. if (!("speed" in $$source)) {
  3166. /**
  3167. * 滚动速度(px/s)
  3168. * @member
  3169. * @type {number}
  3170. */
  3171. this["speed"] = 0;
  3172. }
  3173. if (!("transparent" in $$source)) {
  3174. /**
  3175. * 背景透明,不遮挡下方内容
  3176. * @member
  3177. * @type {boolean}
  3178. */
  3179. this["transparent"] = false;
  3180. }
  3181. if (!("x" in $$source)) {
  3182. /**
  3183. * 窗口位置,-1 表示未设置(系统默认位置)
  3184. * @member
  3185. * @type {number}
  3186. */
  3187. this["x"] = 0;
  3188. }
  3189. if (!("y" in $$source)) {
  3190. /**
  3191. * 窗口位置,-1 表示未设置
  3192. * @member
  3193. * @type {number}
  3194. */
  3195. this["y"] = 0;
  3196. }
  3197. Object.assign(this, $$source);
  3198. }
  3199. /**
  3200. * Creates a new TickerConfig instance from a string or object.
  3201. * @param {any} [$$source = {}]
  3202. * @returns {TickerConfig}
  3203. */
  3204. static createFrom($$source = {}) {
  3205. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3206. return new TickerConfig(/** @type {Partial<TickerConfig>} */($$parsedSource));
  3207. }
  3208. }
  3209. /**
  3210. * TranslateResult 一次翻译的结果,供前端展示。
  3211. */
  3212. export class TranslateResult {
  3213. /**
  3214. * Creates a new TranslateResult instance.
  3215. * @param {Partial<TranslateResult>} [$$source = {}] - The source object to create the TranslateResult.
  3216. */
  3217. constructor($$source = {}) {
  3218. if (!("text" in $$source)) {
  3219. /**
  3220. * 翻译结果文本
  3221. * @member
  3222. * @type {string}
  3223. */
  3224. this["text"] = "";
  3225. }
  3226. if (!("detected" in $$source)) {
  3227. /**
  3228. * 检测到的源语言(zh / en)
  3229. * @member
  3230. * @type {string}
  3231. */
  3232. this["detected"] = "";
  3233. }
  3234. if (!("target" in $$source)) {
  3235. /**
  3236. * 目标语言(zh / en)
  3237. * @member
  3238. * @type {string}
  3239. */
  3240. this["target"] = "";
  3241. }
  3242. Object.assign(this, $$source);
  3243. }
  3244. /**
  3245. * Creates a new TranslateResult instance from a string or object.
  3246. * @param {any} [$$source = {}]
  3247. * @returns {TranslateResult}
  3248. */
  3249. static createFrom($$source = {}) {
  3250. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3251. return new TranslateResult(/** @type {Partial<TranslateResult>} */($$parsedSource));
  3252. }
  3253. }
  3254. /**
  3255. * TrendingRepo 一个热门仓库条目(来源可为 GitHub Trending 或 HelloGitHub)
  3256. */
  3257. export class TrendingRepo {
  3258. /**
  3259. * Creates a new TrendingRepo instance.
  3260. * @param {Partial<TrendingRepo>} [$$source = {}] - The source object to create the TrendingRepo.
  3261. */
  3262. constructor($$source = {}) {
  3263. if (!("name" in $$source)) {
  3264. /**
  3265. * owner/repo 短名
  3266. * @member
  3267. * @type {string}
  3268. */
  3269. this["name"] = "";
  3270. }
  3271. if (!("url" in $$source)) {
  3272. /**
  3273. * 仓库主页地址(GitHub 直链)
  3274. * @member
  3275. * @type {string}
  3276. */
  3277. this["url"] = "";
  3278. }
  3279. if (!("desc" in $$source)) {
  3280. /**
  3281. * 简介(英文已自动翻译为中文,翻译失败保留原文)
  3282. * @member
  3283. * @type {string}
  3284. */
  3285. this["desc"] = "";
  3286. }
  3287. if (!("lang" in $$source)) {
  3288. /**
  3289. * 主要语言,无则空
  3290. * @member
  3291. * @type {string}
  3292. */
  3293. this["lang"] = "";
  3294. }
  3295. if (!("stars" in $$source)) {
  3296. /**
  3297. * 总星数(如 "106,375")
  3298. * @member
  3299. * @type {string}
  3300. */
  3301. this["stars"] = "";
  3302. }
  3303. if (!("todayStars" in $$source)) {
  3304. /**
  3305. * 今日新增星数(如 "1,140",无则空)
  3306. * @member
  3307. * @type {string}
  3308. */
  3309. this["todayStars"] = "";
  3310. }
  3311. if (!("forks" in $$source)) {
  3312. /**
  3313. * fork 数(如 "9,365",无则空)
  3314. * @member
  3315. * @type {string}
  3316. */
  3317. this["forks"] = "";
  3318. }
  3319. if (!("source" in $$source)) {
  3320. /**
  3321. * 来源:"github"(GitHub Trending)/ "hellogithub"
  3322. * @member
  3323. * @type {string}
  3324. */
  3325. this["source"] = "";
  3326. }
  3327. if (!("heat" in $$source)) {
  3328. /**
  3329. * 热度(HelloGitHub 点击量,其它来源为空)
  3330. * @member
  3331. * @type {string}
  3332. */
  3333. this["heat"] = "";
  3334. }
  3335. Object.assign(this, $$source);
  3336. }
  3337. /**
  3338. * Creates a new TrendingRepo instance from a string or object.
  3339. * @param {any} [$$source = {}]
  3340. * @returns {TrendingRepo}
  3341. */
  3342. static createFrom($$source = {}) {
  3343. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3344. return new TrendingRepo(/** @type {Partial<TrendingRepo>} */($$parsedSource));
  3345. }
  3346. }
  3347. /**
  3348. * UDPInfo 描述一次 UDP 键值服务的运行状态,供前端展示。
  3349. */
  3350. export class UDPInfo {
  3351. /**
  3352. * Creates a new UDPInfo instance.
  3353. * @param {Partial<UDPInfo>} [$$source = {}] - The source object to create the UDPInfo.
  3354. */
  3355. constructor($$source = {}) {
  3356. if (!("running" in $$source)) {
  3357. /**
  3358. * 是否运行中
  3359. * @member
  3360. * @type {boolean}
  3361. */
  3362. this["running"] = false;
  3363. }
  3364. if (!("port" in $$source)) {
  3365. /**
  3366. * 监听端口
  3367. * @member
  3368. * @type {number}
  3369. */
  3370. this["port"] = 0;
  3371. }
  3372. if (!("addr" in $$source)) {
  3373. /**
  3374. * 监听地址 udp://0.0.0.0:port
  3375. * @member
  3376. * @type {string}
  3377. */
  3378. this["addr"] = "";
  3379. }
  3380. if (!("startedAt" in $$source)) {
  3381. /**
  3382. * 启动时间
  3383. * @member
  3384. * @type {string}
  3385. */
  3386. this["startedAt"] = "";
  3387. }
  3388. if (!("error" in $$source)) {
  3389. /**
  3390. * 最近一次错误
  3391. * @member
  3392. * @type {string}
  3393. */
  3394. this["error"] = "";
  3395. }
  3396. if (!("rxCount" in $$source)) {
  3397. /**
  3398. * 累计接收数据包数
  3399. * @member
  3400. * @type {number}
  3401. */
  3402. this["rxCount"] = 0;
  3403. }
  3404. if (!("txCount" in $$source)) {
  3405. /**
  3406. * 累计发送(回发/手动)数据包数
  3407. * @member
  3408. * @type {number}
  3409. */
  3410. this["txCount"] = 0;
  3411. }
  3412. Object.assign(this, $$source);
  3413. }
  3414. /**
  3415. * Creates a new UDPInfo instance from a string or object.
  3416. * @param {any} [$$source = {}]
  3417. * @returns {UDPInfo}
  3418. */
  3419. static createFrom($$source = {}) {
  3420. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3421. return new UDPInfo(/** @type {Partial<UDPInfo>} */($$parsedSource));
  3422. }
  3423. }
  3424. /**
  3425. * WebServiceInfo 描述一次 Web 服务运行实例的状态,供前端展示。
  3426. */
  3427. export class WebServiceInfo {
  3428. /**
  3429. * Creates a new WebServiceInfo instance.
  3430. * @param {Partial<WebServiceInfo>} [$$source = {}] - The source object to create the WebServiceInfo.
  3431. */
  3432. constructor($$source = {}) {
  3433. if (!("running" in $$source)) {
  3434. /**
  3435. * 是否运行中
  3436. * @member
  3437. * @type {boolean}
  3438. */
  3439. this["running"] = false;
  3440. }
  3441. if (!("dir" in $$source)) {
  3442. /**
  3443. * 服务目录
  3444. * @member
  3445. * @type {string}
  3446. */
  3447. this["dir"] = "";
  3448. }
  3449. if (!("url" in $$source)) {
  3450. /**
  3451. * 访问地址 http://127.0.0.1:port/
  3452. * @member
  3453. * @type {string}
  3454. */
  3455. this["url"] = "";
  3456. }
  3457. if (!("port" in $$source)) {
  3458. /**
  3459. * 监听端口
  3460. * @member
  3461. * @type {number}
  3462. */
  3463. this["port"] = 0;
  3464. }
  3465. if (!("indexName" in $$source)) {
  3466. /**
  3467. * 实际用作默认页的文件(index.html / readme.md / 空)
  3468. * @member
  3469. * @type {string}
  3470. */
  3471. this["indexName"] = "";
  3472. }
  3473. if (!("startedAt" in $$source)) {
  3474. /**
  3475. * 启动时间
  3476. * @member
  3477. * @type {string}
  3478. */
  3479. this["startedAt"] = "";
  3480. }
  3481. if (!("error" in $$source)) {
  3482. /**
  3483. * 最近一次错误
  3484. * @member
  3485. * @type {string}
  3486. */
  3487. this["error"] = "";
  3488. }
  3489. if (!("connections" in $$source)) {
  3490. /**
  3491. * 累计请求次数
  3492. * @member
  3493. * @type {number}
  3494. */
  3495. this["connections"] = 0;
  3496. }
  3497. Object.assign(this, $$source);
  3498. }
  3499. /**
  3500. * Creates a new WebServiceInfo instance from a string or object.
  3501. * @param {any} [$$source = {}]
  3502. * @returns {WebServiceInfo}
  3503. */
  3504. static createFrom($$source = {}) {
  3505. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3506. return new WebServiceInfo(/** @type {Partial<WebServiceInfo>} */($$parsedSource));
  3507. }
  3508. }
  3509. /**
  3510. * YTDLPConfig 视频下载(yt-dlp)的配置
  3511. */
  3512. export class YTDLPConfig {
  3513. /**
  3514. * Creates a new YTDLPConfig instance.
  3515. * @param {Partial<YTDLPConfig>} [$$source = {}] - The source object to create the YTDLPConfig.
  3516. */
  3517. constructor($$source = {}) {
  3518. if (!("dir" in $$source)) {
  3519. /**
  3520. * 下载保存目录,空=程序当前工作目录
  3521. * @member
  3522. * @type {string}
  3523. */
  3524. this["dir"] = "";
  3525. }
  3526. if (!("mp3Quality" in $$source)) {
  3527. /**
  3528. * mp3 转换质量:0-9(VBR,0 最好)或 128K/192K/320K,默认 0
  3529. * @member
  3530. * @type {string}
  3531. */
  3532. this["mp3Quality"] = "";
  3533. }
  3534. Object.assign(this, $$source);
  3535. }
  3536. /**
  3537. * Creates a new YTDLPConfig instance from a string or object.
  3538. * @param {any} [$$source = {}]
  3539. * @returns {YTDLPConfig}
  3540. */
  3541. static createFrom($$source = {}) {
  3542. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3543. return new YTDLPConfig(/** @type {Partial<YTDLPConfig>} */($$parsedSource));
  3544. }
  3545. }
  3546. /**
  3547. * YTDLPInfo 描述本机 yt-dlp 的可用性,用于前端决定是否展示工具卡片。
  3548. */
  3549. export class YTDLPInfo {
  3550. /**
  3551. * Creates a new YTDLPInfo instance.
  3552. * @param {Partial<YTDLPInfo>} [$$source = {}] - The source object to create the YTDLPInfo.
  3553. */
  3554. constructor($$source = {}) {
  3555. if (!("available" in $$source)) {
  3556. /**
  3557. * PATH 中是否找到 yt-dlp
  3558. * @member
  3559. * @type {boolean}
  3560. */
  3561. this["available"] = false;
  3562. }
  3563. if (!("path" in $$source)) {
  3564. /**
  3565. * yt-dlp 可执行文件路径
  3566. * @member
  3567. * @type {string}
  3568. */
  3569. this["path"] = "";
  3570. }
  3571. if (!("version" in $$source)) {
  3572. /**
  3573. * 版本信息(yt-dlp --version 输出)
  3574. * @member
  3575. * @type {string}
  3576. */
  3577. this["version"] = "";
  3578. }
  3579. if (!("ffmpeg" in $$source)) {
  3580. /**
  3581. * PATH 中是否找到 ffmpeg(用于「下载转 mp3」)
  3582. * @member
  3583. * @type {boolean}
  3584. */
  3585. this["ffmpeg"] = false;
  3586. }
  3587. Object.assign(this, $$source);
  3588. }
  3589. /**
  3590. * Creates a new YTDLPInfo instance from a string or object.
  3591. * @param {any} [$$source = {}]
  3592. * @returns {YTDLPInfo}
  3593. */
  3594. static createFrom($$source = {}) {
  3595. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3596. return new YTDLPInfo(/** @type {Partial<YTDLPInfo>} */($$parsedSource));
  3597. }
  3598. }
  3599. /**
  3600. * meituCategory 一个美图分类(对应煎蛋一个分类页)。
  3601. */
  3602. export class meituCategory {
  3603. /**
  3604. * Creates a new meituCategory instance.
  3605. * @param {Partial<meituCategory>} [$$source = {}] - The source object to create the meituCategory.
  3606. */
  3607. constructor($$source = {}) {
  3608. if (!("id" in $$source)) {
  3609. /**
  3610. * 分类标识(前端 key,如 "beauty")
  3611. * @member
  3612. * @type {string}
  3613. */
  3614. this["id"] = "";
  3615. }
  3616. if (!("name" in $$source)) {
  3617. /**
  3618. * 展示名(如 "女装")
  3619. * @member
  3620. * @type {string}
  3621. */
  3622. this["name"] = "";
  3623. }
  3624. if (!("postId" in $$source)) {
  3625. /**
  3626. * 煎蛋分类帖子 ID(/beauty→108629)
  3627. * @member
  3628. * @type {string}
  3629. */
  3630. this["postId"] = "";
  3631. }
  3632. if (!("url" in $$source)) {
  3633. /**
  3634. * 分类页面地址(如 https://jandan.net/beauty)
  3635. * @member
  3636. * @type {string}
  3637. */
  3638. this["url"] = "";
  3639. }
  3640. if (!("desc" in $$source)) {
  3641. /**
  3642. * 分类说明(可空)
  3643. * @member
  3644. * @type {string}
  3645. */
  3646. this["desc"] = "";
  3647. }
  3648. Object.assign(this, $$source);
  3649. }
  3650. /**
  3651. * Creates a new meituCategory instance from a string or object.
  3652. * @param {any} [$$source = {}]
  3653. * @returns {meituCategory}
  3654. */
  3655. static createFrom($$source = {}) {
  3656. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3657. return new meituCategory(/** @type {Partial<meituCategory>} */($$parsedSource));
  3658. }
  3659. }
  3660. /**
  3661. * meituImage 单张美图(含来源帖信息)。
  3662. */
  3663. export class meituImage {
  3664. /**
  3665. * Creates a new meituImage instance.
  3666. * @param {Partial<meituImage>} [$$source = {}] - The source object to create the meituImage.
  3667. */
  3668. constructor($$source = {}) {
  3669. if (!("url" in $$source)) {
  3670. /**
  3671. * 图片地址(img.wangmoyu.com/mw600/...)
  3672. * @member
  3673. * @type {string}
  3674. */
  3675. this["url"] = "";
  3676. }
  3677. if (!("author" in $$source)) {
  3678. /**
  3679. * 发帖人昵称(可空)
  3680. * @member
  3681. * @type {string}
  3682. */
  3683. this["author"] = "";
  3684. }
  3685. if (!("date" in $$source)) {
  3686. /**
  3687. * 发帖时间(可空)
  3688. * @member
  3689. * @type {string}
  3690. */
  3691. this["date"] = "";
  3692. }
  3693. Object.assign(this, $$source);
  3694. }
  3695. /**
  3696. * Creates a new meituImage instance from a string or object.
  3697. * @param {any} [$$source = {}]
  3698. * @returns {meituImage}
  3699. */
  3700. static createFrom($$source = {}) {
  3701. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3702. return new meituImage(/** @type {Partial<meituImage>} */($$parsedSource));
  3703. }
  3704. }
  3705. /**
  3706. * meituImagesPayload 前端图片列表负载。
  3707. */
  3708. export class meituImagesPayload {
  3709. /**
  3710. * Creates a new meituImagesPayload instance.
  3711. * @param {Partial<meituImagesPayload>} [$$source = {}] - The source object to create the meituImagesPayload.
  3712. */
  3713. constructor($$source = {}) {
  3714. if (!("category" in $$source)) {
  3715. /**
  3716. * 分类标识
  3717. * @member
  3718. * @type {string}
  3719. */
  3720. this["category"] = "";
  3721. }
  3722. if (!("images" in $$source)) {
  3723. /**
  3724. * 本页图片
  3725. * @member
  3726. * @type {meituImage[]}
  3727. */
  3728. this["images"] = [];
  3729. }
  3730. if (!("hasMore" in $$source)) {
  3731. /**
  3732. * 是否还有更早的公开页
  3733. * @member
  3734. * @type {boolean}
  3735. */
  3736. this["hasMore"] = false;
  3737. }
  3738. if (!("total" in $$source)) {
  3739. /**
  3740. * 服务端可见总页数(0 表示未知/失败)
  3741. * @member
  3742. * @type {number}
  3743. */
  3744. this["total"] = 0;
  3745. }
  3746. if (!("error" in $$source)) {
  3747. /**
  3748. * 抓取错误(非空 = 失败)
  3749. * @member
  3750. * @type {string}
  3751. */
  3752. this["error"] = "";
  3753. }
  3754. Object.assign(this, $$source);
  3755. }
  3756. /**
  3757. * Creates a new meituImagesPayload instance from a string or object.
  3758. * @param {any} [$$source = {}]
  3759. * @returns {meituImagesPayload}
  3760. */
  3761. static createFrom($$source = {}) {
  3762. const $$createField1_0 = $$createType41;
  3763. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3764. if ("images" in $$parsedSource) {
  3765. $$parsedSource["images"] = $$createField1_0($$parsedSource["images"]);
  3766. }
  3767. return new meituImagesPayload(/** @type {Partial<meituImagesPayload>} */($$parsedSource));
  3768. }
  3769. }
  3770. // Private type creation functions
  3771. const $$createType0 = $Create.Array($Create.Any);
  3772. const $$createType1 = LinkItem.createFrom;
  3773. const $$createType2 = $Create.Array($$createType1);
  3774. const $$createType3 = LinkGroup.createFrom;
  3775. const $$createType4 = $Create.Array($$createType3);
  3776. const $$createType5 = RepoItem.createFrom;
  3777. const $$createType6 = $Create.Array($$createType5);
  3778. const $$createType7 = CustomTab.createFrom;
  3779. const $$createType8 = $Create.Array($$createType7);
  3780. const $$createType9 = LocalTool.createFrom;
  3781. const $$createType10 = $Create.Array($$createType9);
  3782. const $$createType11 = QuickGroup.createFrom;
  3783. const $$createType12 = $Create.Array($$createType11);
  3784. const $$createType13 = ControlKeyConfig.createFrom;
  3785. const $$createType14 = $Create.Array($$createType13);
  3786. const $$createType15 = TickerConfig.createFrom;
  3787. const $$createType16 = PoemConfig.createFrom;
  3788. const $$createType17 = MouseAlertConfig.createFrom;
  3789. const $$createType18 = LocalSendConfig.createFrom;
  3790. const $$createType19 = CrocConfig.createFrom;
  3791. const $$createType20 = YTDLPConfig.createFrom;
  3792. const $$createType21 = MeituConfig.createFrom;
  3793. const $$createType22 = MemosConfig.createFrom;
  3794. const $$createType23 = BrightnessConfig.createFrom;
  3795. const $$createType24 = GitLabConfig.createFrom;
  3796. const $$createType25 = ProxyConfig.createFrom;
  3797. const $$createType26 = ResourcesConfig.createFrom;
  3798. const $$createType27 = BiliDynamicItem.createFrom;
  3799. const $$createType28 = $Create.Array($$createType27);
  3800. const $$createType29 = $Create.Map($Create.Any, $Create.Any);
  3801. const $$createType30 = MinutePoint.createFrom;
  3802. const $$createType31 = $Create.Array($$createType30);
  3803. const $$createType32 = PhoneDevice.createFrom;
  3804. const $$createType33 = $Create.Array($$createType32);
  3805. const $$createType34 = QuickItem.createFrom;
  3806. const $$createType35 = $Create.Array($$createType34);
  3807. const $$createType36 = ReleaseItem.createFrom;
  3808. const $$createType37 = $Create.Array($$createType36);
  3809. const $$createType38 = CommitItem.createFrom;
  3810. const $$createType39 = $Create.Array($$createType38);
  3811. const $$createType40 = meituImage.createFrom;
  3812. const $$createType41 = $Create.Array($$createType40);