Complete plugin API surface (0.11)¶
中文 · English
Generated by node tools/docs-api-surface.mjs from OnethuApi: 36 namespaces and 255 method entries, including nested calls. Type signatures are preserved. The permission column lists only directly recognized literal facade checks. “Inspect facade” does not mean unrestricted access. Platform capability, experience mode, authentication and server permissions can still limit a call. See the plugin guide.
session¶
| Call | Permission | Declaration |
|---|---|---|
session.status |
user:read |
status(): string; |
session.username |
user:read |
username(): string | null; |
user¶
| Call | Permission | Declaration |
|---|---|---|
user.info |
Inspect facade | info(): Promise<import("@onethu/core").BasicUserInfo>; |
info¶
| Call | Permission | Declaration |
|---|---|---|
info.schedule |
Inspect facade | schedule(startDate: string, endDate: string): Promise<import("@onethu/core").ScheduleEntry[]>; |
info.report |
Inspect facade | report(): Promise<import("@onethu/core").ReportRow[]>; |
info.exams |
Inspect facade | exams(): Promise<import("@onethu/core").ExamEntry[]>; |
info.deadlines |
Inspect facade | deadlines(): Promise<import("@onethu/core").DeadlineItem[]>; |
info.news |
Inspect facade | news(page?: number): Promise<import("@onethu/core").NewsItem[]>; |
info.newsDetail |
Inspect facade | newsDetail(xxid: string): Promise<import("@onethu/core").NewsDetail>; |
info.searchNews |
Inspect facade | searchNews(keyword: string, page?: number): Promise<import("@onethu/core").NewsItem[]>; |
info.newsSub |
Inspect facade | newsSub(page?: number, subscriptionId?: string): Promise<import("@onethu/core").NewsItem[]>; |
info.schoolCalendar |
Inspect facade | schoolCalendar(): Promise<import("@onethu/core").SchoolCalendarData>; |
info.classroomList |
Inspect facade | classroomList(): Promise<import("@onethu/core").Classroom[]>; |
info.classroomState |
Inspect facade | classroomState(building: string, week: number): Promise<import("@onethu/core").ClassroomStateResult>; |
info.invoices |
Inspect facade | invoices(page: number): Promise<import("@onethu/core").InvoicePage>; |
info.bankPayments |
Inspect facade | bankPayments(): Promise<import("@onethu/core").BankPaymentByMonth[]>; |
info.graduateIncome |
Inspect facade | graduateIncome(begin: string, end: string): Promise<import("@onethu/core").GraduateIncome[] | null>; |
info.dormScore |
Inspect facade | dormScore(): Promise<string | null>; |
info.physicalExam |
Inspect facade | physicalExam(): Promise<Array<[string, string]>>; |
info.assessmentList |
Inspect facade | assessmentList(): Promise<Array<[string, boolean, string]>>; |
learn¶
| Call | Permission | Declaration |
|---|---|---|
learn.semesters |
Inspect facade | semesters(): Promise<string[]>; |
learn.courses |
Inspect facade | courses(semesterId?: string): Promise<{ semester: string; courses: import("@onethu/core").CourseInfo[] }>; |
learn.homework |
Inspect facade | homework(semesterId?: string): Promise<Array<import("@onethu/core").Homework & { courseName: string }>>; |
learn.notifications |
Inspect facade | notifications(semesterId?: string): Promise<Array<import("@onethu/core").Notification & { courseName: string }>>; |
learn.files |
Inspect facade | files(courseId: string, semesterId?: string): Promise<import("@onethu/core").CourseFile[]>; |
learn.download |
Inspect facade | download(fileId: string, filename?: string): Promise<string>; |
learn.reply |
learn:write |
reply(wlkcid: string, threadId: string, content: string): Promise<void>; |
learn.post |
learn:write |
post(wlkcid: string, bqid: string, title: string, html: string): Promise<void>; |
learn.bbsBoards |
Inspect facade | bbsBoards(wlkcid: string): Promise<import("@onethu/core").LearnBbsBoard[]>; |
learn.bbsThreads |
Inspect facade | bbsThreads(wlkcid: string, opts?: { bqid?: string; kind?: "yb" | "jh" | "cy"; start?: number; length?: number }): Promise<{ total: number; threads: import("@onethu/core").LearnBbsThreadSummary[] }>; |
learn.bbsThread |
Inspect facade | bbsThread(wlkcid: string, threadId: string, bqId?: string): Promise<import("@onethu/core").LearnBbsThreadDetail>; |
learn.bbsPosts |
Inspect facade | bbsPosts(wlkcid: string, threadId: string, pageNum: number): Promise<import("@onethu/core").LearnBbsPost[]>; |
venue¶
| Call | Permission | Declaration |
|---|---|---|
venue.scenes |
venue:read |
scenes(): Promise<import("@onethu/core").VenueScene[]>; |
venue.currentPage |
venue:read |
currentPage(params: { sceneUuid: string; reserveDate: string; classTypeUuid?: string; siteType?: string }): Promise<import("@onethu/core").VenueSite[] | null>; |
venue.myRecords |
venue:read |
myRecords(page?: number): Promise<import("@onethu/core").VenueRecord[]>; |
venue.cancel |
venue:book |
cancel(resvUuid: string): Promise<void>; |
venue.jump |
venue:read |
jump(sceneUuid: string): string; |
xk¶
| Call | Permission | Declaration |
|---|---|---|
xk.search |
xk:read |
search(opts: { kcm?: string; kch?: string; teacher?: string; semester?: string; page?: number }): Promise<import("@onethu/core").XkSearchResult>; |
xk.catalog |
xk:read |
catalog(sem?: string): Promise<import("@onethu/core").XkCourse[]>; |
xk.selected |
xk:read |
selected(sem?: string): Promise<import("@onethu/core").SelectedCourse[]>; |
xk.detail |
xk:read |
detail(teacherId: string, code: string): Promise<import("@onethu/core").XkCourseDetail | null>; |
xk.reviews |
xk:read |
reviews(course: string, teacher?: string): Promise<{ course: string; teacher: string; count: number; avg: number; reviews: { count?: number; results: Array<Record<string, unknown>> }; } | null>; |
cal¶
| Call | Permission | Declaration |
|---|---|---|
cal.agenda |
cal:read |
agenda(startYmd?: string, endYmd?: string): Promise<Array<{ uid: string; title: string; date: string; start: string; end: string; allDay: boolean; location?: string; note?: string; source: "cloud" | "local"; }>>; |
cal.add |
cal:write |
add(title: string, dateYmd: string, startHm: string, endHm: string, opts?: { location?: string; note?: string; allDay?: boolean; local?: boolean; }): Promise<{ uid: string; where: "cloud" | "local" }>; |
cal.edit |
cal:write |
edit(uid: string, ch: { title?: string; date?: string; start?: string; end?: string; location?: string; note?: string; allDay?: boolean; toCloud?: boolean; }): Promise<{ uid: string; where: "cloud" | "local" }>; |
cal.remove |
cal:write |
remove(uid: string): Promise<{ removed: true }>; |
mail¶
| Call | Permission | Declaration |
|---|---|---|
mail.list |
Inspect facade | list(folder: string, limit: number): Promise<{ total: number; mails: Array<{ uid: number; subject: string; from: string; dateMs: number; seen: boolean }>; }>; |
mail.read |
Inspect facade | read(folder: string, uid: number): Promise<{ subject: string; from: string; to: string; dateMs: number; text: string; html: string | null; }>; |
mail.search |
Inspect facade | search(folder: string, query: string): Promise<Array<{ uid: number; subject: string; from: string; dateMs: number; seen: boolean }>>; |
mail.send |
Inspect facade | send(to: string, cc: string, subject: string, body: string): Promise<{ sent: true }>; |
cloud¶
| Call | Permission | Declaration |
|---|---|---|
cloud.repos |
Inspect facade | repos(): Promise<Array<{ id: string; name: string; mtime: number; size: number }>>; |
cloud.list |
Inspect facade | list(repoId: string, path: string): Promise<Array<{ name: string; kind: "dir" | "file"; size: number; mtime: number }>>; |
cloud.search |
Inspect facade | search(repoId: string, query: string): Promise<Array<{ name: string; kind: "dir" | "file"; size: number; mtime: number }>>; |
cloud.download |
Inspect facade | download(repoId: string, path: string): Promise<string>; |
cloud.upload |
Inspect facade | upload(repoId: string, parentDir: string, localPath: string, replace: boolean): Promise<{ size: number }>; |
cloud.share |
Inspect facade | share(repoId: string, path: string, expireDays: number): Promise<{ link: string; token: string }>; |
memory¶
| Call | Permission | Declaration |
|---|---|---|
memory.search |
Inspect facade | search(q: { query?: string; tags?: string[]; type?: string; folder?: string; limit?: number }): Promise<Array<{ permalink: string; title: string; type: string; tags: string[]; path: string; modified: string; score: number; snippet: string; via?: string; }>>; |
memory.read |
Inspect facade | read(permalink: string): Promise<string>; |
memory.list |
Inspect facade | list(opts?: { folder?: string; tag?: string }): Promise<Array<{ permalink: string; title: string; type: string; folder: string; tags: string[]; modified: string; }>>; |
memory.refresh |
Inspect facade | refresh(): Promise<{ count: number }>; |
memory.ready |
Inspect facade | ready(): Promise<boolean>; |
memory.write |
Inspect facade | write(input: { title: string; observations: Array<{ category: string; text: string; context?: string }>; relations?: Array<{ rel: string; target: string; context?: string }>; tags?: string[]; type?: string; folder?: string; origin?: string; }): Promise<{ permalink: string; path: string }>; |
memory.append |
Inspect facade | append(permalink: string, category: string, text: string, context?: string): Promise<{ ok: true }>; |
memory.edit |
Inspect facade | edit(permalink: string, find: string, replace: string): Promise<{ ok: true }>; |
memory.delete |
Inspect facade | delete(permalink: string, reason?: string): Promise<{ trashedTo: string }>; |
ext¶
| Call | Permission | Declaration |
|---|---|---|
ext.skillSearch |
ui |
skillSearch(query?: string): Promise<unknown>; |
ext.skillCompute |
ui |
skillCompute(code: string, input: unknown): Promise<unknown>; |
ext.skillRun |
ui |
skillRun(id: string, path: string, input: unknown): Promise<unknown>; |
ext.skillLoad |
ui |
skillLoad(id: string): Promise<unknown>; |
ext.skillReadFile |
ui |
skillReadFile(id: string, path: string): Promise<unknown>; |
ext.toolCreate |
ui |
toolCreate(name: string, description: string, steps: unknown): void; |
ext.toolList |
Inspect facade | toolList(): Array<{ id: string; name: string; description: string }>; |
ext.toolRun |
Inspect facade | toolRun(id: string): Promise<{ ok: boolean; error?: string }>; |
ext.toolDelete |
Inspect facade | toolDelete(id: string): void; |
ext.flowCreate |
ui |
flowCreate(name: string, trigger: unknown, steps: unknown): { id: string }; |
ext.flowList |
Inspect facade | flowList(): Array<{ id: string; name: string; trigger: unknown; enabled: boolean; lastRun?: number; lastOk?: boolean; lastError?: string }>; |
ext.flowRun |
ui |
flowRun(id: string): Promise<{ ok: boolean; error?: string }>; |
ext.flowUpdate |
ui |
flowUpdate(id: string, patch: { name?: string; trigger?: unknown; steps?: unknown; enabled?: boolean }): { ok: boolean }; |
ext.flowSetEnabled |
ui |
flowSetEnabled(id: string, on: boolean): { ok: boolean }; |
ext.flowDelete |
ui |
flowDelete(id: string): void; |
ext.widgetCreate |
ui |
widgetCreate(name: string, html: string, x?: number, y?: number): { id: string }; |
ext.widgetList |
Inspect facade | widgetList(): Array<{ id: string; name: string; createdAt: number }>; |
ext.widgetDelete |
ui |
widgetDelete(id: string): void; |
ext.onePageCreate |
ui |
onePageCreate(name: string, icon?: string): { id: string }; |
ext.onePageList |
Inspect facade | onePageList(): Array<{ id: string; name: string; kind: string; icon: string }>; |
ext.onePageDelete |
ui |
onePageDelete(id: string): { ok: boolean; reason?: string }; |
ext.onePageRename |
ui |
onePageRename(id: string, name: string): void; |
ext.onePageSetIcon |
ui |
onePageSetIcon(id: string, icon: string): { ok: boolean }; |
ext.onePageOpen |
ui |
onePageOpen(id: string): void; |
ext.onePageItems |
ui |
onePageItems(boardId: string): Array<{ id: string; kind: string; text?: string; x: number; y: number; w: number; h: number }>; |
ext.onePageAddItem |
Inspect facade | onePageAddItem(boardId: string, kind: string, payload: unknown, x: number, y: number, w?: number, h?: number): Promise<{ id: string }>; |
ext.onePageMoveItem |
ui |
onePageMoveItem(boardId: string, itemId: string, x: number, y: number): void; |
ext.onePageRemoveItem |
ui |
onePageRemoveItem(boardId: string, itemId: string): void; |
ext.onePageAddAtom |
ui |
onePageAddAtom(target: { to?: string; boardId?: string } | null, atomKey: string): { ok: boolean; boardId: string; added?: string; reason?: string }; |
ext.homeDock.set |
Inspect facade | set(pageId?: string, on?: boolean): { ok: boolean; pageId: string; label: string; docked: string[]; dockable: string[]; entries: Array<{ page: string; label: string; plugin: boolean }>; }; |
ext.workspaceList |
Inspect facade | workspaceList(): Array<{ id: string; name: string; live: boolean; tabs: number }>; |
ext.workspaceCreate |
ui |
workspaceCreate(name: string, tabIds?: unknown): { id: string }; |
ext.workspaceOpen |
ui |
workspaceOpen(id: string): boolean; |
ext.workspaceCollapse |
ui |
workspaceCollapse(id: string): boolean; |
ext.workspaceClose |
ui |
workspaceClose(id: string): boolean; |
ext.workspaceDissolve |
ui |
workspaceDissolve(id: string): boolean; |
ext.workspaceDelete |
ui |
workspaceDelete(id: string): boolean; |
ext.tabList |
Inspect facade | tabList(): Array<{ id: string; title: string; page: string }>; |
ext.tabOpen |
ui |
tabOpen(page: string): { id: string }; |
ext.tabClose |
ui |
tabClose(id: string): boolean; |
ext.tabDuplicate |
ui |
tabDuplicate(id: string): { id: string }; |
ext.tabFocus |
ui |
tabFocus(id: string): boolean; |
ext.wallpaperSet |
ui |
wallpaperSet(scope: string, ref: string | null): void; |
ext.wallpaperGet |
ui |
wallpaperGet(): { global: string | null }; |
ext.voiceSet |
ui |
voiceSet(patch: unknown): { autoSpeak: boolean; voiceName: string; pitch: number; rate: number; backend: string }; |
ext.voiceGet |
ui |
voiceGet(): { autoSpeak: boolean; voiceName: string; pitch: number; rate: number; backend: string }; |
ext.prefSet |
ui |
prefSet(patch: unknown): void; |
ext.prefGet |
ui |
prefGet(): { capsuleTap: string; voiceTarget: string }; |
ext.themeScheduleSet |
ui |
themeScheduleSet(opts: unknown): { followSystem: boolean; dayThemeId: string | null; nightThemeId: string | null }; |
ext.notifySet |
ui |
notifySet(patch: unknown): unknown; |
ext.notifyGet |
ui |
notifyGet(): unknown; |
ext.hwTimelineSet |
ui |
hwTimelineSet(minutes: number): { minutes: number }; |
ext.hwReminderSet |
ui |
hwReminderSet(id: string, minutes: number | null): void; |
ext.eventAdd |
ui |
eventAdd(ev: unknown): Promise<{ uid: string }>; |
ext.eventDelete |
ui |
eventDelete(uid: string): Promise<void>; |
ext.eventList |
ui |
eventList(): Array<{ uid: string; summary: string; start: number; end: number; allDay?: boolean }>; |
ext.pluginInstalledList |
plugins:call |
pluginInstalledList(): Promise<Array<{ id: string; name: string; enabled: boolean }>>; |
ext.pluginInstallFromRepo |
plugins:call |
pluginInstallFromRepo(repo: string, entry?: string): Promise<{ id: string; name: string }>; |
ext.pluginEnableToggle |
plugins:call |
pluginEnableToggle(id: string, on: boolean): Promise<void>; |
ext.pluginUninstall |
plugins:call |
pluginUninstall(id: string): Promise<void>; |
ext.themeApply |
ui |
themeApply(name: string, vars: unknown): { id: string }; |
ext.themeList |
Inspect facade | themeList(): Array<{ id: string; name: string; active: boolean }>; |
ext.themeActivate |
Inspect facade | themeActivate(id: string | null): void; |
ext.themeDelete |
Inspect facade | themeDelete(id: string): void; |
ext.phoneWidgetSet |
ui |
phoneWidgetSet(title: string, rows: unknown): { ok: boolean; rows: number }; |
kongjian¶
| Call | Permission | Declaration |
|---|---|---|
kongjian.page |
dorm:read |
page(opts?: { spaceId?: string; roomId?: string; date?: string }): Promise<import("@onethu/core").KongjianPage>; |
kongjian.my |
dorm:read |
my(): Promise<import("@onethu/core").KongjianRecord[]>; |
kongjian.book |
kongjian:book |
book(bookUrl: string, info_: { name: string; sid: string; tel: string; other: string }): Promise<string>; |
kongjian.cancel |
kongjian:book |
cancel(target: string): Promise<void>; |
visit¶
| Call | Permission | Declaration |
|---|---|---|
visit.fill |
nav |
fill(patch: Record<string, unknown>, opts?: { open?: boolean }): { ok: boolean; opened: boolean; filled: string[] }; |
gitlab¶
| Call | Permission | Declaration |
|---|---|---|
gitlab.projects |
Inspect facade | projects(page?: number): Promise<import("@onethu/info-lib").GitProject[]>; |
gitlab.starred |
Inspect facade | starred(page?: number): Promise<import("@onethu/info-lib").GitProject[]>; |
gitlab.search |
Inspect facade | search(search: string, page?: number): Promise<import("@onethu/info-lib").GitProject[]>; |
gitlab.project |
Inspect facade | project(id: number): Promise<import("@onethu/info-lib").GitProjectDetail>; |
gitlab.branches |
Inspect facade | branches(id: number): Promise<import("@onethu/info-lib").GitBranch[]>; |
gitlab.tree |
Inspect facade | tree(id: number, path: string, ref: string, page?: number): Promise<import("@onethu/info-lib").GitFile[]>; |
gitlab.file |
Inspect facade | file(id: number, sha: string): Promise<string>; |
gitlab.issues |
Inspect facade | issues(id: number, opts?: { state?: "opened" | "closed" | "all"; search?: string; page?: number }): Promise<import("@onethu/info-lib").GitIssue[]>; |
gitlab.issue |
Inspect facade | issue(id: number, iid: number): Promise<import("@onethu/info-lib").GitIssue>; |
gitlab.issueNotes |
Inspect facade | issueNotes(id: number, iid: number): Promise<import("@onethu/info-lib").GitNote[]>; |
gitlab.mergeRequests |
Inspect facade | mergeRequests(id: number, opts?: { state?: "opened" | "closed" | "all"; search?: string; page?: number }): Promise<import("@onethu/info-lib").GitMergeRequest[]>; |
gitlab.mergeRequest |
Inspect facade | mergeRequest(id: number, iid: number): Promise<import("@onethu/info-lib").GitMergeRequest>; |
gitlab.mergeRequestNotes |
Inspect facade | mergeRequestNotes(id: number, iid: number): Promise<import("@onethu/info-lib").GitNote[]>; |
gitlab.pipelines |
Inspect facade | pipelines(id: number, opts?: { ref?: string; page?: number }): Promise<import("@onethu/info-lib").GitPipeline[]>; |
gitlab.jobs |
Inspect facade | jobs(id: number, pipelineId: number): Promise<import("@onethu/info-lib").GitJob[]>; |
gitlab.jobTrace |
Inspect facade | jobTrace(id: number, jobId: number): Promise<string>; |
gitlab.createIssue |
Inspect facade | createIssue(id: number, title: string, description: string): Promise<import("@onethu/info-lib").GitIssue>; |
gitlab.comment |
Inspect facade | comment(kind: "issue" | "mr", id: number, iid: number, body: string): Promise<import("@onethu/info-lib").GitNote>; |
gitlab.updateComment |
Inspect facade | updateComment(kind: "issue" | "mr", id: number, iid: number, noteId: number, body: string): Promise<import("@onethu/info-lib").GitNote>; |
gitlab.discussions |
Inspect facade | discussions(kind: "issue" | "mr", id: number, iid: number, page?: number): Promise<import("@onethu/info-lib").GitDiscussion[]>; |
gitlab.reply |
Inspect facade | reply(kind: "issue" | "mr", id: number, iid: number, discussionId: string, body: string): Promise<import("@onethu/info-lib").GitNote>; |
gitlab.deleteComment |
Inspect facade | deleteComment(kind: "issue" | "mr", id: number, iid: number, discussionId: string, noteId: number): Promise<void>; |
gitlab.resolveDiscussion |
Inspect facade | resolveDiscussion(kind: "issue" | "mr", id: number, iid: number, discussionId: string, resolved: boolean): Promise<void>; |
gitlab.assignees |
Inspect facade | assignees(kind: "issue" | "mr", id: number, iid: number, userIds: number[]): Promise<void>; |
gitlab.requestCounts |
Inspect facade | requestCounts(kind: "issue" | "mr", id: number): Promise<{ opened: number; closed: number; all: number }>; |
gitlab.awards |
Inspect facade | awards(kind: "issue" | "mr", id: number, iid: number, noteId?: number): Promise<import("@onethu/info-lib").GitAward[]>; |
gitlab.react |
Inspect facade | react(kind: "issue" | "mr", id: number, iid: number, name: string, noteId?: number): Promise<import("@onethu/info-lib").GitAward>; |
gitlab.unreact |
Inspect facade | unreact(kind: "issue" | "mr", id: number, iid: number, awardId: number, noteId?: number): Promise<void>; |
gitlab.mergeRequestChanges |
Inspect facade | mergeRequestChanges(id: number, iid: number): Promise<import("@onethu/info-lib").GitMergeRequestChanges>; |
gitlab.createMergeRequest |
Inspect facade | createMergeRequest(id: number, sourceBranch: string, targetBranch: string, title: string, description: string): Promise<import("@onethu/info-lib").GitMergeRequest>; |
gitlab.mergeMergeRequest |
Inspect facade | mergeMergeRequest(id: number, iid: number): Promise<import("@onethu/info-lib").GitMergeRequest>; |
gitlab.setState |
Inspect facade | setState(kind: "issue" | "mr", id: number, iid: number, state: "close" | "reopen"): Promise<void>; |
coursex¶
| Call | Permission | Declaration |
|---|---|---|
coursex.semesters |
Inspect facade | semesters(): Promise<import("@onethu/core").CourseXSemester[]>; |
coursex.search |
Inspect facade | search(q: string, semester?: string): Promise<import("@onethu/core").CourseXSummary[]>; |
coursex.detail |
Inspect facade | detail(id: string): Promise<import("@onethu/core").CourseXDetail | { id: string; error: string } | null>; |
card¶
| Call | Permission | Declaration |
|---|---|---|
card.info |
Inspect facade | info(): Promise<import("@onethu/core").CardInfo>; |
card.transactions |
Inspect facade | transactions(start: string, end: string): Promise<import("@onethu/core").CardTransaction[]>; |
dorm¶
| Call | Permission | Declaration |
|---|---|---|
dorm.eleRemainder |
Inspect facade | eleRemainder(): Promise<import("@onethu/core").EleRemainder>; |
dorm.elePayRecord |
Inspect facade | elePayRecord(): Promise<import("@onethu/core").ElePayRecord[]>; |
library¶
| Call | Permission | Declaration |
|---|---|---|
library.list |
Inspect facade | list(): Promise<import("@onethu/core").Library[]>; |
library.floors |
Inspect facade | floors(libraryId: number, dateChoice?: 0 | 1): Promise<import("@onethu/core").LibraryFloor[]>; |
library.sections |
Inspect facade | sections(floor: { id: number; zhNameTrace: string }, dateChoice?: 0 | 1): Promise<import("@onethu/core").LibrarySection[]>; |
library.seats |
Inspect facade | seats(section: { id: number; zhNameTrace: string }, dateChoice?: 0 | 1): Promise<import("@onethu/core").LibrarySeat[]>; |
library.records |
Inspect facade | records(): Promise<import("@onethu/core").LibBookRecord[]>; |
library.book |
Inspect facade | book(seat: { id: number; type?: string }, sectionId: number, dateChoice?: 0 | 1): Promise<{ status?: number; msg?: string }>; |
library.cancel |
Inspect facade | cancel(recordId: string): Promise<void>; |
libroom¶
| Call | Permission | Declaration |
|---|---|---|
libroom.list |
Inspect facade | list(): Promise<import("@onethu/core").LibRoomInfo[]>; |
libroom.resources |
Inspect facade | resources(date: string, kindId: number): Promise<import("@onethu/core").LibRoomRes[]>; |
libroom.records |
Inspect facade | records(): Promise<import("@onethu/core").LibRoomBookRecord[]>; |
libroom.book |
Inspect facade | book(roomRes: import("@onethu/core").LibRoomRes, start: string, end: string, memberAccNos?: number[]): Promise<void>; |
libroom.cancel |
Inspect facade | cancel(uuid: string): Promise<void>; |
libroom.fuzzyMember |
Inspect facade | fuzzyMember(keyword: string): Promise<import("@onethu/core").LibFuzzySearchResult[]>; |
network¶
| Call | Permission | Declaration |
|---|---|---|
network.balance |
Inspect facade | balance(): Promise<import("@onethu/core").NetworkBalance>; |
network.devices |
Inspect facade | devices(): Promise<import("@onethu/core").NetworkDevice[]>; |
network.deviceCount |
Inspect facade | deviceCount(): Promise<number>; |
network.accountInfo |
Inspect facade | accountInfo(): Promise<import("@onethu/core").NetworkAccountInfo>; |
nav¶
| Call | Permission | Declaration |
|---|---|---|
nav.go |
nav |
go(page: string, params?: Record<string, unknown>): boolean; |
nav.searchAtoms |
nav |
searchAtoms(query: string, limit?: number): Promise<Array<{ kind: string; key: string; title: string; sub?: string; group: string }>>; |
nav.searchRow |
nav |
searchRow(ref: { routeId?: string; query?: string }): Promise<{ ok: boolean; id?: string; title?: string; breadcrumb?: string[]; landedOn?: string; note?: string; reason?: string; candidates?: Array<{ id: string; title: string }> }>; |
nav.routeTable |
nav |
routeTable(): Promise<Array<{ id: string; title: string; desc: string; aliases: string[]; breadcrumb: string[]; kind: string; tier: string; view: string; tab: string; section: string; note: string }>>; |
nav.openAtom |
nav |
openAtom(ref: { kind: string; key: string }): Promise<boolean>; |
nav.usage |
nav |
usage(limit?: number): Promise<{ total: number; kinds: number; top: Array<{ kind: string; key: string; title: string; group: string; n: number; last: number }>; recent: Array<{ kind: string; key: string; title: string; n: number; last: number }>; }>; |
nav.clearUsage |
nav |
clearUsage(): Promise<void>; |
ui¶
| Call | Permission | Declaration |
|---|---|---|
ui.toast |
ui |
toast(text: string): void; |
ui.confirm |
ui |
confirm( msg: string, opts?: { danger?: boolean; title?: string; confirmText?: string }, ): Promise<boolean>; |
ui.form |
ui |
form(title: string, fields: Array<{ key: string; label: string; kind?: "text" | "textarea" | "password" | "select"; placeholder?: string; default?: string; required?: boolean; options?: Array<{ value: string; label: string }>; }>): Promise<Record<string, string> | null>; |
ui.webModal |
webview |
webModal(url: string): Promise<void>; |
ui.clipboard.write |
ui |
write(text: string): Promise<void>; |
ui.clipboard.read |
clipboard:read |
read(): Promise<string>; |
ui.getTabRoot |
ui |
getTabRoot(pageKey: string): HTMLElement | null; |
ui.onTabReady |
ui |
onTabReady(pageKey: string, cb: (root: HTMLElement) => void): () => void; |
favorites¶
| Call | Permission | Declaration |
|---|---|---|
favorites.add |
ui |
add(key: string, folderId?: string): void; |
favorites.list |
ui |
list(): Array<{ folderId: string; folderTitle: string; key: string }>; |
favorites.addAtom |
ui |
addAtom(ref: { kind: string; key: string }, meta?: { title: string; sub?: string; group?: string; iconSvg?: string }, folderId?: string): void; |
favorites.kinds |
ui |
kinds(): Array<{ kind: string; group: string; source: "registered" | "static" }>; |
services¶
| Call | Permission | Declaration |
|---|---|---|
services.search |
info:read |
search(query: string, limit?: number): Promise<Array<{ id: string; name: string; department?: string; url: string; score: number }>>; |
services.open |
info:read |
open(service: { id?: string; name?: string; url?: string }): Promise<boolean>; |
notify¶
| Call | Permission | Declaration |
|---|---|---|
notify.send |
notify |
send(opts: { title: string; body?: string; afterSeconds?: number; key?: string; page?: string }): Promise<{ ok: boolean; id: string; reason?: string; }>; |
notify.cancel |
notify |
cancel(key: string): Promise<boolean>; |
notify.status |
notify |
status(request?: boolean): Promise<{ ok: boolean; backend: string; granted: boolean; exact: boolean; reason?: string }>; |
widget¶
| Call | Permission | Declaration |
|---|---|---|
widget.list |
widget |
list(): Array<{ id: string; title: string; slot: string | null }>; |
widget.slots |
widget |
slots(): number; |
widget.instances |
widget |
instances(): Promise<Array<{ id: string; shape: string; binding: unknown }>>; |
widget.getFallback |
widget |
getFallback(): Promise<unknown>; |
widget.setFallback |
widget |
setFallback(binding: { kind: "today" } | { kind: "folder"; folderId: string } | { kind: "detail" | "shortcut"; atom: { kind: string; key: string } } | null): Promise<boolean>; |
widget.bind |
widget |
bind(id: string, binding: { kind: "today" } | { kind: "folder"; folderId: string } | { kind: "detail" | "shortcut"; atom: { kind: string; key: string } } | null): Promise<boolean>; |
widget.unbind |
widget |
unbind(id: string): Promise<boolean>; |
storage¶
| Call | Permission | Declaration |
|---|---|---|
storage.get |
storage |
get<T = string>(key: string): T | null; |
storage.set |
storage |
set<T = string>(key: string, value: T): void; |
storage.keys |
storage |
keys(): string[]; |
storage.remove |
storage |
remove(key: string): void; |
settings¶
| Call | Permission | Declaration |
|---|---|---|
settings.get |
storage |
get(): Record<string, string>; |
net¶
| Call | Permission | Declaration |
|---|---|---|
net.fetch |
Inspect facade | fetch(url: string, init?: { method?: string; headers?: Record<string, string>; body?: string }): Promise<Response>; |
ws¶
| Call | Permission | Declaration |
|---|---|---|
ws.open |
Inspect facade | open(url: string, opts?: { headers?: Record<string, string>; connectTimeoutMs?: number }): Promise<string>; |
ws.send |
ws:external |
send(session: string, data: string, encoding?: "text" | "b64"): Promise<void>; |
ws.recv |
ws:external |
recv(session: string, timeoutMs?: number): Promise<{ kind: "text" | "binary" | "closed"; text?: string; b64?: string } | null>; |
ws.close |
ws:external |
close(session: string): Promise<void>; |
ws.closeAll |
ws:external |
closeAll(): Promise<void>; |
plugins¶
| Call | Permission | Declaration |
|---|---|---|
plugins.list |
plugins:call |
list(): Promise<Array<{ pluginId: string; pluginName: string; commands: Array<{ id: string; title: string; inputLabel?: string }> }>>; |
plugins.call |
plugins:call |
call(pluginId: string, cmdId: string, input?: string): Promise<unknown>; |
browser¶
| Call | Permission | Declaration |
|---|---|---|
browser.probe |
ui |
probe(): Promise<unknown>; |
browser.launch |
ui |
launch(mode: string): Promise<unknown>; |
browser.navigate |
ui |
navigate(url: string): Promise<void>; |
browser.eval |
ui |
eval(js: string): Promise<unknown>; |
browser.snapshot |
ui |
snapshot(): Promise<unknown>; |
browser.close |
ui |
close(): Promise<unknown>; |
ts¶
| Call | Permission | Declaration |
|---|---|---|
ts.status |
tsinghua:sdk |
status(): Promise<"ready" | "expired" | "logged-out">; |
ts.ensure |
tsinghua:sdk |
ensure(): Promise<void>; |
ts.username |
tsinghua:sdk |
username(): Promise<string | null>; |
ts.client |
tsinghua:sdk |
client(opts?: { mode?: "auto" | "webvpn" | "direct" }): { fetch(url: string, init?: { method?: string; headers?: Record<string, string>; body?: string }): Promise<Response>; resolve(url: string): string; }; |
llm¶
| Call | Permission | Declaration |
|---|---|---|
llm.chat |
llm |
chat(input: string): Promise<{ text: string; model: string; provider: string }>; |
llm.provider |
llm |
provider(): Promise<string>; |
theme¶
| Call | Permission | Declaration |
|---|---|---|
theme.list |
theme |
list(): Promise<Array<{ id: string; name: string; version: string; dark: boolean }>>; |
theme.active |
Inspect facade | active(): Promise<string | null>; |
theme.apply |
theme |
apply(id: string | null): Promise<void>; |
theme.schedule |
Inspect facade | schedule(): Promise<{ followSystem: boolean; dayThemeId: string | null; nightThemeId: string | null; systemDark: boolean }>; |
theme.setFollowSystem |
Inspect facade | setFollowSystem(on: boolean): Promise<void>; |
theme.setDayNight |
Inspect facade | setDayNight(dayId: string | null, nightId: string | null): Promise<void>; |
exthw¶
| Call | Permission | Declaration |
|---|---|---|
exthw.snapshot |
exthw:read |
snapshot(): Promise<{ items: Array<{ source: string; course: string; title: string; deadline: string | null; url: string | null; submitted: boolean; graded: boolean; score: number | null }>; errors: Record<string, string>; state: string; lastAt: number; configured: boolean; }>; |
exthw.refresh |
exthw:refresh |
refresh(): Promise<void>; |