models.js 97 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325
  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 (!("biliPopularEnabled" in $$source)) {
  198. /**
  199. * 新闻页是否显示 B站热门视频区块(默认开启)
  200. * @member
  201. * @type {boolean}
  202. */
  203. this["biliPopularEnabled"] = false;
  204. }
  205. if (!("githubRepos" in $$source)) {
  206. /**
  207. * 关注的 GitHub 仓库列表
  208. * @member
  209. * @type {RepoItem[]}
  210. */
  211. this["githubRepos"] = [];
  212. }
  213. if (!("customTabs" in $$source)) {
  214. /**
  215. * 用户自定义 Tab 页面(名字 + 网址)
  216. * @member
  217. * @type {CustomTab[]}
  218. */
  219. this["customTabs"] = [];
  220. }
  221. if (!("localTools" in $$source)) {
  222. /**
  223. * 「本地」页资源(标题|启动命令|说明,在设置中维护)
  224. * @member
  225. * @type {LocalTool[]}
  226. */
  227. this["localTools"] = [];
  228. }
  229. if (!("quickGroups" in $$source)) {
  230. /**
  231. * 「快捷」页分组(缩进分层,名称|路径|说明 条目)
  232. * @member
  233. * @type {QuickGroup[]}
  234. */
  235. this["quickGroups"] = [];
  236. }
  237. if (!("controlKeys" in $$source)) {
  238. /**
  239. * 控制页按键配置(前 5 键固定 上/下/左/右/休眠,第 6 键起为额外按键)
  240. * @member
  241. * @type {ControlKeyConfig[]}
  242. */
  243. this["controlKeys"] = [];
  244. }
  245. if (!("controlRepeatSecs" in $$source)) {
  246. /**
  247. * 控制页长按连发频率(秒,0.0-10.0,默认 1.0)
  248. * @member
  249. * @type {number}
  250. */
  251. this["controlRepeatSecs"] = 0;
  252. }
  253. if (!("apiAddr" in $$source)) {
  254. /**
  255. * 内置 API 服务监听地址
  256. * @member
  257. * @type {string}
  258. */
  259. this["apiAddr"] = "";
  260. }
  261. if (!("serviceAddr" in $$source)) {
  262. /**
  263. * Windows 服务模式(--service)监听地址,仅电源类接口
  264. * @member
  265. * @type {string}
  266. */
  267. this["serviceAddr"] = "";
  268. }
  269. if (!("apiAutoStart" in $$source)) {
  270. /**
  271. * 应用启动时自动启动内置 API 服务(默认开启)
  272. * @member
  273. * @type {boolean}
  274. */
  275. this["apiAutoStart"] = false;
  276. }
  277. if (!("uploadPassword" in $$source)) {
  278. /**
  279. * 文件上传密码(空=不启用上传/下载接口)
  280. * @member
  281. * @type {string}
  282. */
  283. this["uploadPassword"] = "";
  284. }
  285. if (!("uploadDir" in $$source)) {
  286. /**
  287. * 文件上传保存目录(空=程序所在目录/上传)
  288. * @member
  289. * @type {string}
  290. */
  291. this["uploadDir"] = "";
  292. }
  293. if (!("uploadMaxSize" in $$source)) {
  294. /**
  295. * 单个上传文件大小上限(MB),<=0 用默认 512
  296. * @member
  297. * @type {number}
  298. */
  299. this["uploadMaxSize"] = 0;
  300. }
  301. if (!("todoPath" in $$source)) {
  302. /**
  303. * 待办(TODO)文件路径
  304. * @member
  305. * @type {string}
  306. */
  307. this["todoPath"] = "";
  308. }
  309. if (!("recordPath" in $$source)) {
  310. /**
  311. * 记录(Record)文件路径:每行「姓名|名称|值」(保留兼容)
  312. * @member
  313. * @type {string}
  314. */
  315. this["recordPath"] = "";
  316. }
  317. if (!("recordDBPath" in $$source)) {
  318. /**
  319. * 记录数据库路径:SQLite3 数据库文件(记录 Tab 实际存储)
  320. * @member
  321. * @type {string}
  322. */
  323. this["recordDBPath"] = "";
  324. }
  325. if (!("tagDBPath" in $$source)) {
  326. /**
  327. * 文件标签数据库路径:SQLite3(资源管理器右键「标签」与悬停标签提示使用)
  328. * @member
  329. * @type {string}
  330. */
  331. this["tagDBPath"] = "";
  332. }
  333. if (!("tagMenuEnabled" in $$source)) {
  334. /**
  335. * 资源管理器右键「标签」功能开关:false=关闭右键菜单+停止监听悬停(默认启用)
  336. * @member
  337. * @type {boolean}
  338. */
  339. this["tagMenuEnabled"] = false;
  340. }
  341. if (!("backupDir" in $$source)) {
  342. /**
  343. * 文本文件备份目录(文件类自定义 Tab「备份」按钮使用)
  344. * @member
  345. * @type {string}
  346. */
  347. this["backupDir"] = "";
  348. }
  349. if (!("stockTicker" in $$source)) {
  350. /**
  351. * 股票滚动条配置
  352. * @member
  353. * @type {TickerConfig}
  354. */
  355. this["stockTicker"] = (new TickerConfig());
  356. }
  357. if (!("newsTicker" in $$source)) {
  358. /**
  359. * 新闻滚动条配置
  360. * @member
  361. * @type {TickerConfig}
  362. */
  363. this["newsTicker"] = (new TickerConfig());
  364. }
  365. if (!("poem" in $$source)) {
  366. /**
  367. * 随机古诗显示配置
  368. * @member
  369. * @type {PoemConfig}
  370. */
  371. this["poem"] = (new PoemConfig());
  372. }
  373. if (!("mouseAlert" in $$source)) {
  374. /**
  375. * 系统级鼠标提醒气泡配置
  376. * @member
  377. * @type {MouseAlertConfig}
  378. */
  379. this["mouseAlert"] = (new MouseAlertConfig());
  380. }
  381. if (!("browserPath" in $$source)) {
  382. /**
  383. * 指定浏览器 exe 路径(空=系统默认浏览器)
  384. * @member
  385. * @type {string}
  386. */
  387. this["browserPath"] = "";
  388. }
  389. if (!("ledColor" in $$source)) {
  390. /**
  391. * LED 滚动文字点阵颜色(如 #ff4d4d)
  392. * @member
  393. * @type {string}
  394. */
  395. this["ledColor"] = "";
  396. }
  397. if (!("stockUpColor" in $$source)) {
  398. /**
  399. * 股票上涨颜色
  400. * @member
  401. * @type {string}
  402. */
  403. this["stockUpColor"] = "";
  404. }
  405. if (!("stockDownColor" in $$source)) {
  406. /**
  407. * 股票下跌颜色
  408. * @member
  409. * @type {string}
  410. */
  411. this["stockDownColor"] = "";
  412. }
  413. if (!("stockRefreshSecs" in $$source)) {
  414. /**
  415. * 股市自动刷新间隔(秒)
  416. * @member
  417. * @type {number}
  418. */
  419. this["stockRefreshSecs"] = 0;
  420. }
  421. if (!("stockClosedRefreshSecs" in $$source)) {
  422. /**
  423. * 股市休市时自动刷新间隔(秒)
  424. * @member
  425. * @type {number}
  426. */
  427. this["stockClosedRefreshSecs"] = 0;
  428. }
  429. if (!("newsRefreshMinutes" in $$source)) {
  430. /**
  431. * 新闻自动刷新间隔(分钟)
  432. * @member
  433. * @type {number}
  434. */
  435. this["newsRefreshMinutes"] = 0;
  436. }
  437. if (!("newsCount" in $$source)) {
  438. /**
  439. * 新闻页显示条数
  440. * @member
  441. * @type {number}
  442. */
  443. this["newsCount"] = 0;
  444. }
  445. if (!("githubRefreshMinutes" in $$source)) {
  446. /**
  447. * Github 自动刷新间隔(分钟)
  448. * @member
  449. * @type {number}
  450. */
  451. this["githubRefreshMinutes"] = 0;
  452. }
  453. if (!("fontDelta" in $$source)) {
  454. /**
  455. * 全局字号偏移(px),+-3 范围内调整
  456. * @member
  457. * @type {number}
  458. */
  459. this["fontDelta"] = 0;
  460. }
  461. if (!("localSend" in $$source)) {
  462. /**
  463. * LocalSend 文件互传配置(本机名/接收目录/接收模式等)
  464. * @member
  465. * @type {LocalSendConfig}
  466. */
  467. this["localSend"] = (new LocalSendConfig());
  468. }
  469. if (!("croc" in $$source)) {
  470. /**
  471. * Croc 传送配置(发送/接收共用密码)
  472. * @member
  473. * @type {CrocConfig}
  474. */
  475. this["croc"] = (new CrocConfig());
  476. }
  477. if (!("ytdlp" in $$source)) {
  478. /**
  479. * 视频下载配置(yt-dlp 保存目录)
  480. * @member
  481. * @type {YTDLPConfig}
  482. */
  483. this["ytdlp"] = (new YTDLPConfig());
  484. }
  485. if (!("memos" in $$source)) {
  486. /**
  487. * Memos 速记配置(地址/访问令牌)
  488. * @member
  489. * @type {MemosConfig}
  490. */
  491. this["memos"] = (new MemosConfig());
  492. }
  493. if (!("brightness" in $$source)) {
  494. /**
  495. * 显示器亮度配置(记住亮度、启动恢复)
  496. * @member
  497. * @type {BrightnessConfig}
  498. */
  499. this["brightness"] = (new BrightnessConfig());
  500. }
  501. if (!("footerDocsLabel" in $$source)) {
  502. /**
  503. * 页面右下角「官方文档」显示的标题文字
  504. * @member
  505. * @type {string}
  506. */
  507. this["footerDocsLabel"] = "";
  508. }
  509. if (!("footerDocsURL" in $$source)) {
  510. /**
  511. * 页面右下角标题文字点击打开的网址
  512. * @member
  513. * @type {string}
  514. */
  515. this["footerDocsURL"] = "";
  516. }
  517. if (!("toolOrder" in $$source)) {
  518. /**
  519. * 工具页卡片显示顺序(工具 id 列表,未列出的追加到末尾)
  520. * @member
  521. * @type {string[]}
  522. */
  523. this["toolOrder"] = [];
  524. }
  525. if (!("gitLab" in $$source)) {
  526. /**
  527. * 私有 GitLab 自动升级配置
  528. * @member
  529. * @type {GitLabConfig}
  530. */
  531. this["gitLab"] = (new GitLabConfig());
  532. }
  533. if (!("skippedUpdateVersion" in $$source)) {
  534. /**
  535. * 已跳过的版本(启动检查时视为无更新)
  536. * @member
  537. * @type {string}
  538. */
  539. this["skippedUpdateVersion"] = "";
  540. }
  541. if (!("proxy" in $$source)) {
  542. /**
  543. * 网络代理配置(工具页「网络代理」卡片)
  544. * @member
  545. * @type {ProxyConfig}
  546. */
  547. this["proxy"] = (new ProxyConfig());
  548. }
  549. if (!("resources" in $$source)) {
  550. /**
  551. * 设置-资源栏配置(下载 ffmpeg/croc 等外部工具)
  552. * @member
  553. * @type {ResourcesConfig}
  554. */
  555. this["resources"] = (new ResourcesConfig());
  556. }
  557. Object.assign(this, $$source);
  558. }
  559. /**
  560. * Creates a new AppSettings instance from a string or object.
  561. * @param {any} [$$source = {}]
  562. * @returns {AppSettings}
  563. */
  564. static createFrom($$source = {}) {
  565. const $$createField10_0 = $$createType0;
  566. const $$createField11_0 = $$createType0;
  567. const $$createField12_0 = $$createType2;
  568. const $$createField13_0 = $$createType4;
  569. const $$createField17_0 = $$createType6;
  570. const $$createField18_0 = $$createType8;
  571. const $$createField19_0 = $$createType10;
  572. const $$createField20_0 = $$createType12;
  573. const $$createField21_0 = $$createType14;
  574. const $$createField35_0 = $$createType15;
  575. const $$createField36_0 = $$createType15;
  576. const $$createField37_0 = $$createType16;
  577. const $$createField38_0 = $$createType17;
  578. const $$createField49_0 = $$createType18;
  579. const $$createField50_0 = $$createType19;
  580. const $$createField51_0 = $$createType20;
  581. const $$createField52_0 = $$createType21;
  582. const $$createField53_0 = $$createType22;
  583. const $$createField56_0 = $$createType0;
  584. const $$createField57_0 = $$createType23;
  585. const $$createField59_0 = $$createType24;
  586. const $$createField60_0 = $$createType25;
  587. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  588. if ("tabOrder" in $$parsedSource) {
  589. $$parsedSource["tabOrder"] = $$createField10_0($$parsedSource["tabOrder"]);
  590. }
  591. if ("stockCodes" in $$parsedSource) {
  592. $$parsedSource["stockCodes"] = $$createField11_0($$parsedSource["stockCodes"]);
  593. }
  594. if ("links" in $$parsedSource) {
  595. $$parsedSource["links"] = $$createField12_0($$parsedSource["links"]);
  596. }
  597. if ("linkGroups" in $$parsedSource) {
  598. $$parsedSource["linkGroups"] = $$createField13_0($$parsedSource["linkGroups"]);
  599. }
  600. if ("githubRepos" in $$parsedSource) {
  601. $$parsedSource["githubRepos"] = $$createField17_0($$parsedSource["githubRepos"]);
  602. }
  603. if ("customTabs" in $$parsedSource) {
  604. $$parsedSource["customTabs"] = $$createField18_0($$parsedSource["customTabs"]);
  605. }
  606. if ("localTools" in $$parsedSource) {
  607. $$parsedSource["localTools"] = $$createField19_0($$parsedSource["localTools"]);
  608. }
  609. if ("quickGroups" in $$parsedSource) {
  610. $$parsedSource["quickGroups"] = $$createField20_0($$parsedSource["quickGroups"]);
  611. }
  612. if ("controlKeys" in $$parsedSource) {
  613. $$parsedSource["controlKeys"] = $$createField21_0($$parsedSource["controlKeys"]);
  614. }
  615. if ("stockTicker" in $$parsedSource) {
  616. $$parsedSource["stockTicker"] = $$createField35_0($$parsedSource["stockTicker"]);
  617. }
  618. if ("newsTicker" in $$parsedSource) {
  619. $$parsedSource["newsTicker"] = $$createField36_0($$parsedSource["newsTicker"]);
  620. }
  621. if ("poem" in $$parsedSource) {
  622. $$parsedSource["poem"] = $$createField37_0($$parsedSource["poem"]);
  623. }
  624. if ("mouseAlert" in $$parsedSource) {
  625. $$parsedSource["mouseAlert"] = $$createField38_0($$parsedSource["mouseAlert"]);
  626. }
  627. if ("localSend" in $$parsedSource) {
  628. $$parsedSource["localSend"] = $$createField49_0($$parsedSource["localSend"]);
  629. }
  630. if ("croc" in $$parsedSource) {
  631. $$parsedSource["croc"] = $$createField50_0($$parsedSource["croc"]);
  632. }
  633. if ("ytdlp" in $$parsedSource) {
  634. $$parsedSource["ytdlp"] = $$createField51_0($$parsedSource["ytdlp"]);
  635. }
  636. if ("memos" in $$parsedSource) {
  637. $$parsedSource["memos"] = $$createField52_0($$parsedSource["memos"]);
  638. }
  639. if ("brightness" in $$parsedSource) {
  640. $$parsedSource["brightness"] = $$createField53_0($$parsedSource["brightness"]);
  641. }
  642. if ("toolOrder" in $$parsedSource) {
  643. $$parsedSource["toolOrder"] = $$createField56_0($$parsedSource["toolOrder"]);
  644. }
  645. if ("gitLab" in $$parsedSource) {
  646. $$parsedSource["gitLab"] = $$createField57_0($$parsedSource["gitLab"]);
  647. }
  648. if ("proxy" in $$parsedSource) {
  649. $$parsedSource["proxy"] = $$createField59_0($$parsedSource["proxy"]);
  650. }
  651. if ("resources" in $$parsedSource) {
  652. $$parsedSource["resources"] = $$createField60_0($$parsedSource["resources"]);
  653. }
  654. return new AppSettings(/** @type {Partial<AppSettings>} */($$parsedSource));
  655. }
  656. }
  657. /**
  658. * BiliDynamicItem 一条 B站动态,供「新闻」页展示
  659. */
  660. export class BiliDynamicItem {
  661. /**
  662. * Creates a new BiliDynamicItem instance.
  663. * @param {Partial<BiliDynamicItem>} [$$source = {}] - The source object to create the BiliDynamicItem.
  664. */
  665. constructor($$source = {}) {
  666. if (!("source" in $$source)) {
  667. /**
  668. * 来源:B站动态
  669. * @member
  670. * @type {string}
  671. */
  672. this["source"] = "";
  673. }
  674. if (!("title" in $$source)) {
  675. /**
  676. * 标题(动态文案或视频标题)
  677. * @member
  678. * @type {string}
  679. */
  680. this["title"] = "";
  681. }
  682. if (!("url" in $$source)) {
  683. /**
  684. * 详情页地址
  685. * @member
  686. * @type {string}
  687. */
  688. this["url"] = "";
  689. }
  690. if (!("matched" in $$source)) {
  691. /**
  692. * 是否命中关注关键词
  693. * @member
  694. * @type {boolean}
  695. */
  696. this["matched"] = false;
  697. }
  698. Object.assign(this, $$source);
  699. }
  700. /**
  701. * Creates a new BiliDynamicItem instance from a string or object.
  702. * @param {any} [$$source = {}]
  703. * @returns {BiliDynamicItem}
  704. */
  705. static createFrom($$source = {}) {
  706. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  707. return new BiliDynamicItem(/** @type {Partial<BiliDynamicItem>} */($$parsedSource));
  708. }
  709. }
  710. /**
  711. * BiliFeedResult B站动态抓取结果:列表 + 需要提示用户的说明(如 cookie 过期后回退热门)
  712. */
  713. export class BiliFeedResult {
  714. /**
  715. * Creates a new BiliFeedResult instance.
  716. * @param {Partial<BiliFeedResult>} [$$source = {}] - The source object to create the BiliFeedResult.
  717. */
  718. constructor($$source = {}) {
  719. if (!("items" in $$source)) {
  720. /**
  721. * @member
  722. * @type {BiliDynamicItem[]}
  723. */
  724. this["items"] = [];
  725. }
  726. if (!("notice" in $$source)) {
  727. /**
  728. * @member
  729. * @type {string}
  730. */
  731. this["notice"] = "";
  732. }
  733. Object.assign(this, $$source);
  734. }
  735. /**
  736. * Creates a new BiliFeedResult instance from a string or object.
  737. * @param {any} [$$source = {}]
  738. * @returns {BiliFeedResult}
  739. */
  740. static createFrom($$source = {}) {
  741. const $$createField0_0 = $$createType27;
  742. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  743. if ("items" in $$parsedSource) {
  744. $$parsedSource["items"] = $$createField0_0($$parsedSource["items"]);
  745. }
  746. return new BiliFeedResult(/** @type {Partial<BiliFeedResult>} */($$parsedSource));
  747. }
  748. }
  749. /**
  750. * BrightnessConfig 显示器亮度配置:记住各显示器亮度(按显示器名称),供启动时恢复
  751. */
  752. export class BrightnessConfig {
  753. /**
  754. * Creates a new BrightnessConfig instance.
  755. * @param {Partial<BrightnessConfig>} [$$source = {}] - The source object to create the BrightnessConfig.
  756. */
  757. constructor($$source = {}) {
  758. if (!("restoreOnStart" in $$source)) {
  759. /**
  760. * 启动应用时恢复上次亮度
  761. * @member
  762. * @type {boolean}
  763. */
  764. this["restoreOnStart"] = false;
  765. }
  766. if (!("levels" in $$source)) {
  767. /**
  768. * 显示器名称 -> 亮度百分比(0-100)
  769. * @member
  770. * @type {{ [_ in string]?: number }}
  771. */
  772. this["levels"] = {};
  773. }
  774. Object.assign(this, $$source);
  775. }
  776. /**
  777. * Creates a new BrightnessConfig instance from a string or object.
  778. * @param {any} [$$source = {}]
  779. * @returns {BrightnessConfig}
  780. */
  781. static createFrom($$source = {}) {
  782. const $$createField1_0 = $$createType28;
  783. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  784. if ("levels" in $$parsedSource) {
  785. $$parsedSource["levels"] = $$createField1_0($$parsedSource["levels"]);
  786. }
  787. return new BrightnessConfig(/** @type {Partial<BrightnessConfig>} */($$parsedSource));
  788. }
  789. }
  790. /**
  791. * CommitItem 仓库的一条提交记录
  792. */
  793. export class CommitItem {
  794. /**
  795. * Creates a new CommitItem instance.
  796. * @param {Partial<CommitItem>} [$$source = {}] - The source object to create the CommitItem.
  797. */
  798. constructor($$source = {}) {
  799. if (!("title" in $$source)) {
  800. /**
  801. * 提交标题(首行)
  802. * @member
  803. * @type {string}
  804. */
  805. this["title"] = "";
  806. }
  807. if (!("url" in $$source)) {
  808. /**
  809. * 提交详情页地址
  810. * @member
  811. * @type {string}
  812. */
  813. this["url"] = "";
  814. }
  815. if (!("updated" in $$source)) {
  816. /**
  817. * 提交时间(MM-DD HH:MM)
  818. * @member
  819. * @type {string}
  820. */
  821. this["updated"] = "";
  822. }
  823. Object.assign(this, $$source);
  824. }
  825. /**
  826. * Creates a new CommitItem instance from a string or object.
  827. * @param {any} [$$source = {}]
  828. * @returns {CommitItem}
  829. */
  830. static createFrom($$source = {}) {
  831. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  832. return new CommitItem(/** @type {Partial<CommitItem>} */($$parsedSource));
  833. }
  834. }
  835. /**
  836. * ControlKeyConfig 控制页方向盘单个按键配置(图标 + 命令 URL)
  837. */
  838. export class ControlKeyConfig {
  839. /**
  840. * Creates a new ControlKeyConfig instance.
  841. * @param {Partial<ControlKeyConfig>} [$$source = {}] - The source object to create the ControlKeyConfig.
  842. */
  843. constructor($$source = {}) {
  844. if (!("icon" in $$source)) {
  845. /**
  846. * 按钮显示字符,如 ↑、↓、←、→、休眠
  847. * @member
  848. * @type {string}
  849. */
  850. this["icon"] = "";
  851. }
  852. if (!("cmd" in $$source)) {
  853. /**
  854. * 点击时 GET 请求的完整 URL;空则回退旧指令信箱模式
  855. * @member
  856. * @type {string}
  857. */
  858. this["cmd"] = "";
  859. }
  860. Object.assign(this, $$source);
  861. }
  862. /**
  863. * Creates a new ControlKeyConfig instance from a string or object.
  864. * @param {any} [$$source = {}]
  865. * @returns {ControlKeyConfig}
  866. */
  867. static createFrom($$source = {}) {
  868. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  869. return new ControlKeyConfig(/** @type {Partial<ControlKeyConfig>} */($$parsedSource));
  870. }
  871. }
  872. /**
  873. * CrocConfig 是 Croc 传送的配置(发送/接收共用密码)。
  874. */
  875. export class CrocConfig {
  876. /**
  877. * Creates a new CrocConfig instance.
  878. * @param {Partial<CrocConfig>} [$$source = {}] - The source object to create the CrocConfig.
  879. */
  880. constructor($$source = {}) {
  881. if (!("password" in $$source)) {
  882. /**
  883. * 发送/接收共用密码:作为 croc 传输码(--code),空=使用随机传输码
  884. * @member
  885. * @type {string}
  886. */
  887. this["password"] = "";
  888. }
  889. if (!("dir" in $$source)) {
  890. /**
  891. * 接收保存目录,空=当前工作目录
  892. * @member
  893. * @type {string}
  894. */
  895. this["dir"] = "";
  896. }
  897. Object.assign(this, $$source);
  898. }
  899. /**
  900. * Creates a new CrocConfig instance from a string or object.
  901. * @param {any} [$$source = {}]
  902. * @returns {CrocConfig}
  903. */
  904. static createFrom($$source = {}) {
  905. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  906. return new CrocConfig(/** @type {Partial<CrocConfig>} */($$parsedSource));
  907. }
  908. }
  909. /**
  910. * CrocInfo 描述本机 croc 的可用性,用于前端决定是否展示工具卡片。
  911. */
  912. export class CrocInfo {
  913. /**
  914. * Creates a new CrocInfo instance.
  915. * @param {Partial<CrocInfo>} [$$source = {}] - The source object to create the CrocInfo.
  916. */
  917. constructor($$source = {}) {
  918. if (!("available" in $$source)) {
  919. /**
  920. * PATH 中是否找到 croc
  921. * @member
  922. * @type {boolean}
  923. */
  924. this["available"] = false;
  925. }
  926. if (!("path" in $$source)) {
  927. /**
  928. * croc 可执行文件路径
  929. * @member
  930. * @type {string}
  931. */
  932. this["path"] = "";
  933. }
  934. if (!("version" in $$source)) {
  935. /**
  936. * 版本信息(croc --version 输出)
  937. * @member
  938. * @type {string}
  939. */
  940. this["version"] = "";
  941. }
  942. Object.assign(this, $$source);
  943. }
  944. /**
  945. * Creates a new CrocInfo instance from a string or object.
  946. * @param {any} [$$source = {}]
  947. * @returns {CrocInfo}
  948. */
  949. static createFrom($$source = {}) {
  950. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  951. return new CrocInfo(/** @type {Partial<CrocInfo>} */($$parsedSource));
  952. }
  953. }
  954. /**
  955. * CustomTab 用户自定义 Tab 页面
  956. */
  957. export class CustomTab {
  958. /**
  959. * Creates a new CustomTab instance.
  960. * @param {Partial<CustomTab>} [$$source = {}] - The source object to create the CustomTab.
  961. */
  962. constructor($$source = {}) {
  963. if (!("name" in $$source)) {
  964. /**
  965. * 页面名称(Tab 按钮显示文字)
  966. * @member
  967. * @type {string}
  968. */
  969. this["name"] = "";
  970. }
  971. if (!("url" in $$source)) {
  972. /**
  973. * 页面地址(iframe 加载)
  974. * @member
  975. * @type {string}
  976. */
  977. this["url"] = "";
  978. }
  979. if (!("desc" in $$source)) {
  980. /**
  981. * 备注/提示信息(可空),Tab 说明文字优先显示
  982. * @member
  983. * @type {string}
  984. */
  985. this["desc"] = "";
  986. }
  987. Object.assign(this, $$source);
  988. }
  989. /**
  990. * Creates a new CustomTab instance from a string or object.
  991. * @param {any} [$$source = {}]
  992. * @returns {CustomTab}
  993. */
  994. static createFrom($$source = {}) {
  995. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  996. return new CustomTab(/** @type {Partial<CustomTab>} */($$parsedSource));
  997. }
  998. }
  999. /**
  1000. * GitLabConfig 自动升级配置(静态更新站方案)。
  1001. * BaseURL 为静态站目录地址,清单固定放在 {BaseURL}/manifest.json,无需鉴权。
  1002. * ProjectPath / PrivateToken / Branch 为旧私有仓库方案遗留字段,不再参与,保留以兼容旧配置。
  1003. */
  1004. export class GitLabConfig {
  1005. /**
  1006. * Creates a new GitLabConfig instance.
  1007. * @param {Partial<GitLabConfig>} [$$source = {}] - The source object to create the GitLabConfig.
  1008. */
  1009. constructor($$source = {}) {
  1010. if (!("baseUrl" in $$source)) {
  1011. /**
  1012. * 静态更新站目录地址,如 https://i.scwy.net/down/toolsbox
  1013. * @member
  1014. * @type {string}
  1015. */
  1016. this["baseUrl"] = "";
  1017. }
  1018. if (!("projectPath" in $$source)) {
  1019. /**
  1020. * (旧字段,不再使用)
  1021. * @member
  1022. * @type {string}
  1023. */
  1024. this["projectPath"] = "";
  1025. }
  1026. if (!("privateToken" in $$source)) {
  1027. /**
  1028. * (旧字段,不再使用)
  1029. * @member
  1030. * @type {string}
  1031. */
  1032. this["privateToken"] = "";
  1033. }
  1034. if (!("branch" in $$source)) {
  1035. /**
  1036. * (旧字段,不再使用)
  1037. * @member
  1038. * @type {string}
  1039. */
  1040. this["branch"] = "";
  1041. }
  1042. Object.assign(this, $$source);
  1043. }
  1044. /**
  1045. * Creates a new GitLabConfig instance from a string or object.
  1046. * @param {any} [$$source = {}]
  1047. * @returns {GitLabConfig}
  1048. */
  1049. static createFrom($$source = {}) {
  1050. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1051. return new GitLabConfig(/** @type {Partial<GitLabConfig>} */($$parsedSource));
  1052. }
  1053. }
  1054. /**
  1055. * KLineBar 日 K 的一根柱子
  1056. */
  1057. export class KLineBar {
  1058. /**
  1059. * Creates a new KLineBar instance.
  1060. * @param {Partial<KLineBar>} [$$source = {}] - The source object to create the KLineBar.
  1061. */
  1062. constructor($$source = {}) {
  1063. if (!("date" in $$source)) {
  1064. /**
  1065. * 交易日
  1066. * @member
  1067. * @type {string}
  1068. */
  1069. this["date"] = "";
  1070. }
  1071. if (!("open" in $$source)) {
  1072. /**
  1073. * 开盘价
  1074. * @member
  1075. * @type {number}
  1076. */
  1077. this["open"] = 0;
  1078. }
  1079. if (!("close" in $$source)) {
  1080. /**
  1081. * 收盘价
  1082. * @member
  1083. * @type {number}
  1084. */
  1085. this["close"] = 0;
  1086. }
  1087. if (!("high" in $$source)) {
  1088. /**
  1089. * 最高价
  1090. * @member
  1091. * @type {number}
  1092. */
  1093. this["high"] = 0;
  1094. }
  1095. if (!("low" in $$source)) {
  1096. /**
  1097. * 最低价
  1098. * @member
  1099. * @type {number}
  1100. */
  1101. this["low"] = 0;
  1102. }
  1103. if (!("volume" in $$source)) {
  1104. /**
  1105. * 成交量(手)
  1106. * @member
  1107. * @type {number}
  1108. */
  1109. this["volume"] = 0;
  1110. }
  1111. Object.assign(this, $$source);
  1112. }
  1113. /**
  1114. * Creates a new KLineBar instance from a string or object.
  1115. * @param {any} [$$source = {}]
  1116. * @returns {KLineBar}
  1117. */
  1118. static createFrom($$source = {}) {
  1119. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1120. return new KLineBar(/** @type {Partial<KLineBar>} */($$parsedSource));
  1121. }
  1122. }
  1123. /**
  1124. * LinkGroup 「网址」页分组(设置中以缩进层级定义,类似快捷启动)
  1125. * 未分组的条目放在 LinkGroups 的第一个 Name 为空分组的 Items 中(前端解析时统一按组渲染)
  1126. */
  1127. export class LinkGroup {
  1128. /**
  1129. * Creates a new LinkGroup instance.
  1130. * @param {Partial<LinkGroup>} [$$source = {}] - The source object to create the LinkGroup.
  1131. */
  1132. constructor($$source = {}) {
  1133. if (!("name" in $$source)) {
  1134. /**
  1135. * 分组名(空表示未分组)
  1136. * @member
  1137. * @type {string}
  1138. */
  1139. this["name"] = "";
  1140. }
  1141. if (!("items" in $$source)) {
  1142. /**
  1143. * 组内网址
  1144. * @member
  1145. * @type {LinkItem[]}
  1146. */
  1147. this["items"] = [];
  1148. }
  1149. Object.assign(this, $$source);
  1150. }
  1151. /**
  1152. * Creates a new LinkGroup instance from a string or object.
  1153. * @param {any} [$$source = {}]
  1154. * @returns {LinkGroup}
  1155. */
  1156. static createFrom($$source = {}) {
  1157. const $$createField1_0 = $$createType2;
  1158. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1159. if ("items" in $$parsedSource) {
  1160. $$parsedSource["items"] = $$createField1_0($$parsedSource["items"]);
  1161. }
  1162. return new LinkGroup(/** @type {Partial<LinkGroup>} */($$parsedSource));
  1163. }
  1164. }
  1165. /**
  1166. * LinkItem 常用网址条目
  1167. */
  1168. export class LinkItem {
  1169. /**
  1170. * Creates a new LinkItem instance.
  1171. * @param {Partial<LinkItem>} [$$source = {}] - The source object to create the LinkItem.
  1172. */
  1173. constructor($$source = {}) {
  1174. if (!("name" in $$source)) {
  1175. /**
  1176. * 网站名称
  1177. * @member
  1178. * @type {string}
  1179. */
  1180. this["name"] = "";
  1181. }
  1182. if (!("url" in $$source)) {
  1183. /**
  1184. * 网站地址
  1185. * @member
  1186. * @type {string}
  1187. */
  1188. this["url"] = "";
  1189. }
  1190. Object.assign(this, $$source);
  1191. }
  1192. /**
  1193. * Creates a new LinkItem instance from a string or object.
  1194. * @param {any} [$$source = {}]
  1195. * @returns {LinkItem}
  1196. */
  1197. static createFrom($$source = {}) {
  1198. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1199. return new LinkItem(/** @type {Partial<LinkItem>} */($$parsedSource));
  1200. }
  1201. }
  1202. /**
  1203. * LocalSendConfig 是 LocalSend 的运行时配置。
  1204. */
  1205. export class LocalSendConfig {
  1206. /**
  1207. * Creates a new LocalSendConfig instance.
  1208. * @param {Partial<LocalSendConfig>} [$$source = {}] - The source object to create the LocalSendConfig.
  1209. */
  1210. constructor($$source = {}) {
  1211. if (!("enabled" in $$source)) {
  1212. /**
  1213. * 是否已启动服务
  1214. * @member
  1215. * @type {boolean}
  1216. */
  1217. this["enabled"] = false;
  1218. }
  1219. if (!("alias" in $$source)) {
  1220. /**
  1221. * 本机名称(广播给其他设备)
  1222. * @member
  1223. * @type {string}
  1224. */
  1225. this["alias"] = "";
  1226. }
  1227. if (!("receiveDir" in $$source)) {
  1228. /**
  1229. * 接收文件保存目录
  1230. * @member
  1231. * @type {string}
  1232. */
  1233. this["receiveDir"] = "";
  1234. }
  1235. if (!("autoAccept" in $$source)) {
  1236. /**
  1237. * true=自动接收;false=手动确认
  1238. * @member
  1239. * @type {boolean}
  1240. */
  1241. this["autoAccept"] = false;
  1242. }
  1243. if (!("port" in $$source)) {
  1244. /**
  1245. * 监听端口
  1246. * @member
  1247. * @type {number}
  1248. */
  1249. this["port"] = 0;
  1250. }
  1251. if (!("fingerprint" in $$source)) {
  1252. /**
  1253. * 本机证书指纹
  1254. * @member
  1255. * @type {string}
  1256. */
  1257. this["fingerprint"] = "";
  1258. }
  1259. Object.assign(this, $$source);
  1260. }
  1261. /**
  1262. * Creates a new LocalSendConfig instance from a string or object.
  1263. * @param {any} [$$source = {}]
  1264. * @returns {LocalSendConfig}
  1265. */
  1266. static createFrom($$source = {}) {
  1267. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1268. return new LocalSendConfig(/** @type {Partial<LocalSendConfig>} */($$parsedSource));
  1269. }
  1270. }
  1271. /**
  1272. * LocalTool 本地资源/工具配置项(「本地」页,在设置中维护)
  1273. */
  1274. export class LocalTool {
  1275. /**
  1276. * Creates a new LocalTool instance.
  1277. * @param {Partial<LocalTool>} [$$source = {}] - The source object to create the LocalTool.
  1278. */
  1279. constructor($$source = {}) {
  1280. if (!("title" in $$source)) {
  1281. /**
  1282. * 显示标题
  1283. * @member
  1284. * @type {string}
  1285. */
  1286. this["title"] = "";
  1287. }
  1288. if (!("cmd" in $$source)) {
  1289. /**
  1290. * 启动命令(程序/脚本,可带参数与环境变量)
  1291. * @member
  1292. * @type {string}
  1293. */
  1294. this["cmd"] = "";
  1295. }
  1296. if (!("desc" in $$source)) {
  1297. /**
  1298. * 说明文字(可空)
  1299. * @member
  1300. * @type {string}
  1301. */
  1302. this["desc"] = "";
  1303. }
  1304. Object.assign(this, $$source);
  1305. }
  1306. /**
  1307. * Creates a new LocalTool instance from a string or object.
  1308. * @param {any} [$$source = {}]
  1309. * @returns {LocalTool}
  1310. */
  1311. static createFrom($$source = {}) {
  1312. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1313. return new LocalTool(/** @type {Partial<LocalTool>} */($$parsedSource));
  1314. }
  1315. }
  1316. /**
  1317. * MemosConfig 保存 Memos 速记所需的配置。
  1318. */
  1319. export class MemosConfig {
  1320. /**
  1321. * Creates a new MemosConfig instance.
  1322. * @param {Partial<MemosConfig>} [$$source = {}] - The source object to create the MemosConfig.
  1323. */
  1324. constructor($$source = {}) {
  1325. if (!("url" in $$source)) {
  1326. /**
  1327. * 实例地址,如 https://m.scwy.net
  1328. * @member
  1329. * @type {string}
  1330. */
  1331. this["url"] = "";
  1332. }
  1333. if (!("token" in $$source)) {
  1334. /**
  1335. * 个人访问令牌(PAT),只存本地
  1336. * @member
  1337. * @type {string}
  1338. */
  1339. this["token"] = "";
  1340. }
  1341. Object.assign(this, $$source);
  1342. }
  1343. /**
  1344. * Creates a new MemosConfig instance from a string or object.
  1345. * @param {any} [$$source = {}]
  1346. * @returns {MemosConfig}
  1347. */
  1348. static createFrom($$source = {}) {
  1349. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1350. return new MemosConfig(/** @type {Partial<MemosConfig>} */($$parsedSource));
  1351. }
  1352. }
  1353. /**
  1354. * MinuteChart 分时图数据
  1355. */
  1356. export class MinuteChart {
  1357. /**
  1358. * Creates a new MinuteChart instance.
  1359. * @param {Partial<MinuteChart>} [$$source = {}] - The source object to create the MinuteChart.
  1360. */
  1361. constructor($$source = {}) {
  1362. if (!("code" in $$source)) {
  1363. /**
  1364. * 股票代码
  1365. * @member
  1366. * @type {string}
  1367. */
  1368. this["code"] = "";
  1369. }
  1370. if (!("prevClose" in $$source)) {
  1371. /**
  1372. * 昨收,作为分时基准线
  1373. * @member
  1374. * @type {number}
  1375. */
  1376. this["prevClose"] = 0;
  1377. }
  1378. if (!("points" in $$source)) {
  1379. /**
  1380. * 分时点序列
  1381. * @member
  1382. * @type {MinutePoint[]}
  1383. */
  1384. this["points"] = [];
  1385. }
  1386. Object.assign(this, $$source);
  1387. }
  1388. /**
  1389. * Creates a new MinuteChart instance from a string or object.
  1390. * @param {any} [$$source = {}]
  1391. * @returns {MinuteChart}
  1392. */
  1393. static createFrom($$source = {}) {
  1394. const $$createField2_0 = $$createType30;
  1395. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1396. if ("points" in $$parsedSource) {
  1397. $$parsedSource["points"] = $$createField2_0($$parsedSource["points"]);
  1398. }
  1399. return new MinuteChart(/** @type {Partial<MinuteChart>} */($$parsedSource));
  1400. }
  1401. }
  1402. /**
  1403. * MinutePoint 分时图上的一个点
  1404. */
  1405. export class MinutePoint {
  1406. /**
  1407. * Creates a new MinutePoint instance.
  1408. * @param {Partial<MinutePoint>} [$$source = {}] - The source object to create the MinutePoint.
  1409. */
  1410. constructor($$source = {}) {
  1411. if (!("time" in $$source)) {
  1412. /**
  1413. * HH:MM
  1414. * @member
  1415. * @type {string}
  1416. */
  1417. this["time"] = "";
  1418. }
  1419. if (!("price" in $$source)) {
  1420. /**
  1421. * 当前价
  1422. * @member
  1423. * @type {number}
  1424. */
  1425. this["price"] = 0;
  1426. }
  1427. if (!("avg" in $$source)) {
  1428. /**
  1429. * 均价
  1430. * @member
  1431. * @type {number}
  1432. */
  1433. this["avg"] = 0;
  1434. }
  1435. Object.assign(this, $$source);
  1436. }
  1437. /**
  1438. * Creates a new MinutePoint instance from a string or object.
  1439. * @param {any} [$$source = {}]
  1440. * @returns {MinutePoint}
  1441. */
  1442. static createFrom($$source = {}) {
  1443. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1444. return new MinutePoint(/** @type {Partial<MinutePoint>} */($$parsedSource));
  1445. }
  1446. }
  1447. /**
  1448. * MonitorBrightnessInfo 单个显示器的亮度状态(返回给前端渲染滑块)
  1449. */
  1450. export class MonitorBrightnessInfo {
  1451. /**
  1452. * Creates a new MonitorBrightnessInfo instance.
  1453. * @param {Partial<MonitorBrightnessInfo>} [$$source = {}] - The source object to create the MonitorBrightnessInfo.
  1454. */
  1455. constructor($$source = {}) {
  1456. if (!("index" in $$source)) {
  1457. /**
  1458. * 显示器序号(与 SetBrightness 的 index 一致)
  1459. * @member
  1460. * @type {number}
  1461. */
  1462. this["index"] = 0;
  1463. }
  1464. if (!("name" in $$source)) {
  1465. /**
  1466. * 显示器名称(物理监视器描述,取不到时用设备名)
  1467. * @member
  1468. * @type {string}
  1469. */
  1470. this["name"] = "";
  1471. }
  1472. if (!("percent" in $$source)) {
  1473. /**
  1474. * 当前亮度百分比 0-100
  1475. * @member
  1476. * @type {number}
  1477. */
  1478. this["percent"] = 0;
  1479. }
  1480. if (!("hardware" in $$source)) {
  1481. /**
  1482. * true=DDC/CI 硬件调光;false=Gamma 软件调光
  1483. * @member
  1484. * @type {boolean}
  1485. */
  1486. this["hardware"] = false;
  1487. }
  1488. Object.assign(this, $$source);
  1489. }
  1490. /**
  1491. * Creates a new MonitorBrightnessInfo instance from a string or object.
  1492. * @param {any} [$$source = {}]
  1493. * @returns {MonitorBrightnessInfo}
  1494. */
  1495. static createFrom($$source = {}) {
  1496. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1497. return new MonitorBrightnessInfo(/** @type {Partial<MonitorBrightnessInfo>} */($$parsedSource));
  1498. }
  1499. }
  1500. /**
  1501. * MouseAlertConfig 系统级鼠标提醒气泡的显示配置
  1502. */
  1503. export class MouseAlertConfig {
  1504. /**
  1505. * Creates a new MouseAlertConfig instance.
  1506. * @param {Partial<MouseAlertConfig>} [$$source = {}] - The source object to create the MouseAlertConfig.
  1507. */
  1508. constructor($$source = {}) {
  1509. if (!("fontSize" in $$source)) {
  1510. /**
  1511. * 字号(px)
  1512. * @member
  1513. * @type {number}
  1514. */
  1515. this["fontSize"] = 0;
  1516. }
  1517. if (!("width" in $$source)) {
  1518. /**
  1519. * 气泡窗口宽度(px)
  1520. * @member
  1521. * @type {number}
  1522. */
  1523. this["width"] = 0;
  1524. }
  1525. if (!("speed" in $$source)) {
  1526. /**
  1527. * 超长文字滚动速度(px/s)
  1528. * @member
  1529. * @type {number}
  1530. */
  1531. this["speed"] = 0;
  1532. }
  1533. if (!("color" in $$source)) {
  1534. /**
  1535. * 文字颜色
  1536. * @member
  1537. * @type {string}
  1538. */
  1539. this["color"] = "";
  1540. }
  1541. if (!("background" in $$source)) {
  1542. /**
  1543. * 气泡背景色(COLORKEY 抠成透明,仅作底色参考)
  1544. * @member
  1545. * @type {string}
  1546. */
  1547. this["background"] = "";
  1548. }
  1549. if (!("duration" in $$source)) {
  1550. /**
  1551. * 显示时长(秒)
  1552. * @member
  1553. * @type {number}
  1554. */
  1555. this["duration"] = 0;
  1556. }
  1557. if (!("outlineColor" in $$source)) {
  1558. /**
  1559. * 文字描边颜色(白边/黑边,与文字形成反差)
  1560. * @member
  1561. * @type {string}
  1562. */
  1563. this["outlineColor"] = "";
  1564. }
  1565. if (!("outlineWidth" in $$source)) {
  1566. /**
  1567. * 文字描边宽度(px),0 表示关闭描边
  1568. * @member
  1569. * @type {number}
  1570. */
  1571. this["outlineWidth"] = 0;
  1572. }
  1573. if (!("scroll" in $$source)) {
  1574. /**
  1575. * Scroll 是否滚动显示超长文字:nil 表示未设置(兼容旧配置,用 Speed>0 决定);
  1576. * true=超长时水平滚动跑马灯,false=超长部分右侧裁剪不滚动。
  1577. * @member
  1578. * @type {boolean | null}
  1579. */
  1580. this["scroll"] = null;
  1581. }
  1582. Object.assign(this, $$source);
  1583. }
  1584. /**
  1585. * Creates a new MouseAlertConfig instance from a string or object.
  1586. * @param {any} [$$source = {}]
  1587. * @returns {MouseAlertConfig}
  1588. */
  1589. static createFrom($$source = {}) {
  1590. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1591. return new MouseAlertConfig(/** @type {Partial<MouseAlertConfig>} */($$parsedSource));
  1592. }
  1593. }
  1594. /**
  1595. * NewsItem 一条新闻标题,供「新闻」页与新闻滚动条使用
  1596. */
  1597. export class NewsItem {
  1598. /**
  1599. * Creates a new NewsItem instance.
  1600. * @param {Partial<NewsItem>} [$$source = {}] - The source object to create the NewsItem.
  1601. */
  1602. constructor($$source = {}) {
  1603. if (!("source" in $$source)) {
  1604. /**
  1605. * 来源:煎蛋 / 腾讯 / Solidot / 财联社 / 热榜
  1606. * @member
  1607. * @type {string}
  1608. */
  1609. this["source"] = "";
  1610. }
  1611. if (!("title" in $$source)) {
  1612. /**
  1613. * 标题
  1614. * @member
  1615. * @type {string}
  1616. */
  1617. this["title"] = "";
  1618. }
  1619. if (!("url" in $$source)) {
  1620. /**
  1621. * 详情页地址
  1622. * @member
  1623. * @type {string}
  1624. */
  1625. this["url"] = "";
  1626. }
  1627. if (!("matched" in $$source)) {
  1628. /**
  1629. * 是否命中关注关键词
  1630. * @member
  1631. * @type {boolean}
  1632. */
  1633. this["matched"] = false;
  1634. }
  1635. if (!("hits" in $$source)) {
  1636. /**
  1637. * 命中的关键词个数(越多排越前,前端按档位配色)
  1638. * @member
  1639. * @type {number}
  1640. */
  1641. this["hits"] = 0;
  1642. }
  1643. Object.assign(this, $$source);
  1644. }
  1645. /**
  1646. * Creates a new NewsItem instance from a string or object.
  1647. * @param {any} [$$source = {}]
  1648. * @returns {NewsItem}
  1649. */
  1650. static createFrom($$source = {}) {
  1651. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1652. return new NewsItem(/** @type {Partial<NewsItem>} */($$parsedSource));
  1653. }
  1654. }
  1655. /**
  1656. * PCStatus 电源命令状态快照,供 API 与「主机」页查询
  1657. */
  1658. export class PCStatus {
  1659. /**
  1660. * Creates a new PCStatus instance.
  1661. * @param {Partial<PCStatus>} [$$source = {}] - The source object to create the PCStatus.
  1662. */
  1663. constructor($$source = {}) {
  1664. if (!("command" in $$source)) {
  1665. /**
  1666. * 最近一次命令类型
  1667. * @member
  1668. * @type {string}
  1669. */
  1670. this["command"] = "";
  1671. }
  1672. if (!("pending" in $$source)) {
  1673. /**
  1674. * 是否有待执行命令
  1675. * @member
  1676. * @type {boolean}
  1677. */
  1678. this["pending"] = false;
  1679. }
  1680. if (!("executeAt" in $$source)) {
  1681. /**
  1682. * 计划执行时间
  1683. * @member
  1684. * @type {string}
  1685. */
  1686. this["executeAt"] = "";
  1687. }
  1688. if (!("remainingSecs" in $$source)) {
  1689. /**
  1690. * 剩余秒数
  1691. * @member
  1692. * @type {number}
  1693. */
  1694. this["remainingSecs"] = 0;
  1695. }
  1696. if (!("clientIp" in $$source)) {
  1697. /**
  1698. * 最近一次请求的客户端 IP
  1699. * @member
  1700. * @type {string}
  1701. */
  1702. this["clientIp"] = "";
  1703. }
  1704. if (!("requestTime" in $$source)) {
  1705. /**
  1706. * 最近一次请求时间
  1707. * @member
  1708. * @type {string}
  1709. */
  1710. this["requestTime"] = "";
  1711. }
  1712. if (!("requested" in $$source)) {
  1713. /**
  1714. * 是否收到过请求
  1715. * @member
  1716. * @type {boolean}
  1717. */
  1718. this["requested"] = false;
  1719. }
  1720. Object.assign(this, $$source);
  1721. }
  1722. /**
  1723. * Creates a new PCStatus instance from a string or object.
  1724. * @param {any} [$$source = {}]
  1725. * @returns {PCStatus}
  1726. */
  1727. static createFrom($$source = {}) {
  1728. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1729. return new PCStatus(/** @type {Partial<PCStatus>} */($$parsedSource));
  1730. }
  1731. }
  1732. /**
  1733. * PoemConfig 古诗显示的配置
  1734. */
  1735. export class PoemConfig {
  1736. /**
  1737. * Creates a new PoemConfig instance.
  1738. * @param {Partial<PoemConfig>} [$$source = {}] - The source object to create the PoemConfig.
  1739. */
  1740. constructor($$source = {}) {
  1741. if (!("enabled" in $$source)) {
  1742. /**
  1743. * 是否启用古诗显示
  1744. * @member
  1745. * @type {boolean}
  1746. */
  1747. this["enabled"] = false;
  1748. }
  1749. if (!("color" in $$source)) {
  1750. /**
  1751. * 文字颜色
  1752. * @member
  1753. * @type {string}
  1754. */
  1755. this["color"] = "";
  1756. }
  1757. if (!("fontSize" in $$source)) {
  1758. /**
  1759. * 字号(px)
  1760. * @member
  1761. * @type {number}
  1762. */
  1763. this["fontSize"] = 0;
  1764. }
  1765. if (!("tts" in $$source)) {
  1766. /**
  1767. * 允许 TTS 阅读(显示朗读按钮)
  1768. * @member
  1769. * @type {boolean}
  1770. */
  1771. this["tts"] = false;
  1772. }
  1773. if (!("interval" in $$source)) {
  1774. /**
  1775. * 自动换诗间隔(秒),0 表示不自动换
  1776. * @member
  1777. * @type {number}
  1778. */
  1779. this["interval"] = 0;
  1780. }
  1781. if (!("speed" in $$source)) {
  1782. /**
  1783. * 滚动速度(秒/轮),即滚动一个文本周期所需秒数,越小越快
  1784. * @member
  1785. * @type {number}
  1786. */
  1787. this["speed"] = 0;
  1788. }
  1789. Object.assign(this, $$source);
  1790. }
  1791. /**
  1792. * Creates a new PoemConfig instance from a string or object.
  1793. * @param {any} [$$source = {}]
  1794. * @returns {PoemConfig}
  1795. */
  1796. static createFrom($$source = {}) {
  1797. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1798. return new PoemConfig(/** @type {Partial<PoemConfig>} */($$parsedSource));
  1799. }
  1800. }
  1801. /**
  1802. * PoemData 一首古诗的完整数据(从接口解析)
  1803. */
  1804. export class PoemData {
  1805. /**
  1806. * Creates a new PoemData instance.
  1807. * @param {Partial<PoemData>} [$$source = {}] - The source object to create the PoemData.
  1808. */
  1809. constructor($$source = {}) {
  1810. if (!("title" in $$source)) {
  1811. /**
  1812. * 题目
  1813. * @member
  1814. * @type {string}
  1815. */
  1816. this["title"] = "";
  1817. }
  1818. if (!("author" in $$source)) {
  1819. /**
  1820. * 作者
  1821. * @member
  1822. * @type {string}
  1823. */
  1824. this["author"] = "";
  1825. }
  1826. if (!("dynasty" in $$source)) {
  1827. /**
  1828. * 朝代
  1829. * @member
  1830. * @type {string}
  1831. */
  1832. this["dynasty"] = "";
  1833. }
  1834. if (!("content" in $$source)) {
  1835. /**
  1836. * 每句诗(数组,按行显示)
  1837. * @member
  1838. * @type {string[]}
  1839. */
  1840. this["content"] = [];
  1841. }
  1842. if (!("type" in $$source)) {
  1843. /**
  1844. * 体裁,如 五言律诗
  1845. * @member
  1846. * @type {string}
  1847. */
  1848. this["type"] = "";
  1849. }
  1850. Object.assign(this, $$source);
  1851. }
  1852. /**
  1853. * Creates a new PoemData instance from a string or object.
  1854. * @param {any} [$$source = {}]
  1855. * @returns {PoemData}
  1856. */
  1857. static createFrom($$source = {}) {
  1858. const $$createField3_0 = $$createType0;
  1859. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1860. if ("content" in $$parsedSource) {
  1861. $$parsedSource["content"] = $$createField3_0($$parsedSource["content"]);
  1862. }
  1863. return new PoemData(/** @type {Partial<PoemData>} */($$parsedSource));
  1864. }
  1865. }
  1866. /**
  1867. * ProxyConfig 网络代理配置(工具页「网络代理」卡片)。
  1868. * 仅保存地址,开关状态由系统代理注册表(ProxyEnable)实时决定,不在配置里持久化。
  1869. */
  1870. export class ProxyConfig {
  1871. /**
  1872. * Creates a new ProxyConfig instance.
  1873. * @param {Partial<ProxyConfig>} [$$source = {}] - The source object to create the ProxyConfig.
  1874. */
  1875. constructor($$source = {}) {
  1876. if (!("server" in $$source)) {
  1877. /**
  1878. * 代理服务器地址,如 127.0.0.1:7890
  1879. * @member
  1880. * @type {string}
  1881. */
  1882. this["server"] = "";
  1883. }
  1884. Object.assign(this, $$source);
  1885. }
  1886. /**
  1887. * Creates a new ProxyConfig instance from a string or object.
  1888. * @param {any} [$$source = {}]
  1889. * @returns {ProxyConfig}
  1890. */
  1891. static createFrom($$source = {}) {
  1892. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1893. return new ProxyConfig(/** @type {Partial<ProxyConfig>} */($$parsedSource));
  1894. }
  1895. }
  1896. /**
  1897. * ProxyStatus 网络代理当前状态
  1898. */
  1899. export class ProxyStatus {
  1900. /**
  1901. * Creates a new ProxyStatus instance.
  1902. * @param {Partial<ProxyStatus>} [$$source = {}] - The source object to create the ProxyStatus.
  1903. */
  1904. constructor($$source = {}) {
  1905. if (!("enabled" in $$source)) {
  1906. /**
  1907. * 系统代理是否开启
  1908. * @member
  1909. * @type {boolean}
  1910. */
  1911. this["enabled"] = false;
  1912. }
  1913. if (!("server" in $$source)) {
  1914. /**
  1915. * 代理服务器地址(如 127.0.0.1:7890)
  1916. * @member
  1917. * @type {string}
  1918. */
  1919. this["server"] = "";
  1920. }
  1921. if (!("configured" in $$source)) {
  1922. /**
  1923. * 配置里是否保存了代理地址(用于前端区分「未设置」)
  1924. * @member
  1925. * @type {boolean}
  1926. */
  1927. this["configured"] = false;
  1928. }
  1929. Object.assign(this, $$source);
  1930. }
  1931. /**
  1932. * Creates a new ProxyStatus instance from a string or object.
  1933. * @param {any} [$$source = {}]
  1934. * @returns {ProxyStatus}
  1935. */
  1936. static createFrom($$source = {}) {
  1937. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1938. return new ProxyStatus(/** @type {Partial<ProxyStatus>} */($$parsedSource));
  1939. }
  1940. }
  1941. /**
  1942. * QuickGroup 快捷启动分组(「快捷」页)。
  1943. * 设置文本中顶层无缩进行为分组名,其下缩进的「名称|路径|说明」条目归入该组;
  1944. * 未缩进但在某分组之前直接出现的条目归入「未分组」。
  1945. */
  1946. export class QuickGroup {
  1947. /**
  1948. * Creates a new QuickGroup instance.
  1949. * @param {Partial<QuickGroup>} [$$source = {}] - The source object to create the QuickGroup.
  1950. */
  1951. constructor($$source = {}) {
  1952. if (!("name" in $$source)) {
  1953. /**
  1954. * 分组名(顶层无缩进行;空表示未分组)
  1955. * @member
  1956. * @type {string}
  1957. */
  1958. this["name"] = "";
  1959. }
  1960. if (!("items" in $$source)) {
  1961. /**
  1962. * 分组内快捷项(缩进条目)
  1963. * @member
  1964. * @type {QuickItem[]}
  1965. */
  1966. this["items"] = [];
  1967. }
  1968. Object.assign(this, $$source);
  1969. }
  1970. /**
  1971. * Creates a new QuickGroup instance from a string or object.
  1972. * @param {any} [$$source = {}]
  1973. * @returns {QuickGroup}
  1974. */
  1975. static createFrom($$source = {}) {
  1976. const $$createField1_0 = $$createType32;
  1977. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  1978. if ("items" in $$parsedSource) {
  1979. $$parsedSource["items"] = $$createField1_0($$parsedSource["items"]);
  1980. }
  1981. return new QuickGroup(/** @type {Partial<QuickGroup>} */($$parsedSource));
  1982. }
  1983. }
  1984. /**
  1985. * QuickItem 快捷启动项(「快捷」页,设置中以缩进分层编辑)。
  1986. * 与 Biniware Run 类似:每项为「名称|程序路径|说明」,说明可省略。
  1987. */
  1988. export class QuickItem {
  1989. /**
  1990. * Creates a new QuickItem instance.
  1991. * @param {Partial<QuickItem>} [$$source = {}] - The source object to create the QuickItem.
  1992. */
  1993. constructor($$source = {}) {
  1994. if (!("title" in $$source)) {
  1995. /**
  1996. * 显示名称
  1997. * @member
  1998. * @type {string}
  1999. */
  2000. this["title"] = "";
  2001. }
  2002. if (!("path" in $$source)) {
  2003. /**
  2004. * 程序路径(可执行文件,可带参数与 %VAR% 环境变量)
  2005. * @member
  2006. * @type {string}
  2007. */
  2008. this["path"] = "";
  2009. }
  2010. if (!("desc" in $$source)) {
  2011. /**
  2012. * 说明文字(可空)
  2013. * @member
  2014. * @type {string}
  2015. */
  2016. this["desc"] = "";
  2017. }
  2018. Object.assign(this, $$source);
  2019. }
  2020. /**
  2021. * Creates a new QuickItem instance from a string or object.
  2022. * @param {any} [$$source = {}]
  2023. * @returns {QuickItem}
  2024. */
  2025. static createFrom($$source = {}) {
  2026. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2027. return new QuickItem(/** @type {Partial<QuickItem>} */($$parsedSource));
  2028. }
  2029. }
  2030. /**
  2031. * RecordItem 一条记录:姓名 + 名称 + 值 + 备注 + 录入时间,供记录 Tab 列表与柱状图使用
  2032. */
  2033. export class RecordItem {
  2034. /**
  2035. * Creates a new RecordItem instance.
  2036. * @param {Partial<RecordItem>} [$$source = {}] - The source object to create the RecordItem.
  2037. */
  2038. constructor($$source = {}) {
  2039. if (!("name" in $$source)) {
  2040. /**
  2041. * 姓名
  2042. * @member
  2043. * @type {string}
  2044. */
  2045. this["name"] = "";
  2046. }
  2047. if (!("item" in $$source)) {
  2048. /**
  2049. * 名称
  2050. * @member
  2051. * @type {string}
  2052. */
  2053. this["item"] = "";
  2054. }
  2055. if (!("value" in $$source)) {
  2056. /**
  2057. * 值
  2058. * @member
  2059. * @type {number}
  2060. */
  2061. this["value"] = 0;
  2062. }
  2063. if (!("remark" in $$source)) {
  2064. /**
  2065. * 备注(可选)
  2066. * @member
  2067. * @type {string}
  2068. */
  2069. this["remark"] = "";
  2070. }
  2071. if (!("createdAt" in $$source)) {
  2072. /**
  2073. * 录入时间 YYYY-MM-DD HH:MM:SS(前端新增时生成;为空时后端用当前时间)
  2074. * @member
  2075. * @type {string}
  2076. */
  2077. this["createdAt"] = "";
  2078. }
  2079. Object.assign(this, $$source);
  2080. }
  2081. /**
  2082. * Creates a new RecordItem instance from a string or object.
  2083. * @param {any} [$$source = {}]
  2084. * @returns {RecordItem}
  2085. */
  2086. static createFrom($$source = {}) {
  2087. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2088. return new RecordItem(/** @type {Partial<RecordItem>} */($$parsedSource));
  2089. }
  2090. }
  2091. /**
  2092. * ReleaseItem 一个 GitHub release 的简略信息,用于列出 Latest 之后的版本(Pre-release 等)
  2093. */
  2094. export class ReleaseItem {
  2095. /**
  2096. * Creates a new ReleaseItem instance.
  2097. * @param {Partial<ReleaseItem>} [$$source = {}] - The source object to create the ReleaseItem.
  2098. */
  2099. constructor($$source = {}) {
  2100. if (!("tagName" in $$source)) {
  2101. /**
  2102. * 版本标签,如 v1.3.0-beta.1
  2103. * @member
  2104. * @type {string}
  2105. */
  2106. this["tagName"] = "";
  2107. }
  2108. if (!("name" in $$source)) {
  2109. /**
  2110. * release 显示名称(标题),可能比 tag 更完整,如 "Rolling: v2.1.0-..."
  2111. * @member
  2112. * @type {string}
  2113. */
  2114. this["name"] = "";
  2115. }
  2116. if (!("url" in $$source)) {
  2117. /**
  2118. * release 详情页地址
  2119. * @member
  2120. * @type {string}
  2121. */
  2122. this["url"] = "";
  2123. }
  2124. if (!("isPrerelease" in $$source)) {
  2125. /**
  2126. * 是否预发布版本
  2127. * @member
  2128. * @type {boolean}
  2129. */
  2130. this["isPrerelease"] = false;
  2131. }
  2132. if (!("isDraft" in $$source)) {
  2133. /**
  2134. * 是否草稿版本
  2135. * @member
  2136. * @type {boolean}
  2137. */
  2138. this["isDraft"] = false;
  2139. }
  2140. if (!("publishedAt" in $$source)) {
  2141. /**
  2142. * 发布时间(MM-DD HH:MM)
  2143. * @member
  2144. * @type {string}
  2145. */
  2146. this["publishedAt"] = "";
  2147. }
  2148. Object.assign(this, $$source);
  2149. }
  2150. /**
  2151. * Creates a new ReleaseItem instance from a string or object.
  2152. * @param {any} [$$source = {}]
  2153. * @returns {ReleaseItem}
  2154. */
  2155. static createFrom($$source = {}) {
  2156. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2157. return new ReleaseItem(/** @type {Partial<ReleaseItem>} */($$parsedSource));
  2158. }
  2159. }
  2160. /**
  2161. * RepoFeed 一个 GitHub 仓库的最新提交摘要
  2162. */
  2163. export class RepoFeed {
  2164. /**
  2165. * Creates a new RepoFeed instance.
  2166. * @param {Partial<RepoFeed>} [$$source = {}] - The source object to create the RepoFeed.
  2167. */
  2168. constructor($$source = {}) {
  2169. if (!("url" in $$source)) {
  2170. /**
  2171. * 仓库地址(设置中配置)
  2172. * @member
  2173. * @type {string}
  2174. */
  2175. this["url"] = "";
  2176. }
  2177. if (!("desc" in $$source)) {
  2178. /**
  2179. * 项目说明
  2180. * @member
  2181. * @type {string}
  2182. */
  2183. this["desc"] = "";
  2184. }
  2185. if (!("repo" in $$source)) {
  2186. /**
  2187. * owner/repo 短名
  2188. * @member
  2189. * @type {string}
  2190. */
  2191. this["repo"] = "";
  2192. }
  2193. if (!("version" in $$source)) {
  2194. /**
  2195. * 本地已安装版本(设置中配置)
  2196. * @member
  2197. * @type {string}
  2198. */
  2199. this["version"] = "";
  2200. }
  2201. if (!("versionTime" in $$source)) {
  2202. /**
  2203. * 本地版本对应 release 的发布时间(MM-DD HH:MM),用于鼠标提示
  2204. * @member
  2205. * @type {string}
  2206. */
  2207. this["versionTime"] = "";
  2208. }
  2209. if (!("latest" in $$source)) {
  2210. /**
  2211. * 最新正式 release 版本号,无正式 release 时为空
  2212. * @member
  2213. * @type {string}
  2214. */
  2215. this["latest"] = "";
  2216. }
  2217. if (!("latestTime" in $$source)) {
  2218. /**
  2219. * 最新正式 release 发布时间(MM-DD HH:MM),用于鼠标提示
  2220. * @member
  2221. * @type {string}
  2222. */
  2223. this["latestTime"] = "";
  2224. }
  2225. if (!("hasUpdate" in $$source)) {
  2226. /**
  2227. * 是否存在可用更新(本地版本低于最新正式 release)
  2228. * @member
  2229. * @type {boolean}
  2230. */
  2231. this["hasUpdate"] = false;
  2232. }
  2233. if (!("releaseURL" in $$source)) {
  2234. /**
  2235. * 最新正式 release 的下载 / 详情页地址
  2236. * @member
  2237. * @type {string}
  2238. */
  2239. this["releaseURL"] = "";
  2240. }
  2241. if (!("newer" in $$source)) {
  2242. /**
  2243. * Latest 之后的版本(Pre-release 等,仅列出不参与更新比较)
  2244. * @member
  2245. * @type {ReleaseItem[]}
  2246. */
  2247. this["newer"] = [];
  2248. }
  2249. if (!("commits" in $$source)) {
  2250. /**
  2251. * 最近提交(最多 5 条)
  2252. * @member
  2253. * @type {CommitItem[]}
  2254. */
  2255. this["commits"] = [];
  2256. }
  2257. if (!("error" in $$source)) {
  2258. /**
  2259. * 抓取失败原因,为空表示正常
  2260. * @member
  2261. * @type {string}
  2262. */
  2263. this["error"] = "";
  2264. }
  2265. Object.assign(this, $$source);
  2266. }
  2267. /**
  2268. * Creates a new RepoFeed instance from a string or object.
  2269. * @param {any} [$$source = {}]
  2270. * @returns {RepoFeed}
  2271. */
  2272. static createFrom($$source = {}) {
  2273. const $$createField9_0 = $$createType34;
  2274. const $$createField10_0 = $$createType36;
  2275. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2276. if ("newer" in $$parsedSource) {
  2277. $$parsedSource["newer"] = $$createField9_0($$parsedSource["newer"]);
  2278. }
  2279. if ("commits" in $$parsedSource) {
  2280. $$parsedSource["commits"] = $$createField10_0($$parsedSource["commits"]);
  2281. }
  2282. return new RepoFeed(/** @type {Partial<RepoFeed>} */($$parsedSource));
  2283. }
  2284. }
  2285. /**
  2286. * RepoItem 关注的 GitHub 仓库条目
  2287. */
  2288. export class RepoItem {
  2289. /**
  2290. * Creates a new RepoItem instance.
  2291. * @param {Partial<RepoItem>} [$$source = {}] - The source object to create the RepoItem.
  2292. */
  2293. constructor($$source = {}) {
  2294. if (!("url" in $$source)) {
  2295. /**
  2296. * 仓库地址,如 https://github.com/wailsapp/wails
  2297. * @member
  2298. * @type {string}
  2299. */
  2300. this["url"] = "";
  2301. }
  2302. if (!("desc" in $$source)) {
  2303. /**
  2304. * 项目说明
  2305. * @member
  2306. * @type {string}
  2307. */
  2308. this["desc"] = "";
  2309. }
  2310. if (!("version" in $$source)) {
  2311. /**
  2312. * 本地已安装版本(用于与最新 release 比较),可为空
  2313. * @member
  2314. * @type {string}
  2315. */
  2316. this["version"] = "";
  2317. }
  2318. Object.assign(this, $$source);
  2319. }
  2320. /**
  2321. * Creates a new RepoItem instance from a string or object.
  2322. * @param {any} [$$source = {}]
  2323. * @returns {RepoItem}
  2324. */
  2325. static createFrom($$source = {}) {
  2326. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2327. return new RepoItem(/** @type {Partial<RepoItem>} */($$parsedSource));
  2328. }
  2329. }
  2330. /**
  2331. * ResourceStatus 资源条目 + 本机安装状态,供前端列表渲染
  2332. */
  2333. export class ResourceStatus {
  2334. /**
  2335. * Creates a new ResourceStatus instance.
  2336. * @param {Partial<ResourceStatus>} [$$source = {}] - The source object to create the ResourceStatus.
  2337. */
  2338. constructor($$source = {}) {
  2339. if (!("name" in $$source)) {
  2340. /**
  2341. * 唯一标识,如 ffmpeg
  2342. * @member
  2343. * @type {string}
  2344. */
  2345. this["name"] = "";
  2346. }
  2347. if (!("version" in $$source)) {
  2348. /**
  2349. * 版本号,如 6.1.1
  2350. * @member
  2351. * @type {string}
  2352. */
  2353. this["version"] = "";
  2354. }
  2355. if (!("url" in $$source)) {
  2356. /**
  2357. * 下载地址(绝对 URL)
  2358. * @member
  2359. * @type {string}
  2360. */
  2361. this["url"] = "";
  2362. }
  2363. if (!("size" in $$source)) {
  2364. /**
  2365. * 字节,0=未知
  2366. * @member
  2367. * @type {number}
  2368. */
  2369. this["size"] = 0;
  2370. }
  2371. if (!("desc" in $$source)) {
  2372. /**
  2373. * 说明文字
  2374. * @member
  2375. * @type {string}
  2376. */
  2377. this["desc"] = "";
  2378. }
  2379. if (!("platform" in $$source)) {
  2380. /**
  2381. * 目标平台,如 windows-amd64
  2382. * @member
  2383. * @type {string}
  2384. */
  2385. this["platform"] = "";
  2386. }
  2387. if (!("os" in $$source)) {
  2388. /**
  2389. * 目标操作系统,如 windows/linux/darwin;空=不限(本机可用)
  2390. * @member
  2391. * @type {string}
  2392. */
  2393. this["os"] = "";
  2394. }
  2395. if (!("homepage" in $$source)) {
  2396. /**
  2397. * 官网地址,点击名称可在浏览器打开;空=不可点击
  2398. * @member
  2399. * @type {string}
  2400. */
  2401. this["homepage"] = "";
  2402. }
  2403. if (!("installed" in $$source)) {
  2404. /**
  2405. * 是否已安装到目标目录
  2406. * @member
  2407. * @type {boolean}
  2408. */
  2409. this["installed"] = false;
  2410. }
  2411. if (!("installedVersion" in $$source)) {
  2412. /**
  2413. * 已安装版本(从目录/可执行文件探测)
  2414. * @member
  2415. * @type {string}
  2416. */
  2417. this["installedVersion"] = "";
  2418. }
  2419. if (!("path" in $$source)) {
  2420. /**
  2421. * 安装后可执行文件/目录路径
  2422. * @member
  2423. * @type {string}
  2424. */
  2425. this["path"] = "";
  2426. }
  2427. Object.assign(this, $$source);
  2428. }
  2429. /**
  2430. * Creates a new ResourceStatus instance from a string or object.
  2431. * @param {any} [$$source = {}]
  2432. * @returns {ResourceStatus}
  2433. */
  2434. static createFrom($$source = {}) {
  2435. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2436. return new ResourceStatus(/** @type {Partial<ResourceStatus>} */($$parsedSource));
  2437. }
  2438. }
  2439. /**
  2440. * ResourcesConfig 「设置-资源」栏配置:允许下载外部工具(ffmpeg/croc 等)
  2441. */
  2442. export class ResourcesConfig {
  2443. /**
  2444. * Creates a new ResourcesConfig instance.
  2445. * @param {Partial<ResourcesConfig>} [$$source = {}] - The source object to create the ResourcesConfig.
  2446. */
  2447. constructor($$source = {}) {
  2448. if (!("serverURL" in $$source)) {
  2449. /**
  2450. * 自定义资源清单服务器地址;空=使用内置默认清单
  2451. * @member
  2452. * @type {string}
  2453. */
  2454. this["serverURL"] = "";
  2455. }
  2456. if (!("downloadDir" in $$source)) {
  2457. /**
  2458. * 下载/解压目标目录;空=程序目录/resources
  2459. * @member
  2460. * @type {string}
  2461. */
  2462. this["downloadDir"] = "";
  2463. }
  2464. if (!("autoInstallPath" in $$source)) {
  2465. /**
  2466. * 下载成功后是否加入用户 PATH,默认 true
  2467. * @member
  2468. * @type {boolean}
  2469. */
  2470. this["autoInstallPath"] = false;
  2471. }
  2472. Object.assign(this, $$source);
  2473. }
  2474. /**
  2475. * Creates a new ResourcesConfig instance from a string or object.
  2476. * @param {any} [$$source = {}]
  2477. * @returns {ResourcesConfig}
  2478. */
  2479. static createFrom($$source = {}) {
  2480. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2481. return new ResourcesConfig(/** @type {Partial<ResourcesConfig>} */($$parsedSource));
  2482. }
  2483. }
  2484. /**
  2485. * ServiceModeStatus 服务模式运行状态(服务页展示)
  2486. */
  2487. export class ServiceModeStatus {
  2488. /**
  2489. * Creates a new ServiceModeStatus instance.
  2490. * @param {Partial<ServiceModeStatus>} [$$source = {}] - The source object to create the ServiceModeStatus.
  2491. */
  2492. constructor($$source = {}) {
  2493. if (!("addr" in $$source)) {
  2494. /**
  2495. * 服务模式监听地址
  2496. * @member
  2497. * @type {string}
  2498. */
  2499. this["addr"] = "";
  2500. }
  2501. if (!("running" in $$source)) {
  2502. /**
  2503. * 该地址上的电源 API 是否可用
  2504. * @member
  2505. * @type {boolean}
  2506. */
  2507. this["running"] = false;
  2508. }
  2509. if (!("managed" in $$source)) {
  2510. /**
  2511. * true=由真正的 Windows 服务提供;false=界面进程兜底
  2512. * @member
  2513. * @type {boolean}
  2514. */
  2515. this["managed"] = false;
  2516. }
  2517. if (!("occupied" in $$source)) {
  2518. /**
  2519. * 端口被其他程序占用(既非服务模式也非本程序)
  2520. * @member
  2521. * @type {boolean}
  2522. */
  2523. this["occupied"] = false;
  2524. }
  2525. if (!("version" in $$source)) {
  2526. /**
  2527. * 服务端版本(可用时)
  2528. * @member
  2529. * @type {string}
  2530. */
  2531. this["version"] = "";
  2532. }
  2533. Object.assign(this, $$source);
  2534. }
  2535. /**
  2536. * Creates a new ServiceModeStatus instance from a string or object.
  2537. * @param {any} [$$source = {}]
  2538. * @returns {ServiceModeStatus}
  2539. */
  2540. static createFrom($$source = {}) {
  2541. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2542. return new ServiceModeStatus(/** @type {Partial<ServiceModeStatus>} */($$parsedSource));
  2543. }
  2544. }
  2545. /**
  2546. * StockQuote 单只股票的行情快照,供前端「股市」页展示
  2547. */
  2548. export class StockQuote {
  2549. /**
  2550. * Creates a new StockQuote instance.
  2551. * @param {Partial<StockQuote>} [$$source = {}] - The source object to create the StockQuote.
  2552. */
  2553. constructor($$source = {}) {
  2554. if (!("code" in $$source)) {
  2555. /**
  2556. * 带市场前缀的代码,如 sh600519
  2557. * @member
  2558. * @type {string}
  2559. */
  2560. this["code"] = "";
  2561. }
  2562. if (!("name" in $$source)) {
  2563. /**
  2564. * 股票名称
  2565. * @member
  2566. * @type {string}
  2567. */
  2568. this["name"] = "";
  2569. }
  2570. if (!("price" in $$source)) {
  2571. /**
  2572. * 当前价
  2573. * @member
  2574. * @type {number}
  2575. */
  2576. this["price"] = 0;
  2577. }
  2578. if (!("change" in $$source)) {
  2579. /**
  2580. * 涨跌额
  2581. * @member
  2582. * @type {number}
  2583. */
  2584. this["change"] = 0;
  2585. }
  2586. if (!("changePercent" in $$source)) {
  2587. /**
  2588. * 涨跌幅(%)
  2589. * @member
  2590. * @type {number}
  2591. */
  2592. this["changePercent"] = 0;
  2593. }
  2594. if (!("amount" in $$source)) {
  2595. /**
  2596. * 成交额(万元)
  2597. * @member
  2598. * @type {number}
  2599. */
  2600. this["amount"] = 0;
  2601. }
  2602. if (!("time" in $$source)) {
  2603. /**
  2604. * 行情时间 HH:MM:SS
  2605. * @member
  2606. * @type {string}
  2607. */
  2608. this["time"] = "";
  2609. }
  2610. Object.assign(this, $$source);
  2611. }
  2612. /**
  2613. * Creates a new StockQuote instance from a string or object.
  2614. * @param {any} [$$source = {}]
  2615. * @returns {StockQuote}
  2616. */
  2617. static createFrom($$source = {}) {
  2618. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2619. return new StockQuote(/** @type {Partial<StockQuote>} */($$parsedSource));
  2620. }
  2621. }
  2622. /**
  2623. * TagInfo 一条文件标签:完整路径 + 标签 + 备注 + 更新时间。
  2624. * 供前端设置页/标签管理 UI 与后端悬停提示使用。
  2625. */
  2626. export class TagInfo {
  2627. /**
  2628. * Creates a new TagInfo instance.
  2629. * @param {Partial<TagInfo>} [$$source = {}] - The source object to create the TagInfo.
  2630. */
  2631. constructor($$source = {}) {
  2632. if (!("path" in $$source)) {
  2633. /**
  2634. * 完整路径(已规范化:小写 + Clean)
  2635. * @member
  2636. * @type {string}
  2637. */
  2638. this["path"] = "";
  2639. }
  2640. if (!("tag" in $$source)) {
  2641. /**
  2642. * 标签(可空)
  2643. * @member
  2644. * @type {string}
  2645. */
  2646. this["tag"] = "";
  2647. }
  2648. if (!("note" in $$source)) {
  2649. /**
  2650. * 备注(可空)
  2651. * @member
  2652. * @type {string}
  2653. */
  2654. this["note"] = "";
  2655. }
  2656. if (!("updatedAt" in $$source)) {
  2657. /**
  2658. * 最近更新时间 YYYY-MM-DD HH:MM:SS
  2659. * @member
  2660. * @type {string}
  2661. */
  2662. this["updatedAt"] = "";
  2663. }
  2664. Object.assign(this, $$source);
  2665. }
  2666. /**
  2667. * Creates a new TagInfo instance from a string or object.
  2668. * @param {any} [$$source = {}]
  2669. * @returns {TagInfo}
  2670. */
  2671. static createFrom($$source = {}) {
  2672. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2673. return new TagInfo(/** @type {Partial<TagInfo>} */($$parsedSource));
  2674. }
  2675. }
  2676. /**
  2677. * TickerConfig 置顶滚动条(股票 / 新闻)的显示配置
  2678. */
  2679. export class TickerConfig {
  2680. /**
  2681. * Creates a new TickerConfig instance.
  2682. * @param {Partial<TickerConfig>} [$$source = {}] - The source object to create the TickerConfig.
  2683. */
  2684. constructor($$source = {}) {
  2685. if (!("enabled" in $$source)) {
  2686. /**
  2687. * 是否显示滚动条窗口
  2688. * @member
  2689. * @type {boolean}
  2690. */
  2691. this["enabled"] = false;
  2692. }
  2693. if (!("width" in $$source)) {
  2694. /**
  2695. * 窗口宽度(px),0 表示默认 1400
  2696. * @member
  2697. * @type {number}
  2698. */
  2699. this["width"] = 0;
  2700. }
  2701. if (!("fontSize" in $$source)) {
  2702. /**
  2703. * 字号(px)
  2704. * @member
  2705. * @type {number}
  2706. */
  2707. this["fontSize"] = 0;
  2708. }
  2709. if (!("color" in $$source)) {
  2710. /**
  2711. * 文字颜色
  2712. * @member
  2713. * @type {string}
  2714. */
  2715. this["color"] = "";
  2716. }
  2717. if (!("speed" in $$source)) {
  2718. /**
  2719. * 滚动速度(px/s)
  2720. * @member
  2721. * @type {number}
  2722. */
  2723. this["speed"] = 0;
  2724. }
  2725. if (!("transparent" in $$source)) {
  2726. /**
  2727. * 背景透明,不遮挡下方内容
  2728. * @member
  2729. * @type {boolean}
  2730. */
  2731. this["transparent"] = false;
  2732. }
  2733. if (!("x" in $$source)) {
  2734. /**
  2735. * 窗口位置,-1 表示未设置(系统默认位置)
  2736. * @member
  2737. * @type {number}
  2738. */
  2739. this["x"] = 0;
  2740. }
  2741. if (!("y" in $$source)) {
  2742. /**
  2743. * 窗口位置,-1 表示未设置
  2744. * @member
  2745. * @type {number}
  2746. */
  2747. this["y"] = 0;
  2748. }
  2749. Object.assign(this, $$source);
  2750. }
  2751. /**
  2752. * Creates a new TickerConfig instance from a string or object.
  2753. * @param {any} [$$source = {}]
  2754. * @returns {TickerConfig}
  2755. */
  2756. static createFrom($$source = {}) {
  2757. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2758. return new TickerConfig(/** @type {Partial<TickerConfig>} */($$parsedSource));
  2759. }
  2760. }
  2761. /**
  2762. * TranslateResult 一次翻译的结果,供前端展示。
  2763. */
  2764. export class TranslateResult {
  2765. /**
  2766. * Creates a new TranslateResult instance.
  2767. * @param {Partial<TranslateResult>} [$$source = {}] - The source object to create the TranslateResult.
  2768. */
  2769. constructor($$source = {}) {
  2770. if (!("text" in $$source)) {
  2771. /**
  2772. * 翻译结果文本
  2773. * @member
  2774. * @type {string}
  2775. */
  2776. this["text"] = "";
  2777. }
  2778. if (!("detected" in $$source)) {
  2779. /**
  2780. * 检测到的源语言(zh / en)
  2781. * @member
  2782. * @type {string}
  2783. */
  2784. this["detected"] = "";
  2785. }
  2786. if (!("target" in $$source)) {
  2787. /**
  2788. * 目标语言(zh / en)
  2789. * @member
  2790. * @type {string}
  2791. */
  2792. this["target"] = "";
  2793. }
  2794. Object.assign(this, $$source);
  2795. }
  2796. /**
  2797. * Creates a new TranslateResult instance from a string or object.
  2798. * @param {any} [$$source = {}]
  2799. * @returns {TranslateResult}
  2800. */
  2801. static createFrom($$source = {}) {
  2802. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2803. return new TranslateResult(/** @type {Partial<TranslateResult>} */($$parsedSource));
  2804. }
  2805. }
  2806. /**
  2807. * TrendingRepo 一个热门仓库条目(来源可为 GitHub Trending 或 HelloGitHub)
  2808. */
  2809. export class TrendingRepo {
  2810. /**
  2811. * Creates a new TrendingRepo instance.
  2812. * @param {Partial<TrendingRepo>} [$$source = {}] - The source object to create the TrendingRepo.
  2813. */
  2814. constructor($$source = {}) {
  2815. if (!("name" in $$source)) {
  2816. /**
  2817. * owner/repo 短名
  2818. * @member
  2819. * @type {string}
  2820. */
  2821. this["name"] = "";
  2822. }
  2823. if (!("url" in $$source)) {
  2824. /**
  2825. * 仓库主页地址(GitHub 直链)
  2826. * @member
  2827. * @type {string}
  2828. */
  2829. this["url"] = "";
  2830. }
  2831. if (!("desc" in $$source)) {
  2832. /**
  2833. * 简介(英文已自动翻译为中文,翻译失败保留原文)
  2834. * @member
  2835. * @type {string}
  2836. */
  2837. this["desc"] = "";
  2838. }
  2839. if (!("lang" in $$source)) {
  2840. /**
  2841. * 主要语言,无则空
  2842. * @member
  2843. * @type {string}
  2844. */
  2845. this["lang"] = "";
  2846. }
  2847. if (!("stars" in $$source)) {
  2848. /**
  2849. * 总星数(如 "106,375")
  2850. * @member
  2851. * @type {string}
  2852. */
  2853. this["stars"] = "";
  2854. }
  2855. if (!("todayStars" in $$source)) {
  2856. /**
  2857. * 今日新增星数(如 "1,140",无则空)
  2858. * @member
  2859. * @type {string}
  2860. */
  2861. this["todayStars"] = "";
  2862. }
  2863. if (!("forks" in $$source)) {
  2864. /**
  2865. * fork 数(如 "9,365",无则空)
  2866. * @member
  2867. * @type {string}
  2868. */
  2869. this["forks"] = "";
  2870. }
  2871. if (!("source" in $$source)) {
  2872. /**
  2873. * 来源:"github"(GitHub Trending)/ "hellogithub"
  2874. * @member
  2875. * @type {string}
  2876. */
  2877. this["source"] = "";
  2878. }
  2879. if (!("heat" in $$source)) {
  2880. /**
  2881. * 热度(HelloGitHub 点击量,其它来源为空)
  2882. * @member
  2883. * @type {string}
  2884. */
  2885. this["heat"] = "";
  2886. }
  2887. Object.assign(this, $$source);
  2888. }
  2889. /**
  2890. * Creates a new TrendingRepo instance from a string or object.
  2891. * @param {any} [$$source = {}]
  2892. * @returns {TrendingRepo}
  2893. */
  2894. static createFrom($$source = {}) {
  2895. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2896. return new TrendingRepo(/** @type {Partial<TrendingRepo>} */($$parsedSource));
  2897. }
  2898. }
  2899. /**
  2900. * UDPInfo 描述一次 UDP 键值服务的运行状态,供前端展示。
  2901. */
  2902. export class UDPInfo {
  2903. /**
  2904. * Creates a new UDPInfo instance.
  2905. * @param {Partial<UDPInfo>} [$$source = {}] - The source object to create the UDPInfo.
  2906. */
  2907. constructor($$source = {}) {
  2908. if (!("running" in $$source)) {
  2909. /**
  2910. * 是否运行中
  2911. * @member
  2912. * @type {boolean}
  2913. */
  2914. this["running"] = false;
  2915. }
  2916. if (!("port" in $$source)) {
  2917. /**
  2918. * 监听端口
  2919. * @member
  2920. * @type {number}
  2921. */
  2922. this["port"] = 0;
  2923. }
  2924. if (!("addr" in $$source)) {
  2925. /**
  2926. * 监听地址 udp://0.0.0.0:port
  2927. * @member
  2928. * @type {string}
  2929. */
  2930. this["addr"] = "";
  2931. }
  2932. if (!("startedAt" in $$source)) {
  2933. /**
  2934. * 启动时间
  2935. * @member
  2936. * @type {string}
  2937. */
  2938. this["startedAt"] = "";
  2939. }
  2940. if (!("error" in $$source)) {
  2941. /**
  2942. * 最近一次错误
  2943. * @member
  2944. * @type {string}
  2945. */
  2946. this["error"] = "";
  2947. }
  2948. if (!("rxCount" in $$source)) {
  2949. /**
  2950. * 累计接收数据包数
  2951. * @member
  2952. * @type {number}
  2953. */
  2954. this["rxCount"] = 0;
  2955. }
  2956. if (!("txCount" in $$source)) {
  2957. /**
  2958. * 累计发送(回发/手动)数据包数
  2959. * @member
  2960. * @type {number}
  2961. */
  2962. this["txCount"] = 0;
  2963. }
  2964. Object.assign(this, $$source);
  2965. }
  2966. /**
  2967. * Creates a new UDPInfo instance from a string or object.
  2968. * @param {any} [$$source = {}]
  2969. * @returns {UDPInfo}
  2970. */
  2971. static createFrom($$source = {}) {
  2972. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  2973. return new UDPInfo(/** @type {Partial<UDPInfo>} */($$parsedSource));
  2974. }
  2975. }
  2976. /**
  2977. * WebServiceInfo 描述一次 Web 服务运行实例的状态,供前端展示。
  2978. */
  2979. export class WebServiceInfo {
  2980. /**
  2981. * Creates a new WebServiceInfo instance.
  2982. * @param {Partial<WebServiceInfo>} [$$source = {}] - The source object to create the WebServiceInfo.
  2983. */
  2984. constructor($$source = {}) {
  2985. if (!("running" in $$source)) {
  2986. /**
  2987. * 是否运行中
  2988. * @member
  2989. * @type {boolean}
  2990. */
  2991. this["running"] = false;
  2992. }
  2993. if (!("dir" in $$source)) {
  2994. /**
  2995. * 服务目录
  2996. * @member
  2997. * @type {string}
  2998. */
  2999. this["dir"] = "";
  3000. }
  3001. if (!("url" in $$source)) {
  3002. /**
  3003. * 访问地址 http://127.0.0.1:port/
  3004. * @member
  3005. * @type {string}
  3006. */
  3007. this["url"] = "";
  3008. }
  3009. if (!("port" in $$source)) {
  3010. /**
  3011. * 监听端口
  3012. * @member
  3013. * @type {number}
  3014. */
  3015. this["port"] = 0;
  3016. }
  3017. if (!("indexName" in $$source)) {
  3018. /**
  3019. * 实际用作默认页的文件(index.html / readme.md / 空)
  3020. * @member
  3021. * @type {string}
  3022. */
  3023. this["indexName"] = "";
  3024. }
  3025. if (!("startedAt" in $$source)) {
  3026. /**
  3027. * 启动时间
  3028. * @member
  3029. * @type {string}
  3030. */
  3031. this["startedAt"] = "";
  3032. }
  3033. if (!("error" in $$source)) {
  3034. /**
  3035. * 最近一次错误
  3036. * @member
  3037. * @type {string}
  3038. */
  3039. this["error"] = "";
  3040. }
  3041. if (!("connections" in $$source)) {
  3042. /**
  3043. * 累计请求次数
  3044. * @member
  3045. * @type {number}
  3046. */
  3047. this["connections"] = 0;
  3048. }
  3049. Object.assign(this, $$source);
  3050. }
  3051. /**
  3052. * Creates a new WebServiceInfo instance from a string or object.
  3053. * @param {any} [$$source = {}]
  3054. * @returns {WebServiceInfo}
  3055. */
  3056. static createFrom($$source = {}) {
  3057. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3058. return new WebServiceInfo(/** @type {Partial<WebServiceInfo>} */($$parsedSource));
  3059. }
  3060. }
  3061. /**
  3062. * YTDLPConfig 视频下载(yt-dlp)的配置
  3063. */
  3064. export class YTDLPConfig {
  3065. /**
  3066. * Creates a new YTDLPConfig instance.
  3067. * @param {Partial<YTDLPConfig>} [$$source = {}] - The source object to create the YTDLPConfig.
  3068. */
  3069. constructor($$source = {}) {
  3070. if (!("dir" in $$source)) {
  3071. /**
  3072. * 下载保存目录,空=程序当前工作目录
  3073. * @member
  3074. * @type {string}
  3075. */
  3076. this["dir"] = "";
  3077. }
  3078. if (!("mp3Quality" in $$source)) {
  3079. /**
  3080. * mp3 转换质量:0-9(VBR,0 最好)或 128K/192K/320K,默认 0
  3081. * @member
  3082. * @type {string}
  3083. */
  3084. this["mp3Quality"] = "";
  3085. }
  3086. Object.assign(this, $$source);
  3087. }
  3088. /**
  3089. * Creates a new YTDLPConfig instance from a string or object.
  3090. * @param {any} [$$source = {}]
  3091. * @returns {YTDLPConfig}
  3092. */
  3093. static createFrom($$source = {}) {
  3094. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3095. return new YTDLPConfig(/** @type {Partial<YTDLPConfig>} */($$parsedSource));
  3096. }
  3097. }
  3098. /**
  3099. * YTDLPInfo 描述本机 yt-dlp 的可用性,用于前端决定是否展示工具卡片。
  3100. */
  3101. export class YTDLPInfo {
  3102. /**
  3103. * Creates a new YTDLPInfo instance.
  3104. * @param {Partial<YTDLPInfo>} [$$source = {}] - The source object to create the YTDLPInfo.
  3105. */
  3106. constructor($$source = {}) {
  3107. if (!("available" in $$source)) {
  3108. /**
  3109. * PATH 中是否找到 yt-dlp
  3110. * @member
  3111. * @type {boolean}
  3112. */
  3113. this["available"] = false;
  3114. }
  3115. if (!("path" in $$source)) {
  3116. /**
  3117. * yt-dlp 可执行文件路径
  3118. * @member
  3119. * @type {string}
  3120. */
  3121. this["path"] = "";
  3122. }
  3123. if (!("version" in $$source)) {
  3124. /**
  3125. * 版本信息(yt-dlp --version 输出)
  3126. * @member
  3127. * @type {string}
  3128. */
  3129. this["version"] = "";
  3130. }
  3131. if (!("ffmpeg" in $$source)) {
  3132. /**
  3133. * PATH 中是否找到 ffmpeg(用于「下载转 mp3」)
  3134. * @member
  3135. * @type {boolean}
  3136. */
  3137. this["ffmpeg"] = false;
  3138. }
  3139. Object.assign(this, $$source);
  3140. }
  3141. /**
  3142. * Creates a new YTDLPInfo instance from a string or object.
  3143. * @param {any} [$$source = {}]
  3144. * @returns {YTDLPInfo}
  3145. */
  3146. static createFrom($$source = {}) {
  3147. let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
  3148. return new YTDLPInfo(/** @type {Partial<YTDLPInfo>} */($$parsedSource));
  3149. }
  3150. }
  3151. // Private type creation functions
  3152. const $$createType0 = $Create.Array($Create.Any);
  3153. const $$createType1 = LinkItem.createFrom;
  3154. const $$createType2 = $Create.Array($$createType1);
  3155. const $$createType3 = LinkGroup.createFrom;
  3156. const $$createType4 = $Create.Array($$createType3);
  3157. const $$createType5 = RepoItem.createFrom;
  3158. const $$createType6 = $Create.Array($$createType5);
  3159. const $$createType7 = CustomTab.createFrom;
  3160. const $$createType8 = $Create.Array($$createType7);
  3161. const $$createType9 = LocalTool.createFrom;
  3162. const $$createType10 = $Create.Array($$createType9);
  3163. const $$createType11 = QuickGroup.createFrom;
  3164. const $$createType12 = $Create.Array($$createType11);
  3165. const $$createType13 = ControlKeyConfig.createFrom;
  3166. const $$createType14 = $Create.Array($$createType13);
  3167. const $$createType15 = TickerConfig.createFrom;
  3168. const $$createType16 = PoemConfig.createFrom;
  3169. const $$createType17 = MouseAlertConfig.createFrom;
  3170. const $$createType18 = LocalSendConfig.createFrom;
  3171. const $$createType19 = CrocConfig.createFrom;
  3172. const $$createType20 = YTDLPConfig.createFrom;
  3173. const $$createType21 = MemosConfig.createFrom;
  3174. const $$createType22 = BrightnessConfig.createFrom;
  3175. const $$createType23 = GitLabConfig.createFrom;
  3176. const $$createType24 = ProxyConfig.createFrom;
  3177. const $$createType25 = ResourcesConfig.createFrom;
  3178. const $$createType26 = BiliDynamicItem.createFrom;
  3179. const $$createType27 = $Create.Array($$createType26);
  3180. const $$createType28 = $Create.Map($Create.Any, $Create.Any);
  3181. const $$createType29 = MinutePoint.createFrom;
  3182. const $$createType30 = $Create.Array($$createType29);
  3183. const $$createType31 = QuickItem.createFrom;
  3184. const $$createType32 = $Create.Array($$createType31);
  3185. const $$createType33 = ReleaseItem.createFrom;
  3186. const $$createType34 = $Create.Array($$createType33);
  3187. const $$createType35 = CommitItem.createFrom;
  3188. const $$createType36 = $Create.Array($$createType35);