An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:recycle: Migrate system API contracts https://github.com/siyuan-note/siyuan/issues/19378
Danieled397e840bb2
diff --git a/app/src/boot/globalEvent/commonHotkey.ts b/app/src/boot/globalEvent/commonHotkey.tsindex 5075aca678..9a7988a54b 100644--- a/app/src/boot/globalEvent/commonHotkey.ts+++ b/app/src/boot/globalEvent/commonHotkey.ts@@ -75,7 +75,7 @@ const matchKeymap = (keymap: Config.IKeys, key1: "general" | "editor", key2?: "greturn match;};-const hasKeymap = (keymap: Record<string, IKeymapItem>, key1: "general" | "editor", key2?: "general" | "insert" | "heading" | "list" | "table") => {+const hasKeymap = (keymap: Config.IKeys, key1: "general" | "editor", key2?: "general" | "insert" | "heading" | "list" | "table") => {let match = true;if (key1 === "editor") {if (Object.keys(window.siyuan.config.keymap[key1][key2]).length !== Object.keys(Constants.SIYUAN_KEYMAP[key1][key2]).length) {@@ -169,7 +169,7 @@ export const syncAppMenuShortcuts = (suspended = false) => {if (!isMac()) {return;}- const appMenuHotkeyItems: Record<string, IKeymapItem> = {+ const appMenuHotkeyItems: Config.IKeys = {config: window.siyuan.config.keymap.general.config,toggleWin: window.siyuan.config.keymap.general.toggleWin,undo: window.siyuan.config.keymap.editor.general.undo,diff --git a/app/src/config/systemConfig.test.ts b/app/src/config/systemConfig.test.tsnew file mode 100644index 0000000000..b93abe64d1--- /dev/null+++ b/app/src/config/systemConfig.test.ts@@ -0,0 +1,94 @@+import * as assert from "node:assert/strict";+import {test} from "node:test";+import {systemConfigCollections} from "./systemConfig";+import type {JSONValue} from "../types/api";+import {getDefaultKeymapBindings, getKeymapBindings, mergeKeymapDefault, setKeymapBindings} from "../util/keymapBindings";++test("system configuration keeps layout and shortcut extension data", () => {+ const width: number = null;+ const value = {+ keymap: {+ extension: {nested: [null, true, 1]},+ editor: {general: {undo: {custom: "", default: "key", extra: 7}}},+ plugin: {pluginName: {command: {custom: "key", bindings: {version: 2, keys: ["key"], extra: true}}}},+ },+ uiLayout: {+ hideDock: false,+ left: {data: [[{type: "plugin-dock", size: {width, height: 80}, extra: {key: 1}}]], pin: true},+ layout: {instance: "Custom", customModelType: "plugin-type", customModelData: [null, {private: "data"}]},+ extension: {nested: [false]},+ },+ };+ const before = JSON.stringify(value);+ const actual = systemConfigCollections(value);+ assert.equal(JSON.stringify(actual), before);+ assert.equal(JSON.stringify(value), before);+ assert.equal(actual.uiLayout, value.uiLayout);+});++test("desktop layout uses the existing falsy left default repair before validation", () => {+ for (const uiLayout of [null, {}, {left: false}, {left: 0}, {hideDock: "bad"}, {right: {}}]) {+ let calls = 0;+ const fallback: Config.IUiLayout = {left: {data: [], pin: false}, layout: {}};+ const actual = systemConfigCollections({keymap: {}, uiLayout}, () => {+ calls++;+ return fallback;+ });+ assert.equal(calls, 1);+ assert.equal(actual.uiLayout, fallback);+ }+});++test("empty and partial keymaps retain the existing later default repair", () => {+ for (const keymap of [null, {}, {general: null}, {general: false}, {editor: 0},+ {editor: {general: false, table: null}, plugin: {pluginName: {command: 0}}}]) {+ const before = JSON.stringify(keymap);+ const actual = systemConfigCollections({keymap, uiLayout: {}});+ assert.equal(JSON.stringify(keymap), before);+ assert.ok(actual.keymap == null || !actual.keymap.general);+ }+});++test("empty center layouts and legacy object children remain accepted", () => {+ const layouts: JSONValue[] = [{}, {instance: "Layout", children: {}},+ {instance: "Layout", children: [{instance: "Wnd", children: {instance: "Tab", children: {}}}]},+ {instance: "Editor", blockId: "id", action: ["future-action"], extra: [null]}];+ for (const layout of layouts) {+ const data: [] = [];+ const value = {keymap: {}, uiLayout: {left: {data}, layout}};+ const actual = systemConfigCollections(value);+ assert.equal(actual.uiLayout, value.uiLayout);+ }+});++test("obsolete scalar shortcuts survive until the existing key cleanup", () => {+ for (const obsolete of [true, 17, "legacy", ["old"]]) {+ const source = {general: {obsolete}, editor: {general: {obsolete}}};+ const before = JSON.stringify(source);+ const actual = systemConfigCollections({keymap: source, uiLayout: {}});+ for (const group of [actual.keymap.general, actual.keymap.editor.general]) {+ assert.ok(Object.prototype.hasOwnProperty.call(group, "obsolete"));+ assert.equal(group.obsolete.custom, undefined);+ assert.deepEqual(mergeKeymapDefault(group.obsolete, {default: "new"}),+ Object.assign({}, obsolete, {default: "new"}));+ delete group.obsolete;+ assert.deepEqual(group, {});+ }+ assert.equal(JSON.stringify(source), before);+ }+});++test("persisted shortcut binding inputs retain consumer normalization", () => {+ for (const version of [1, 2, "future", null]) {+ const bindings = {version, keys: [null, 17, "", "key", "key"], defaults: [false, "default", "default"]};+ const source = {general: {command: {custom: "custom", default: "fallback", bindings}}};+ const actual = systemConfigCollections({keymap: source, uiLayout: {}}).keymap.general.command;+ assert.deepEqual(actual, source.general.command);+ assert.deepEqual(getKeymapBindings(actual), version === 1 ? ["key"] : []);+ assert.deepEqual(getDefaultKeymapBindings(actual), version === 1 ? ["default"] : ["fallback"]);+ if (version !== 1) {+ assert.throws(() => setKeymapBindings(actual, ["replacement"]), /Unsupported/);+ assert.equal(actual.bindings, bindings);+ }+ }+});diff --git a/app/src/config/systemConfig.ts b/app/src/config/systemConfig.tsnew file mode 100644index 0000000000..df2ca251d5--- /dev/null+++ b/app/src/config/systemConfig.ts@@ -0,0 +1,167 @@+import type {SystemAppConf} from "../types/api";++const isObject = (value: unknown): value is {[key: string]: unknown} =>+ value !== null && typeof value === "object" && !Array.isArray(value);++const optionalString = (value: unknown) => value == null || typeof value === "string";+const optionalBoolean = (value: unknown) => value == null || typeof value === "boolean";+const optionalNumber = (value: unknown) => value == null || typeof value === "number";+const stringArray = (value: unknown) => value == null || Array.isArray(value) && value.every(item => typeof item === "string");++const isKey = (value: unknown): boolean => {+ if (value == null) {+ return true;+ }+ if (!isObject(value) || !optionalString(value.custom) || !optionalString(value.default)) {+ return false;+ }+ const bindings = value.bindings;+ return bindings == null || isObject(bindings) &&+ (bindings.priority == null || isObject(bindings.priority) && Object.values(bindings.priority).every(optionalNumber));+};++const isKeys = (value: unknown): boolean => value == null || isObject(value) && Object.values(value).every(isKey);++const repairFalsyKeymapGroups = (value: {[key: string]: unknown}) => {+ const keys = (group: unknown): unknown => {+ if (!group) {+ return group == null ? group : undefined;+ }+ if (!isObject(group)) {+ return group;+ }+ const result: {[key: string]: unknown} = {...group};+ for (const [name, item] of Object.entries(group)) {+ if (!item && item != null) {+ result[name] = undefined;+ } else if (item != null && !isObject(item)) {+ // 保留键名交给后续默认值合并及废弃键清理,标量不提供快捷键字段。+ result[name] = Object.assign({}, item);+ }+ }+ return result;+ };+ const editor = value.editor;+ const plugin = value.plugin;+ const plugins: {[key: string]: unknown} = {};+ if (isObject(plugin)) {+ for (const [name, group] of Object.entries(plugin)) {+ plugins[name] = keys(group);+ }+ }+ return {+ ...value,+ general: keys(value.general),+ editor: !editor ? editor || undefined : isObject(editor) ? {+ ...editor,+ general: keys(editor.general),+ heading: keys(editor.heading),+ insert: keys(editor.insert),+ list: keys(editor.list),+ table: keys(editor.table),+ } : editor,+ plugin: isObject(plugin) ? plugins : plugin,+ };+};++// 只核对前端会读取的快捷键字段,保留缺省分组、扩展字段与后续默认配置修复的时序。+const isKeymap = (value: unknown): value is Config.IKeymap => {+ if (value == null) {+ return true;+ }+ if (!isObject(value)) {+ return false;+ }+ const editor = value.editor;+ return isKeys(value.general) && (editor == null || isObject(editor) &&+ ["general", "heading", "insert", "list", "table"].every(key => isKeys(editor[key]))) &&+ (value.plugin == null || isObject(value.plugin) && Object.values(value.plugin).every(isKeys));+};++const isDock = (value: unknown): boolean => {+ if (value == null) {+ return true;+ }+ if (!isObject(value) || !optionalBoolean(value.pin) || !Array.isArray(value.data)) {+ return false;+ }+ return value.data.every(group => Array.isArray(group) && group.every(item => {+ if (!isObject(item) || !optionalString(item.hotkeyLangId) || !optionalString(item.icon) ||+ !optionalString(item.title) || !optionalString(item.type) || !optionalBoolean(item.show)) {+ return false;+ }+ return item.size == null || isObject(item.size) && optionalNumber(item.size.height) && optionalNumber(item.size.width);+ }));+};++const isUILayout = (value: unknown): value is Config.IUiLayout => {+ return value == null || isObject(value) && optionalBoolean(value.hideDock) &&+ [value.left, value.right, value.bottom].every(isDock) && isLayoutItem(value.layout);+};++const isSearchConfig = (value: unknown): boolean => {+ if (value == null) {+ return true;+ }+ if (!isObject(value)) {+ return false;+ }+ if (!["query", "hPath", "k", "name", "r"].every(key => optionalString(value[key])) ||+ !["group", "method", "page", "sort"].every(key => optionalNumber(value[key])) ||+ !["hasReplace", "removed", "sensitive"].every(key => optionalBoolean(value[key])) || !stringArray(value.idPath)) {+ return false;+ }+ const flags = (group: unknown) => group == null || isObject(group) && Object.values(group).every(optionalBoolean);+ return flags(value.types) && flags(value.replaceTypes) && (value.subTypes == null || isObject(value.subTypes) &&+ Object.values(value.subTypes).every(flags));+};++const isLayoutItem = (value: unknown): boolean => {+ if (value == null) {+ return true;+ }+ if (!isObject(value)) {+ return false;+ }+ if (!["size", "width", "height", "title", "lang", "icon", "docIcon", "activeTime", "blockId", "rootId", "notebookId", "path", "customModelType"].every(key => optionalString(value[key])) ||+ !["active", "pin", "isPreview"].every(key => optionalBoolean(value[key])) || !optionalNumber(value.page)) {+ return false;+ }+ if (value.children != null && !(Array.isArray(value.children) ? value.children.every(isLayoutItem) : isLayoutItem(value.children))) {+ return false;+ }+ if (value.instance === "Layout" || value.instance == null) {+ return (value.direction == null || value.direction === "tb" || value.direction === "lr") &&+ (value.resize == null || value.resize === "tb" || value.resize === "lr") &&+ (value.type == null || typeof value.type === "string" && ["normal", "center", "top", "bottom", "left", "right"].includes(value.type));+ }+ if (value.instance === "Wnd") {+ return value.resize == null || value.resize === "tb" || value.resize === "lr";+ }+ if (value.instance === "Backlink" || value.instance === "Outline") {+ return value.type == null || value.type === "pin" || value.type === "local";+ }+ if (value.instance === "Graph") {+ return value.type == null || value.type === "pin" || value.type === "local" || value.type === "global";+ }+ if (value.instance === "Search") {+ return isSearchConfig(value.config);+ }+ return typeof value.instance === "string" && ["Tab", "Editor", "Asset", "Custom", "Bookmark", "Files", "Tag"].includes(value.instance);+};++export const systemConfigCollections = (value: Pick<SystemAppConf, "keymap" | "uiLayout">,+ defaultLayout?: () => Config.IUiLayout): Pick<Config.IConf, "keymap" | "uiLayout"> => {+ const keymap = isObject(value.keymap) ? repairFalsyKeymapGroups(value.keymap) : value.keymap;+ if (!isKeymap(keymap)) {+ throw new Error("Invalid shortcut configuration");+ }+ const uiLayout = defaultLayout && (!isObject(value.uiLayout) || !value.uiLayout.left) ? defaultLayout() : value.uiLayout;+ if (!isUILayout(uiLayout)) {+ throw new Error("Invalid dock configuration");+ }+ return {keymap, uiLayout};+};++export const systemConfig = (value: SystemAppConf, defaultLayout?: () => Config.IUiLayout): Config.IConf =>+ ({...value, ...systemConfigCollections(value, defaultLayout)});diff --git a/app/src/config/tabs/ai/aiCapabilityPolicy.ts b/app/src/config/tabs/ai/aiCapabilityPolicy.tsindex 802a4422c0..5bb51c948c 100644--- a/app/src/config/tabs/ai/aiCapabilityPolicy.ts+++ b/app/src/config/tabs/ai/aiCapabilityPolicy.ts@@ -2,20 +2,20 @@ export type AgentApprovalDecision = "risk" | "allow" | "confirm";export type AgentActionApprovalDecision = "" | AgentApprovalDecision;export interface IAgentApprovalPolicy {- default: "risk" | "allow";+ default: string;overrides: Record<string, {- default: AgentActionApprovalDecision;- actions: Record<string, AgentApprovalDecision>;+ default: string;+ actions: Record<string, string>;}>;}-export const resolveCapabilityApproval = (policy: IAgentApprovalPolicy, id: string, action = ""): AgentApprovalDecision => {+export const resolveCapabilityApproval = (policy: IAgentApprovalPolicy, id: string, action = ""): string => {const override = policy.overrides[id];return override?.actions[action] || override?.default || policy.default;};export const getCapabilityActionApproval = (policy: IAgentApprovalPolicy, id: string, action: string):- AgentActionApprovalDecision => policy.overrides[id]?.actions[action] || "";+ string => policy.overrides[id]?.actions[action] || "";export const updateCapabilityApproval = (policy: IAgentApprovalPolicy, id: string,decision: AgentApprovalDecision): IAgentApprovalPolicy => {diff --git a/app/src/config/tabs/appTab.ts b/app/src/config/tabs/appTab.tsindex aaae17dc35..5ea3660026 100644--- a/app/src/config/tabs/appTab.ts+++ b/app/src/config/tabs/appTab.ts@@ -333,8 +333,7 @@ const registerAppDataGroup = (tab: SettingTabBuilder) => {afterMount: (root) => {root.querySelector("#importConf")?.addEventListener("change", (event: Event) => {const target = event.target as HTMLInputElement;- const formData = new FormData();- formData.append("file", target.files[0]);+ const formData = new ContractFormData({file: [target.files[0]]});fetchPost("/api/system/importConf", formData, (response) => {if (response.code !== 0) {showMessage(response.msg);diff --git a/app/src/config/tabs/appearanceTab.ts b/app/src/config/tabs/appearanceTab.tsindex aa3e9babdc..281d9fa1af 100644--- a/app/src/config/tabs/appearanceTab.ts+++ b/app/src/config/tabs/appearanceTab.ts@@ -15,6 +15,7 @@ import {getFrontend, isBrowser, isMobile, objEquals} from "../../util/functions"import {exitSiYuan} from "../../dialog/processSystem";import {isInMobileApp} from "../../protyle/util/compatibility";import {fetchPost, fetchSyncPost} from "../../util/fetch";+import {ContractFormData} from "../../util/contractFormData";import {openLink} from "../../editor/openLink";import {openSnippets} from "../util/snippets";import {getHostCapabilities} from "../../util/hostCapabilities";@@ -504,10 +505,12 @@ const mountAppearanceFontFamily = (root: HTMLElement, configKey: FontFamiliesConshowMessage(window.siyuan.languages.fontFileTip, 6000, "error");return;}- const formData = new FormData();- formData.append("file", file);+ const formData = new ContractFormData({file});fetchPost("/api/system/importCustomFont", formData, (response) => {- const font = response.data as ICustomFont;+ if (response.code !== 0) {+ return;+ }+ const font = response.data;invalidateCustomFonts();registerCustomFont(font);persistFonts([...selectedFonts.filter((item) => item.family !== font.family), font]);@@ -529,6 +532,9 @@ const mountAppearanceFontFamily = (root: HTMLElement, configKey: FontFamiliesCon"${x}", `<b>${escapeHtml(itemEl.dataset.name)}</b>`),() => {fetchPost("/api/system/removeCustomFont", {id}, (response) => {+ if (response.code !== 0) {+ return;+ }unregisterCustomFont(id);invalidateCustomFonts();if (response.data.appearance) {diff --git a/app/src/editor/assetOpen.ts b/app/src/editor/assetOpen.tsindex c015346dc7..1da93bf84a 100644--- a/app/src/editor/assetOpen.ts+++ b/app/src/editor/assetOpen.ts@@ -51,7 +51,7 @@ export const resolveAssetOpenGesture = (options: {};export const resolveAssetOpenAction = (- config: Config.IAssetOpen | undefined,+ config: {[key in keyof Config.IAssetOpen]?: string} | undefined,options: {altKey?: boolean,shiftKey?: boolean,@@ -86,7 +86,7 @@ export const resolveAvailableAssetOpenAction = (};export const getAssetOpenGestures = (- config: Config.IAssetOpen | undefined,+ config: {[key in keyof Config.IAssetOpen]?: string} | undefined,action: Config.TAssetOpenAction,options: {previewable: boolean,diff --git a/app/src/emoji/index.ts b/app/src/emoji/index.tsindex fcf6034d62..fc5479a523 100644--- a/app/src/emoji/index.ts+++ b/app/src/emoji/index.ts@@ -1,5 +1,6 @@import {getRandom, isMobile} from "../util/functions";import {fetchPost} from "../util/fetch";+import {ContractFormData} from "../util/contractFormData";import {Constants} from "../constants";/// #if !MOBILEimport {Files} from "../layout/dock/Files";@@ -1225,15 +1226,13 @@ export const openEmojiPanel = (return;}- const formData = new FormData();- formData.append("name", customIconNameElement.value);- if (networkURL) {- formData.append("url", networkURL);- } else {- formData.append("file", customIconFile);- }+ const formData = new ContractFormData({+ name: customIconNameElement.value,+ url: networkURL || undefined,+ file: networkURL ? undefined : customIconFile,+ });fetchPost("/api/system/addCustomEmoji", formData, (response) => {- if (typeof response?.data?.path !== "string") {+ if (response.code !== 0 || typeof response.data?.path !== "string") {showMessage(window.siyuan.languages.kernelFault8);return;}diff --git a/app/src/index.ts b/app/src/index.tsindex abcfeee0b7..ee9a4a2131 100644--- a/app/src/index.ts+++ b/app/src/index.ts@@ -1,4 +1,5 @@import {Constants} from "./constants";+import {systemConfig} from "./config/systemConfig";import {openStandaloneDatabaseItemByURI} from "./protyle/render/av/openStandaloneDatabaseItem";/// #if BROWSERimport "./util/iosWindowControls";@@ -308,7 +309,7 @@ export class App {fetchPost("/api/system/getConf", {}, async (response) => {await addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript");addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript");- window.siyuan.config = response.data.conf;+ window.siyuan.config = systemConfig(response.data.conf, () => structuredClone(Constants.SIYUAN_EMPTY_LAYOUT));await loadDesktopHostConnection();ensureUILayout();window.siyuan.isPublish = response.data.isPublish;diff --git a/app/src/layout/dock/hotkey.ts b/app/src/layout/dock/hotkey.tsindex d39d581966..54c648f659 100644--- a/app/src/layout/dock/hotkey.ts+++ b/app/src/layout/dock/hotkey.ts@@ -12,7 +12,7 @@ export const getDockKeymap = (dock: Config.IUILayoutDockTab) => {};interface IDockKeymap {- general: Config.IKeys;+ general?: Config.IKeys;plugin?: Config.IKeymapPlugin;}diff --git a/app/src/layout/util.ts b/app/src/layout/util.tsindex 4cca571ab6..5a939bbe4c 100644--- a/app/src/layout/util.ts+++ b/app/src/layout/util.ts@@ -198,10 +198,11 @@ export const saveLayout = () => {sessionStorage.setItem("layout", JSON.stringify(layoutJSON));} else {if (!window.siyuan.config.readonly) {- fetchPost("/api/system/setUILayout", {+ const request = {layout: layoutJSON,errorExit: false // 后台不接受该参数,用于请求发生错误时退出程序- });+ };+ fetchPost("/api/system/setUILayout", request);}}}@@ -251,10 +252,11 @@ export const exportLayout = async (options: {if (window.siyuan.config.readonly) {options.cb();} else {- fetchPost("/api/system/setUILayout", {+ const request = {layout: layoutJSON,errorExit: options.errorExit // 后台不接受该参数,用于请求发生错误时退出程序- }, () => {+ };+ fetchPost("/api/system/setUILayout", request, () => {options.cb();});}@@ -361,14 +363,14 @@ const removedTabs: Tab[] = [];export const JSONToCenter = (app: App,- json: Config.TUILayoutItem,+ json: Config.TPersistedUILayoutItem,layout?: Layout | Wnd | Tab | Model,) => {let child: Layout | Wnd | Tab | Model;if (json.instance === "Layout") {// TabA 向右分屏后向下分屏,依次关闭右侧、上侧分屏无法移除 layout 嵌套,故在此解决 https://github.com/siyuan-note/siyuan/issues/12196- while (json.children.length === 1 && json.children[0].instance === "Layout" &&- json.children[0].type === "normal" && json.children[0].children.length === 1) {+ while (Array.isArray(json.children) && json.children.length === 1 && json.children[0].instance === "Layout" &&+ json.children[0].type === "normal" && Array.isArray(json.children[0].children) && json.children[0].children.length === 1) {json.children = json.children[0].children;}if (!layout) {diff --git a/app/src/mobile/index.ts b/app/src/mobile/index.tsindex 382bfa30fa..f0ad20cb02 100644--- a/app/src/mobile/index.ts+++ b/app/src/mobile/index.ts@@ -1,5 +1,6 @@import {addScript, addScriptSync} from "../protyle/util/addScript";import {Constants} from "../constants";+import {systemConfig} from "../config/systemConfig";import {openStandaloneDatabaseItemByURI} from "../protyle/render/av/openStandaloneDatabaseItem";import {onMessage} from "./util/onMessage";import {genUUID} from "../util/genID";@@ -185,7 +186,7 @@ class App {fetchPost("/api/system/getConf", {}, async (confResponse) => {await addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript");addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript");- window.siyuan.config = confResponse.data.conf;+ window.siyuan.config = systemConfig(confResponse.data.conf);window.siyuan.isPublish = confResponse.data.isPublish;document.body.classList.toggle("body--android", Boolean(isInAndroid()));correctHotkey(siyuanApp);diff --git a/app/src/types/api/index.d.ts b/app/src/types/api/index.d.tsindex d889600f5f..909c14fd98 100644--- a/app/src/types/api/index.d.ts+++ b/app/src/types/api/index.d.ts@@ -1928,6 +1928,140 @@ export type SyncWebDAVData = { "webdav": SyncWebDAV | null; };export type SyncWebDAVInput = { "concurrentReqs"?: number | null; "endpoint"?: string | null; "password"?: string | null; "skipTlsVerify"?: boolean | null; "timeout"?: number | null; "username"?: string | null; };+export type SystemAPI = { "token": string; };++export type SystemAPITokenRequestInput = { "token": string; };++export type SystemAccessAuthCodeRequestInput = { "accessAuthCode": string; };++export type SystemAppConf = { "accessAuthCode": string; "ai": SettingAI | null; "api": SystemAPI | null; "appearance": SettingAppearance | null; "bazaar": SettingBazaar | null; "cloudRegion": number; "cookieKey": string; "dataIndexState": number; "editor": SettingEditor | null; "export": SettingExport | null; "fileTree": SettingFileTree | null; "flashcard": SettingFlashcard | null; "graph": SystemGraph | null; "keymap": { [key: string]: JSONValue } | null; "lang": string; "langs": Array<SystemLang | null> | null; "logLevel": string; "mcpOAuth": string; "notebookCrypto": SystemNotebookCrypto | null; "oidc": SystemOIDC | null; "onboarding": SystemOnboarding | null; "publish": SettingPublish | null; "readonly": boolean; "repo": SystemRepo | null; "search": SettingSearch | null; "secrets": SettingSecrets | null; "serverAddrs": Array<string> | null; "showChangelog": boolean; "snippet": SettingSnpt | null; "stat": SystemStat | null; "sync": SystemSync | null; "system": SystemSystem | null; "tag": SystemTag | null; "uiLayout": { [key: string]: JSONValue } | null; "userData": string; "variables": SettingVariables | null; };++export type SystemAppearanceData = { "appearance": SettingAppearance | null; };++export type SystemAppearanceModeRequestInput = { "mode": number; };++export type SystemArgon2Params = { "iterations": number; "keyLength": number; "memory": number; "parallelism": number; };++export type SystemChangelogData = { "html": string; "show": boolean; "version": string; };++export type SystemChangelogRequestInput = { "force"?: boolean | null; };++export type SystemCheckUpdateRequestInput = { "showMsg": boolean; };++export type SystemConfData = { "conf": SystemAppConf | null; "isPublish": boolean; "start": boolean; };++export type SystemCustomEmojiRequestInput = { "file"?: Blob; "name"?: string; "url"?: string; };++export type SystemCustomFont = { "aliases"?: Array<string>; "displayName": string; "family": string; "id": string; "spacing"?: string; "url": string; "weight": number; };++export type SystemD3 = { "arrow": boolean; "centerStrength": number; "collideRadius": number; "collideStrength": number; "lineOpacity": number; "linkDistance": number; "linkWidth": number; "nodeSize": number; };++export type SystemEmoji = { "description": string; "description_ja_jp": string; "description_zh_cn": string; "keywords": string; "unicode": string; };++export type SystemEmojiGroup = { "id": string; "items": Array<SystemEmoji | null> | null; "title": string; "title_ja_jp": string; "title_zh_cn": string; };++export type SystemExitData = { "closeTimeout": number; "installPkgPath"?: string; };++export type SystemExitRequestInput = { "execInstallPkg"?: number | null; "force"?: boolean | null; "setCurrentWorkspace"?: boolean | null; };++export type SystemExportConfData = { "name": string; "zip": string; };++export type SystemFont = { "aliases"?: Array<string>; "displayName": string; "family": string; "spacing"?: string; "weight": number; };++export type SystemGlobalGraph = { "d3": SystemD3 | null; "dailyNote": boolean; "minRefs": number; "type": SystemTypeFilter | null; };++export type SystemGraph = { "global": SystemGlobalGraph | null; "local": SystemLocalGraph | null; "maxBlocks": number; };++export type SystemImportConfRequestInput = { "file"?: Array<Blob>; };++export type SystemImportFileRequestInput = { "file"?: Blob; };++export type SystemLANSync = { "enabled": boolean; "maxConcurrentReqs": number; };++export type SystemLang = { "label": string; "name": string; };++export type SystemLocal = { "concurrentReqs": number; "endpoint": string; "timeout": number; };++export type SystemLocalGraph = { "d3": SystemD3 | null; "dailyNote": boolean; "type": SystemTypeFilter | null; };++export type SystemLoginAuthRequestInput = { "authCode": string; "captcha"?: string | null; "rememberMe"?: boolean | null; };++export type SystemMessageData = { "msg": string; };++export type SystemNetworkProxy = { "host": string; "port": string; "scheme": string; };++export type SystemNotebookCrypto = { "autoLockMinutes": number; "backupID"?: string; "checksum"?: string; "createdAt"?: number; "enabled": boolean; "historyKEKs"?: Array<string | null>; "kdfParams": SystemArgon2Params; "kekMAC"?: string; "kekVerifier": string | null; "masterSalt": string | null; "spec": number; "verifierNonce": string | null; };++export type SystemOIDC = { "allowAll": boolean; "claimRules": Array<SystemOIDCClaimRule | null> | null; "clientID": string; "clientSecret": string; "enabled": boolean; "issuerURL": string; "provider": string; "redirectURL": string; "scopes": Array<string> | null; };++export type SystemOIDCActivateData = { "config": SystemOIDC | null; "status": "completed"; };++export type SystemOIDCCallbackRequestInput = { "code"?: string | null; "error"?: string | null; "state"?: string | null; };++export type SystemOIDCClaimRule = { "claim": string; "operator": string; "values": Array<string> | null; };++export type SystemOIDCClaimRuleInput = { "claim"?: string | null; "operator"?: string | null; "values"?: Array<string> | null; };++export type SystemOIDCCompletedData = { "status": "completed"; "to": string; };++export type SystemOIDCMobileData = (SystemOIDCMobileValidationData & { "to"?: never; }) | (SystemOIDCMobileRedirectData & { "validation"?: never; });++export type SystemOIDCMobileRedirectData = { "to": string; };++export type SystemOIDCMobileRequestInput = { "callbackURL"?: string | null; };++export type SystemOIDCMobileValidationData = { "validation": true; };++export type SystemOIDCPendingData = { "status": "pending"; };++export type SystemOIDCPollData = (SystemOIDCPendingData & { "to"?: never; }) | SystemOIDCCompletedData;++export type SystemOIDCPollRequestInput = { "pollToken"?: string | null; };++export type SystemOIDCRequestInput = { "allowAll"?: boolean | null; "claimRules"?: Array<SystemOIDCClaimRuleInput | null> | null; "clientID"?: string | null; "clientSecret"?: string | null; "enabled"?: boolean | null; "issuerURL"?: string | null; "provider"?: string | null; "redirectURL"?: string | null; "scopes"?: Array<string> | null; };++export type SystemOIDCStartData = { "authURL": string; "expiresIn": number; "pollToken"?: string; };++export type SystemOIDCStartRequestInput = { "flow"?: string | null; "rememberMe"?: boolean | null; "to"?: string | null; };++export type SystemOIDCValidatePollData = { "status": "pending" | "completed"; };++export type SystemOnboarding = { "dismissed": boolean; "documentID": string; "newUser": boolean; "notebookID": string; "state": string; };++export type SystemPathData = { "path": string; };++export type SystemPathRequestInput = { "path": string; };++export type SystemRemoveCustomFontData = { "appearance": SettingAppearance | null; "editor": SettingEditor | null; "font": SystemCustomFont | null; };++export type SystemRemoveCustomFontRequestInput = { "id"?: string | null; };++export type SystemRepo = { "indexRetentionDays": number; "key": string | null; "retentionIndexesDaily": number; "syncIndexTiming": number; };++export type SystemS3 = { "accessKey": string; "bucket": string; "concurrentReqs": number; "endpoint": string; "pathStyle": boolean; "region": string; "secretKey": string; "skipTlsVerify": boolean; "timeout": number; };++export type SystemStat = { "assetsSize": number; "blockCount": number; "cAssetsSize": number; "cBlockCount": number; "cDataSize": number; "cTreeCount": number; "dataSize": number; "treeCount": number; };++export type SystemSync = { "assetDownloadMode": number; "cloudName": string; "enabled": boolean; "generateConflictDoc": boolean; "interval": number; "lan": SystemLANSync | null; "local": SystemLocal | null; "mode": number; "perception": boolean; "provider": number; "s3": SystemS3 | null; "stat": string; "synced": number; "webdav": SystemWebDAV | null; };++export type SystemSystem = { "appDir": string; "autoLaunch2": number; "confDir": string; "container": string; "dataDir": string; "disabledFeatures": Array<string> | null; "downloadInstallPkg": boolean; "homeDir": string; "id": string; "isMicrosoftStore": boolean; "kernelVersion": string; "lockScreenMode": number; "microsoftDefenderExcluded": boolean; "name": string; "networkProxy": SystemNetworkProxy | null; "networkServe": boolean; "networkServeTLS": boolean; "os": string; "osPlatform": string; "safeMode": boolean; "updateChannel"?: string; "workspaceDir": string; };++export type SystemTag = { "sort": number; };++export type SystemTypeFilter = { "blockquote": boolean; "callout": boolean; "code": boolean; "heading": boolean; "list": boolean; "listItem": boolean; "math": boolean; "paragraph": boolean; "super": boolean; "table": boolean; "tag": boolean; };++export type SystemUILayoutRequestInput = { "layout"?: { [key: string]: JSONValue } | null; };++export type SystemUIProcessRequestInput = { "pid"?: string | null; };++export type SystemWebDAV = { "concurrentReqs": number; "endpoint": string; "password": string; "skipTlsVerify": boolean; "timeout": number; "username": string; };++export type SystemWorkspace = { "closed": boolean; "path": string; };++export type SystemWorkspaceCheckData = { "isWorkspace": boolean; };++export type SystemZipData = { "zip": string; };+export type TagData = { "children": Array<TagData | null> | null; "count": number; "depth": number; "label": string; "name": string; "type": string; };export type TagSnapshotRequestInput = { "id": string; "name": string; };@@ -2009,10 +2143,6 @@ export type WorkspaceInfoData = { "siyuanVer": string; "workspaceDir": string; }export type ZipRequestInput = { "path": string; "zipPath": string; };export type APILegacyGETPath =- "/api/system/bootProgressSSE" |- "/api/system/getBootAppearance" |- "/api/system/getCaptcha" |- "/api/system/oidc/callback" |"/es/broadcast/subscribe" |"/ws/broadcast";@@ -2069,6 +2199,34 @@ export interface APIGETRoutes {response: { "code": 0; "data": BootProgressData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };body: "none";};+ "/api/system/bootProgressSSE": {+ request: EmptyRequestInput;+ response: string | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ output: "sse";+ sse: { events: { "": BootProgressData; }; };+ };+ "/api/system/getBootAppearance": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": SettingBootAppearance | null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ emptyResponseStatuses: [403];+ };+ "/api/system/getCaptcha": {+ request: EmptyRequestInput;+ response: Blob | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ output: "binary";+ emptyResponseStatuses: [500];+ contentVariants: [{"status":200,"contentType":"image/png"}];+ };+ "/api/system/oidc/callback": {+ request: SystemOIDCCallbackRequestInput;+ response: Blob | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ output: "binary";+ contentVariants: [{"status":200,"contentType":"text/html"},{"status":302,"contentType":"text/html"}];+ };"/api/system/version": {request: EmptyRequestInput;response: { "code": 0; "data": string; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };@@ -2112,46 +2270,6 @@ export interface APIGETRoutes {}export type APILegacyPOSTPath =- "/api/system/addCustomEmoji" |- "/api/system/checkUpdate" |- "/api/system/checkWorkspaceDir" |- "/api/system/createWorkspaceDir" |- "/api/system/dismissOnboarding" |- "/api/system/ensureOnboarding" |- "/api/system/exit" |- "/api/system/exportConf" |- "/api/system/exportLog" |- "/api/system/exportTLSCABundle" |- "/api/system/exportTLSCACert" |- "/api/system/getChangelog" |- "/api/system/getConf" |- "/api/system/getCustomFonts" |- "/api/system/getEmojiConf" |- "/api/system/getMobileWorkspaces" |- "/api/system/getSysFonts" |- "/api/system/getWorkspaces" |- "/api/system/importConf" |- "/api/system/importCustomFont" |- "/api/system/importTLSCABundle" |- "/api/system/loginAuth" |- "/api/system/logoutAuth" |- "/api/system/oidc/mobileCallback" |- "/api/system/oidc/poll" |- "/api/system/oidc/start" |- "/api/system/oidc/validate" |- "/api/system/oidc/validateActivate" |- "/api/system/oidc/validateCancel" |- "/api/system/oidc/validatePoll" |- "/api/system/removeCustomFont" |- "/api/system/removeWorkspaceDir" |- "/api/system/removeWorkspaceDirPhysically" |- "/api/system/setAPIToken" |- "/api/system/setAccessAuthCode" |- "/api/system/setAppearanceMode" |- "/api/system/setOIDC" |- "/api/system/setUILayout" |- "/api/system/setWorkspaceDir" |- "/api/system/uiproc" |"/api/transactions" |"/api/transactions/clearHistory" |"/api/transactions/redo" |@@ -4845,6 +4963,11 @@ export interface APIPOSTRoutes {response: { "code": 0; "data": SyncWebDAVData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };body: "json";};+ "/api/system/addCustomEmoji": {+ request: SystemCustomEmojiRequestInput;+ response: { "code": 0; "data": SystemPathData; "msg": string; } | { "code": -1 | 400 | 413; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "form";+ };"/api/system/addMicrosoftDefenderExclusion": {request: EmptyRequestInput;response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };@@ -4855,31 +4978,176 @@ export interface APIPOSTRoutes {response: { "code": 0; "data": BootProgressData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };body: "none";};+ "/api/system/checkUpdate": {+ request: SystemCheckUpdateRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/system/checkWorkspaceDir": {+ request: SystemPathRequestInput;+ response: { "code": 0; "data": SystemWorkspaceCheckData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };"/api/system/clearTempFiles": {request: EmptyRequestInput;response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };body: "none";};+ "/api/system/createWorkspaceDir": {+ request: SystemPathRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };"/api/system/currentTime": {request: EmptyRequestInput;response: { "code": 0; "data": number; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };body: "none";};+ "/api/system/dismissOnboarding": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": SystemOnboarding | null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/system/ensureOnboarding": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": SystemOnboarding | null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/system/exit": {+ request: SystemExitRequestInput;+ response: { "code": 0; "data": SystemExitData; "msg": string; } | { "code": -1 | 1 | 2; "data": ({ "closeTimeout": number; } & { "installPkgPath"?: never; }) | null | SystemExitData; "msg": string; };+ body: "json";+ };+ "/api/system/exportConf": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": SystemExportConfData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/system/exportLog": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": SystemZipData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/system/exportTLSCABundle": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": SystemPathData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/system/exportTLSCACert": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": SystemPathData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/system/getChangelog": {+ request: SystemChangelogRequestInput;+ response: { "code": 0; "data": SystemChangelogData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "legacyOptional";+ };+ "/api/system/getConf": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": SystemConfData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/system/getCustomFonts": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": Array<SystemCustomFont | null> | null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/system/getEmojiConf": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": Array<SystemEmojiGroup | null> | null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/system/getMobileWorkspaces": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": Array<string> | null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };"/api/system/getNetwork": {request: EmptyRequestInput;response: { "code": 0; "data": NetworkData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };body: "none";};+ "/api/system/getSysFonts": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": Array<SystemFont | null> | null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };"/api/system/getWorkspaceInfo": {request: EmptyRequestInput;response: { "code": 0; "data": WorkspaceInfoData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };body: "none";};+ "/api/system/getWorkspaces": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": Array<SystemWorkspace | null> | null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };"/api/system/ignoreAddMicrosoftDefenderExclusion": {request: EmptyRequestInput;response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };body: "none";};+ "/api/system/importConf": {+ request: SystemImportConfRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "multipart";+ };+ "/api/system/importCustomFont": {+ request: SystemImportFileRequestInput;+ response: { "code": 0; "data": SystemCustomFont | null; "msg": string; } | { "code": -1 | 400 | 413; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "multipart";+ };+ "/api/system/importTLSCABundle": {+ request: SystemImportFileRequestInput;+ response: { "code": 0; "data": SystemMessageData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "multipart";+ };+ "/api/system/loginAuth": {+ request: SystemLoginAuthRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1 | 1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/system/logoutAuth": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1 | 1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/system/oidc/mobileCallback": {+ request: SystemOIDCMobileRequestInput;+ response: { "code": 0; "data": SystemOIDCMobileData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "structJSON";+ };+ "/api/system/oidc/poll": {+ request: SystemOIDCPollRequestInput;+ response: { "code": 0; "data": SystemOIDCPollData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "structJSON";+ };+ "/api/system/oidc/start": {+ request: SystemOIDCStartRequestInput;+ response: { "code": 0; "data": SystemOIDCStartData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "structJSON";+ };+ "/api/system/oidc/validate": {+ request: SystemOIDCRequestInput;+ response: { "code": 0; "data": SystemOIDCStartData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "structJSON";+ };+ "/api/system/oidc/validateActivate": {+ request: SystemOIDCPollRequestInput;+ response: { "code": 0; "data": SystemOIDCActivateData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "structJSON";+ };+ "/api/system/oidc/validateCancel": {+ request: SystemOIDCPollRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "structJSON";+ };+ "/api/system/oidc/validatePoll": {+ request: SystemOIDCPollRequestInput;+ response: { "code": 0; "data": SystemOIDCValidatePollData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "structJSON";+ };"/api/system/rebuildDataIndex": {request: EmptyRequestInput;response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };@@ -4890,6 +5158,36 @@ export interface APIPOSTRoutes {response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };body: "none";};+ "/api/system/removeCustomFont": {+ request: SystemRemoveCustomFontRequestInput;+ response: { "code": 0; "data": SystemRemoveCustomFontData; "msg": string; } | { "code": -1 | 400 | 404; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/system/removeWorkspaceDir": {+ request: SystemPathRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/system/removeWorkspaceDirPhysically": {+ request: SystemPathRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/system/setAPIToken": {+ request: SystemAPITokenRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/system/setAccessAuthCode": {+ request: SystemAccessAuthCodeRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/system/setAppearanceMode": {+ request: SystemAppearanceModeRequestInput;+ response: { "code": 0; "data": SystemAppearanceData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };"/api/system/setAutoLaunch": {request: AutoLaunchRequestInput;response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };@@ -4920,11 +5218,32 @@ export interface APIPOSTRoutes {response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };body: "json";};+ "/api/system/setOIDC": {+ request: SystemOIDCRequestInput;+ response: { "code": 0; "data": SystemOIDC | null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "structJSON";+ };+ "/api/system/setUILayout": {+ request: SystemUILayoutRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };"/api/system/setUpdateChannel": {request: UpdateChannelRequestInput;response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };body: "json";};+ "/api/system/setWorkspaceDir": {+ request: SystemPathRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/system/uiproc": {+ request: SystemUIProcessRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ emptyResponseStatuses: [200];+ };"/api/system/vacuumDataIndex": {request: EmptyRequestInput;response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };diff --git a/app/src/types/config.d.ts b/app/src/types/config.d.tsindex 9185823233..5f6478e452 100644--- a/app/src/types/config.d.ts+++ b/app/src/types/config.d.ts@@ -24,7 +24,7 @@ declare namespace Config {/*** Access authorization code*/- accessAuthCode: TAccessAuthCode;+ accessAuthCode: string;oidc: IOIDC;ai: IAI;api: IAPI;@@ -46,7 +46,7 @@ declare namespace Config {* User interface language* Same as {@link IAppearance.lang}*/- lang: TLang;+ lang: string;/*** List of supported languages*/@@ -58,9 +58,9 @@ declare namespace Config {/*** Log level*/- logLevel: TLogLevel;+ logLevel: string;onboarding: {- state: "pending" | "notebook-created" | "completed";+ state: string;newUser: boolean;dismissed: boolean;notebookID: string;@@ -116,13 +116,13 @@ declare namespace Config {export interface IOIDCClaimRule {claim: string;- operator: "equals" | "contains";+ operator: string;values: string[];}export interface IOIDC {enabled: boolean;- provider: "custom" | "google" | "microsoft" | "github";+ provider: string;issuerURL: string;clientID: string;clientSecret: string;@@ -162,17 +162,17 @@ declare namespace Config {userEnabled: string[];};approvalPolicy: {- default: "risk" | "allow";+ default: string;overrides: Record<string, {- default: "" | "risk" | "confirm" | "allow";- actions: Record<string, "risk" | "confirm" | "allow">;+ default: string;+ actions: Record<string, string>;}>;};}export interface ICapabilityPolicy {- default: "allow" | "deny";- overrides: Record<string, "allow" | "deny">;+ default: string;+ overrides: Record<string, string>;}/**@@ -190,7 +190,7 @@ declare namespace Config {requestTimeout: number;size: string;quality: string;- outputFormat: "png" | "jpeg" | "webp";+ outputFormat: string;}/**@@ -215,7 +215,7 @@ declare namespace Config {endpoint: string;apiKey: string;name: string;- requestFormat: "cohere" | "dashscope";+ requestFormat: string;timeout: number;candidateCount: number;}@@ -287,7 +287,7 @@ declare namespace Config {export interface IAppearance {/** 背景渐变,未配置时根据工作空间名称自动配色 */bodyGradient?: {- mode: "auto" | "custom" | "off";+ mode: string;light: {color: string; opacity: number};dark: {color: string; opacity: number};};@@ -330,7 +330,7 @@ declare namespace Config {/*** The language used by the current user*/- lang: TLang;+ lang: string;/*** List of installed light themes*/@@ -521,7 +521,7 @@ declare namespace Config {/*** Asset opening behavior*/- assetOpen: IAssetOpen;+ assetOpen: {[K in keyof IAssetOpen]: string};/*** Whether to allow to execute javascript in the SVG@@ -909,7 +909,7 @@ declare namespace Config {* Whether to close all tabs when starting*/closeTabsOnStart: boolean;- tabStartupMode: 0 | 1 | 2;+ tabStartupMode: number;/*** The storage path of the new document*/@@ -1185,88 +1185,88 @@ declare namespace Config {* SiYuan keymap related configuration*/export interface IKeymap {- editor: IKeymapEditor;- general: IKeymapGeneral;- plugin: IKeymapPlugin;+ editor?: IKeymapEditor;+ general?: IKeymapGeneral;+ plugin?: IKeymapPlugin;}/*** SiYuan editor shortcut keys*/export interface IKeymapEditor {- general: IKeymapEditorGeneral;- heading: IKeymapEditorHeading;- insert: IKeymapEditorInsert;- list: IKeymapEditorList;- table: IKeymapEditorTable;+ general?: IKeymapEditorGeneral;+ heading?: IKeymapEditorHeading;+ insert?: IKeymapEditorInsert;+ list?: IKeymapEditorList;+ table?: IKeymapEditorTable;}/*** SiYuan editor general shortcut keys*/export interface IKeymapEditorGeneral extends IKeys {- ai: IKey;- alignCenter: IKey;- alignLeft: IKey;- alignRight: IKey;- attr: IKey;- backlinks: IKey;- collapse: IKey;- foldChildHeadings: IKey;- foldSiblingHeadings: IKey;- foldRecursive: IKey;- copyBlockEmbed: IKey;- copyBlockRef: IKey;- copyHPath: IKey;- copyID: IKey;- copyPlainText: IKey;- copyRichText: IKey;- copyProtocol: IKey;- copyProtocolInMd: IKey;- copyText: IKey;- duplicate: IKey;- exitFocus: IKey;- focusBreadcrumb: IKey;- expand: IKey;- expandDown: IKey;- expandUp: IKey;- fullscreen: IKey;- graphView: IKey;- hLayout: IKey;- insertAfter: IKey;- insertBefore: IKey;- insertBottom: IKey;- insertRight: IKey;- insertSuperBlockLeft: IKey;- insertSuperBlockRight: IKey;- jumpToParentNext: IKey;- moveToDown: IKey;- moveToUp: IKey;- netAssets2LocalAssets: IKey;- netImg2LocalAsset: IKey;- newContentFile: IKey;- newNameFile: IKey;- newNameSettingFile: IKey;- openBy: IKey;- optimizeTypography: IKey;- outline: IKey;- editMode: IKey;- quickMakeCard: IKey;- redo: IKey;- refPopover: IKey;- refresh: IKey;- refTab: IKey;- rename: IKey;- scrollPageDownWithoutMovingCaret: IKey;- scrollPageUpWithoutMovingCaret: IKey;- selectToPageEnd: IKey;- selectToPageStart: IKey;- showInFolder: IKey;- spaceRepetition: IKey;- switchReadonly: IKey;- switchAdjust: IKey;- undo: IKey;- vLayout: IKey;+ ai?: IKey;+ alignCenter?: IKey;+ alignLeft?: IKey;+ alignRight?: IKey;+ attr?: IKey;+ backlinks?: IKey;+ collapse?: IKey;+ foldChildHeadings?: IKey;+ foldSiblingHeadings?: IKey;+ foldRecursive?: IKey;+ copyBlockEmbed?: IKey;+ copyBlockRef?: IKey;+ copyHPath?: IKey;+ copyID?: IKey;+ copyPlainText?: IKey;+ copyRichText?: IKey;+ copyProtocol?: IKey;+ copyProtocolInMd?: IKey;+ copyText?: IKey;+ duplicate?: IKey;+ exitFocus?: IKey;+ focusBreadcrumb?: IKey;+ expand?: IKey;+ expandDown?: IKey;+ expandUp?: IKey;+ fullscreen?: IKey;+ graphView?: IKey;+ hLayout?: IKey;+ insertAfter?: IKey;+ insertBefore?: IKey;+ insertBottom?: IKey;+ insertRight?: IKey;+ insertSuperBlockLeft?: IKey;+ insertSuperBlockRight?: IKey;+ jumpToParentNext?: IKey;+ moveToDown?: IKey;+ moveToUp?: IKey;+ netAssets2LocalAssets?: IKey;+ netImg2LocalAsset?: IKey;+ newContentFile?: IKey;+ newNameFile?: IKey;+ newNameSettingFile?: IKey;+ openBy?: IKey;+ optimizeTypography?: IKey;+ outline?: IKey;+ editMode?: IKey;+ quickMakeCard?: IKey;+ redo?: IKey;+ refPopover?: IKey;+ refresh?: IKey;+ refTab?: IKey;+ rename?: IKey;+ scrollPageDownWithoutMovingCaret?: IKey;+ scrollPageUpWithoutMovingCaret?: IKey;+ selectToPageEnd?: IKey;+ selectToPageStart?: IKey;+ showInFolder?: IKey;+ spaceRepetition?: IKey;+ switchReadonly?: IKey;+ switchAdjust?: IKey;+ undo?: IKey;+ vLayout?: IKey;}/**@@ -1282,69 +1282,69 @@ declare namespace Config {export interface IKey {/** 多快捷键配置,custom 保留第一项以兼容单快捷键调用方。 */bindings?: {- version: 1;- keys: string[];- defaults?: string[];+ version?: import("./api").JSONValue;+ keys?: import("./api").JSONValue;+ defaults?: import("./api").JSONValue;priority?: Record<string, number>;};/*** Custom shortcut key*/- custom: string;+ custom?: string;/*** Default shortcut key*/- default: string;+ default?: string;}/*** SiYuan editor heading shortcut keys*/export interface IKeymapEditorHeading extends IKeys {- heading1: IKey;- heading2: IKey;- heading3: IKey;- heading4: IKey;- heading5: IKey;- heading6: IKey;- paragraph: IKey;+ heading1?: IKey;+ heading2?: IKey;+ heading3?: IKey;+ heading4?: IKey;+ heading5?: IKey;+ heading6?: IKey;+ paragraph?: IKey;}/*** SiYuan editor insert shortcut keys*/export interface IKeymapEditorInsert extends IKeys {- appearance: IKey;- bold: IKey;- check: IKey;- clearInline: IKey;- code: IKey;+ appearance?: IKey;+ bold?: IKey;+ check?: IKey;+ clearInline?: IKey;+ code?: IKey;"inline-code": IKey;"inline-math": IKey;- italic: IKey;- kbd: IKey;- lastUsed: IKey;- link: IKey;- mark: IKey;- memo: IKey;- ref: IKey;- strike: IKey;- sub: IKey;- sup: IKey;- table: IKey;- tag: IKey;- underline: IKey;+ italic?: IKey;+ kbd?: IKey;+ lastUsed?: IKey;+ link?: IKey;+ mark?: IKey;+ memo?: IKey;+ ref?: IKey;+ strike?: IKey;+ sub?: IKey;+ sup?: IKey;+ table?: IKey;+ tag?: IKey;+ underline?: IKey;}/*** SiYuan editor list shortcut keys*/export interface IKeymapEditorList extends IKeys {- prependListItem: IKey;- appendListItem: IKey;- checkToggle: IKey;- indent: IKey;- outdent: IKey;+ prependListItem?: IKey;+ appendListItem?: IKey;+ checkToggle?: IKey;+ indent?: IKey;+ outdent?: IKey;}/**@@ -1353,90 +1353,90 @@ declare namespace Config {export interface IKeymapEditorTable extends IKeys {"delete-column": IKey;"delete-row": IKey;- insertColumnLeft: IKey;- insertColumnRight: IKey;- insertRowAbove: IKey;- insertRowBelow: IKey;- moveToDown: IKey;- moveToLeft: IKey;- moveToRight: IKey;- moveToUp: IKey;+ insertColumnLeft?: IKey;+ insertColumnRight?: IKey;+ insertRowAbove?: IKey;+ insertRowBelow?: IKey;+ moveToDown?: IKey;+ moveToLeft?: IKey;+ moveToRight?: IKey;+ moveToUp?: IKey;}/*** SiYuan general shortcut keys*/export interface IKeymapGeneral extends IKeys {- mainMenu: IKey;- commandPanel: IKey;- increaseEditorFontSize: IKey;- decreaseEditorFontSize: IKey;- resetEditorFontSize: IKey;- editReadonly: IKey;- syncNow: IKey;- enterBack: IKey;- enter: IKey;- goForward: IKey;- goBack: IKey;- newFile: IKey;- search: IKey;- globalSearch: IKey;- stickSearch: IKey;- replace: IKey;- closeTab: IKey;- agentChat: IKey;- agentSend: IKey;- fileTree: IKey;- outline: IKey;- bookmark: IKey;- tag: IKey;- dailyNote: IKey;- inbox: IKey;- backlinks: IKey;- graphView: IKey;- globalGraph: IKey;- riffCard: IKey;- config: IKey;- dataHistory: IKey;- toggleWin: IKey;- lockScreen: IKey;- recentDocs: IKey;- goToTab1: IKey;- goToTab2: IKey;- goToTab3: IKey;- goToTab4: IKey;- goToTab5: IKey;- goToTab6: IKey;- goToTab7: IKey;- goToTab8: IKey;- goToTab9: IKey;- goToTabNext: IKey;- goToTabPrev: IKey;- goToEditTabNext: IKey;- goToEditTabPrev: IKey;- recentClosed: IKey;- move: IKey;- selectOpen1: IKey;- switchLeftDock: IKey;- switchRightDock: IKey;- switchBottomDock: IKey;- toggleLeftDockPanel: IKey;- toggleRightDockPanel: IKey;- toggleBottomDockPanel: IKey;- toggleDock: IKey;- splitLR: IKey;- splitMoveR: IKey;- splitTB: IKey;- splitMoveB: IKey;- closeOthers: IKey;- closeAll: IKey;- closeUnmodified: IKey;- closeLeft: IKey;- closeRight: IKey;- tabToWindow: IKey;- addToDatabase: IKey;- unsplit: IKey;- unsplitAll: IKey;+ mainMenu?: IKey;+ commandPanel?: IKey;+ increaseEditorFontSize?: IKey;+ decreaseEditorFontSize?: IKey;+ resetEditorFontSize?: IKey;+ editReadonly?: IKey;+ syncNow?: IKey;+ enterBack?: IKey;+ enter?: IKey;+ goForward?: IKey;+ goBack?: IKey;+ newFile?: IKey;+ search?: IKey;+ globalSearch?: IKey;+ stickSearch?: IKey;+ replace?: IKey;+ closeTab?: IKey;+ agentChat?: IKey;+ agentSend?: IKey;+ fileTree?: IKey;+ outline?: IKey;+ bookmark?: IKey;+ tag?: IKey;+ dailyNote?: IKey;+ inbox?: IKey;+ backlinks?: IKey;+ graphView?: IKey;+ globalGraph?: IKey;+ riffCard?: IKey;+ config?: IKey;+ dataHistory?: IKey;+ toggleWin?: IKey;+ lockScreen?: IKey;+ recentDocs?: IKey;+ goToTab1?: IKey;+ goToTab2?: IKey;+ goToTab3?: IKey;+ goToTab4?: IKey;+ goToTab5?: IKey;+ goToTab6?: IKey;+ goToTab7?: IKey;+ goToTab8?: IKey;+ goToTab9?: IKey;+ goToTabNext?: IKey;+ goToTabPrev?: IKey;+ goToEditTabNext?: IKey;+ goToEditTabPrev?: IKey;+ recentClosed?: IKey;+ move?: IKey;+ selectOpen1?: IKey;+ switchLeftDock?: IKey;+ switchRightDock?: IKey;+ switchBottomDock?: IKey;+ toggleLeftDockPanel?: IKey;+ toggleRightDockPanel?: IKey;+ toggleBottomDockPanel?: IKey;+ toggleDock?: IKey;+ splitLR?: IKey;+ splitMoveR?: IKey;+ splitTB?: IKey;+ splitMoveB?: IKey;+ closeOthers?: IKey;+ closeAll?: IKey;+ closeUnmodified?: IKey;+ closeLeft?: IKey;+ closeRight?: IKey;+ tabToWindow?: IKey;+ addToDatabase?: IKey;+ unsplit?: IKey;+ unsplitAll?: IKey;}/**@@ -1811,7 +1811,7 @@ declare namespace Config {/*** 当前设备的资源下载模式,0:全部下载,1:按需下载。*/- assetDownloadMode: 0 | 1;+ assetDownloadMode: number;/*** Synchronization mode* - `0`: Not set@@ -1835,7 +1835,7 @@ declare namespace Config {* - `3`: Network storage service using WebDAV protocol* - `4`: Local file system*/- provider: 0 | 2 | 3 | 4;+ provider: number;s3: ISyncS3;/*** The prompt information of the last synchronization@@ -1982,7 +1982,7 @@ declare namespace Config {* - `harmony`: HarmonyOS device* - `std`: Desktop Electron environment*/- container: TSystemContainer;+ container: string;/*** The absolute path of the `data` directory of the current workspace*/@@ -1994,7 +1994,7 @@ declare namespace Config {/*** 更新通道*/- updateChannel: TUpdateChannel;+ updateChannel?: string;/*** The absolute path of the user's home directory for the current operating system user*/@@ -2039,7 +2039,7 @@ declare namespace Config {* - `linux`: Linux* - `windows`: Windows*/- os: TSystemOS;+ os: string;/*** Operating system platform name*/@@ -2090,7 +2090,7 @@ declare namespace Config {* - `https`: HTTPS* - `socks5`: SOCKS5*/- scheme: TSystemNetworkProxyScheme;+ scheme: string;}/**@@ -2134,14 +2134,14 @@ declare namespace Config {* SiYuan UI layout related configuration*/export interface IUiLayout {- bottom: IUILayoutDock;+ bottom?: IUILayoutDock;/*** Whether to hide the sidebar*/- hideDock: boolean;- layout: IUILayoutLayout;- left: IUILayoutDock;- right: IUILayoutDock;+ hideDock?: boolean;+ layout?: TPersistedUILayoutItem;+ left?: IUILayoutDock;+ right?: IUILayoutDock;}/**@@ -2151,11 +2151,11 @@ declare namespace Config {/*** Dock area list*/- data: Array<IUILayoutDockTab[]>;+ data?: Array<IUILayoutDockTab[]>;/*** Whether to pin the dock*/- pin: boolean;+ pin?: boolean;}/**@@ -2169,12 +2169,12 @@ declare namespace Config {/*** Tab icon ID*/- icon: string;+ icon?: string;/*** Whether to display the tab*/- show: boolean;- size: IUILayoutDockPanelSize;+ show?: boolean;+ size?: IUILayoutDockPanelSize;/*** Tab title*/@@ -2182,7 +2182,7 @@ declare namespace Config {/*** Tab type*/- type: TDock | string;+ type?: TDock | string;}/**@@ -2192,16 +2192,30 @@ declare namespace Config {/*** Tab height (unit: px)*/- height: number | null;+ height?: number | null;/*** Tab width (unit: px)*/- width: number | null;+ width?: number | null;}/*** SiYuan layout item*/+ export type TPersistedUILayoutItem = (+ ({instance?: "Layout"} & Partial<Pick<IUILayoutLayout, "direction" | "size" | "type" | "resize">>) |+ ({instance: "Wnd"} & Partial<Pick<IUILayoutWnd, "resize" | "width" | "height">>) |+ ({instance: "Tab"} & Partial<Pick<IUILayoutTab, "title" | "lang" | "icon" | "docIcon" | "pin" | "active" | "activeTime">>) |+ ({instance: "Editor"} & Partial<Pick<IUILayoutTabEditor, "blockId" | "rootId" | "notebookId">>) |+ ({instance: "Asset"} & Partial<Pick<IUILayoutTabAsset, "path" | "page">>) |+ ({instance: "Backlink"} & Partial<Pick<IUILayoutTabBacklink, "blockId" | "rootId" | "notebookId" | "type">>) |+ ({instance: "Graph"} & Partial<Pick<IUILayoutTabGraph, "blockId" | "rootId" | "notebookId" | "type">>) |+ ({instance: "Outline"} & Partial<Pick<IUILayoutTabOutline, "blockId" | "notebookId" | "type" | "isPreview">>) |+ ({instance: "Search"} & Partial<Pick<IUILayoutTabSearch, "config">>) |+ ({instance: "Custom"} & Partial<Pick<IUILayoutTabCustom, "customModelType" | "customModelData">>) |+ {instance: "Bookmark" | "Files" | "Tag"}+ ) & {children?: TPersistedUILayoutItem[] | TPersistedUILayoutItem};+export type TUILayoutItem = IUILayoutLayout| IUILayoutWnd| IUILayoutTabdiff --git a/app/src/util/bodyGradient.ts b/app/src/util/bodyGradient.tsindex cddeb78d43..7a2372db3e 100644--- a/app/src/util/bodyGradient.ts+++ b/app/src/util/bodyGradient.ts@@ -17,7 +17,7 @@ export const normalizeBodyGradient = (value?: {mode?: string; light?: IBodyGradi};};-export const getBodyGradientImage = (value: IBodyGradient | undefined, theme: "light" | "dark"): string => {+export const getBodyGradientImage = (value: Parameters<typeof normalizeBodyGradient>[0], theme: "light" | "dark"): string => {const config = normalizeBodyGradient(value);if (config.mode === "auto") {return "";diff --git a/app/src/util/keymapBindings.ts b/app/src/util/keymapBindings.tsindex 6d5dbade07..fca59dc851 100644--- a/app/src/util/keymapBindings.ts+++ b/app/src/util/keymapBindings.ts@@ -1,7 +1,9 @@+import type {JSONValue} from "../types/api";+export interface IShortcutBindings {- version: 1;- keys: string[];- defaults?: string[];+ version?: JSONValue;+ keys?: JSONValue;+ defaults?: JSONValue;priority?: Record<string, number>;}@@ -18,11 +20,11 @@ export const normalizeShortcutKey = (key: string, mac: boolean) => {export const getDefaultKeymapBindings = (item: IShortcutKeymap): string[] =>item.bindings?.version === 1 && Array.isArray(item.bindings.defaults) ?- [...new Set(item.bindings.defaults.filter(key => typeof key === "string" && key.length > 0))] :+ [...new Set(item.bindings.defaults.filter((key): key is string => typeof key === "string" && key.length > 0))] :item.default ? [item.default] : [];export interface IShortcutKeymap {- custom: string;+ custom?: string;default?: string;bindings?: IShortcutBindings;}@@ -35,7 +37,7 @@ export const getKeymapBindings = (item?: IShortcutKeymap): string[] => {if (item.bindings.version !== 1 || !Array.isArray(item.bindings.keys)) {return [];}- return [...new Set(item.bindings.keys.filter(key => typeof key === "string" && key.length > 0))];+ return [...new Set(item.bindings.keys.filter((key): key is string => typeof key === "string" && key.length > 0))];}return typeof item.custom === "string" && item.custom ? [item.custom] : [];};diff --git a/app/src/window/index.ts b/app/src/window/index.tsindex c9df56404d..42641d8737 100644--- a/app/src/window/index.ts+++ b/app/src/window/index.ts@@ -1,4 +1,5 @@import {Constants} from "../constants";+import {systemConfig} from "../config/systemConfig";import {Menus} from "../menus";import {Model} from "../layout/Model";import "../assets/scss/base.scss";@@ -212,7 +213,7 @@ class App {fetchPost("/api/system/getConf", {}, async (response) => {await addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript");addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript");- window.siyuan.config = response.data.conf;+ window.siyuan.config = systemConfig(response.data.conf, () => structuredClone(Constants.SIYUAN_EMPTY_LAYOUT));await loadDesktopHostConnection();ensureUILayout();setBodyHighlight();diff --git a/kernel/api/contract_system_test.go b/kernel/api/contract_system_test.gonew file mode 100644index 0000000000..bdc40c8414--- /dev/null+++ b/kernel/api/contract_system_test.go@@ -0,0 +1,205 @@+package api++import (+ "bytes"+ "context"+ "encoding/json"+ "io"+ "mime/multipart"+ "net/http"+ "net/http/httptest"+ "reflect"+ "strings"+ "testing"++ ginSessions "github.com/gin-contrib/sessions"+ "github.com/gin-contrib/sessions/cookie"+ "github.com/gin-gonic/gin"+ "github.com/siyuan-note/siyuan/kernel/apicontract"+ "github.com/siyuan-note/siyuan/kernel/conf"+ "github.com/siyuan-note/siyuan/kernel/model"+ "github.com/siyuan-note/siyuan/kernel/util"+)++func systemContractRequest(t *testing.T, method, route string, handler gin.HandlerFunc, body io.Reader) *httptest.ResponseRecorder {+ t.Helper()+ gin.SetMode(gin.TestMode)+ router := gin.New()+ router.Use(ginSessions.Sessions("system-contract", cookie.NewStore([]byte("system-contract-session-key"))))+ router.Handle(method, "/api/system/"+route, handler)+ recorder := httptest.NewRecorder()+ request := httptest.NewRequest(method, "/api/system/"+route, body)+ request.Header.Set("Content-Type", "application/json")+ router.ServeHTTP(recorder, request)+ requireAPIContract(t, method, "/api/system/"+route, recorder)+ return recorder+}++func TestAPIContractSystemCompleteConfiguration(t *testing.T) {+ for _, populated := range []bool{false, true} {+ source := new(model.AppConf)+ if populated {+ fillSettingPayload(reflect.ValueOf(source).Elem())+ }+ payload, err := systemConfPayload(source)+ if err != nil {+ t.Fatal(err)+ }+ before, _ := json.Marshal(source)+ after, _ := json.Marshal(payload)+ if !bytes.Equal(before, after) {+ t.Fatalf("complete configuration changed:\n%s\n%s", before, after)+ }+ body, err := json.Marshal(apicontract.Success(apicontract.SystemConfData{Conf: payload}))+ if err != nil {+ t.Fatal(err)+ }+ recorder := httptest.NewRecorder()+ recorder.Header().Set("Content-Type", "application/json")+ recorder.Write(body)+ requireAPIContract(t, "POST", "/api/system/getConf", recorder)+ }+ compareSettingPayload(t, "", systemOnboardingPayload)+ compareSettingPayload(t, "", systemFontPayload)+ compareSettingPayload(t, "", systemCustomFontPayload)+}++func TestAPIContractSystemOIDCStructCompatibility(t *testing.T) {+ for _, body := range []string{`null`, `{}`, `{"Scopes":null,"claimRules":[null,{"values":[null]}]}`, `{"provider":"google","unknown":1e1000}`, `{"clientID":17}`, `{"claimRules":{}}`, `{} {}`, ``} {+ before := conf.NewOIDC()+ beforeErr := json.NewDecoder(strings.NewReader(body)).Decode(before)+ request, err := apicontract.SystemSetOIDC.Decode(strings.NewReader(body))+ if err != nil {+ t.Fatal(err)+ }+ if (beforeErr == nil) != (request.ParseError() == nil) {+ t.Fatalf("OIDC struct binding changed for %s: %v / %v", body, beforeErr, request.ParseError())+ }+ if beforeErr == nil && !reflect.DeepEqual(before, model.SystemOIDCConfig(request.SystemOIDC)) {+ t.Fatalf("OIDC default, null or field matching changed for %s", body)+ }+ }+}++func TestAPIContractSystemExitCompatibility(t *testing.T) {+ previousClose, previousConf := closeSystem, model.Conf+ model.Conf = model.NewAppConf()+ t.Cleanup(func() { closeSystem, model.Conf = previousClose, previousConf })+ for _, code := range []int{0, 1, 2} {+ for _, body := range []string{`{}`, `{"force":true,"execInstallPkg":2.9,"setCurrentWorkspace":false}`} {+ called := false+ closeSystem = func(force, current bool, install int) (int, string) {+ called = true+ if body == `{}` && (force || !current || install != 0) || body != `{}` && (!force || current || install != 2) {+ t.Fatalf("exit defaults or numeric truncation changed: %v %v %d", force, current, install)+ }+ return code, "installer"+ }+ recorder := systemContractRequest(t, "POST", "exit", exit, strings.NewReader(body))+ var result struct {+ Code int `json:"code"`+ Data apicontract.SystemExitData `json:"data"`+ }+ if err := json.Unmarshal(recorder.Body.Bytes(), &result); err != nil || !called || result.Code != code || result.Data.InstallPkgPath != "installer" || result.Data.CloseTimeout != 0 {+ t.Fatalf("exit response changed: %s (%v)", recorder.Body.String(), err)+ }+ }+ }+}++func TestAPIContractSystemAuthenticationAdmission(t *testing.T) {+ previousConf, previousWrong, previousContainer, previousReadonly := model.Conf, util.WrongAuthCount, util.Container, util.ReadOnly+ model.Conf = model.NewAppConf()+ model.Conf.AccessAuthCode = "correct-password"+ t.Cleanup(func() {+ model.Conf, util.WrongAuthCount, util.Container, util.ReadOnly = previousConf, previousWrong, previousContainer, previousReadonly+ })+ util.WrongAuthCount = 0+ recorder := systemContractRequest(t, "POST", "loginAuth", loginAuth, strings.NewReader(`{"authCode":"correct-password","captcha":{},"rememberMe":"ignored"}`))+ if !strings.Contains(recorder.Body.String(), `"code":0`) {+ t.Fatalf("unused captcha and ignored rememberMe rejected: %s", recorder.Body.String())+ }+ util.WrongAuthCount = 100+ recorder = systemContractRequest(t, "POST", "loginAuth", loginAuth, strings.NewReader(`{"authCode":{}}`))+ if !strings.Contains(recorder.Body.String(), `"code":1`) {+ t.Fatalf("captcha admission must precede authCode decoding: %s", recorder.Body.String())+ }+ util.Container = util.ContainerDocker+ systemContractRequest(t, "POST", "setAccessAuthCode", setAccessAuthCode, &systemUnreadBody{t: t})+ util.ReadOnly = true+ systemContractRequest(t, "POST", "setUILayout", setUILayout, &systemUnreadBody{t: t})+ model.Conf.OIDC.Enabled = false+ systemContractRequest(t, "POST", "oidc/start", oidcStart, &systemUnreadBody{t: t})+}++type systemUnreadBody struct{ t *testing.T }++func (b *systemUnreadBody) Read([]byte) (int, error) {+ b.t.Fatal("admission read the request body")+ return 0, io.EOF+}++func TestAPIContractSystemRawResponses(t *testing.T) {+ previousConf := model.Conf+ model.Conf = model.NewAppConf()+ t.Cleanup(func() { model.Conf = previousConf })+ recorder := systemContractRequest(t, "GET", "getCaptcha", getCaptcha, nil)+ if recorder.Code != 200 || !bytes.HasPrefix(recorder.Body.Bytes(), []byte("\x89PNG\r\n\x1a\n")) {+ t.Fatalf("captcha is not PNG: %d %q", recorder.Code, recorder.Body.Bytes())+ }+ recorder = systemContractRequest(t, "GET", "getBootAppearance", getBootAppearance, nil)+ if recorder.Code != 403 || recorder.Body.Len() != 0 {+ t.Fatalf("remote boot appearance must be empty 403: %d %s", recorder.Code, recorder.Body.String())+ }+ recorder = systemContractRequest(t, "POST", "uiproc", addUIProcess, nil)+ if recorder.Code != 200 || recorder.Body.Len() != 0 {+ t.Fatalf("UI registration must remain empty 200: %d %s", recorder.Code, recorder.Body.String())+ }+ recorder = systemContractRequest(t, "GET", "oidc/callback", oidcCallback, nil)+ if !strings.HasPrefix(recorder.Header().Get("Content-Type"), "text/html") || recorder.Header().Get("Cache-Control") != "no-store" || !strings.Contains(recorder.Header().Get("Content-Security-Policy"), "frame-ancestors 'none'") {+ t.Fatalf("OIDC failure page headers changed: %v", recorder.Header())+ }+ ctx, cancel := context.WithCancel(context.Background())+ cancel()+ recorder = httptest.NewRecorder()+ c, _ := gin.CreateTestContext(recorder)+ c.Request = httptest.NewRequest(http.MethodGet, "/api/system/bootProgressSSE", nil).WithContext(ctx)+ bootProgressSSE(c)+ if !strings.HasPrefix(recorder.Body.String(), "data: ") || !strings.HasSuffix(recorder.Body.String(), "\n\n") {+ t.Fatalf("initial unnamed SSE frame was lost: %q", recorder.Body.String())+ }+ requireAPIContract(t, "GET", "/api/system/bootProgressSSE", recorder)+}++func TestAPIContractSystemUploadErrors(t *testing.T) {+ for _, test := range []struct {+ route string+ handler gin.HandlerFunc+ code int+ message string+ }{+ {"importConf", importConf, -1, "invalid upload file"},+ {"importCustomFont", importCustomFont, 400, "Field [file] must not be empty"},+ {"importTLSCABundle", importTLSCABundle, -1, "[file] is required: " + http.ErrMissingFile.Error()},+ {"addCustomEmoji", addCustomEmoji, 400, "field [file] or [url] must not be empty"},+ } {+ var body bytes.Buffer+ writer := multipart.NewWriter(&body)+ if err := writer.Close(); err != nil {+ t.Fatal(err)+ }+ recorder := httptest.NewRecorder()+ c, _ := gin.CreateTestContext(recorder)+ c.Request = httptest.NewRequest("POST", "/api/system/"+test.route, &body)+ c.Request.Header.Set("Content-Type", writer.FormDataContentType())+ test.handler(c)+ var result struct {+ Code int `json:"code"`+ Msg string `json:"msg"`+ }+ if err := json.Unmarshal(recorder.Body.Bytes(), &result); err != nil || result.Code != test.code || result.Msg != test.message {+ t.Fatalf("%s missing upload changed: %s (%v)", test.route, recorder.Body.String(), err)+ }+ requireAPIContract(t, "POST", "/api/system/"+test.route, recorder)+ }+}diff --git a/kernel/api/router.go b/kernel/api/router.goindex 142b7f27f7..303fcbe49d 100644--- a/kernel/api/router.go+++ b/kernel/api/router.go@@ -37,14 +37,14 @@ func ServeAPI(ginServer *gin.Engine) {ginServer.Handle("GET", "/api/system/version", version)ginServer.Handle("POST", "/api/system/version", version)ginServer.Handle("POST", "/api/system/currentTime", currentTime)- ginServer.Handle("POST", "/api/system/loginAuth", model.LoginAuth)- ginServer.Handle("POST", "/api/system/logoutAuth", model.LogoutAuth)- ginServer.Handle("GET", "/api/system/getCaptcha", model.GetCaptcha)- ginServer.Handle("POST", "/api/system/oidc/start", model.OIDCStart)- ginServer.Handle("GET", "/api/system/oidc/callback", model.OIDCCallback)- ginServer.Handle("POST", "/api/system/oidc/mobileCallback", model.OIDCMobileCallback)- ginServer.Handle("POST", "/api/system/oidc/poll", model.OIDCPoll)- ginServer.Handle("POST", "/api/system/oidc/validatePoll", model.OIDCValidatePoll)+ ginServer.Handle("POST", "/api/system/loginAuth", loginAuth)+ ginServer.Handle("POST", "/api/system/logoutAuth", logoutAuth)+ ginServer.Handle("GET", "/api/system/getCaptcha", getCaptcha)+ ginServer.Handle("POST", "/api/system/oidc/start", oidcStart)+ ginServer.Handle("GET", "/api/system/oidc/callback", oidcCallback)+ ginServer.Handle("POST", "/api/system/oidc/mobileCallback", oidcMobileCallback)+ ginServer.Handle("POST", "/api/system/oidc/poll", oidcPoll)+ ginServer.Handle("POST", "/api/system/oidc/validatePoll", oidcValidatePoll)ginServer.Handle("GET", "/api/ai/mcp/oauth/callback/:flowID", mcpOAuthCallback)// 需要鉴权@@ -55,9 +55,9 @@ func ServeAPI(ginServer *gin.Engine) {ginServer.Handle("POST", "/api/system/setAPIToken", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, setAPIToken)ginServer.Handle("POST", "/api/system/setAccessAuthCode", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, setAccessAuthCode)ginServer.Handle("POST", "/api/system/setOIDC", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, setOIDC)- ginServer.Handle("POST", "/api/system/oidc/validate", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, model.OIDCValidateStart)- ginServer.Handle("POST", "/api/system/oidc/validateActivate", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, model.OIDCValidateActivate)- ginServer.Handle("POST", "/api/system/oidc/validateCancel", model.CheckAuth, model.CheckAdminRole, model.OIDCValidateCancel)+ ginServer.Handle("POST", "/api/system/oidc/validate", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, oidcValidateStart)+ ginServer.Handle("POST", "/api/system/oidc/validateActivate", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, oidcValidateActivate)+ ginServer.Handle("POST", "/api/system/oidc/validateCancel", model.CheckAuth, model.CheckAdminRole, oidcValidateCancel)ginServer.Handle("POST", "/api/system/setFollowSystemLockScreen", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, setFollowSystemLockScreen)ginServer.Handle("POST", "/api/system/setNetworkServe", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, setNetworkServe)ginServer.Handle("POST", "/api/system/setNetworkServeTLS", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, setNetworkServeTLS)diff --git a/kernel/api/system.go b/kernel/api/system.goindex e2ea78f80c..1e3bcae124 100644--- a/kernel/api/system.go+++ b/kernel/api/system.go@@ -19,7 +19,6 @@ package apiimport ("bytes""encoding/json"- "errors""fmt""image""io"@@ -93,20 +92,13 @@ var getNetwork = contractHandler(apicontract.GetNetwork, func(c *gin.Context, rereturn apicontract.Success(apicontract.NetworkData{Proxy: proxy})})-func getChangelog(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var getChangelog = contractHandler(apicontract.SystemGetChangelog, func(c *gin.Context, request apicontract.SystemChangelogRequest) (ret apicontract.Response[apicontract.SystemChangelogData]) {+ ret = apicontract.Success(apicontract.SystemChangelogData{})- force := false- arg := map[string]any{}- if err := c.ShouldBindJSON(&arg); err == nil {- if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("force", &force, false, false)) {- return- }- }+ force := request.Force- data := map[string]any{"show": false, "html": "", "version": ""}- ret.Data = data+ data := apicontract.SystemChangelogData{}+ ret = apicontract.Success(data)changelogsDir := filepath.Join(util.WorkingDir, "changelogs")if !gulu.File.IsDir(changelogsDir) {@@ -147,11 +139,12 @@ func getChangelog(c *gin.Context) {htmlContent := luteEngine.MarkdownStr("", string(contentData))htmlContent = util.LinkTarget(htmlContent, "")- data["show"] = true- data["html"] = htmlContent- data["version"] = changelogVer- ret.Data = data-}+ data.Show = true+ data.HTML = htmlContent+ data.Version = changelogVer+ ret = apicontract.Success(data)+ return+})func getChangelogPath(changelogsDir, ver string) string {verDir := filepath.Join(changelogsDir, "v"+ver)@@ -189,48 +182,45 @@ func getLatestChangelog(changelogsDir, currentVer string) (ver, path string) {return}-func getEmojiConf(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var getEmojiConf = contractHandler(apicontract.SystemGetEmojiConf, func(c *gin.Context, request apicontract.EmptyRequest) (ret apicontract.Response[[]*apicontract.SystemEmojiGroup]) {+ ret = apicontract.Success(([]*apicontract.SystemEmojiGroup)(nil))builtConfPath := filepath.Join(util.AppearancePath, "emojis", "conf.json")data, err := os.ReadFile(builtConfPath)if err != nil {logging.LogErrorf("read emojis conf.json failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[[]*apicontract.SystemEmojiGroup](-1, err.Error())return}- var conf []map[string]any+ var conf []*apicontract.SystemEmojiGroupif err = gulu.JSON.UnmarshalJSON(data, &conf); err != nil {logging.LogErrorf("unmarshal emojis conf.json failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[[]*apicontract.SystemEmojiGroup](-1, err.Error())return}customConfDir := filepath.Join(util.DataDir, "emojis")- custom := map[string]any{- "id": "custom",- "title": "Custom",- "title_zh_cn": "自定义",- "title_ja_jp": "カスタム",- }- items := []map[string]any{}- custom["items"] = items+ custom := &apicontract.SystemEmojiGroup{+ ID: "custom",+ Title: "Custom",+ TitleZhCN: "自定义",+ TitleJaJP: "カスタム",+ }+ items := []*apicontract.SystemEmoji{}+ custom.Items = itemsif gulu.File.IsDir(customConfDir) {model.ClearCustomEmojis()readCustomEmojis(customConfDir, "", &items)}- custom["items"] = items- conf = append([]map[string]any{custom}, conf...)+ custom.Items = items+ conf = append([]*apicontract.SystemEmojiGroup{custom}, conf...)- ret.Data = conf+ ret = apicontract.Success(conf)return-}+})-func readCustomEmojis(rootDir, relativeDir string, items *[]map[string]any) {+func readCustomEmojis(rootDir, relativeDir string, items *[]*apicontract.SystemEmoji) {dir := filepath.Join(rootDir, filepath.FromSlash(relativeDir))customEmojis, err := os.ReadDir(dir)if err != nil {@@ -265,15 +255,15 @@ func readCustomEmojis(rootDir, relativeDir string, items *[]map[string]any) {}}-func appendCustomEmoji(name string, items *[]map[string]any) {+func appendCustomEmoji(name string, items *[]*apicontract.SystemEmoji) {ext := filepath.Ext(name)nameWithoutExt := strings.TrimSuffix(name, ext)- emoji := map[string]any{- "unicode": name,- "description": nameWithoutExt,- "description_zh_cn": nameWithoutExt,- "description_ja_jp": nameWithoutExt,- "keywords": nameWithoutExt,+ emoji := &apicontract.SystemEmoji{+ Unicode: name,+ Description: nameWithoutExt,+ DescriptionZhCN: nameWithoutExt,+ DescriptionJaJP: nameWithoutExt,+ Keywords: nameWithoutExt,}*items = append(*items, emoji)@@ -283,57 +273,51 @@ func appendCustomEmoji(name string, items *[]map[string]any) {const maxCustomEmojiSize = 10 * 1024 * 1024-func addCustomEmoji(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var addCustomEmoji = contractHandler(apicontract.SystemAddCustomEmoji, func(c *gin.Context, request apicontract.SystemCustomEmojiRequest) (ret apicontract.Response[apicontract.SystemPathData]) {+ ret = apicontract.Success(apicontract.SystemPathData{})- data, err := readCustomEmojiData(c)+ data, err := readCustomEmojiData(request)if err != nil {- ret.Code = http.StatusBadRequest- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemPathData](http.StatusBadRequest, err.Error())return}if len(data) > maxCustomEmojiSize {- ret.Code = http.StatusRequestEntityTooLarge- ret.Msg = "custom emoji file is too large"+ ret = apicontract.Failure[apicontract.SystemPathData](http.StatusRequestEntityTooLarge, "custom emoji file is too large")return}data, ext, err := normalizeCustomEmojiData(data)if err != nil {- ret.Code = http.StatusBadRequest- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemPathData](http.StatusBadRequest, err.Error())return}- relativePath, err := normalizeCustomEmojiPath(c.PostForm("name"), ext)+ relativePath, err := normalizeCustomEmojiPath(request.Name, ext)if err != nil {- ret.Code = http.StatusBadRequest- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemPathData](http.StatusBadRequest, err.Error())return}emojisDir := filepath.Join(util.DataDir, "emojis")emojiPath := util.GetUniqueFilename(filepath.Join(emojisDir, filepath.FromSlash(relativePath)))if err = os.MkdirAll(filepath.Dir(emojiPath), 0755); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemPathData](-1, err.Error())return}if err = filelock.WriteFile(emojiPath, data); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemPathData](-1, err.Error())return}model.IncSync()relativePath, _ = filepath.Rel(emojisDir, emojiPath)relativePath = filepath.ToSlash(relativePath)- ret.Data = map[string]any{"path": relativePath}-}+ ret = apicontract.Success(apicontract.SystemPathData{Path: relativePath})+ return+})-func readCustomEmojiData(c *gin.Context) ([]byte, error) {- fileHeader, fileErr := c.FormFile("file")- if fileErr == nil {+func readCustomEmojiData(request apicontract.SystemCustomEmojiRequest) ([]byte, error) {+ fileHeader := request.File+ if fileHeader != nil {file, err := fileHeader.Open()if err != nil {return nil, err@@ -342,7 +326,7 @@ func readCustomEmojiData(c *gin.Context) ([]byte, error) {return io.ReadAll(io.LimitReader(file, maxCustomEmojiSize+1))}- rawURL := strings.TrimSpace(c.PostForm("url"))+ rawURL := strings.TrimSpace(request.URL)if rawURL == "" {return nil, fmt.Errorf("field [file] or [url] must not be empty")}@@ -435,32 +419,24 @@ func normalizeCustomEmojiPath(name, ext string) (string, error) {return strings.Join(parts, "/"), nil}-func checkUpdate(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }+var checkUpdate = contractHandler(apicontract.SystemCheckUpdate, func(c *gin.Context, request apicontract.SystemCheckUpdateRequest) (ret apicontract.Response[apicontract.Null]) {+ ret = apicontract.Success(apicontract.Null{})- showMsg := arg["showMsg"].(bool)+ showMsg := request.ShowMsgmodel.CheckUpdate(showMsg)-}+ return+})-func exportLog(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var exportLog = contractHandler(apicontract.SystemExportLog, func(c *gin.Context, request apicontract.EmptyRequest) (ret apicontract.Response[apicontract.SystemZipData]) {+ ret = apicontract.Success(apicontract.SystemZipData{})zipPath := model.ExportSystemLog()- ret.Data = map[string]any{- "zip": zipPath,- }-}+ ret = apicontract.Success(apicontract.SystemZipData{Zip: zipPath})+ return+})-func exportConf(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var exportConf = contractHandler(apicontract.SystemExportConf, func(c *gin.Context, request apicontract.EmptyRequest) (ret apicontract.Response[apicontract.SystemExportConfData]) {+ ret = apicontract.Success(apicontract.SystemExportConfData{})logging.LogInfof("exporting conf...")@@ -468,23 +444,20 @@ func exportConf(c *gin.Context) {tmpDir := filepath.Join(util.TempDir, "export")if err := os.MkdirAll(tmpDir, 0755); err != nil {logging.LogErrorf("export conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemExportConfData](-1, err.Error())return}data, err := gulu.JSON.MarshalJSON(model.Conf)if err != nil {logging.LogErrorf("export conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemExportConfData](-1, err.Error())return}clonedConf := &model.AppConf{}if err = gulu.JSON.UnmarshalJSON(data, clonedConf); err != nil {logging.LogErrorf("export conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemExportConfData](-1, err.Error())return}@@ -566,68 +539,51 @@ func exportConf(c *gin.Context) {data, err = gulu.JSON.MarshalIndentJSON(clonedConf, "", " ")if err != nil {logging.LogErrorf("export conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemExportConfData](-1, err.Error())return}tmp := filepath.Join(tmpDir, name)if err = os.WriteFile(tmp, data, 0644); err != nil {logging.LogErrorf("export conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemExportConfData](-1, err.Error())return}zipFile, err := gulu.Zip.Create(tmp + ".zip")if err != nil {logging.LogErrorf("export conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemExportConfData](-1, err.Error())return}if err = zipFile.AddEntry(name, tmp); err != nil {logging.LogErrorf("export conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemExportConfData](-1, err.Error())return}if err = zipFile.Close(); err != nil {logging.LogErrorf("export conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemExportConfData](-1, err.Error())return}logging.LogInfof("exported conf")zipPath := "/export/" + name + ".zip"- ret.Data = map[string]any{- "name": name,- "zip": zipPath,- }-}+ ret = apicontract.Success(apicontract.SystemExportConfData{Name: name, Zip: zipPath})+ return+})-func importConf(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(200, ret)+var importConf = contractHandler(apicontract.SystemImportConf, func(c *gin.Context, request apicontract.SystemImportConfRequest) (ret apicontract.Response[apicontract.Null]) {+ ret = apicontract.Success(apicontract.Null{})logging.LogInfof("importing conf...")- form, err := c.MultipartForm()- if err != nil {- logging.LogErrorf("read upload file failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()- return- }-- files := form.File["file"]+ files := request.Fileif 1 != len(files) {- ret.Code = -1- ret.Msg = "invalid upload file"+ ret = apicontract.Failure[apicontract.Null](-1, "invalid upload file")return}@@ -635,8 +591,7 @@ func importConf(c *gin.Context) {fh, err := f.Open()if err != nil {logging.LogErrorf("read upload file failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}@@ -644,31 +599,27 @@ func importConf(c *gin.Context) {fh.Close()if err != nil {logging.LogErrorf("read upload file failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}importDir := filepath.Join(util.TempDir, "import")if err = os.MkdirAll(importDir, 0755); err != nil {logging.LogErrorf("import conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}writePath := filepath.Join(importDir, f.Filename)if !gulu.File.IsSubPath(importDir, writePath) {logging.LogErrorf("import path [%s] is not sub path of import dir [%s]", writePath, importDir)- ret.Code = -1- ret.Msg = "import path is not sub path of import dir"+ ret = apicontract.Failure[apicontract.Null](-1, "import path is not sub path of import dir")return}if err = os.WriteFile(writePath, data, 0644); err != nil {logging.LogErrorf("import conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}@@ -677,35 +628,30 @@ func importConf(c *gin.Context) {if strings.HasSuffix(strings.ToLower(writePath), ".zip") {if err = gulu.Zip.Unzip(writePath, tmpDir); err != nil {logging.LogErrorf("import conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}} else if strings.HasSuffix(strings.ToLower(writePath), ".json") {if err = gulu.File.CopyFile(writePath, filepath.Join(tmpDir, f.Filename)); err != nil {logging.LogErrorf("import conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())}} else {logging.LogErrorf("invalid conf package")- ret.Code = -1- ret.Msg = "invalid conf package"+ ret = apicontract.Failure[apicontract.Null](-1, "invalid conf package")return}entries, err := os.ReadDir(tmpDir)if err != nil {logging.LogErrorf("import conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}if 1 != len(entries) {logging.LogErrorf("invalid conf package")- ret.Code = -1- ret.Msg = "invalid conf package"+ ret = apicontract.Failure[apicontract.Null](-1, "invalid conf package")return}@@ -713,22 +659,19 @@ func importConf(c *gin.Context) {data, err = os.ReadFile(writePath)if err != nil {logging.LogErrorf("import conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}importedConf := model.NewAppConf()if err = gulu.JSON.UnmarshalJSON(data, importedConf); err != nil {logging.LogErrorf("import conf failed: %s", err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}preserveImportedAISecrets(importedConf.AI, model.Conf.AI)if err = validateAIProviderHeaders(importedConf.AI); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}if nil != importedConf.System && nil != model.Conf.System {@@ -753,7 +696,8 @@ func importConf(c *gin.Context) {model.Conf.Save()logging.LogInfof("imported conf")-}+ return+})func preserveImportedAISecrets(imported, current *conf.AI) {if imported == nil || current == nil {@@ -795,14 +739,12 @@ func preserveImportedAISecrets(imported, current *conf.AI) {}}-func getConf(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var getConf = contractHandler(apicontract.SystemGetConf, func(c *gin.Context, request apicontract.EmptyRequest) (ret apicontract.Response[apicontract.SystemConfData]) {+ ret = apicontract.Success(apicontract.SystemConfData{})maskedConf, err := model.GetMaskedConf()if err != nil {- ret.Code = -1- ret.Msg = "get conf failed: " + err.Error()+ ret = apicontract.Failure[apicontract.SystemConfData](-1, "get conf failed: "+err.Error())return}@@ -837,21 +779,20 @@ func getConf(c *gin.Context) {maskedConf.System.HomeDir = ""}- ret.Data = map[string]any{- "conf": maskedConf,- "start": !util.IsUILoaded,- "isPublish": isPublish,+ config, err := systemConfPayload(maskedConf)+ if err != nil {+ return apicontract.Failure[apicontract.SystemConfData](-1, "get conf failed: "+err.Error())}-}+ ret = apicontract.Success(apicontract.SystemConfData{Conf: config, Start: !util.IsUILoaded, IsPublish: isPublish})+ return+})-func ensureOnboarding(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var ensureOnboarding = contractHandler(apicontract.SystemEnsureOnboarding, func(c *gin.Context, request apicontract.EmptyRequest) (ret apicontract.Response[*apicontract.SystemOnboarding]) {+ ret = apicontract.Success((*apicontract.SystemOnboarding)(nil))onboarding, notebookCreated, err := model.EnsureOnboarding()if err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[*apicontract.SystemOnboarding](-1, err.Error())return}if notebookCreated {@@ -862,86 +803,61 @@ func ensureOnboarding(c *gin.Context) {util.PushEvent(evt)}}- ret.Data = onboarding-}--func dismissOnboarding(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)- ret.Data = model.DismissOnboarding()-}--func setUILayout(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+ ret = apicontract.Success(systemOnboardingPayload(onboarding))+ return+})- if util.ReadOnly {- return- }+var dismissOnboarding = contractHandler(apicontract.SystemDismissOnboarding, func(c *gin.Context, request apicontract.EmptyRequest) (ret apicontract.Response[*apicontract.SystemOnboarding]) {+ ret = apicontract.Success((*apicontract.SystemOnboarding)(nil))+ ret = apicontract.Success(systemOnboardingPayload(model.DismissOnboarding()))+ return+})- arg, ok := util.JsonArg(c, ret)- if !ok {- return+var setUILayout = contractHandler(apicontract.SystemSetUILayout, func(c *gin.Context, request apicontract.SystemUILayoutRequest) (ret apicontract.Response[apicontract.Null]) {+ if err := request.LayoutError(); err != nil {+ return apicontract.Failure[apicontract.Null](-1, err.Error())}+ ret = apicontract.Success(apicontract.Null{})- param, err := gulu.JSON.MarshalJSON(arg["layout"])+ param, err := gulu.JSON.MarshalJSON(request.Layout)if err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}uiLayout := &conf.UILayout{}if err = gulu.JSON.UnmarshalJSON(param, uiLayout); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}model.Conf.SetUILayout(uiLayout)model.Conf.Save()-}--func setAPIToken(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+ return+}, systemUILayoutPreflight)- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }+var setAPIToken = contractHandler(apicontract.SystemSetAPIToken, func(c *gin.Context, request apicontract.SystemAPITokenRequest) (ret apicontract.Response[apicontract.Null]) {+ ret = apicontract.Success(apicontract.Null{})- token := arg["token"].(string)+ token := request.Tokentoken = util.RemoveInvalid(token)token = strings.TrimSpace(token)// 仅校验新设置的 token,清空(禁用 API token 鉴权)不做长度限制 https://github.com/siyuan-note/siyuan/security/advisories/GHSA-m6w6-p7pc-fpg2if 0 < len(token) && 8 > len(token) {- ret.Code = -1- ret.Msg = model.Conf.Language(356)+ ret = apicontract.Failure[apicontract.Null](-1, model.Conf.Language(356))return}model.Conf.Api.Token = tokenmodel.Conf.Save()-}--func setAccessAuthCode(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- if util.ContainerDocker == util.Container {- ret.Code = -1- ret.Msg = "access auth code cannot be set in Docker container"- return- }+ return+})- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }+var setAccessAuthCode = contractHandler(apicontract.SystemSetAccessAuthCode, func(c *gin.Context, request apicontract.SystemAccessAuthCodeRequest) (ret apicontract.Response[apicontract.Null]) {+ ret = apicontract.Success(apicontract.Null{})- aac := arg["accessAuthCode"].(string)+ aac := request.AccessAuthCodemasked := model.MaskedAccessAuthCode == aacif masked {aac = model.Conf.AccessAuthCode@@ -953,15 +869,13 @@ func setAccessAuthCode(c *gin.Context) {aac = strings.TrimSpace(aac)if 0 < originalLen && 0 == len(aac) {- ret.Code = -1- ret.Msg = model.Conf.Language(287)+ ret = apicontract.Failure[apicontract.Null](-1, model.Conf.Language(287))return}// 仅校验新设置的密码,掩码回填的已有密码和清空(禁用锁屏)不做长度限制,避免用户被锁定 https://github.com/siyuan-note/siyuan/security/advisories/GHSA-w3xh-mmmh-r54vif !masked && 0 < len(aac) && 8 > len(aac) {- ret.Code = -1- ret.Msg = model.Conf.Language(355)+ ret = apicontract.Failure[apicontract.Null](-1, model.Conf.Language(355))return}if aac == "" {@@ -974,8 +888,7 @@ func setAccessAuthCode(c *gin.Context) {util.SiYuanAccessAuthCodeBypass)}if err != nil {- ret.Code = -1- ret.Msg = model.Conf.Language(369)+ ret = apicontract.Failure[apicontract.Null](-1, model.Conf.Language(369))logging.LogWarnf("reject clearing the last usable access authentication method [ip=%s]: %s", c.ClientIP(), err)return}@@ -993,16 +906,14 @@ func setAccessAuthCode(c *gin.Context) {util.ReloadUI()}()return-}+}, systemAccessAuthPreflight)-func setOIDC(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var setOIDC = contractHandler(apicontract.SystemSetOIDC, func(c *gin.Context, request apicontract.SystemOIDCRequest) (ret apicontract.Response[*apicontract.SystemOIDC]) {+ ret = apicontract.Success((*apicontract.SystemOIDC)(nil))- config := conf.NewOIDC()- if err := c.ShouldBindJSON(config); err != nil {- ret.Code = -1- ret.Msg = model.Conf.Language(369)+ config := model.SystemOIDCConfig(request.SystemOIDC)+ if err := request.ParseError(); err != nil {+ ret = apicontract.Failure[*apicontract.SystemOIDC](-1, model.Conf.Language(369))logging.LogWarnf("bind OIDC configuration failed [ip=%s]: %s", c.ClientIP(), err)return}@@ -1011,31 +922,29 @@ func setOIDC(c *gin.Context) {requireRemoteAuthentication := util.ContainerDocker == util.Container || !model.IsLocalRequest(c)if err := model.ValidateOIDCConfigurationChange(c.Request.Context(), config, requireRemoteAuthentication,model.Conf.AccessAuthCode != "", util.SiYuanAccessAuthCodeBypass); err != nil {- ret.Code = -1- ret.Msg = model.Conf.Language(369)+ ret = apicontract.Failure[*apicontract.SystemOIDC](-1, model.Conf.Language(369))logging.LogErrorf("validate OIDC configuration change failed [ip=%s]: %s", c.ClientIP(), err)return}configurationChanged := !reflect.DeepEqual(currentConfig, config)if configurationChanged && config.Enabled {- ret.Code = -1- ret.Msg = model.Conf.Language(369)+ ret = apicontract.Failure[*apicontract.SystemOIDC](-1, model.Conf.Language(369))logging.LogWarnf("reject unverified OIDC configuration change [ip=%s]", c.ClientIP())return}model.Conf.SetOIDC(config)masked, err := model.GetMaskedConf()if err != nil {- ret.Code = -1- ret.Msg = model.Conf.Language(369)+ ret = apicontract.Failure[*apicontract.SystemOIDC](-1, model.Conf.Language(369))logging.LogErrorf("get masked configuration after setting OIDC failed: %s", err)return}- ret.Data = masked.OIDC+ ret = apicontract.Success(model.SystemOIDCPayload(masked.OIDC))if configurationChanged {util.CloseOIDCSessions()}-}+ return+})var setFollowSystemLockScreen = contractHandler(apicontract.SetFollowSystemLockScreen, func(c *gin.Context, request apicontract.LockScreenRequest) apicontract.Response[apicontract.Null] {model.Conf.System.LockScreenMode = int(request.LockScreenMode)@@ -1043,56 +952,43 @@ var setFollowSystemLockScreen = contractHandler(apicontract.SetFollowSystemLockSreturn apicontract.Success(apicontract.Null{})})-func getSysFonts(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var getSysFonts = contractHandler(apicontract.SystemGetSysFonts, func(c *gin.Context, request apicontract.EmptyRequest) (ret apicontract.Response[[]*apicontract.SystemFont]) {+ ret = apicontract.Success(([]*apicontract.SystemFont)(nil))fonts := util.LoadSysFonts()- ret.Data = fonts-}+ ret = apicontract.Success(systemFontsPayload(fonts))+ return+})-func getCustomFonts(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var getCustomFonts = contractHandler(apicontract.SystemGetCustomFonts, func(c *gin.Context, request apicontract.EmptyRequest) (ret apicontract.Response[[]*apicontract.SystemCustomFont]) {+ ret = apicontract.Success(([]*apicontract.SystemCustomFont)(nil))- ret.Data = util.LoadCustomFonts()-}+ ret = apicontract.Success(systemCustomFontsPayload(util.LoadCustomFonts()))+ return+})-func importCustomFont(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var importCustomFont = contractHandler(apicontract.SystemImportCustomFont, func(c *gin.Context, request apicontract.SystemImportFileRequest) (ret apicontract.Response[*apicontract.SystemCustomFont]) {+ ret = apicontract.Success((*apicontract.SystemCustomFont)(nil))- c.Request.Body = http.MaxBytesReader(c.Writer, c.Request.Body, util.MaxCustomFontSize+1024*1024)- fileHeader, err := c.FormFile("file")- if err != nil {- var maxBytesError *http.MaxBytesError- if errors.As(err, &maxBytesError) {- ret.Code = http.StatusRequestEntityTooLarge- ret.Msg = "font file is too large"- } else {- ret.Code = http.StatusBadRequest- ret.Msg = "Field [file] must not be empty"- }- return+ fileHeader := request.File+ if fileHeader == nil {+ return apicontract.Failure[*apicontract.SystemCustomFont](400, "Field [file] must not be empty")}if util.MaxCustomFontSize < fileHeader.Size {- ret.Code = http.StatusRequestEntityTooLarge- ret.Msg = "font file is too large"+ ret = apicontract.Failure[*apicontract.SystemCustomFont](http.StatusRequestEntityTooLarge, "font file is too large")return}file, err := fileHeader.Open()if err != nil {- ret.Code = http.StatusBadRequest- ret.Msg = err.Error()+ ret = apicontract.Failure[*apicontract.SystemCustomFont](http.StatusBadRequest, err.Error())return}defer file.Close()tempFile, err := util.CreateCustomFontTemp()if err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[*apicontract.SystemCustomFont](-1, err.Error())return}tempPath := tempFile.Name()@@ -1101,47 +997,38 @@ func importCustomFont(c *gin.Context) {written, copyErr := io.Copy(tempFile, io.LimitReader(file, util.MaxCustomFontSize+1))closeErr := tempFile.Close()if copyErr != nil {- ret.Code = http.StatusBadRequest- ret.Msg = copyErr.Error()+ ret = apicontract.Failure[*apicontract.SystemCustomFont](http.StatusBadRequest, copyErr.Error())return}if closeErr != nil {- ret.Code = -1- ret.Msg = closeErr.Error()+ ret = apicontract.Failure[*apicontract.SystemCustomFont](-1, closeErr.Error())return}if util.MaxCustomFontSize < written {- ret.Code = http.StatusRequestEntityTooLarge- ret.Msg = "font file is too large"+ ret = apicontract.Failure[*apicontract.SystemCustomFont](http.StatusRequestEntityTooLarge, "font file is too large")return}font, _, err := util.InstallCustomFont(tempPath)if err != nil {- ret.Code = http.StatusBadRequest- ret.Msg = err.Error()+ ret = apicontract.Failure[*apicontract.SystemCustomFont](http.StatusBadRequest, err.Error())return}- ret.Data = font-}+ ret = apicontract.Success(systemCustomFontPayload(font))+ return+}, systemImportFontPreflight)-func removeCustomFont(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var removeCustomFont = contractHandler(apicontract.SystemRemoveCustomFont, func(c *gin.Context, request apicontract.SystemRemoveCustomFontRequest) (ret apicontract.Response[apicontract.SystemRemoveCustomFontData]) {+ ret = apicontract.Success(apicontract.SystemRemoveCustomFontData{})- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }- id, _ := arg["id"].(string)+ id := request.IDfont, err := util.RemoveCustomFont(id)if err != nil {+ code := http.StatusBadRequestif os.IsNotExist(err) {- ret.Code = http.StatusNotFound- } else {- ret.Code = http.StatusBadRequest+ code = http.StatusNotFound}- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemRemoveCustomFontData](code, err.Error())return}@@ -1185,12 +1072,9 @@ func removeCustomFont(c *gin.Context) {if nil != appearance {util.BroadcastByType("main", "setAppearance", 0, "", appearance)}- ret.Data = map[string]any{- "font": font,- "editor": editor,- "appearance": appearance,- }-}+ ret = apicontract.Success(apicontract.SystemRemoveCustomFontData{Font: systemCustomFontPayload(font), Editor: settingEditorPayload(editor), Appearance: settingAppearancePayload(appearance)})+ return+})var version = contractHandler(apicontract.Version, func(c *gin.Context, request apicontract.EmptyRequest) apicontract.Response[string] {return apicontract.Success(util.Ver)@@ -1205,65 +1089,61 @@ var bootProgress = contractHandler(apicontract.BootProgress, func(c *gin.Contextreturn apicontract.Success(apicontract.BootProgressData{Progress: progress, Details: details})})-func getBootAppearance(c *gin.Context) {+var getBootAppearance = contractHandler(apicontract.SystemGetBootAppearance, func(c *gin.Context, request apicontract.EmptyRequest) apicontract.Response[*apicontract.SettingBootAppearance] {if !model.IsLocalRequest(c) {- c.Status(http.StatusForbidden)- return+ return apicontract.EmptyHTTPResponse[*apicontract.SettingBootAppearance](http.StatusForbidden)}c.Header("Cache-Control", "no-store")- ret := gulu.Ret.NewResult()- ret.Data = model.GetBootAppearance()- c.JSON(http.StatusOK, ret)-}+ return apicontract.Success(settingBootAppearancePayload(model.GetBootAppearance()))+})// bootProgressSSE 以 Server-Sent Events 推送启动进度,仅在进度发生变化时写一帧。-func bootProgressSSE(c *gin.Context) {- c.Header("Content-Type", "text/event-stream")- c.Header("Cache-Control", "no-cache")- c.Header("Connection", "keep-alive")- c.Writer.Flush()-- flusher, ok := c.Writer.(http.Flusher)- if !ok {- return- }-- // 连接后立即推送当前进度,避免等待第一个 tick- progress, details := util.GetBootProgressDetails()- lastProgress, lastDetails := progress, details- if err := writeBootProgressSSE(c, flusher, progress, details); err != nil {- return- }- if 100 <= progress {- return- }-- ticker := time.NewTicker(100 * time.Millisecond)- defer ticker.Stop()- ctx := c.Request.Context()- for {- select {- case <-ctx.Done():- // 客户端断开连接+var bootProgressSSE = contractHandler(apicontract.SystemBootProgressSSE, func(c *gin.Context, request apicontract.EmptyRequest) apicontract.Response[apicontract.Null] {+ return apicontract.StreamSSE[apicontract.Null](func(_ http.ResponseWriter, _ *http.Request) {+ c.Header("Content-Type", "text/event-stream")+ c.Header("Cache-Control", "no-cache")+ c.Header("Connection", "keep-alive")+ c.Writer.Flush()++ flusher := c.Writer++ // 连接后立即推送当前进度,避免等待第一个 tick+ progress, details := util.GetBootProgressDetails()+ lastProgress, lastDetails := progress, details+ if err := writeBootProgressSSE(c, flusher, progress, details); err != nil {return- case <-ticker.C:- progress, details = util.GetBootProgressDetails()- if progress == lastProgress && details == lastDetails {- continue- }- lastProgress, lastDetails = progress, details- if err := writeBootProgressSSE(c, flusher, progress, details); err != nil {- return- }- if 100 <= progress {+ }+ if 100 <= progress {+ return+ }++ ticker := time.NewTicker(100 * time.Millisecond)+ defer ticker.Stop()+ ctx := c.Request.Context()+ for {+ select {+ case <-ctx.Done():+ // 客户端断开连接return+ case <-ticker.C:+ progress, details = util.GetBootProgressDetails()+ if progress == lastProgress && details == lastDetails {+ continue+ }+ lastProgress, lastDetails = progress, details+ if err := writeBootProgressSSE(c, flusher, progress, details); err != nil {+ return+ }+ if 100 <= progress {+ return+ }}}- }-}+ })+})func writeBootProgressSSE(c *gin.Context, flusher http.Flusher, progress int32, details string) error {- data, err := json.Marshal(map[string]any{"progress": progress, "details": details})+ data, err := json.Marshal(apicontract.BootProgressData{Progress: progress, Details: details})if err != nil {return err}@@ -1274,25 +1154,18 @@ func writeBootProgressSSE(c *gin.Context, flusher http.Flusher, progress int32,return nil}-func setAppearanceMode(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var setAppearanceMode = contractHandler(apicontract.SystemSetAppearanceMode, func(c *gin.Context, request apicontract.SystemAppearanceModeRequest) (ret apicontract.Response[apicontract.SystemAppearanceData]) {+ ret = apicontract.Success(apicontract.SystemAppearanceData{})- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }-- mode := int(arg["mode"].(float64))+ mode := int(request.Mode)model.Conf.Appearance.Mode = modemodel.LoadThemes()model.WatchThemes()model.Conf.Save()- ret.Data = map[string]any{- "appearance": model.Conf.Appearance,- }-}+ ret = apicontract.Success(apicontract.SystemAppearanceData{Appearance: settingAppearancePayload(model.Conf.Appearance)})+ return+})var setNetworkServe = contractHandler(apicontract.SetNetworkServe, func(c *gin.Context, request apicontract.NetworkServeRequest) apicontract.Response[apicontract.Null] {model.Conf.System.NetworkServe = request.NetworkServe@@ -1310,116 +1183,97 @@ var setNetworkServeTLS = contractHandler(apicontract.SetNetworkServeTLS, func(creturn apicontract.Success(apicontract.Null{})})-func exportTLSCACert(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var exportTLSCACert = contractHandler(apicontract.SystemExportTLSCACert, func(c *gin.Context, request apicontract.EmptyRequest) (ret apicontract.Response[apicontract.SystemPathData]) {+ ret = apicontract.Success(apicontract.SystemPathData{})caCertPath := filepath.Join(util.ConfDir, util.TLSCACertFilename)if !gulu.File.IsExist(caCertPath) {- ret.Code = -1- ret.Msg = "CA certificate not found"+ ret = apicontract.Failure[apicontract.SystemPathData](-1, "CA certificate not found")return}tmpDir := filepath.Join(util.TempDir, "export")if err := os.MkdirAll(tmpDir, 0755); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemPathData](-1, err.Error())return}exportPath := filepath.Join(tmpDir, util.TLSCACertFilename)if err := gulu.File.CopyFile(caCertPath, exportPath); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemPathData](-1, err.Error())return}- ret.Data = map[string]any{- "path": "/export/" + util.TLSCACertFilename,- }-}+ ret = apicontract.Success(apicontract.SystemPathData{Path: "/export/" + util.TLSCACertFilename})+ return+})-func exportTLSCABundle(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var exportTLSCABundle = contractHandler(apicontract.SystemExportTLSCABundle, func(c *gin.Context, request apicontract.EmptyRequest) (ret apicontract.Response[apicontract.SystemPathData]) {+ ret = apicontract.Success(apicontract.SystemPathData{})caCertPath := filepath.Join(util.ConfDir, util.TLSCACertFilename)caKeyPath := filepath.Join(util.ConfDir, util.TLSCAKeyFilename)if !gulu.File.IsExist(caCertPath) || !gulu.File.IsExist(caKeyPath) {- ret.Code = -1- ret.Msg = "CA certificate not found, please enable TLS first"+ ret = apicontract.Failure[apicontract.SystemPathData](-1, "CA certificate not found, please enable TLS first")return}tmpDir := filepath.Join(util.TempDir, "export", "ca-bundle")os.RemoveAll(tmpDir)if err := os.MkdirAll(tmpDir, 0755); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemPathData](-1, err.Error())return}defer os.RemoveAll(tmpDir)if err := gulu.File.CopyFile(caCertPath, filepath.Join(tmpDir, util.TLSCACertFilename)); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemPathData](-1, err.Error())return}if err := gulu.File.CopyFile(caKeyPath, filepath.Join(tmpDir, util.TLSCAKeyFilename)); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemPathData](-1, err.Error())return}zipPath := filepath.Join(util.TempDir, "export", "ca-bundle.zip")zipFile, err := gulu.Zip.Create(zipPath)if err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemPathData](-1, err.Error())return}if err := zipFile.AddDirectory("", tmpDir); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemPathData](-1, err.Error())return}if err := zipFile.Close(); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemPathData](-1, err.Error())return}- ret.Data = map[string]any{- "path": "/export/ca-bundle.zip",- }-}+ ret = apicontract.Success(apicontract.SystemPathData{Path: "/export/ca-bundle.zip"})+ return+})-func importTLSCABundle(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var importTLSCABundle = contractHandler(apicontract.SystemImportTLSCABundle, func(c *gin.Context, request apicontract.SystemImportFileRequest) (ret apicontract.Response[apicontract.SystemMessageData]) {+ ret = apicontract.Success(apicontract.SystemMessageData{})- file, err := c.FormFile("file")- if err != nil {- ret.Code = -1- ret.Msg = "[file] is required: " + err.Error()- return+ file := request.File+ if file == nil {+ return apicontract.Failure[apicontract.SystemMessageData](-1, "[file] is required: "+http.ErrMissingFile.Error())}tmpDir := filepath.Join(util.TempDir, "import")if err := os.MkdirAll(tmpDir, 0755); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemMessageData](-1, err.Error())return}tmpZipPath := filepath.Join(tmpDir, "ca-bundle.zip")if err := c.SaveUploadedFile(file, tmpZipPath); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemMessageData](-1, err.Error())return}defer os.Remove(tmpZipPath)@@ -1427,8 +1281,7 @@ func importTLSCABundle(c *gin.Context) {extractDir := filepath.Join(tmpDir, "ca-bundle")os.RemoveAll(extractDir)if err := gulu.Zip.Unzip(tmpZipPath, extractDir); err != nil {- ret.Code = -1- ret.Msg = "failed to extract zip file: " + err.Error()+ ret = apicontract.Failure[apicontract.SystemMessageData](-1, "failed to extract zip file: "+err.Error())return}defer os.RemoveAll(extractDir)@@ -1436,29 +1289,25 @@ func importTLSCABundle(c *gin.Context) {caCertPath := filepath.Join(extractDir, util.TLSCACertFilename)caCertPEM, err := os.ReadFile(caCertPath)if err != nil {- ret.Code = -1- ret.Msg = "ca.crt not found in zip file"+ ret = apicontract.Failure[apicontract.SystemMessageData](-1, "ca.crt not found in zip file")return}caKeyPath := filepath.Join(extractDir, util.TLSCAKeyFilename)caKeyPEM, err := os.ReadFile(caKeyPath)if err != nil {- ret.Code = -1- ret.Msg = "ca.key not found in zip file"+ ret = apicontract.Failure[apicontract.SystemMessageData](-1, "ca.key not found in zip file")return}if err := util.ImportCABundle(string(caCertPEM), string(caKeyPEM)); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.SystemMessageData](-1, err.Error())return}- ret.Data = map[string]any{- "msg": "CA bundle imported successfully. Please restart to apply changes.",- }-}+ ret = apicontract.Success(apicontract.SystemMessageData{Msg: "CA bundle imported successfully. Please restart to apply changes."})+ return+})var setAutoLaunch = contractHandler(apicontract.SetAutoLaunch, func(c *gin.Context, request apicontract.AutoLaunchRequest) apicontract.Response[apicontract.Null] {model.Conf.System.AutoLaunch2 = int(request.AutoLaunch)@@ -1488,61 +1337,40 @@ var setNetworkProxy = contractHandler(apicontract.SetNetworkProxy, func(c *gin.Creturn apicontract.Success(apicontract.Null{})})-func addUIProcess(c *gin.Context) {- pid := c.Query("pid")- pidInt, err := strconv.Atoi(pid)+var addUIProcess = contractHandler(apicontract.SystemAddUIProcess, func(c *gin.Context, request apicontract.SystemUIProcessRequest) apicontract.Response[apicontract.Null] {+ request.PID = c.Query("pid")+ pidInt, err := strconv.Atoi(request.PID)if err != nil || 0 >= pidInt {- return+ return apicontract.EmptyHTTPResponse[apicontract.Null](http.StatusOK)}// 限制注册表中的 UI 进程数,防止无界增长导致内存耗尽if util.UIProcessCount() >= util.MaxUIProcessCount {- return+ return apicontract.EmptyHTTPResponse[apicontract.Null](http.StatusOK)}util.UIProcessIDs.Store(strconv.Itoa(pidInt), true)-}+ return apicontract.EmptyHTTPResponse[apicontract.Null](http.StatusOK)+})-func exit(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var exit = contractHandler(apicontract.SystemExit, exitSystem)- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }-- forceArg := arg["force"]- var force bool- if nil != forceArg {- force = forceArg.(bool)- }+var closeSystem = model.Close- execInstallPkgArg := arg["execInstallPkg"] // 0:默认检查新版本,1:不返回安装包,2:返回安装包路径并退出- execInstallPkg := 0- if nil != execInstallPkgArg {- execInstallPkg = int(execInstallPkgArg.(float64))- }-- setCurrentWorkspaceArg := arg["setCurrentWorkspace"]+func exitSystem(c *gin.Context, request apicontract.SystemExitRequest) apicontract.Response[apicontract.SystemExitData] {setCurrentWorkspace := true- if nil != setCurrentWorkspaceArg {- setCurrentWorkspace = setCurrentWorkspaceArg.(bool)- }-- exitCode, installPkgPath := model.Close(force, setCurrentWorkspace, execInstallPkg)- ret.Code = exitCode- data := map[string]any{"closeTimeout": 0}- if "" != installPkgPath {- data["installPkgPath"] = installPkgPath+ if request.SetCurrentWorkspace != nil {+ setCurrentWorkspace = *request.SetCurrentWorkspace}- ret.Data = data+ exitCode, installPkgPath := closeSystem(request.Force, setCurrentWorkspace, int(request.ExecInstallPkg))+ data := apicontract.SystemExitData{CloseTimeout: 0, InstallPkgPath: installPkgPath}switch exitCode {case 0:// Close 返回后同步和 defer 清理均已完成,此时再通知移动端宿主退出。util.BroadcastByType("main", "exit", 0, "", nil)case 1: // 同步执行失败- ret.Msg = model.Conf.Language(96) + "<div class=\"fn__space\"></div><button class=\"b3-button b3-button--white\">" + model.Conf.Language(97) + "</button>"+ return apicontract.SystemExit.FailureWithData(1, model.Conf.Language(96)+"<div class=\"fn__space\"></div><button class=\"b3-button b3-button--white\">"+model.Conf.Language(97)+"</button>", data)case 2: // 提示新安装包- ret.Msg = model.Conf.Language(61)+ return apicontract.SystemExit.FailureWithData(2, model.Conf.Language(61), data)}+ return apicontract.Success(data)}diff --git a/kernel/api/system_auth.go b/kernel/api/system_auth.gonew file mode 100644index 0000000000..533f705475--- /dev/null+++ b/kernel/api/system_auth.go@@ -0,0 +1,18 @@+package api++import (+ "github.com/siyuan-note/siyuan/kernel/apicontract"+ "github.com/siyuan-note/siyuan/kernel/model"+)++var loginAuth = contractHandler(apicontract.SystemLoginAuth, model.LoginAuth)+var logoutAuth = contractHandler(apicontract.SystemLogoutAuth, model.LogoutAuth)+var getCaptcha = contractHandler(apicontract.SystemGetCaptcha, model.GetCaptcha)+var oidcStart = contractHandler(apicontract.SystemOIDCStart, model.OIDCStart, model.OIDCStartPreflight)+var oidcCallback = contractHandler(apicontract.SystemOIDCCallback, model.OIDCCallback)+var oidcMobileCallback = contractHandler(apicontract.SystemOIDCMobileCallback, model.OIDCMobileCallback)+var oidcPoll = contractHandler(apicontract.SystemOIDCPoll, model.OIDCPoll)+var oidcValidateStart = contractHandler(apicontract.SystemOIDCValidateStart, model.OIDCValidateStart)+var oidcValidatePoll = contractHandler(apicontract.SystemOIDCValidatePoll, model.OIDCValidatePoll)+var oidcValidateActivate = contractHandler(apicontract.SystemOIDCValidateActivate, model.OIDCValidateActivate)+var oidcValidateCancel = contractHandler(apicontract.SystemOIDCValidateCancel, model.OIDCValidateCancel)diff --git a/kernel/api/system_contract.go b/kernel/api/system_contract.gonew file mode 100644index 0000000000..e5bc3b9993--- /dev/null+++ b/kernel/api/system_contract.go@@ -0,0 +1,80 @@+package api++import (+ "encoding/json"+ "net/http"++ "github.com/gin-gonic/gin"+ "github.com/siyuan-note/siyuan/kernel/apicontract"+ "github.com/siyuan-note/siyuan/kernel/conf"+ "github.com/siyuan-note/siyuan/kernel/model"+ "github.com/siyuan-note/siyuan/kernel/util"+)++// systemConfPayload 在脱敏完成后转换完整配置,任意 JSON 仅出现在布局和快捷键字段。+func systemConfPayload(value *model.AppConf) (result *apicontract.SystemAppConf, err error) {+ encoded, err := json.Marshal(value)+ if err == nil {+ err = json.Unmarshal(encoded, &result)+ }+ return+}++func systemOnboardingPayload(value *conf.Onboarding) *apicontract.SystemOnboarding {+ if value == nil {+ return nil+ }+ return &apicontract.SystemOnboarding{State: value.State, NewUser: value.NewUser, Dismissed: value.Dismissed, NotebookID: value.NotebookID, DocumentID: value.DocumentID}+}++func systemFontPayload(value *util.Font) *apicontract.SystemFont {+ if value == nil {+ return nil+ }+ return &apicontract.SystemFont{Family: value.Family, Weight: value.Weight, DisplayName: value.DisplayName, Aliases: value.Aliases, Spacing: value.Spacing}+}+func systemFontsPayload(values []*util.Font) []*apicontract.SystemFont {+ if values == nil {+ return nil+ }+ result := make([]*apicontract.SystemFont, len(values))+ for i, value := range values {+ result[i] = systemFontPayload(value)+ }+ return result+}+func systemCustomFontPayload(value *util.CustomFont) *apicontract.SystemCustomFont {+ if value == nil {+ return nil+ }+ return &apicontract.SystemCustomFont{ID: value.ID, Family: value.Family, Weight: value.Weight, DisplayName: value.DisplayName, Aliases: value.Aliases, Spacing: value.Spacing, URL: value.URL}+}+func systemCustomFontsPayload(values []*util.CustomFont) []*apicontract.SystemCustomFont {+ if values == nil {+ return nil+ }+ result := make([]*apicontract.SystemCustomFont, len(values))+ for i, value := range values {+ result[i] = systemCustomFontPayload(value)+ }+ return result+}++func systemUILayoutPreflight(c *gin.Context) *apicontract.Response[apicontract.Null] {+ if !util.ReadOnly {+ return nil+ }+ ret := apicontract.Success(apicontract.Null{})+ return &ret+}+func systemAccessAuthPreflight(c *gin.Context) *apicontract.Response[apicontract.Null] {+ if util.ContainerDocker != util.Container {+ return nil+ }+ ret := apicontract.Failure[apicontract.Null](-1, "access auth code cannot be set in Docker container")+ return &ret+}+func systemImportFontPreflight(c *gin.Context) *apicontract.Response[*apicontract.SystemCustomFont] {+ c.Request.Body = http.MaxBytesReader(c.Writer, c.Request.Body, util.MaxCustomFontSize+1024*1024)+ return nil+}diff --git a/kernel/api/system_emoji_test.go b/kernel/api/system_emoji_test.goindex 66ae164549..7ed4cb2a72 100644--- a/kernel/api/system_emoji_test.go+++ b/kernel/api/system_emoji_test.go@@ -26,6 +26,7 @@ import ("path/filepath""testing"+ "github.com/siyuan-note/siyuan/kernel/apicontract""github.com/siyuan-note/siyuan/kernel/model")@@ -133,12 +134,12 @@ func TestReadCustomEmojisRecursively(t *testing.T) {t.Fatalf("write custom emoji failed: %s", err)}- items := []map[string]any{}+ items := []*apicontract.SystemEmoji{}readCustomEmojis(root, "", &items)if len(items) != 1 {t.Fatalf("expected one custom emoji, got %d", len(items))}- if actual := items[0]["unicode"]; actual != "folder/sub/icon.png" {+ if actual := items[0].Unicode; actual != "folder/sub/icon.png" {t.Fatalf("unexpected custom emoji path [%v]", actual)}}diff --git a/kernel/api/workspace.go b/kernel/api/workspace.goindex 056291b16d..606634b76b 100644--- a/kernel/api/workspace.go+++ b/kernel/api/workspace.go@@ -18,7 +18,6 @@ package apiimport ("fmt"- "net/http""os""path/filepath""sort"@@ -29,28 +28,21 @@ import ("github.com/88250/gulu""github.com/gin-gonic/gin""github.com/siyuan-note/logging"+ "github.com/siyuan-note/siyuan/kernel/apicontract""github.com/siyuan-note/siyuan/kernel/model""github.com/siyuan-note/siyuan/kernel/util")-func checkWorkspaceDir(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var checkWorkspaceDir = contractHandler(apicontract.SystemCheckWorkspaceDir, func(c *gin.Context, request apicontract.SystemPathRequest) (ret apicontract.Response[apicontract.SystemWorkspaceCheckData]) {+ ret = apicontract.Success(apicontract.SystemWorkspaceCheckData{})- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }-- path := arg["path"].(string)- if rejectMobileWorkspaceBaseDir(ret, path) {- return+ path := request.Path+ if response := rejectMobileWorkspaceBaseDirResponse[apicontract.SystemWorkspaceCheckData](path); response != nil {+ return *response}// 检查路径是否是分区根路径if util.IsPartitionRootPath(path) {- ret.Code = -1- ret.Msg = model.Conf.Language(273)- ret.Data = map[string]any{"closeTimeout": 7000}+ ret = apicontract.FailureWithTimeout[apicontract.SystemWorkspaceCheckData](-1, model.Conf.Language(273), 7000)return}@@ -58,189 +50,148 @@ func checkWorkspaceDir(c *gin.Context) {if !util.IsWorkspaceDir(path) {entries, err := os.ReadDir(path)if err != nil {- ret.Code = -1- ret.Msg = fmt.Sprintf("read dir [%s] failed: %s", path, err)+ ret = apicontract.Failure[apicontract.SystemWorkspaceCheckData](-1, fmt.Sprintf("read dir [%s] failed: %s", path, err))return}if 0 < len(entries) {- ret.Code = -1- ret.Msg = model.Conf.Language(274)- ret.Data = map[string]any{"closeTimeout": 7000}+ ret = apicontract.FailureWithTimeout[apicontract.SystemWorkspaceCheckData](-1, model.Conf.Language(274), 7000)return}}if isInvalidWorkspacePath(path) {- ret.Code = -1- ret.Msg = "This workspace name is not allowed, please use another name"+ ret = apicontract.Failure[apicontract.SystemWorkspaceCheckData](-1, "This workspace name is not allowed, please use another name")return}if !gulu.File.IsExist(path) {- ret.Code = -1- ret.Msg = "This workspace does not exist"+ ret = apicontract.Failure[apicontract.SystemWorkspaceCheckData](-1, "This workspace does not exist")return}- ret.Data = map[string]any{- "isWorkspace": util.IsWorkspaceDir(path),- }-}+ ret = apicontract.Success(apicontract.SystemWorkspaceCheckData{IsWorkspace: util.IsWorkspaceDir(path)})+ return+})-func createWorkspaceDir(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }+var createWorkspaceDir = contractHandler(apicontract.SystemCreateWorkspaceDir, func(c *gin.Context, request apicontract.SystemPathRequest) (ret apicontract.Response[apicontract.Null]) {+ ret = apicontract.Success(apicontract.Null{})- absPath := arg["path"].(string)+ absPath := request.PathabsPath = util.RemoveInvalid(absPath)absPath = strings.TrimSpace(absPath)- if rejectMobileWorkspaceBaseDir(ret, absPath) {- return+ if response := rejectMobileWorkspaceBaseDirResponse[apicontract.Null](absPath); response != nil {+ return *response}if isInvalidWorkspacePath(absPath) {- ret.Code = -1- ret.Msg = "This workspace name is not allowed, please use another name"+ ret = apicontract.Failure[apicontract.Null](-1, "This workspace name is not allowed, please use another name")return}if !gulu.File.IsExist(absPath) {if err := os.MkdirAll(absPath, 0755); err != nil {- ret.Code = -1- ret.Msg = fmt.Sprintf("create workspace dir [%s] failed: %s", absPath, err)+ ret = apicontract.Failure[apicontract.Null](-1, fmt.Sprintf("create workspace dir [%s] failed: %s", absPath, err))return}}workspacePaths, err := util.ReadWorkspacePaths()if err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}workspacePaths = append(workspacePaths, absPath)if err = util.WriteWorkspacePaths(workspacePaths); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}-}--func removeWorkspaceDir(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+ return+})- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }+var removeWorkspaceDir = contractHandler(apicontract.SystemRemoveWorkspaceDir, func(c *gin.Context, request apicontract.SystemPathRequest) (ret apicontract.Response[apicontract.Null]) {+ ret = apicontract.Success(apicontract.Null{})- path := arg["path"].(string)+ path := request.Pathif util.IsWorkspaceLocked(path) || util.WorkspaceDir == path {msg := "Cannot remove current workspace"- ret.Code = -1- ret.Msg = msg- ret.Data = map[string]any{"closeTimeout": 3000}+ ret = apicontract.FailureWithTimeout[apicontract.Null](-1, msg, 3000)return}workspacePaths, err := util.ReadWorkspacePaths()if err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}workspacePaths = util.RemoveWorkspacePath(workspacePaths, path)if err = util.WriteWorkspacePaths(workspacePaths); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}-}+ return+})-func removeWorkspaceDirPhysically(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var removeWorkspaceDirPhysically = contractHandler(apicontract.SystemRemoveWorkspaceDirPhysically, func(c *gin.Context, request apicontract.SystemPathRequest) (ret apicontract.Response[apicontract.Null]) {+ ret = apicontract.Success(apicontract.Null{})- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }-- path := arg["path"].(string)+ path := request.Path// 硬边界:只允许删除已登记的工作空间目录或新建的空目录,禁止删除当前工作空间和任意路径cleanPath, absErr := filepath.Abs(path)if absErr != nil {- ret.Code = -1- ret.Msg = absErr.Error()+ ret = apicontract.Failure[apicontract.Null](-1, absErr.Error())return}- if rejectMobileWorkspaceBaseDir(ret, cleanPath) {- return+ if response := rejectMobileWorkspaceBaseDirResponse[apicontract.Null](cleanPath); response != nil {+ return *response}if util.IsWorkspaceLocked(cleanPath) || cleanPath == util.WorkspaceDir {- ret.Code = -1- ret.Msg = "cannot remove opened workspace"+ ret = apicontract.Failure[apicontract.Null](-1, "cannot remove opened workspace")return}knownPaths, err := util.ReadWorkspacePaths()if err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}remainingPaths := util.RemoveWorkspacePath(knownPaths, cleanPath)if len(remainingPaths) == len(knownPaths) {- ret.Code = -1- ret.Msg = "path is not a registered workspace"+ ret = apicontract.Failure[apicontract.Null](-1, "path is not a registered workspace")return}if !util.IsWorkspaceDir(cleanPath) {entries, readErr := os.ReadDir(cleanPath)if readErr != nil {- ret.Code = -1- ret.Msg = readErr.Error()+ ret = apicontract.Failure[apicontract.Null](-1, readErr.Error())return}if 0 < len(entries) {- ret.Code = -1- ret.Msg = "path is not a workspace directory"+ ret = apicontract.Failure[apicontract.Null](-1, "path is not a workspace directory")return}}if err := os.RemoveAll(cleanPath); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}if err = util.WriteWorkspacePaths(remainingPaths); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}logging.LogInfof("removed workspace [%s] physically", path)-}+ return+})-type Workspace struct {- Path string `json:"path"`- Closed bool `json:"closed"`-}+type Workspace = apicontract.SystemWorkspace-func getMobileWorkspaces(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var getMobileWorkspaces = contractHandler(apicontract.SystemGetMobileWorkspaces, func(c *gin.Context, request apicontract.EmptyRequest) (ret apicontract.Response[[]string]) {+ ret = apicontract.Success([]string(nil))if !util.IsMobileContainer() {return@@ -250,12 +201,11 @@ func getMobileWorkspaces(c *gin.Context) {dirs, err := os.ReadDir(root)if err != nil {logging.LogErrorf("read dir [%s] failed: %s", root, err)- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[[]string](-1, err.Error())return}- ret.Data = []string{}+ ret = apicontract.Success([]string{})var paths []stringfor _, dir := range dirs {if dir.IsDir() {@@ -267,24 +217,23 @@ func getMobileWorkspaces(c *gin.Context) {paths = append(paths, absPath)}}- ret.Data = paths-}+ ret = apicontract.Success(paths)+ return+})-func getWorkspaces(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var getWorkspaces = contractHandler(apicontract.SystemGetWorkspaces, func(c *gin.Context, request apicontract.EmptyRequest) (ret apicontract.Response[[]*apicontract.SystemWorkspace]) {+ ret = apicontract.Success([]*apicontract.SystemWorkspace(nil))workspacePaths, err := util.ReadWorkspacePaths()if err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[[]*apicontract.SystemWorkspace](-1, err.Error())return}if role := model.GetGinContextRole(c); !model.IsValidRole(role, []model.Role{model.RoleAdministrator,}) {- ret.Data = []*Workspace{}+ ret = apicontract.Success([]*Workspace{})return}@@ -305,33 +254,24 @@ func getWorkspaces(c *gin.Context) {})workspaces = append(workspaces, openedWorkspaces...)workspaces = append(workspaces, closedWorkspaces...)- ret.Data = workspaces-}+ ret = apicontract.Success(workspaces)+ return+})-func setWorkspaceDir(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+var setWorkspaceDir = contractHandler(apicontract.SystemSetWorkspaceDir, func(c *gin.Context, request apicontract.SystemPathRequest) (ret apicontract.Response[apicontract.Null]) {+ ret = apicontract.Success(apicontract.Null{})- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }-- path := arg["path"].(string)- if rejectMobileWorkspaceBaseDir(ret, path) {- return+ path := request.Path+ if response := rejectMobileWorkspaceBaseDirResponse[apicontract.Null](path); response != nil {+ return *response}if util.WorkspaceDir == path {- ret.Code = -1- ret.Msg = model.Conf.Language(78)- ret.Data = map[string]any{"closeTimeout": 3000}+ ret = apicontract.FailureWithTimeout[apicontract.Null](-1, model.Conf.Language(78), 3000)return}if util.IsCloudDrivePath(path) {- ret.Code = -1- ret.Msg = model.Conf.Language(196)- ret.Data = map[string]any{"closeTimeout": 7000}+ ret = apicontract.FailureWithTimeout[apicontract.Null](-1, model.Conf.Language(196), 7000)return}@@ -340,9 +280,7 @@ func setWorkspaceDir(c *gin.Context) {installDirLower := strings.ToLower(filepath.Dir(util.WorkingDir))pathLower := strings.ToLower(path)if strings.HasPrefix(pathLower, installDirLower) && (gulu.File.IsSubPath(installDirLower, pathLower) || filepath.Clean(installDirLower) == filepath.Clean(pathLower)) {- ret.Code = -1- ret.Msg = model.Conf.Language(98)- ret.Data = map[string]any{"closeTimeout": 5000}+ ret = apicontract.FailureWithTimeout[apicontract.Null](-1, model.Conf.Language(98), 5000)return}}@@ -352,9 +290,7 @@ func setWorkspaceDir(c *gin.Context) {if !pathIsWorkspace {for p := filepath.Dir(path); !util.IsPartitionRootPath(p); p = filepath.Dir(p) {if util.IsWorkspaceDir(p) {- ret.Code = -1- ret.Msg = fmt.Sprintf(model.Conf.Language(256), path, p)- ret.Data = map[string]any{"closeTimeout": 7000}+ ret = apicontract.FailureWithTimeout[apicontract.Null](-1, fmt.Sprintf(model.Conf.Language(256), path, p), 7000)return}}@@ -362,8 +298,7 @@ func setWorkspaceDir(c *gin.Context) {workspacePaths, err := util.ReadWorkspacePaths()if err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}@@ -373,8 +308,7 @@ func setWorkspaceDir(c *gin.Context) {workspacePaths = append(workspacePaths, path) // 切换的工作空间固定放在最后一个if err = util.WriteWorkspacePaths(workspacePaths); err != nil {- ret.Code = -1- ret.Msg = err.Error()+ ret = apicontract.Failure[apicontract.Null](-1, err.Error())return}@@ -382,7 +316,8 @@ func setWorkspaceDir(c *gin.Context) {util.PushMsg(model.Conf.Language(42), 1000*15)time.Sleep(2 * time.Second)}-}+ return+})func isInvalidWorkspacePath(absPath string) bool {if "" == absPath {@@ -418,3 +353,12 @@ func rejectMobileWorkspaceBaseDir(ret *gulu.Result, path string) bool {ret.Data = map[string]any{"closeTimeout": 7000}return true}++func rejectMobileWorkspaceBaseDirResponse[Data any](path string) *apicontract.Response[Data] {+ result := gulu.Ret.NewResult()+ if !rejectMobileWorkspaceBaseDir(result, path) {+ return nil+ }+ response := apicontract.FailureWithTimeout[Data](result.Code, result.Msg, 7000)+ return &response+}diff --git a/kernel/apicontract/contracts.go b/kernel/apicontract/contracts.goindex ebd14b56ae..65087a32a9 100644--- a/kernel/apicontract/contracts.go+++ b/kernel/apicontract/contracts.go@@ -950,3 +950,48 @@ var PluginPrivateService = define[EmptyRequest, PluginServiceContent]("pluginPrivar GetDynamicIcon = define[DynamicIconRequest, BinaryContent]("getDynamicIcon", "/api/icon/getDynamicIcon", NoBody, ResponseOptions{Output: BinaryOutput, ErrorStatus: 200, ContentVariants: []HTTPContentVariant{{Status: 200, ContentType: "image/svg+xml"}}, EmptyResponseStatuses: []int{500}}, "GET")var ExtensionCopy = define[ExtensionCopyRequest, *ExtensionCopyData]("extensionCopy", "/api/extension/copy", MultipartBody, ResponseOptions{DataOnError: true}, "POST")++var SystemBootProgressSSE = define[EmptyRequest, Null]("bootProgressSSE", "/api/system/bootProgressSSE", NoBody, SSEOptions(SSEEvent[BootProgressData]("")), "GET")+var SystemGetBootAppearance = define[EmptyRequest, *SettingBootAppearance]("getBootAppearance", "/api/system/getBootAppearance", NoBody, ResponseOptions{EmptyResponseStatuses: []int{403}}, "GET")+var SystemGetCaptcha = define[EmptyRequest, BinaryContent]("getCaptcha", "/api/system/getCaptcha", NoBody, ResponseOptions{Output: BinaryOutput, ErrorStatus: 200, ContentVariants: []HTTPContentVariant{{Status: 200, ContentType: "image/png"}}, EmptyResponseStatuses: []int{500}}, "GET")+var SystemOIDCCallback = define[SystemOIDCCallbackRequest, BinaryContent]("oidcCallback", "/api/system/oidc/callback", NoBody, HTTPContentOptions(HTTPContentVariant{Status: 200, ContentType: "text/html"}, HTTPContentVariant{Status: 302, ContentType: "text/html"}), "GET")+var SystemAddCustomEmoji = define[SystemCustomEmojiRequest, SystemPathData]("addCustomEmoji", "/api/system/addCustomEmoji", FormBody, ResponseOptions{AdditionalCodes: []int{400, 413}}, "POST")+var SystemCheckUpdate = define[SystemCheckUpdateRequest, Null]("checkUpdate", "/api/system/checkUpdate", JSONBody, ResponseOptions{}, "POST")+var SystemCheckWorkspaceDir = define[SystemPathRequest, SystemWorkspaceCheckData]("checkWorkspaceDir", "/api/system/checkWorkspaceDir", JSONBody, ResponseOptions{}, "POST")+var SystemCreateWorkspaceDir = define[SystemPathRequest, Null]("createWorkspaceDir", "/api/system/createWorkspaceDir", JSONBody, ResponseOptions{}, "POST")+var SystemDismissOnboarding = define[EmptyRequest, *SystemOnboarding]("dismissOnboarding", "/api/system/dismissOnboarding", NoBody, ResponseOptions{}, "POST")+var SystemEnsureOnboarding = define[EmptyRequest, *SystemOnboarding]("ensureOnboarding", "/api/system/ensureOnboarding", NoBody, ResponseOptions{}, "POST")+var SystemExit = define[SystemExitRequest, SystemExitData]("exit", "/api/system/exit", JSONBody, ResponseOptions{AdditionalCodes: []int{1, 2}, DataOnError: true}, "POST")+var SystemExportConf = define[EmptyRequest, SystemExportConfData]("exportConf", "/api/system/exportConf", NoBody, ResponseOptions{}, "POST")+var SystemExportLog = define[EmptyRequest, SystemZipData]("exportLog", "/api/system/exportLog", NoBody, ResponseOptions{}, "POST")+var SystemExportTLSCABundle = define[EmptyRequest, SystemPathData]("exportTLSCABundle", "/api/system/exportTLSCABundle", NoBody, ResponseOptions{}, "POST")+var SystemExportTLSCACert = define[EmptyRequest, SystemPathData]("exportTLSCACert", "/api/system/exportTLSCACert", NoBody, ResponseOptions{}, "POST")+var SystemGetChangelog = define[SystemChangelogRequest, SystemChangelogData]("getChangelog", "/api/system/getChangelog", LegacyOptionalBody, ResponseOptions{}, "POST")+var SystemGetConf = define[EmptyRequest, SystemConfData]("getConf", "/api/system/getConf", NoBody, ResponseOptions{}, "POST")+var SystemGetCustomFonts = define[EmptyRequest, []*SystemCustomFont]("getCustomFonts", "/api/system/getCustomFonts", NoBody, ResponseOptions{}, "POST")+var SystemGetEmojiConf = define[EmptyRequest, []*SystemEmojiGroup]("getEmojiConf", "/api/system/getEmojiConf", NoBody, ResponseOptions{}, "POST")+var SystemGetMobileWorkspaces = define[EmptyRequest, []string]("getMobileWorkspaces", "/api/system/getMobileWorkspaces", NoBody, ResponseOptions{}, "POST")+var SystemGetSysFonts = define[EmptyRequest, []*SystemFont]("getSysFonts", "/api/system/getSysFonts", NoBody, ResponseOptions{}, "POST")+var SystemGetWorkspaces = define[EmptyRequest, []*SystemWorkspace]("getWorkspaces", "/api/system/getWorkspaces", NoBody, ResponseOptions{}, "POST")+var SystemImportConf = define[SystemImportConfRequest, Null]("importConf", "/api/system/importConf", MultipartBody, ResponseOptions{}, "POST")+var SystemImportCustomFont = define[SystemImportFileRequest, *SystemCustomFont]("importCustomFont", "/api/system/importCustomFont", MultipartBody, ResponseOptions{AdditionalCodes: []int{400, 413}}, "POST")+var SystemImportTLSCABundle = define[SystemImportFileRequest, SystemMessageData]("importTLSCABundle", "/api/system/importTLSCABundle", MultipartBody, ResponseOptions{}, "POST")+var SystemLoginAuth = define[SystemLoginAuthRequest, Null]("loginAuth", "/api/system/loginAuth", JSONBody, ResponseOptions{AdditionalCodes: []int{1}}, "POST")+var SystemLogoutAuth = define[EmptyRequest, Null]("logoutAuth", "/api/system/logoutAuth", NoBody, ResponseOptions{AdditionalCodes: []int{1}}, "POST")+var SystemOIDCMobileCallback = define[SystemOIDCMobileRequest, SystemOIDCMobileData]("oidcMobileCallback", "/api/system/oidc/mobileCallback", StructJSONBody, ResponseOptions{}, "POST")+var SystemOIDCPoll = define[SystemOIDCPollRequest, SystemOIDCPollData]("oidcPoll", "/api/system/oidc/poll", StructJSONBody, ResponseOptions{}, "POST")+var SystemOIDCStart = define[SystemOIDCStartRequest, SystemOIDCStartData]("oidcStart", "/api/system/oidc/start", StructJSONBody, ResponseOptions{}, "POST")+var SystemOIDCValidateStart = define[SystemOIDCRequest, SystemOIDCStartData]("oidcValidateStart", "/api/system/oidc/validate", StructJSONBody, ResponseOptions{}, "POST")+var SystemOIDCValidateActivate = define[SystemOIDCPollRequest, SystemOIDCActivateData]("oidcValidateActivate", "/api/system/oidc/validateActivate", StructJSONBody, ResponseOptions{}, "POST")+var SystemOIDCValidateCancel = define[SystemOIDCPollRequest, Null]("oidcValidateCancel", "/api/system/oidc/validateCancel", StructJSONBody, ResponseOptions{}, "POST")+var SystemOIDCValidatePoll = define[SystemOIDCPollRequest, SystemOIDCValidatePollData]("oidcValidatePoll", "/api/system/oidc/validatePoll", StructJSONBody, ResponseOptions{}, "POST")+var SystemRemoveCustomFont = define[SystemRemoveCustomFontRequest, SystemRemoveCustomFontData]("removeCustomFont", "/api/system/removeCustomFont", JSONBody, ResponseOptions{AdditionalCodes: []int{400, 404}}, "POST")+var SystemRemoveWorkspaceDir = define[SystemPathRequest, Null]("removeWorkspaceDir", "/api/system/removeWorkspaceDir", JSONBody, ResponseOptions{}, "POST")+var SystemRemoveWorkspaceDirPhysically = define[SystemPathRequest, Null]("removeWorkspaceDirPhysically", "/api/system/removeWorkspaceDirPhysically", JSONBody, ResponseOptions{}, "POST")+var SystemSetAPIToken = define[SystemAPITokenRequest, Null]("setAPIToken", "/api/system/setAPIToken", JSONBody, ResponseOptions{}, "POST")+var SystemSetAccessAuthCode = define[SystemAccessAuthCodeRequest, Null]("setAccessAuthCode", "/api/system/setAccessAuthCode", JSONBody, ResponseOptions{}, "POST")+var SystemSetAppearanceMode = define[SystemAppearanceModeRequest, SystemAppearanceData]("setAppearanceMode", "/api/system/setAppearanceMode", JSONBody, ResponseOptions{}, "POST")+var SystemSetOIDC = define[SystemOIDCRequest, *SystemOIDC]("setOIDC", "/api/system/setOIDC", StructJSONBody, ResponseOptions{}, "POST")+var SystemSetUILayout = define[SystemUILayoutRequest, Null]("setUILayout", "/api/system/setUILayout", JSONBody, ResponseOptions{}, "POST")+var SystemSetWorkspaceDir = define[SystemPathRequest, Null]("setWorkspaceDir", "/api/system/setWorkspaceDir", JSONBody, ResponseOptions{}, "POST")+var SystemAddUIProcess = define[SystemUIProcessRequest, Null]("addUIProcess", "/api/system/uiproc", NoBody, ResponseOptions{EmptyResponseStatuses: []int{200}}, "POST")diff --git a/kernel/apicontract/legacy_routes.json b/kernel/apicontract/legacy_routes.jsonindex ad2637c9c6..b4f1c5582c 100644--- a/kernel/apicontract/legacy_routes.json+++ b/kernel/apicontract/legacy_routes.json@@ -1,50 +1,6 @@[- {"method":"GET","path":"/api/system/bootProgressSSE","handler":"bootProgressSSE"},- {"method":"GET","path":"/api/system/getBootAppearance","handler":"getBootAppearance"},- {"method":"GET","path":"/api/system/getCaptcha","handler":"model.GetCaptcha"},- {"method":"GET","path":"/api/system/oidc/callback","handler":"model.OIDCCallback"},{"method":"GET","path":"/es/broadcast/subscribe","handler":"broadcastSubscribe"},{"method":"GET","path":"/ws/broadcast","handler":"broadcast"},- {"method":"POST","path":"/api/system/addCustomEmoji","handler":"addCustomEmoji"},- {"method":"POST","path":"/api/system/checkUpdate","handler":"checkUpdate"},- {"method":"POST","path":"/api/system/checkWorkspaceDir","handler":"checkWorkspaceDir"},- {"method":"POST","path":"/api/system/createWorkspaceDir","handler":"createWorkspaceDir"},- {"method":"POST","path":"/api/system/dismissOnboarding","handler":"dismissOnboarding"},- {"method":"POST","path":"/api/system/ensureOnboarding","handler":"ensureOnboarding"},- {"method":"POST","path":"/api/system/exit","handler":"exit"},- {"method":"POST","path":"/api/system/exportConf","handler":"exportConf"},- {"method":"POST","path":"/api/system/exportLog","handler":"exportLog"},- {"method":"POST","path":"/api/system/exportTLSCABundle","handler":"exportTLSCABundle"},- {"method":"POST","path":"/api/system/exportTLSCACert","handler":"exportTLSCACert"},- {"method":"POST","path":"/api/system/getChangelog","handler":"getChangelog"},- {"method":"POST","path":"/api/system/getConf","handler":"getConf"},- {"method":"POST","path":"/api/system/getCustomFonts","handler":"getCustomFonts"},- {"method":"POST","path":"/api/system/getEmojiConf","handler":"getEmojiConf"},- {"method":"POST","path":"/api/system/getMobileWorkspaces","handler":"getMobileWorkspaces"},- {"method":"POST","path":"/api/system/getSysFonts","handler":"getSysFonts"},- {"method":"POST","path":"/api/system/getWorkspaces","handler":"getWorkspaces"},- {"method":"POST","path":"/api/system/importConf","handler":"importConf"},- {"method":"POST","path":"/api/system/importCustomFont","handler":"importCustomFont"},- {"method":"POST","path":"/api/system/importTLSCABundle","handler":"importTLSCABundle"},- {"method":"POST","path":"/api/system/loginAuth","handler":"model.LoginAuth"},- {"method":"POST","path":"/api/system/logoutAuth","handler":"model.LogoutAuth"},- {"method":"POST","path":"/api/system/oidc/mobileCallback","handler":"model.OIDCMobileCallback"},- {"method":"POST","path":"/api/system/oidc/poll","handler":"model.OIDCPoll"},- {"method":"POST","path":"/api/system/oidc/start","handler":"model.OIDCStart"},- {"method":"POST","path":"/api/system/oidc/validate","handler":"model.OIDCValidateStart"},- {"method":"POST","path":"/api/system/oidc/validateActivate","handler":"model.OIDCValidateActivate"},- {"method":"POST","path":"/api/system/oidc/validateCancel","handler":"model.OIDCValidateCancel"},- {"method":"POST","path":"/api/system/oidc/validatePoll","handler":"model.OIDCValidatePoll"},- {"method":"POST","path":"/api/system/removeCustomFont","handler":"removeCustomFont"},- {"method":"POST","path":"/api/system/removeWorkspaceDir","handler":"removeWorkspaceDir"},- {"method":"POST","path":"/api/system/removeWorkspaceDirPhysically","handler":"removeWorkspaceDirPhysically"},- {"method":"POST","path":"/api/system/setAPIToken","handler":"setAPIToken"},- {"method":"POST","path":"/api/system/setAccessAuthCode","handler":"setAccessAuthCode"},- {"method":"POST","path":"/api/system/setAppearanceMode","handler":"setAppearanceMode"},- {"method":"POST","path":"/api/system/setOIDC","handler":"setOIDC"},- {"method":"POST","path":"/api/system/setUILayout","handler":"setUILayout"},- {"method":"POST","path":"/api/system/setWorkspaceDir","handler":"setWorkspaceDir"},- {"method":"POST","path":"/api/system/uiproc","handler":"addUIProcess"},{"method":"POST","path":"/api/transactions","handler":"performTransactions"},{"method":"POST","path":"/api/transactions/clearHistory","handler":"clearHistory"},{"method":"POST","path":"/api/transactions/redo","handler":"performRedo"},diff --git a/kernel/apicontract/schema.go b/kernel/apicontract/schema.goindex 550e68dc1e..bb8249bcf4 100644--- a/kernel/apicontract/schema.go+++ b/kernel/apicontract/schema.go@@ -91,6 +91,9 @@ func nonnullable(schema *Schema) *Schema {}func (b *schemaBuilder) schema(t reflect.Type, input bool) (*Schema, error) {+ if schema, err := systemVariantSchema(b, t, input); schema != nil || err != nil {+ return schema, err+ }if t == reflect.TypeFor[ExtensionCopyRequest]() {if !input {return nil, fmt.Errorf("extension upload fields can only appear in requests")diff --git a/kernel/apicontract/schema.json b/kernel/apicontract/schema.jsonindex e754dfb9d8..a68e9281dd 100644--- a/kernel/apicontract/schema.json+++ b/kernel/apicontract/schema.json@@ -41524,252 +41524,171 @@},"additionalProperties": false},- "TagData": {+ "SystemAPI": {"type": "object","properties": {- "children": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/TagData"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]- },- "count": {- "type": "integer"- },- "depth": {- "type": "integer"- },- "label": {- "type": "string"- },- "name": {- "type": "string"- },- "type": {+ "token": {"type": "string"}},"required": [- "children",- "count",- "depth",- "label",- "name",- "type"+ "token"],"additionalProperties": false},- "TagSnapshotRequestInput": {+ "SystemAPITokenRequestInput": {"type": "object","properties": {- "id": {+ "token": {"type": "string"- },- "name": {+ }+ },+ "required": [+ "token"+ ],+ "additionalProperties": false+ },+ "SystemAccessAuthCodeRequestInput": {+ "type": "object",+ "properties": {+ "accessAuthCode": {"type": "string"}},"required": [- "id",- "name"+ "accessAuthCode"],"additionalProperties": false},- "TailChildBlocksRequestInput": {+ "SystemAppConf": {"type": "object","properties": {- "id": {+ "accessAuthCode": {"type": "string"},- "ids": {+ "ai": {"anyOf": [{- "type": "array",- "items": {- "type": "string"- }+ "$ref": "#/$defs/SettingAI"},{"type": "null"}]},- "n": {+ "api": {"anyOf": [{- "type": "number"+ "$ref": "#/$defs/SystemAPI"},{"type": "null"}]},- "notebook": {+ "appearance": {"anyOf": [{- "type": "string"+ "$ref": "#/$defs/SettingAppearance"},{"type": "null"}]- }- },- "required": [- "id"- ],- "additionalProperties": false- },- "TaskListMarkerRequestInput": {- "type": "object",- "properties": {- "id": {- "type": "string"},- "marker": {- "type": "string"- }- },- "required": [- "id",- "marker"- ],- "additionalProperties": false- },- "TemplateDocumentInfo": {- "type": "object",- "properties": {- "directory": {- "type": "string"+ "bazaar": {+ "anyOf": [+ {+ "$ref": "#/$defs/SettingBazaar"+ },+ {+ "type": "null"+ }+ ]},- "hasDatabase": {- "type": "boolean"+ "cloudRegion": {+ "type": "integer"},- "name": {- "type": "string"- }- },- "required": [- "directory",- "hasDatabase",- "name"- ],- "additionalProperties": false- },- "TemplateDocumentRequestInput": {- "type": "object",- "properties": {- "id": {+ "cookieKey": {"type": "string"- }- },- "required": [- "id"- ],- "additionalProperties": false- },- "TemplateFileEntry": {- "type": "object",- "properties": {- "isDir": {- "type": "boolean"- },- "isPackage": {- "type": "boolean"},- "path": {- "type": "string"- }- },- "required": [- "isDir",- "path"- ],- "additionalProperties": false- },- "TemplateFileRequestInput": {- "type": "object",- "properties": {- "action": {- "type": "string"+ "dataIndexState": {+ "type": "integer"},- "content": {- "type": "string"+ "editor": {+ "anyOf": [+ {+ "$ref": "#/$defs/SettingEditor"+ },+ {+ "type": "null"+ }+ ]},- "path": {- "type": "string"+ "export": {+ "anyOf": [+ {+ "$ref": "#/$defs/SettingExport"+ },+ {+ "type": "null"+ }+ ]},- "revision": {- "type": "string"+ "fileTree": {+ "anyOf": [+ {+ "$ref": "#/$defs/SettingFileTree"+ },+ {+ "type": "null"+ }+ ]},- "target": {- "type": "string"- }- },- "additionalProperties": false- },- "TemplateFileRevision": {- "type": "object",- "properties": {- "revision": {- "type": "string"- }- },- "required": [- "revision"- ],- "additionalProperties": false- },- "TemplateFileSource": {- "type": "object",- "properties": {- "content": {- "type": "string"+ "flashcard": {+ "anyOf": [+ {+ "$ref": "#/$defs/SettingFlashcard"+ },+ {+ "type": "null"+ }+ ]},- "path": {- "type": "string"+ "graph": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemGraph"+ },+ {+ "type": "null"+ }+ ]},- "revision": {- "type": "string"- }- },- "required": [- "content",- "revision"- ],- "additionalProperties": false- },- "TemplatePlan": {- "type": "object",- "properties": {- "count": {- "type": "integer"+ "keymap": {+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "$ref": "#/$defs/JSONValue"+ }+ },+ {+ "type": "null"+ }+ ]},- "id": {+ "lang": {"type": "string"},- "nodes": {+ "langs": {"anyOf": [{"type": "array","items": {"anyOf": [{- "$ref": "#/$defs/TemplatePlanNode"+ "$ref": "#/$defs/SystemLang"},{"type": "null"@@ -41781,135 +41700,87 @@"type": "null"}]- }- },- "required": [- "count",- "id",- "nodes"- ],- "additionalProperties": false- },- "TemplatePlanNode": {- "type": "object",- "properties": {- "depth": {- "type": "integer"},- "hPath": {+ "logLevel": {"type": "string"},- "id": {+ "mcpOAuth": {"type": "string"},- "parentID": {- "type": "string"+ "notebookCrypto": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemNotebookCrypto"+ },+ {+ "type": "null"+ }+ ]},- "title": {- "type": "string"- }- },- "required": [- "depth",- "hPath",- "id",- "parentID",- "title"- ],- "additionalProperties": false- },- "TransferBlockRefRequestInput": {- "type": "object",- "properties": {- "fromID": {- "type": "string"+ "oidc": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemOIDC"+ },+ {+ "type": "null"+ }+ ]},- "refIDs": {+ "onboarding": {"anyOf": [{- "type": "array",- "items": {- "type": "string"- }+ "$ref": "#/$defs/SystemOnboarding"},{"type": "null"}]},- "reloadUI": {+ "publish": {"anyOf": [{- "type": "boolean"+ "$ref": "#/$defs/SettingPublish"},{"type": "null"}]},- "toID": {- "type": "string"- }- },- "required": [- "fromID",- "toID"- ],- "additionalProperties": false- },- "TreeStatData": {- "type": "object",- "properties": {- "containsEmbed": {+ "readonly": {"type": "boolean"},- "embedStat": {+ "repo": {"anyOf": [{- "$ref": "#/$defs/EmbedStat"+ "$ref": "#/$defs/SystemRepo"},{"type": "null"}]},- "reqId": {- "$ref": "#/$defs/JSONValue"- },- "stat": {+ "search": {"anyOf": [{- "$ref": "#/$defs/BlockStat"+ "$ref": "#/$defs/SettingSearch"},{"type": "null"}]},- "statWithEmbed": {+ "secrets": {"anyOf": [{- "$ref": "#/$defs/BlockStat"+ "$ref": "#/$defs/SettingSecrets"},{"type": "null"}]- }- },- "required": [- "reqId",- "stat"- ],- "additionalProperties": false- },- "TreeStatRequestInput": {- "type": "object",- "properties": {- "id": {- "type": "string"},- "ids": {+ "serverAddrs": {"anyOf": [{"type": "array",@@ -41922,474 +41793,719 @@}]},- "includeEmbed": {+ "showChangelog": {+ "type": "boolean"+ },+ "snippet": {"anyOf": [{- "type": "boolean"+ "$ref": "#/$defs/SettingSnpt"},{"type": "null"}]},- "notebook": {+ "stat": {"anyOf": [{- "type": "string"+ "$ref": "#/$defs/SystemStat"},{"type": "null"}]},- "reqId": {+ "sync": {"anyOf": [{- "$ref": "#/$defs/JSONValue"+ "$ref": "#/$defs/SystemSync"},{"type": "null"}]- }- },- "required": [- "id"- ],- "additionalProperties": false- },- "TrimmedIDRequestInput": {- "type": "object",- "properties": {- "id": {- "type": "string"- }- },- "required": [- "id"- ],- "additionalProperties": false- },- "UnfoldedParentData": {- "type": "object",- "properties": {- "parentID": {- "type": "string"- }- },- "required": [- "parentID"- ],- "additionalProperties": false- },- "UninstallBazaarIconRequestInput": {- "type": "object",- "properties": {- "keyword": {+ },+ "system": {"anyOf": [{- "type": "string"+ "$ref": "#/$defs/SystemSystem"},{"type": "null"}]},- "packageName": {- "type": "string"- }- },- "required": [- "packageName"- ],- "additionalProperties": false- },- "UninstallBazaarPluginRequestInput": {- "type": "object",- "properties": {- "frontend": {+ "tag": {"anyOf": [{- "type": "string"+ "$ref": "#/$defs/SystemTag"},{"type": "null"}]},- "keyword": {+ "uiLayout": {"anyOf": [{- "type": "string"+ "type": "object",+ "additionalProperties": {+ "$ref": "#/$defs/JSONValue"+ }},{"type": "null"}]},- "packageName": {+ "userData": {"type": "string"- }- },- "required": [- "packageName"- ],- "additionalProperties": false- },- "UninstallBazaarTemplateRequestInput": {- "type": "object",- "properties": {- "keyword": {+ },+ "variables": {"anyOf": [{- "type": "string"+ "$ref": "#/$defs/SettingVariables"},{"type": "null"}]- },- "packageName": {- "type": "string"}},"required": [- "packageName"+ "accessAuthCode",+ "ai",+ "api",+ "appearance",+ "bazaar",+ "cloudRegion",+ "cookieKey",+ "dataIndexState",+ "editor",+ "export",+ "fileTree",+ "flashcard",+ "graph",+ "keymap",+ "lang",+ "langs",+ "logLevel",+ "mcpOAuth",+ "notebookCrypto",+ "oidc",+ "onboarding",+ "publish",+ "readonly",+ "repo",+ "search",+ "secrets",+ "serverAddrs",+ "showChangelog",+ "snippet",+ "stat",+ "sync",+ "system",+ "tag",+ "uiLayout",+ "userData",+ "variables"],"additionalProperties": false},- "UninstallBazaarThemeRequestInput": {+ "SystemAppearanceData": {"type": "object","properties": {- "frontend": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "keyword": {+ "appearance": {"anyOf": [{- "type": "string"+ "$ref": "#/$defs/SettingAppearance"},{"type": "null"}]- },- "packageName": {- "type": "string"}},"required": [- "packageName"+ "appearance"],"additionalProperties": false},- "UninstallBazaarWidgetRequestInput": {+ "SystemAppearanceModeRequestInput": {"type": "object","properties": {- "keyword": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "packageName": {- "type": "string"+ "mode": {+ "type": "number"}},"required": [- "packageName"+ "mode"],"additionalProperties": false},- "UnlockNotebookRequestInput": {+ "SystemArgon2Params": {"type": "object","properties": {- "notebook": {- "type": "string"+ "iterations": {+ "type": "integer"},- "password": {- "type": "string"+ "keyLength": {+ "type": "integer"+ },+ "memory": {+ "type": "integer"+ },+ "parallelism": {+ "type": "integer"}},"required": [- "notebook",- "password"+ "iterations",+ "keyLength",+ "memory",+ "parallelism"],"additionalProperties": false},- "UnzipRequestInput": {+ "SystemChangelogData": {"type": "object","properties": {- "path": {+ "html": {"type": "string"},- "zipPath": {+ "show": {+ "type": "boolean"+ },+ "version": {"type": "string"}},"required": [- "path",- "zipPath"+ "html",+ "show",+ "version"],"additionalProperties": false},- "UpdateBazaarPackageRequestInput": {+ "SystemChangelogRequestInput": {"type": "object","properties": {- "frontend": {- "type": "string"- },- "keyword": {+ "force": {"anyOf": [{- "type": "string"+ "type": "boolean"},{"type": "null"}]- },- "packageName": {- "type": "string"- },- "packageType": {- "type": "string"}},- "required": [- "frontend",- "packageName",- "packageType"+ "additionalProperties": false+ },+ "SystemCheckUpdateRequestInput": {+ "type": "object",+ "properties": {+ "showMsg": {+ "type": "boolean"+ }+ },+ "required": [+ "showMsg"],"additionalProperties": false},- "UpdateBlockRequestInput": {+ "SystemConfData": {"type": "object","properties": {- "data": {- "type": "string"- },- "dataType": {- "type": "string"- },- "id": {- "type": "string"- },- "lockType": {+ "conf": {"anyOf": [{- "type": "boolean"+ "$ref": "#/$defs/SystemAppConf"},{"type": "null"}]+ },+ "isPublish": {+ "type": "boolean"+ },+ "start": {+ "type": "boolean"}},"required": [- "data",- "dataType",- "id"+ "conf",+ "isPublish",+ "start"],"additionalProperties": false},- "UpdateChannelRequestInput": {+ "SystemCustomEmojiRequestInput": {"type": "object","properties": {- "updateChannel": {+ "file": {+ "type": "string",+ "format": "binary"+ },+ "name": {+ "type": "string"+ },+ "url": {"type": "string"}},- "required": [- "updateChannel"- ],"additionalProperties": false},- "UpdateEmbedBlockRequestInput": {+ "SystemCustomFont": {"type": "object","properties": {- "content": {+ "aliases": {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ "displayName": {+ "type": "string"+ },+ "family": {"type": "string"},"id": {"type": "string"+ },+ "spacing": {+ "type": "string"+ },+ "url": {+ "type": "string"+ },+ "weight": {+ "type": "integer"}},"required": [- "content",- "id"+ "displayName",+ "family",+ "id",+ "url",+ "weight"],"additionalProperties": false},- "UpdatePinnedDocsRequestInput": {+ "SystemD3": {"type": "object","properties": {- "action": {- "type": "string"- },- "after": {+ "arrow": {"type": "boolean"},- "ids": {- "type": "array",- "items": {- "type": "string"- }+ "centerStrength": {+ "type": "number"},- "targetID": {- "type": "string"+ "collideRadius": {+ "type": "number"+ },+ "collideStrength": {+ "type": "number"+ },+ "lineOpacity": {+ "type": "number"+ },+ "linkDistance": {+ "type": "integer"+ },+ "linkWidth": {+ "type": "number"+ },+ "nodeSize": {+ "type": "number"}},"required": [- "action",- "ids"+ "arrow",+ "centerStrength",+ "collideRadius",+ "collideStrength",+ "lineOpacity",+ "linkDistance",+ "linkWidth",+ "nodeSize"],"additionalProperties": false},- "UploadAssetRequestInput": {+ "SystemEmoji": {"type": "object","properties": {- "assetsDirPath": {+ "description": {"type": "string"},- "file[]": {- "type": "array",- "items": {- "type": "string",- "format": "binary"- }+ "description_ja_jp": {+ "type": "string"},- "id": {+ "description_zh_cn": {+ "type": "string"+ },+ "keywords": {+ "type": "string"+ },+ "unicode": {"type": "string"}},+ "required": [+ "description",+ "description_ja_jp",+ "description_zh_cn",+ "keywords",+ "unicode"+ ],"additionalProperties": false},- "UploadCloudSnapshotRequestInput": {+ "SystemEmojiGroup": {"type": "object","properties": {"id": {"type": "string"},- "tag": {+ "items": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemEmoji"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "title": {+ "type": "string"+ },+ "title_ja_jp": {+ "type": "string"+ },+ "title_zh_cn": {"type": "string"}},"required": ["id",- "tag"+ "items",+ "title",+ "title_ja_jp",+ "title_zh_cn"],"additionalProperties": false},- "ViewStatePatchRequestInput": {+ "SystemExitData": {"type": "object","properties": {- "key": {+ "closeTimeout": {+ "type": "integer"+ },+ "installPkgPath": {"type": "string"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ "SystemExitRequestInput": {+ "type": "object",+ "properties": {+ "execInstallPkg": {+ "anyOf": [+ {+ "type": "number"+ },+ {+ "type": "null"+ }+ ]},- "removeKeys": {+ "force": {"anyOf": [{- "type": "array",- "items": {- "type": "string"- }+ "type": "boolean"},{"type": "null"}]},- "values": {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/JSONValue"- }+ "setCurrentWorkspace": {+ "anyOf": [+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "additionalProperties": false+ },+ "SystemExportConfData": {+ "type": "object",+ "properties": {+ "name": {+ "type": "string"+ },+ "zip": {+ "type": "string"}},"required": [- "key"+ "name",+ "zip"],"additionalProperties": false},- "VirtualBlockRefRequestInput": {+ "SystemFont": {"type": "object","properties": {- "keywords": {+ "aliases": {"type": "array","items": {"type": "string"}+ },+ "displayName": {+ "type": "string"+ },+ "family": {+ "type": "string"+ },+ "spacing": {+ "type": "string"+ },+ "weight": {+ "type": "integer"}},"required": [- "keywords"+ "displayName",+ "family",+ "weight"],"additionalProperties": false},- "WPSPresentationData": {+ "SystemGlobalGraph": {"type": "object","properties": {- "converted": {+ "d3": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemD3"+ },+ {+ "type": "null"+ }+ ]+ },+ "dailyNote": {"type": "boolean"},- "dom": {+ "minRefs": {+ "type": "integer"+ },+ "type": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemTypeFilter"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "d3",+ "dailyNote",+ "minRefs",+ "type"+ ],+ "additionalProperties": false+ },+ "SystemGraph": {+ "type": "object",+ "properties": {+ "global": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemGlobalGraph"+ },+ {+ "type": "null"+ }+ ]+ },+ "local": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemLocalGraph"+ },+ {+ "type": "null"+ }+ ]+ },+ "maxBlocks": {+ "type": "integer"+ }+ },+ "required": [+ "global",+ "local",+ "maxBlocks"+ ],+ "additionalProperties": false+ },+ "SystemImportConfRequestInput": {+ "type": "object",+ "properties": {+ "file": {+ "type": "array",+ "items": {+ "type": "string",+ "format": "binary"+ }+ }+ },+ "additionalProperties": false+ },+ "SystemImportFileRequestInput": {+ "type": "object",+ "properties": {+ "file": {+ "type": "string",+ "format": "binary"+ }+ },+ "additionalProperties": false+ },+ "SystemLANSync": {+ "type": "object",+ "properties": {+ "enabled": {+ "type": "boolean"+ },+ "maxConcurrentReqs": {+ "type": "integer"+ }+ },+ "required": [+ "enabled",+ "maxConcurrentReqs"+ ],+ "additionalProperties": false+ },+ "SystemLang": {+ "type": "object",+ "properties": {+ "label": {+ "type": "string"+ },+ "name": {"type": "string"}},"required": [- "converted",- "dom"+ "label",+ "name"],"additionalProperties": false},- "WPSPresentationRequestInput": {+ "SystemLocal": {"type": "object","properties": {- "data": {+ "concurrentReqs": {+ "type": "integer"+ },+ "endpoint": {"type": "string"},- "text": {+ "timeout": {+ "type": "integer"+ }+ },+ "required": [+ "concurrentReqs",+ "endpoint",+ "timeout"+ ],+ "additionalProperties": false+ },+ "SystemLocalGraph": {+ "type": "object",+ "properties": {+ "d3": {"anyOf": [{- "type": "string"+ "$ref": "#/$defs/SystemD3"},{"type": "null"}]},+ "dailyNote": {+ "type": "boolean"+ },"type": {- "type": "string"+ "anyOf": [+ {+ "$ref": "#/$defs/SystemTypeFilter"+ },+ {+ "type": "null"+ }+ ]}},"required": [- "data",+ "d3",+ "dailyNote","type"],"additionalProperties": false},- "WordCountData": {+ "SystemLoginAuthRequestInput": {"type": "object","properties": {- "reqId": {- "$ref": "#/$defs/JSONValue"+ "authCode": {+ "type": "string"},- "stat": {+ "captcha": {"anyOf": [{- "$ref": "#/$defs/BlockStat"+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "rememberMe": {+ "anyOf": [+ {+ "type": "boolean"},{"type": "null"@@ -42398,58 +42514,175 @@}},"required": [- "reqId",- "stat"+ "authCode"],"additionalProperties": false},- "WorkspaceAVBuiltinColorUpdateInput": {+ "SystemMessageData": {"type": "object","properties": {- "customized": {+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "msg"+ ],+ "additionalProperties": false+ },+ "SystemNetworkProxy": {+ "type": "object",+ "properties": {+ "host": {+ "type": "string"+ },+ "port": {+ "type": "string"+ },+ "scheme": {+ "type": "string"+ }+ },+ "required": [+ "host",+ "port",+ "scheme"+ ],+ "additionalProperties": false+ },+ "SystemNotebookCrypto": {+ "type": "object",+ "properties": {+ "autoLockMinutes": {+ "type": "integer"+ },+ "backupID": {+ "type": "string"+ },+ "checksum": {+ "type": "string"+ },+ "createdAt": {+ "type": "integer"+ },+ "enabled": {+ "type": "boolean"+ },+ "historyKEKs": {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "kdfParams": {+ "$ref": "#/$defs/SystemArgon2Params"+ },+ "kekMAC": {+ "type": "string"+ },+ "kekVerifier": {"anyOf": [{- "type": "boolean"+ "type": "string"},{"type": "null"}]},- "dark": {+ "masterSalt": {"anyOf": [{- "$ref": "#/$defs/InlineStyleThemeInput"+ "type": "string"},{"type": "null"}]},- "hidden": {+ "spec": {+ "type": "integer"+ },+ "verifierNonce": {"anyOf": [{- "type": "boolean"+ "type": "string"},{"type": "null"}]+ }+ },+ "required": [+ "autoLockMinutes",+ "enabled",+ "kdfParams",+ "kekVerifier",+ "masterSalt",+ "spec",+ "verifierNonce"+ ],+ "additionalProperties": false+ },+ "SystemOIDC": {+ "type": "object",+ "properties": {+ "allowAll": {+ "type": "boolean"},- "index": {+ "claimRules": {"anyOf": [{- "type": "integer"+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemOIDCClaimRule"+ },+ {+ "type": "null"+ }+ ]+ }},{"type": "null"}]},- "light": {+ "clientID": {+ "type": "string"+ },+ "clientSecret": {+ "type": "string"+ },+ "enabled": {+ "type": "boolean"+ },+ "issuerURL": {+ "type": "string"+ },+ "provider": {+ "type": "string"+ },+ "redirectURL": {+ "type": "string"+ },+ "scopes": {"anyOf": [{- "$ref": "#/$defs/InlineStyleThemeInput"+ "type": "array",+ "items": {+ "type": "string"+ }},{"type": "null"@@ -42457,109 +42690,6780 @@]}},- "additionalProperties": false- },- "WorkspaceAVPaletteRequestInput": {- "type": "object",- "properties": {- "app": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "builtinColors": {- "anyOf": [- {- "type": "array",- "items": {+ "required": [+ "allowAll",+ "claimRules",+ "clientID",+ "clientSecret",+ "enabled",+ "issuerURL",+ "provider",+ "redirectURL",+ "scopes"+ ],+ "additionalProperties": false+ },+ "SystemOIDCActivateData": {+ "type": "object",+ "properties": {+ "config": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemOIDC"+ },+ {+ "type": "null"+ }+ ]+ },+ "status": {+ "type": "string",+ "enum": [+ "completed"+ ]+ }+ },+ "required": [+ "config",+ "status"+ ],+ "additionalProperties": false+ },+ "SystemOIDCCallbackRequestInput": {+ "type": "object",+ "properties": {+ "code": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "error": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "state": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "additionalProperties": false+ },+ "SystemOIDCClaimRule": {+ "type": "object",+ "properties": {+ "claim": {+ "type": "string"+ },+ "operator": {+ "type": "string"+ },+ "values": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "claim",+ "operator",+ "values"+ ],+ "additionalProperties": false+ },+ "SystemOIDCClaimRuleInput": {+ "type": "object",+ "properties": {+ "claim": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "operator": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "values": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "additionalProperties": false+ },+ "SystemOIDCCompletedData": {+ "type": "object",+ "properties": {+ "status": {+ "type": "string",+ "enum": [+ "completed"+ ]+ },+ "to": {+ "type": "string"+ }+ },+ "required": [+ "status",+ "to"+ ],+ "additionalProperties": false+ },+ "SystemOIDCMobileData": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemOIDCMobileValidationData"+ },+ {+ "$ref": "#/$defs/SystemOIDCMobileRedirectData"+ }+ ]+ },+ "SystemOIDCMobileRedirectData": {+ "type": "object",+ "properties": {+ "to": {+ "type": "string"+ }+ },+ "required": [+ "to"+ ],+ "additionalProperties": false+ },+ "SystemOIDCMobileRequestInput": {+ "type": "object",+ "properties": {+ "callbackURL": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "additionalProperties": false+ },+ "SystemOIDCMobileValidationData": {+ "type": "object",+ "properties": {+ "validation": {+ "type": "boolean",+ "enum": [+ true+ ]+ }+ },+ "required": [+ "validation"+ ],+ "additionalProperties": false+ },+ "SystemOIDCPendingData": {+ "type": "object",+ "properties": {+ "status": {+ "type": "string",+ "enum": [+ "pending"+ ]+ }+ },+ "required": [+ "status"+ ],+ "additionalProperties": false+ },+ "SystemOIDCPollData": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemOIDCPendingData"+ },+ {+ "$ref": "#/$defs/SystemOIDCCompletedData"+ }+ ]+ },+ "SystemOIDCPollRequestInput": {+ "type": "object",+ "properties": {+ "pollToken": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "additionalProperties": false+ },+ "SystemOIDCRequestInput": {+ "type": "object",+ "properties": {+ "allowAll": {+ "anyOf": [+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ },+ "claimRules": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemOIDCClaimRuleInput"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "clientID": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "clientSecret": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "enabled": {+ "anyOf": [+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ },+ "issuerURL": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "provider": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "redirectURL": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "scopes": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "additionalProperties": false+ },+ "SystemOIDCStartData": {+ "type": "object",+ "properties": {+ "authURL": {+ "type": "string"+ },+ "expiresIn": {+ "type": "integer"+ },+ "pollToken": {+ "type": "string"+ }+ },+ "required": [+ "authURL",+ "expiresIn"+ ],+ "additionalProperties": false+ },+ "SystemOIDCStartRequestInput": {+ "type": "object",+ "properties": {+ "flow": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "rememberMe": {+ "anyOf": [+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ },+ "to": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "additionalProperties": false+ },+ "SystemOIDCValidatePollData": {+ "type": "object",+ "properties": {+ "status": {+ "type": "string",+ "enum": [+ "pending",+ "completed"+ ]+ }+ },+ "required": [+ "status"+ ],+ "additionalProperties": false+ },+ "SystemOnboarding": {+ "type": "object",+ "properties": {+ "dismissed": {+ "type": "boolean"+ },+ "documentID": {+ "type": "string"+ },+ "newUser": {+ "type": "boolean"+ },+ "notebookID": {+ "type": "string"+ },+ "state": {+ "type": "string"+ }+ },+ "required": [+ "dismissed",+ "documentID",+ "newUser",+ "notebookID",+ "state"+ ],+ "additionalProperties": false+ },+ "SystemPathData": {+ "type": "object",+ "properties": {+ "path": {+ "type": "string"+ }+ },+ "required": [+ "path"+ ],+ "additionalProperties": false+ },+ "SystemPathRequestInput": {+ "type": "object",+ "properties": {+ "path": {+ "type": "string"+ }+ },+ "required": [+ "path"+ ],+ "additionalProperties": false+ },+ "SystemRemoveCustomFontData": {+ "type": "object",+ "properties": {+ "appearance": {+ "anyOf": [+ {+ "$ref": "#/$defs/SettingAppearance"+ },+ {+ "type": "null"+ }+ ]+ },+ "editor": {+ "anyOf": [+ {+ "$ref": "#/$defs/SettingEditor"+ },+ {+ "type": "null"+ }+ ]+ },+ "font": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemCustomFont"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "appearance",+ "editor",+ "font"+ ],+ "additionalProperties": false+ },+ "SystemRemoveCustomFontRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "additionalProperties": false+ },+ "SystemRepo": {+ "type": "object",+ "properties": {+ "indexRetentionDays": {+ "type": "integer"+ },+ "key": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "retentionIndexesDaily": {+ "type": "integer"+ },+ "syncIndexTiming": {+ "type": "integer"+ }+ },+ "required": [+ "indexRetentionDays",+ "key",+ "retentionIndexesDaily",+ "syncIndexTiming"+ ],+ "additionalProperties": false+ },+ "SystemS3": {+ "type": "object",+ "properties": {+ "accessKey": {+ "type": "string"+ },+ "bucket": {+ "type": "string"+ },+ "concurrentReqs": {+ "type": "integer"+ },+ "endpoint": {+ "type": "string"+ },+ "pathStyle": {+ "type": "boolean"+ },+ "region": {+ "type": "string"+ },+ "secretKey": {+ "type": "string"+ },+ "skipTlsVerify": {+ "type": "boolean"+ },+ "timeout": {+ "type": "integer"+ }+ },+ "required": [+ "accessKey",+ "bucket",+ "concurrentReqs",+ "endpoint",+ "pathStyle",+ "region",+ "secretKey",+ "skipTlsVerify",+ "timeout"+ ],+ "additionalProperties": false+ },+ "SystemStat": {+ "type": "object",+ "properties": {+ "assetsSize": {+ "type": "integer"+ },+ "blockCount": {+ "type": "integer"+ },+ "cAssetsSize": {+ "type": "integer"+ },+ "cBlockCount": {+ "type": "integer"+ },+ "cDataSize": {+ "type": "integer"+ },+ "cTreeCount": {+ "type": "integer"+ },+ "dataSize": {+ "type": "integer"+ },+ "treeCount": {+ "type": "integer"+ }+ },+ "required": [+ "assetsSize",+ "blockCount",+ "cAssetsSize",+ "cBlockCount",+ "cDataSize",+ "cTreeCount",+ "dataSize",+ "treeCount"+ ],+ "additionalProperties": false+ },+ "SystemSync": {+ "type": "object",+ "properties": {+ "assetDownloadMode": {+ "type": "integer"+ },+ "cloudName": {+ "type": "string"+ },+ "enabled": {+ "type": "boolean"+ },+ "generateConflictDoc": {+ "type": "boolean"+ },+ "interval": {+ "type": "integer"+ },+ "lan": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemLANSync"+ },+ {+ "type": "null"+ }+ ]+ },+ "local": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemLocal"+ },+ {+ "type": "null"+ }+ ]+ },+ "mode": {+ "type": "integer"+ },+ "perception": {+ "type": "boolean"+ },+ "provider": {+ "type": "integer"+ },+ "s3": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemS3"+ },+ {+ "type": "null"+ }+ ]+ },+ "stat": {+ "type": "string"+ },+ "synced": {+ "type": "integer"+ },+ "webdav": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemWebDAV"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "assetDownloadMode",+ "cloudName",+ "enabled",+ "generateConflictDoc",+ "interval",+ "lan",+ "local",+ "mode",+ "perception",+ "provider",+ "s3",+ "stat",+ "synced",+ "webdav"+ ],+ "additionalProperties": false+ },+ "SystemSystem": {+ "type": "object",+ "properties": {+ "appDir": {+ "type": "string"+ },+ "autoLaunch2": {+ "type": "integer"+ },+ "confDir": {+ "type": "string"+ },+ "container": {+ "type": "string"+ },+ "dataDir": {+ "type": "string"+ },+ "disabledFeatures": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "downloadInstallPkg": {+ "type": "boolean"+ },+ "homeDir": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "isMicrosoftStore": {+ "type": "boolean"+ },+ "kernelVersion": {+ "type": "string"+ },+ "lockScreenMode": {+ "type": "integer"+ },+ "microsoftDefenderExcluded": {+ "type": "boolean"+ },+ "name": {+ "type": "string"+ },+ "networkProxy": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemNetworkProxy"+ },+ {+ "type": "null"+ }+ ]+ },+ "networkServe": {+ "type": "boolean"+ },+ "networkServeTLS": {+ "type": "boolean"+ },+ "os": {+ "type": "string"+ },+ "osPlatform": {+ "type": "string"+ },+ "safeMode": {+ "type": "boolean"+ },+ "updateChannel": {+ "type": "string"+ },+ "workspaceDir": {+ "type": "string"+ }+ },+ "required": [+ "appDir",+ "autoLaunch2",+ "confDir",+ "container",+ "dataDir",+ "disabledFeatures",+ "downloadInstallPkg",+ "homeDir",+ "id",+ "isMicrosoftStore",+ "kernelVersion",+ "lockScreenMode",+ "microsoftDefenderExcluded",+ "name",+ "networkProxy",+ "networkServe",+ "networkServeTLS",+ "os",+ "osPlatform",+ "safeMode",+ "workspaceDir"+ ],+ "additionalProperties": false+ },+ "SystemTag": {+ "type": "object",+ "properties": {+ "sort": {+ "type": "integer"+ }+ },+ "required": [+ "sort"+ ],+ "additionalProperties": false+ },+ "SystemTypeFilter": {+ "type": "object",+ "properties": {+ "blockquote": {+ "type": "boolean"+ },+ "callout": {+ "type": "boolean"+ },+ "code": {+ "type": "boolean"+ },+ "heading": {+ "type": "boolean"+ },+ "list": {+ "type": "boolean"+ },+ "listItem": {+ "type": "boolean"+ },+ "math": {+ "type": "boolean"+ },+ "paragraph": {+ "type": "boolean"+ },+ "super": {+ "type": "boolean"+ },+ "table": {+ "type": "boolean"+ },+ "tag": {+ "type": "boolean"+ }+ },+ "required": [+ "blockquote",+ "callout",+ "code",+ "heading",+ "list",+ "listItem",+ "math",+ "paragraph",+ "super",+ "table",+ "tag"+ ],+ "additionalProperties": false+ },+ "SystemUILayoutRequestInput": {+ "type": "object",+ "properties": {+ "layout": {+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "$ref": "#/$defs/JSONValue"+ }+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "additionalProperties": false+ },+ "SystemUIProcessRequestInput": {+ "type": "object",+ "properties": {+ "pid": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "additionalProperties": false+ },+ "SystemWebDAV": {+ "type": "object",+ "properties": {+ "concurrentReqs": {+ "type": "integer"+ },+ "endpoint": {+ "type": "string"+ },+ "password": {+ "type": "string"+ },+ "skipTlsVerify": {+ "type": "boolean"+ },+ "timeout": {+ "type": "integer"+ },+ "username": {+ "type": "string"+ }+ },+ "required": [+ "concurrentReqs",+ "endpoint",+ "password",+ "skipTlsVerify",+ "timeout",+ "username"+ ],+ "additionalProperties": false+ },+ "SystemWorkspace": {+ "type": "object",+ "properties": {+ "closed": {+ "type": "boolean"+ },+ "path": {+ "type": "string"+ }+ },+ "required": [+ "closed",+ "path"+ ],+ "additionalProperties": false+ },+ "SystemWorkspaceCheckData": {+ "type": "object",+ "properties": {+ "isWorkspace": {+ "type": "boolean"+ }+ },+ "required": [+ "isWorkspace"+ ],+ "additionalProperties": false+ },+ "SystemZipData": {+ "type": "object",+ "properties": {+ "zip": {+ "type": "string"+ }+ },+ "required": [+ "zip"+ ],+ "additionalProperties": false+ },+ "TagData": {+ "type": "object",+ "properties": {+ "children": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/TagData"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "count": {+ "type": "integer"+ },+ "depth": {+ "type": "integer"+ },+ "label": {+ "type": "string"+ },+ "name": {+ "type": "string"+ },+ "type": {+ "type": "string"+ }+ },+ "required": [+ "children",+ "count",+ "depth",+ "label",+ "name",+ "type"+ ],+ "additionalProperties": false+ },+ "TagSnapshotRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ },+ "name": {+ "type": "string"+ }+ },+ "required": [+ "id",+ "name"+ ],+ "additionalProperties": false+ },+ "TailChildBlocksRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ },+ "ids": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "n": {+ "anyOf": [+ {+ "type": "number"+ },+ {+ "type": "null"+ }+ ]+ },+ "notebook": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "id"+ ],+ "additionalProperties": false+ },+ "TaskListMarkerRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ },+ "marker": {+ "type": "string"+ }+ },+ "required": [+ "id",+ "marker"+ ],+ "additionalProperties": false+ },+ "TemplateDocumentInfo": {+ "type": "object",+ "properties": {+ "directory": {+ "type": "string"+ },+ "hasDatabase": {+ "type": "boolean"+ },+ "name": {+ "type": "string"+ }+ },+ "required": [+ "directory",+ "hasDatabase",+ "name"+ ],+ "additionalProperties": false+ },+ "TemplateDocumentRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ }+ },+ "required": [+ "id"+ ],+ "additionalProperties": false+ },+ "TemplateFileEntry": {+ "type": "object",+ "properties": {+ "isDir": {+ "type": "boolean"+ },+ "isPackage": {+ "type": "boolean"+ },+ "path": {+ "type": "string"+ }+ },+ "required": [+ "isDir",+ "path"+ ],+ "additionalProperties": false+ },+ "TemplateFileRequestInput": {+ "type": "object",+ "properties": {+ "action": {+ "type": "string"+ },+ "content": {+ "type": "string"+ },+ "path": {+ "type": "string"+ },+ "revision": {+ "type": "string"+ },+ "target": {+ "type": "string"+ }+ },+ "additionalProperties": false+ },+ "TemplateFileRevision": {+ "type": "object",+ "properties": {+ "revision": {+ "type": "string"+ }+ },+ "required": [+ "revision"+ ],+ "additionalProperties": false+ },+ "TemplateFileSource": {+ "type": "object",+ "properties": {+ "content": {+ "type": "string"+ },+ "path": {+ "type": "string"+ },+ "revision": {+ "type": "string"+ }+ },+ "required": [+ "content",+ "revision"+ ],+ "additionalProperties": false+ },+ "TemplatePlan": {+ "type": "object",+ "properties": {+ "count": {+ "type": "integer"+ },+ "id": {+ "type": "string"+ },+ "nodes": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/TemplatePlanNode"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "count",+ "id",+ "nodes"+ ],+ "additionalProperties": false+ },+ "TemplatePlanNode": {+ "type": "object",+ "properties": {+ "depth": {+ "type": "integer"+ },+ "hPath": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "parentID": {+ "type": "string"+ },+ "title": {+ "type": "string"+ }+ },+ "required": [+ "depth",+ "hPath",+ "id",+ "parentID",+ "title"+ ],+ "additionalProperties": false+ },+ "TransferBlockRefRequestInput": {+ "type": "object",+ "properties": {+ "fromID": {+ "type": "string"+ },+ "refIDs": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "reloadUI": {+ "anyOf": [+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ },+ "toID": {+ "type": "string"+ }+ },+ "required": [+ "fromID",+ "toID"+ ],+ "additionalProperties": false+ },+ "TreeStatData": {+ "type": "object",+ "properties": {+ "containsEmbed": {+ "type": "boolean"+ },+ "embedStat": {+ "anyOf": [+ {+ "$ref": "#/$defs/EmbedStat"+ },+ {+ "type": "null"+ }+ ]+ },+ "reqId": {+ "$ref": "#/$defs/JSONValue"+ },+ "stat": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockStat"+ },+ {+ "type": "null"+ }+ ]+ },+ "statWithEmbed": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockStat"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "reqId",+ "stat"+ ],+ "additionalProperties": false+ },+ "TreeStatRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ },+ "ids": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "includeEmbed": {+ "anyOf": [+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ },+ "notebook": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "reqId": {+ "anyOf": [+ {+ "$ref": "#/$defs/JSONValue"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "id"+ ],+ "additionalProperties": false+ },+ "TrimmedIDRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ }+ },+ "required": [+ "id"+ ],+ "additionalProperties": false+ },+ "UnfoldedParentData": {+ "type": "object",+ "properties": {+ "parentID": {+ "type": "string"+ }+ },+ "required": [+ "parentID"+ ],+ "additionalProperties": false+ },+ "UninstallBazaarIconRequestInput": {+ "type": "object",+ "properties": {+ "keyword": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "packageName": {+ "type": "string"+ }+ },+ "required": [+ "packageName"+ ],+ "additionalProperties": false+ },+ "UninstallBazaarPluginRequestInput": {+ "type": "object",+ "properties": {+ "frontend": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "keyword": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "packageName": {+ "type": "string"+ }+ },+ "required": [+ "packageName"+ ],+ "additionalProperties": false+ },+ "UninstallBazaarTemplateRequestInput": {+ "type": "object",+ "properties": {+ "keyword": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "packageName": {+ "type": "string"+ }+ },+ "required": [+ "packageName"+ ],+ "additionalProperties": false+ },+ "UninstallBazaarThemeRequestInput": {+ "type": "object",+ "properties": {+ "frontend": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "keyword": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "packageName": {+ "type": "string"+ }+ },+ "required": [+ "packageName"+ ],+ "additionalProperties": false+ },+ "UninstallBazaarWidgetRequestInput": {+ "type": "object",+ "properties": {+ "keyword": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "packageName": {+ "type": "string"+ }+ },+ "required": [+ "packageName"+ ],+ "additionalProperties": false+ },+ "UnlockNotebookRequestInput": {+ "type": "object",+ "properties": {+ "notebook": {+ "type": "string"+ },+ "password": {+ "type": "string"+ }+ },+ "required": [+ "notebook",+ "password"+ ],+ "additionalProperties": false+ },+ "UnzipRequestInput": {+ "type": "object",+ "properties": {+ "path": {+ "type": "string"+ },+ "zipPath": {+ "type": "string"+ }+ },+ "required": [+ "path",+ "zipPath"+ ],+ "additionalProperties": false+ },+ "UpdateBazaarPackageRequestInput": {+ "type": "object",+ "properties": {+ "frontend": {+ "type": "string"+ },+ "keyword": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "packageName": {+ "type": "string"+ },+ "packageType": {+ "type": "string"+ }+ },+ "required": [+ "frontend",+ "packageName",+ "packageType"+ ],+ "additionalProperties": false+ },+ "UpdateBlockRequestInput": {+ "type": "object",+ "properties": {+ "data": {+ "type": "string"+ },+ "dataType": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "lockType": {+ "anyOf": [+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "data",+ "dataType",+ "id"+ ],+ "additionalProperties": false+ },+ "UpdateChannelRequestInput": {+ "type": "object",+ "properties": {+ "updateChannel": {+ "type": "string"+ }+ },+ "required": [+ "updateChannel"+ ],+ "additionalProperties": false+ },+ "UpdateEmbedBlockRequestInput": {+ "type": "object",+ "properties": {+ "content": {+ "type": "string"+ },+ "id": {+ "type": "string"+ }+ },+ "required": [+ "content",+ "id"+ ],+ "additionalProperties": false+ },+ "UpdatePinnedDocsRequestInput": {+ "type": "object",+ "properties": {+ "action": {+ "type": "string"+ },+ "after": {+ "type": "boolean"+ },+ "ids": {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ "targetID": {+ "type": "string"+ }+ },+ "required": [+ "action",+ "ids"+ ],+ "additionalProperties": false+ },+ "UploadAssetRequestInput": {+ "type": "object",+ "properties": {+ "assetsDirPath": {+ "type": "string"+ },+ "file[]": {+ "type": "array",+ "items": {+ "type": "string",+ "format": "binary"+ }+ },+ "id": {+ "type": "string"+ }+ },+ "additionalProperties": false+ },+ "UploadCloudSnapshotRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ },+ "tag": {+ "type": "string"+ }+ },+ "required": [+ "id",+ "tag"+ ],+ "additionalProperties": false+ },+ "ViewStatePatchRequestInput": {+ "type": "object",+ "properties": {+ "key": {+ "type": "string"+ },+ "removeKeys": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "values": {+ "type": "object",+ "additionalProperties": {+ "$ref": "#/$defs/JSONValue"+ }+ }+ },+ "required": [+ "key"+ ],+ "additionalProperties": false+ },+ "VirtualBlockRefRequestInput": {+ "type": "object",+ "properties": {+ "keywords": {+ "type": "array",+ "items": {+ "type": "string"+ }+ }+ },+ "required": [+ "keywords"+ ],+ "additionalProperties": false+ },+ "WPSPresentationData": {+ "type": "object",+ "properties": {+ "converted": {+ "type": "boolean"+ },+ "dom": {+ "type": "string"+ }+ },+ "required": [+ "converted",+ "dom"+ ],+ "additionalProperties": false+ },+ "WPSPresentationRequestInput": {+ "type": "object",+ "properties": {+ "data": {+ "type": "string"+ },+ "text": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "type": {+ "type": "string"+ }+ },+ "required": [+ "data",+ "type"+ ],+ "additionalProperties": false+ },+ "WordCountData": {+ "type": "object",+ "properties": {+ "reqId": {+ "$ref": "#/$defs/JSONValue"+ },+ "stat": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockStat"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "reqId",+ "stat"+ ],+ "additionalProperties": false+ },+ "WorkspaceAVBuiltinColorUpdateInput": {+ "type": "object",+ "properties": {+ "customized": {+ "anyOf": [+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ },+ "dark": {+ "anyOf": [+ {+ "$ref": "#/$defs/InlineStyleThemeInput"+ },+ {+ "type": "null"+ }+ ]+ },+ "hidden": {+ "anyOf": [+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ },+ "index": {+ "anyOf": [+ {+ "type": "integer"+ },+ {+ "type": "null"+ }+ ]+ },+ "light": {+ "anyOf": [+ {+ "$ref": "#/$defs/InlineStyleThemeInput"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "additionalProperties": false+ },+ "WorkspaceAVPaletteRequestInput": {+ "type": "object",+ "properties": {+ "app": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "builtinColors": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/WorkspaceAVBuiltinColorUpdateInput"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "colors": {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/AttributeViewCustomColorInput"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "order": {+ "type": "array",+ "items": {+ "type": "string"+ }+ }+ },+ "required": [+ "colors",+ "order"+ ],+ "additionalProperties": false+ },+ "WorkspaceInfoData": {+ "type": "object",+ "properties": {+ "siyuanVer": {+ "type": "string"+ },+ "workspaceDir": {+ "type": "string"+ }+ },+ "required": [+ "siyuanVer",+ "workspaceDir"+ ],+ "additionalProperties": false+ },+ "ZipRequestInput": {+ "type": "object",+ "properties": {+ "path": {+ "type": "string"+ },+ "zipPath": {+ "type": "string"+ }+ },+ "required": [+ "path",+ "zipPath"+ ],+ "additionalProperties": false+ }+ },+ "endpoints": [+ {+ "method": "CONNECT",+ "path": "/api/network/echo",+ "handler": "echo",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/NetworkEchoData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "CONNECT",+ "path": "/api/network/echo/*path",+ "handler": "echoPath",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/NetworkEchoData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "CONNECT",+ "path": "/api/network/proxy",+ "handler": "httpProxy",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "proxy",+ "proxy": {+ "kind": "http",+ "contentType": "application/octet-stream",+ "upstreamStatuses": true+ }+ },+ {+ "method": "CONNECT",+ "path": "/plugin/private/:name/*path",+ "handler": "pluginPrivateWebServer",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "$ref": "#/$defs/JSONValue"+ }+ ]+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "pluginService",+ "pluginService": {+ "variants": [+ {+ "mode": "JSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "JSONP",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/javascript",+ "application/json"+ ],+ "payload": "jsonp-or-json",+ "headersOverrideMedia": true+ },+ {+ "mode": "AsciiJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "IndentedJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "PureJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "SecureJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "secure-json",+ "headersOverrideMedia": true+ },+ {+ "mode": "XML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/xml"+ ],+ "payload": "xml",+ "headersOverrideMedia": true+ },+ {+ "mode": "YAML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/yaml"+ ],+ "payload": "yaml",+ "headersOverrideMedia": true+ },+ {+ "mode": "TOML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/toml"+ ],+ "payload": "toml",+ "headersOverrideMedia": true+ },+ {+ "mode": "ProtoBuf",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/x-protobuf"+ ],+ "payload": "protobuf",+ "headersOverrideMedia": true+ },+ {+ "mode": "file",+ "statusPolicy": "file",+ "mediaTypes": [+ "dynamic"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "string",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "text/plain"+ ],+ "payload": "text",+ "headersOverrideMedia": true+ },+ {+ "mode": "raw",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "dynamic"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "redirect",+ "statusPolicy": "redirect",+ "mediaTypes": [+ "text/html"+ ],+ "payload": "redirect",+ "headersOverrideMedia": true+ },+ {+ "mode": "proxy",+ "statusPolicy": "proxy",+ "mediaTypes": [+ "upstream"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "empty",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "optional"+ ],+ "payload": "none",+ "headersOverrideMedia": true+ },+ {+ "mode": "websocket",+ "statusPolicy": "websocket",+ "mediaTypes": [+ "upgrade-or-text"+ ],+ "payload": "frames",+ "headersOverrideMedia": false+ },+ {+ "mode": "sse",+ "statusPolicy": "sse",+ "mediaTypes": [+ "text/event-stream"+ ],+ "payload": "events",+ "headersOverrideMedia": false+ },+ {+ "mode": "admission",+ "statusPolicy": "admission",+ "mediaTypes": [+ "text/plain"+ ],+ "payload": "text",+ "headersOverrideMedia": true+ }+ ],+ "admissionStatuses": [+ 400,+ 404,+ 500,+ 503+ ],+ "webSocketFrames": [+ "text",+ "binary",+ "close",+ "ping",+ "pong"+ ],+ "sseEventNames": "dynamic",+ "sseData": "json-or-text",+ "sseEvent": {+ "type": "object",+ "properties": {+ "data": {+ "$ref": "#/$defs/JSONValue"+ },+ "event": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "retry": {+ "type": "integer"+ }+ },+ "required": [+ "data"+ ],+ "additionalProperties": false+ }+ }+ },+ {+ "method": "DELETE",+ "path": "/api/network/echo",+ "handler": "echo",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/NetworkEchoData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "DELETE",+ "path": "/api/network/echo/*path",+ "handler": "echoPath",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/NetworkEchoData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "DELETE",+ "path": "/api/network/proxy",+ "handler": "httpProxy",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "proxy",+ "proxy": {+ "kind": "http",+ "contentType": "application/octet-stream",+ "upstreamStatuses": true+ }+ },+ {+ "method": "DELETE",+ "path": "/plugin/private/:name/*path",+ "handler": "pluginPrivateWebServer",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "$ref": "#/$defs/JSONValue"+ }+ ]+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "pluginService",+ "pluginService": {+ "variants": [+ {+ "mode": "JSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "JSONP",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/javascript",+ "application/json"+ ],+ "payload": "jsonp-or-json",+ "headersOverrideMedia": true+ },+ {+ "mode": "AsciiJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "IndentedJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "PureJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "SecureJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "secure-json",+ "headersOverrideMedia": true+ },+ {+ "mode": "XML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/xml"+ ],+ "payload": "xml",+ "headersOverrideMedia": true+ },+ {+ "mode": "YAML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/yaml"+ ],+ "payload": "yaml",+ "headersOverrideMedia": true+ },+ {+ "mode": "TOML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/toml"+ ],+ "payload": "toml",+ "headersOverrideMedia": true+ },+ {+ "mode": "ProtoBuf",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/x-protobuf"+ ],+ "payload": "protobuf",+ "headersOverrideMedia": true+ },+ {+ "mode": "file",+ "statusPolicy": "file",+ "mediaTypes": [+ "dynamic"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "string",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "text/plain"+ ],+ "payload": "text",+ "headersOverrideMedia": true+ },+ {+ "mode": "raw",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "dynamic"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "redirect",+ "statusPolicy": "redirect",+ "mediaTypes": [+ "text/html"+ ],+ "payload": "redirect",+ "headersOverrideMedia": true+ },+ {+ "mode": "proxy",+ "statusPolicy": "proxy",+ "mediaTypes": [+ "upstream"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "empty",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "optional"+ ],+ "payload": "none",+ "headersOverrideMedia": true+ },+ {+ "mode": "websocket",+ "statusPolicy": "websocket",+ "mediaTypes": [+ "upgrade-or-text"+ ],+ "payload": "frames",+ "headersOverrideMedia": false+ },+ {+ "mode": "sse",+ "statusPolicy": "sse",+ "mediaTypes": [+ "text/event-stream"+ ],+ "payload": "events",+ "headersOverrideMedia": false+ },+ {+ "mode": "admission",+ "statusPolicy": "admission",+ "mediaTypes": [+ "text/plain"+ ],+ "payload": "text",+ "headersOverrideMedia": true+ }+ ],+ "admissionStatuses": [+ 400,+ 404,+ 500,+ 503+ ],+ "webSocketFrames": [+ "text",+ "binary",+ "close",+ "ping",+ "pong"+ ],+ "sseEventNames": "dynamic",+ "sseData": "json-or-text",+ "sseEvent": {+ "type": "object",+ "properties": {+ "data": {+ "$ref": "#/$defs/JSONValue"+ },+ "event": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "retry": {+ "type": "integer"+ }+ },+ "required": [+ "data"+ ],+ "additionalProperties": false+ }+ }+ },+ {+ "method": "GET",+ "path": "/api/ai/mcp/oauth/callback/:flowID",+ "handler": "mcpOAuthCallback",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "binary",+ "errorStatus": 200,+ "contentVariants": [+ {+ "status": 200,+ "contentType": "text/html"+ },+ {+ "status": 400,+ "contentType": "text/html"+ },+ {+ "status": 403,+ "contentType": "text/plain"+ }+ ]+ },+ {+ "method": "GET",+ "path": "/api/icon/getDynamicIcon",+ "handler": "getDynamicIcon",+ "body": "none",+ "request": {+ "$ref": "#/$defs/DynamicIconRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "binary",+ "errorStatus": 200,+ "contentVariants": [+ {+ "status": 200,+ "contentType": "image/svg+xml"+ }+ ],+ "emptyResponseStatuses": [+ 500+ ]+ },+ {+ "method": "GET",+ "path": "/api/network/echo",+ "handler": "echo",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/NetworkEchoData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "GET",+ "path": "/api/network/echo/*path",+ "handler": "echoPath",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/NetworkEchoData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "GET",+ "path": "/api/network/proxy",+ "handler": "httpProxy",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "proxy",+ "proxy": {+ "kind": "http",+ "contentType": "application/octet-stream",+ "upstreamStatuses": true+ }+ },+ {+ "method": "GET",+ "path": "/api/plugin",+ "handler": "listLoadedPluginsGET",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/LoadedPlugin"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "GET",+ "path": "/api/plugin/rpc",+ "handler": "getLoadedPluginRPC",+ "body": "json",+ "request": {+ "$ref": "#/$defs/LoadedPluginRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "anyOf": [+ {+ "$ref": "#/$defs/LoadedPlugin"+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1,+ 1,+ 2,+ 3,+ 4+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "GET",+ "path": "/api/plugin/rpc/:name",+ "handler": "getLoadedPluginRPCByName",+ "body": "json",+ "request": {+ "$ref": "#/$defs/LoadedPluginRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "anyOf": [+ {+ "$ref": "#/$defs/LoadedPlugin"+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1,+ 1,+ 2,+ 3,+ 4+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "GET",+ "path": "/api/system/bootProgress",+ "handler": "bootProgress",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/BootProgressData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "GET",+ "path": "/api/system/bootProgressSSE",+ "handler": "bootProgressSSE",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "sse",+ "sse": {+ "events": {+ "": {+ "$ref": "#/$defs/BootProgressData"+ }+ }+ }+ },+ {+ "method": "GET",+ "path": "/api/system/getBootAppearance",+ "handler": "getBootAppearance",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "anyOf": [+ {+ "$ref": "#/$defs/SettingBootAppearance"+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "emptyResponseStatuses": [+ 403+ ]+ },+ {+ "method": "GET",+ "path": "/api/system/getCaptcha",+ "handler": "getCaptcha",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "binary",+ "errorStatus": 200,+ "contentVariants": [+ {+ "status": 200,+ "contentType": "image/png"+ }+ ],+ "emptyResponseStatuses": [+ 500+ ]+ },+ {+ "method": "GET",+ "path": "/api/system/oidc/callback",+ "handler": "oidcCallback",+ "body": "none",+ "request": {+ "$ref": "#/$defs/SystemOIDCCallbackRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "binary",+ "errorStatus": 200,+ "contentVariants": [+ {+ "status": 200,+ "contentType": "text/html"+ },+ {+ "status": 302,+ "contentType": "text/html"+ }+ ]+ },+ {+ "method": "GET",+ "path": "/api/system/version",+ "handler": "version",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "string"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "GET",+ "path": "/es/network/proxy",+ "handler": "esProxy",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "proxy",+ "proxy": {+ "kind": "eventSource",+ "contentType": "text/event-stream",+ "upstreamStatuses": true+ }+ },+ {+ "method": "GET",+ "path": "/plugin/private/:name/*path",+ "handler": "pluginPrivateWebServer",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "$ref": "#/$defs/JSONValue"+ }+ ]+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "pluginService",+ "pluginService": {+ "variants": [+ {+ "mode": "JSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "JSONP",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/javascript",+ "application/json"+ ],+ "payload": "jsonp-or-json",+ "headersOverrideMedia": true+ },+ {+ "mode": "AsciiJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "IndentedJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "PureJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "SecureJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "secure-json",+ "headersOverrideMedia": true+ },+ {+ "mode": "XML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/xml"+ ],+ "payload": "xml",+ "headersOverrideMedia": true+ },+ {+ "mode": "YAML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/yaml"+ ],+ "payload": "yaml",+ "headersOverrideMedia": true+ },+ {+ "mode": "TOML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/toml"+ ],+ "payload": "toml",+ "headersOverrideMedia": true+ },+ {+ "mode": "ProtoBuf",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/x-protobuf"+ ],+ "payload": "protobuf",+ "headersOverrideMedia": true+ },+ {+ "mode": "file",+ "statusPolicy": "file",+ "mediaTypes": [+ "dynamic"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "string",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "text/plain"+ ],+ "payload": "text",+ "headersOverrideMedia": true+ },+ {+ "mode": "raw",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "dynamic"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "redirect",+ "statusPolicy": "redirect",+ "mediaTypes": [+ "text/html"+ ],+ "payload": "redirect",+ "headersOverrideMedia": true+ },+ {+ "mode": "proxy",+ "statusPolicy": "proxy",+ "mediaTypes": [+ "upstream"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "empty",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "optional"+ ],+ "payload": "none",+ "headersOverrideMedia": true+ },+ {+ "mode": "websocket",+ "statusPolicy": "websocket",+ "mediaTypes": [+ "upgrade-or-text"+ ],+ "payload": "frames",+ "headersOverrideMedia": false+ },+ {+ "mode": "sse",+ "statusPolicy": "sse",+ "mediaTypes": [+ "text/event-stream"+ ],+ "payload": "events",+ "headersOverrideMedia": false+ },+ {+ "mode": "admission",+ "statusPolicy": "admission",+ "mediaTypes": [+ "text/plain"+ ],+ "payload": "text",+ "headersOverrideMedia": true+ }+ ],+ "admissionStatuses": [+ 400,+ 404,+ 500,+ 503+ ],+ "webSocketFrames": [+ "text",+ "binary",+ "close",+ "ping",+ "pong"+ ],+ "sseEventNames": "dynamic",+ "sseData": "json-or-text",+ "sseEvent": {+ "type": "object",+ "properties": {+ "data": {+ "$ref": "#/$defs/JSONValue"+ },+ "event": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "retry": {+ "type": "integer"+ }+ },+ "required": [+ "data"+ ],+ "additionalProperties": false+ }+ }+ },+ {+ "method": "GET",+ "path": "/ws/network/proxy",+ "handler": "wsProxy",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "proxy",+ "proxy": {+ "kind": "websocket",+ "upstreamStatuses": false,+ "frames": [+ "text",+ "binary",+ "close"+ ]+ }+ },+ {+ "method": "GET",+ "path": "/ws/plugin/rpc",+ "handler": "pluginJsonRpcWebSocket",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCFailure"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "websocket",+ "websocket": {+ "incoming": {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCRequestFieldsInput"+ },+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/PluginRPCRequestFieldsInput"+ },+ "minItems": 1+ }+ ]+ },+ "outgoing": {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCSuccess"+ },+ {+ "$ref": "#/$defs/PluginRPCFailure"+ },+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCSuccess"+ },+ {+ "$ref": "#/$defs/PluginRPCFailure"+ }+ ]+ },+ "minItems": 1+ },+ {+ "$ref": "#/$defs/PluginRPCNotification"+ }+ ]+ },+ "failureStatus": 404+ }+ },+ {+ "method": "GET",+ "path": "/ws/plugin/rpc/:name",+ "handler": "pluginJsonRpcWebSocketByName",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCFailure"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "websocket",+ "websocket": {+ "incoming": {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCRequestFieldsInput"+ },+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/PluginRPCRequestFieldsInput"+ },+ "minItems": 1+ }+ ]+ },+ "outgoing": {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCSuccess"+ },+ {+ "$ref": "#/$defs/PluginRPCFailure"+ },+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCSuccess"+ },+ {+ "$ref": "#/$defs/PluginRPCFailure"+ }+ ]+ },+ "minItems": 1+ },+ {+ "$ref": "#/$defs/PluginRPCNotification"+ }+ ]+ },+ "failureStatus": 404+ }+ },+ {+ "method": "HEAD",+ "path": "/api/network/echo",+ "handler": "echo",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/NetworkEchoData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "HEAD",+ "path": "/api/network/echo/*path",+ "handler": "echoPath",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/NetworkEchoData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "HEAD",+ "path": "/api/network/proxy",+ "handler": "httpProxy",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "proxy",+ "proxy": {+ "kind": "http",+ "contentType": "application/octet-stream",+ "upstreamStatuses": true+ }+ },+ {+ "method": "HEAD",+ "path": "/plugin/private/:name/*path",+ "handler": "pluginPrivateWebServer",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "$ref": "#/$defs/JSONValue"+ }+ ]+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "pluginService",+ "pluginService": {+ "variants": [+ {+ "mode": "JSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "JSONP",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/javascript",+ "application/json"+ ],+ "payload": "jsonp-or-json",+ "headersOverrideMedia": true+ },+ {+ "mode": "AsciiJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "IndentedJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "PureJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "SecureJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "secure-json",+ "headersOverrideMedia": true+ },+ {+ "mode": "XML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/xml"+ ],+ "payload": "xml",+ "headersOverrideMedia": true+ },+ {+ "mode": "YAML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/yaml"+ ],+ "payload": "yaml",+ "headersOverrideMedia": true+ },+ {+ "mode": "TOML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/toml"+ ],+ "payload": "toml",+ "headersOverrideMedia": true+ },+ {+ "mode": "ProtoBuf",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/x-protobuf"+ ],+ "payload": "protobuf",+ "headersOverrideMedia": true+ },+ {+ "mode": "file",+ "statusPolicy": "file",+ "mediaTypes": [+ "dynamic"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "string",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "text/plain"+ ],+ "payload": "text",+ "headersOverrideMedia": true+ },+ {+ "mode": "raw",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "dynamic"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "redirect",+ "statusPolicy": "redirect",+ "mediaTypes": [+ "text/html"+ ],+ "payload": "redirect",+ "headersOverrideMedia": true+ },+ {+ "mode": "proxy",+ "statusPolicy": "proxy",+ "mediaTypes": [+ "upstream"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "empty",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "optional"+ ],+ "payload": "none",+ "headersOverrideMedia": true+ },+ {+ "mode": "websocket",+ "statusPolicy": "websocket",+ "mediaTypes": [+ "upgrade-or-text"+ ],+ "payload": "frames",+ "headersOverrideMedia": false+ },+ {+ "mode": "sse",+ "statusPolicy": "sse",+ "mediaTypes": [+ "text/event-stream"+ ],+ "payload": "events",+ "headersOverrideMedia": false+ },+ {+ "mode": "admission",+ "statusPolicy": "admission",+ "mediaTypes": [+ "text/plain"+ ],+ "payload": "text",+ "headersOverrideMedia": true+ }+ ],+ "admissionStatuses": [+ 400,+ 404,+ 500,+ 503+ ],+ "webSocketFrames": [+ "text",+ "binary",+ "close",+ "ping",+ "pong"+ ],+ "sseEventNames": "dynamic",+ "sseData": "json-or-text",+ "sseEvent": {+ "type": "object",+ "properties": {+ "data": {+ "$ref": "#/$defs/JSONValue"+ },+ "event": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "retry": {+ "type": "integer"+ }+ },+ "required": [+ "data"+ ],+ "additionalProperties": false+ }+ }+ },+ {+ "method": "OPTIONS",+ "path": "/api/network/echo",+ "handler": "echo",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/NetworkEchoData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "OPTIONS",+ "path": "/api/network/echo/*path",+ "handler": "echoPath",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/NetworkEchoData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "OPTIONS",+ "path": "/api/network/proxy",+ "handler": "httpProxy",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "proxy",+ "proxy": {+ "kind": "http",+ "contentType": "application/octet-stream",+ "upstreamStatuses": true+ }+ },+ {+ "method": "OPTIONS",+ "path": "/plugin/private/:name/*path",+ "handler": "pluginPrivateWebServer",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "$ref": "#/$defs/JSONValue"+ }+ ]+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "pluginService",+ "pluginService": {+ "variants": [+ {+ "mode": "JSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "JSONP",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/javascript",+ "application/json"+ ],+ "payload": "jsonp-or-json",+ "headersOverrideMedia": true+ },+ {+ "mode": "AsciiJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "IndentedJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "PureJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "SecureJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "secure-json",+ "headersOverrideMedia": true+ },+ {+ "mode": "XML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/xml"+ ],+ "payload": "xml",+ "headersOverrideMedia": true+ },+ {+ "mode": "YAML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/yaml"+ ],+ "payload": "yaml",+ "headersOverrideMedia": true+ },+ {+ "mode": "TOML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/toml"+ ],+ "payload": "toml",+ "headersOverrideMedia": true+ },+ {+ "mode": "ProtoBuf",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/x-protobuf"+ ],+ "payload": "protobuf",+ "headersOverrideMedia": true+ },+ {+ "mode": "file",+ "statusPolicy": "file",+ "mediaTypes": [+ "dynamic"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "string",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "text/plain"+ ],+ "payload": "text",+ "headersOverrideMedia": true+ },+ {+ "mode": "raw",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "dynamic"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "redirect",+ "statusPolicy": "redirect",+ "mediaTypes": [+ "text/html"+ ],+ "payload": "redirect",+ "headersOverrideMedia": true+ },+ {+ "mode": "proxy",+ "statusPolicy": "proxy",+ "mediaTypes": [+ "upstream"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "empty",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "optional"+ ],+ "payload": "none",+ "headersOverrideMedia": true+ },+ {+ "mode": "websocket",+ "statusPolicy": "websocket",+ "mediaTypes": [+ "upgrade-or-text"+ ],+ "payload": "frames",+ "headersOverrideMedia": false+ },+ {+ "mode": "sse",+ "statusPolicy": "sse",+ "mediaTypes": [+ "text/event-stream"+ ],+ "payload": "events",+ "headersOverrideMedia": false+ },+ {+ "mode": "admission",+ "statusPolicy": "admission",+ "mediaTypes": [+ "text/plain"+ ],+ "payload": "text",+ "headersOverrideMedia": true+ }+ ],+ "admissionStatuses": [+ 400,+ 404,+ 500,+ 503+ ],+ "webSocketFrames": [+ "text",+ "binary",+ "close",+ "ping",+ "pong"+ ],+ "sseEventNames": "dynamic",+ "sseData": "json-or-text",+ "sseEvent": {+ "type": "object",+ "properties": {+ "data": {+ "$ref": "#/$defs/JSONValue"+ },+ "event": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "retry": {+ "type": "integer"+ }+ },+ "required": [+ "data"+ ],+ "additionalProperties": false+ }+ }+ },+ {+ "method": "PATCH",+ "path": "/api/network/echo",+ "handler": "echo",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/NetworkEchoData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "PATCH",+ "path": "/api/network/echo/*path",+ "handler": "echoPath",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/NetworkEchoData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "PATCH",+ "path": "/api/network/proxy",+ "handler": "httpProxy",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "proxy",+ "proxy": {+ "kind": "http",+ "contentType": "application/octet-stream",+ "upstreamStatuses": true+ }+ },+ {+ "method": "PATCH",+ "path": "/plugin/private/:name/*path",+ "handler": "pluginPrivateWebServer",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "anyOf": [+ {+ "type": "string",+ "format": "binary"+ },+ {+ "$ref": "#/$defs/JSONValue"+ }+ ]+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "pluginService",+ "pluginService": {+ "variants": [+ {+ "mode": "JSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "JSONP",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/javascript",+ "application/json"+ ],+ "payload": "jsonp-or-json",+ "headersOverrideMedia": true+ },+ {+ "mode": "AsciiJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "IndentedJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "PureJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "json",+ "headersOverrideMedia": true+ },+ {+ "mode": "SecureJSON",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/json"+ ],+ "payload": "secure-json",+ "headersOverrideMedia": true+ },+ {+ "mode": "XML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/xml"+ ],+ "payload": "xml",+ "headersOverrideMedia": true+ },+ {+ "mode": "YAML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/yaml"+ ],+ "payload": "yaml",+ "headersOverrideMedia": true+ },+ {+ "mode": "TOML",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/toml"+ ],+ "payload": "toml",+ "headersOverrideMedia": true+ },+ {+ "mode": "ProtoBuf",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "application/x-protobuf"+ ],+ "payload": "protobuf",+ "headersOverrideMedia": true+ },+ {+ "mode": "file",+ "statusPolicy": "file",+ "mediaTypes": [+ "dynamic"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "string",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "text/plain"+ ],+ "payload": "text",+ "headersOverrideMedia": true+ },+ {+ "mode": "raw",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "dynamic"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "redirect",+ "statusPolicy": "redirect",+ "mediaTypes": [+ "text/html"+ ],+ "payload": "redirect",+ "headersOverrideMedia": true+ },+ {+ "mode": "proxy",+ "statusPolicy": "proxy",+ "mediaTypes": [+ "upstream"+ ],+ "payload": "bytes",+ "headersOverrideMedia": true+ },+ {+ "mode": "empty",+ "statusPolicy": "plugin",+ "mediaTypes": [+ "optional"+ ],+ "payload": "none",+ "headersOverrideMedia": true+ },+ {+ "mode": "websocket",+ "statusPolicy": "websocket",+ "mediaTypes": [+ "upgrade-or-text"+ ],+ "payload": "frames",+ "headersOverrideMedia": false+ },+ {+ "mode": "sse",+ "statusPolicy": "sse",+ "mediaTypes": [+ "text/event-stream"+ ],+ "payload": "events",+ "headersOverrideMedia": false+ },+ {+ "mode": "admission",+ "statusPolicy": "admission",+ "mediaTypes": [+ "text/plain"+ ],+ "payload": "text",+ "headersOverrideMedia": true+ }+ ],+ "admissionStatuses": [+ 400,+ 404,+ 500,+ 503+ ],+ "webSocketFrames": [+ "text",+ "binary",+ "close",+ "ping",+ "pong"+ ],+ "sseEventNames": "dynamic",+ "sseData": "json-or-text",+ "sseEvent": {+ "type": "object",+ "properties": {+ "data": {+ "$ref": "#/$defs/JSONValue"+ },+ "event": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "retry": {+ "type": "integer"+ }+ },+ "required": [+ "data"+ ],+ "additionalProperties": false+ }+ }+ },+ {+ "method": "POST",+ "path": "/api/account/checkActivationcode",+ "handler": "checkActivationcode",+ "body": "json",+ "request": {+ "$ref": "#/$defs/CheckActivationCodeRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1,+ 1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/account/deactivate",+ "handler": "deactivateUser",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/account/login",+ "handler": "login",+ "body": "json",+ "request": {+ "$ref": "#/$defs/AccountLoginRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "anyOf": [+ {+ "$ref": "#/$defs/AccountLoginData"+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1,+ 1,+ 10+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/AccountLoginData"+ },+ {+ "type": "null"+ }+ ]+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/account/startFreeTrial",+ "handler": "startFreeTrial",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/account/useActivationcode",+ "handler": "useActivationcode",+ "body": "json",+ "request": {+ "$ref": "#/$defs/ActivationCodeRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/ai/agent/browserCapabilityResult",+ "handler": "agentChatBrowserCapabilityResult",+ "body": "structJSON",+ "request": {+ "$ref": "#/$defs/AIBrowserCapabilityResultRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "additionalErrorStatuses": [+ 409+ ]+ },+ {+ "method": "POST",+ "path": "/api/ai/agent/chat",+ "handler": "agentChat",+ "body": "structJSON",+ "request": {+ "$ref": "#/$defs/AIAgentChatRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {"anyOf": [{- "$ref": "#/$defs/WorkspaceAVBuiltinColorUpdateInput"+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"}]- }- },- {- "type": "null"- }- ]- },- "colors": {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/AttributeViewCustomColorInput"},- {- "type": "null"+ "msg": {+ "type": "string"}- ]- }- },- "order": {- "type": "array",- "items": {- "type": "string"+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true}- }+ ]},- "required": [- "colors",- "order"- ],- "additionalProperties": false- },- "WorkspaceInfoData": {- "type": "object",- "properties": {- "siyuanVer": {- "type": "string"- },- "workspaceDir": {- "type": "string"+ "output": "sse",+ "sse": {+ "events": {+ "browser_capability_call": {+ "$ref": "#/$defs/AISSEBrowserCapabilityCall"+ },+ "confirm": {+ "$ref": "#/$defs/AISSEConfirm"+ },+ "content": {+ "$ref": "#/$defs/AISSEToken"+ },+ "done": {+ "$ref": "#/$defs/AISSETurn"+ },+ "error": {+ "$ref": "#/$defs/AISSEMessage"+ },+ "interrupted": {+ "$ref": "#/$defs/AISSEMessage"+ },+ "permission": {+ "$ref": "#/$defs/AIPermissionData"+ },+ "question": {+ "$ref": "#/$defs/AISSEQuestion"+ },+ "reasoning": {+ "$ref": "#/$defs/AISSEToken"+ },+ "retry": {+ "$ref": "#/$defs/AISSERetry"+ },+ "snapshot": {+ "$ref": "#/$defs/AISSESnapshot"+ },+ "thinking": {+ "$ref": "#/$defs/AISSEThinking"+ },+ "tool_call": {+ "$ref": "#/$defs/AISSEToolCall"+ },+ "tool_result": {+ "$ref": "#/$defs/AISSEToolResult"+ },+ "turn": {+ "$ref": "#/$defs/AISSETurn"+ },+ "usage": {+ "$ref": "#/$defs/AISSEUsage"+ }}},- "required": [- "siyuanVer",- "workspaceDir"- ],- "additionalProperties": false+ "additionalErrorStatuses": [+ 409+ ]},- "ZipRequestInput": {- "type": "object",- "properties": {- "path": {- "type": "string"- },- "zipPath": {- "type": "string"- }- },- "required": [- "path",- "zipPath"- ],- "additionalProperties": false- }- },- "endpoints": [{- "method": "CONNECT",- "path": "/api/network/echo",- "handler": "echo",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/agent/confirm",+ "handler": "agentChatConfirm",+ "body": "structJSON","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AIConfirmRequestInput"},"response": {"anyOf": [@@ -42573,7 +49477,7 @@]},"data": {- "$ref": "#/$defs/NetworkEchoData"+ "type": "null"},"msg": {"type": "string"@@ -42626,16 +49530,18 @@"additionalProperties": true}]- }+ },+ "additionalErrorStatuses": [+ 409+ ]},{- "method": "CONNECT",- "path": "/api/network/echo/*path",- "handler": "echoPath",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/agent/getSession",+ "handler": "getSession",+ "body": "structJSON","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AISessionIDRequestInput"},"response": {"anyOf": [@@ -42649,7 +49555,14 @@]},"data": {- "$ref": "#/$defs/NetworkEchoData"+ "anyOf": [+ {+ "$ref": "#/$defs/AISessionExtensionAISessionFields"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -42702,22 +49615,43 @@"additionalProperties": true}]- }+ },+ "additionalErrorStatuses": [+ 500+ ]},{- "method": "CONNECT",- "path": "/api/network/proxy",- "handler": "httpProxy",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/agent/getSkill",+ "handler": "getSkill",+ "body": "structJSON","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AISkillNameRequestInput"},"response": {"anyOf": [{- "type": "string",- "format": "binary"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/AISkillData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -42759,35 +49693,40 @@"additionalProperties": true}]- },- "output": "proxy",- "proxy": {- "kind": "http",- "contentType": "application/octet-stream",- "upstreamStatuses": true}},{- "method": "CONNECT",- "path": "/plugin/private/:name/*path",- "handler": "pluginPrivateWebServer",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/agent/lsSessions",+ "handler": "lsSessions",+ "body": "structJSON","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AISessionsRequestInput"},"response": {"anyOf": [{- "anyOf": [- {- "type": "string",- "format": "binary"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]},- {- "$ref": "#/$defs/JSONValue"+ "data": {+ "$ref": "#/$defs/AISessionList"+ },+ "msg": {+ "type": "string"}- ]+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -42825,233 +49764,19 @@"code","msg","data"- ],- "additionalProperties": true- }- ]- },- "output": "pluginService",- "pluginService": {- "variants": [- {- "mode": "JSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "JSONP",- "statusPolicy": "plugin",- "mediaTypes": [- "application/javascript",- "application/json"- ],- "payload": "jsonp-or-json",- "headersOverrideMedia": true- },- {- "mode": "AsciiJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "IndentedJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "PureJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "SecureJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "secure-json",- "headersOverrideMedia": true- },- {- "mode": "XML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/xml"- ],- "payload": "xml",- "headersOverrideMedia": true- },- {- "mode": "YAML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/yaml"- ],- "payload": "yaml",- "headersOverrideMedia": true- },- {- "mode": "TOML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/toml"- ],- "payload": "toml",- "headersOverrideMedia": true- },- {- "mode": "ProtoBuf",- "statusPolicy": "plugin",- "mediaTypes": [- "application/x-protobuf"- ],- "payload": "protobuf",- "headersOverrideMedia": true- },- {- "mode": "file",- "statusPolicy": "file",- "mediaTypes": [- "dynamic"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "string",- "statusPolicy": "plugin",- "mediaTypes": [- "text/plain"- ],- "payload": "text",- "headersOverrideMedia": true- },- {- "mode": "raw",- "statusPolicy": "plugin",- "mediaTypes": [- "dynamic"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "redirect",- "statusPolicy": "redirect",- "mediaTypes": [- "text/html"- ],- "payload": "redirect",- "headersOverrideMedia": true- },- {- "mode": "proxy",- "statusPolicy": "proxy",- "mediaTypes": [- "upstream"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "empty",- "statusPolicy": "plugin",- "mediaTypes": [- "optional"- ],- "payload": "none",- "headersOverrideMedia": true- },- {- "mode": "websocket",- "statusPolicy": "websocket",- "mediaTypes": [- "upgrade-or-text"- ],- "payload": "frames",- "headersOverrideMedia": false- },- {- "mode": "sse",- "statusPolicy": "sse",- "mediaTypes": [- "text/event-stream"- ],- "payload": "events",- "headersOverrideMedia": false- },- {- "mode": "admission",- "statusPolicy": "admission",- "mediaTypes": [- "text/plain"- ],- "payload": "text",- "headersOverrideMedia": true- }- ],- "admissionStatuses": [- 400,- 404,- 500,- 503- ],- "webSocketFrames": [- "text",- "binary",- "close",- "ping",- "pong"- ],- "sseEventNames": "dynamic",- "sseData": "json-or-text",- "sseEvent": {- "type": "object",- "properties": {- "data": {- "$ref": "#/$defs/JSONValue"- },- "event": {- "type": "string"- },- "id": {- "type": "string"- },- "retry": {- "type": "integer"- }- },- "required": [- "data"- ],- "additionalProperties": false- }+ ],+ "additionalProperties": true+ }+ ]}},{- "method": "DELETE",- "path": "/api/network/echo",- "handler": "echo",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/agent/lsSkills",+ "handler": "lsSkills",+ "body": "none","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -43065,7 +49790,17 @@]},"data": {- "$ref": "#/$defs/NetworkEchoData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/AISkillInfo"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -43121,13 +49856,12 @@}},{- "method": "DELETE",- "path": "/api/network/echo/*path",- "handler": "echoPath",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/agent/lsUserSkills",+ "handler": "lsUserSkills",+ "body": "none","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -43141,7 +49875,17 @@]},"data": {- "$ref": "#/$defs/NetworkEchoData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/AIUserSkillInfo"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -43197,19 +49941,37 @@}},{- "method": "DELETE",- "path": "/api/network/proxy",- "handler": "httpProxy",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/agent/question",+ "handler": "agentChatQuestion",+ "body": "structJSON","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AIQuestionRequestInput"},"response": {"anyOf": [{- "type": "string",- "format": "binary"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -43252,34 +50014,42 @@}]},- "output": "proxy",- "proxy": {- "kind": "http",- "contentType": "application/octet-stream",- "upstreamStatuses": true- }+ "additionalErrorStatuses": [+ 409+ ]},{- "method": "DELETE",- "path": "/plugin/private/:name/*path",- "handler": "pluginPrivateWebServer",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/agent/removeSession",+ "handler": "removeSession",+ "body": "structJSON","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AISessionIDRequestInput"},"response": {"anyOf": [{- "anyOf": [- {- "type": "string",- "format": "binary"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]},- {- "$ref": "#/$defs/JSONValue"+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"}- ]+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -43322,233 +50092,118 @@}]},- "output": "pluginService",- "pluginService": {- "variants": [- {- "mode": "JSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "JSONP",- "statusPolicy": "plugin",- "mediaTypes": [- "application/javascript",- "application/json"- ],- "payload": "jsonp-or-json",- "headersOverrideMedia": true- },- {- "mode": "AsciiJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "IndentedJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "PureJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "SecureJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "secure-json",- "headersOverrideMedia": true- },- {- "mode": "XML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/xml"- ],- "payload": "xml",- "headersOverrideMedia": true- },- {- "mode": "YAML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/yaml"- ],- "payload": "yaml",- "headersOverrideMedia": true- },- {- "mode": "TOML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/toml"- ],- "payload": "toml",- "headersOverrideMedia": true- },- {- "mode": "ProtoBuf",- "statusPolicy": "plugin",- "mediaTypes": [- "application/x-protobuf"- ],- "payload": "protobuf",- "headersOverrideMedia": true- },- {- "mode": "file",- "statusPolicy": "file",- "mediaTypes": [- "dynamic"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "string",- "statusPolicy": "plugin",- "mediaTypes": [- "text/plain"- ],- "payload": "text",- "headersOverrideMedia": true- },- {- "mode": "raw",- "statusPolicy": "plugin",- "mediaTypes": [- "dynamic"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "redirect",- "statusPolicy": "redirect",- "mediaTypes": [- "text/html"- ],- "payload": "redirect",- "headersOverrideMedia": true- },- {- "mode": "proxy",- "statusPolicy": "proxy",- "mediaTypes": [- "upstream"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "empty",- "statusPolicy": "plugin",- "mediaTypes": [- "optional"- ],- "payload": "none",- "headersOverrideMedia": true- },- {- "mode": "websocket",- "statusPolicy": "websocket",- "mediaTypes": [- "upgrade-or-text"- ],- "payload": "frames",- "headersOverrideMedia": false- },+ "additionalErrorStatuses": [+ 409,+ 500+ ]+ },+ {+ "method": "POST",+ "path": "/api/ai/agent/removeSkill",+ "handler": "removeSkill",+ "body": "structJSON",+ "request": {+ "$ref": "#/$defs/AISkillNameRequestInput"+ },+ "response": {+ "anyOf": [{- "mode": "sse",- "statusPolicy": "sse",- "mediaTypes": [- "text/event-stream"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"],- "payload": "events",- "headersOverrideMedia": false+ "additionalProperties": false},{- "mode": "admission",- "statusPolicy": "admission",- "mediaTypes": [- "text/plain"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"],- "payload": "text",- "headersOverrideMedia": true+ "additionalProperties": true}- ],- "admissionStatuses": [- 400,- 404,- 500,- 503- ],- "webSocketFrames": [- "text",- "binary",- "close",- "ping",- "pong"- ],- "sseEventNames": "dynamic",- "sseData": "json-or-text",- "sseEvent": {- "type": "object",- "properties": {- "data": {- "$ref": "#/$defs/JSONValue"- },- "event": {- "type": "string"- },- "id": {- "type": "string"- },- "retry": {- "type": "integer"- }- },- "required": [- "data"- ],- "additionalProperties": false- }+ ]}},{- "method": "GET",- "path": "/api/ai/mcp/oauth/callback/:flowID",- "handler": "mcpOAuthCallback",- "body": "none",+ "method": "POST",+ "path": "/api/ai/agent/renameSkill",+ "handler": "renameSkill",+ "body": "structJSON","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/AISkillRenameRequestInput"},"response": {"anyOf": [{- "type": "string",- "format": "binary"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -43590,37 +50245,40 @@"additionalProperties": true}]- },- "output": "binary",- "errorStatus": 200,- "contentVariants": [- {- "status": 200,- "contentType": "text/html"- },- {- "status": 400,- "contentType": "text/html"- },- {- "status": 403,- "contentType": "text/plain"- }- ]+ }},{- "method": "GET",- "path": "/api/icon/getDynamicIcon",- "handler": "getDynamicIcon",- "body": "none",+ "method": "POST",+ "path": "/api/ai/agent/saveSession",+ "handler": "saveSession",+ "body": "structJSON","request": {- "$ref": "#/$defs/DynamicIconRequestInput"+ "$ref": "#/$defs/AISessionExtensionAISessionFieldsInput"},"response": {"anyOf": [{- "type": "string",- "format": "binary"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/AISessionSaveData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -43647,6 +50305,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/AISessionSaveData"}]},@@ -43663,26 +50324,19 @@}]},- "output": "binary",- "errorStatus": 200,- "contentVariants": [- {- "status": 200,- "contentType": "image/svg+xml"- }- ],- "emptyResponseStatuses": [+ "additionalErrorStatuses": [+ 400,+ 409,500]},{- "method": "GET",- "path": "/api/network/echo",- "handler": "echo",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/agent/saveSkill",+ "handler": "saveSkill",+ "body": "structJSON","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AISkillSaveRequestInput"},"response": {"anyOf": [@@ -43696,7 +50350,7 @@]},"data": {- "$ref": "#/$defs/NetworkEchoData"+ "type": "null"},"msg": {"type": "string"@@ -43752,13 +50406,12 @@}},{- "method": "GET",- "path": "/api/network/echo/*path",- "handler": "echoPath",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/agent/setPermission",+ "handler": "setAgentSessionPermission",+ "body": "structJSON","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AIPermissionRequestInput"},"response": {"anyOf": [@@ -43772,7 +50425,7 @@]},"data": {- "$ref": "#/$defs/NetworkEchoData"+ "$ref": "#/$defs/AIPermissionData"},"msg": {"type": "string"@@ -43828,19 +50481,37 @@}},{- "method": "GET",- "path": "/api/network/proxy",- "handler": "httpProxy",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/agent/title",+ "handler": "agentChatTitle",+ "body": "structJSON","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AITitleRequestInput"},"response": {"anyOf": [{- "type": "string",- "format": "binary"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "string"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -43882,21 +50553,15 @@"additionalProperties": true}]- },- "output": "proxy",- "proxy": {- "kind": "http",- "contentType": "application/octet-stream",- "upstreamStatuses": true}},{- "method": "GET",- "path": "/api/plugin",- "handler": "listLoadedPluginsGET",- "body": "none",+ "method": "POST",+ "path": "/api/ai/chatGPT",+ "handler": "chatGPT",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/AIMessageRequestInput"},"response": {"anyOf": [@@ -43910,24 +50575,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/LoadedPlugin"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "type": "string"},"msg": {"type": "string"@@ -43983,12 +50631,12 @@}},{- "method": "GET",- "path": "/api/plugin/rpc",- "handler": "getLoadedPluginRPC",+ "method": "POST",+ "path": "/api/ai/chatGPTWithAction",+ "handler": "chatGPTWithAction","body": "json","request": {- "$ref": "#/$defs/LoadedPluginRequestInput"+ "$ref": "#/$defs/AIActionRequestInput"},"response": {"anyOf": [@@ -44002,14 +50650,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/LoadedPlugin"- },- {- "type": "null"- }- ]+ "type": "string"},"msg": {"type": "string"@@ -44028,11 +50669,7 @@"code": {"type": "integer","enum": [- -1,- 1,- 2,- 3,- 4+ -1]},"data": {@@ -44069,44 +50706,17 @@}},{- "method": "GET",- "path": "/api/plugin/rpc/:name",- "handler": "getLoadedPluginRPCByName",- "body": "json",+ "method": "POST",+ "path": "/api/ai/editor/chat",+ "handler": "aiEditorChat",+ "body": "structJSON","request": {- "$ref": "#/$defs/LoadedPluginRequestInput"+ "$ref": "#/$defs/AIEditorChatRequestInput"},"response": {"anyOf": [{- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "anyOf": [- {- "$ref": "#/$defs/LoadedPlugin"- },- {- "type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false+ "type": "string"},{"type": "object",@@ -44114,11 +50724,7 @@"code": {"type": "integer","enum": [- -1,- 1,- 2,- 3,- 4+ -1]},"data": {@@ -44152,12 +50758,35 @@"additionalProperties": true}]+ },+ "output": "sse",+ "sse": {+ "events": {+ "content": {+ "$ref": "#/$defs/AISSEToken"+ },+ "done": {+ "$ref": "#/$defs/AISSEFinish"+ },+ "error": {+ "$ref": "#/$defs/AISSEMessage"+ },+ "reasoning": {+ "$ref": "#/$defs/AISSEToken"+ },+ "start": {+ "$ref": "#/$defs/AISSEStart"+ },+ "truncated": {+ "$ref": "#/$defs/AISSEMessage"+ }+ }}},{- "method": "GET",- "path": "/api/system/bootProgress",- "handler": "bootProgress",+ "method": "POST",+ "path": "/api/ai/editor/lsActions",+ "handler": "lsAIEditorActions","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -44174,7 +50803,24 @@]},"data": {- "$ref": "#/$defs/BootProgressData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/AIEditorAction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -44230,12 +50876,12 @@}},{- "method": "GET",- "path": "/api/system/version",- "handler": "version",- "body": "none",+ "method": "POST",+ "path": "/api/ai/editor/removeAction",+ "handler": "removeAIEditorAction",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/AIEditorActionIDRequestInput"},"response": {"anyOf": [@@ -44249,7 +50895,7 @@]},"data": {- "type": "string"+ "type": "null"},"msg": {"type": "string"@@ -44305,41 +50951,28 @@}},{- "method": "GET",- "path": "/es/network/proxy",- "handler": "esProxy",- "body": "none",+ "method": "POST",+ "path": "/api/ai/editor/saveAction",+ "handler": "saveAIEditorAction",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/AIEditorActionSaveRequestInput"},"response": {"anyOf": [- {- "type": "string",- "format": "binary"- },{"type": "object","properties": {"code": {"type": "integer","enum": [- -1+ 0]},"data": {"anyOf": [{- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "$ref": "#/$defs/AIEditorAction"},{"type": "null"@@ -44355,38 +50988,7 @@"msg","data"],- "additionalProperties": true- }- ]- },- "output": "proxy",- "proxy": {- "kind": "eventSource",- "contentType": "text/event-stream",- "upstreamStatuses": true- }- },- {- "method": "GET",- "path": "/plugin/private/:name/*path",- "handler": "pluginPrivateWebServer",- "body": "raw",- "request": {- "type": "string",- "format": "binary"- },- "response": {- "anyOf": [- {- "anyOf": [- {- "type": "string",- "format": "binary"- },- {- "$ref": "#/$defs/JSONValue"- }- ]+ "additionalProperties": false},{"type": "object",@@ -44428,225 +51030,12 @@"additionalProperties": true}]- },- "output": "pluginService",- "pluginService": {- "variants": [- {- "mode": "JSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "JSONP",- "statusPolicy": "plugin",- "mediaTypes": [- "application/javascript",- "application/json"- ],- "payload": "jsonp-or-json",- "headersOverrideMedia": true- },- {- "mode": "AsciiJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "IndentedJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "PureJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "SecureJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "secure-json",- "headersOverrideMedia": true- },- {- "mode": "XML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/xml"- ],- "payload": "xml",- "headersOverrideMedia": true- },- {- "mode": "YAML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/yaml"- ],- "payload": "yaml",- "headersOverrideMedia": true- },- {- "mode": "TOML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/toml"- ],- "payload": "toml",- "headersOverrideMedia": true- },- {- "mode": "ProtoBuf",- "statusPolicy": "plugin",- "mediaTypes": [- "application/x-protobuf"- ],- "payload": "protobuf",- "headersOverrideMedia": true- },- {- "mode": "file",- "statusPolicy": "file",- "mediaTypes": [- "dynamic"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "string",- "statusPolicy": "plugin",- "mediaTypes": [- "text/plain"- ],- "payload": "text",- "headersOverrideMedia": true- },- {- "mode": "raw",- "statusPolicy": "plugin",- "mediaTypes": [- "dynamic"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "redirect",- "statusPolicy": "redirect",- "mediaTypes": [- "text/html"- ],- "payload": "redirect",- "headersOverrideMedia": true- },- {- "mode": "proxy",- "statusPolicy": "proxy",- "mediaTypes": [- "upstream"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "empty",- "statusPolicy": "plugin",- "mediaTypes": [- "optional"- ],- "payload": "none",- "headersOverrideMedia": true- },- {- "mode": "websocket",- "statusPolicy": "websocket",- "mediaTypes": [- "upgrade-or-text"- ],- "payload": "frames",- "headersOverrideMedia": false- },- {- "mode": "sse",- "statusPolicy": "sse",- "mediaTypes": [- "text/event-stream"- ],- "payload": "events",- "headersOverrideMedia": false- },- {- "mode": "admission",- "statusPolicy": "admission",- "mediaTypes": [- "text/plain"- ],- "payload": "text",- "headersOverrideMedia": true- }- ],- "admissionStatuses": [- 400,- 404,- 500,- 503- ],- "webSocketFrames": [- "text",- "binary",- "close",- "ping",- "pong"- ],- "sseEventNames": "dynamic",- "sseData": "json-or-text",- "sseEvent": {- "type": "object",- "properties": {- "data": {- "$ref": "#/$defs/JSONValue"- },- "event": {- "type": "string"- },- "id": {- "type": "string"- },- "retry": {- "type": "integer"- }- },- "required": [- "data"- ],- "additionalProperties": false- }}},{- "method": "GET",- "path": "/ws/network/proxy",- "handler": "wsProxy",+ "method": "POST",+ "path": "/api/ai/embeddingStat",+ "handler": "embeddingStat","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -44654,8 +51043,34 @@"response": {"anyOf": [{- "type": "string",- "format": "binary"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "anyOf": [+ {+ "$ref": "#/$defs/AIEmbeddingStat"+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -44697,30 +51112,40 @@"additionalProperties": true}]- },- "output": "proxy",- "proxy": {- "kind": "websocket",- "upstreamStatuses": false,- "frames": [- "text",- "binary",- "close"- ]}},{- "method": "GET",- "path": "/ws/plugin/rpc",- "handler": "pluginJsonRpcWebSocket",- "body": "none",+ "method": "POST",+ "path": "/api/ai/listModels",+ "handler": "listModels",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/AIProviderRequestInput"},"response": {"anyOf": [{- "$ref": "#/$defs/PluginRPCFailure"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/AIModelsData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -44762,57 +51187,12 @@"additionalProperties": true}]- },- "output": "websocket",- "websocket": {- "incoming": {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCRequestFieldsInput"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/PluginRPCRequestFieldsInput"- },- "minItems": 1- }- ]- },- "outgoing": {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCSuccess"- },- {- "$ref": "#/$defs/PluginRPCFailure"- },- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCSuccess"- },- {- "$ref": "#/$defs/PluginRPCFailure"- }- ]- },- "minItems": 1- },- {- "$ref": "#/$defs/PluginRPCNotification"- }- ]- },- "failureStatus": 404}},{- "method": "GET",- "path": "/ws/plugin/rpc/:name",- "handler": "pluginJsonRpcWebSocketByName",+ "method": "POST",+ "path": "/api/ai/lsCapabilities",+ "handler": "lsCapabilities","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -44820,7 +51200,37 @@"response": {"anyOf": [{- "$ref": "#/$defs/PluginRPCFailure"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/AICapabilityManifest"+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -44862,61 +51272,15 @@"additionalProperties": true}]- },- "output": "websocket",- "websocket": {- "incoming": {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCRequestFieldsInput"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/PluginRPCRequestFieldsInput"- },- "minItems": 1- }- ]- },- "outgoing": {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCSuccess"- },- {- "$ref": "#/$defs/PluginRPCFailure"- },- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCSuccess"- },- {- "$ref": "#/$defs/PluginRPCFailure"- }- ]- },- "minItems": 1- },- {- "$ref": "#/$defs/PluginRPCNotification"- }- ]- },- "failureStatus": 404}},{- "method": "HEAD",- "path": "/api/network/echo",- "handler": "echo",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/mcpEnvironmentVariables",+ "handler": "mcpEnvironmentVariables",+ "body": "none","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -44930,7 +51294,7 @@]},"data": {- "$ref": "#/$defs/NetworkEchoData"+ "$ref": "#/$defs/AIMCPEnvironmentData"},"msg": {"type": "string"@@ -44986,13 +51350,12 @@}},{- "method": "HEAD",- "path": "/api/network/echo/*path",- "handler": "echoPath",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/mcpOAuthAuthorize",+ "handler": "mcpOAuthAuthorize",+ "body": "json","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AIMCPIDRequestInput"},"response": {"anyOf": [@@ -45006,7 +51369,7 @@]},"data": {- "$ref": "#/$defs/NetworkEchoData"+ "type": "null"},"msg": {"type": "string"@@ -45062,19 +51425,37 @@}},{- "method": "HEAD",- "path": "/api/network/proxy",- "handler": "httpProxy",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/mcpOAuthDisconnect",+ "handler": "mcpOAuthDisconnect",+ "body": "json","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AIMCPIDRequestInput"},"response": {"anyOf": [{- "type": "string",- "format": "binary"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -45116,35 +51497,50 @@"additionalProperties": true}]- },- "output": "proxy",- "proxy": {- "kind": "http",- "contentType": "application/octet-stream",- "upstreamStatuses": true}},{- "method": "HEAD",- "path": "/plugin/private/:name/*path",- "handler": "pluginPrivateWebServer",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/mcpStatus",+ "handler": "mcpStatus",+ "body": "none","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [{- "anyOf": [- {- "type": "string",- "format": "binary"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]},- {- "$ref": "#/$defs/JSONValue"+ "data": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/AIMCPStatus"+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"}- ]+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -45185,230 +51581,16 @@],"additionalProperties": true}- ]- },- "output": "pluginService",- "pluginService": {- "variants": [- {- "mode": "JSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "JSONP",- "statusPolicy": "plugin",- "mediaTypes": [- "application/javascript",- "application/json"- ],- "payload": "jsonp-or-json",- "headersOverrideMedia": true- },- {- "mode": "AsciiJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "IndentedJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "PureJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "SecureJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "secure-json",- "headersOverrideMedia": true- },- {- "mode": "XML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/xml"- ],- "payload": "xml",- "headersOverrideMedia": true- },- {- "mode": "YAML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/yaml"- ],- "payload": "yaml",- "headersOverrideMedia": true- },- {- "mode": "TOML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/toml"- ],- "payload": "toml",- "headersOverrideMedia": true- },- {- "mode": "ProtoBuf",- "statusPolicy": "plugin",- "mediaTypes": [- "application/x-protobuf"- ],- "payload": "protobuf",- "headersOverrideMedia": true- },- {- "mode": "file",- "statusPolicy": "file",- "mediaTypes": [- "dynamic"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "string",- "statusPolicy": "plugin",- "mediaTypes": [- "text/plain"- ],- "payload": "text",- "headersOverrideMedia": true- },- {- "mode": "raw",- "statusPolicy": "plugin",- "mediaTypes": [- "dynamic"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "redirect",- "statusPolicy": "redirect",- "mediaTypes": [- "text/html"- ],- "payload": "redirect",- "headersOverrideMedia": true- },- {- "mode": "proxy",- "statusPolicy": "proxy",- "mediaTypes": [- "upstream"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "empty",- "statusPolicy": "plugin",- "mediaTypes": [- "optional"- ],- "payload": "none",- "headersOverrideMedia": true- },- {- "mode": "websocket",- "statusPolicy": "websocket",- "mediaTypes": [- "upgrade-or-text"- ],- "payload": "frames",- "headersOverrideMedia": false- },- {- "mode": "sse",- "statusPolicy": "sse",- "mediaTypes": [- "text/event-stream"- ],- "payload": "events",- "headersOverrideMedia": false- },- {- "mode": "admission",- "statusPolicy": "admission",- "mediaTypes": [- "text/plain"- ],- "payload": "text",- "headersOverrideMedia": true- }- ],- "admissionStatuses": [- 400,- 404,- 500,- 503- ],- "webSocketFrames": [- "text",- "binary",- "close",- "ping",- "pong"- ],- "sseEventNames": "dynamic",- "sseData": "json-or-text",- "sseEvent": {- "type": "object",- "properties": {- "data": {- "$ref": "#/$defs/JSONValue"- },- "event": {- "type": "string"- },- "id": {- "type": "string"- },- "retry": {- "type": "integer"- }- },- "required": [- "data"- ],- "additionalProperties": false- }+ ]}},{- "method": "OPTIONS",- "path": "/api/network/echo",- "handler": "echo",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/reindexEmbedding",+ "handler": "reindexEmbedding",+ "body": "none","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -45422,7 +51604,7 @@]},"data": {- "$ref": "#/$defs/NetworkEchoData"+ "type": "null"},"msg": {"type": "string"@@ -45478,13 +51660,12 @@}},{- "method": "OPTIONS",- "path": "/api/network/echo/*path",- "handler": "echoPath",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/retryFailedEmbedding",+ "handler": "retryFailedEmbedding",+ "body": "none","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -45498,7 +51679,7 @@]},"data": {- "$ref": "#/$defs/NetworkEchoData"+ "type": "null"},"msg": {"type": "string"@@ -45554,19 +51735,37 @@}},{- "method": "OPTIONS",- "path": "/api/network/proxy",- "handler": "httpProxy",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/testEmbeddingModel",+ "handler": "testEmbeddingModel",+ "body": "none","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [{- "type": "string",- "format": "binary"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/AIEmbeddingTestData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -45608,35 +51807,40 @@"additionalProperties": true}]- },- "output": "proxy",- "proxy": {- "kind": "http",- "contentType": "application/octet-stream",- "upstreamStatuses": true}},{- "method": "OPTIONS",- "path": "/plugin/private/:name/*path",- "handler": "pluginPrivateWebServer",- "body": "raw",+ "method": "POST",+ "path": "/api/ai/testModel",+ "handler": "testModel",+ "body": "json","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AIModelRequestInput"},"response": {"anyOf": [{- "anyOf": [- {- "type": "string",- "format": "binary"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]},- {- "$ref": "#/$defs/JSONValue"+ "data": {+ "$ref": "#/$defs/AIModelTestData"+ },+ "msg": {+ "type": "string"}- ]+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -45678,229 +51882,240 @@"additionalProperties": true}]+ }+ },+ {+ "method": "POST",+ "path": "/api/ai/testRerankModel",+ "handler": "testRerankModel",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"},- "output": "pluginService",- "pluginService": {- "variants": [- {- "mode": "JSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "JSONP",- "statusPolicy": "plugin",- "mediaTypes": [- "application/javascript",- "application/json"- ],- "payload": "jsonp-or-json",- "headersOverrideMedia": true- },- {- "mode": "AsciiJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "IndentedJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "PureJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "SecureJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "secure-json",- "headersOverrideMedia": true- },- {- "mode": "XML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/xml"- ],- "payload": "xml",- "headersOverrideMedia": true- },- {- "mode": "YAML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/yaml"- ],- "payload": "yaml",- "headersOverrideMedia": true- },- {- "mode": "TOML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/toml"- ],- "payload": "toml",- "headersOverrideMedia": true- },- {- "mode": "ProtoBuf",- "statusPolicy": "plugin",- "mediaTypes": [- "application/x-protobuf"- ],- "payload": "protobuf",- "headersOverrideMedia": true- },- {- "mode": "file",- "statusPolicy": "file",- "mediaTypes": [- "dynamic"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "string",- "statusPolicy": "plugin",- "mediaTypes": [- "text/plain"- ],- "payload": "text",- "headersOverrideMedia": true- },- {- "mode": "raw",- "statusPolicy": "plugin",- "mediaTypes": [- "dynamic"- ],- "payload": "bytes",- "headersOverrideMedia": true- },+ "response": {+ "anyOf": [{- "mode": "redirect",- "statusPolicy": "redirect",- "mediaTypes": [- "text/html"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/AIRerankTestData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"],- "payload": "redirect",- "headersOverrideMedia": true+ "additionalProperties": false},{- "mode": "proxy",- "statusPolicy": "proxy",- "mediaTypes": [- "upstream"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"],- "payload": "bytes",- "headersOverrideMedia": true- },+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/archive/unzip",+ "handler": "unzip",+ "body": "json",+ "request": {+ "$ref": "#/$defs/UnzipRequestInput"+ },+ "response": {+ "anyOf": [{- "mode": "empty",- "statusPolicy": "plugin",- "mediaTypes": [- "optional"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"],- "payload": "none",- "headersOverrideMedia": true+ "additionalProperties": false},{- "mode": "websocket",- "statusPolicy": "websocket",- "mediaTypes": [- "upgrade-or-text"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"],- "payload": "frames",- "headersOverrideMedia": false- },+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/archive/zip",+ "handler": "zip",+ "body": "json",+ "request": {+ "$ref": "#/$defs/ZipRequestInput"+ },+ "response": {+ "anyOf": [{- "mode": "sse",- "statusPolicy": "sse",- "mediaTypes": [- "text/event-stream"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"],- "payload": "events",- "headersOverrideMedia": false+ "additionalProperties": false},{- "mode": "admission",- "statusPolicy": "admission",- "mediaTypes": [- "text/plain"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"],- "payload": "text",- "headersOverrideMedia": true+ "additionalProperties": true}- ],- "admissionStatuses": [- 400,- 404,- 500,- 503- ],- "webSocketFrames": [- "text",- "binary",- "close",- "ping",- "pong"- ],- "sseEventNames": "dynamic",- "sseData": "json-or-text",- "sseEvent": {- "type": "object",- "properties": {- "data": {- "$ref": "#/$defs/JSONValue"- },- "event": {- "type": "string"- },- "id": {- "type": "string"- },- "retry": {- "type": "integer"- }- },- "required": [- "data"- ],- "additionalProperties": false- }+ ]}},{- "method": "PATCH",- "path": "/api/network/echo",- "handler": "echo",- "body": "raw",+ "method": "POST",+ "path": "/api/asset/fullReindexAssetContent",+ "handler": "fullReindexAssetContent",+ "body": "none","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -45914,7 +52129,7 @@]},"data": {- "$ref": "#/$defs/NetworkEchoData"+ "type": "null"},"msg": {"type": "string"@@ -45970,13 +52185,12 @@}},{- "method": "PATCH",- "path": "/api/network/echo/*path",- "handler": "echoPath",- "body": "raw",+ "method": "POST",+ "path": "/api/asset/getDocAssets",+ "handler": "getDocAssets",+ "body": "json","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AssetDocumentAssetsRequestInput"},"response": {"anyOf": [@@ -45990,7 +52204,17 @@]},"data": {- "$ref": "#/$defs/NetworkEchoData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -46046,19 +52270,47 @@}},{- "method": "PATCH",- "path": "/api/network/proxy",- "handler": "httpProxy",- "body": "raw",+ "method": "POST",+ "path": "/api/asset/getDocImageAssets",+ "handler": "getDocImageAssets",+ "body": "json","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AssetDocumentRequestInput"},"response": {"anyOf": [{- "type": "string",- "format": "binary"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -46100,35 +52352,40 @@"additionalProperties": true}]- },- "output": "proxy",- "proxy": {- "kind": "http",- "contentType": "application/octet-stream",- "upstreamStatuses": true}},{- "method": "PATCH",- "path": "/plugin/private/:name/*path",- "handler": "pluginPrivateWebServer",- "body": "raw",+ "method": "POST",+ "path": "/api/asset/getFileAnnotation",+ "handler": "getFileAnnotation",+ "body": "json","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/AssetPathRequestInput"},"response": {"anyOf": [{- "anyOf": [- {- "type": "string",- "format": "binary"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]},- {- "$ref": "#/$defs/JSONValue"+ "data": {+ "$ref": "#/$defs/AssetAnnotationData"+ },+ "msg": {+ "type": "string"}- ]+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -46136,7 +52393,9 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1,+ 403]},"data": {@@ -46170,228 +52429,182 @@"additionalProperties": true}]+ }+ },+ {+ "method": "POST",+ "path": "/api/asset/getImageOCRText",+ "handler": "getImageOCRText",+ "body": "json",+ "request": {+ "$ref": "#/$defs/AssetOCRTextRequestInput"},- "output": "pluginService",- "pluginService": {- "variants": [- {- "mode": "JSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "JSONP",- "statusPolicy": "plugin",- "mediaTypes": [- "application/javascript",- "application/json"- ],- "payload": "jsonp-or-json",- "headersOverrideMedia": true- },- {- "mode": "AsciiJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "IndentedJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "PureJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "json",- "headersOverrideMedia": true- },- {- "mode": "SecureJSON",- "statusPolicy": "plugin",- "mediaTypes": [- "application/json"- ],- "payload": "secure-json",- "headersOverrideMedia": true- },- {- "mode": "XML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/xml"- ],- "payload": "xml",- "headersOverrideMedia": true- },- {- "mode": "YAML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/yaml"- ],- "payload": "yaml",- "headersOverrideMedia": true- },- {- "mode": "TOML",- "statusPolicy": "plugin",- "mediaTypes": [- "application/toml"- ],- "payload": "toml",- "headersOverrideMedia": true- },- {- "mode": "ProtoBuf",- "statusPolicy": "plugin",- "mediaTypes": [- "application/x-protobuf"- ],- "payload": "protobuf",- "headersOverrideMedia": true- },- {- "mode": "file",- "statusPolicy": "file",- "mediaTypes": [- "dynamic"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "string",- "statusPolicy": "plugin",- "mediaTypes": [- "text/plain"- ],- "payload": "text",- "headersOverrideMedia": true- },- {- "mode": "raw",- "statusPolicy": "plugin",- "mediaTypes": [- "dynamic"- ],- "payload": "bytes",- "headersOverrideMedia": true- },- {- "mode": "redirect",- "statusPolicy": "redirect",- "mediaTypes": [- "text/html"- ],- "payload": "redirect",- "headersOverrideMedia": true- },- {- "mode": "proxy",- "statusPolicy": "proxy",- "mediaTypes": [- "upstream"- ],- "payload": "bytes",- "headersOverrideMedia": true- },+ "response": {+ "anyOf": [{- "mode": "empty",- "statusPolicy": "plugin",- "mediaTypes": [- "optional"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/AssetTextData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"],- "payload": "none",- "headersOverrideMedia": true+ "additionalProperties": false},{- "mode": "websocket",- "statusPolicy": "websocket",- "mediaTypes": [- "upgrade-or-text"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"],- "payload": "frames",- "headersOverrideMedia": false- },+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/asset/getMissingAssets",+ "handler": "getMissingAssets",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [{- "mode": "sse",- "statusPolicy": "sse",- "mediaTypes": [- "text/event-stream"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/AssetUnusedItem"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"],- "payload": "events",- "headersOverrideMedia": false+ "additionalProperties": false},{- "mode": "admission",- "statusPolicy": "admission",- "mediaTypes": [- "text/plain"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"],- "payload": "text",- "headersOverrideMedia": true+ "additionalProperties": true}- ],- "admissionStatuses": [- 400,- 404,- 500,- 503- ],- "webSocketFrames": [- "text",- "binary",- "close",- "ping",- "pong"- ],- "sseEventNames": "dynamic",- "sseData": "json-or-text",- "sseEvent": {- "type": "object",- "properties": {- "data": {- "$ref": "#/$defs/JSONValue"- },- "event": {- "type": "string"- },- "id": {- "type": "string"- },- "retry": {- "type": "integer"- }- },- "required": [- "data"- ],- "additionalProperties": false- }+ ]}},{"method": "POST",- "path": "/api/account/checkActivationcode",- "handler": "checkActivationcode",- "body": "json",+ "path": "/api/asset/getUnusedAssets",+ "handler": "getUnusedAssets",+ "body": "none","request": {- "$ref": "#/$defs/CheckActivationCodeRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -46405,7 +52618,24 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/AssetUnusedItem"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -46424,8 +52654,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -46442,9 +52671,6 @@],"additionalProperties": false},- {- "type": "null"- },{"type": "null"}@@ -46466,11 +52692,11 @@},{"method": "POST",- "path": "/api/account/deactivate",- "handler": "deactivateUser",- "body": "none",+ "path": "/api/asset/insertCover",+ "handler": "insertCover",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/InsertCoverRequestInput"},"response": {"anyOf": [@@ -46484,7 +52710,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/AssetInsertCoverData"},"msg": {"type": "string"@@ -46541,11 +52767,11 @@},{"method": "POST",- "path": "/api/account/login",- "handler": "login",+ "path": "/api/asset/insertLocalAssets",+ "handler": "insertLocalAssets","body": "json","request": {- "$ref": "#/$defs/AccountLoginRequestInput"+ "$ref": "#/$defs/InsertLocalAssetsRequestInput"},"response": {"anyOf": [@@ -46559,14 +52785,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/AccountLoginData"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/AssetUploadData"},"msg": {"type": "string"@@ -46585,9 +52804,7 @@"code": {"type": "integer","enum": [- -1,- 1,- 10+ -1]},"data": {@@ -46608,14 +52825,7 @@"type": "null"},{- "anyOf": [- {- "$ref": "#/$defs/AccountLoginData"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/AssetUploadData"}]},@@ -46635,11 +52845,11 @@},{"method": "POST",- "path": "/api/account/startFreeTrial",- "handler": "startFreeTrial",- "body": "none",+ "path": "/api/asset/ocr",+ "handler": "ocr",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/AssetPathRequestInput"},"response": {"anyOf": [@@ -46653,7 +52863,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/AssetOCRData"},"msg": {"type": "string"@@ -46710,11 +52920,11 @@},{"method": "POST",- "path": "/api/account/useActivationcode",- "handler": "useActivationcode",+ "path": "/api/asset/removeUnusedAsset",+ "handler": "removeUnusedAsset","body": "json","request": {- "$ref": "#/$defs/ActivationCodeRequestInput"+ "$ref": "#/$defs/AssetPathRequestInput"},"response": {"anyOf": [@@ -46728,7 +52938,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/AssetPathData"},"msg": {"type": "string"@@ -46785,11 +52995,11 @@},{"method": "POST",- "path": "/api/ai/agent/browserCapabilityResult",- "handler": "agentChatBrowserCapabilityResult",- "body": "structJSON",+ "path": "/api/asset/removeUnusedAssets",+ "handler": "removeUnusedAssets",+ "body": "none","request": {- "$ref": "#/$defs/AIBrowserCapabilityResultRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -46803,7 +53013,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/AssetPathsData"},"msg": {"type": "string"@@ -46856,129 +53066,15 @@"additionalProperties": true}]- },- "additionalErrorStatuses": [- 409- ]- },- {- "method": "POST",- "path": "/api/ai/agent/chat",- "handler": "agentChat",- "body": "structJSON",- "request": {- "$ref": "#/$defs/AIAgentChatRequestInput"- },- "response": {- "anyOf": [- {- "type": "string"- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },- "data": {- "anyOf": [- {- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false- },- {- "type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": true- }- ]- },- "output": "sse",- "sse": {- "events": {- "browser_capability_call": {- "$ref": "#/$defs/AISSEBrowserCapabilityCall"- },- "confirm": {- "$ref": "#/$defs/AISSEConfirm"- },- "content": {- "$ref": "#/$defs/AISSEToken"- },- "done": {- "$ref": "#/$defs/AISSETurn"- },- "error": {- "$ref": "#/$defs/AISSEMessage"- },- "interrupted": {- "$ref": "#/$defs/AISSEMessage"- },- "permission": {- "$ref": "#/$defs/AIPermissionData"- },- "question": {- "$ref": "#/$defs/AISSEQuestion"- },- "reasoning": {- "$ref": "#/$defs/AISSEToken"- },- "retry": {- "$ref": "#/$defs/AISSERetry"- },- "snapshot": {- "$ref": "#/$defs/AISSESnapshot"- },- "thinking": {- "$ref": "#/$defs/AISSEThinking"- },- "tool_call": {- "$ref": "#/$defs/AISSEToolCall"- },- "tool_result": {- "$ref": "#/$defs/AISSEToolResult"- },- "turn": {- "$ref": "#/$defs/AISSETurn"- },- "usage": {- "$ref": "#/$defs/AISSEUsage"- }- }- },- "additionalErrorStatuses": [- 409- ]+ }},{"method": "POST",- "path": "/api/ai/agent/confirm",- "handler": "agentChatConfirm",- "body": "structJSON",+ "path": "/api/asset/renameAsset",+ "handler": "renameAsset",+ "body": "json","request": {- "$ref": "#/$defs/AIConfirmRequestInput"+ "$ref": "#/$defs/RenameAssetRequestInput"},"response": {"anyOf": [@@ -46992,7 +53088,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/AssetRenameData"},"msg": {"type": "string"@@ -47045,18 +53141,15 @@"additionalProperties": true}]- },- "additionalErrorStatuses": [- 409- ]+ }},{"method": "POST",- "path": "/api/ai/agent/getSession",- "handler": "getSession",- "body": "structJSON",+ "path": "/api/asset/resolveAssetPath",+ "handler": "resolveAssetPath",+ "body": "json","request": {- "$ref": "#/$defs/AISessionIDRequestInput"+ "$ref": "#/$defs/AssetPathRequestInput"},"response": {"anyOf": [@@ -47070,14 +53163,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/AISessionExtensionAISessionFields"- },- {- "type": "null"- }- ]+ "type": "string"},"msg": {"type": "string"@@ -47130,18 +53216,15 @@"additionalProperties": true}]- },- "additionalErrorStatuses": [- 500- ]+ }},{"method": "POST",- "path": "/api/ai/agent/getSkill",- "handler": "getSkill",- "body": "structJSON",+ "path": "/api/asset/setFileAnnotation",+ "handler": "setFileAnnotation",+ "body": "json","request": {- "$ref": "#/$defs/AISkillNameRequestInput"+ "$ref": "#/$defs/SetAssetAnnotationRequestInput"},"response": {"anyOf": [@@ -47155,7 +53238,7 @@]},"data": {- "$ref": "#/$defs/AISkillData"+ "type": "null"},"msg": {"type": "string"@@ -47212,11 +53295,11 @@},{"method": "POST",- "path": "/api/ai/agent/lsSessions",- "handler": "lsSessions",- "body": "structJSON",+ "path": "/api/asset/setImageOCRText",+ "handler": "setImageOCRText",+ "body": "json","request": {- "$ref": "#/$defs/AISessionsRequestInput"+ "$ref": "#/$defs/SetAssetOCRTextRequestInput"},"response": {"anyOf": [@@ -47230,7 +53313,7 @@]},"data": {- "$ref": "#/$defs/AISessionList"+ "type": "null"},"msg": {"type": "string"@@ -47287,11 +53370,11 @@},{"method": "POST",- "path": "/api/ai/agent/lsSkills",- "handler": "lsSkills",- "body": "none",+ "path": "/api/asset/statAsset",+ "handler": "statAsset",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/AssetPathRequestInput"},"response": {"anyOf": [@@ -47305,17 +53388,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "$ref": "#/$defs/AISkillInfo"- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/AssetStatData"},"msg": {"type": "string"@@ -47334,7 +53407,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -47372,11 +53446,11 @@},{"method": "POST",- "path": "/api/ai/agent/lsUserSkills",- "handler": "lsUserSkills",- "body": "none",+ "path": "/api/asset/upload",+ "handler": "uploadAsset",+ "body": "multipart","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/UploadAssetRequestInput"},"response": {"anyOf": [@@ -47389,13 +53463,42 @@0]},+ "data": {+ "$ref": "#/$defs/AssetUploadData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },"data": {"anyOf": [{- "type": "array",- "items": {- "$ref": "#/$defs/AIUserSkillInfo"- }+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -47411,6 +53514,42 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/asset/uploadCloud",+ "handler": "uploadCloud",+ "body": "json",+ "request": {+ "$ref": "#/$defs/AssetCloudUploadRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -47457,11 +53596,11 @@},{"method": "POST",- "path": "/api/ai/agent/question",- "handler": "agentChatQuestion",- "body": "structJSON",+ "path": "/api/asset/uploadCloudByAssetsPaths",+ "handler": "uploadCloudByAssetsPaths",+ "body": "json","request": {- "$ref": "#/$defs/AIQuestionRequestInput"+ "$ref": "#/$defs/AssetPathsCloudUploadRequestInput"},"response": {"anyOf": [@@ -47528,18 +53667,15 @@"additionalProperties": true}]- },- "additionalErrorStatuses": [- 409- ]+ }},{"method": "POST",- "path": "/api/ai/agent/removeSession",- "handler": "removeSession",- "body": "structJSON",+ "path": "/api/attr/batchGetBlockAttrs",+ "handler": "batchGetBlockAttrs",+ "body": "json","request": {- "$ref": "#/$defs/AISessionIDRequestInput"+ "$ref": "#/$defs/BlockIDsRequestInput"},"response": {"anyOf": [@@ -47553,7 +53689,20 @@]},"data": {- "type": "null"+ "type": "object",+ "additionalProperties": {+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]+ }},"msg": {"type": "string"@@ -47606,19 +53755,15 @@"additionalProperties": true}]- },- "additionalErrorStatuses": [- 409,- 500- ]+ }},{"method": "POST",- "path": "/api/ai/agent/removeSkill",- "handler": "removeSkill",- "body": "structJSON",+ "path": "/api/attr/batchSetBlockAttrs",+ "handler": "batchSetBlockAttrs",+ "body": "json","request": {- "$ref": "#/$defs/AISkillNameRequestInput"+ "$ref": "#/$defs/BatchSetBlockAttrsRequestInput"},"response": {"anyOf": [@@ -47689,11 +53834,11 @@},{"method": "POST",- "path": "/api/ai/agent/renameSkill",- "handler": "renameSkill",- "body": "structJSON",+ "path": "/api/attr/getBlockAttrs",+ "handler": "getBlockAttrs",+ "body": "json","request": {- "$ref": "#/$defs/AISkillRenameRequestInput"+ "$ref": "#/$defs/BlockIDRequestInput"},"response": {"anyOf": [@@ -47707,7 +53852,10 @@]},"data": {- "type": "null"+ "type": "object",+ "additionalProperties": {+ "type": "string"+ }},"msg": {"type": "string"@@ -47764,11 +53912,11 @@},{"method": "POST",- "path": "/api/ai/agent/saveSession",- "handler": "saveSession",- "body": "structJSON",+ "path": "/api/attr/getBookmarkLabels",+ "handler": "getBookmarkLabels",+ "body": "none","request": {- "$ref": "#/$defs/AISessionExtensionAISessionFieldsInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -47782,7 +53930,17 @@]},"data": {- "$ref": "#/$defs/AISessionSaveData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -47820,9 +53978,81 @@},{"type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/attr/resetBlockAttrs",+ "handler": "resetBlockAttrs",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{- "$ref": "#/$defs/AISessionSaveData"+ "type": "null"}]},@@ -47838,20 +54068,15 @@"additionalProperties": true}]- },- "additionalErrorStatuses": [- 400,- 409,- 500- ]+ }},{"method": "POST",- "path": "/api/ai/agent/saveSkill",- "handler": "saveSkill",- "body": "structJSON",+ "path": "/api/attr/setBlockAttrs",+ "handler": "setBlockAttrs",+ "body": "json","request": {- "$ref": "#/$defs/AISkillSaveRequestInput"+ "$ref": "#/$defs/SetBlockAttrsRequestInput"},"response": {"anyOf": [@@ -47922,11 +54147,11 @@},{"method": "POST",- "path": "/api/ai/agent/setPermission",- "handler": "setAgentSessionPermission",- "body": "structJSON",+ "path": "/api/av/addAttributeViewBlocks",+ "handler": "addAttributeViewBlocks",+ "body": "json","request": {- "$ref": "#/$defs/AIPermissionRequestInput"+ "$ref": "#/$defs/AddAttributeViewBlocksRequestInput"},"response": {"anyOf": [@@ -47940,7 +54165,7 @@]},"data": {- "$ref": "#/$defs/AIPermissionData"+ "type": "null"},"msg": {"type": "string"@@ -47997,11 +54222,11 @@},{"method": "POST",- "path": "/api/ai/agent/title",- "handler": "agentChatTitle",- "body": "structJSON",+ "path": "/api/av/addAttributeViewKey",+ "handler": "addAttributeViewKey",+ "body": "json","request": {- "$ref": "#/$defs/AITitleRequestInput"+ "$ref": "#/$defs/AddAttributeViewKeyRequestInput"},"response": {"anyOf": [@@ -48015,7 +54240,7 @@]},"data": {- "type": "string"+ "type": "null"},"msg": {"type": "string"@@ -48072,11 +54297,11 @@},{"method": "POST",- "path": "/api/ai/chatGPT",- "handler": "chatGPT",+ "path": "/api/av/appendAttributeViewDetachedBlocksWithValues",+ "handler": "appendAttributeViewDetachedBlocksWithValues","body": "json","request": {- "$ref": "#/$defs/AIMessageRequestInput"+ "$ref": "#/$defs/AppendAttributeViewDetachedBlocksWithValuesRequestInput"},"response": {"anyOf": [@@ -48090,7 +54315,7 @@]},"data": {- "type": "string"+ "type": "null"},"msg": {"type": "string"@@ -48147,11 +54372,11 @@},{"method": "POST",- "path": "/api/ai/chatGPTWithAction",- "handler": "chatGPTWithAction",+ "path": "/api/av/batchReplaceAttributeViewBlocks",+ "handler": "batchReplaceAttributeViewBlocks","body": "json","request": {- "$ref": "#/$defs/AIActionRequestInput"+ "$ref": "#/$defs/BatchReplaceAttributeViewBlocksRequestInput"},"response": {"anyOf": [@@ -48165,7 +54390,7 @@]},"data": {- "type": "string"+ "type": "null"},"msg": {"type": "string"@@ -48222,16 +54447,36 @@},{"method": "POST",- "path": "/api/ai/editor/chat",- "handler": "aiEditorChat",- "body": "structJSON",+ "path": "/api/av/batchSetAttributeViewBlockAttrs",+ "handler": "batchSetAttributeViewBlockAttrs",+ "body": "json","request": {- "$ref": "#/$defs/AIEditorChatRequestInput"+ "$ref": "#/$defs/BatchSetAttributeViewBlockAttrsRequestInput"},"response": {"anyOf": [{- "type": "string"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -48273,38 +54518,15 @@"additionalProperties": true}]- },- "output": "sse",- "sse": {- "events": {- "content": {- "$ref": "#/$defs/AISSEToken"- },- "done": {- "$ref": "#/$defs/AISSEFinish"- },- "error": {- "$ref": "#/$defs/AISSEMessage"- },- "reasoning": {- "$ref": "#/$defs/AISSEToken"- },- "start": {- "$ref": "#/$defs/AISSEStart"- },- "truncated": {- "$ref": "#/$defs/AISSEMessage"- }- }}},{"method": "POST",- "path": "/api/ai/editor/lsActions",- "handler": "lsAIEditorActions",- "body": "none",+ "path": "/api/av/changeAttrViewLayout",+ "handler": "changeAttrViewLayout",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/ChangeAttrViewLayoutRequestInput"},"response": {"anyOf": [@@ -48318,24 +54540,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/AIEditorAction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/AVRenderResult"},"msg": {"type": "string"@@ -48373,6 +54578,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/AVRenderResult"}]},@@ -48392,11 +54600,11 @@},{"method": "POST",- "path": "/api/ai/editor/removeAction",- "handler": "removeAIEditorAction",+ "path": "/api/av/createAttributeViewItem",+ "handler": "createAttributeViewItem","body": "json","request": {- "$ref": "#/$defs/AIEditorActionIDRequestInput"+ "$ref": "#/$defs/CreateAttributeViewItemRequestInput"},"response": {"anyOf": [@@ -48410,7 +54618,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/AVCreateItemResult"},"msg": {"type": "string"@@ -48429,7 +54637,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -48448,6 +54657,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/AVCreateItemResult"}]},@@ -48467,11 +54679,11 @@},{"method": "POST",- "path": "/api/ai/editor/saveAction",- "handler": "saveAIEditorAction",+ "path": "/api/av/createAttributeViewItemDocs",+ "handler": "createAttributeViewItemDocs","body": "json","request": {- "$ref": "#/$defs/AIEditorActionSaveRequestInput"+ "$ref": "#/$defs/CreateAttributeViewItemDocsRequestInput"},"response": {"anyOf": [@@ -48485,14 +54697,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/AIEditorAction"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/AVCreateItemDocsResult"},"msg": {"type": "string"@@ -48511,7 +54716,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -48530,6 +54736,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/AVCreateItemDocsResult"}]},@@ -48549,11 +54758,11 @@},{"method": "POST",- "path": "/api/ai/embeddingStat",- "handler": "embeddingStat",- "body": "none",+ "path": "/api/av/createAttributeViewItemWithMarkdown",+ "handler": "createAttributeViewItemWithMarkdown",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/CreateAttributeViewItemWithMarkdownRequestInput"},"response": {"anyOf": [@@ -48567,14 +54776,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/AIEmbeddingStat"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/AVCreateItemResult"},"msg": {"type": "string"@@ -48593,7 +54795,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -48612,6 +54815,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/AVCreateItemResult"}]},@@ -48631,11 +54837,11 @@},{"method": "POST",- "path": "/api/ai/listModels",- "handler": "listModels",+ "path": "/api/av/duplicateAttributeViewBlock",+ "handler": "duplicateAttributeViewBlock","body": "json","request": {- "$ref": "#/$defs/AIProviderRequestInput"+ "$ref": "#/$defs/DuplicateAttributeViewBlockRequestInput"},"response": {"anyOf": [@@ -48649,7 +54855,7 @@]},"data": {- "$ref": "#/$defs/AIModelsData"+ "$ref": "#/$defs/AVDuplicateData"},"msg": {"type": "string"@@ -48706,11 +54912,11 @@},{"method": "POST",- "path": "/api/ai/lsCapabilities",- "handler": "lsCapabilities",- "body": "none",+ "path": "/api/av/getAttributeView",+ "handler": "getAttributeView",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetAttributeViewRequestInput"},"response": {"anyOf": [@@ -48724,17 +54930,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "$ref": "#/$defs/AICapabilityManifest"- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/AVData"},"msg": {"type": "string"@@ -48791,11 +54987,11 @@},{"method": "POST",- "path": "/api/ai/mcpEnvironmentVariables",- "handler": "mcpEnvironmentVariables",- "body": "none",+ "path": "/api/av/getAttributeViewAddingBlockDefaultValues",+ "handler": "getAttributeViewAddingBlockDefaultValues",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetAttributeViewAddingBlockDefaultValuesRequestInput"},"response": {"anyOf": [@@ -48809,7 +55005,7 @@]},"data": {- "$ref": "#/$defs/AIMCPEnvironmentData"+ "$ref": "#/$defs/AVValuesData"},"msg": {"type": "string"@@ -48866,11 +55062,11 @@},{"method": "POST",- "path": "/api/ai/mcpOAuthAuthorize",- "handler": "mcpOAuthAuthorize",+ "path": "/api/av/getAttributeViewBacklinks",+ "handler": "getAttributeViewBacklinks","body": "json","request": {- "$ref": "#/$defs/AIMCPIDRequestInput"+ "$ref": "#/$defs/GetAttributeViewBacklinksRequestInput"},"response": {"anyOf": [@@ -48884,7 +55080,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/AVAttributeViewBacklinks"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -48941,11 +55144,11 @@},{"method": "POST",- "path": "/api/ai/mcpOAuthDisconnect",- "handler": "mcpOAuthDisconnect",+ "path": "/api/av/getAttributeViewBoundBlockIDsByItemIDs",+ "handler": "getAttributeViewBoundBlockIDsByItemIDs","body": "json","request": {- "$ref": "#/$defs/AIMCPIDRequestInput"+ "$ref": "#/$defs/GetAttributeViewBoundBlockIDsByItemIDsRequestInput"},"response": {"anyOf": [@@ -48959,7 +55162,17 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -49016,11 +55229,11 @@},{"method": "POST",- "path": "/api/ai/mcpStatus",- "handler": "mcpStatus",- "body": "none",+ "path": "/api/av/getAttributeViewFieldViews",+ "handler": "getAttributeViewFieldViews",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetAttributeViewFieldViewsRequestInput"},"response": {"anyOf": [@@ -49034,17 +55247,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "$ref": "#/$defs/AIMCPStatus"- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/AVFieldViewsData"},"msg": {"type": "string"@@ -49101,11 +55304,11 @@},{"method": "POST",- "path": "/api/ai/reindexEmbedding",- "handler": "reindexEmbedding",- "body": "none",+ "path": "/api/av/getAttributeViewFilterSort",+ "handler": "getAttributeViewFilterSort",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetAttributeViewFilterSortRequestInput"},"response": {"anyOf": [@@ -49119,7 +55322,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/AVFilterSortData"},"msg": {"type": "string"@@ -49176,11 +55379,11 @@},{"method": "POST",- "path": "/api/ai/retryFailedEmbedding",- "handler": "retryFailedEmbedding",- "body": "none",+ "path": "/api/av/getAttributeViewItemIDsByBoundIDs",+ "handler": "getAttributeViewItemIDsByBoundIDs",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetAttributeViewItemIDsByBoundIDsRequestInput"},"response": {"anyOf": [@@ -49194,7 +55397,17 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -49251,11 +55464,11 @@},{"method": "POST",- "path": "/api/ai/testEmbeddingModel",- "handler": "testEmbeddingModel",- "body": "none",+ "path": "/api/av/getAttributeViewItemStatuses",+ "handler": "getAttributeViewItemStatuses",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetAttributeViewItemStatusesRequestInput"},"response": {"anyOf": [@@ -49269,7 +55482,17 @@]},"data": {- "$ref": "#/$defs/AIEmbeddingTestData"+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -49326,11 +55549,11 @@},{"method": "POST",- "path": "/api/ai/testModel",- "handler": "testModel",+ "path": "/api/av/getAttributeViewKeys",+ "handler": "getAttributeViewKeys","body": "json","request": {- "$ref": "#/$defs/AIModelRequestInput"+ "$ref": "#/$defs/GetAttributeViewKeysRequestInput"},"response": {"anyOf": [@@ -49344,7 +55567,24 @@]},"data": {- "$ref": "#/$defs/AIModelTestData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/AVBlockAttributeViewKeys"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -49401,11 +55641,11 @@},{"method": "POST",- "path": "/api/ai/testRerankModel",- "handler": "testRerankModel",- "body": "none",+ "path": "/api/av/getAttributeViewKeysByAvID",+ "handler": "getAttributeViewKeysByAvID",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetAttributeViewKeysByAvIDRequestInput"},"response": {"anyOf": [@@ -49419,7 +55659,24 @@]},"data": {- "$ref": "#/$defs/AIRerankTestData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/AVKey"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -49476,11 +55733,11 @@},{"method": "POST",- "path": "/api/archive/unzip",- "handler": "unzip",+ "path": "/api/av/getAttributeViewKeysByID",+ "handler": "getAttributeViewKeysByID","body": "json","request": {- "$ref": "#/$defs/UnzipRequestInput"+ "$ref": "#/$defs/GetAttributeViewKeysByIDRequestInput"},"response": {"anyOf": [@@ -49494,7 +55751,24 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/AVKey"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -49551,11 +55825,11 @@},{"method": "POST",- "path": "/api/archive/zip",- "handler": "zip",+ "path": "/api/av/getAttributeViewPasteRows",+ "handler": "getAttributeViewPasteRows","body": "json","request": {- "$ref": "#/$defs/ZipRequestInput"+ "$ref": "#/$defs/GetAttributeViewPasteRowsRequestInput"},"response": {"anyOf": [@@ -49569,7 +55843,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/AVPasteRowsData"},"msg": {"type": "string"@@ -49626,11 +55900,11 @@},{"method": "POST",- "path": "/api/asset/fullReindexAssetContent",- "handler": "fullReindexAssetContent",- "body": "none",+ "path": "/api/av/getAttributeViewPrimaryKeyValues",+ "handler": "getAttributeViewPrimaryKeyValues",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetAttributeViewPrimaryKeyValuesRequestInput"},"response": {"anyOf": [@@ -49644,7 +55918,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/AVPrimaryValuesData"},"msg": {"type": "string"@@ -49701,11 +55975,11 @@},{"method": "POST",- "path": "/api/asset/getDocAssets",- "handler": "getDocAssets",+ "path": "/api/av/getAttributeViewRelationCandidates",+ "handler": "getAttributeViewRelationCandidates","body": "json","request": {- "$ref": "#/$defs/AssetDocumentAssetsRequestInput"+ "$ref": "#/$defs/GetAttributeViewRelationCandidatesRequestInput"},"response": {"anyOf": [@@ -49718,13 +55992,42 @@0]},+ "data": {+ "$ref": "#/$defs/AVRelationCandidatesData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },"data": {"anyOf": [{- "type": "array",- "items": {- "type": "string"- }+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -49740,6 +56043,42 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/av/getAttributeViewRowSort",+ "handler": "getAttributeViewRowSort",+ "body": "structJSON",+ "request": {+ "$ref": "#/$defs/GetAttributeViewRowSortRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/AVRowSortPreview"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -49786,11 +56125,11 @@},{"method": "POST",- "path": "/api/asset/getDocImageAssets",- "handler": "getDocImageAssets",+ "path": "/api/av/getAttributeViewSearchTarget",+ "handler": "getAttributeViewSearchTarget","body": "json","request": {- "$ref": "#/$defs/AssetDocumentRequestInput"+ "$ref": "#/$defs/GetAttributeViewSearchTargetRequestInput"},"response": {"anyOf": [@@ -49806,10 +56145,7 @@"data": {"anyOf": [{- "type": "array",- "items": {- "type": "string"- }+ "$ref": "#/$defs/AVAttributeViewSearchTarget"},{"type": "null"@@ -49871,11 +56207,11 @@},{"method": "POST",- "path": "/api/asset/getFileAnnotation",- "handler": "getFileAnnotation",+ "path": "/api/av/getCurrentAttrViewImages",+ "handler": "getCurrentAttrViewImages","body": "json","request": {- "$ref": "#/$defs/AssetPathRequestInput"+ "$ref": "#/$defs/GetCurrentAttrViewImagesRequestInput"},"response": {"anyOf": [@@ -49889,7 +56225,17 @@]},"data": {- "$ref": "#/$defs/AssetAnnotationData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -49908,9 +56254,7 @@"code": {"type": "integer","enum": [- -1,- 1,- 403+ -1]},"data": {@@ -49948,11 +56292,11 @@},{"method": "POST",- "path": "/api/asset/getImageOCRText",- "handler": "getImageOCRText",+ "path": "/api/av/getMirrorDatabaseBlocks",+ "handler": "getMirrorDatabaseBlocks","body": "json","request": {- "$ref": "#/$defs/AssetOCRTextRequestInput"+ "$ref": "#/$defs/GetMirrorDatabaseBlocksRequestInput"},"response": {"anyOf": [@@ -49966,7 +56310,7 @@]},"data": {- "$ref": "#/$defs/AssetTextData"+ "$ref": "#/$defs/RefDefsData"},"msg": {"type": "string"@@ -50023,8 +56367,8 @@},{"method": "POST",- "path": "/api/asset/getMissingAssets",- "handler": "getMissingAssets",+ "path": "/api/av/getUnusedAttributeViews",+ "handler": "getUnusedAttributeViews","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -50115,11 +56459,11 @@},{"method": "POST",- "path": "/api/asset/getUnusedAssets",- "handler": "getUnusedAssets",- "body": "none",+ "path": "/api/av/removeAttributeViewBlocks",+ "handler": "removeAttributeViewBlocks",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/RemoveAttributeViewBlocksRequestInput"},"response": {"anyOf": [@@ -50133,24 +56477,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/AssetUnusedItem"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -50207,11 +56534,11 @@},{"method": "POST",- "path": "/api/asset/insertCover",- "handler": "insertCover",+ "path": "/api/av/removeAttributeViewKey",+ "handler": "removeAttributeViewKey","body": "json","request": {- "$ref": "#/$defs/InsertCoverRequestInput"+ "$ref": "#/$defs/RemoveAttributeViewKeyRequestInput"},"response": {"anyOf": [@@ -50225,7 +56552,7 @@]},"data": {- "$ref": "#/$defs/AssetInsertCoverData"+ "type": "null"},"msg": {"type": "string"@@ -50282,11 +56609,11 @@},{"method": "POST",- "path": "/api/asset/insertLocalAssets",- "handler": "insertLocalAssets",+ "path": "/api/av/removeUnusedAttributeView",+ "handler": "removeUnusedAttributeView","body": "json","request": {- "$ref": "#/$defs/InsertLocalAssetsRequestInput"+ "$ref": "#/$defs/RemoveUnusedAttributeViewRequestInput"},"response": {"anyOf": [@@ -50300,7 +56627,7 @@]},"data": {- "$ref": "#/$defs/AssetUploadData"+ "$ref": "#/$defs/AVIDData"},"msg": {"type": "string"@@ -50338,9 +56665,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/AssetUploadData"}]},@@ -50360,11 +56684,11 @@},{"method": "POST",- "path": "/api/asset/ocr",- "handler": "ocr",- "body": "json",+ "path": "/api/av/removeUnusedAttributeViews",+ "handler": "removeUnusedAttributeViews",+ "body": "none","request": {- "$ref": "#/$defs/AssetPathRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -50378,7 +56702,7 @@]},"data": {- "$ref": "#/$defs/AssetOCRData"+ "$ref": "#/$defs/AVPathsData"},"msg": {"type": "string"@@ -50435,11 +56759,11 @@},{"method": "POST",- "path": "/api/asset/removeUnusedAsset",- "handler": "removeUnusedAsset",+ "path": "/api/av/renderAttributeView",+ "handler": "renderAttributeView","body": "json","request": {- "$ref": "#/$defs/AssetPathRequestInput"+ "$ref": "#/$defs/RenderAttributeViewRequestInput"},"response": {"anyOf": [@@ -50453,7 +56777,7 @@]},"data": {- "$ref": "#/$defs/AssetPathData"+ "$ref": "#/$defs/AVRenderResult"},"msg": {"type": "string"@@ -50491,6 +56815,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/AVRenderResult"}]},@@ -50510,11 +56837,11 @@},{"method": "POST",- "path": "/api/asset/removeUnusedAssets",- "handler": "removeUnusedAssets",- "body": "none",+ "path": "/api/av/renderHistoryAttributeView",+ "handler": "renderHistoryAttributeView",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/RenderHistoryAttributeViewRequestInput"},"response": {"anyOf": [@@ -50528,7 +56855,7 @@]},"data": {- "$ref": "#/$defs/AssetPathsData"+ "$ref": "#/$defs/AVArchiveRenderData"},"msg": {"type": "string"@@ -50585,11 +56912,11 @@},{"method": "POST",- "path": "/api/asset/renameAsset",- "handler": "renameAsset",+ "path": "/api/av/renderSnapshotAttributeView",+ "handler": "renderSnapshotAttributeView","body": "json","request": {- "$ref": "#/$defs/RenameAssetRequestInput"+ "$ref": "#/$defs/RenderSnapshotAttributeViewRequestInput"},"response": {"anyOf": [@@ -50603,7 +56930,7 @@]},"data": {- "$ref": "#/$defs/AssetRenameData"+ "$ref": "#/$defs/AVArchiveRenderData"},"msg": {"type": "string"@@ -50660,11 +56987,11 @@},{"method": "POST",- "path": "/api/asset/resolveAssetPath",- "handler": "resolveAssetPath",+ "path": "/api/av/searchAttributeView",+ "handler": "searchAttributeView","body": "json","request": {- "$ref": "#/$defs/AssetPathRequestInput"+ "$ref": "#/$defs/SearchAttributeViewRequestInput"},"response": {"anyOf": [@@ -50678,7 +57005,7 @@]},"data": {- "type": "string"+ "$ref": "#/$defs/AVSearchData"},"msg": {"type": "string"@@ -50735,11 +57062,11 @@},{"method": "POST",- "path": "/api/asset/setFileAnnotation",- "handler": "setFileAnnotation",- "body": "json",+ "path": "/api/av/searchAttributeViewNonRelationKey",+ "handler": "searchAttributeViewNonRelationKey",+ "body": "none","request": {- "$ref": "#/$defs/SetAssetAnnotationRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -50810,11 +57137,11 @@},{"method": "POST",- "path": "/api/asset/setImageOCRText",- "handler": "setImageOCRText",+ "path": "/api/av/searchAttributeViewRelationKey",+ "handler": "searchAttributeViewRelationKey","body": "json","request": {- "$ref": "#/$defs/SetAssetOCRTextRequestInput"+ "$ref": "#/$defs/SearchAttributeViewRelationKeyRequestInput"},"response": {"anyOf": [@@ -50828,7 +57155,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/AVKeysData"},"msg": {"type": "string"@@ -50885,11 +57212,11 @@},{"method": "POST",- "path": "/api/asset/statAsset",- "handler": "statAsset",+ "path": "/api/av/searchAttributeViewRollupDestKeys",+ "handler": "searchAttributeViewRollupDestKeys","body": "json","request": {- "$ref": "#/$defs/AssetPathRequestInput"+ "$ref": "#/$defs/SearchAttributeViewRollupDestKeysRequestInput"},"response": {"anyOf": [@@ -50903,7 +57230,7 @@]},"data": {- "$ref": "#/$defs/AssetStatData"+ "$ref": "#/$defs/AVKeysData"},"msg": {"type": "string"@@ -50922,8 +57249,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -50961,11 +57287,11 @@},{"method": "POST",- "path": "/api/asset/upload",- "handler": "uploadAsset",- "body": "multipart",+ "path": "/api/av/setAttrViewContextFilter",+ "handler": "setAttrViewContextFilter",+ "body": "json","request": {- "$ref": "#/$defs/UploadAssetRequestInput"+ "$ref": "#/$defs/SetAttrViewContextFilterRequestInput"},"response": {"anyOf": [@@ -50979,7 +57305,7 @@]},"data": {- "$ref": "#/$defs/AssetUploadData"+ "$ref": "#/$defs/AVContextFilterData"},"msg": {"type": "string"@@ -51036,11 +57362,11 @@},{"method": "POST",- "path": "/api/asset/uploadCloud",- "handler": "uploadCloud",+ "path": "/api/av/setAttrViewFilters",+ "handler": "setAttrViewFilters","body": "json","request": {- "$ref": "#/$defs/AssetCloudUploadRequestInput"+ "$ref": "#/$defs/SetAttrViewFiltersRequestInput"},"response": {"anyOf": [@@ -51111,11 +57437,11 @@},{"method": "POST",- "path": "/api/asset/uploadCloudByAssetsPaths",- "handler": "uploadCloudByAssetsPaths",+ "path": "/api/av/setAttrViewGroup",+ "handler": "setAttrViewGroup","body": "json","request": {- "$ref": "#/$defs/AssetPathsCloudUploadRequestInput"+ "$ref": "#/$defs/SetAttrViewGroupRequestInput"},"response": {"anyOf": [@@ -51129,7 +57455,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/AVRenderResult"},"msg": {"type": "string"@@ -51167,6 +57493,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/AVRenderResult"}]},@@ -51186,11 +57515,11 @@},{"method": "POST",- "path": "/api/attr/batchGetBlockAttrs",- "handler": "batchGetBlockAttrs",+ "path": "/api/av/setAttrViewSorts",+ "handler": "setAttrViewSorts","body": "json","request": {- "$ref": "#/$defs/BlockIDsRequestInput"+ "$ref": "#/$defs/SetAttrViewSortsRequestInput"},"response": {"anyOf": [@@ -51204,20 +57533,7 @@]},"data": {- "type": "object",- "additionalProperties": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "type": "string"- }- },- {- "type": "null"- }- ]- }+ "type": "null"},"msg": {"type": "string"@@ -51274,11 +57590,11 @@},{"method": "POST",- "path": "/api/attr/batchSetBlockAttrs",- "handler": "batchSetBlockAttrs",+ "path": "/api/av/setAttributeViewBlockAttr",+ "handler": "setAttributeViewBlockAttr","body": "json","request": {- "$ref": "#/$defs/BatchSetBlockAttrsRequestInput"+ "$ref": "#/$defs/SetAttributeViewBlockAttrRequestInput"},"response": {"anyOf": [@@ -51292,7 +57608,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/AVValueData"},"msg": {"type": "string"@@ -51349,11 +57665,11 @@},{"method": "POST",- "path": "/api/attr/getBlockAttrs",- "handler": "getBlockAttrs",+ "path": "/api/av/setDatabaseBlockView",+ "handler": "setDatabaseBlockView","body": "json","request": {- "$ref": "#/$defs/BlockIDRequestInput"+ "$ref": "#/$defs/SetDatabaseBlockViewRequestInput"},"response": {"anyOf": [@@ -51367,10 +57683,7 @@]},"data": {- "type": "object",- "additionalProperties": {- "type": "string"- }+ "type": "null"},"msg": {"type": "string"@@ -51427,11 +57740,11 @@},{"method": "POST",- "path": "/api/attr/getBookmarkLabels",- "handler": "getBookmarkLabels",- "body": "none",+ "path": "/api/av/sortAttributeViewKey",+ "handler": "sortAttributeViewKey",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SortAttributeViewKeyRequestInput"},"response": {"anyOf": [@@ -51445,17 +57758,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "type": "string"- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -51512,11 +57815,11 @@},{"method": "POST",- "path": "/api/attr/resetBlockAttrs",- "handler": "resetBlockAttrs",- "body": "none",+ "path": "/api/av/sortAttributeViewViewKey",+ "handler": "sortAttributeViewViewKey",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SortAttributeViewViewKeyRequestInput"},"response": {"anyOf": [@@ -51587,11 +57890,11 @@},{"method": "POST",- "path": "/api/attr/setBlockAttrs",- "handler": "setBlockAttrs",+ "path": "/api/bazaar/batchUpdatePackage",+ "handler": "batchUpdatePackage","body": "json","request": {- "$ref": "#/$defs/SetBlockAttrsRequestInput"+ "$ref": "#/$defs/BatchUpdatePackageRequestInput"},"response": {"anyOf": [@@ -51624,7 +57927,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -51662,11 +57966,11 @@},{"method": "POST",- "path": "/api/av/addAttributeViewBlocks",- "handler": "addAttributeViewBlocks",+ "path": "/api/bazaar/getBazaarIcon",+ "handler": "getBazaarIcon","body": "json","request": {- "$ref": "#/$defs/AddAttributeViewBlocksRequestInput"+ "$ref": "#/$defs/GetBazaarIconRequestInput"},"response": {"anyOf": [@@ -51680,7 +57984,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -51699,7 +58003,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -51737,11 +58042,11 @@},{"method": "POST",- "path": "/api/av/addAttributeViewKey",- "handler": "addAttributeViewKey",+ "path": "/api/bazaar/getBazaarPackage",+ "handler": "getBazaarPackage","body": "json","request": {- "$ref": "#/$defs/AddAttributeViewKeyRequestInput"+ "$ref": "#/$defs/GetBazaarPackageRequestInput"},"response": {"anyOf": [@@ -51755,7 +58060,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarPackageDetail"},"msg": {"type": "string"@@ -51774,7 +58079,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -51812,11 +58118,11 @@},{"method": "POST",- "path": "/api/av/appendAttributeViewDetachedBlocksWithValues",- "handler": "appendAttributeViewDetachedBlocksWithValues",+ "path": "/api/bazaar/getBazaarPackageREADME",+ "handler": "getBazaarPackageREADME","body": "json","request": {- "$ref": "#/$defs/AppendAttributeViewDetachedBlocksWithValuesRequestInput"+ "$ref": "#/$defs/GetBazaarPackageREADMERequestInput"},"response": {"anyOf": [@@ -51830,7 +58136,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarREADMEData"},"msg": {"type": "string"@@ -51849,7 +58155,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -51887,11 +58194,11 @@},{"method": "POST",- "path": "/api/av/batchReplaceAttributeViewBlocks",- "handler": "batchReplaceAttributeViewBlocks",+ "path": "/api/bazaar/getBazaarPackageRating",+ "handler": "getBazaarPackageRating","body": "json","request": {- "$ref": "#/$defs/BatchReplaceAttributeViewBlocksRequestInput"+ "$ref": "#/$defs/GetBazaarPackageRatingRequestInput"},"response": {"anyOf": [@@ -51905,7 +58212,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarRatingResult"},"msg": {"type": "string"@@ -51924,7 +58231,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -51943,81 +58251,9 @@},{"type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/av/batchSetAttributeViewBlockAttrs",- "handler": "batchSetAttributeViewBlockAttrs",- "body": "json",- "request": {- "$ref": "#/$defs/BatchSetAttributeViewBlockAttrsRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "type": "null"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },- "data": {- "anyOf": [- {- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false},{- "type": "null"+ "$ref": "#/$defs/BazaarRatingResult"}]},@@ -52037,11 +58273,11 @@},{"method": "POST",- "path": "/api/av/changeAttrViewLayout",- "handler": "changeAttrViewLayout",+ "path": "/api/bazaar/getBazaarPackageRatings",+ "handler": "getBazaarPackageRatings","body": "json","request": {- "$ref": "#/$defs/ChangeAttrViewLayoutRequestInput"+ "$ref": "#/$defs/GetBazaarPackageRatingsRequestInput"},"response": {"anyOf": [@@ -52055,7 +58291,7 @@]},"data": {- "$ref": "#/$defs/AVRenderResult"+ "$ref": "#/$defs/BazaarRatingsData"},"msg": {"type": "string"@@ -52074,7 +58310,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -52093,9 +58330,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/AVRenderResult"}]},@@ -52115,11 +58349,11 @@},{"method": "POST",- "path": "/api/av/createAttributeViewItem",- "handler": "createAttributeViewItem",+ "path": "/api/bazaar/getBazaarPackageUserRatings",+ "handler": "getBazaarPackageUserRatings","body": "json","request": {- "$ref": "#/$defs/CreateAttributeViewItemRequestInput"+ "$ref": "#/$defs/GetBazaarPackageUserRatingsRequestInput"},"response": {"anyOf": [@@ -52133,7 +58367,7 @@]},"data": {- "$ref": "#/$defs/AVCreateItemResult"+ "$ref": "#/$defs/BazaarUserRatingsResult"},"msg": {"type": "string"@@ -52174,7 +58408,7 @@"type": "null"},{- "$ref": "#/$defs/AVCreateItemResult"+ "$ref": "#/$defs/BazaarUserRatingsResult"}]},@@ -52194,11 +58428,11 @@},{"method": "POST",- "path": "/api/av/createAttributeViewItemDocs",- "handler": "createAttributeViewItemDocs",+ "path": "/api/bazaar/getBazaarPlugin",+ "handler": "getBazaarPlugin","body": "json","request": {- "$ref": "#/$defs/CreateAttributeViewItemDocsRequestInput"+ "$ref": "#/$defs/GetBazaarPluginRequestInput"},"response": {"anyOf": [@@ -52212,7 +58446,7 @@]},"data": {- "$ref": "#/$defs/AVCreateItemDocsResult"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -52251,9 +58485,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/AVCreateItemDocsResult"}]},@@ -52273,11 +58504,11 @@},{"method": "POST",- "path": "/api/av/createAttributeViewItemWithMarkdown",- "handler": "createAttributeViewItemWithMarkdown",+ "path": "/api/bazaar/getBazaarTemplate",+ "handler": "getBazaarTemplate","body": "json","request": {- "$ref": "#/$defs/CreateAttributeViewItemWithMarkdownRequestInput"+ "$ref": "#/$defs/GetBazaarTemplateRequestInput"},"response": {"anyOf": [@@ -52291,7 +58522,7 @@]},"data": {- "$ref": "#/$defs/AVCreateItemResult"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -52330,9 +58561,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/AVCreateItemResult"}]},@@ -52352,11 +58580,11 @@},{"method": "POST",- "path": "/api/av/duplicateAttributeViewBlock",- "handler": "duplicateAttributeViewBlock",+ "path": "/api/bazaar/getBazaarTheme",+ "handler": "getBazaarTheme","body": "json","request": {- "$ref": "#/$defs/DuplicateAttributeViewBlockRequestInput"+ "$ref": "#/$defs/GetBazaarThemeRequestInput"},"response": {"anyOf": [@@ -52370,7 +58598,7 @@]},"data": {- "$ref": "#/$defs/AVDuplicateData"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -52389,7 +58617,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -52427,11 +58656,11 @@},{"method": "POST",- "path": "/api/av/getAttributeView",- "handler": "getAttributeView",+ "path": "/api/bazaar/getBazaarWidget",+ "handler": "getBazaarWidget","body": "json","request": {- "$ref": "#/$defs/GetAttributeViewRequestInput"+ "$ref": "#/$defs/GetBazaarWidgetRequestInput"},"response": {"anyOf": [@@ -52445,7 +58674,7 @@]},"data": {- "$ref": "#/$defs/AVData"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -52464,7 +58693,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -52502,11 +58732,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewAddingBlockDefaultValues",- "handler": "getAttributeViewAddingBlockDefaultValues",+ "path": "/api/bazaar/getInstalledIcon",+ "handler": "getInstalledIcon","body": "json","request": {- "$ref": "#/$defs/GetAttributeViewAddingBlockDefaultValuesRequestInput"+ "$ref": "#/$defs/GetInstalledIconRequestInput"},"response": {"anyOf": [@@ -52520,7 +58750,7 @@]},"data": {- "$ref": "#/$defs/AVValuesData"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -52539,7 +58769,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -52577,11 +58808,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewBacklinks",- "handler": "getAttributeViewBacklinks",+ "path": "/api/bazaar/getInstalledPackageSize",+ "handler": "getInstalledPackageSize","body": "json","request": {- "$ref": "#/$defs/GetAttributeViewBacklinksRequestInput"+ "$ref": "#/$defs/GetInstalledPackageSizeRequestInput"},"response": {"anyOf": [@@ -52595,14 +58826,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/AVAttributeViewBacklinks"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BazaarPackageSizeData"},"msg": {"type": "string"@@ -52621,7 +58845,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -52659,11 +58884,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewBoundBlockIDsByItemIDs",- "handler": "getAttributeViewBoundBlockIDsByItemIDs",+ "path": "/api/bazaar/getInstalledPlugin",+ "handler": "getInstalledPlugin","body": "json","request": {- "$ref": "#/$defs/GetAttributeViewBoundBlockIDsByItemIDsRequestInput"+ "$ref": "#/$defs/GetInstalledPluginRequestInput"},"response": {"anyOf": [@@ -52677,17 +58902,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "type": "string"- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -52706,7 +58921,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -52744,11 +58960,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewFieldViews",- "handler": "getAttributeViewFieldViews",+ "path": "/api/bazaar/getInstalledTemplate",+ "handler": "getInstalledTemplate","body": "json","request": {- "$ref": "#/$defs/GetAttributeViewFieldViewsRequestInput"+ "$ref": "#/$defs/GetInstalledTemplateRequestInput"},"response": {"anyOf": [@@ -52762,7 +58978,7 @@]},"data": {- "$ref": "#/$defs/AVFieldViewsData"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -52781,7 +58997,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -52819,11 +59036,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewFilterSort",- "handler": "getAttributeViewFilterSort",+ "path": "/api/bazaar/getInstalledTheme",+ "handler": "getInstalledTheme","body": "json","request": {- "$ref": "#/$defs/GetAttributeViewFilterSortRequestInput"+ "$ref": "#/$defs/GetInstalledThemeRequestInput"},"response": {"anyOf": [@@ -52837,7 +59054,7 @@]},"data": {- "$ref": "#/$defs/AVFilterSortData"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -52856,7 +59073,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -52894,11 +59112,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewItemIDsByBoundIDs",- "handler": "getAttributeViewItemIDsByBoundIDs",+ "path": "/api/bazaar/getInstalledWidget",+ "handler": "getInstalledWidget","body": "json","request": {- "$ref": "#/$defs/GetAttributeViewItemIDsByBoundIDsRequestInput"+ "$ref": "#/$defs/GetInstalledWidgetRequestInput"},"response": {"anyOf": [@@ -52912,17 +59130,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "type": "string"- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -52941,7 +59149,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -52979,11 +59188,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewItemStatuses",- "handler": "getAttributeViewItemStatuses",+ "path": "/api/bazaar/getUpdatedPackage",+ "handler": "getUpdatedPackage","body": "json","request": {- "$ref": "#/$defs/GetAttributeViewItemStatusesRequestInput"+ "$ref": "#/$defs/GetUpdatedPackageRequestInput"},"response": {"anyOf": [@@ -52996,13 +59205,43 @@0]},+ "data": {+ "$ref": "#/$defs/BazaarUpdatedData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1,+ 1+ ]+ },"data": {"anyOf": [{"type": "object",- "additionalProperties": {- "type": "string"- }+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -53018,6 +59257,42 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/bazaar/installBazaarIcon",+ "handler": "installBazaarIcon",+ "body": "json",+ "request": {+ "$ref": "#/$defs/InstallBazaarIconRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/BazaarAppearancePackagesData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -53026,7 +59301,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -53064,11 +59340,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewKeys",- "handler": "getAttributeViewKeys",+ "path": "/api/bazaar/installBazaarPlugin",+ "handler": "installBazaarPlugin","body": "json","request": {- "$ref": "#/$defs/GetAttributeViewKeysRequestInput"+ "$ref": "#/$defs/InstallBazaarPluginRequestInput"},"response": {"anyOf": [@@ -53082,24 +59358,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/AVBlockAttributeViewKeys"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -53118,7 +59377,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -53156,11 +59416,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewKeysByAvID",- "handler": "getAttributeViewKeysByAvID",+ "path": "/api/bazaar/installBazaarTemplate",+ "handler": "installBazaarTemplate","body": "json","request": {- "$ref": "#/$defs/GetAttributeViewKeysByAvIDRequestInput"+ "$ref": "#/$defs/InstallBazaarTemplateRequestInput"},"response": {"anyOf": [@@ -53174,24 +59434,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/AVKey"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -53210,7 +59453,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -53248,11 +59492,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewKeysByID",- "handler": "getAttributeViewKeysByID",+ "path": "/api/bazaar/installBazaarTheme",+ "handler": "installBazaarTheme","body": "json","request": {- "$ref": "#/$defs/GetAttributeViewKeysByIDRequestInput"+ "$ref": "#/$defs/InstallBazaarThemeRequestInput"},"response": {"anyOf": [@@ -53266,24 +59510,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/AVKey"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BazaarAppearancePackagesData"},"msg": {"type": "string"@@ -53302,7 +59529,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -53340,11 +59568,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewPasteRows",- "handler": "getAttributeViewPasteRows",+ "path": "/api/bazaar/installBazaarWidget",+ "handler": "installBazaarWidget","body": "json","request": {- "$ref": "#/$defs/GetAttributeViewPasteRowsRequestInput"+ "$ref": "#/$defs/InstallBazaarWidgetRequestInput"},"response": {"anyOf": [@@ -53358,7 +59586,7 @@]},"data": {- "$ref": "#/$defs/AVPasteRowsData"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -53377,7 +59605,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -53415,11 +59644,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewPrimaryKeyValues",- "handler": "getAttributeViewPrimaryKeyValues",- "body": "json",+ "path": "/api/bazaar/installLocalBazaarPackage",+ "handler": "installLocalBazaarPackage",+ "body": "multipart","request": {- "$ref": "#/$defs/GetAttributeViewPrimaryKeyValuesRequestInput"+ "$ref": "#/$defs/InstallLocalBazaarPackageRequestInput"},"response": {"anyOf": [@@ -53433,7 +59662,7 @@]},"data": {- "$ref": "#/$defs/AVPrimaryValuesData"+ "$ref": "#/$defs/BazaarLocalInstallResult"},"msg": {"type": "string"@@ -53452,7 +59681,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -53471,6 +59701,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/BazaarLocalInstallResult"}]},@@ -53490,11 +59723,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewRelationCandidates",- "handler": "getAttributeViewRelationCandidates",+ "path": "/api/bazaar/setBazaarPackageRating",+ "handler": "setBazaarPackageRating","body": "json","request": {- "$ref": "#/$defs/GetAttributeViewRelationCandidatesRequestInput"+ "$ref": "#/$defs/SetBazaarPackageRatingRequestInput"},"response": {"anyOf": [@@ -53508,7 +59741,7 @@]},"data": {- "$ref": "#/$defs/AVRelationCandidatesData"+ "$ref": "#/$defs/BazaarRatingResult"},"msg": {"type": "string"@@ -53527,7 +59760,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -53546,6 +59780,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/BazaarRatingResult"}]},@@ -53565,11 +59802,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewRowSort",- "handler": "getAttributeViewRowSort",- "body": "structJSON",+ "path": "/api/bazaar/uninstallBazaarIcon",+ "handler": "uninstallBazaarIcon",+ "body": "json","request": {- "$ref": "#/$defs/GetAttributeViewRowSortRequestInput"+ "$ref": "#/$defs/UninstallBazaarIconRequestInput"},"response": {"anyOf": [@@ -53583,7 +59820,7 @@]},"data": {- "$ref": "#/$defs/AVRowSortPreview"+ "$ref": "#/$defs/BazaarAppearancePackagesData"},"msg": {"type": "string"@@ -53602,7 +59839,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -53640,11 +59878,11 @@},{"method": "POST",- "path": "/api/av/getAttributeViewSearchTarget",- "handler": "getAttributeViewSearchTarget",+ "path": "/api/bazaar/uninstallBazaarPlugin",+ "handler": "uninstallBazaarPlugin","body": "json","request": {- "$ref": "#/$defs/GetAttributeViewSearchTargetRequestInput"+ "$ref": "#/$defs/UninstallBazaarPluginRequestInput"},"response": {"anyOf": [@@ -53658,14 +59896,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/AVAttributeViewSearchTarget"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -53684,7 +59915,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -53722,11 +59954,11 @@},{"method": "POST",- "path": "/api/av/getCurrentAttrViewImages",- "handler": "getCurrentAttrViewImages",+ "path": "/api/bazaar/uninstallBazaarTemplate",+ "handler": "uninstallBazaarTemplate","body": "json","request": {- "$ref": "#/$defs/GetCurrentAttrViewImagesRequestInput"+ "$ref": "#/$defs/UninstallBazaarTemplateRequestInput"},"response": {"anyOf": [@@ -53740,17 +59972,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "type": "string"- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -53769,7 +59991,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -53807,11 +60030,11 @@},{"method": "POST",- "path": "/api/av/getMirrorDatabaseBlocks",- "handler": "getMirrorDatabaseBlocks",+ "path": "/api/bazaar/uninstallBazaarTheme",+ "handler": "uninstallBazaarTheme","body": "json","request": {- "$ref": "#/$defs/GetMirrorDatabaseBlocksRequestInput"+ "$ref": "#/$defs/UninstallBazaarThemeRequestInput"},"response": {"anyOf": [@@ -53825,7 +60048,7 @@]},"data": {- "$ref": "#/$defs/RefDefsData"+ "$ref": "#/$defs/BazaarAppearancePackagesData"},"msg": {"type": "string"@@ -53844,7 +60067,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -53882,11 +60106,11 @@},{"method": "POST",- "path": "/api/av/getUnusedAttributeViews",- "handler": "getUnusedAttributeViews",- "body": "none",+ "path": "/api/bazaar/uninstallBazaarWidget",+ "handler": "uninstallBazaarWidget",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/UninstallBazaarWidgetRequestInput"},"response": {"anyOf": [@@ -53899,20 +60123,43 @@0]},+ "data": {+ "$ref": "#/$defs/BazaarPackagesData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1,+ 1+ ]+ },"data": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/AssetUnusedItem"- },- {- "type": "null"- }- ]- }+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -53928,6 +60175,42 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/bazaar/updateBazaarPackage",+ "handler": "updateBazaarPackage",+ "body": "json",+ "request": {+ "$ref": "#/$defs/UpdateBazaarPackageRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/BazaarPackagesData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -53936,7 +60219,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -53974,11 +60258,11 @@},{"method": "POST",- "path": "/api/av/removeAttributeViewBlocks",- "handler": "removeAttributeViewBlocks",+ "path": "/api/block/appendBlock",+ "handler": "appendBlock","body": "json","request": {- "$ref": "#/$defs/RemoveAttributeViewBlocksRequestInput"+ "$ref": "#/$defs/AppendBlockRequestInput"},"response": {"anyOf": [@@ -53992,7 +60276,24 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -54049,11 +60350,11 @@},{"method": "POST",- "path": "/api/av/removeAttributeViewKey",- "handler": "removeAttributeViewKey",+ "path": "/api/block/appendDailyNoteBlock",+ "handler": "appendDailyNoteBlock","body": "json","request": {- "$ref": "#/$defs/RemoveAttributeViewKeyRequestInput"+ "$ref": "#/$defs/DailyNoteBlockRequestInput"},"response": {"anyOf": [@@ -54067,7 +60368,24 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -54124,11 +60442,11 @@},{"method": "POST",- "path": "/api/av/removeUnusedAttributeView",- "handler": "removeUnusedAttributeView",+ "path": "/api/block/appendHeadingChildren",+ "handler": "appendHeadingChildren","body": "json","request": {- "$ref": "#/$defs/RemoveUnusedAttributeViewRequestInput"+ "$ref": "#/$defs/AppendHeadingChildrenRequestInput"},"response": {"anyOf": [@@ -54142,7 +60460,7 @@]},"data": {- "$ref": "#/$defs/AVIDData"+ "type": "null"},"msg": {"type": "string"@@ -54199,11 +60517,11 @@},{"method": "POST",- "path": "/api/av/removeUnusedAttributeViews",- "handler": "removeUnusedAttributeViews",- "body": "none",+ "path": "/api/block/batchAppendBlock",+ "handler": "batchAppendBlock",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/BatchParentBlockRequestInput"},"response": {"anyOf": [@@ -54217,7 +60535,24 @@]},"data": {- "$ref": "#/$defs/AVPathsData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -54274,11 +60609,11 @@},{"method": "POST",- "path": "/api/av/renderAttributeView",- "handler": "renderAttributeView",+ "path": "/api/block/batchInsertBlock",+ "handler": "batchInsertBlock","body": "json","request": {- "$ref": "#/$defs/RenderAttributeViewRequestInput"+ "$ref": "#/$defs/BatchInsertBlockRequestInput"},"response": {"anyOf": [@@ -54292,7 +60627,24 @@]},"data": {- "$ref": "#/$defs/AVRenderResult"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -54330,9 +60682,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/AVRenderResult"}]},@@ -54352,11 +60701,11 @@},{"method": "POST",- "path": "/api/av/renderHistoryAttributeView",- "handler": "renderHistoryAttributeView",+ "path": "/api/block/batchPrependBlock",+ "handler": "batchPrependBlock","body": "json","request": {- "$ref": "#/$defs/RenderHistoryAttributeViewRequestInput"+ "$ref": "#/$defs/BatchParentBlockRequestInput"},"response": {"anyOf": [@@ -54370,7 +60719,24 @@]},"data": {- "$ref": "#/$defs/AVArchiveRenderData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -54427,11 +60793,11 @@},{"method": "POST",- "path": "/api/av/renderSnapshotAttributeView",- "handler": "renderSnapshotAttributeView",+ "path": "/api/block/batchUpdateBlock",+ "handler": "batchUpdateBlock","body": "json","request": {- "$ref": "#/$defs/RenderSnapshotAttributeViewRequestInput"+ "$ref": "#/$defs/BatchUpdateBlockRequestInput"},"response": {"anyOf": [@@ -54445,7 +60811,24 @@]},"data": {- "$ref": "#/$defs/AVArchiveRenderData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -54502,11 +60885,11 @@},{"method": "POST",- "path": "/api/av/searchAttributeView",- "handler": "searchAttributeView",+ "path": "/api/block/batchUpdateTaskListItemMarker",+ "handler": "batchUpdateTaskListItemMarker","body": "json","request": {- "$ref": "#/$defs/SearchAttributeViewRequestInput"+ "$ref": "#/$defs/BatchTaskListMarkerRequestInput"},"response": {"anyOf": [@@ -54519,42 +60902,20 @@0]},- "data": {- "$ref": "#/$defs/AVSearchData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }},{"type": "null"@@ -54570,42 +60931,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/av/searchAttributeViewNonRelationKey",- "handler": "searchAttributeViewNonRelationKey",- "body": "none",- "request": {- "$ref": "#/$defs/EmptyRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "type": "null"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -54652,11 +60977,11 @@},{"method": "POST",- "path": "/api/av/searchAttributeViewRelationKey",- "handler": "searchAttributeViewRelationKey",+ "path": "/api/block/checkBlockExist",+ "handler": "checkBlockExist","body": "json","request": {- "$ref": "#/$defs/SearchAttributeViewRelationKeyRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -54670,7 +60995,7 @@]},"data": {- "$ref": "#/$defs/AVKeysData"+ "type": "boolean"},"msg": {"type": "string"@@ -54727,11 +61052,11 @@},{"method": "POST",- "path": "/api/av/searchAttributeViewRollupDestKeys",- "handler": "searchAttributeViewRollupDestKeys",+ "path": "/api/block/checkBlockFold",+ "handler": "checkBlockFold","body": "json","request": {- "$ref": "#/$defs/SearchAttributeViewRollupDestKeysRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -54745,7 +61070,7 @@]},"data": {- "$ref": "#/$defs/AVKeysData"+ "$ref": "#/$defs/BlockFoldData"},"msg": {"type": "string"@@ -54802,11 +61127,11 @@},{"method": "POST",- "path": "/api/av/setAttrViewContextFilter",- "handler": "setAttrViewContextFilter",+ "path": "/api/block/checkBlockRef",+ "handler": "checkBlockRef","body": "json","request": {- "$ref": "#/$defs/SetAttrViewContextFilterRequestInput"+ "$ref": "#/$defs/CheckBlockRefRequestInput"},"response": {"anyOf": [@@ -54820,7 +61145,7 @@]},"data": {- "$ref": "#/$defs/AVContextFilterData"+ "type": "boolean"},"msg": {"type": "string"@@ -54858,6 +61183,9 @@},{"type": "null"+ },+ {+ "type": "boolean"}]},@@ -54877,11 +61205,11 @@},{"method": "POST",- "path": "/api/av/setAttrViewFilters",- "handler": "setAttrViewFilters",+ "path": "/api/block/checkBlocksExist",+ "handler": "checkBlocksExist","body": "json","request": {- "$ref": "#/$defs/SetAttrViewFiltersRequestInput"+ "$ref": "#/$defs/CheckBlocksExistRequestInput"},"response": {"anyOf": [@@ -54895,7 +61223,17 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "boolean"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -54952,11 +61290,11 @@},{"method": "POST",- "path": "/api/av/setAttrViewGroup",- "handler": "setAttrViewGroup",+ "path": "/api/block/deleteBlock",+ "handler": "deleteBlock","body": "json","request": {- "$ref": "#/$defs/SetAttrViewGroupRequestInput"+ "$ref": "#/$defs/DeleteBlockRequestInput"},"response": {"anyOf": [@@ -54970,7 +61308,24 @@]},"data": {- "$ref": "#/$defs/AVRenderResult"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -55008,9 +61363,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/AVRenderResult"}]},@@ -55030,11 +61382,11 @@},{"method": "POST",- "path": "/api/av/setAttrViewSorts",- "handler": "setAttrViewSorts",+ "path": "/api/block/foldBlock",+ "handler": "foldBlock","body": "json","request": {- "$ref": "#/$defs/SetAttrViewSortsRequestInput"+ "$ref": "#/$defs/BlockIDRequestInput"},"response": {"anyOf": [@@ -55105,11 +61457,11 @@},{"method": "POST",- "path": "/api/av/setAttributeViewBlockAttr",- "handler": "setAttributeViewBlockAttr",+ "path": "/api/block/getBlockBreadcrumb",+ "handler": "getBlockBreadcrumb","body": "json","request": {- "$ref": "#/$defs/SetAttributeViewBlockAttrRequestInput"+ "$ref": "#/$defs/BlockBreadcrumbRequestInput"},"response": {"anyOf": [@@ -55123,7 +61475,24 @@]},"data": {- "$ref": "#/$defs/AVValueData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockPath"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -55180,11 +61549,11 @@},{"method": "POST",- "path": "/api/av/setDatabaseBlockView",- "handler": "setDatabaseBlockView",+ "path": "/api/block/getBlockBreadcrumbChildren",+ "handler": "getBlockBreadcrumbChildren","body": "json","request": {- "$ref": "#/$defs/SetDatabaseBlockViewRequestInput"+ "$ref": "#/$defs/BlockBreadcrumbChildrenRequestInput"},"response": {"anyOf": [@@ -55198,7 +61567,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/BlockBreadcrumbChildren"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -55255,11 +61631,11 @@},{"method": "POST",- "path": "/api/av/sortAttributeViewKey",- "handler": "sortAttributeViewKey",+ "path": "/api/block/getBlockDOM",+ "handler": "getBlockDOM","body": "json","request": {- "$ref": "#/$defs/SortAttributeViewKeyRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -55273,7 +61649,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BlockDOMData"},"msg": {"type": "string"@@ -55330,11 +61706,11 @@},{"method": "POST",- "path": "/api/av/sortAttributeViewViewKey",- "handler": "sortAttributeViewViewKey",+ "path": "/api/block/getBlockDOMWithEmbed",+ "handler": "getBlockDOMWithEmbed","body": "json","request": {- "$ref": "#/$defs/SortAttributeViewViewKeyRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -55348,7 +61724,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BlockDOMData"},"msg": {"type": "string"@@ -55405,11 +61781,11 @@},{"method": "POST",- "path": "/api/bazaar/batchUpdatePackage",- "handler": "batchUpdatePackage",+ "path": "/api/block/getBlockDOMs",+ "handler": "getBlockDOMs","body": "json","request": {- "$ref": "#/$defs/BatchUpdatePackageRequestInput"+ "$ref": "#/$defs/BlocksQueryRequestInput"},"response": {"anyOf": [@@ -55423,7 +61799,17 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -55442,8 +61828,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -55481,11 +61866,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarIcon",- "handler": "getBazaarIcon",+ "path": "/api/block/getBlockDOMsWithEmbed",+ "handler": "getBlockDOMsWithEmbed","body": "json","request": {- "$ref": "#/$defs/GetBazaarIconRequestInput"+ "$ref": "#/$defs/BlocksQueryRequestInput"},"response": {"anyOf": [@@ -55499,7 +61884,17 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -55518,8 +61913,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -55557,11 +61951,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarPackage",- "handler": "getBazaarPackage",+ "path": "/api/block/getBlockDefIDsByRefText",+ "handler": "getBlockDefIDsByRefText","body": "json","request": {- "$ref": "#/$defs/GetBazaarPackageRequestInput"+ "$ref": "#/$defs/RefTextQueryRequestInput"},"response": {"anyOf": [@@ -55575,7 +61969,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackageDetail"+ "$ref": "#/$defs/RefDefsData"},"msg": {"type": "string"@@ -55594,8 +61988,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -55633,11 +62026,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarPackageREADME",- "handler": "getBazaarPackageREADME",+ "path": "/api/block/getBlockIndex",+ "handler": "getBlockIndex","body": "json","request": {- "$ref": "#/$defs/GetBazaarPackageREADMERequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -55651,7 +62044,7 @@]},"data": {- "$ref": "#/$defs/BazaarREADMEData"+ "type": "integer"},"msg": {"type": "string"@@ -55670,8 +62063,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -55709,11 +62101,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarPackageRating",- "handler": "getBazaarPackageRating",+ "path": "/api/block/getBlockInfo",+ "handler": "getBlockInfo","body": "json","request": {- "$ref": "#/$defs/GetBazaarPackageRatingRequestInput"+ "$ref": "#/$defs/BlockInfoRequestInput"},"response": {"anyOf": [@@ -55727,7 +62119,7 @@]},"data": {- "$ref": "#/$defs/BazaarRatingResult"+ "$ref": "#/$defs/BlockInfoData"},"msg": {"type": "string"@@ -55747,7 +62139,7 @@"type": "integer","enum": [-1,- 1+ 3]},"data": {@@ -55768,7 +62160,7 @@"type": "null"},{- "$ref": "#/$defs/BazaarRatingResult"+ "type": "string"}]},@@ -55788,11 +62180,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarPackageRatings",- "handler": "getBazaarPackageRatings",+ "path": "/api/block/getBlockKramdown",+ "handler": "getBlockKramdown","body": "json","request": {- "$ref": "#/$defs/GetBazaarPackageRatingsRequestInput"+ "$ref": "#/$defs/BlockKramdownRequestInput"},"response": {"anyOf": [@@ -55806,7 +62198,7 @@]},"data": {- "$ref": "#/$defs/BazaarRatingsData"+ "$ref": "#/$defs/BlockKramdownData"},"msg": {"type": "string"@@ -55825,8 +62217,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -55864,11 +62255,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarPackageUserRatings",- "handler": "getBazaarPackageUserRatings",+ "path": "/api/block/getBlockKramdowns",+ "handler": "getBlockKramdowns","body": "json","request": {- "$ref": "#/$defs/GetBazaarPackageUserRatingsRequestInput"+ "$ref": "#/$defs/BlocksKramdownRequestInput"},"response": {"anyOf": [@@ -55881,49 +62272,16 @@0]},- "data": {- "$ref": "#/$defs/BazaarUserRatingsResult"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1,- 1- ]- },"data": {"anyOf": [{"type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "additionalProperties": {+ "type": "string"+ }},{"type": "null"- },- {- "$ref": "#/$defs/BazaarUserRatingsResult"}]},@@ -55936,42 +62294,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/bazaar/getBazaarPlugin",- "handler": "getBazaarPlugin",- "body": "json",- "request": {- "$ref": "#/$defs/GetBazaarPluginRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/BazaarPackagesData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -55980,8 +62302,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -56019,11 +62340,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarTemplate",- "handler": "getBazaarTemplate",+ "path": "/api/block/getBlockRelevantIDs",+ "handler": "getBlockRelevantIDs","body": "json","request": {- "$ref": "#/$defs/GetBazaarTemplateRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -56037,7 +62358,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "$ref": "#/$defs/BlockRelevantData"},"msg": {"type": "string"@@ -56056,8 +62377,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -56095,11 +62415,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarTheme",- "handler": "getBazaarTheme",+ "path": "/api/block/getBlockSiblingID",+ "handler": "getBlockSiblingID","body": "json","request": {- "$ref": "#/$defs/GetBazaarThemeRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -56113,7 +62433,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "$ref": "#/$defs/BlockSiblingData"},"msg": {"type": "string"@@ -56132,8 +62452,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -56171,11 +62490,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarWidget",- "handler": "getBazaarWidget",+ "path": "/api/block/getBlockTreeInfos",+ "handler": "getBlockTreeInfos","body": "json","request": {- "$ref": "#/$defs/GetBazaarWidgetRequestInput"+ "$ref": "#/$defs/BlocksQueryRequestInput"},"response": {"anyOf": [@@ -56188,43 +62507,20 @@0]},- "data": {- "$ref": "#/$defs/BazaarPackagesData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1,- 1- ]- },"data": {"anyOf": [{"type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "additionalProperties": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTreeInfo"+ },+ {+ "type": "null"+ }+ ]+ }},{"type": "null"@@ -56240,42 +62536,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/bazaar/getInstalledIcon",- "handler": "getInstalledIcon",- "body": "json",- "request": {- "$ref": "#/$defs/GetInstalledIconRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/BazaarPackagesData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -56284,8 +62544,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -56323,11 +62582,11 @@},{"method": "POST",- "path": "/api/bazaar/getInstalledPackageSize",- "handler": "getInstalledPackageSize",+ "path": "/api/block/getBlocksIndexes",+ "handler": "getBlocksIndexes","body": "json","request": {- "$ref": "#/$defs/GetInstalledPackageSizeRequestInput"+ "$ref": "#/$defs/BlocksQueryRequestInput"},"response": {"anyOf": [@@ -56341,7 +62600,17 @@]},"data": {- "$ref": "#/$defs/BazaarPackageSizeData"+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "integer"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -56360,8 +62629,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -56399,11 +62667,11 @@},{"method": "POST",- "path": "/api/bazaar/getInstalledPlugin",- "handler": "getInstalledPlugin",+ "path": "/api/block/getBlocksWordCount",+ "handler": "getBlocksWordCount","body": "json","request": {- "$ref": "#/$defs/GetInstalledPluginRequestInput"+ "$ref": "#/$defs/BlocksWordCountRequestInput"},"response": {"anyOf": [@@ -56417,7 +62685,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "$ref": "#/$defs/WordCountData"},"msg": {"type": "string"@@ -56436,8 +62704,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -56475,11 +62742,11 @@},{"method": "POST",- "path": "/api/bazaar/getInstalledTemplate",- "handler": "getInstalledTemplate",+ "path": "/api/block/getChildBlocks",+ "handler": "getChildBlocks","body": "json","request": {- "$ref": "#/$defs/GetInstalledTemplateRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -56493,7 +62760,17 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/ChildBlock"+ },+ {+ "type": "null"+ }+ ]+ }},"msg": {"type": "string"@@ -56512,8 +62789,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -56551,11 +62827,11 @@},{"method": "POST",- "path": "/api/bazaar/getInstalledTheme",- "handler": "getInstalledTheme",+ "path": "/api/block/getContentWordCount",+ "handler": "getContentWordCount","body": "json","request": {- "$ref": "#/$defs/GetInstalledThemeRequestInput"+ "$ref": "#/$defs/ContentWordCountRequestInput"},"response": {"anyOf": [@@ -56569,7 +62845,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "$ref": "#/$defs/WordCountData"},"msg": {"type": "string"@@ -56588,8 +62864,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -56627,11 +62902,11 @@},{"method": "POST",- "path": "/api/bazaar/getInstalledWidget",- "handler": "getInstalledWidget",+ "path": "/api/block/getDOMText",+ "handler": "getDOMText","body": "json","request": {- "$ref": "#/$defs/GetInstalledWidgetRequestInput"+ "$ref": "#/$defs/DOMTextRequestInput"},"response": {"anyOf": [@@ -56645,7 +62920,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "type": "string"},"msg": {"type": "string"@@ -56664,8 +62939,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -56703,11 +62977,11 @@},{"method": "POST",- "path": "/api/bazaar/getUpdatedPackage",- "handler": "getUpdatedPackage",+ "path": "/api/block/getDocBlocksOrders",+ "handler": "getDocBlocksOrders","body": "json","request": {- "$ref": "#/$defs/GetUpdatedPackageRequestInput"+ "$ref": "#/$defs/DocOrdersRequestInput"},"response": {"anyOf": [@@ -56721,7 +62995,17 @@]},"data": {- "$ref": "#/$defs/BazaarUpdatedData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -56740,8 +63024,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -56779,11 +63062,11 @@},{"method": "POST",- "path": "/api/bazaar/installBazaarIcon",- "handler": "installBazaarIcon",- "body": "json",+ "path": "/api/block/getDocHeadingLevelTransaction",+ "handler": "getDocHeadingLevelTransaction",+ "body": "structJSON","request": {- "$ref": "#/$defs/InstallBazaarIconRequestInput"+ "$ref": "#/$defs/DocHeadingLevelRequestInput"},"response": {"anyOf": [@@ -56797,7 +63080,14 @@]},"data": {- "$ref": "#/$defs/BazaarAppearancePackagesData"+ "anyOf": [+ {+ "$ref": "#/$defs/DocHeadingLevelData"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -56816,8 +63106,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -56855,11 +63144,11 @@},{"method": "POST",- "path": "/api/bazaar/installBazaarPlugin",- "handler": "installBazaarPlugin",+ "path": "/api/block/getDocInfo",+ "handler": "getDocInfo","body": "json","request": {- "$ref": "#/$defs/InstallBazaarPluginRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -56873,7 +63162,14 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "anyOf": [+ {+ "$ref": "#/$defs/DocInfo"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -56892,8 +63188,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -56931,11 +63226,11 @@},{"method": "POST",- "path": "/api/bazaar/installBazaarTemplate",- "handler": "installBazaarTemplate",+ "path": "/api/block/getDocsInfo",+ "handler": "getDocsInfo","body": "json","request": {- "$ref": "#/$defs/InstallBazaarTemplateRequestInput"+ "$ref": "#/$defs/DocsInfoRequestInput"},"response": {"anyOf": [@@ -56949,7 +63244,24 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/DocInfo"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -56968,8 +63280,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -57007,11 +63318,11 @@},{"method": "POST",- "path": "/api/bazaar/installBazaarTheme",- "handler": "installBazaarTheme",+ "path": "/api/block/getHeadingChildrenDOM",+ "handler": "getHeadingChildrenDOM","body": "json","request": {- "$ref": "#/$defs/InstallBazaarThemeRequestInput"+ "$ref": "#/$defs/HeadingChildrenRequestInput"},"response": {"anyOf": [@@ -57025,7 +63336,7 @@]},"data": {- "$ref": "#/$defs/BazaarAppearancePackagesData"+ "type": "string"},"msg": {"type": "string"@@ -57044,8 +63355,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -57083,11 +63393,11 @@},{"method": "POST",- "path": "/api/bazaar/installBazaarWidget",- "handler": "installBazaarWidget",+ "path": "/api/block/getHeadingChildrenIDs",+ "handler": "getHeadingChildrenIDs","body": "json","request": {- "$ref": "#/$defs/InstallBazaarWidgetRequestInput"+ "$ref": "#/$defs/BlockIDRequestInput"},"response": {"anyOf": [@@ -57101,7 +63411,17 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -57120,8 +63440,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -57159,11 +63478,11 @@},{"method": "POST",- "path": "/api/bazaar/installLocalBazaarPackage",- "handler": "installLocalBazaarPackage",- "body": "multipart",+ "path": "/api/block/getHeadingDeleteTransaction",+ "handler": "getHeadingDeleteTransaction",+ "body": "json","request": {- "$ref": "#/$defs/InstallLocalBazaarPackageRequestInput"+ "$ref": "#/$defs/BlockIDRequestInput"},"response": {"anyOf": [@@ -57177,7 +63496,14 @@]},"data": {- "$ref": "#/$defs/BazaarLocalInstallResult"+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -57196,8 +63522,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -57216,9 +63541,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/BazaarLocalInstallResult"}]},@@ -57238,11 +63560,11 @@},{"method": "POST",- "path": "/api/bazaar/setBazaarPackageRating",- "handler": "setBazaarPackageRating",+ "path": "/api/block/getHeadingFoldTransaction",+ "handler": "getHeadingFoldTransaction","body": "json","request": {- "$ref": "#/$defs/SetBazaarPackageRatingRequestInput"+ "$ref": "#/$defs/HeadingFoldRequestInput"},"response": {"anyOf": [@@ -57256,7 +63578,14 @@]},"data": {- "$ref": "#/$defs/BazaarRatingResult"+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -57275,8 +63604,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -57295,9 +63623,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/BazaarRatingResult"}]},@@ -57317,11 +63642,11 @@},{"method": "POST",- "path": "/api/bazaar/uninstallBazaarIcon",- "handler": "uninstallBazaarIcon",+ "path": "/api/block/getHeadingInsertTransaction",+ "handler": "getHeadingInsertTransaction","body": "json","request": {- "$ref": "#/$defs/UninstallBazaarIconRequestInput"+ "$ref": "#/$defs/BlockIDRequestInput"},"response": {"anyOf": [@@ -57335,7 +63660,14 @@]},"data": {- "$ref": "#/$defs/BazaarAppearancePackagesData"+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -57354,8 +63686,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -57393,11 +63724,11 @@},{"method": "POST",- "path": "/api/bazaar/uninstallBazaarPlugin",- "handler": "uninstallBazaarPlugin",+ "path": "/api/block/getHeadingLevelTransaction",+ "handler": "getHeadingLevelTransaction","body": "json","request": {- "$ref": "#/$defs/UninstallBazaarPluginRequestInput"+ "$ref": "#/$defs/HeadingLevelRequestInput"},"response": {"anyOf": [@@ -57411,7 +63742,14 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -57430,8 +63768,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -57469,11 +63806,11 @@},{"method": "POST",- "path": "/api/bazaar/uninstallBazaarTemplate",- "handler": "uninstallBazaarTemplate",+ "path": "/api/block/getOrderedListContinueStart",+ "handler": "getOrderedListContinueStart","body": "json","request": {- "$ref": "#/$defs/UninstallBazaarTemplateRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -57487,7 +63824,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "$ref": "#/$defs/OrderedListStartData"},"msg": {"type": "string"@@ -57506,8 +63843,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -57545,11 +63881,11 @@},{"method": "POST",- "path": "/api/bazaar/uninstallBazaarTheme",- "handler": "uninstallBazaarTheme",- "body": "json",+ "path": "/api/block/getRecentUpdatedBlocks",+ "handler": "getRecentUpdatedBlocks",+ "body": "none","request": {- "$ref": "#/$defs/UninstallBazaarThemeRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -57563,7 +63899,24 @@]},"data": {- "$ref": "#/$defs/BazaarAppearancePackagesData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchBlock"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -57582,8 +63935,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -57621,11 +63973,11 @@},{"method": "POST",- "path": "/api/bazaar/uninstallBazaarWidget",- "handler": "uninstallBazaarWidget",+ "path": "/api/block/getRefIDs",+ "handler": "getRefIDs","body": "json","request": {- "$ref": "#/$defs/UninstallBazaarWidgetRequestInput"+ "$ref": "#/$defs/RefIDsRequestInput"},"response": {"anyOf": [@@ -57639,7 +63991,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "$ref": "#/$defs/RefIDsData"},"msg": {"type": "string"@@ -57658,8 +64010,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -57697,11 +64048,11 @@},{"method": "POST",- "path": "/api/bazaar/updateBazaarPackage",- "handler": "updateBazaarPackage",+ "path": "/api/block/getRefIDsByFileAnnotationID",+ "handler": "getRefIDsByFileAnnotationID","body": "json","request": {- "$ref": "#/$defs/UpdateBazaarPackageRequestInput"+ "$ref": "#/$defs/FileAnnotationRefRequestInput"},"response": {"anyOf": [@@ -57715,7 +64066,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "$ref": "#/$defs/RefDefsData"},"msg": {"type": "string"@@ -57734,8 +64085,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -57773,11 +64123,11 @@},{"method": "POST",- "path": "/api/block/appendBlock",- "handler": "appendBlock",+ "path": "/api/block/getRefText",+ "handler": "getRefText","body": "json","request": {- "$ref": "#/$defs/AppendBlockRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -57791,24 +64141,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "type": "string"},"msg": {"type": "string"@@ -57865,11 +64198,11 @@},{"method": "POST",- "path": "/api/block/appendDailyNoteBlock",- "handler": "appendDailyNoteBlock",+ "path": "/api/block/getTailChildBlocks",+ "handler": "getTailChildBlocks","body": "json","request": {- "$ref": "#/$defs/DailyNoteBlockRequestInput"+ "$ref": "#/$defs/TailChildBlocksRequestInput"},"response": {"anyOf": [@@ -57883,24 +64216,17 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/ChildBlock"+ },+ {+ "type": "null"}- },- {- "type": "null"- }- ]+ ]+ }},"msg": {"type": "string"@@ -57957,11 +64283,11 @@},{"method": "POST",- "path": "/api/block/appendHeadingChildren",- "handler": "appendHeadingChildren",+ "path": "/api/block/getTreeStat",+ "handler": "getTreeStat","body": "json","request": {- "$ref": "#/$defs/AppendHeadingChildrenRequestInput"+ "$ref": "#/$defs/TreeStatRequestInput"},"response": {"anyOf": [@@ -57975,7 +64301,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/TreeStatData"},"msg": {"type": "string"@@ -58032,11 +64358,11 @@},{"method": "POST",- "path": "/api/block/batchAppendBlock",- "handler": "batchAppendBlock",+ "path": "/api/block/getUnfoldedParentID",+ "handler": "getUnfoldedParentID","body": "json","request": {- "$ref": "#/$defs/BatchParentBlockRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -58050,24 +64376,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/UnfoldedParentData"},"msg": {"type": "string"@@ -58124,11 +64433,11 @@},{"method": "POST",- "path": "/api/block/batchInsertBlock",- "handler": "batchInsertBlock",+ "path": "/api/block/insertBlock",+ "handler": "insertBlock","body": "json","request": {- "$ref": "#/$defs/BatchInsertBlockRequestInput"+ "$ref": "#/$defs/InsertBlockRequestInput"},"response": {"anyOf": [@@ -58216,11 +64525,11 @@},{"method": "POST",- "path": "/api/block/batchPrependBlock",- "handler": "batchPrependBlock",+ "path": "/api/block/moveBlock",+ "handler": "moveBlock","body": "json","request": {- "$ref": "#/$defs/BatchParentBlockRequestInput"+ "$ref": "#/$defs/MoveBlockRequestInput"},"response": {"anyOf": [@@ -58234,24 +64543,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -58308,11 +64600,11 @@},{"method": "POST",- "path": "/api/block/batchUpdateBlock",- "handler": "batchUpdateBlock",+ "path": "/api/block/moveOutlineHeading",+ "handler": "moveOutlineHeading","body": "json","request": {- "$ref": "#/$defs/BatchUpdateBlockRequestInput"+ "$ref": "#/$defs/MoveBlockRequestInput"},"response": {"anyOf": [@@ -58400,11 +64692,11 @@},{"method": "POST",- "path": "/api/block/batchUpdateTaskListItemMarker",- "handler": "batchUpdateTaskListItemMarker",+ "path": "/api/block/prependBlock",+ "handler": "prependBlock","body": "json","request": {- "$ref": "#/$defs/BatchTaskListMarkerRequestInput"+ "$ref": "#/$defs/PrependBlockRequestInput"},"response": {"anyOf": [@@ -58492,86 +64784,11 @@},{"method": "POST",- "path": "/api/block/checkBlockExist",- "handler": "checkBlockExist",- "body": "json",- "request": {- "$ref": "#/$defs/BlockQueryRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "type": "boolean"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },- "data": {- "anyOf": [- {- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false- },- {- "type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/block/checkBlockFold",- "handler": "checkBlockFold",+ "path": "/api/block/prependDailyNoteBlock",+ "handler": "prependDailyNoteBlock","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/DailyNoteBlockRequestInput"},"response": {"anyOf": [@@ -58585,7 +64802,24 @@]},"data": {- "$ref": "#/$defs/BlockFoldData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -58642,11 +64876,11 @@},{"method": "POST",- "path": "/api/block/checkBlockRef",- "handler": "checkBlockRef",+ "path": "/api/block/setBlockReminder",+ "handler": "setBlockReminder","body": "json","request": {- "$ref": "#/$defs/CheckBlockRefRequestInput"+ "$ref": "#/$defs/BlockReminderRequestInput"},"response": {"anyOf": [@@ -58660,7 +64894,7 @@]},"data": {- "type": "boolean"+ "type": "null"},"msg": {"type": "string"@@ -58698,9 +64932,6 @@},{"type": "null"- },- {- "type": "boolean"}]},@@ -58720,11 +64951,11 @@},{"method": "POST",- "path": "/api/block/checkBlocksExist",- "handler": "checkBlocksExist",+ "path": "/api/block/swapBlockRef",+ "handler": "swapBlockRef","body": "json","request": {- "$ref": "#/$defs/CheckBlocksExistRequestInput"+ "$ref": "#/$defs/SwapBlockRefRequestInput"},"response": {"anyOf": [@@ -58738,17 +64969,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "type": "boolean"- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -58805,11 +65026,11 @@},{"method": "POST",- "path": "/api/block/deleteBlock",- "handler": "deleteBlock",+ "path": "/api/block/transferBlockRef",+ "handler": "transferBlockRef","body": "json","request": {- "$ref": "#/$defs/DeleteBlockRequestInput"+ "$ref": "#/$defs/TransferBlockRefRequestInput"},"response": {"anyOf": [@@ -58823,24 +65044,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -58897,8 +65101,8 @@},{"method": "POST",- "path": "/api/block/foldBlock",- "handler": "foldBlock",+ "path": "/api/block/unfoldBlock",+ "handler": "unfoldBlock","body": "json","request": {"$ref": "#/$defs/BlockIDRequestInput"@@ -58972,11 +65176,11 @@},{"method": "POST",- "path": "/api/block/getBlockBreadcrumb",- "handler": "getBlockBreadcrumb",+ "path": "/api/block/updateBlock",+ "handler": "updateBlock","body": "json","request": {- "$ref": "#/$defs/BlockBreadcrumbRequestInput"+ "$ref": "#/$defs/UpdateBlockRequestInput"},"response": {"anyOf": [@@ -58996,7 +65200,7 @@"items": {"anyOf": [{- "$ref": "#/$defs/BlockPath"+ "$ref": "#/$defs/BlockTransaction"},{"type": "null"@@ -59064,11 +65268,11 @@},{"method": "POST",- "path": "/api/block/getBlockBreadcrumbChildren",- "handler": "getBlockBreadcrumbChildren",+ "path": "/api/block/updateTaskListItemMarker",+ "handler": "updateTaskListItemMarker","body": "json","request": {- "$ref": "#/$defs/BlockBreadcrumbChildrenRequestInput"+ "$ref": "#/$defs/TaskListMarkerRequestInput"},"response": {"anyOf": [@@ -59084,7 +65288,17 @@"data": {"anyOf": [{- "$ref": "#/$defs/BlockBreadcrumbChildren"+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }},{"type": "null"@@ -59146,11 +65360,11 @@},{"method": "POST",- "path": "/api/block/getBlockDOM",- "handler": "getBlockDOM",- "body": "json",+ "path": "/api/bookmark/getBookmark",+ "handler": "getBookmark",+ "body": "none","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -59164,7 +65378,24 @@]},"data": {- "$ref": "#/$defs/BlockDOMData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/Bookmark"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -59221,11 +65452,11 @@},{"method": "POST",- "path": "/api/block/getBlockDOMWithEmbed",- "handler": "getBlockDOMWithEmbed",+ "path": "/api/bookmark/removeBookmark",+ "handler": "removeBookmark","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/RemoveBookmarkRequestInput"},"response": {"anyOf": [@@ -59239,7 +65470,7 @@]},"data": {- "$ref": "#/$defs/BlockDOMData"+ "type": "null"},"msg": {"type": "string"@@ -59296,11 +65527,11 @@},{"method": "POST",- "path": "/api/block/getBlockDOMs",- "handler": "getBlockDOMs",+ "path": "/api/bookmark/renameBookmark",+ "handler": "renameBookmark","body": "json","request": {- "$ref": "#/$defs/BlocksQueryRequestInput"+ "$ref": "#/$defs/RenameBookmarkRequestInput"},"response": {"anyOf": [@@ -59314,17 +65545,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "type": "string"- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -59381,11 +65602,11 @@},{"method": "POST",- "path": "/api/block/getBlockDOMsWithEmbed",- "handler": "getBlockDOMsWithEmbed",+ "path": "/api/broadcast/getChannelInfo",+ "handler": "getChannelInfo","body": "json","request": {- "$ref": "#/$defs/BlocksQueryRequestInput"+ "$ref": "#/$defs/BroadcastChannelRequestInput"},"response": {"anyOf": [@@ -59399,17 +65620,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "type": "string"- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BroadcastChannelData"},"msg": {"type": "string"@@ -59466,11 +65677,11 @@},{"method": "POST",- "path": "/api/block/getBlockDefIDsByRefText",- "handler": "getBlockDefIDsByRefText",- "body": "json",+ "path": "/api/broadcast/getChannels",+ "handler": "getChannels",+ "body": "none","request": {- "$ref": "#/$defs/RefTextQueryRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -59484,7 +65695,7 @@]},"data": {- "$ref": "#/$defs/RefDefsData"+ "$ref": "#/$defs/BroadcastChannelsData"},"msg": {"type": "string"@@ -59541,11 +65752,11 @@},{"method": "POST",- "path": "/api/block/getBlockIndex",- "handler": "getBlockIndex",+ "path": "/api/broadcast/postMessage",+ "handler": "postMessage","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/BroadcastMessageRequestInput"},"response": {"anyOf": [@@ -59559,7 +65770,7 @@]},"data": {- "type": "integer"+ "$ref": "#/$defs/BroadcastChannelData"},"msg": {"type": "string"@@ -59578,7 +65789,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -59616,11 +65828,25 @@},{"method": "POST",- "path": "/api/block/getBlockInfo",- "handler": "getBlockInfo",- "body": "json",+ "path": "/api/broadcast/publish",+ "handler": "broadcastPublish",+ "body": "multipart","request": {- "$ref": "#/$defs/BlockInfoRequestInput"+ "type": "object",+ "additionalProperties": {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "string",+ "format": "binary"+ }+ ]+ }+ }},"response": {"anyOf": [@@ -59634,7 +65860,7 @@]},"data": {- "$ref": "#/$defs/BlockInfoData"+ "$ref": "#/$defs/BroadcastPublishData"},"msg": {"type": "string"@@ -59654,7 +65880,7 @@"type": "integer","enum": [-1,- 3+ 1]},"data": {@@ -59673,9 +65899,6 @@},{"type": "null"- },- {- "type": "string"}]},@@ -59695,11 +65918,11 @@},{"method": "POST",- "path": "/api/block/getBlockKramdown",- "handler": "getBlockKramdown",+ "path": "/api/clipboard/cleanupRichText",+ "handler": "cleanupRichText","body": "json","request": {- "$ref": "#/$defs/BlockKramdownRequestInput"+ "$ref": "#/$defs/CleanupRichTextRequestInput"},"response": {"anyOf": [@@ -59713,7 +65936,7 @@]},"data": {- "$ref": "#/$defs/BlockKramdownData"+ "type": "null"},"msg": {"type": "string"@@ -59770,11 +65993,11 @@},{"method": "POST",- "path": "/api/block/getBlockKramdowns",- "handler": "getBlockKramdowns",+ "path": "/api/clipboard/prepareRichText",+ "handler": "prepareRichText","body": "json","request": {- "$ref": "#/$defs/BlocksKramdownRequestInput"+ "$ref": "#/$defs/PrepareRichTextRequestInput"},"response": {"anyOf": [@@ -59790,10 +66013,7 @@"data": {"anyOf": [{- "type": "object",- "additionalProperties": {- "type": "string"- }+ "$ref": "#/$defs/RichClipboardPrepared"},{"type": "null"@@ -59855,11 +66075,11 @@},{"method": "POST",- "path": "/api/block/getBlockRelevantIDs",- "handler": "getBlockRelevantIDs",- "body": "json",+ "path": "/api/clipboard/readFilePaths",+ "handler": "readFilePaths",+ "body": "none","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -59873,7 +66093,10 @@]},"data": {- "$ref": "#/$defs/BlockRelevantData"+ "type": "array",+ "items": {+ "$ref": "#/$defs/ClipboardFile"+ }},"msg": {"type": "string"@@ -59930,11 +66153,11 @@},{"method": "POST",- "path": "/api/block/getBlockSiblingID",- "handler": "getBlockSiblingID",+ "path": "/api/clipboard/writeFilePath",+ "handler": "writeFilePath","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/ClipboardPathRequestInput"},"response": {"anyOf": [@@ -59948,7 +66171,7 @@]},"data": {- "$ref": "#/$defs/BlockSiblingData"+ "type": "null"},"msg": {"type": "string"@@ -60005,11 +66228,11 @@},{"method": "POST",- "path": "/api/block/getBlockTreeInfos",- "handler": "getBlockTreeInfos",- "body": "json",+ "path": "/api/cloud/getCloudSpace",+ "handler": "getCloudSpace",+ "body": "none","request": {- "$ref": "#/$defs/BlocksQueryRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -60023,24 +66246,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "anyOf": [- {- "$ref": "#/$defs/BlockTreeInfo"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/CloudSpaceData"},"msg": {"type": "string"@@ -60059,7 +66265,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -60097,11 +66304,11 @@},{"method": "POST",- "path": "/api/block/getBlocksIndexes",- "handler": "getBlocksIndexes",+ "path": "/api/cloud/setCloudReminder",+ "handler": "setCloudReminder","body": "json","request": {- "$ref": "#/$defs/BlocksQueryRequestInput"+ "$ref": "#/$defs/CloudReminderRequestInput"},"response": {"anyOf": [@@ -60115,17 +66322,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "type": "integer"- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -60182,11 +66379,11 @@},{"method": "POST",- "path": "/api/block/getBlocksWordCount",- "handler": "getBlocksWordCount",+ "path": "/api/convert/pandoc",+ "handler": "pandoc","body": "json","request": {- "$ref": "#/$defs/BlocksWordCountRequestInput"+ "$ref": "#/$defs/PandocRequestInput"},"response": {"anyOf": [@@ -60200,7 +66397,7 @@]},"data": {- "$ref": "#/$defs/WordCountData"+ "$ref": "#/$defs/PandocData"},"msg": {"type": "string"@@ -60257,11 +66454,11 @@},{"method": "POST",- "path": "/api/block/getChildBlocks",- "handler": "getChildBlocks",+ "path": "/api/export/copyExportFile",+ "handler": "copyExportFile","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/CopyExportFileRequestInput"},"response": {"anyOf": [@@ -60275,17 +66472,7 @@]},"data": {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/ChildBlock"- },- {- "type": "null"- }- ]- }+ "type": "null"},"msg": {"type": "string"@@ -60304,7 +66491,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ -2]},"data": {@@ -60342,11 +66530,11 @@},{"method": "POST",- "path": "/api/block/getContentWordCount",- "handler": "getContentWordCount",+ "path": "/api/export/export2Liandi",+ "handler": "export2Liandi","body": "json","request": {- "$ref": "#/$defs/ContentWordCountRequestInput"+ "$ref": "#/$defs/ExportIDRequestInput"},"response": {"anyOf": [@@ -60360,7 +66548,7 @@]},"data": {- "$ref": "#/$defs/WordCountData"+ "type": "null"},"msg": {"type": "string"@@ -60417,11 +66605,11 @@},{"method": "POST",- "path": "/api/block/getDOMText",- "handler": "getDOMText",- "body": "json",+ "path": "/api/export/exportAsFile",+ "handler": "exportAsFile",+ "body": "multipart","request": {- "$ref": "#/$defs/DOMTextRequestInput"+ "$ref": "#/$defs/ExportAsFileRequestInput"},"response": {"anyOf": [@@ -60435,7 +66623,7 @@]},"data": {- "type": "string"+ "$ref": "#/$defs/ExportFileData"},"msg": {"type": "string"@@ -60492,11 +66680,11 @@},{"method": "POST",- "path": "/api/block/getDocBlocksOrders",- "handler": "getDocBlocksOrders",+ "path": "/api/export/exportAsciiDoc",+ "handler": "exportAsciiDoc","body": "json","request": {- "$ref": "#/$defs/DocOrdersRequestInput"+ "$ref": "#/$defs/ExportIDRequestInput"},"response": {"anyOf": [@@ -60510,17 +66698,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "type": "string"- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/ExportNamedZipData"},"msg": {"type": "string"@@ -60577,11 +66755,11 @@},{"method": "POST",- "path": "/api/block/getDocHeadingLevelTransaction",- "handler": "getDocHeadingLevelTransaction",- "body": "structJSON",+ "path": "/api/export/exportAttributeView",+ "handler": "exportAttributeView",+ "body": "json","request": {- "$ref": "#/$defs/DocHeadingLevelRequestInput"+ "$ref": "#/$defs/ExportAttributeViewRequestInput"},"response": {"anyOf": [@@ -60595,14 +66773,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/DocHeadingLevelData"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/ExportZipData"},"msg": {"type": "string"@@ -60621,7 +66792,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -60659,11 +66831,11 @@},{"method": "POST",- "path": "/api/block/getDocInfo",- "handler": "getDocInfo",+ "path": "/api/export/exportBrowserHTML",+ "handler": "exportBrowserHTML","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/ExportBrowserHTMLRequestInput"},"response": {"anyOf": [@@ -60677,14 +66849,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/DocInfo"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/ExportZipData"},"msg": {"type": "string"@@ -60741,11 +66906,11 @@},{"method": "POST",- "path": "/api/block/getDocsInfo",- "handler": "getDocsInfo",+ "path": "/api/export/exportCodeBlock",+ "handler": "exportCodeBlock","body": "json","request": {- "$ref": "#/$defs/DocsInfoRequestInput"+ "$ref": "#/$defs/ExportIDRequestInput"},"response": {"anyOf": [@@ -60758,20 +66923,43 @@0]},+ "data": {+ "$ref": "#/$defs/ExportPathData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1,+ 1+ ]+ },"data": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/DocInfo"- },- {- "type": "null"- }- ]- }+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -60787,6 +66975,42 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/export/exportData",+ "handler": "exportData",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/ExportZipData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -60795,7 +67019,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -60833,11 +67058,11 @@},{"method": "POST",- "path": "/api/block/getHeadingChildrenDOM",- "handler": "getHeadingChildrenDOM",+ "path": "/api/export/exportDataInFolder",+ "handler": "exportDataInFolder","body": "json","request": {- "$ref": "#/$defs/HeadingChildrenRequestInput"+ "$ref": "#/$defs/ExportFolderRequestInput"},"response": {"anyOf": [@@ -60851,7 +67076,7 @@]},"data": {- "type": "string"+ "$ref": "#/$defs/ExportNameData"},"msg": {"type": "string"@@ -60908,11 +67133,11 @@},{"method": "POST",- "path": "/api/block/getHeadingChildrenIDs",- "handler": "getHeadingChildrenIDs",+ "path": "/api/export/exportDocx",+ "handler": "exportDocx","body": "json","request": {- "$ref": "#/$defs/BlockIDRequestInput"+ "$ref": "#/$defs/ExportDocxRequestInput"},"response": {"anyOf": [@@ -60926,17 +67151,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "type": "string"- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/ExportPathData"},"msg": {"type": "string"@@ -60955,7 +67170,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -60993,11 +67209,11 @@},{"method": "POST",- "path": "/api/block/getHeadingDeleteTransaction",- "handler": "getHeadingDeleteTransaction",+ "path": "/api/export/exportEPUB",+ "handler": "exportEPUB","body": "json","request": {- "$ref": "#/$defs/BlockIDRequestInput"+ "$ref": "#/$defs/ExportIDRequestInput"},"response": {"anyOf": [@@ -61011,14 +67227,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/ExportNamedZipData"},"msg": {"type": "string"@@ -61075,11 +67284,11 @@},{"method": "POST",- "path": "/api/block/getHeadingFoldTransaction",- "handler": "getHeadingFoldTransaction",+ "path": "/api/export/exportHTML",+ "handler": "exportHTML","body": "json","request": {- "$ref": "#/$defs/HeadingFoldRequestInput"+ "$ref": "#/$defs/ExportHTMLRequestInput"},"response": {"anyOf": [@@ -61093,14 +67302,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/ExportHTMLData"},"msg": {"type": "string"@@ -61157,11 +67359,11 @@},{"method": "POST",- "path": "/api/block/getHeadingInsertTransaction",- "handler": "getHeadingInsertTransaction",+ "path": "/api/export/exportMd",+ "handler": "exportMd","body": "json","request": {- "$ref": "#/$defs/BlockIDRequestInput"+ "$ref": "#/$defs/ExportMarkdownRequestInput"},"response": {"anyOf": [@@ -61175,14 +67377,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/ExportNamedZipData"},"msg": {"type": "string"@@ -61239,11 +67434,11 @@},{"method": "POST",- "path": "/api/block/getHeadingLevelTransaction",- "handler": "getHeadingLevelTransaction",+ "path": "/api/export/exportMdContent",+ "handler": "exportMdContent","body": "json","request": {- "$ref": "#/$defs/HeadingLevelRequestInput"+ "$ref": "#/$defs/ExportMarkdownContentRequestInput"},"response": {"anyOf": [@@ -61256,10 +67451,42 @@0]},+ "data": {+ "$ref": "#/$defs/ExportMarkdownContentData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },"data": {"anyOf": [{- "$ref": "#/$defs/BlockTransaction"+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -61275,6 +67502,42 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/export/exportMdHTML",+ "handler": "exportMdHTML",+ "body": "json",+ "request": {+ "$ref": "#/$defs/ExportMarkdownHTMLRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/ExportHTMLData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -61321,11 +67584,11 @@},{"method": "POST",- "path": "/api/block/getOrderedListContinueStart",- "handler": "getOrderedListContinueStart",+ "path": "/api/export/exportMds",+ "handler": "exportMds","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/ExportDocumentsMarkdownRequestInput"},"response": {"anyOf": [@@ -61339,7 +67602,7 @@]},"data": {- "$ref": "#/$defs/OrderedListStartData"+ "$ref": "#/$defs/ExportNamedZipData"},"msg": {"type": "string"@@ -61396,11 +67659,11 @@},{"method": "POST",- "path": "/api/block/getRecentUpdatedBlocks",- "handler": "getRecentUpdatedBlocks",- "body": "none",+ "path": "/api/export/exportMediaWiki",+ "handler": "exportMediaWiki",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/ExportIDRequestInput"},"response": {"anyOf": [@@ -61413,20 +67676,42 @@0]},+ "data": {+ "$ref": "#/$defs/ExportNamedZipData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },"data": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/SearchBlock"- },- {- "type": "null"- }- ]- }+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -61442,6 +67727,42 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/export/exportNotebookMd",+ "handler": "exportNotebookMd",+ "body": "json",+ "request": {+ "$ref": "#/$defs/ExportNotebookMarkdownRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/ExportNamedZipData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -61488,11 +67809,11 @@},{"method": "POST",- "path": "/api/block/getRefIDs",- "handler": "getRefIDs",+ "path": "/api/export/exportNotebookSY",+ "handler": "exportNotebookSY","body": "json","request": {- "$ref": "#/$defs/RefIDsRequestInput"+ "$ref": "#/$defs/ExportIDRequestInput"},"response": {"anyOf": [@@ -61506,7 +67827,7 @@]},"data": {- "$ref": "#/$defs/RefIDsData"+ "$ref": "#/$defs/ExportZipData"},"msg": {"type": "string"@@ -61563,11 +67884,11 @@},{"method": "POST",- "path": "/api/block/getRefIDsByFileAnnotationID",- "handler": "getRefIDsByFileAnnotationID",+ "path": "/api/export/exportNotebooksMd",+ "handler": "exportNotebooksMd","body": "json","request": {- "$ref": "#/$defs/FileAnnotationRefRequestInput"+ "$ref": "#/$defs/ExportNotebooksMarkdownRequestInput"},"response": {"anyOf": [@@ -61581,7 +67902,7 @@]},"data": {- "$ref": "#/$defs/RefDefsData"+ "$ref": "#/$defs/ExportNamedZipData"},"msg": {"type": "string"@@ -61638,11 +67959,11 @@},{"method": "POST",- "path": "/api/block/getRefText",- "handler": "getRefText",+ "path": "/api/export/exportNotebooksSY",+ "handler": "exportNotebooksSY","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/ExportNotebooksRequestInput"},"response": {"anyOf": [@@ -61656,7 +67977,7 @@]},"data": {- "type": "string"+ "$ref": "#/$defs/ExportZipData"},"msg": {"type": "string"@@ -61713,11 +68034,11 @@},{"method": "POST",- "path": "/api/block/getTailChildBlocks",- "handler": "getTailChildBlocks",+ "path": "/api/export/exportODT",+ "handler": "exportODT","body": "json","request": {- "$ref": "#/$defs/TailChildBlocksRequestInput"+ "$ref": "#/$defs/ExportIDRequestInput"},"response": {"anyOf": [@@ -61731,17 +68052,7 @@]},"data": {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/ChildBlock"- },- {- "type": "null"- }- ]- }+ "$ref": "#/$defs/ExportNamedZipData"},"msg": {"type": "string"@@ -61798,11 +68109,11 @@},{"method": "POST",- "path": "/api/block/getTreeStat",- "handler": "getTreeStat",+ "path": "/api/export/exportOPML",+ "handler": "exportOPML","body": "json","request": {- "$ref": "#/$defs/TreeStatRequestInput"+ "$ref": "#/$defs/ExportIDRequestInput"},"response": {"anyOf": [@@ -61816,7 +68127,7 @@]},"data": {- "$ref": "#/$defs/TreeStatData"+ "$ref": "#/$defs/ExportNamedZipData"},"msg": {"type": "string"@@ -61873,11 +68184,11 @@},{"method": "POST",- "path": "/api/block/getUnfoldedParentID",- "handler": "getUnfoldedParentID",+ "path": "/api/export/exportOrgMode",+ "handler": "exportOrgMode","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/ExportIDRequestInput"},"response": {"anyOf": [@@ -61891,7 +68202,7 @@]},"data": {- "$ref": "#/$defs/UnfoldedParentData"+ "$ref": "#/$defs/ExportNamedZipData"},"msg": {"type": "string"@@ -61948,11 +68259,11 @@},{"method": "POST",- "path": "/api/block/insertBlock",- "handler": "insertBlock",+ "path": "/api/export/exportPreviewHTML",+ "handler": "exportPreviewHTML","body": "json","request": {- "$ref": "#/$defs/InsertBlockRequestInput"+ "$ref": "#/$defs/ExportPreviewHTMLRequestInput"},"response": {"anyOf": [@@ -61966,24 +68277,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/ExportPreviewHTMLData"},"msg": {"type": "string"@@ -62040,11 +68334,11 @@},{"method": "POST",- "path": "/api/block/moveBlock",- "handler": "moveBlock",+ "path": "/api/export/exportRTF",+ "handler": "exportRTF","body": "json","request": {- "$ref": "#/$defs/MoveBlockRequestInput"+ "$ref": "#/$defs/ExportIDRequestInput"},"response": {"anyOf": [@@ -62058,7 +68352,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/ExportNamedZipData"},"msg": {"type": "string"@@ -62115,11 +68409,11 @@},{"method": "POST",- "path": "/api/block/moveOutlineHeading",- "handler": "moveOutlineHeading",+ "path": "/api/export/exportReStructuredText",+ "handler": "exportReStructuredText","body": "json","request": {- "$ref": "#/$defs/MoveBlockRequestInput"+ "$ref": "#/$defs/ExportIDRequestInput"},"response": {"anyOf": [@@ -62133,24 +68427,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/ExportNamedZipData"},"msg": {"type": "string"@@ -62207,11 +68484,11 @@},{"method": "POST",- "path": "/api/block/prependBlock",- "handler": "prependBlock",+ "path": "/api/export/exportResources",+ "handler": "exportResources","body": "json","request": {- "$ref": "#/$defs/PrependBlockRequestInput"+ "$ref": "#/$defs/ExportResourcesRequestInput"},"response": {"anyOf": [@@ -62224,23 +68501,49 @@0]},+ "data": {+ "$ref": "#/$defs/ExportPathData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1,+ 1+ ]+ },"data": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"+ },+ {+ "type": "string"}]},@@ -62253,6 +68556,42 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/export/exportSY",+ "handler": "exportSY",+ "body": "json",+ "request": {+ "$ref": "#/$defs/ExportIDRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/ExportZipData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -62299,11 +68638,11 @@},{"method": "POST",- "path": "/api/block/prependDailyNoteBlock",- "handler": "prependDailyNoteBlock",+ "path": "/api/export/exportSYs",+ "handler": "exportSYs","body": "json","request": {- "$ref": "#/$defs/DailyNoteBlockRequestInput"+ "$ref": "#/$defs/ExportIDsRequestInput"},"response": {"anyOf": [@@ -62316,20 +68655,42 @@0]},+ "data": {+ "$ref": "#/$defs/ExportZipData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },"data": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -62345,6 +68706,42 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/export/exportTempContent",+ "handler": "exportTempContent",+ "body": "json",+ "request": {+ "$ref": "#/$defs/ExportTempContentRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/ExportURLData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -62353,7 +68750,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -62391,11 +68789,11 @@},{"method": "POST",- "path": "/api/block/setBlockReminder",- "handler": "setBlockReminder",+ "path": "/api/export/exportTextile",+ "handler": "exportTextile","body": "json","request": {- "$ref": "#/$defs/BlockReminderRequestInput"+ "$ref": "#/$defs/ExportIDRequestInput"},"response": {"anyOf": [@@ -62409,7 +68807,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/ExportNamedZipData"},"msg": {"type": "string"@@ -62466,11 +68864,11 @@},{"method": "POST",- "path": "/api/block/swapBlockRef",- "handler": "swapBlockRef",+ "path": "/api/export/preview",+ "handler": "exportPreview","body": "json","request": {- "$ref": "#/$defs/SwapBlockRefRequestInput"+ "$ref": "#/$defs/ExportIDRequestInput"},"response": {"anyOf": [@@ -62484,7 +68882,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/ExportPreviewData"},"msg": {"type": "string"@@ -62541,11 +68939,11 @@},{"method": "POST",- "path": "/api/block/transferBlockRef",- "handler": "transferBlockRef",+ "path": "/api/export/processPDF",+ "handler": "processPDF","body": "json","request": {- "$ref": "#/$defs/TransferBlockRefRequestInput"+ "$ref": "#/$defs/ProcessPDFRequestInput"},"response": {"anyOf": [@@ -62616,11 +69014,60 @@},{"method": "POST",- "path": "/api/block/unfoldBlock",- "handler": "unfoldBlock",- "body": "json",+ "path": "/api/extension/copy",+ "handler": "extensionCopy",+ "body": "multipart","request": {- "$ref": "#/$defs/BlockIDRequestInput"+ "type": "object",+ "properties": {+ "assets": {+ "type": "string"+ },+ "clipType": {+ "type": "string"+ },+ "dom": {+ "type": "string"+ },+ "href": {+ "type": "string"+ },+ "notebook": {+ "type": "string"+ }+ },+ "required": [+ "dom"+ ],+ "additionalProperties": {+ "anyOf": [+ {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "string",+ "format": "binary"+ }+ ]+ },+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "string",+ "format": "binary"+ }+ ]+ }+ }+ ]+ }},"response": {"anyOf": [@@ -62634,7 +69081,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/ExtensionCopyData"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -62672,6 +69126,16 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/ExtensionCopyData"+ },+ {+ "type": "null"+ }+ ]}]},@@ -62691,11 +69155,11 @@},{"method": "POST",- "path": "/api/block/updateBlock",- "handler": "updateBlock",+ "path": "/api/file/copyFile",+ "handler": "copyFile","body": "json","request": {- "$ref": "#/$defs/UpdateBlockRequestInput"+ "$ref": "#/$defs/CopyFileRequestInput"},"response": {"anyOf": [@@ -62709,24 +69173,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -62745,7 +69192,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ -2]},"data": {@@ -62783,37 +69231,46 @@},{"method": "POST",- "path": "/api/block/updateTaskListItemMarker",- "handler": "updateTaskListItemMarker",+ "path": "/api/file/getFile",+ "handler": "getFile","body": "json","request": {- "$ref": "#/$defs/TaskListMarkerRequestInput"+ "$ref": "#/$defs/FilePathRequestInput"},"response": {"anyOf": [+ {+ "type": "string",+ "format": "binary"+ },{"type": "object","properties": {"code": {"type": "integer","enum": [- 0+ -1,+ -3,+ 403,+ 404,+ 409,+ 500,+ 503]},"data": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -62829,6 +69286,44 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ },+ "output": "binary",+ "errorStatus": 202+ },+ {+ "method": "POST",+ "path": "/api/file/getUniqueFilename",+ "handler": "getUniqueFilename",+ "body": "json",+ "request": {+ "$ref": "#/$defs/FilePathRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/FilePathData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -62837,7 +69332,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ -3]},"data": {@@ -62875,11 +69371,11 @@},{"method": "POST",- "path": "/api/bookmark/getBookmark",- "handler": "getBookmark",- "body": "none",+ "path": "/api/file/globalCopyFiles",+ "handler": "globalCopyFiles",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/CopyFilesRequestInput"},"response": {"anyOf": [@@ -62893,24 +69389,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/Bookmark"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -62929,7 +69408,10 @@"code": {"type": "integer","enum": [- -1+ -1,+ -2,+ -3,+ 403]},"data": {@@ -62967,11 +69449,11 @@},{"method": "POST",- "path": "/api/bookmark/removeBookmark",- "handler": "removeBookmark",- "body": "json",+ "path": "/api/file/putFile",+ "handler": "putFile",+ "body": "form","request": {- "$ref": "#/$defs/RemoveBookmarkRequestInput"+ "$ref": "#/$defs/PutFileRequestInput"},"response": {"anyOf": [@@ -63004,7 +69486,11 @@"code": {"type": "integer","enum": [- -1+ -1,+ -3,+ 400,+ 403,+ 500]},"data": {@@ -63042,11 +69528,11 @@},{"method": "POST",- "path": "/api/bookmark/renameBookmark",- "handler": "renameBookmark",+ "path": "/api/file/readDir",+ "handler": "readDir","body": "json","request": {- "$ref": "#/$defs/RenameBookmarkRequestInput"+ "$ref": "#/$defs/ReadDirectoryRequestInput"},"response": {"anyOf": [@@ -63060,7 +69546,10 @@]},"data": {- "type": "null"+ "type": "array",+ "items": {+ "$ref": "#/$defs/DirectoryEntry"+ }},"msg": {"type": "string"@@ -63079,7 +69568,12 @@"code": {"type": "integer","enum": [- -1+ -1,+ -3,+ 403,+ 404,+ 409,+ 500]},"data": {@@ -63117,86 +69611,11 @@},{"method": "POST",- "path": "/api/broadcast/getChannelInfo",- "handler": "getChannelInfo",+ "path": "/api/file/removeFile",+ "handler": "removeFile","body": "json","request": {- "$ref": "#/$defs/BroadcastChannelRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/BroadcastChannelData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },- "data": {- "anyOf": [- {- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false- },- {- "type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/broadcast/getChannels",- "handler": "getChannels",- "body": "none",- "request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/RemoveFileRequestInput"},"response": {"anyOf": [@@ -63210,7 +69629,7 @@]},"data": {- "$ref": "#/$defs/BroadcastChannelsData"+ "type": "null"},"msg": {"type": "string"@@ -63229,7 +69648,11 @@"code": {"type": "integer","enum": [- -1+ -1,+ -3,+ 403,+ 404,+ 500]},"data": {@@ -63267,11 +69690,11 @@},{"method": "POST",- "path": "/api/broadcast/postMessage",- "handler": "postMessage",+ "path": "/api/file/renameFile",+ "handler": "renameFile","body": "json","request": {- "$ref": "#/$defs/BroadcastMessageRequestInput"+ "$ref": "#/$defs/RenameFileRequestInput"},"response": {"anyOf": [@@ -63285,7 +69708,7 @@]},"data": {- "$ref": "#/$defs/BroadcastChannelData"+ "type": "null"},"msg": {"type": "string"@@ -63305,7 +69728,11 @@"type": "integer","enum": [-1,- 1+ -3,+ 403,+ 404,+ 409,+ 500]},"data": {@@ -63343,25 +69770,11 @@},{"method": "POST",- "path": "/api/broadcast/publish",- "handler": "broadcastPublish",- "body": "multipart",+ "path": "/api/file/workspaceCopyFiles",+ "handler": "workspaceCopyFiles",+ "body": "json","request": {- "type": "object",- "additionalProperties": {- "type": "array",- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "string",- "format": "binary"- }- ]- }- }+ "$ref": "#/$defs/CopyFilesRequestInput"},"response": {"anyOf": [@@ -63375,7 +69788,7 @@]},"data": {- "$ref": "#/$defs/BroadcastPublishData"+ "type": "null"},"msg": {"type": "string"@@ -63395,7 +69808,9 @@"type": "integer","enum": [-1,- 1+ -2,+ -3,+ 403]},"data": {@@ -63433,11 +69848,11 @@},{"method": "POST",- "path": "/api/clipboard/cleanupRichText",- "handler": "cleanupRichText",+ "path": "/api/filetree/authFilePublishAccess",+ "handler": "authFilePublishAccess","body": "json","request": {- "$ref": "#/$defs/CleanupRichTextRequestInput"+ "$ref": "#/$defs/FileTreeAuthPublishRequestInput"},"response": {"anyOf": [@@ -63504,15 +69919,18 @@"additionalProperties": true}]- }+ },+ "additionalErrorStatuses": [+ 429+ ]},{"method": "POST",- "path": "/api/clipboard/prepareRichText",- "handler": "prepareRichText",+ "path": "/api/filetree/changeSort",+ "handler": "changeSort","body": "json","request": {- "$ref": "#/$defs/PrepareRichTextRequestInput"+ "$ref": "#/$defs/FileTreeChangeSortRequestInput"},"response": {"anyOf": [@@ -63526,14 +69944,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/RichClipboardPrepared"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -63590,11 +70001,11 @@},{"method": "POST",- "path": "/api/clipboard/readFilePaths",- "handler": "readFilePaths",- "body": "none",+ "path": "/api/filetree/createDailyNote",+ "handler": "createDailyNote",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/FileTreeDailyNoteRequestInput"},"response": {"anyOf": [@@ -63608,10 +70019,7 @@]},"data": {- "type": "array",- "items": {- "$ref": "#/$defs/ClipboardFile"- }+ "$ref": "#/$defs/FileTreeCreateData"},"msg": {"type": "string"@@ -63630,7 +70038,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -63668,11 +70077,11 @@},{"method": "POST",- "path": "/api/clipboard/writeFilePath",- "handler": "writeFilePath",+ "path": "/api/filetree/createDoc",+ "handler": "createDoc","body": "json","request": {- "$ref": "#/$defs/ClipboardPathRequestInput"+ "$ref": "#/$defs/FileTreeCreateRequestInput"},"response": {"anyOf": [@@ -63686,7 +70095,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/FileTreeCreateData"},"msg": {"type": "string"@@ -63743,87 +70152,11 @@},{"method": "POST",- "path": "/api/cloud/getCloudSpace",- "handler": "getCloudSpace",- "body": "none",- "request": {- "$ref": "#/$defs/EmptyRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/CloudSpaceData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1,- 1- ]- },- "data": {- "anyOf": [- {- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false- },- {- "type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/cloud/setCloudReminder",- "handler": "setCloudReminder",+ "path": "/api/filetree/createDocWithMd",+ "handler": "createDocWithMd","body": "json","request": {- "$ref": "#/$defs/CloudReminderRequestInput"+ "$ref": "#/$defs/FileTreeCreateMarkdownRequestInput"},"response": {"anyOf": [@@ -63837,7 +70170,7 @@]},"data": {- "type": "null"+ "type": "string"},"msg": {"type": "string"@@ -63894,11 +70227,11 @@},{"method": "POST",- "path": "/api/convert/pandoc",- "handler": "pandoc",+ "path": "/api/filetree/doc2Heading",+ "handler": "doc2Heading","body": "json","request": {- "$ref": "#/$defs/PandocRequestInput"+ "$ref": "#/$defs/FileTreeDocHeadingRequestInput"},"response": {"anyOf": [@@ -63912,7 +70245,7 @@]},"data": {- "$ref": "#/$defs/PandocData"+ "$ref": "#/$defs/FileTreeDocHeadingData"},"msg": {"type": "string"@@ -63969,11 +70302,11 @@},{"method": "POST",- "path": "/api/export/copyExportFile",- "handler": "copyExportFile",+ "path": "/api/filetree/duplicateDoc",+ "handler": "duplicateDoc","body": "json","request": {- "$ref": "#/$defs/CopyExportFileRequestInput"+ "$ref": "#/$defs/FileTreeIDRequestInput"},"response": {"anyOf": [@@ -63987,7 +70320,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/FileTreeDuplicateData"},"msg": {"type": "string"@@ -64006,8 +70339,7 @@"code": {"type": "integer","enum": [- -1,- -2+ -1]},"data": {@@ -64045,11 +70377,11 @@},{"method": "POST",- "path": "/api/export/export2Liandi",- "handler": "export2Liandi",+ "path": "/api/filetree/getDoc",+ "handler": "getDoc","body": "json","request": {- "$ref": "#/$defs/ExportIDRequestInput"+ "$ref": "#/$defs/FileTreeGetDocRequestInput"},"response": {"anyOf": [@@ -64063,7 +70395,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/FileTreeGetDocData"},"msg": {"type": "string"@@ -64082,7 +70414,9 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1,+ 3]},"data": {@@ -64120,11 +70454,11 @@},{"method": "POST",- "path": "/api/export/exportAsFile",- "handler": "exportAsFile",- "body": "multipart",+ "path": "/api/filetree/getDocCreateSavePath",+ "handler": "getDocCreateSavePath",+ "body": "json","request": {- "$ref": "#/$defs/ExportAsFileRequestInput"+ "$ref": "#/$defs/FileTreeNotebookRequestInput"},"response": {"anyOf": [@@ -64138,7 +70472,7 @@]},"data": {- "$ref": "#/$defs/ExportFileData"+ "$ref": "#/$defs/FileTreeCreateSavePathData"},"msg": {"type": "string"@@ -64195,11 +70529,11 @@},{"method": "POST",- "path": "/api/export/exportAsciiDoc",- "handler": "exportAsciiDoc",+ "path": "/api/filetree/getFullHPathByID",+ "handler": "getFullHPathByID","body": "json","request": {- "$ref": "#/$defs/ExportIDRequestInput"+ "$ref": "#/$defs/FileTreeOptionalIDRequestInput"},"response": {"anyOf": [@@ -64213,7 +70547,14 @@]},"data": {- "$ref": "#/$defs/ExportNamedZipData"+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -64270,11 +70611,11 @@},{"method": "POST",- "path": "/api/export/exportAttributeView",- "handler": "exportAttributeView",+ "path": "/api/filetree/getHPathByID",+ "handler": "getHPathByID","body": "json","request": {- "$ref": "#/$defs/ExportAttributeViewRequestInput"+ "$ref": "#/$defs/FileTreeIDRequestInput"},"response": {"anyOf": [@@ -64288,7 +70629,7 @@]},"data": {- "$ref": "#/$defs/ExportZipData"+ "type": "string"},"msg": {"type": "string"@@ -64307,8 +70648,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -64346,11 +70686,11 @@},{"method": "POST",- "path": "/api/export/exportBrowserHTML",- "handler": "exportBrowserHTML",+ "path": "/api/filetree/getHPathByPath",+ "handler": "getHPathByPath","body": "json","request": {- "$ref": "#/$defs/ExportBrowserHTMLRequestInput"+ "$ref": "#/$defs/FileTreePathRequestInput"},"response": {"anyOf": [@@ -64364,7 +70704,7 @@]},"data": {- "$ref": "#/$defs/ExportZipData"+ "type": "string"},"msg": {"type": "string"@@ -64421,11 +70761,11 @@},{"method": "POST",- "path": "/api/export/exportCodeBlock",- "handler": "exportCodeBlock",+ "path": "/api/filetree/getHPathsByPaths",+ "handler": "getHPathsByPaths","body": "json","request": {- "$ref": "#/$defs/ExportIDRequestInput"+ "$ref": "#/$defs/FileTreePathsRequestInput"},"response": {"anyOf": [@@ -64439,7 +70779,17 @@]},"data": {- "$ref": "#/$defs/ExportPathData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -64458,8 +70808,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -64497,11 +70846,11 @@},{"method": "POST",- "path": "/api/export/exportData",- "handler": "exportData",- "body": "none",+ "path": "/api/filetree/getIDsByHPath",+ "handler": "getIDsByHPath",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/FileTreeOptionalPathRequestInput"},"response": {"anyOf": [@@ -64515,7 +70864,17 @@]},"data": {- "$ref": "#/$defs/ExportZipData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -64534,8 +70893,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -64573,11 +70931,11 @@},{"method": "POST",- "path": "/api/export/exportDataInFolder",- "handler": "exportDataInFolder",+ "path": "/api/filetree/getPathByID",+ "handler": "getPathByID","body": "json","request": {- "$ref": "#/$defs/ExportFolderRequestInput"+ "$ref": "#/$defs/FileTreeTrimIDRequestInput"},"response": {"anyOf": [@@ -64591,7 +70949,7 @@]},"data": {- "$ref": "#/$defs/ExportNameData"+ "$ref": "#/$defs/FileTreeDocPathData"},"msg": {"type": "string"@@ -64648,11 +71006,11 @@},{"method": "POST",- "path": "/api/export/exportDocx",- "handler": "exportDocx",- "body": "json",+ "path": "/api/filetree/getPinnedDocs",+ "handler": "getPinnedDocs",+ "body": "none","request": {- "$ref": "#/$defs/ExportDocxRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -64666,7 +71024,10 @@]},"data": {- "$ref": "#/$defs/ExportPathData"+ "type": "array",+ "items": {+ "$ref": "#/$defs/PinnedDoc"+ }},"msg": {"type": "string"@@ -64685,8 +71046,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -64724,11 +71084,11 @@},{"method": "POST",- "path": "/api/export/exportEPUB",- "handler": "exportEPUB",+ "path": "/api/filetree/getPublishAccess",+ "handler": "getPublishAccess","body": "json","request": {- "$ref": "#/$defs/ExportIDRequestInput"+ "$ref": "#/$defs/FileTreePublishIDsRequestInput"},"response": {"anyOf": [@@ -64742,7 +71102,7 @@]},"data": {- "$ref": "#/$defs/ExportNamedZipData"+ "$ref": "#/$defs/FileTreePublishData"},"msg": {"type": "string"@@ -64799,11 +71159,11 @@},{"method": "POST",- "path": "/api/export/exportHTML",- "handler": "exportHTML",+ "path": "/api/filetree/getRefCreateSavePath",+ "handler": "getRefCreateSavePath","body": "json","request": {- "$ref": "#/$defs/ExportHTMLRequestInput"+ "$ref": "#/$defs/FileTreeNotebookRequestInput"},"response": {"anyOf": [@@ -64817,7 +71177,7 @@]},"data": {- "$ref": "#/$defs/ExportHTMLData"+ "$ref": "#/$defs/FileTreeSavePathData"},"msg": {"type": "string"@@ -64874,11 +71234,11 @@},{"method": "POST",- "path": "/api/export/exportMd",- "handler": "exportMd",+ "path": "/api/filetree/getShorthandSavePath",+ "handler": "getShorthandSavePath","body": "json","request": {- "$ref": "#/$defs/ExportMarkdownRequestInput"+ "$ref": "#/$defs/FileTreeNotebookRequestInput"},"response": {"anyOf": [@@ -64892,7 +71252,7 @@]},"data": {- "$ref": "#/$defs/ExportNamedZipData"+ "$ref": "#/$defs/FileTreeSavePathData"},"msg": {"type": "string"@@ -64949,11 +71309,11 @@},{"method": "POST",- "path": "/api/export/exportMdContent",- "handler": "exportMdContent",+ "path": "/api/filetree/heading2Doc",+ "handler": "heading2Doc","body": "json","request": {- "$ref": "#/$defs/ExportMarkdownContentRequestInput"+ "$ref": "#/$defs/FileTreeHeadingDocRequestInput"},"response": {"anyOf": [@@ -64967,7 +71327,7 @@]},"data": {- "$ref": "#/$defs/ExportMarkdownContentData"+ "type": "null"},"msg": {"type": "string"@@ -65024,11 +71384,11 @@},{"method": "POST",- "path": "/api/export/exportMdHTML",- "handler": "exportMdHTML",+ "path": "/api/filetree/li2Doc",+ "handler": "li2Doc","body": "json","request": {- "$ref": "#/$defs/ExportMarkdownHTMLRequestInput"+ "$ref": "#/$defs/FileTreeListItemDocRequestInput"},"response": {"anyOf": [@@ -65042,7 +71402,7 @@]},"data": {- "$ref": "#/$defs/ExportHTMLData"+ "type": "null"},"msg": {"type": "string"@@ -65099,11 +71459,11 @@},{"method": "POST",- "path": "/api/export/exportMds",- "handler": "exportMds",+ "path": "/api/filetree/listDocTree",+ "handler": "listDocTree","body": "json","request": {- "$ref": "#/$defs/ExportDocumentsMarkdownRequestInput"+ "$ref": "#/$defs/FileTreePathRequestInput"},"response": {"anyOf": [@@ -65117,7 +71477,7 @@]},"data": {- "$ref": "#/$defs/ExportNamedZipData"+ "$ref": "#/$defs/FileTreeDocTreeData"},"msg": {"type": "string"@@ -65174,11 +71534,11 @@},{"method": "POST",- "path": "/api/export/exportMediaWiki",- "handler": "exportMediaWiki",+ "path": "/api/filetree/listDocsByPath",+ "handler": "listDocsByPath","body": "json","request": {- "$ref": "#/$defs/ExportIDRequestInput"+ "$ref": "#/$defs/FileTreeListRequestInput"},"response": {"anyOf": [@@ -65192,7 +71552,7 @@]},"data": {- "$ref": "#/$defs/ExportNamedZipData"+ "$ref": "#/$defs/FileTreeListData"},"msg": {"type": "string"@@ -65249,11 +71609,11 @@},{"method": "POST",- "path": "/api/export/exportNotebookMd",- "handler": "exportNotebookMd",+ "path": "/api/filetree/moveDocs",+ "handler": "moveDocs","body": "json","request": {- "$ref": "#/$defs/ExportNotebookMarkdownRequestInput"+ "$ref": "#/$defs/FileTreeMoveRequestInput"},"response": {"anyOf": [@@ -65267,7 +71627,7 @@]},"data": {- "$ref": "#/$defs/ExportNamedZipData"+ "type": "null"},"msg": {"type": "string"@@ -65324,11 +71684,11 @@},{"method": "POST",- "path": "/api/export/exportNotebookSY",- "handler": "exportNotebookSY",+ "path": "/api/filetree/moveDocsByID",+ "handler": "moveDocsByID","body": "json","request": {- "$ref": "#/$defs/ExportIDRequestInput"+ "$ref": "#/$defs/FileTreeMoveIDsRequestInput"},"response": {"anyOf": [@@ -65342,7 +71702,7 @@]},"data": {- "$ref": "#/$defs/ExportZipData"+ "type": "null"},"msg": {"type": "string"@@ -65399,11 +71759,11 @@},{"method": "POST",- "path": "/api/export/exportNotebooksMd",- "handler": "exportNotebooksMd",+ "path": "/api/filetree/moveLocalShorthands",+ "handler": "moveLocalShorthands","body": "json","request": {- "$ref": "#/$defs/ExportNotebooksMarkdownRequestInput"+ "$ref": "#/$defs/FileTreeNotebookRequestInput"},"response": {"anyOf": [@@ -65417,7 +71777,17 @@]},"data": {- "$ref": "#/$defs/ExportNamedZipData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -65474,11 +71844,11 @@},{"method": "POST",- "path": "/api/export/exportNotebooksSY",- "handler": "exportNotebooksSY",+ "path": "/api/filetree/removeDoc",+ "handler": "removeDoc","body": "json","request": {- "$ref": "#/$defs/ExportNotebooksRequestInput"+ "$ref": "#/$defs/FileTreePathRequestInput"},"response": {"anyOf": [@@ -65492,7 +71862,7 @@]},"data": {- "$ref": "#/$defs/ExportZipData"+ "type": "null"},"msg": {"type": "string"@@ -65549,11 +71919,11 @@},{"method": "POST",- "path": "/api/export/exportODT",- "handler": "exportODT",+ "path": "/api/filetree/removeDocByID",+ "handler": "removeDocByID","body": "json","request": {- "$ref": "#/$defs/ExportIDRequestInput"+ "$ref": "#/$defs/FileTreeTrimIDRequestInput"},"response": {"anyOf": [@@ -65567,7 +71937,7 @@]},"data": {- "$ref": "#/$defs/ExportNamedZipData"+ "type": "null"},"msg": {"type": "string"@@ -65624,11 +71994,11 @@},{"method": "POST",- "path": "/api/export/exportOPML",- "handler": "exportOPML",+ "path": "/api/filetree/removeDocs",+ "handler": "removeDocs","body": "json","request": {- "$ref": "#/$defs/ExportIDRequestInput"+ "$ref": "#/$defs/FileTreePathsRequestInput"},"response": {"anyOf": [@@ -65642,7 +72012,7 @@]},"data": {- "$ref": "#/$defs/ExportNamedZipData"+ "type": "null"},"msg": {"type": "string"@@ -65699,11 +72069,11 @@},{"method": "POST",- "path": "/api/export/exportOrgMode",- "handler": "exportOrgMode",+ "path": "/api/filetree/removeIndexes",+ "handler": "removeIndexes","body": "json","request": {- "$ref": "#/$defs/ExportIDRequestInput"+ "$ref": "#/$defs/FileTreePathsRequestInput"},"response": {"anyOf": [@@ -65717,7 +72087,7 @@]},"data": {- "$ref": "#/$defs/ExportNamedZipData"+ "type": "null"},"msg": {"type": "string"@@ -65774,11 +72144,11 @@},{"method": "POST",- "path": "/api/export/exportPreviewHTML",- "handler": "exportPreviewHTML",+ "path": "/api/filetree/renameDoc",+ "handler": "renameDoc","body": "json","request": {- "$ref": "#/$defs/ExportPreviewHTMLRequestInput"+ "$ref": "#/$defs/FileTreeRenameRequestInput"},"response": {"anyOf": [@@ -65792,7 +72162,7 @@]},"data": {- "$ref": "#/$defs/ExportPreviewHTMLData"+ "type": "null"},"msg": {"type": "string"@@ -65849,11 +72219,11 @@},{"method": "POST",- "path": "/api/export/exportRTF",- "handler": "exportRTF",+ "path": "/api/filetree/renameDocByID",+ "handler": "renameDocByID","body": "json","request": {- "$ref": "#/$defs/ExportIDRequestInput"+ "$ref": "#/$defs/FileTreeRenameIDRequestInput"},"response": {"anyOf": [@@ -65867,7 +72237,7 @@]},"data": {- "$ref": "#/$defs/ExportNamedZipData"+ "type": "null"},"msg": {"type": "string"@@ -65924,11 +72294,11 @@},{"method": "POST",- "path": "/api/export/exportReStructuredText",- "handler": "exportReStructuredText",- "body": "json",+ "path": "/api/filetree/reorderDocs",+ "handler": "reorderDocs",+ "body": "structJSON","request": {- "$ref": "#/$defs/ExportIDRequestInput"+ "$ref": "#/$defs/FileTreeReorderRequestInput"},"response": {"anyOf": [@@ -65942,7 +72312,14 @@]},"data": {- "$ref": "#/$defs/ExportNamedZipData"+ "anyOf": [+ {+ "$ref": "#/$defs/FileTreeReorderData"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -65980,6 +72357,16 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/FileTreeReorderData"+ },+ {+ "type": "null"+ }+ ]}]},@@ -65999,11 +72386,11 @@},{"method": "POST",- "path": "/api/export/exportResources",- "handler": "exportResources",+ "path": "/api/filetree/searchDocs",+ "handler": "searchDocs","body": "json","request": {- "$ref": "#/$defs/ExportResourcesRequestInput"+ "$ref": "#/$defs/FileTreeSearchRequestInput"},"response": {"anyOf": [@@ -66017,7 +72404,24 @@]},"data": {- "$ref": "#/$defs/ExportPathData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/FileTreeSearchDoc"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -66036,8 +72440,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -66056,9 +72459,6 @@},{"type": "null"- },- {- "type": "string"}]},@@ -66078,11 +72478,11 @@},{"method": "POST",- "path": "/api/export/exportSY",- "handler": "exportSY",- "body": "json",+ "path": "/api/filetree/setDocSortMode",+ "handler": "setDocSortMode",+ "body": "structJSON","request": {- "$ref": "#/$defs/ExportIDRequestInput"+ "$ref": "#/$defs/FileTreeSortModeRequestInput"},"response": {"anyOf": [@@ -66096,7 +72496,14 @@]},"data": {- "$ref": "#/$defs/ExportZipData"+ "anyOf": [+ {+ "$ref": "#/$defs/FileTreeSortModeData"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -66134,6 +72541,16 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/FileTreeSortModeData"+ },+ {+ "type": "null"+ }+ ]}]},@@ -66153,11 +72570,11 @@},{"method": "POST",- "path": "/api/export/exportSYs",- "handler": "exportSYs",+ "path": "/api/filetree/setPublishAccess",+ "handler": "setPublishAccess","body": "json","request": {- "$ref": "#/$defs/ExportIDsRequestInput"+ "$ref": "#/$defs/FileTreeSetPublishRequestInput"},"response": {"anyOf": [@@ -66171,7 +72588,7 @@]},"data": {- "$ref": "#/$defs/ExportZipData"+ "type": "null"},"msg": {"type": "string"@@ -66228,11 +72645,11 @@},{"method": "POST",- "path": "/api/export/exportTempContent",- "handler": "exportTempContent",- "body": "json",+ "path": "/api/filetree/setSort",+ "handler": "setSort",+ "body": "structJSON","request": {- "$ref": "#/$defs/ExportTempContentRequestInput"+ "$ref": "#/$defs/FileTreeSetSortRequestInput"},"response": {"anyOf": [@@ -66246,7 +72663,14 @@]},"data": {- "$ref": "#/$defs/ExportURLData"+ "anyOf": [+ {+ "$ref": "#/$defs/FileTreeSetSortData"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -66265,8 +72689,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -66285,6 +72708,16 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/FileTreeSetSortData"+ },+ {+ "type": "null"+ }+ ]}]},@@ -66304,11 +72737,11 @@},{"method": "POST",- "path": "/api/export/exportTextile",- "handler": "exportTextile",+ "path": "/api/filetree/updatePinnedDocs",+ "handler": "updatePinnedDocs","body": "json","request": {- "$ref": "#/$defs/ExportIDRequestInput"+ "$ref": "#/$defs/UpdatePinnedDocsRequestInput"},"response": {"anyOf": [@@ -66322,7 +72755,7 @@]},"data": {- "$ref": "#/$defs/ExportNamedZipData"+ "type": "null"},"msg": {"type": "string"@@ -66379,11 +72812,11 @@},{"method": "POST",- "path": "/api/export/preview",- "handler": "exportPreview",+ "path": "/api/filetree/upsertIndexes",+ "handler": "upsertIndexes","body": "json","request": {- "$ref": "#/$defs/ExportIDRequestInput"+ "$ref": "#/$defs/FileTreePathsRequestInput"},"response": {"anyOf": [@@ -66397,7 +72830,7 @@]},"data": {- "$ref": "#/$defs/ExportPreviewData"+ "type": "null"},"msg": {"type": "string"@@ -66454,11 +72887,11 @@},{"method": "POST",- "path": "/api/export/processPDF",- "handler": "processPDF",+ "path": "/api/format/autoSpace",+ "handler": "autoSpace","body": "json","request": {- "$ref": "#/$defs/ProcessPDFRequestInput"+ "$ref": "#/$defs/TrimmedIDRequestInput"},"response": {"anyOf": [@@ -66529,60 +72962,11 @@},{"method": "POST",- "path": "/api/extension/copy",- "handler": "extensionCopy",- "body": "multipart",+ "path": "/api/format/netAssets2LocalAssets",+ "handler": "netAssets2LocalAssets",+ "body": "json","request": {- "type": "object",- "properties": {- "assets": {- "type": "string"- },- "clipType": {- "type": "string"- },- "dom": {- "type": "string"- },- "href": {- "type": "string"- },- "notebook": {- "type": "string"- }- },- "required": [- "dom"- ],- "additionalProperties": {- "anyOf": [- {- "anyOf": [- {- "type": "string"- },- {- "type": "string",- "format": "binary"- }- ]- },- {- "type": "array",- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "string",- "format": "binary"- }- ]- }- }- ]- }+ "$ref": "#/$defs/TrimmedIDRequestInput"},"response": {"anyOf": [@@ -66596,14 +72980,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/ExtensionCopyData"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -66641,16 +73018,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/ExtensionCopyData"- },- {- "type": "null"- }- ]}]},@@ -66670,11 +73037,11 @@},{"method": "POST",- "path": "/api/file/copyFile",- "handler": "copyFile",+ "path": "/api/format/netImg2LocalAssets",+ "handler": "netImg2LocalAssets","body": "json","request": {- "$ref": "#/$defs/CopyFileRequestInput"+ "$ref": "#/$defs/NetImageAssetsRequestInput"},"response": {"anyOf": [@@ -66707,8 +73074,7 @@"code": {"type": "integer","enum": [- -1,- -2+ -1]},"data": {@@ -66746,49 +73112,30 @@},{"method": "POST",- "path": "/api/file/getFile",- "handler": "getFile",+ "path": "/api/graph/getGraph",+ "handler": "getGraph","body": "json","request": {- "$ref": "#/$defs/FilePathRequestInput"+ "$ref": "#/$defs/GlobalGraphRequestInput"},"response": {"anyOf": [- {- "type": "string",- "format": "binary"- },{"type": "object","properties": {"code": {"type": "integer","enum": [- -1,- -3,- 403,- 404,- 409,- 500,- 503+ 0]},"data": {"anyOf": [{- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "$ref": "#/$defs/GlobalGraphResult"},{- "type": "null"+ "$ref": "#/$defs/GraphCorrelation"}]},@@ -66801,44 +73148,6 @@"msg","data"],- "additionalProperties": true- }- ]- },- "output": "binary",- "errorStatus": 202- },- {- "method": "POST",- "path": "/api/file/getUniqueFilename",- "handler": "getUniqueFilename",- "body": "json",- "request": {- "$ref": "#/$defs/FilePathRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/FilePathData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -66847,8 +73156,7 @@"code": {"type": "integer","enum": [- -1,- -3+ -1]},"data": {@@ -66867,6 +73175,16 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/GlobalGraphResult"+ },+ {+ "$ref": "#/$defs/GraphCorrelation"+ }+ ]}]},@@ -66886,11 +73204,11 @@},{"method": "POST",- "path": "/api/file/globalCopyFiles",- "handler": "globalCopyFiles",+ "path": "/api/graph/getLocalGraph",+ "handler": "getLocalGraph","body": "json","request": {- "$ref": "#/$defs/CopyFilesRequestInput"+ "$ref": "#/$defs/LocalGraphRequestInput"},"response": {"anyOf": [@@ -66904,7 +73222,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/LocalGraphResult"+ },+ {+ "$ref": "#/$defs/GraphCorrelation"+ }+ ]},"msg": {"type": "string"@@ -66923,10 +73248,7 @@"code": {"type": "integer","enum": [- -1,- -2,- -3,- 403+ -1]},"data": {@@ -66945,6 +73267,16 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/LocalGraphResult"+ },+ {+ "$ref": "#/$defs/GraphCorrelation"+ }+ ]}]},@@ -66964,11 +73296,11 @@},{"method": "POST",- "path": "/api/file/putFile",- "handler": "putFile",- "body": "form",+ "path": "/api/graph/resetGraph",+ "handler": "resetGraph",+ "body": "none","request": {- "$ref": "#/$defs/PutFileRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -66982,7 +73314,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/ResetGraphData"},"msg": {"type": "string"@@ -67001,11 +73333,7 @@"code": {"type": "integer","enum": [- -1,- -3,- 400,- 403,- 500+ -1]},"data": {@@ -67043,11 +73371,11 @@},{"method": "POST",- "path": "/api/file/readDir",- "handler": "readDir",- "body": "json",+ "path": "/api/graph/resetLocalGraph",+ "handler": "resetLocalGraph",+ "body": "none","request": {- "$ref": "#/$defs/ReadDirectoryRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -67061,10 +73389,7 @@]},"data": {- "type": "array",- "items": {- "$ref": "#/$defs/DirectoryEntry"- }+ "$ref": "#/$defs/ResetLocalGraphData"},"msg": {"type": "string"@@ -67083,12 +73408,7 @@"code": {"type": "integer","enum": [- -1,- -3,- 403,- 404,- 409,- 500+ -1]},"data": {@@ -67126,11 +73446,11 @@},{"method": "POST",- "path": "/api/file/removeFile",- "handler": "removeFile",+ "path": "/api/graph/setGraphConf",+ "handler": "setGraphConf","body": "json","request": {- "$ref": "#/$defs/RemoveFileRequestInput"+ "$ref": "#/$defs/SetGraphConfRequestInput"},"response": {"anyOf": [@@ -67144,7 +73464,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/GlobalGraphConf"+ },+ {+ "$ref": "#/$defs/LocalGraphConf"+ }+ ]},"msg": {"type": "string"@@ -67163,11 +73490,7 @@"code": {"type": "integer","enum": [- -1,- -3,- 403,- 404,- 500+ -1]},"data": {@@ -67205,11 +73528,11 @@},{"method": "POST",- "path": "/api/file/renameFile",- "handler": "renameFile",- "body": "json",+ "path": "/api/history/clearWorkspaceHistory",+ "handler": "clearWorkspaceHistory",+ "body": "none","request": {- "$ref": "#/$defs/RenameFileRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -67242,12 +73565,7 @@"code": {"type": "integer","enum": [- -1,- -3,- 403,- 404,- 409,- 500+ -1]},"data": {@@ -67285,11 +73603,11 @@},{"method": "POST",- "path": "/api/file/workspaceCopyFiles",- "handler": "workspaceCopyFiles",+ "path": "/api/history/createAssetHistory",+ "handler": "createAssetHistory","body": "json","request": {- "$ref": "#/$defs/CopyFilesRequestInput"+ "$ref": "#/$defs/CreateAssetHistoryRequestInput"},"response": {"anyOf": [@@ -67322,10 +73640,7 @@"code": {"type": "integer","enum": [- -1,- -2,- -3,- 403+ -1]},"data": {@@ -67363,11 +73678,11 @@},{"method": "POST",- "path": "/api/filetree/authFilePublishAccess",- "handler": "authFilePublishAccess",+ "path": "/api/history/createDocHistory",+ "handler": "createDocHistory","body": "json","request": {- "$ref": "#/$defs/FileTreeAuthPublishRequestInput"+ "$ref": "#/$defs/CreateDocHistoryRequestInput"},"response": {"anyOf": [@@ -67434,18 +73749,15 @@"additionalProperties": true}]- },- "additionalErrorStatuses": [- 429- ]+ }},{"method": "POST",- "path": "/api/filetree/changeSort",- "handler": "changeSort",+ "path": "/api/history/diffDocVersions",+ "handler": "diffDocVersions","body": "json","request": {- "$ref": "#/$defs/FileTreeChangeSortRequestInput"+ "$ref": "#/$defs/DiffDocVersionsRequestInput"},"response": {"anyOf": [@@ -67459,7 +73771,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/DocVersionDiffResult"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -67516,11 +73835,11 @@},{"method": "POST",- "path": "/api/filetree/createDailyNote",- "handler": "createDailyNote",+ "path": "/api/history/getDocHistoryContent",+ "handler": "getDocHistoryContent","body": "json","request": {- "$ref": "#/$defs/FileTreeDailyNoteRequestInput"+ "$ref": "#/$defs/DocHistoryContentRequestInput"},"response": {"anyOf": [@@ -67534,7 +73853,7 @@]},"data": {- "$ref": "#/$defs/FileTreeCreateData"+ "$ref": "#/$defs/DocHistoryContentData"},"msg": {"type": "string"@@ -67553,8 +73872,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -67592,11 +73910,11 @@},{"method": "POST",- "path": "/api/filetree/createDoc",- "handler": "createDoc",+ "path": "/api/history/getHistoryItems",+ "handler": "getHistoryItems","body": "json","request": {- "$ref": "#/$defs/FileTreeCreateRequestInput"+ "$ref": "#/$defs/HistoryItemsRequestInput"},"response": {"anyOf": [@@ -67610,7 +73928,7 @@]},"data": {- "$ref": "#/$defs/FileTreeCreateData"+ "$ref": "#/$defs/HistoryItemsData"},"msg": {"type": "string"@@ -67667,11 +73985,11 @@},{"method": "POST",- "path": "/api/filetree/createDocWithMd",- "handler": "createDocWithMd",- "body": "json",+ "path": "/api/history/getNotebookHistory",+ "handler": "getNotebookHistory",+ "body": "none","request": {- "$ref": "#/$defs/FileTreeCreateMarkdownRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -67685,7 +74003,7 @@]},"data": {- "type": "string"+ "$ref": "#/$defs/NotebookHistoryData"},"msg": {"type": "string"@@ -67742,11 +74060,11 @@},{"method": "POST",- "path": "/api/filetree/doc2Heading",- "handler": "doc2Heading",- "body": "json",+ "path": "/api/history/reindexHistory",+ "handler": "reindexHistory",+ "body": "none","request": {- "$ref": "#/$defs/FileTreeDocHeadingRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -67760,7 +74078,7 @@]},"data": {- "$ref": "#/$defs/FileTreeDocHeadingData"+ "type": "null"},"msg": {"type": "string"@@ -67817,11 +74135,11 @@},{"method": "POST",- "path": "/api/filetree/duplicateDoc",- "handler": "duplicateDoc",+ "path": "/api/history/rollbackAssetsHistory",+ "handler": "rollbackAssetsHistory","body": "json","request": {- "$ref": "#/$defs/FileTreeIDRequestInput"+ "$ref": "#/$defs/HistoryPathRequestInput"},"response": {"anyOf": [@@ -67835,7 +74153,7 @@]},"data": {- "$ref": "#/$defs/FileTreeDuplicateData"+ "type": "null"},"msg": {"type": "string"@@ -67892,11 +74210,11 @@},{"method": "POST",- "path": "/api/filetree/getDoc",- "handler": "getDoc",+ "path": "/api/history/rollbackAttributeViewHistory",+ "handler": "rollbackAttributeViewHistory","body": "json","request": {- "$ref": "#/$defs/FileTreeGetDocRequestInput"+ "$ref": "#/$defs/HistoryPathRequestInput"},"response": {"anyOf": [@@ -67910,7 +74228,7 @@]},"data": {- "$ref": "#/$defs/FileTreeGetDocData"+ "type": "null"},"msg": {"type": "string"@@ -67929,9 +74247,7 @@"code": {"type": "integer","enum": [- -1,- 1,- 3+ -1]},"data": {@@ -67969,11 +74285,11 @@},{"method": "POST",- "path": "/api/filetree/getDocCreateSavePath",- "handler": "getDocCreateSavePath",+ "path": "/api/history/rollbackDocHistory",+ "handler": "rollbackDocHistory","body": "json","request": {- "$ref": "#/$defs/FileTreeNotebookRequestInput"+ "$ref": "#/$defs/HistoryPathRequestInput"},"response": {"anyOf": [@@ -67987,7 +74303,7 @@]},"data": {- "$ref": "#/$defs/FileTreeCreateSavePathData"+ "type": "null"},"msg": {"type": "string"@@ -68044,11 +74360,11 @@},{"method": "POST",- "path": "/api/filetree/getFullHPathByID",- "handler": "getFullHPathByID",+ "path": "/api/history/rollbackNotebookHistory",+ "handler": "rollbackNotebookHistory","body": "json","request": {- "$ref": "#/$defs/FileTreeOptionalIDRequestInput"+ "$ref": "#/$defs/HistoryPathRequestInput"},"response": {"anyOf": [@@ -68062,14 +74378,7 @@]},"data": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -68126,11 +74435,11 @@},{"method": "POST",- "path": "/api/filetree/getHPathByID",- "handler": "getHPathByID",+ "path": "/api/history/searchHistory",+ "handler": "searchHistory","body": "json","request": {- "$ref": "#/$defs/FileTreeIDRequestInput"+ "$ref": "#/$defs/SearchHistoryRequestInput"},"response": {"anyOf": [@@ -68144,7 +74453,7 @@]},"data": {- "type": "string"+ "$ref": "#/$defs/SearchHistoryData"},"msg": {"type": "string"@@ -68201,11 +74510,11 @@},{"method": "POST",- "path": "/api/filetree/getHPathByPath",- "handler": "getHPathByPath",+ "path": "/api/import/cancelImportSY",+ "handler": "cancelImportSY","body": "json","request": {- "$ref": "#/$defs/FileTreePathRequestInput"+ "$ref": "#/$defs/ImportTokenRequestInput"},"response": {"anyOf": [@@ -68219,7 +74528,7 @@]},"data": {- "type": "string"+ "type": "null"},"msg": {"type": "string"@@ -68276,11 +74585,11 @@},{"method": "POST",- "path": "/api/filetree/getHPathsByPaths",- "handler": "getHPathsByPaths",+ "path": "/api/import/cancelObsidianVaultTask",+ "handler": "cancelObsidianVaultTask","body": "json","request": {- "$ref": "#/$defs/FileTreePathsRequestInput"+ "$ref": "#/$defs/ObsidianTaskRequestInput"},"response": {"anyOf": [@@ -68296,10 +74605,7 @@"data": {"anyOf": [{- "type": "array",- "items": {- "type": "string"- }+ "$ref": "#/$defs/ObsidianVaultTask"},{"type": "null"@@ -68342,91 +74648,16 @@},{"type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/filetree/getIDsByHPath",- "handler": "getIDsByHPath",- "body": "json",- "request": {- "$ref": "#/$defs/FileTreeOptionalPathRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "anyOf": [- {- "type": "array",- "items": {- "type": "string"- }},{- "type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },- "data": {- "anyOf": [- {- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"+ "anyOf": [+ {+ "$ref": "#/$defs/ObsidianVaultTask"+ },+ {+ "type": "null"}- },- "required": [- "closeTimeout"- ],- "additionalProperties": false- },- {- "type": "null"+ ]}]},@@ -68446,11 +74677,11 @@},{"method": "POST",- "path": "/api/filetree/getPathByID",- "handler": "getPathByID",+ "path": "/api/import/continueImportSY",+ "handler": "continueImportSY","body": "json","request": {- "$ref": "#/$defs/FileTreeTrimIDRequestInput"+ "$ref": "#/$defs/ContinueImportSYRequestInput"},"response": {"anyOf": [@@ -68464,7 +74695,7 @@]},"data": {- "$ref": "#/$defs/FileTreeDocPathData"+ "$ref": "#/$defs/ImportDocumentData"},"msg": {"type": "string"@@ -68521,11 +74752,11 @@},{"method": "POST",- "path": "/api/filetree/getPinnedDocs",- "handler": "getPinnedDocs",- "body": "none",+ "path": "/api/import/getObsidianVaultTask",+ "handler": "getObsidianVaultTask",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/ObsidianTaskRequestInput"},"response": {"anyOf": [@@ -68538,45 +74769,10 @@0]},- "data": {- "type": "array",- "items": {- "$ref": "#/$defs/PinnedDoc"- }- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "$ref": "#/$defs/ObsidianVaultTask"},{"type": "null"@@ -68592,42 +74788,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/filetree/getPublishAccess",- "handler": "getPublishAccess",- "body": "json",- "request": {- "$ref": "#/$defs/FileTreePublishIDsRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/FileTreePublishData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -68674,11 +74834,11 @@},{"method": "POST",- "path": "/api/filetree/getRefCreateSavePath",- "handler": "getRefCreateSavePath",- "body": "json",+ "path": "/api/import/importData",+ "handler": "importData",+ "body": "multipart","request": {- "$ref": "#/$defs/FileTreeNotebookRequestInput"+ "$ref": "#/$defs/ImportDataRequestInput"},"response": {"anyOf": [@@ -68692,7 +74852,7 @@]},"data": {- "$ref": "#/$defs/FileTreeSavePathData"+ "type": "null"},"msg": {"type": "string"@@ -68749,11 +74909,11 @@},{"method": "POST",- "path": "/api/filetree/getShorthandSavePath",- "handler": "getShorthandSavePath",- "body": "json",+ "path": "/api/import/importSY",+ "handler": "importSY",+ "body": "multipart","request": {- "$ref": "#/$defs/FileTreeNotebookRequestInput"+ "$ref": "#/$defs/ImportSYRequestInput"},"response": {"anyOf": [@@ -68767,7 +74927,7 @@]},"data": {- "$ref": "#/$defs/FileTreeSavePathData"+ "type": "null"},"msg": {"type": "string"@@ -68824,11 +74984,11 @@},{"method": "POST",- "path": "/api/filetree/heading2Doc",- "handler": "heading2Doc",- "body": "json",+ "path": "/api/import/importSYAuto",+ "handler": "importSYAuto",+ "body": "multipart","request": {- "$ref": "#/$defs/FileTreeHeadingDocRequestInput"+ "$ref": "#/$defs/ImportSYRequestInput"},"response": {"anyOf": [@@ -68841,45 +75001,16 @@0]},- "data": {- "type": "null"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "$ref": "#/$defs/ImportAutoDocument"},{- "type": "null"+ "$ref": "#/$defs/ImportAutoNotebook"+ },+ {+ "$ref": "#/$defs/ImportAutoNotebooks"}]},@@ -68892,42 +75023,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/filetree/li2Doc",- "handler": "li2Doc",- "body": "json",- "request": {- "$ref": "#/$defs/FileTreeListItemDocRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "type": "null"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -68955,6 +75050,19 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/ImportAutoDocument"+ },+ {+ "$ref": "#/$defs/ImportAutoNotebook"+ },+ {+ "$ref": "#/$defs/ImportAutoNotebooks"+ }+ ]}]},@@ -68974,11 +75082,11 @@},{"method": "POST",- "path": "/api/filetree/listDocTree",- "handler": "listDocTree",- "body": "json",+ "path": "/api/import/importSYNotebook",+ "handler": "importSYNotebook",+ "body": "multipart","request": {- "$ref": "#/$defs/FileTreePathRequestInput"+ "$ref": "#/$defs/ImportDataRequestInput"},"response": {"anyOf": [@@ -68991,45 +75099,13 @@0]},- "data": {- "$ref": "#/$defs/FileTreeDocTreeData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "$ref": "#/$defs/ImportedNotebook"},{- "type": "null"+ "$ref": "#/$defs/ImportedNotebooks"}]},@@ -69042,42 +75118,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/filetree/listDocsByPath",- "handler": "listDocsByPath",- "body": "json",- "request": {- "$ref": "#/$defs/FileTreeListRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/FileTreeListData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -69124,11 +75164,11 @@},{"method": "POST",- "path": "/api/filetree/moveDocs",- "handler": "moveDocs",+ "path": "/api/import/importStdMd",+ "handler": "importStdMd","body": "json","request": {- "$ref": "#/$defs/FileTreeMoveRequestInput"+ "$ref": "#/$defs/ImportMarkdownRequestInput"},"response": {"anyOf": [@@ -69199,11 +75239,11 @@},{"method": "POST",- "path": "/api/filetree/moveDocsByID",- "handler": "moveDocsByID",- "body": "json",+ "path": "/api/import/importZipMd",+ "handler": "importZipMd",+ "body": "multipart","request": {- "$ref": "#/$defs/FileTreeMoveIDsRequestInput"+ "$ref": "#/$defs/ImportZipMarkdownRequestInput"},"response": {"anyOf": [@@ -69274,11 +75314,11 @@},{"method": "POST",- "path": "/api/filetree/moveLocalShorthands",- "handler": "moveLocalShorthands",+ "path": "/api/import/startObsidianVaultAnalysis",+ "handler": "startObsidianVaultAnalysis","body": "json","request": {- "$ref": "#/$defs/FileTreeNotebookRequestInput"+ "$ref": "#/$defs/ObsidianAnalysisRequestInput"},"response": {"anyOf": [@@ -69294,10 +75334,7 @@"data": {"anyOf": [{- "type": "array",- "items": {- "type": "string"- }+ "$ref": "#/$defs/ObsidianVaultTask"},{"type": "null"@@ -69359,11 +75396,11 @@},{"method": "POST",- "path": "/api/filetree/removeDoc",- "handler": "removeDoc",+ "path": "/api/import/startObsidianVaultImport",+ "handler": "startObsidianVaultImport","body": "json","request": {- "$ref": "#/$defs/FileTreePathRequestInput"+ "$ref": "#/$defs/ObsidianImportRequestInput"},"response": {"anyOf": [@@ -69377,7 +75414,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/ObsidianVaultTask"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -69434,11 +75478,11 @@},{"method": "POST",- "path": "/api/filetree/removeDocByID",- "handler": "removeDocByID",+ "path": "/api/inbox/getShorthand",+ "handler": "getShorthand","body": "json","request": {- "$ref": "#/$defs/FileTreeTrimIDRequestInput"+ "$ref": "#/$defs/TrimmedIDRequestInput"},"response": {"anyOf": [@@ -69452,7 +75496,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/Shorthand"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -69471,7 +75522,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -69509,11 +75561,11 @@},{"method": "POST",- "path": "/api/filetree/removeDocs",- "handler": "removeDocs",+ "path": "/api/inbox/getShorthands",+ "handler": "getShorthands","body": "json","request": {- "$ref": "#/$defs/FileTreePathsRequestInput"+ "$ref": "#/$defs/ShorthandsRequestInput"},"response": {"anyOf": [@@ -69527,7 +75579,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/ShorthandsData"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -69546,7 +75605,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -69584,11 +75644,11 @@},{"method": "POST",- "path": "/api/filetree/removeIndexes",- "handler": "removeIndexes",+ "path": "/api/inbox/removeShorthands",+ "handler": "removeShorthands","body": "json","request": {- "$ref": "#/$defs/FileTreePathsRequestInput"+ "$ref": "#/$defs/RemoveShorthandsRequestInput"},"response": {"anyOf": [@@ -69621,7 +75681,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -69659,11 +75720,11 @@},{"method": "POST",- "path": "/api/filetree/renameDoc",- "handler": "renameDoc",+ "path": "/api/lute/copyStdMarkdown",+ "handler": "copyStdMarkdown","body": "json","request": {- "$ref": "#/$defs/FileTreeRenameRequestInput"+ "$ref": "#/$defs/CopyStdMarkdownRequestInput"},"response": {"anyOf": [@@ -69677,7 +75738,7 @@]},"data": {- "type": "null"+ "type": "string"},"msg": {"type": "string"@@ -69734,11 +75795,11 @@},{"method": "POST",- "path": "/api/filetree/renameDocByID",- "handler": "renameDocByID",+ "path": "/api/lute/html2BlockDOM",+ "handler": "html2BlockDOM","body": "json","request": {- "$ref": "#/$defs/FileTreeRenameIDRequestInput"+ "$ref": "#/$defs/HTMLClipboardRequestInput"},"response": {"anyOf": [@@ -69752,7 +75813,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "type": "string"+ },+ {+ "$ref": "#/$defs/HTMLClipboardPreflight"+ }+ ]},"msg": {"type": "string"@@ -69809,11 +75877,11 @@},{"method": "POST",- "path": "/api/filetree/reorderDocs",- "handler": "reorderDocs",- "body": "structJSON",+ "path": "/api/lute/md2html",+ "handler": "md2HTML",+ "body": "json","request": {- "$ref": "#/$defs/FileTreeReorderRequestInput"+ "$ref": "#/$defs/MarkdownHTMLRequestInput"},"response": {"anyOf": [@@ -69827,14 +75895,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/FileTreeReorderData"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/HTMLData"},"msg": {"type": "string"@@ -69872,16 +75933,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/FileTreeReorderData"- },- {- "type": "null"- }- ]}]},@@ -69901,11 +75952,11 @@},{"method": "POST",- "path": "/api/filetree/searchDocs",- "handler": "searchDocs",+ "path": "/api/lute/spinBlockDOM",+ "handler": "spinBlockDOM","body": "json","request": {- "$ref": "#/$defs/FileTreeSearchRequestInput"+ "$ref": "#/$defs/DOMTextRequestInput"},"response": {"anyOf": [@@ -69918,20 +75969,43 @@0]},+ "data": {+ "$ref": "#/$defs/DOMData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1,+ 413+ ]+ },"data": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/FileTreeSearchDoc"- },- {- "type": "null"- }- ]- }+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -69947,6 +76021,42 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/lute/wpsPresentation2BlockDOM",+ "handler": "wpsPresentation2BlockDOM",+ "body": "json",+ "request": {+ "$ref": "#/$defs/WPSPresentationRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/WPSPresentationData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -69974,6 +76084,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/WPSPresentationData"}]},@@ -69993,11 +76106,12 @@},{"method": "POST",- "path": "/api/filetree/setDocSortMode",- "handler": "setDocSortMode",- "body": "structJSON",+ "path": "/api/network/echo",+ "handler": "echo",+ "body": "raw","request": {- "$ref": "#/$defs/FileTreeSortModeRequestInput"+ "type": "string",+ "format": "binary"},"response": {"anyOf": [@@ -70010,10 +76124,42 @@0]},+ "data": {+ "$ref": "#/$defs/NetworkEchoData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },"data": {"anyOf": [{- "$ref": "#/$defs/FileTreeSortModeData"+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -70029,6 +76175,43 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/network/echo/*path",+ "handler": "echoPath",+ "body": "raw",+ "request": {+ "type": "string",+ "format": "binary"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/NetworkEchoData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -70056,16 +76239,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/FileTreeSortModeData"- },- {- "type": "null"- }- ]}]},@@ -70085,11 +76258,11 @@},{"method": "POST",- "path": "/api/filetree/setPublishAccess",- "handler": "setPublishAccess",+ "path": "/api/network/forwardProxy",+ "handler": "forwardProxy","body": "json","request": {- "$ref": "#/$defs/FileTreeSetPublishRequestInput"+ "$ref": "#/$defs/NetworkForwardRequestInput"},"response": {"anyOf": [@@ -70103,7 +76276,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/NetworkForwardData"},"msg": {"type": "string"@@ -70122,7 +76295,16 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1,+ 2,+ 3,+ 4,+ 5,+ 6,+ 7,+ 8,+ 10]},"data": {@@ -70160,27 +76342,41 @@},{"method": "POST",- "path": "/api/filetree/setSort",- "handler": "setSort",- "body": "structJSON",+ "path": "/api/network/proxy",+ "handler": "httpProxy",+ "body": "raw","request": {- "$ref": "#/$defs/FileTreeSetSortRequestInput"+ "type": "string",+ "format": "binary"},"response": {"anyOf": [+ {+ "type": "string",+ "format": "binary"+ },{"type": "object","properties": {"code": {"type": "integer","enum": [- 0+ -1]},"data": {"anyOf": [{- "$ref": "#/$defs/FileTreeSetSortData"+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -70196,6 +76392,48 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ },+ "output": "proxy",+ "proxy": {+ "kind": "http",+ "contentType": "application/octet-stream",+ "upstreamStatuses": true+ }+ },+ {+ "method": "POST",+ "path": "/api/notebook/changeMasterPassword",+ "handler": "changeMasterPassword",+ "body": "json",+ "request": {+ "$ref": "#/$defs/ChangeMasterPasswordRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -70223,16 +76461,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/FileTreeSetSortData"- },- {- "type": "null"- }- ]}]},@@ -70252,11 +76480,11 @@},{"method": "POST",- "path": "/api/filetree/updatePinnedDocs",- "handler": "updatePinnedDocs",+ "path": "/api/notebook/changeSortNotebook",+ "handler": "changeSortNotebook","body": "json","request": {- "$ref": "#/$defs/UpdatePinnedDocsRequestInput"+ "$ref": "#/$defs/ChangeSortNotebookRequestInput"},"response": {"anyOf": [@@ -70327,11 +76555,11 @@},{"method": "POST",- "path": "/api/filetree/upsertIndexes",- "handler": "upsertIndexes",+ "path": "/api/notebook/closeNotebook",+ "handler": "closeNotebook","body": "json","request": {- "$ref": "#/$defs/FileTreePathsRequestInput"+ "$ref": "#/$defs/CloseNotebookRequestInput"},"response": {"anyOf": [@@ -70402,11 +76630,11 @@},{"method": "POST",- "path": "/api/format/autoSpace",- "handler": "autoSpace",+ "path": "/api/notebook/createEncryptedNotebook",+ "handler": "createEncryptedNotebook","body": "json","request": {- "$ref": "#/$defs/TrimmedIDRequestInput"+ "$ref": "#/$defs/CreateEncryptedNotebookRequestInput"},"response": {"anyOf": [@@ -70420,7 +76648,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/CreateNotebookData"},"msg": {"type": "string"@@ -70477,11 +76705,11 @@},{"method": "POST",- "path": "/api/format/netAssets2LocalAssets",- "handler": "netAssets2LocalAssets",+ "path": "/api/notebook/createNotebook",+ "handler": "createNotebook","body": "json","request": {- "$ref": "#/$defs/TrimmedIDRequestInput"+ "$ref": "#/$defs/CreateNotebookRequestInput"},"response": {"anyOf": [@@ -70495,7 +76723,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/CreateNotebookData"},"msg": {"type": "string"@@ -70552,11 +76780,11 @@},{"method": "POST",- "path": "/api/format/netImg2LocalAssets",- "handler": "netImg2LocalAssets",- "body": "json",+ "path": "/api/notebook/disableEncryptedNotebooks",+ "handler": "disableEncryptedNotebooks",+ "body": "none","request": {- "$ref": "#/$defs/NetImageAssetsRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -70627,11 +76855,11 @@},{"method": "POST",- "path": "/api/graph/getGraph",- "handler": "getGraph",+ "path": "/api/notebook/enableEncryptedNotebooks",+ "handler": "enableEncryptedNotebooks","body": "json","request": {- "$ref": "#/$defs/GlobalGraphRequestInput"+ "$ref": "#/$defs/NotebookPasswordRequestInput"},"response": {"anyOf": [@@ -70645,14 +76873,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/GlobalGraphResult"- },- {- "$ref": "#/$defs/GraphCorrelation"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -70690,16 +76911,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/GlobalGraphResult"- },- {- "$ref": "#/$defs/GraphCorrelation"- }- ]}]},@@ -70719,11 +76930,11 @@},{"method": "POST",- "path": "/api/graph/getLocalGraph",- "handler": "getLocalGraph",- "body": "json",+ "path": "/api/notebook/exportNotebookCryptoBackup",+ "handler": "exportNotebookCryptoBackup",+ "body": "none","request": {- "$ref": "#/$defs/LocalGraphRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -70737,14 +76948,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/LocalGraphResult"- },- {- "$ref": "#/$defs/GraphCorrelation"- }- ]+ "$ref": "#/$defs/NotebookCryptoBackupData"},"msg": {"type": "string"@@ -70782,16 +76986,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/LocalGraphResult"- },- {- "$ref": "#/$defs/GraphCorrelation"- }- ]}]},@@ -70811,8 +77005,8 @@},{"method": "POST",- "path": "/api/graph/resetGraph",- "handler": "resetGraph",+ "path": "/api/notebook/getEncryptedNotebookStatus",+ "handler": "getEncryptedNotebookStatus","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -70829,7 +77023,7 @@]},"data": {- "$ref": "#/$defs/ResetGraphData"+ "$ref": "#/$defs/EncryptedNotebookStatusData"},"msg": {"type": "string"@@ -70886,11 +77080,11 @@},{"method": "POST",- "path": "/api/graph/resetLocalGraph",- "handler": "resetLocalGraph",- "body": "none",+ "path": "/api/notebook/getNotebookConf",+ "handler": "getNotebookConf",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/CloseNotebookRequestInput"},"response": {"anyOf": [@@ -70904,7 +77098,7 @@]},"data": {- "$ref": "#/$defs/ResetLocalGraphData"+ "$ref": "#/$defs/NotebookConfData"},"msg": {"type": "string"@@ -70961,11 +77155,11 @@},{"method": "POST",- "path": "/api/graph/setGraphConf",- "handler": "setGraphConf",+ "path": "/api/notebook/getNotebookInfo",+ "handler": "getNotebookInfo","body": "json","request": {- "$ref": "#/$defs/SetGraphConfRequestInput"+ "$ref": "#/$defs/NotebookIDRequestInput"},"response": {"anyOf": [@@ -70979,14 +77173,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/GlobalGraphConf"- },- {- "$ref": "#/$defs/LocalGraphConf"- }- ]+ "$ref": "#/$defs/NotebookInfoData"},"msg": {"type": "string"@@ -71043,11 +77230,11 @@},{"method": "POST",- "path": "/api/history/clearWorkspaceHistory",- "handler": "clearWorkspaceHistory",- "body": "none",+ "path": "/api/notebook/importNotebookCryptoBackup",+ "handler": "importNotebookCryptoBackup",+ "body": "multipart","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/ImportNotebookCryptoBackupRequestInput"},"response": {"anyOf": [@@ -71118,11 +77305,11 @@},{"method": "POST",- "path": "/api/history/createAssetHistory",- "handler": "createAssetHistory",+ "path": "/api/notebook/lockNotebook",+ "handler": "lockNotebook","body": "json","request": {- "$ref": "#/$defs/CreateAssetHistoryRequestInput"+ "$ref": "#/$defs/NotebookIDRequestInput"},"response": {"anyOf": [@@ -71193,11 +77380,11 @@},{"method": "POST",- "path": "/api/history/createDocHistory",- "handler": "createDocHistory",- "body": "json",+ "path": "/api/notebook/lsNotebooks",+ "handler": "lsNotebooks",+ "body": "legacyOptional","request": {- "$ref": "#/$defs/CreateDocHistoryRequestInput"+ "$ref": "#/$defs/ListNotebooksRequestInput"},"response": {"anyOf": [@@ -71211,7 +77398,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/ListNotebooksData"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -71268,11 +77462,11 @@},{"method": "POST",- "path": "/api/history/diffDocVersions",- "handler": "diffDocVersions",+ "path": "/api/notebook/openNotebook",+ "handler": "openNotebook","body": "json","request": {- "$ref": "#/$defs/DiffDocVersionsRequestInput"+ "$ref": "#/$defs/OpenNotebookRequestInput"},"response": {"anyOf": [@@ -71286,14 +77480,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/DocVersionDiffResult"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -71350,11 +77537,11 @@},{"method": "POST",- "path": "/api/history/getDocHistoryContent",- "handler": "getDocHistoryContent",+ "path": "/api/notebook/removeNotebook",+ "handler": "removeNotebook","body": "json","request": {- "$ref": "#/$defs/DocHistoryContentRequestInput"+ "$ref": "#/$defs/NotebookIDRequestInput"},"response": {"anyOf": [@@ -71368,7 +77555,7 @@]},"data": {- "$ref": "#/$defs/DocHistoryContentData"+ "type": "null"},"msg": {"type": "string"@@ -71425,11 +77612,11 @@},{"method": "POST",- "path": "/api/history/getHistoryItems",- "handler": "getHistoryItems",+ "path": "/api/notebook/renameNotebook",+ "handler": "renameNotebook","body": "json","request": {- "$ref": "#/$defs/HistoryItemsRequestInput"+ "$ref": "#/$defs/RenameNotebookRequestInput"},"response": {"anyOf": [@@ -71443,7 +77630,7 @@]},"data": {- "$ref": "#/$defs/HistoryItemsData"+ "type": "null"},"msg": {"type": "string"@@ -71500,11 +77687,11 @@},{"method": "POST",- "path": "/api/history/getNotebookHistory",- "handler": "getNotebookHistory",- "body": "none",+ "path": "/api/notebook/reorder",+ "handler": "reorderNotebooks",+ "body": "structJSON","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/ReorderNotebooksRequestInput"},"response": {"anyOf": [@@ -71517,42 +77704,10 @@0]},- "data": {- "$ref": "#/$defs/NotebookHistoryData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "$ref": "#/$defs/ReorderData"},{"type": "null"@@ -71568,42 +77723,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/history/reindexHistory",- "handler": "reindexHistory",- "body": "none",- "request": {- "$ref": "#/$defs/EmptyRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "type": "null"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -71631,6 +77750,16 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/ReorderData"+ },+ {+ "type": "null"+ }+ ]}]},@@ -71650,11 +77779,11 @@},{"method": "POST",- "path": "/api/history/rollbackAssetsHistory",- "handler": "rollbackAssetsHistory",+ "path": "/api/notebook/setNotebookConf",+ "handler": "setNotebookConf","body": "json","request": {- "$ref": "#/$defs/HistoryPathRequestInput"+ "$ref": "#/$defs/SetNotebookConfRequestInput"},"response": {"anyOf": [@@ -71668,7 +77797,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/NotebookConf"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -71725,11 +77861,11 @@},{"method": "POST",- "path": "/api/history/rollbackAttributeViewHistory",- "handler": "rollbackAttributeViewHistory",+ "path": "/api/notebook/setNotebookCryptoAutoLock",+ "handler": "setNotebookCryptoAutoLock","body": "json","request": {- "$ref": "#/$defs/HistoryPathRequestInput"+ "$ref": "#/$defs/NotebookCryptoAutoLockRequestInput"},"response": {"anyOf": [@@ -71800,11 +77936,11 @@},{"method": "POST",- "path": "/api/history/rollbackDocHistory",- "handler": "rollbackDocHistory",+ "path": "/api/notebook/setNotebookIcon",+ "handler": "setNotebookIcon","body": "json","request": {- "$ref": "#/$defs/HistoryPathRequestInput"+ "$ref": "#/$defs/SetNotebookIconRequestInput"},"response": {"anyOf": [@@ -71875,11 +78011,11 @@},{"method": "POST",- "path": "/api/history/rollbackNotebookHistory",- "handler": "rollbackNotebookHistory",- "body": "json",+ "path": "/api/notebook/touchEncryptedNotebooks",+ "handler": "touchEncryptedNotebooks",+ "body": "none","request": {- "$ref": "#/$defs/HistoryPathRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -71950,11 +78086,11 @@},{"method": "POST",- "path": "/api/history/searchHistory",- "handler": "searchHistory",+ "path": "/api/notebook/unlockAndOpenNotebook",+ "handler": "unlockAndOpenNotebook","body": "json","request": {- "$ref": "#/$defs/SearchHistoryRequestInput"+ "$ref": "#/$defs/UnlockNotebookRequestInput"},"response": {"anyOf": [@@ -71968,7 +78104,7 @@]},"data": {- "$ref": "#/$defs/SearchHistoryData"+ "type": "null"},"msg": {"type": "string"@@ -72025,11 +78161,11 @@},{"method": "POST",- "path": "/api/import/cancelImportSY",- "handler": "cancelImportSY",+ "path": "/api/notebook/unlockNotebook",+ "handler": "unlockNotebook","body": "json","request": {- "$ref": "#/$defs/ImportTokenRequestInput"+ "$ref": "#/$defs/UnlockNotebookRequestInput"},"response": {"anyOf": [@@ -72100,11 +78236,11 @@},{"method": "POST",- "path": "/api/import/cancelObsidianVaultTask",- "handler": "cancelObsidianVaultTask",+ "path": "/api/notification/pushErrMsg",+ "handler": "pushErrMsg","body": "json","request": {- "$ref": "#/$defs/ObsidianTaskRequestInput"+ "$ref": "#/$defs/NotificationRequestInput"},"response": {"anyOf": [@@ -72118,14 +78254,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/ObsidianVaultTask"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/NotificationData"},"msg": {"type": "string"@@ -72163,16 +78292,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/ObsidianVaultTask"- },- {- "type": "null"- }- ]}]},@@ -72192,11 +78311,11 @@},{"method": "POST",- "path": "/api/import/continueImportSY",- "handler": "continueImportSY",+ "path": "/api/notification/pushMsg",+ "handler": "pushMsg","body": "json","request": {- "$ref": "#/$defs/ContinueImportSYRequestInput"+ "$ref": "#/$defs/NotificationRequestInput"},"response": {"anyOf": [@@ -72210,7 +78329,7 @@]},"data": {- "$ref": "#/$defs/ImportDocumentData"+ "$ref": "#/$defs/NotificationData"},"msg": {"type": "string"@@ -72267,11 +78386,11 @@},{"method": "POST",- "path": "/api/import/getObsidianVaultTask",- "handler": "getObsidianVaultTask",+ "path": "/api/outline/getDocHeadingNumbers",+ "handler": "getDocHeadingNumbers","body": "json","request": {- "$ref": "#/$defs/ObsidianTaskRequestInput"+ "$ref": "#/$defs/HeadingNumbersRequestInput"},"response": {"anyOf": [@@ -72284,49 +78403,13 @@0]},- "data": {- "anyOf": [- {- "$ref": "#/$defs/ObsidianVaultTask"- },- {- "type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{"type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "additionalProperties": {+ "type": "string"+ }},{"type": "null"@@ -72342,42 +78425,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/import/importData",- "handler": "importData",- "body": "multipart",- "request": {- "$ref": "#/$defs/ImportDataRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "type": "null"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -72386,7 +78433,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -72424,11 +78472,11 @@},{"method": "POST",- "path": "/api/import/importSY",- "handler": "importSY",- "body": "multipart",+ "path": "/api/outline/getDocOutline",+ "handler": "getDocOutline",+ "body": "json","request": {- "$ref": "#/$defs/ImportSYRequestInput"+ "$ref": "#/$defs/OutlineRequestInput"},"response": {"anyOf": [@@ -72441,42 +78489,20 @@0]},- "data": {- "type": "null"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchPath"+ },+ {+ "type": "null"+ }+ ]+ }},{"type": "null"@@ -72492,52 +78518,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/import/importSYAuto",- "handler": "importSYAuto",- "body": "multipart",- "request": {- "$ref": "#/$defs/ImportSYRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "anyOf": [- {- "$ref": "#/$defs/ImportAutoDocument"- },- {- "$ref": "#/$defs/ImportAutoNotebook"- },- {- "$ref": "#/$defs/ImportAutoNotebooks"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -72546,7 +78526,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -72565,19 +78546,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/ImportAutoDocument"- },- {- "$ref": "#/$defs/ImportAutoNotebook"- },- {- "$ref": "#/$defs/ImportAutoNotebooks"- }- ]}]},@@ -72597,11 +78565,11 @@},{"method": "POST",- "path": "/api/import/importSYNotebook",- "handler": "importSYNotebook",- "body": "multipart",+ "path": "/api/petal/loadPetals",+ "handler": "loadPetals",+ "body": "json","request": {- "$ref": "#/$defs/ImportDataRequestInput"+ "$ref": "#/$defs/LoadPetalsRequestInput"},"response": {"anyOf": [@@ -72617,10 +78585,20 @@"data": {"anyOf": [{- "$ref": "#/$defs/ImportedNotebook"+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/Petal"+ },+ {+ "type": "null"+ }+ ]+ }},{- "$ref": "#/$defs/ImportedNotebooks"+ "type": "null"}]},@@ -72679,11 +78657,11 @@},{"method": "POST",- "path": "/api/import/importStdMd",- "handler": "importStdMd",+ "path": "/api/petal/setPetalEnabled",+ "handler": "setPetalEnabled","body": "json","request": {- "$ref": "#/$defs/ImportMarkdownRequestInput"+ "$ref": "#/$defs/SetPetalEnabledRequestInput"},"response": {"anyOf": [@@ -72696,42 +78674,10 @@0]},- "data": {- "type": "null"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "$ref": "#/$defs/Petal"},{"type": "null"@@ -72747,42 +78693,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/import/importZipMd",- "handler": "importZipMd",- "body": "multipart",- "request": {- "$ref": "#/$defs/ImportZipMarkdownRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "type": "null"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -72829,11 +78739,11 @@},{"method": "POST",- "path": "/api/import/startObsidianVaultAnalysis",- "handler": "startObsidianVaultAnalysis",+ "path": "/api/petal/setPetalPublishEnabled",+ "handler": "setPetalPublishEnabled","body": "json","request": {- "$ref": "#/$defs/ObsidianAnalysisRequestInput"+ "$ref": "#/$defs/SetPetalPublishEnabledRequestInput"},"response": {"anyOf": [@@ -72849,7 +78759,7 @@"data": {"anyOf": [{- "$ref": "#/$defs/ObsidianVaultTask"+ "$ref": "#/$defs/Petal"},{"type": "null"@@ -72911,11 +78821,11 @@},{"method": "POST",- "path": "/api/import/startObsidianVaultImport",- "handler": "startObsidianVaultImport",+ "path": "/api/plugin/getLoadedPlugin",+ "handler": "getLoadedPlugin","body": "json","request": {- "$ref": "#/$defs/ObsidianImportRequestInput"+ "$ref": "#/$defs/LoadedPluginRequestInput"},"response": {"anyOf": [@@ -72931,7 +78841,7 @@"data": {"anyOf": [{- "$ref": "#/$defs/ObsidianVaultTask"+ "$ref": "#/$defs/LoadedPlugin"},{"type": "null"@@ -72955,7 +78865,11 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1,+ 2,+ 3,+ 4]},"data": {@@ -72993,11 +78907,11 @@},{"method": "POST",- "path": "/api/inbox/getShorthand",- "handler": "getShorthand",- "body": "json",+ "path": "/api/plugin/listLoadedPlugins",+ "handler": "listLoadedPlugins",+ "body": "none","request": {- "$ref": "#/$defs/TrimmedIDRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -73013,7 +78927,17 @@"data": {"anyOf": [{- "$ref": "#/$defs/Shorthand"+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/LoadedPlugin"+ },+ {+ "type": "null"+ }+ ]+ }},{"type": "null"@@ -73037,8 +78961,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -73076,27 +78999,75 @@},{"method": "POST",- "path": "/api/inbox/getShorthands",- "handler": "getShorthands",+ "path": "/api/plugin/rpc",+ "handler": "pluginJsonRpcHttp","body": "json","request": {- "$ref": "#/$defs/ShorthandsRequestInput"+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCRequestFieldsInput"+ },+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/PluginRPCRequestFieldsInput"+ },+ "minItems": 1+ }+ ]},"response": {"anyOf": [+ {+ "anyOf": [+ {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCSuccess"+ },+ {+ "$ref": "#/$defs/PluginRPCFailure"+ }+ ]+ },+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCSuccess"+ },+ {+ "$ref": "#/$defs/PluginRPCFailure"+ }+ ]+ },+ "minItems": 1+ }+ ]+ },{"type": "object","properties": {"code": {"type": "integer","enum": [- 0+ -1]},"data": {"anyOf": [{- "$ref": "#/$defs/ShorthandsData"+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -73112,7 +79083,61 @@"msg","data"],- "additionalProperties": false+ "additionalProperties": true+ }+ ]+ },+ "output": "directJSON",+ "noContent": true+ },+ {+ "method": "POST",+ "path": "/api/plugin/rpc/:name",+ "handler": "pluginJsonRpcHttpByName",+ "body": "json",+ "request": {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCRequestFieldsInput"+ },+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/PluginRPCRequestFieldsInput"+ },+ "minItems": 1+ }+ ]+ },+ "response": {+ "anyOf": [+ {+ "anyOf": [+ {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCSuccess"+ },+ {+ "$ref": "#/$defs/PluginRPCFailure"+ }+ ]+ },+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCSuccess"+ },+ {+ "$ref": "#/$defs/PluginRPCFailure"+ }+ ]+ },+ "minItems": 1+ }+ ]},{"type": "object",@@ -73120,8 +79145,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -73155,15 +79179,17 @@"additionalProperties": true}]- }+ },+ "output": "directJSON",+ "noContent": true},{"method": "POST",- "path": "/api/inbox/removeShorthands",- "handler": "removeShorthands",+ "path": "/api/query/sql",+ "handler": "SQL","body": "json","request": {- "$ref": "#/$defs/RemoveShorthandsRequestInput"+ "$ref": "#/$defs/SQLQueryRequestInput"},"response": {"anyOf": [@@ -73177,16 +79203,50 @@]},"data": {- "type": "null"+ "type": "array",+ "items": {+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "anyOf": [+ {+ "type": "null"+ },+ {+ "type": "string"+ },+ {+ "type": "number"+ },+ {+ "type": "boolean"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "limit": {+ "type": "integer"},"msg": {"type": "string"+ },+ "truncated": {+ "type": "boolean"}},"required": ["code","msg",- "data"+ "data",+ "limit",+ "truncated"],"additionalProperties": false},@@ -73235,11 +79295,11 @@},{"method": "POST",- "path": "/api/lute/copyStdMarkdown",- "handler": "copyStdMarkdown",+ "path": "/api/ref/getBacklink2",+ "handler": "getBacklink2","body": "json","request": {- "$ref": "#/$defs/CopyStdMarkdownRequestInput"+ "$ref": "#/$defs/BacklinkListRequestInput"},"response": {"anyOf": [@@ -73253,7 +79313,17 @@]},"data": {- "type": "string"+ "anyOf": [+ {+ "$ref": "#/$defs/BacklinkList"+ },+ {+ "$ref": "#/$defs/BacklinkRefDefs"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -73272,7 +79342,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -73291,6 +79362,19 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/BacklinkList"+ },+ {+ "$ref": "#/$defs/BacklinkRefDefs"+ },+ {+ "type": "null"+ }+ ]}]},@@ -73310,11 +79394,11 @@},{"method": "POST",- "path": "/api/lute/html2BlockDOM",- "handler": "html2BlockDOM",+ "path": "/api/ref/getBacklinkDoc",+ "handler": "getBacklinkDoc","body": "json","request": {- "$ref": "#/$defs/HTMLClipboardRequestInput"+ "$ref": "#/$defs/BacklinkDocumentRequestInput"},"response": {"anyOf": [@@ -73328,14 +79412,7 @@]},"data": {- "anyOf": [- {- "type": "string"- },- {- "$ref": "#/$defs/HTMLClipboardPreflight"- }- ]+ "$ref": "#/$defs/BacklinkContextData"},"msg": {"type": "string"@@ -73354,7 +79431,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -73392,11 +79470,11 @@},{"method": "POST",- "path": "/api/lute/md2html",- "handler": "md2HTML",+ "path": "/api/ref/getBackmentionDoc",+ "handler": "getBackmentionDoc","body": "json","request": {- "$ref": "#/$defs/MarkdownHTMLRequestInput"+ "$ref": "#/$defs/BackmentionDocumentRequestInput"},"response": {"anyOf": [@@ -73410,7 +79488,7 @@]},"data": {- "$ref": "#/$defs/HTMLData"+ "$ref": "#/$defs/BacklinkContextData"},"msg": {"type": "string"@@ -73429,7 +79507,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -73467,11 +79546,11 @@},{"method": "POST",- "path": "/api/lute/spinBlockDOM",- "handler": "spinBlockDOM",+ "path": "/api/ref/refreshBacklink",+ "handler": "refreshBacklink","body": "json","request": {- "$ref": "#/$defs/DOMTextRequestInput"+ "$ref": "#/$defs/RefreshBacklinkRequestInput"},"response": {"anyOf": [@@ -73485,7 +79564,7 @@]},"data": {- "$ref": "#/$defs/DOMData"+ "type": "null"},"msg": {"type": "string"@@ -73504,8 +79583,7 @@"code": {"type": "integer","enum": [- -1,- 413+ -1]},"data": {@@ -73543,11 +79621,11 @@},{"method": "POST",- "path": "/api/lute/wpsPresentation2BlockDOM",- "handler": "wpsPresentation2BlockDOM",- "body": "json",+ "path": "/api/repo/checkSnapshot",+ "handler": "checkSnapshot",+ "body": "none","request": {- "$ref": "#/$defs/WPSPresentationRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -73561,7 +79639,7 @@]},"data": {- "$ref": "#/$defs/WPSPresentationData"+ "$ref": "#/$defs/CheckSnapshotData"},"msg": {"type": "string"@@ -73599,9 +79677,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/WPSPresentationData"}]},@@ -73621,12 +79696,11 @@},{"method": "POST",- "path": "/api/network/echo",- "handler": "echo",- "body": "raw",+ "path": "/api/repo/checkoutRepo",+ "handler": "checkoutRepo",+ "body": "json","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/CheckoutRepoRequestInput"},"response": {"anyOf": [@@ -73640,7 +79714,7 @@]},"data": {- "$ref": "#/$defs/NetworkEchoData"+ "type": "null"},"msg": {"type": "string"@@ -73697,12 +79771,11 @@},{"method": "POST",- "path": "/api/network/echo/*path",- "handler": "echoPath",- "body": "raw",+ "path": "/api/repo/createSnapshot",+ "handler": "createSnapshot",+ "body": "json","request": {- "type": "string",- "format": "binary"+ "$ref": "#/$defs/CreateSnapshotRequestInput"},"response": {"anyOf": [@@ -73716,7 +79789,7 @@]},"data": {- "$ref": "#/$defs/NetworkEchoData"+ "$ref": "#/$defs/CreateSnapshotData"},"msg": {"type": "string"@@ -73773,11 +79846,11 @@},{"method": "POST",- "path": "/api/network/forwardProxy",- "handler": "forwardProxy",+ "path": "/api/repo/diffRepoSnapshots",+ "handler": "diffRepoSnapshots","body": "json","request": {- "$ref": "#/$defs/NetworkForwardRequestInput"+ "$ref": "#/$defs/DiffRepoSnapshotsRequestInput"},"response": {"anyOf": [@@ -73791,7 +79864,7 @@]},"data": {- "$ref": "#/$defs/NetworkForwardData"+ "$ref": "#/$defs/RepoDiffData"},"msg": {"type": "string"@@ -73804,72 +79877,6 @@],"additionalProperties": false},- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1,- 1,- 2,- 3,- 4,- 5,- 6,- 7,- 8,- 10- ]- },- "data": {- "anyOf": [- {- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false- },- {- "type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/network/proxy",- "handler": "httpProxy",- "body": "raw",- "request": {- "type": "string",- "format": "binary"- },- "response": {- "anyOf": [- {- "type": "string",- "format": "binary"- },{"type": "object","properties": {@@ -73910,21 +79917,15 @@"additionalProperties": true}]- },- "output": "proxy",- "proxy": {- "kind": "http",- "contentType": "application/octet-stream",- "upstreamStatuses": true}},{"method": "POST",- "path": "/api/notebook/changeMasterPassword",- "handler": "changeMasterPassword",+ "path": "/api/repo/downloadCloudSnapshot",+ "handler": "downloadCloudSnapshot","body": "json","request": {- "$ref": "#/$defs/ChangeMasterPasswordRequestInput"+ "$ref": "#/$defs/DownloadCloudSnapshotRequestInput"},"response": {"anyOf": [@@ -73995,11 +79996,11 @@},{"method": "POST",- "path": "/api/notebook/changeSortNotebook",- "handler": "changeSortNotebook",+ "path": "/api/repo/exportRepoFile",+ "handler": "exportRepoFile","body": "json","request": {- "$ref": "#/$defs/ChangeSortNotebookRequestInput"+ "$ref": "#/$defs/ExportRepoFileRequestInput"},"response": {"anyOf": [@@ -74013,7 +80014,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/RepoExportData"},"msg": {"type": "string"@@ -74070,11 +80071,11 @@},{"method": "POST",- "path": "/api/notebook/closeNotebook",- "handler": "closeNotebook",+ "path": "/api/repo/getCloudRepoSnapshots",+ "handler": "getCloudRepoSnapshots","body": "json","request": {- "$ref": "#/$defs/CloseNotebookRequestInput"+ "$ref": "#/$defs/GetCloudRepoSnapshotsRequestInput"},"response": {"anyOf": [@@ -74088,7 +80089,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/RepoCloudSnapshotsData"},"msg": {"type": "string"@@ -74145,11 +80146,11 @@},{"method": "POST",- "path": "/api/notebook/createEncryptedNotebook",- "handler": "createEncryptedNotebook",- "body": "json",+ "path": "/api/repo/getCloudRepoTagSnapshots",+ "handler": "getCloudRepoTagSnapshots",+ "body": "none","request": {- "$ref": "#/$defs/CreateEncryptedNotebookRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -74163,7 +80164,7 @@]},"data": {- "$ref": "#/$defs/CreateNotebookData"+ "$ref": "#/$defs/RepoCloudTagsData"},"msg": {"type": "string"@@ -74220,86 +80221,11 @@},{"method": "POST",- "path": "/api/notebook/createNotebook",- "handler": "createNotebook",+ "path": "/api/repo/getRepoDocHistory",+ "handler": "getRepoDocHistory","body": "json","request": {- "$ref": "#/$defs/CreateNotebookRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/CreateNotebookData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },- "data": {- "anyOf": [- {- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false- },- {- "type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/notebook/disableEncryptedNotebooks",- "handler": "disableEncryptedNotebooks",- "body": "none",- "request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetRepoDocHistoryRequestInput"},"response": {"anyOf": [@@ -74313,7 +80239,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/RepoDocHistoryData"},"msg": {"type": "string"@@ -74370,36 +80296,17 @@},{"method": "POST",- "path": "/api/notebook/enableEncryptedNotebooks",- "handler": "enableEncryptedNotebooks",+ "path": "/api/repo/getRepoFile",+ "handler": "getRepoFile","body": "json","request": {- "$ref": "#/$defs/NotebookPasswordRequestInput"+ "$ref": "#/$defs/GetRepoFileRequestInput"},"response": {"anyOf": [{- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "type": "null"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false+ "type": "string",+ "format": "binary"},{"type": "object",@@ -74441,15 +80348,17 @@"additionalProperties": true}]- }+ },+ "output": "binary",+ "errorStatus": 200},{"method": "POST",- "path": "/api/notebook/exportNotebookCryptoBackup",- "handler": "exportNotebookCryptoBackup",- "body": "none",+ "path": "/api/repo/getRepoSnapshots",+ "handler": "getRepoSnapshots",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetRepoSnapshotsRequestInput"},"response": {"anyOf": [@@ -74463,7 +80372,7 @@]},"data": {- "$ref": "#/$defs/NotebookCryptoBackupData"+ "$ref": "#/$defs/RepoSnapshotsData"},"msg": {"type": "string"@@ -74520,8 +80429,8 @@},{"method": "POST",- "path": "/api/notebook/getEncryptedNotebookStatus",- "handler": "getEncryptedNotebookStatus",+ "path": "/api/repo/getRepoTagSnapshots",+ "handler": "getRepoTagSnapshots","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -74538,7 +80447,7 @@]},"data": {- "$ref": "#/$defs/EncryptedNotebookStatusData"+ "$ref": "#/$defs/RepoTagsData"},"msg": {"type": "string"@@ -74595,11 +80504,11 @@},{"method": "POST",- "path": "/api/notebook/getNotebookConf",- "handler": "getNotebookConf",+ "path": "/api/repo/importRepoKey",+ "handler": "importRepoKey","body": "json","request": {- "$ref": "#/$defs/CloseNotebookRequestInput"+ "$ref": "#/$defs/ImportRepoKeyRequestInput"},"response": {"anyOf": [@@ -74613,7 +80522,7 @@]},"data": {- "$ref": "#/$defs/NotebookConfData"+ "$ref": "#/$defs/RepoKeyData"},"msg": {"type": "string"@@ -74670,11 +80579,11 @@},{"method": "POST",- "path": "/api/notebook/getNotebookInfo",- "handler": "getNotebookInfo",- "body": "json",+ "path": "/api/repo/initRepoKey",+ "handler": "initRepoKey",+ "body": "none","request": {- "$ref": "#/$defs/NotebookIDRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -74688,7 +80597,7 @@]},"data": {- "$ref": "#/$defs/NotebookInfoData"+ "$ref": "#/$defs/RepoKeyData"},"msg": {"type": "string"@@ -74745,11 +80654,11 @@},{"method": "POST",- "path": "/api/notebook/importNotebookCryptoBackup",- "handler": "importNotebookCryptoBackup",- "body": "multipart",+ "path": "/api/repo/initRepoKeyFromPassphrase",+ "handler": "initRepoKeyFromPassphrase",+ "body": "json","request": {- "$ref": "#/$defs/ImportNotebookCryptoBackupRequestInput"+ "$ref": "#/$defs/InitRepoKeyFromPassphraseRequestInput"},"response": {"anyOf": [@@ -74763,7 +80672,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/RepoKeyData"},"msg": {"type": "string"@@ -74820,11 +80729,11 @@},{"method": "POST",- "path": "/api/notebook/lockNotebook",- "handler": "lockNotebook",+ "path": "/api/repo/openRepoSnapshotFile",+ "handler": "openRepoSnapshotFile","body": "json","request": {- "$ref": "#/$defs/NotebookIDRequestInput"+ "$ref": "#/$defs/OpenRepoSnapshotFileRequestInput"},"response": {"anyOf": [@@ -74838,7 +80747,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/RepoOpenFileData"},"msg": {"type": "string"@@ -74895,11 +80804,11 @@},{"method": "POST",- "path": "/api/notebook/lsNotebooks",- "handler": "lsNotebooks",- "body": "legacyOptional",+ "path": "/api/repo/purgeCloudRepo",+ "handler": "purgeCloudRepo",+ "body": "none","request": {- "$ref": "#/$defs/ListNotebooksRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -74913,14 +80822,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/ListNotebooksData"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -74977,11 +80879,11 @@},{"method": "POST",- "path": "/api/notebook/openNotebook",- "handler": "openNotebook",- "body": "json",+ "path": "/api/repo/purgeRepo",+ "handler": "purgeRepo",+ "body": "none","request": {- "$ref": "#/$defs/OpenNotebookRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -75052,11 +80954,11 @@},{"method": "POST",- "path": "/api/notebook/removeNotebook",- "handler": "removeNotebook",+ "path": "/api/repo/removeCloudRepoTagSnapshot",+ "handler": "removeCloudRepoTagSnapshot","body": "json","request": {- "$ref": "#/$defs/NotebookIDRequestInput"+ "$ref": "#/$defs/RemoveCloudRepoTagSnapshotRequestInput"},"response": {"anyOf": [@@ -75127,11 +81029,11 @@},{"method": "POST",- "path": "/api/notebook/renameNotebook",- "handler": "renameNotebook",+ "path": "/api/repo/removeRepoTagSnapshot",+ "handler": "removeRepoTagSnapshot","body": "json","request": {- "$ref": "#/$defs/RenameNotebookRequestInput"+ "$ref": "#/$defs/RemoveRepoTagSnapshotRequestInput"},"response": {"anyOf": [@@ -75202,11 +81104,11 @@},{"method": "POST",- "path": "/api/notebook/reorder",- "handler": "reorderNotebooks",- "body": "structJSON",+ "path": "/api/repo/resetRepo",+ "handler": "resetRepo",+ "body": "none","request": {- "$ref": "#/$defs/ReorderNotebooksRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -75219,10 +81121,42 @@0]},+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },"data": {"anyOf": [{- "$ref": "#/$defs/ReorderData"+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -75238,6 +81172,42 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/repo/rollbackRepoSnapshotFile",+ "handler": "rollbackRepoSnapshotFile",+ "body": "json",+ "request": {+ "$ref": "#/$defs/RollbackRepoSnapshotFileRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -75265,16 +81235,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/ReorderData"- },- {- "type": "null"- }- ]}]},@@ -75294,11 +81254,11 @@},{"method": "POST",- "path": "/api/notebook/setNotebookConf",- "handler": "setNotebookConf",+ "path": "/api/repo/searchRepoFile",+ "handler": "searchRepoFile","body": "json","request": {- "$ref": "#/$defs/SetNotebookConfRequestInput"+ "$ref": "#/$defs/SearchRepoFileRequestInput"},"response": {"anyOf": [@@ -75311,10 +81271,42 @@0]},+ "data": {+ "$ref": "#/$defs/RepoSearchData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },"data": {"anyOf": [{- "$ref": "#/$defs/NotebookConf"+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -75330,6 +81322,42 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/repo/setRepoIndexRetentionDays",+ "handler": "setRepoIndexRetentionDays",+ "body": "json",+ "request": {+ "$ref": "#/$defs/SetRepoIndexRetentionDaysRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -75376,11 +81404,11 @@},{"method": "POST",- "path": "/api/notebook/setNotebookCryptoAutoLock",- "handler": "setNotebookCryptoAutoLock",+ "path": "/api/repo/setRetentionIndexesDaily",+ "handler": "setRetentionIndexesDaily","body": "json","request": {- "$ref": "#/$defs/NotebookCryptoAutoLockRequestInput"+ "$ref": "#/$defs/SetRetentionIndexesDailyRequestInput"},"response": {"anyOf": [@@ -75451,11 +81479,11 @@},{"method": "POST",- "path": "/api/notebook/setNotebookIcon",- "handler": "setNotebookIcon",+ "path": "/api/repo/setSnapshotMemo",+ "handler": "setSnapshotMemo","body": "json","request": {- "$ref": "#/$defs/SetNotebookIconRequestInput"+ "$ref": "#/$defs/SetSnapshotMemoRequestInput"},"response": {"anyOf": [@@ -75526,11 +81554,11 @@},{"method": "POST",- "path": "/api/notebook/touchEncryptedNotebooks",- "handler": "touchEncryptedNotebooks",- "body": "none",+ "path": "/api/repo/tagSnapshot",+ "handler": "tagSnapshot",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/TagSnapshotRequestInput"},"response": {"anyOf": [@@ -75601,11 +81629,11 @@},{"method": "POST",- "path": "/api/notebook/unlockAndOpenNotebook",- "handler": "unlockAndOpenNotebook",+ "path": "/api/repo/uploadCloudSnapshot",+ "handler": "uploadCloudSnapshot","body": "json","request": {- "$ref": "#/$defs/UnlockNotebookRequestInput"+ "$ref": "#/$defs/UploadCloudSnapshotRequestInput"},"response": {"anyOf": [@@ -75676,11 +81704,11 @@},{"method": "POST",- "path": "/api/notebook/unlockNotebook",- "handler": "unlockNotebook",+ "path": "/api/riff/addRiffCards",+ "handler": "addRiffCards","body": "json","request": {- "$ref": "#/$defs/UnlockNotebookRequestInput"+ "$ref": "#/$defs/RiffDeckCardsRequestInput"},"response": {"anyOf": [@@ -75694,7 +81722,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/RiffDeck"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -75751,11 +81786,11 @@},{"method": "POST",- "path": "/api/notification/pushErrMsg",- "handler": "pushErrMsg",+ "path": "/api/riff/batchSetRiffCardsDueTime",+ "handler": "batchSetRiffCardsDueTime","body": "json","request": {- "$ref": "#/$defs/NotificationRequestInput"+ "$ref": "#/$defs/SetRiffCardsDueRequestInput"},"response": {"anyOf": [@@ -75769,7 +81804,7 @@]},"data": {- "$ref": "#/$defs/NotificationData"+ "type": "null"},"msg": {"type": "string"@@ -75826,11 +81861,11 @@},{"method": "POST",- "path": "/api/notification/pushMsg",- "handler": "pushMsg",+ "path": "/api/riff/createRiffDeck",+ "handler": "createRiffDeck","body": "json","request": {- "$ref": "#/$defs/NotificationRequestInput"+ "$ref": "#/$defs/CreateRiffDeckRequestInput"},"response": {"anyOf": [@@ -75844,7 +81879,14 @@]},"data": {- "$ref": "#/$defs/NotificationData"+ "anyOf": [+ {+ "$ref": "#/$defs/RiffDeck"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -75901,11 +81943,11 @@},{"method": "POST",- "path": "/api/outline/getDocHeadingNumbers",- "handler": "getDocHeadingNumbers",+ "path": "/api/riff/getNotebookRiffCards",+ "handler": "getNotebookRiffCards","body": "json","request": {- "$ref": "#/$defs/HeadingNumbersRequestInput"+ "$ref": "#/$defs/RiffCardsRequestInput"},"response": {"anyOf": [@@ -75918,13 +81960,42 @@0]},+ "data": {+ "$ref": "#/$defs/RiffCardsData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },"data": {"anyOf": [{"type": "object",- "additionalProperties": {- "type": "string"- }+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -75940,6 +82011,42 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/riff/getNotebookRiffDueCards",+ "handler": "getNotebookRiffDueCards",+ "body": "json",+ "request": {+ "$ref": "#/$defs/RiffNotebookDueCardsRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/RiffDueCardsData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -75948,8 +82055,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -75987,11 +82093,11 @@},{"method": "POST",- "path": "/api/outline/getDocOutline",- "handler": "getDocOutline",+ "path": "/api/riff/getRiffCards",+ "handler": "getRiffCards","body": "json","request": {- "$ref": "#/$defs/OutlineRequestInput"+ "$ref": "#/$defs/RiffCardsRequestInput"},"response": {"anyOf": [@@ -76005,24 +82111,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/SearchPath"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/RiffCardsData"},"msg": {"type": "string"@@ -76041,8 +82130,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -76080,11 +82168,11 @@},{"method": "POST",- "path": "/api/petal/loadPetals",- "handler": "loadPetals",+ "path": "/api/riff/getRiffCardsByBlockIDs",+ "handler": "getRiffCardsByBlockIDs","body": "json","request": {- "$ref": "#/$defs/LoadPetalsRequestInput"+ "$ref": "#/$defs/RiffBlockIDsRequestInput"},"response": {"anyOf": [@@ -76097,20 +82185,42 @@0]},+ "data": {+ "$ref": "#/$defs/RiffBlocksData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },"data": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/Petal"- },- {- "type": "null"- }- ]- }+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -76126,6 +82236,52 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/riff/getRiffDecks",+ "handler": "getRiffDecks",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/RiffDeck"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -76172,11 +82328,11 @@},{"method": "POST",- "path": "/api/petal/setPetalEnabled",- "handler": "setPetalEnabled",+ "path": "/api/riff/getRiffDueCards",+ "handler": "getRiffDueCards","body": "json","request": {- "$ref": "#/$defs/SetPetalEnabledRequestInput"+ "$ref": "#/$defs/RiffDueCardsRequestInput"},"response": {"anyOf": [@@ -76190,14 +82346,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/Petal"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/RiffDueCardsData"},"msg": {"type": "string"@@ -76254,11 +82403,11 @@},{"method": "POST",- "path": "/api/petal/setPetalPublishEnabled",- "handler": "setPetalPublishEnabled",+ "path": "/api/riff/getTreeRiffCards",+ "handler": "getTreeRiffCards","body": "json","request": {- "$ref": "#/$defs/SetPetalPublishEnabledRequestInput"+ "$ref": "#/$defs/RiffCardsRequestInput"},"response": {"anyOf": [@@ -76272,14 +82421,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/Petal"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/RiffCardsData"},"msg": {"type": "string"@@ -76336,11 +82478,11 @@},{"method": "POST",- "path": "/api/plugin/getLoadedPlugin",- "handler": "getLoadedPlugin",+ "path": "/api/riff/getTreeRiffDueCards",+ "handler": "getTreeRiffDueCards","body": "json","request": {- "$ref": "#/$defs/LoadedPluginRequestInput"+ "$ref": "#/$defs/RiffTreeDueCardsRequestInput"},"response": {"anyOf": [@@ -76354,14 +82496,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/LoadedPlugin"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/RiffDueCardsData"},"msg": {"type": "string"@@ -76380,11 +82515,7 @@"code": {"type": "integer","enum": [- -1,- 1,- 2,- 3,- 4+ -1]},"data": {@@ -76422,11 +82553,11 @@},{"method": "POST",- "path": "/api/plugin/listLoadedPlugins",- "handler": "listLoadedPlugins",- "body": "none",+ "path": "/api/riff/removeRiffCards",+ "handler": "removeRiffCards",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/RiffDeckCardsRequestInput"},"response": {"anyOf": [@@ -76442,17 +82573,7 @@"data": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/LoadedPlugin"- },- {- "type": "null"- }- ]- }+ "$ref": "#/$defs/RiffDeck"},{"type": "null"@@ -76514,52 +82635,36 @@},{"method": "POST",- "path": "/api/plugin/rpc",- "handler": "pluginJsonRpcHttp",+ "path": "/api/riff/removeRiffDeck",+ "handler": "removeRiffDeck","body": "json","request": {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCRequestFieldsInput"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/PluginRPCRequestFieldsInput"- },- "minItems": 1- }- ]+ "$ref": "#/$defs/RiffDeckRequestInput"},"response": {"anyOf": [{- "anyOf": [- {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCSuccess"- },- {- "$ref": "#/$defs/PluginRPCFailure"- }+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0]},- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCSuccess"- },- {- "$ref": "#/$defs/PluginRPCFailure"- }- ]- },- "minItems": 1+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"}- ]+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -76601,58 +82706,40 @@"additionalProperties": true}]- },- "output": "directJSON",- "noContent": true+ }},{"method": "POST",- "path": "/api/plugin/rpc/:name",- "handler": "pluginJsonRpcHttpByName",+ "path": "/api/riff/renameRiffDeck",+ "handler": "renameRiffDeck","body": "json","request": {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCRequestFieldsInput"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/PluginRPCRequestFieldsInput"- },- "minItems": 1- }- ]+ "$ref": "#/$defs/RenameRiffDeckRequestInput"},"response": {"anyOf": [{- "anyOf": [- {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCSuccess"- },- {- "$ref": "#/$defs/PluginRPCFailure"- }+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0]},- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCSuccess"- },- {- "$ref": "#/$defs/PluginRPCFailure"- }- ]- },- "minItems": 1+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"}- ]+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -76694,17 +82781,15 @@"additionalProperties": true}]- },- "output": "directJSON",- "noContent": true+ }},{"method": "POST",- "path": "/api/query/sql",- "handler": "SQL",+ "path": "/api/riff/resetRiffCards",+ "handler": "resetRiffCards","body": "json","request": {- "$ref": "#/$defs/SQLQueryRequestInput"+ "$ref": "#/$defs/ResetRiffCardsRequestInput"},"response": {"anyOf": [@@ -76718,50 +82803,16 @@]},"data": {- "type": "array",- "items": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "anyOf": [- {- "type": "null"- },- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- }- },- {- "type": "null"- }- ]- }- },- "limit": {- "type": "integer"+ "type": "null"},"msg": {"type": "string"- },- "truncated": {- "type": "boolean"}},"required": ["code","msg",- "data",- "limit",- "truncated"+ "data"],"additionalProperties": false},@@ -76771,8 +82822,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -76810,11 +82860,11 @@},{"method": "POST",- "path": "/api/ref/getBacklink2",- "handler": "getBacklink2",+ "path": "/api/riff/reviewRiffCard",+ "handler": "reviewRiffCard","body": "json","request": {- "$ref": "#/$defs/BacklinkListRequestInput"+ "$ref": "#/$defs/ReviewRiffCardRequestInput"},"response": {"anyOf": [@@ -76828,17 +82878,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/BacklinkList"- },- {- "$ref": "#/$defs/BacklinkRefDefs"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -76857,8 +82897,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -76877,19 +82916,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/BacklinkList"- },- {- "$ref": "#/$defs/BacklinkRefDefs"- },- {- "type": "null"- }- ]}]},@@ -76909,11 +82935,11 @@},{"method": "POST",- "path": "/api/ref/getBacklinkDoc",- "handler": "getBacklinkDoc",+ "path": "/api/riff/skipReviewRiffCard",+ "handler": "skipReviewRiffCard","body": "json","request": {- "$ref": "#/$defs/BacklinkDocumentRequestInput"+ "$ref": "#/$defs/RiffCardRequestInput"},"response": {"anyOf": [@@ -76927,7 +82953,7 @@]},"data": {- "$ref": "#/$defs/BacklinkContextData"+ "type": "null"},"msg": {"type": "string"@@ -76946,8 +82972,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -76985,11 +83010,11 @@},{"method": "POST",- "path": "/api/ref/getBackmentionDoc",- "handler": "getBackmentionDoc",+ "path": "/api/search/findReplace",+ "handler": "findReplace","body": "json","request": {- "$ref": "#/$defs/BackmentionDocumentRequestInput"+ "$ref": "#/$defs/FindReplaceRequestInput"},"response": {"anyOf": [@@ -77003,7 +83028,7 @@]},"data": {- "$ref": "#/$defs/BacklinkContextData"+ "type": "null"},"msg": {"type": "string"@@ -77061,11 +83086,11 @@},{"method": "POST",- "path": "/api/ref/refreshBacklink",- "handler": "refreshBacklink",+ "path": "/api/search/fullTextSearchAssetContent",+ "handler": "fullTextSearchAssetContent","body": "json","request": {- "$ref": "#/$defs/RefreshBacklinkRequestInput"+ "$ref": "#/$defs/SearchAssetContentRequestInput"},"response": {"anyOf": [@@ -77079,7 +83104,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SearchAssetContentData"},"msg": {"type": "string"@@ -77136,11 +83161,11 @@},{"method": "POST",- "path": "/api/repo/checkSnapshot",- "handler": "checkSnapshot",- "body": "none",+ "path": "/api/search/fullTextSearchBlock",+ "handler": "fullTextSearchBlock",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/FullTextSearchBlockRequestInput"},"response": {"anyOf": [@@ -77154,7 +83179,14 @@]},"data": {- "$ref": "#/$defs/CheckSnapshotData"+ "anyOf": [+ {+ "$ref": "#/$defs/FullTextSearchBlockData"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -77211,11 +83243,11 @@},{"method": "POST",- "path": "/api/repo/checkoutRepo",- "handler": "checkoutRepo",+ "path": "/api/search/getAssetContent",+ "handler": "getAssetContent","body": "json","request": {- "$ref": "#/$defs/CheckoutRepoRequestInput"+ "$ref": "#/$defs/AssetContentRequestInput"},"response": {"anyOf": [@@ -77229,7 +83261,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/AssetContentData"},"msg": {"type": "string"@@ -77286,11 +83318,11 @@},{"method": "POST",- "path": "/api/repo/createSnapshot",- "handler": "createSnapshot",+ "path": "/api/search/getAssetContentByPath",+ "handler": "getAssetContentByPath","body": "json","request": {- "$ref": "#/$defs/CreateSnapshotRequestInput"+ "$ref": "#/$defs/SearchPathRequestInput"},"response": {"anyOf": [@@ -77304,7 +83336,7 @@]},"data": {- "$ref": "#/$defs/CreateSnapshotData"+ "$ref": "#/$defs/AssetContentData"},"msg": {"type": "string"@@ -77361,11 +83393,11 @@},{"method": "POST",- "path": "/api/repo/diffRepoSnapshots",- "handler": "diffRepoSnapshots",+ "path": "/api/search/getEmbedBlock",+ "handler": "getEmbedBlock","body": "json","request": {- "$ref": "#/$defs/DiffRepoSnapshotsRequestInput"+ "$ref": "#/$defs/GetEmbedBlockRequestInput"},"response": {"anyOf": [@@ -77379,7 +83411,7 @@]},"data": {- "$ref": "#/$defs/RepoDiffData"+ "$ref": "#/$defs/EmbedBlocksData"},"msg": {"type": "string"@@ -77436,11 +83468,11 @@},{"method": "POST",- "path": "/api/repo/downloadCloudSnapshot",- "handler": "downloadCloudSnapshot",+ "path": "/api/search/listInvalidBlockRefs",+ "handler": "listInvalidBlockRefs","body": "json","request": {- "$ref": "#/$defs/DownloadCloudSnapshotRequestInput"+ "$ref": "#/$defs/SearchPageRequestInput"},"response": {"anyOf": [@@ -77454,7 +83486,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SearchBlocksData"},"msg": {"type": "string"@@ -77511,11 +83543,11 @@},{"method": "POST",- "path": "/api/repo/exportRepoFile",- "handler": "exportRepoFile",+ "path": "/api/search/removeTemplate",+ "handler": "removeTemplate","body": "json","request": {- "$ref": "#/$defs/ExportRepoFileRequestInput"+ "$ref": "#/$defs/SearchPathRequestInput"},"response": {"anyOf": [@@ -77529,7 +83561,7 @@]},"data": {- "$ref": "#/$defs/RepoExportData"+ "type": "null"},"msg": {"type": "string"@@ -77586,11 +83618,11 @@},{"method": "POST",- "path": "/api/repo/getCloudRepoSnapshots",- "handler": "getCloudRepoSnapshots",+ "path": "/api/search/searchAsset",+ "handler": "searchAsset","body": "json","request": {- "$ref": "#/$defs/GetCloudRepoSnapshotsRequestInput"+ "$ref": "#/$defs/SearchAssetRequestInput"},"response": {"anyOf": [@@ -77603,42 +83635,20 @@0]},- "data": {- "$ref": "#/$defs/RepoCloudSnapshotsData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchAsset"+ },+ {+ "type": "null"+ }+ ]+ }},{"type": "null"@@ -77654,42 +83664,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/repo/getCloudRepoTagSnapshots",- "handler": "getCloudRepoTagSnapshots",- "body": "none",- "request": {- "$ref": "#/$defs/EmptyRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/RepoCloudTagsData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -77736,11 +83710,11 @@},{"method": "POST",- "path": "/api/repo/getRepoDocHistory",- "handler": "getRepoDocHistory",+ "path": "/api/search/searchEmbedBlock",+ "handler": "searchEmbedBlock","body": "json","request": {- "$ref": "#/$defs/GetRepoDocHistoryRequestInput"+ "$ref": "#/$defs/SearchEmbedBlockRequestInput"},"response": {"anyOf": [@@ -77754,7 +83728,7 @@]},"data": {- "$ref": "#/$defs/RepoDocHistoryData"+ "$ref": "#/$defs/EmbedBlocksData"},"msg": {"type": "string"@@ -77811,43 +83785,30 @@},{"method": "POST",- "path": "/api/repo/getRepoFile",- "handler": "getRepoFile",+ "path": "/api/search/searchRefBlock",+ "handler": "searchRefBlock","body": "json","request": {- "$ref": "#/$defs/GetRepoFileRequestInput"+ "$ref": "#/$defs/SearchRefBlockRequestInput"},"response": {"anyOf": [- {- "type": "string",- "format": "binary"- },{"type": "object","properties": {"code": {"type": "integer","enum": [- -1+ 0]},"data": {"anyOf": [{- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "$ref": "#/$defs/SearchRefResult"},{- "type": "null"+ "$ref": "#/$defs/SearchRefCorrelation"}]},@@ -77860,44 +83821,6 @@"msg","data"],- "additionalProperties": true- }- ]- },- "output": "binary",- "errorStatus": 200- },- {- "method": "POST",- "path": "/api/repo/getRepoSnapshots",- "handler": "getRepoSnapshots",- "body": "json",- "request": {- "$ref": "#/$defs/GetRepoSnapshotsRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/RepoSnapshotsData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -77925,6 +83848,16 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchRefResult"+ },+ {+ "$ref": "#/$defs/SearchRefCorrelation"+ }+ ]}]},@@ -77944,11 +83877,11 @@},{"method": "POST",- "path": "/api/repo/getRepoTagSnapshots",- "handler": "getRepoTagSnapshots",- "body": "none",+ "path": "/api/search/searchTag",+ "handler": "searchTag",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SearchTagRequestInput"},"response": {"anyOf": [@@ -77962,7 +83895,7 @@]},"data": {- "$ref": "#/$defs/RepoTagsData"+ "$ref": "#/$defs/SearchTagData"},"msg": {"type": "string"@@ -78019,11 +83952,11 @@},{"method": "POST",- "path": "/api/repo/importRepoKey",- "handler": "importRepoKey",+ "path": "/api/search/searchTemplate",+ "handler": "searchTemplate","body": "json","request": {- "$ref": "#/$defs/ImportRepoKeyRequestInput"+ "$ref": "#/$defs/SearchKeywordRequestInput"},"response": {"anyOf": [@@ -78037,7 +83970,7 @@]},"data": {- "$ref": "#/$defs/RepoKeyData"+ "$ref": "#/$defs/SearchTemplateData"},"msg": {"type": "string"@@ -78094,11 +84027,11 @@},{"method": "POST",- "path": "/api/repo/initRepoKey",- "handler": "initRepoKey",- "body": "none",+ "path": "/api/search/searchWidget",+ "handler": "searchWidget",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SearchKeywordRequestInput"},"response": {"anyOf": [@@ -78112,7 +84045,7 @@]},"data": {- "$ref": "#/$defs/RepoKeyData"+ "$ref": "#/$defs/SearchWidgetData"},"msg": {"type": "string"@@ -78169,11 +84102,11 @@},{"method": "POST",- "path": "/api/repo/initRepoKeyFromPassphrase",- "handler": "initRepoKeyFromPassphrase",+ "path": "/api/search/semanticSearchBlock",+ "handler": "semanticSearchBlock","body": "json","request": {- "$ref": "#/$defs/InitRepoKeyFromPassphraseRequestInput"+ "$ref": "#/$defs/SearchBlockRequestInput"},"response": {"anyOf": [@@ -78187,7 +84120,7 @@]},"data": {- "$ref": "#/$defs/RepoKeyData"+ "$ref": "#/$defs/SearchBlocksData"},"msg": {"type": "string"@@ -78244,11 +84177,11 @@},{"method": "POST",- "path": "/api/repo/openRepoSnapshotFile",- "handler": "openRepoSnapshotFile",+ "path": "/api/search/updateEmbedBlock",+ "handler": "updateEmbedBlock","body": "json","request": {- "$ref": "#/$defs/OpenRepoSnapshotFileRequestInput"+ "$ref": "#/$defs/UpdateEmbedBlockRequestInput"},"response": {"anyOf": [@@ -78262,7 +84195,7 @@]},"data": {- "$ref": "#/$defs/RepoOpenFileData"+ "type": "null"},"msg": {"type": "string"@@ -78319,11 +84252,11 @@},{"method": "POST",- "path": "/api/repo/purgeCloudRepo",- "handler": "purgeCloudRepo",- "body": "none",+ "path": "/api/setting/addVirtualBlockRefExclude",+ "handler": "addVirtualBlockRefExclude",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/VirtualBlockRefRequestInput"},"response": {"anyOf": [@@ -78394,11 +84327,11 @@},{"method": "POST",- "path": "/api/repo/purgeRepo",- "handler": "purgeRepo",- "body": "none",+ "path": "/api/setting/addVirtualBlockRefInclude",+ "handler": "addVirtualBlockRefInclude",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/VirtualBlockRefRequestInput"},"response": {"anyOf": [@@ -78469,11 +84402,11 @@},{"method": "POST",- "path": "/api/repo/removeCloudRepoTagSnapshot",- "handler": "removeCloudRepoTagSnapshot",- "body": "json",+ "path": "/api/setting/getBootAppearances",+ "handler": "getBootAppearances",+ "body": "none","request": {- "$ref": "#/$defs/RemoveCloudRepoTagSnapshotRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -78487,7 +84420,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SettingBootAppearancesData"},"msg": {"type": "string"@@ -78544,11 +84477,11 @@},{"method": "POST",- "path": "/api/repo/removeRepoTagSnapshot",- "handler": "removeRepoTagSnapshot",+ "path": "/api/setting/getCloudUser",+ "handler": "getCloudUser","body": "json","request": {- "$ref": "#/$defs/RemoveRepoTagSnapshotRequestInput"+ "$ref": "#/$defs/SettingCloudUserRequestInput"},"response": {"anyOf": [@@ -78562,7 +84495,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/SettingUser"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -78581,7 +84521,9 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1,+ 255]},"data": {@@ -78600,6 +84542,16 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/SettingUser"+ },+ {+ "type": "null"+ }+ ]}]},@@ -78619,8 +84571,8 @@},{"method": "POST",- "path": "/api/repo/resetRepo",- "handler": "resetRepo",+ "path": "/api/setting/getPandocBin",+ "handler": "getPandocBin","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -78637,7 +84589,7 @@]},"data": {- "type": "null"+ "type": "string"},"msg": {"type": "string"@@ -78694,11 +84646,11 @@},{"method": "POST",- "path": "/api/repo/rollbackRepoSnapshotFile",- "handler": "rollbackRepoSnapshotFile",- "body": "json",+ "path": "/api/setting/getPublish",+ "handler": "getPublish",+ "body": "none","request": {- "$ref": "#/$defs/RollbackRepoSnapshotFileRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -78712,7 +84664,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SettingPublishData"},"msg": {"type": "string"@@ -78769,11 +84721,67 @@},{"method": "POST",- "path": "/api/repo/searchRepoFile",- "handler": "searchRepoFile",+ "path": "/api/setting/login2faCloudUser",+ "handler": "login2faCloudUser","body": "json","request": {- "$ref": "#/$defs/SearchRepoFileRequestInput"+ "$ref": "#/$defs/SettingLogin2faRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "$ref": "#/$defs/Login2faEnvelope"+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "output": "directJSON"+ },+ {+ "method": "POST",+ "path": "/api/setting/logoutCloudUser",+ "handler": "logoutCloudUser",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -78787,7 +84795,7 @@]},"data": {- "$ref": "#/$defs/RepoSearchData"+ "type": "null"},"msg": {"type": "string"@@ -78844,11 +84852,11 @@},{"method": "POST",- "path": "/api/repo/setRepoIndexRetentionDays",- "handler": "setRepoIndexRetentionDays",- "body": "json",+ "path": "/api/setting/refreshVirtualBlockRef",+ "handler": "refreshVirtualBlockRef",+ "body": "none","request": {- "$ref": "#/$defs/SetRepoIndexRetentionDaysRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -78919,11 +84927,11 @@},{"method": "POST",- "path": "/api/repo/setRetentionIndexesDaily",- "handler": "setRetentionIndexesDaily",+ "path": "/api/setting/setAI",+ "handler": "setAI","body": "json","request": {- "$ref": "#/$defs/SetRetentionIndexesDailyRequestInput"+ "$ref": "#/$defs/SetAIRequestInput"},"response": {"anyOf": [@@ -78937,7 +84945,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/SettingAI"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -78994,11 +85009,11 @@},{"method": "POST",- "path": "/api/repo/setSnapshotMemo",- "handler": "setSnapshotMemo",+ "path": "/api/setting/setAppearance",+ "handler": "setAppearance","body": "json","request": {- "$ref": "#/$defs/SetSnapshotMemoRequestInput"+ "$ref": "#/$defs/SetAppearanceRequestInput"},"response": {"anyOf": [@@ -79012,7 +85027,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/SettingAppearance"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -79069,11 +85091,11 @@},{"method": "POST",- "path": "/api/repo/tagSnapshot",- "handler": "tagSnapshot",+ "path": "/api/setting/setBazaar",+ "handler": "setBazaar","body": "json","request": {- "$ref": "#/$defs/TagSnapshotRequestInput"+ "$ref": "#/$defs/SetBazaarRequestInput"},"response": {"anyOf": [@@ -79087,7 +85109,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/SettingBazaar"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -79144,11 +85173,11 @@},{"method": "POST",- "path": "/api/repo/uploadCloudSnapshot",- "handler": "uploadCloudSnapshot",+ "path": "/api/setting/setBazaarPetalDisabled",+ "handler": "setBazaarPetalDisabled","body": "json","request": {- "$ref": "#/$defs/UploadCloudSnapshotRequestInput"+ "$ref": "#/$defs/SettingPetalDisabledRequestInput"},"response": {"anyOf": [@@ -79162,7 +85191,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SettingPetalDisabledData"},"msg": {"type": "string"@@ -79219,11 +85248,11 @@},{"method": "POST",- "path": "/api/riff/addRiffCards",- "handler": "addRiffCards",+ "path": "/api/setting/setBootAppearance",+ "handler": "setBootAppearance","body": "json","request": {- "$ref": "#/$defs/RiffDeckCardsRequestInput"+ "$ref": "#/$defs/SettingBootAppearanceRequestInput"},"response": {"anyOf": [@@ -79239,7 +85268,7 @@"data": {"anyOf": [{- "$ref": "#/$defs/RiffDeck"+ "$ref": "#/$defs/SettingBootAppearanceSelection"},{"type": "null"@@ -79301,11 +85330,11 @@},{"method": "POST",- "path": "/api/riff/batchSetRiffCardsDueTime",- "handler": "batchSetRiffCardsDueTime",+ "path": "/api/setting/setEditor",+ "handler": "setEditor","body": "json","request": {- "$ref": "#/$defs/SetRiffCardsDueRequestInput"+ "$ref": "#/$defs/SetEditorRequestInput"},"response": {"anyOf": [@@ -79319,7 +85348,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/SettingEditor"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -79376,11 +85412,11 @@},{"method": "POST",- "path": "/api/riff/createRiffDeck",- "handler": "createRiffDeck",+ "path": "/api/setting/setEditorReadOnly",+ "handler": "setEditorReadOnly","body": "json","request": {- "$ref": "#/$defs/CreateRiffDeckRequestInput"+ "$ref": "#/$defs/EditorReadOnlyRequestInput"},"response": {"anyOf": [@@ -79394,14 +85430,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/RiffDeck"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -79458,11 +85487,11 @@},{"method": "POST",- "path": "/api/riff/getNotebookRiffCards",- "handler": "getNotebookRiffCards",+ "path": "/api/setting/setEmoji",+ "handler": "setEmoji","body": "json","request": {- "$ref": "#/$defs/RiffCardsRequestInput"+ "$ref": "#/$defs/SettingEmojiRequestInput"},"response": {"anyOf": [@@ -79476,7 +85505,7 @@]},"data": {- "$ref": "#/$defs/RiffCardsData"+ "type": "null"},"msg": {"type": "string"@@ -79533,11 +85562,11 @@},{"method": "POST",- "path": "/api/riff/getNotebookRiffDueCards",- "handler": "getNotebookRiffDueCards",+ "path": "/api/setting/setEntryVisibility",+ "handler": "setEntryVisibility","body": "json","request": {- "$ref": "#/$defs/RiffNotebookDueCardsRequestInput"+ "$ref": "#/$defs/SetEntryVisibilityRequestInput"},"response": {"anyOf": [@@ -79551,7 +85580,14 @@]},"data": {- "$ref": "#/$defs/RiffDueCardsData"+ "anyOf": [+ {+ "$ref": "#/$defs/SettingEntryVisibility"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -79608,11 +85644,11 @@},{"method": "POST",- "path": "/api/riff/getRiffCards",- "handler": "getRiffCards",+ "path": "/api/setting/setExport",+ "handler": "setExport","body": "json","request": {- "$ref": "#/$defs/RiffCardsRequestInput"+ "$ref": "#/$defs/SetExportRequestInput"},"response": {"anyOf": [@@ -79626,7 +85662,14 @@]},"data": {- "$ref": "#/$defs/RiffCardsData"+ "anyOf": [+ {+ "$ref": "#/$defs/SettingExport"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -79683,11 +85726,11 @@},{"method": "POST",- "path": "/api/riff/getRiffCardsByBlockIDs",- "handler": "getRiffCardsByBlockIDs",+ "path": "/api/setting/setFiletree",+ "handler": "setFiletree","body": "json","request": {- "$ref": "#/$defs/RiffBlockIDsRequestInput"+ "$ref": "#/$defs/SetFiletreeRequestInput"},"response": {"anyOf": [@@ -79701,7 +85744,14 @@]},"data": {- "$ref": "#/$defs/RiffBlocksData"+ "anyOf": [+ {+ "$ref": "#/$defs/SettingFileTree"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -79758,11 +85808,11 @@},{"method": "POST",- "path": "/api/riff/getRiffDecks",- "handler": "getRiffDecks",- "body": "none",+ "path": "/api/setting/setFlashcard",+ "handler": "setFlashcard",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SetFlashcardRequestInput"},"response": {"anyOf": [@@ -79776,17 +85826,89 @@]},"data": {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/RiffDeck"+ "anyOf": [+ {+ "$ref": "#/$defs/SettingFlashcard"+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }},- {- "type": "null"- }- ]- }+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/setting/setIcon",+ "handler": "setIcon",+ "body": "json",+ "request": {+ "$ref": "#/$defs/SettingIconRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"},"msg": {"type": "string"@@ -79843,11 +85965,11 @@},{"method": "POST",- "path": "/api/riff/getRiffDueCards",- "handler": "getRiffDueCards",+ "path": "/api/setting/setKeymap",+ "handler": "setKeymap","body": "json","request": {- "$ref": "#/$defs/RiffDueCardsRequestInput"+ "$ref": "#/$defs/SettingKeymapRequestInput"},"response": {"anyOf": [@@ -79861,7 +85983,7 @@]},"data": {- "$ref": "#/$defs/RiffDueCardsData"+ "type": "null"},"msg": {"type": "string"@@ -79918,11 +86040,11 @@},{"method": "POST",- "path": "/api/riff/getTreeRiffCards",- "handler": "getTreeRiffCards",+ "path": "/api/setting/setPublish",+ "handler": "setPublish","body": "json","request": {- "$ref": "#/$defs/RiffCardsRequestInput"+ "$ref": "#/$defs/SetPublishRequestInput"},"response": {"anyOf": [@@ -79936,7 +86058,7 @@]},"data": {- "$ref": "#/$defs/RiffCardsData"+ "$ref": "#/$defs/SettingPublishData"},"msg": {"type": "string"@@ -79993,11 +86115,11 @@},{"method": "POST",- "path": "/api/riff/getTreeRiffDueCards",- "handler": "getTreeRiffDueCards",+ "path": "/api/setting/setSearch",+ "handler": "setSearch","body": "json","request": {- "$ref": "#/$defs/RiffTreeDueCardsRequestInput"+ "$ref": "#/$defs/SetSearchRequestInput"},"response": {"anyOf": [@@ -80011,7 +86133,14 @@]},"data": {- "$ref": "#/$defs/RiffDueCardsData"+ "anyOf": [+ {+ "$ref": "#/$defs/SettingSearch"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -80068,11 +86197,11 @@},{"method": "POST",- "path": "/api/riff/removeRiffCards",- "handler": "removeRiffCards",+ "path": "/api/setting/setSecrets",+ "handler": "setSecrets","body": "json","request": {- "$ref": "#/$defs/RiffDeckCardsRequestInput"+ "$ref": "#/$defs/SetSecretsRequestInput"},"response": {"anyOf": [@@ -80088,7 +86217,7 @@"data": {"anyOf": [{- "$ref": "#/$defs/RiffDeck"+ "$ref": "#/$defs/SettingSecrets"},{"type": "null"@@ -80150,11 +86279,11 @@},{"method": "POST",- "path": "/api/riff/removeRiffDeck",- "handler": "removeRiffDeck",+ "path": "/api/setting/setSnippet",+ "handler": "setConfSnippet","body": "json","request": {- "$ref": "#/$defs/RiffDeckRequestInput"+ "$ref": "#/$defs/SetConfSnippetRequestInput"},"response": {"anyOf": [@@ -80168,7 +86297,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/SettingSnpt"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -80225,11 +86361,11 @@},{"method": "POST",- "path": "/api/riff/renameRiffDeck",- "handler": "renameRiffDeck",+ "path": "/api/setting/setTheme",+ "handler": "setTheme","body": "json","request": {- "$ref": "#/$defs/RenameRiffDeckRequestInput"+ "$ref": "#/$defs/SettingThemeRequestInput"},"response": {"anyOf": [@@ -80300,11 +86436,11 @@},{"method": "POST",- "path": "/api/riff/resetRiffCards",- "handler": "resetRiffCards",+ "path": "/api/setting/setVariables",+ "handler": "setVariables","body": "json","request": {- "$ref": "#/$defs/ResetRiffCardsRequestInput"+ "$ref": "#/$defs/SetVariablesRequestInput"},"response": {"anyOf": [@@ -80318,7 +86454,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/SettingVariables"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -80375,11 +86518,11 @@},{"method": "POST",- "path": "/api/riff/reviewRiffCard",- "handler": "reviewRiffCard",+ "path": "/api/snippet/getSnippet",+ "handler": "getSnippet","body": "json","request": {- "$ref": "#/$defs/ReviewRiffCardRequestInput"+ "$ref": "#/$defs/GetSnippetRequestInput"},"response": {"anyOf": [@@ -80393,7 +86536,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SnippetsData"},"msg": {"type": "string"@@ -80450,11 +86593,11 @@},{"method": "POST",- "path": "/api/riff/skipReviewRiffCard",- "handler": "skipReviewRiffCard",+ "path": "/api/snippet/removeSnippet",+ "handler": "removeSnippet","body": "json","request": {- "$ref": "#/$defs/RiffCardRequestInput"+ "$ref": "#/$defs/TrimmedIDRequestInput"},"response": {"anyOf": [@@ -80468,7 +86611,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/Snippet"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -80525,11 +86675,11 @@},{"method": "POST",- "path": "/api/search/findReplace",- "handler": "findReplace",+ "path": "/api/snippet/setSnippet",+ "handler": "setSnippet","body": "json","request": {- "$ref": "#/$defs/FindReplaceRequestInput"+ "$ref": "#/$defs/SetSnippetRequestInput"},"response": {"anyOf": [@@ -80562,8 +86712,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -80601,11 +86750,11 @@},{"method": "POST",- "path": "/api/search/fullTextSearchAssetContent",- "handler": "fullTextSearchAssetContent",- "body": "json",+ "path": "/api/sqlite/flushTransaction",+ "handler": "flushTransaction",+ "body": "none","request": {- "$ref": "#/$defs/SearchAssetContentRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -80619,7 +86768,7 @@]},"data": {- "$ref": "#/$defs/SearchAssetContentData"+ "type": "null"},"msg": {"type": "string"@@ -80676,11 +86825,11 @@},{"method": "POST",- "path": "/api/search/fullTextSearchBlock",- "handler": "fullTextSearchBlock",+ "path": "/api/storage/batchUpdateRecentDocCloseTime",+ "handler": "batchUpdateRecentDocCloseTime","body": "json","request": {- "$ref": "#/$defs/FullTextSearchBlockRequestInput"+ "$ref": "#/$defs/RecentDocsUpdateRequestInput"},"response": {"anyOf": [@@ -80694,14 +86843,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/FullTextSearchBlockData"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -80758,11 +86900,11 @@},{"method": "POST",- "path": "/api/search/getAssetContent",- "handler": "getAssetContent",- "body": "json",+ "path": "/api/storage/getCriteria",+ "handler": "getCriteria",+ "body": "none","request": {- "$ref": "#/$defs/AssetContentRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -80776,7 +86918,24 @@]},"data": {- "$ref": "#/$defs/AssetContentData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/Criterion"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -80833,11 +86992,11 @@},{"method": "POST",- "path": "/api/search/getAssetContentByPath",- "handler": "getAssetContentByPath",- "body": "json",+ "path": "/api/storage/getInlineStyles",+ "handler": "getInlineStyles",+ "body": "none","request": {- "$ref": "#/$defs/SearchPathRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -80851,7 +87010,14 @@]},"data": {- "$ref": "#/$defs/AssetContentData"+ "anyOf": [+ {+ "$ref": "#/$defs/InlineStyles"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -80908,11 +87074,11 @@},{"method": "POST",- "path": "/api/search/getEmbedBlock",- "handler": "getEmbedBlock",- "body": "json",+ "path": "/api/storage/getLocalStorage",+ "handler": "getLocalStorage",+ "body": "none","request": {- "$ref": "#/$defs/GetEmbedBlockRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -80925,42 +87091,13 @@0]},- "data": {- "$ref": "#/$defs/EmbedBlocksData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{"type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "additionalProperties": {+ "$ref": "#/$defs/JSONValue"+ }},{"type": "null"@@ -80976,42 +87113,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/search/listInvalidBlockRefs",- "handler": "listInvalidBlockRefs",- "body": "json",- "request": {- "$ref": "#/$defs/SearchPageRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/SearchBlocksData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -81058,11 +87159,11 @@},{"method": "POST",- "path": "/api/search/removeTemplate",- "handler": "removeTemplate",+ "path": "/api/storage/getLocalStorageVal",+ "handler": "getLocalStorageVal","body": "json","request": {- "$ref": "#/$defs/SearchPathRequestInput"+ "$ref": "#/$defs/StorageKeyRequestInput"},"response": {"anyOf": [@@ -81076,7 +87177,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/JSONValue"},"msg": {"type": "string"@@ -81133,11 +87234,11 @@},{"method": "POST",- "path": "/api/search/searchAsset",- "handler": "searchAsset",+ "path": "/api/storage/getLocalStorageVals",+ "handler": "getLocalStorageVals","body": "json","request": {- "$ref": "#/$defs/SearchAssetRequestInput"+ "$ref": "#/$defs/StorageKeysRequestInput"},"response": {"anyOf": [@@ -81153,16 +87254,9 @@"data": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/SearchAsset"- },- {- "type": "null"- }- ]+ "type": "object",+ "additionalProperties": {+ "$ref": "#/$defs/JSONValue"}},{@@ -81225,11 +87319,11 @@},{"method": "POST",- "path": "/api/search/searchEmbedBlock",- "handler": "searchEmbedBlock",+ "path": "/api/storage/getOutlineStorage",+ "handler": "getOutlineStorage","body": "json","request": {- "$ref": "#/$defs/SearchEmbedBlockRequestInput"+ "$ref": "#/$defs/OutlineStorageRequestInput"},"response": {"anyOf": [@@ -81242,42 +87336,13 @@0]},- "data": {- "$ref": "#/$defs/EmbedBlocksData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{"type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "additionalProperties": {+ "$ref": "#/$defs/JSONValue"+ }},{"type": "null"@@ -81293,49 +87358,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/search/searchRefBlock",- "handler": "searchRefBlock",- "body": "json",- "request": {- "$ref": "#/$defs/SearchRefBlockRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "anyOf": [- {- "$ref": "#/$defs/SearchRefResult"- },- {- "$ref": "#/$defs/SearchRefCorrelation"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -81363,16 +87385,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/SearchRefResult"- },- {- "$ref": "#/$defs/SearchRefCorrelation"- }- ]}]},@@ -81392,11 +87404,11 @@},{"method": "POST",- "path": "/api/search/searchTag",- "handler": "searchTag",- "body": "json",+ "path": "/api/storage/getRecentDocs",+ "handler": "getRecentDocs",+ "body": "legacyOptional","request": {- "$ref": "#/$defs/SearchTagRequestInput"+ "$ref": "#/$defs/RecentDocsRequestInput"},"response": {"anyOf": [@@ -81410,7 +87422,24 @@]},"data": {- "$ref": "#/$defs/SearchTagData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/RecentDoc"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -81467,11 +87496,11 @@},{"method": "POST",- "path": "/api/search/searchTemplate",- "handler": "searchTemplate",+ "path": "/api/storage/getViewState",+ "handler": "getViewState","body": "json","request": {- "$ref": "#/$defs/SearchKeywordRequestInput"+ "$ref": "#/$defs/StorageKeyRequestInput"},"response": {"anyOf": [@@ -81484,42 +87513,13 @@0]},- "data": {- "$ref": "#/$defs/SearchTemplateData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{"type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "additionalProperties": {+ "$ref": "#/$defs/JSONValue"+ }},{"type": "null"@@ -81535,42 +87535,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/search/searchWidget",- "handler": "searchWidget",- "body": "json",- "request": {- "$ref": "#/$defs/SearchKeywordRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/SearchWidgetData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -81617,11 +87581,11 @@},{"method": "POST",- "path": "/api/search/semanticSearchBlock",- "handler": "semanticSearchBlock",+ "path": "/api/storage/patchViewState",+ "handler": "patchViewState","body": "json","request": {- "$ref": "#/$defs/SearchBlockRequestInput"+ "$ref": "#/$defs/ViewStatePatchRequestInput"},"response": {"anyOf": [@@ -81635,7 +87599,17 @@]},"data": {- "$ref": "#/$defs/SearchBlocksData"+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "$ref": "#/$defs/JSONValue"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -81692,11 +87666,11 @@},{"method": "POST",- "path": "/api/search/updateEmbedBlock",- "handler": "updateEmbedBlock",+ "path": "/api/storage/removeCriterion",+ "handler": "removeCriterion","body": "json","request": {- "$ref": "#/$defs/UpdateEmbedBlockRequestInput"+ "$ref": "#/$defs/RemoveCriterionRequestInput"},"response": {"anyOf": [@@ -81767,11 +87741,11 @@},{"method": "POST",- "path": "/api/setting/addVirtualBlockRefExclude",- "handler": "addVirtualBlockRefExclude",+ "path": "/api/storage/removeLocalStorageVal",+ "handler": "removeLocalStorageVal","body": "json","request": {- "$ref": "#/$defs/VirtualBlockRefRequestInput"+ "$ref": "#/$defs/StorageRemoveRequestInput"},"response": {"anyOf": [@@ -81842,11 +87816,11 @@},{"method": "POST",- "path": "/api/setting/addVirtualBlockRefInclude",- "handler": "addVirtualBlockRefInclude",+ "path": "/api/storage/removeLocalStorageVals",+ "handler": "removeLocalStorageVals","body": "json","request": {- "$ref": "#/$defs/VirtualBlockRefRequestInput"+ "$ref": "#/$defs/StorageRemoveKeysRequestInput"},"response": {"anyOf": [@@ -81917,11 +87891,11 @@},{"method": "POST",- "path": "/api/setting/getBootAppearances",- "handler": "getBootAppearances",- "body": "none",+ "path": "/api/storage/removeOutlineStorage",+ "handler": "removeOutlineStorage",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/OutlineStorageRequestInput"},"response": {"anyOf": [@@ -81935,7 +87909,7 @@]},"data": {- "$ref": "#/$defs/SettingBootAppearancesData"+ "type": "null"},"msg": {"type": "string"@@ -81992,11 +87966,11 @@},{"method": "POST",- "path": "/api/setting/getCloudUser",- "handler": "getCloudUser",+ "path": "/api/storage/removeViewState",+ "handler": "removeViewState","body": "json","request": {- "$ref": "#/$defs/SettingCloudUserRequestInput"+ "$ref": "#/$defs/StorageKeyRequestInput"},"response": {"anyOf": [@@ -82010,14 +87984,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/SettingUser"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -82036,9 +88003,7 @@"code": {"type": "integer","enum": [- -1,- 1,- 255+ -1]},"data": {@@ -82057,16 +88022,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/SettingUser"- },- {- "type": "null"- }- ]}]},@@ -82086,11 +88041,11 @@},{"method": "POST",- "path": "/api/setting/getPandocBin",- "handler": "getPandocBin",- "body": "none",+ "path": "/api/storage/setCriterion",+ "handler": "setCriterion",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SetCriterionRequestInput"},"response": {"anyOf": [@@ -82104,7 +88059,7 @@]},"data": {- "type": "string"+ "type": "null"},"msg": {"type": "string"@@ -82161,11 +88116,11 @@},{"method": "POST",- "path": "/api/setting/getPublish",- "handler": "getPublish",- "body": "none",+ "path": "/api/storage/setInlineStyles",+ "handler": "setInlineStyles",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SetInlineStylesRequestInput"},"response": {"anyOf": [@@ -82178,42 +88133,10 @@0]},- "data": {- "$ref": "#/$defs/SettingPublishData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "$ref": "#/$defs/InlineStyles"},{"type": "null"@@ -82229,23 +88152,7 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/setting/login2faCloudUser",- "handler": "login2faCloudUser",- "body": "json",- "request": {- "$ref": "#/$defs/SettingLogin2faRequestInput"- },- "response": {- "anyOf": [- {- "$ref": "#/$defs/Login2faEnvelope"+ "additionalProperties": false},{"type": "object",@@ -82287,13 +88194,12 @@"additionalProperties": true}]- },- "output": "directJSON"+ }},{"method": "POST",- "path": "/api/setting/logoutCloudUser",- "handler": "logoutCloudUser",+ "path": "/api/storage/setLocalStorage",+ "handler": "setLocalStorage","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -82367,11 +88273,11 @@},{"method": "POST",- "path": "/api/setting/refreshVirtualBlockRef",- "handler": "refreshVirtualBlockRef",- "body": "none",+ "path": "/api/storage/setLocalStorageVal",+ "handler": "setLocalStorageVal",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/StorageSetRequestInput"},"response": {"anyOf": [@@ -82442,11 +88348,11 @@},{"method": "POST",- "path": "/api/setting/setAI",- "handler": "setAI",+ "path": "/api/storage/setLocalStorageVals",+ "handler": "setLocalStorageVals","body": "json","request": {- "$ref": "#/$defs/SetAIRequestInput"+ "$ref": "#/$defs/StorageSetKeysRequestInput"},"response": {"anyOf": [@@ -82460,14 +88366,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/SettingAI"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -82524,11 +88423,11 @@},{"method": "POST",- "path": "/api/setting/setAppearance",- "handler": "setAppearance",+ "path": "/api/storage/setOutlineStorage",+ "handler": "setOutlineStorage","body": "json","request": {- "$ref": "#/$defs/SetAppearanceRequestInput"+ "$ref": "#/$defs/OutlineStorageSetRequestInput"},"response": {"anyOf": [@@ -82542,14 +88441,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/SettingAppearance"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -82606,11 +88498,11 @@},{"method": "POST",- "path": "/api/setting/setBazaar",- "handler": "setBazaar",+ "path": "/api/storage/setWorkspaceAVPalette",+ "handler": "setWorkspaceAVPalette","body": "json","request": {- "$ref": "#/$defs/SetBazaarRequestInput"+ "$ref": "#/$defs/WorkspaceAVPaletteRequestInput"},"response": {"anyOf": [@@ -82626,46 +88518,7 @@"data": {"anyOf": [{- "$ref": "#/$defs/SettingBazaar"- },- {- "type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },- "data": {- "anyOf": [- {- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "$ref": "#/$defs/InlineStyles"},{"type": "null"@@ -82681,42 +88534,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/setting/setBazaarPetalDisabled",- "handler": "setBazaarPetalDisabled",- "body": "json",- "request": {- "$ref": "#/$defs/SettingPetalDisabledRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/SettingPetalDisabledData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -82763,11 +88580,11 @@},{"method": "POST",- "path": "/api/setting/setBootAppearance",- "handler": "setBootAppearance",+ "path": "/api/storage/updateRecentDocCloseTime",+ "handler": "updateRecentDocCloseTime","body": "json","request": {- "$ref": "#/$defs/SettingBootAppearanceRequestInput"+ "$ref": "#/$defs/RecentDocUpdateRequestInput"},"response": {"anyOf": [@@ -82781,14 +88598,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/SettingBootAppearanceSelection"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -82845,11 +88655,11 @@},{"method": "POST",- "path": "/api/setting/setEditor",- "handler": "setEditor",+ "path": "/api/storage/updateRecentDocOpenTime",+ "handler": "updateRecentDocOpenTime","body": "json","request": {- "$ref": "#/$defs/SetEditorRequestInput"+ "$ref": "#/$defs/RecentDocUpdateRequestInput"},"response": {"anyOf": [@@ -82863,14 +88673,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/SettingEditor"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -82927,11 +88730,11 @@},{"method": "POST",- "path": "/api/setting/setEditorReadOnly",- "handler": "setEditorReadOnly",+ "path": "/api/storage/updateRecentDocViewTime",+ "handler": "updateRecentDocViewTime","body": "json","request": {- "$ref": "#/$defs/EditorReadOnlyRequestInput"+ "$ref": "#/$defs/RecentDocUpdateRequestInput"},"response": {"anyOf": [@@ -83002,11 +88805,11 @@},{"method": "POST",- "path": "/api/setting/setEmoji",- "handler": "setEmoji",+ "path": "/api/sync/createCloudSyncDir",+ "handler": "createCloudSyncDir","body": "json","request": {- "$ref": "#/$defs/SettingEmojiRequestInput"+ "$ref": "#/$defs/SyncNameRequestInput"},"response": {"anyOf": [@@ -83077,11 +88880,11 @@},{"method": "POST",- "path": "/api/setting/setEntryVisibility",- "handler": "setEntryVisibility",- "body": "json",+ "path": "/api/sync/exportSyncProviderS3",+ "handler": "exportSyncProviderS3",+ "body": "none","request": {- "$ref": "#/$defs/SetEntryVisibilityRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -83095,14 +88898,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/SettingEntryVisibility"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/SyncProviderExportData"},"msg": {"type": "string"@@ -83159,11 +88955,11 @@},{"method": "POST",- "path": "/api/setting/setExport",- "handler": "setExport",- "body": "json",+ "path": "/api/sync/exportSyncProviderWebDAV",+ "handler": "exportSyncProviderWebDAV",+ "body": "none","request": {- "$ref": "#/$defs/SetExportRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -83177,14 +88973,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/SettingExport"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/SyncProviderExportData"},"msg": {"type": "string"@@ -83241,11 +89030,11 @@},{"method": "POST",- "path": "/api/setting/setFiletree",- "handler": "setFiletree",- "body": "json",+ "path": "/api/sync/getBootSync",+ "handler": "getBootSync",+ "body": "none","request": {- "$ref": "#/$defs/SetFiletreeRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -83259,14 +89048,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/SettingFileTree"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -83285,7 +89067,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -83323,11 +89106,11 @@},{"method": "POST",- "path": "/api/setting/setFlashcard",- "handler": "setFlashcard",- "body": "json",+ "path": "/api/sync/getSyncInfo",+ "handler": "getSyncInfo",+ "body": "none","request": {- "$ref": "#/$defs/SetFlashcardRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -83341,14 +89124,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/SettingFlashcard"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/SyncInfoData"},"msg": {"type": "string"@@ -83405,11 +89181,11 @@},{"method": "POST",- "path": "/api/setting/setIcon",- "handler": "setIcon",- "body": "json",+ "path": "/api/sync/getSyncLANStatus",+ "handler": "getSyncLANStatus",+ "body": "none","request": {- "$ref": "#/$defs/SettingIconRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -83423,7 +89199,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SyncLANStatus"},"msg": {"type": "string"@@ -83480,11 +89256,11 @@},{"method": "POST",- "path": "/api/setting/setKeymap",- "handler": "setKeymap",- "body": "json",+ "path": "/api/sync/importSyncProviderS3",+ "handler": "importSyncProviderS3",+ "body": "multipart","request": {- "$ref": "#/$defs/SettingKeymapRequestInput"+ "$ref": "#/$defs/SyncProviderImportRequestInput"},"response": {"anyOf": [@@ -83498,7 +89274,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SyncS3Data"},"msg": {"type": "string"@@ -83536,81 +89312,9 @@},{"type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/setting/setPublish",- "handler": "setPublish",- "body": "json",- "request": {- "$ref": "#/$defs/SetPublishRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/SettingPublishData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },- "data": {- "anyOf": [- {- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false},{- "type": "null"+ "$ref": "#/$defs/SyncS3Data"}]},@@ -83630,11 +89334,11 @@},{"method": "POST",- "path": "/api/setting/setSearch",- "handler": "setSearch",- "body": "json",+ "path": "/api/sync/importSyncProviderWebDAV",+ "handler": "importSyncProviderWebDAV",+ "body": "multipart","request": {- "$ref": "#/$defs/SetSearchRequestInput"+ "$ref": "#/$defs/SyncProviderImportRequestInput"},"response": {"anyOf": [@@ -83648,14 +89352,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/SettingSearch"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/SyncWebDAVData"},"msg": {"type": "string"@@ -83693,88 +89390,9 @@},{"type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/setting/setSecrets",- "handler": "setSecrets",- "body": "json",- "request": {- "$ref": "#/$defs/SetSecretsRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "anyOf": [- {- "$ref": "#/$defs/SettingSecrets"- },- {- "type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },- "data": {- "anyOf": [- {- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false},{- "type": "null"+ "$ref": "#/$defs/SyncWebDAVData"}]},@@ -83794,11 +89412,11 @@},{"method": "POST",- "path": "/api/setting/setSnippet",- "handler": "setConfSnippet",- "body": "json",+ "path": "/api/sync/listCloudSyncDir",+ "handler": "listCloudSyncDir",+ "body": "none","request": {- "$ref": "#/$defs/SetConfSnippetRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -83812,14 +89430,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/SettingSnpt"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/CloudSyncDirsData"},"msg": {"type": "string"@@ -83838,7 +89449,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -83876,11 +89488,11 @@},{"method": "POST",- "path": "/api/setting/setTheme",- "handler": "setTheme",- "body": "json",+ "path": "/api/sync/performBootSync",+ "handler": "performBootSync",+ "body": "none","request": {- "$ref": "#/$defs/SettingThemeRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -83913,7 +89525,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -83951,11 +89564,11 @@},{"method": "POST",- "path": "/api/setting/setVariables",- "handler": "setVariables",+ "path": "/api/sync/performSync",+ "handler": "performSync","body": "json","request": {- "$ref": "#/$defs/SetVariablesRequestInput"+ "$ref": "#/$defs/PerformSyncRequestInput"},"response": {"anyOf": [@@ -83969,14 +89582,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/SettingVariables"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -84033,11 +89639,11 @@},{"method": "POST",- "path": "/api/snippet/getSnippet",- "handler": "getSnippet",+ "path": "/api/sync/removeCloudSyncDir",+ "handler": "removeCloudSyncDir","body": "json","request": {- "$ref": "#/$defs/GetSnippetRequestInput"+ "$ref": "#/$defs/SyncNameRequestInput"},"response": {"anyOf": [@@ -84051,7 +89657,7 @@]},"data": {- "$ref": "#/$defs/SnippetsData"+ "type": "string"},"msg": {"type": "string"@@ -84108,11 +89714,11 @@},{"method": "POST",- "path": "/api/snippet/removeSnippet",- "handler": "removeSnippet",+ "path": "/api/sync/setCloudSyncDir",+ "handler": "setCloudSyncDir","body": "json","request": {- "$ref": "#/$defs/TrimmedIDRequestInput"+ "$ref": "#/$defs/SyncNameRequestInput"},"response": {"anyOf": [@@ -84126,14 +89732,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/Snippet"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -84190,11 +89789,11 @@},{"method": "POST",- "path": "/api/snippet/setSnippet",- "handler": "setSnippet",+ "path": "/api/sync/setSyncAssetDownloadMode",+ "handler": "setSyncAssetDownloadMode","body": "json","request": {- "$ref": "#/$defs/SetSnippetRequestInput"+ "$ref": "#/$defs/SyncModeRequestInput"},"response": {"anyOf": [@@ -84208,7 +89807,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SyncAssetDownloadModeData"},"msg": {"type": "string"@@ -84265,11 +89864,11 @@},{"method": "POST",- "path": "/api/sqlite/flushTransaction",- "handler": "flushTransaction",- "body": "none",+ "path": "/api/sync/setSyncEnable",+ "handler": "setSyncEnable",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SyncEnabledRequestInput"},"response": {"anyOf": [@@ -84340,11 +89939,11 @@},{"method": "POST",- "path": "/api/storage/batchUpdateRecentDocCloseTime",- "handler": "batchUpdateRecentDocCloseTime",+ "path": "/api/sync/setSyncGenerateConflictDoc",+ "handler": "setSyncGenerateConflictDoc","body": "json","request": {- "$ref": "#/$defs/RecentDocsUpdateRequestInput"+ "$ref": "#/$defs/SyncEnabledRequestInput"},"response": {"anyOf": [@@ -84415,103 +90014,11 @@},{"method": "POST",- "path": "/api/storage/getCriteria",- "handler": "getCriteria",- "body": "none",- "request": {- "$ref": "#/$defs/EmptyRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/Criterion"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },- "data": {- "anyOf": [- {- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false- },- {- "type": "null"- }- ]- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/storage/getInlineStyles",- "handler": "getInlineStyles",- "body": "none",+ "path": "/api/sync/setSyncInterval",+ "handler": "setSyncInterval",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SyncIntervalRequestInput"},"response": {"anyOf": [@@ -84525,14 +90032,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/InlineStyles"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -84589,11 +90089,11 @@},{"method": "POST",- "path": "/api/storage/getLocalStorage",- "handler": "getLocalStorage",- "body": "none",+ "path": "/api/sync/setSyncLAN",+ "handler": "setSyncLAN",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SyncLANRequestInput"},"response": {"anyOf": [@@ -84607,17 +90107,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/JSONValue"- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/SyncLANStatus"},"msg": {"type": "string"@@ -84674,11 +90164,11 @@},{"method": "POST",- "path": "/api/storage/getLocalStorageVal",- "handler": "getLocalStorageVal",+ "path": "/api/sync/setSyncMode",+ "handler": "setSyncMode","body": "json","request": {- "$ref": "#/$defs/StorageKeyRequestInput"+ "$ref": "#/$defs/SyncModeRequestInput"},"response": {"anyOf": [@@ -84692,7 +90182,7 @@]},"data": {- "$ref": "#/$defs/JSONValue"+ "type": "null"},"msg": {"type": "string"@@ -84749,11 +90239,11 @@},{"method": "POST",- "path": "/api/storage/getLocalStorageVals",- "handler": "getLocalStorageVals",+ "path": "/api/sync/setSyncPerception",+ "handler": "setSyncPerception","body": "json","request": {- "$ref": "#/$defs/StorageKeysRequestInput"+ "$ref": "#/$defs/SyncEnabledRequestInput"},"response": {"anyOf": [@@ -84767,17 +90257,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/JSONValue"- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -84834,11 +90314,11 @@},{"method": "POST",- "path": "/api/storage/getOutlineStorage",- "handler": "getOutlineStorage",+ "path": "/api/sync/setSyncProvider",+ "handler": "setSyncProvider","body": "json","request": {- "$ref": "#/$defs/OutlineStorageRequestInput"+ "$ref": "#/$defs/SyncProviderRequestInput"},"response": {"anyOf": [@@ -84852,17 +90332,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/JSONValue"- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -84919,11 +90389,11 @@},{"method": "POST",- "path": "/api/storage/getRecentDocs",- "handler": "getRecentDocs",- "body": "legacyOptional",+ "path": "/api/sync/setSyncProviderLocal",+ "handler": "setSyncProviderLocal",+ "body": "json","request": {- "$ref": "#/$defs/RecentDocsRequestInput"+ "$ref": "#/$defs/SetSyncLocalRequestInput"},"response": {"anyOf": [@@ -84937,24 +90407,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/RecentDoc"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/SyncLocalData"},"msg": {"type": "string"@@ -85011,11 +90464,11 @@},{"method": "POST",- "path": "/api/storage/getViewState",- "handler": "getViewState",+ "path": "/api/sync/setSyncProviderS3",+ "handler": "setSyncProviderS3","body": "json","request": {- "$ref": "#/$defs/StorageKeyRequestInput"+ "$ref": "#/$defs/SetSyncS3RequestInput"},"response": {"anyOf": [@@ -85029,17 +90482,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/JSONValue"- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/SyncS3Data"},"msg": {"type": "string"@@ -85096,11 +90539,11 @@},{"method": "POST",- "path": "/api/storage/patchViewState",- "handler": "patchViewState",+ "path": "/api/sync/setSyncProviderWebDAV",+ "handler": "setSyncProviderWebDAV","body": "json","request": {- "$ref": "#/$defs/ViewStatePatchRequestInput"+ "$ref": "#/$defs/SetSyncWebDAVRequestInput"},"response": {"anyOf": [@@ -85114,17 +90557,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/JSONValue"- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/SyncWebDAVData"},"msg": {"type": "string"@@ -85181,11 +90614,11 @@},{"method": "POST",- "path": "/api/storage/removeCriterion",- "handler": "removeCriterion",- "body": "json",+ "path": "/api/system/addCustomEmoji",+ "handler": "addCustomEmoji",+ "body": "form","request": {- "$ref": "#/$defs/RemoveCriterionRequestInput"+ "$ref": "#/$defs/SystemCustomEmojiRequestInput"},"response": {"anyOf": [@@ -85199,7 +90632,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SystemPathData"},"msg": {"type": "string"@@ -85218,7 +90651,9 @@"code": {"type": "integer","enum": [- -1+ -1,+ 400,+ 413]},"data": {@@ -85256,11 +90691,11 @@},{"method": "POST",- "path": "/api/storage/removeLocalStorageVal",- "handler": "removeLocalStorageVal",- "body": "json",+ "path": "/api/system/addMicrosoftDefenderExclusion",+ "handler": "addMicrosoftDefenderExclusion",+ "body": "none","request": {- "$ref": "#/$defs/StorageRemoveRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -85331,11 +90766,11 @@},{"method": "POST",- "path": "/api/storage/removeLocalStorageVals",- "handler": "removeLocalStorageVals",- "body": "json",+ "path": "/api/system/bootProgress",+ "handler": "bootProgress",+ "body": "none","request": {- "$ref": "#/$defs/StorageRemoveKeysRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -85349,7 +90784,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BootProgressData"},"msg": {"type": "string"@@ -85406,11 +90841,11 @@},{"method": "POST",- "path": "/api/storage/removeOutlineStorage",- "handler": "removeOutlineStorage",+ "path": "/api/system/checkUpdate",+ "handler": "checkUpdate","body": "json","request": {- "$ref": "#/$defs/OutlineStorageRequestInput"+ "$ref": "#/$defs/SystemCheckUpdateRequestInput"},"response": {"anyOf": [@@ -85481,11 +90916,11 @@},{"method": "POST",- "path": "/api/storage/removeViewState",- "handler": "removeViewState",+ "path": "/api/system/checkWorkspaceDir",+ "handler": "checkWorkspaceDir","body": "json","request": {- "$ref": "#/$defs/StorageKeyRequestInput"+ "$ref": "#/$defs/SystemPathRequestInput"},"response": {"anyOf": [@@ -85499,7 +90934,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SystemWorkspaceCheckData"},"msg": {"type": "string"@@ -85556,11 +90991,11 @@},{"method": "POST",- "path": "/api/storage/setCriterion",- "handler": "setCriterion",- "body": "json",+ "path": "/api/system/clearTempFiles",+ "handler": "clearTempFiles",+ "body": "none","request": {- "$ref": "#/$defs/SetCriterionRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -85631,11 +91066,11 @@},{"method": "POST",- "path": "/api/storage/setInlineStyles",- "handler": "setInlineStyles",+ "path": "/api/system/createWorkspaceDir",+ "handler": "createWorkspaceDir","body": "json","request": {- "$ref": "#/$defs/SetInlineStylesRequestInput"+ "$ref": "#/$defs/SystemPathRequestInput"},"response": {"anyOf": [@@ -85649,14 +91084,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/InlineStyles"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -85713,8 +91141,8 @@},{"method": "POST",- "path": "/api/storage/setLocalStorage",- "handler": "setLocalStorage",+ "path": "/api/system/currentTime",+ "handler": "currentTime","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -85731,7 +91159,7 @@]},"data": {- "type": "null"+ "type": "integer"},"msg": {"type": "string"@@ -85788,11 +91216,11 @@},{"method": "POST",- "path": "/api/storage/setLocalStorageVal",- "handler": "setLocalStorageVal",- "body": "json",+ "path": "/api/system/dismissOnboarding",+ "handler": "dismissOnboarding",+ "body": "none","request": {- "$ref": "#/$defs/StorageSetRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -85806,7 +91234,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/SystemOnboarding"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -85863,11 +91298,11 @@},{"method": "POST",- "path": "/api/storage/setLocalStorageVals",- "handler": "setLocalStorageVals",- "body": "json",+ "path": "/api/system/ensureOnboarding",+ "handler": "ensureOnboarding",+ "body": "none","request": {- "$ref": "#/$defs/StorageSetKeysRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -85881,7 +91316,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/SystemOnboarding"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -85938,11 +91380,11 @@},{"method": "POST",- "path": "/api/storage/setOutlineStorage",- "handler": "setOutlineStorage",+ "path": "/api/system/exit",+ "handler": "exit","body": "json","request": {- "$ref": "#/$defs/OutlineStorageSetRequestInput"+ "$ref": "#/$defs/SystemExitRequestInput"},"response": {"anyOf": [@@ -85956,7 +91398,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SystemExitData"},"msg": {"type": "string"@@ -85975,7 +91417,9 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1,+ 2]},"data": {@@ -85994,6 +91438,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/SystemExitData"}]},@@ -86013,11 +91460,11 @@},{"method": "POST",- "path": "/api/storage/setWorkspaceAVPalette",- "handler": "setWorkspaceAVPalette",- "body": "json",+ "path": "/api/system/exportConf",+ "handler": "exportConf",+ "body": "none","request": {- "$ref": "#/$defs/WorkspaceAVPaletteRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -86030,10 +91477,42 @@0]},+ "data": {+ "$ref": "#/$defs/SystemExportConfData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },"data": {"anyOf": [{- "$ref": "#/$defs/InlineStyles"+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{"type": "null"@@ -86049,6 +91528,42 @@"msg","data"],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/system/exportLog",+ "handler": "exportLog",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/SystemZipData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],"additionalProperties": false},{@@ -86095,11 +91610,11 @@},{"method": "POST",- "path": "/api/storage/updateRecentDocCloseTime",- "handler": "updateRecentDocCloseTime",- "body": "json",+ "path": "/api/system/exportTLSCABundle",+ "handler": "exportTLSCABundle",+ "body": "none","request": {- "$ref": "#/$defs/RecentDocUpdateRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -86113,7 +91628,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SystemPathData"},"msg": {"type": "string"@@ -86170,11 +91685,11 @@},{"method": "POST",- "path": "/api/storage/updateRecentDocOpenTime",- "handler": "updateRecentDocOpenTime",- "body": "json",+ "path": "/api/system/exportTLSCACert",+ "handler": "exportTLSCACert",+ "body": "none","request": {- "$ref": "#/$defs/RecentDocUpdateRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -86188,7 +91703,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SystemPathData"},"msg": {"type": "string"@@ -86245,11 +91760,11 @@},{"method": "POST",- "path": "/api/storage/updateRecentDocViewTime",- "handler": "updateRecentDocViewTime",- "body": "json",+ "path": "/api/system/getChangelog",+ "handler": "getChangelog",+ "body": "legacyOptional","request": {- "$ref": "#/$defs/RecentDocUpdateRequestInput"+ "$ref": "#/$defs/SystemChangelogRequestInput"},"response": {"anyOf": [@@ -86263,7 +91778,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SystemChangelogData"},"msg": {"type": "string"@@ -86320,11 +91835,11 @@},{"method": "POST",- "path": "/api/sync/createCloudSyncDir",- "handler": "createCloudSyncDir",- "body": "json",+ "path": "/api/system/getConf",+ "handler": "getConf",+ "body": "none","request": {- "$ref": "#/$defs/SyncNameRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -86338,7 +91853,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SystemConfData"},"msg": {"type": "string"@@ -86395,8 +91910,8 @@},{"method": "POST",- "path": "/api/sync/exportSyncProviderS3",- "handler": "exportSyncProviderS3",+ "path": "/api/system/getCustomFonts",+ "handler": "getCustomFonts","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -86413,7 +91928,24 @@]},"data": {- "$ref": "#/$defs/SyncProviderExportData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemCustomFont"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -86470,8 +92002,8 @@},{"method": "POST",- "path": "/api/sync/exportSyncProviderWebDAV",- "handler": "exportSyncProviderWebDAV",+ "path": "/api/system/getEmojiConf",+ "handler": "getEmojiConf","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -86488,7 +92020,24 @@]},"data": {- "$ref": "#/$defs/SyncProviderExportData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemEmojiGroup"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -86545,8 +92094,8 @@},{"method": "POST",- "path": "/api/sync/getBootSync",- "handler": "getBootSync",+ "path": "/api/system/getMobileWorkspaces",+ "handler": "getMobileWorkspaces","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -86563,7 +92112,17 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -86582,8 +92141,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -86621,8 +92179,8 @@},{"method": "POST",- "path": "/api/sync/getSyncInfo",- "handler": "getSyncInfo",+ "path": "/api/system/getNetwork",+ "handler": "getNetwork","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -86639,7 +92197,7 @@]},"data": {- "$ref": "#/$defs/SyncInfoData"+ "$ref": "#/$defs/NetworkData"},"msg": {"type": "string"@@ -86696,8 +92254,8 @@},{"method": "POST",- "path": "/api/sync/getSyncLANStatus",- "handler": "getSyncLANStatus",+ "path": "/api/system/getSysFonts",+ "handler": "getSysFonts","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -86714,7 +92272,24 @@]},"data": {- "$ref": "#/$defs/SyncLANStatus"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemFont"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -86771,11 +92346,11 @@},{"method": "POST",- "path": "/api/sync/importSyncProviderS3",- "handler": "importSyncProviderS3",- "body": "multipart",+ "path": "/api/system/getWorkspaceInfo",+ "handler": "getWorkspaceInfo",+ "body": "none","request": {- "$ref": "#/$defs/SyncProviderImportRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -86789,7 +92364,7 @@]},"data": {- "$ref": "#/$defs/SyncS3Data"+ "$ref": "#/$defs/WorkspaceInfoData"},"msg": {"type": "string"@@ -86827,9 +92402,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/SyncS3Data"}]},@@ -86849,11 +92421,11 @@},{"method": "POST",- "path": "/api/sync/importSyncProviderWebDAV",- "handler": "importSyncProviderWebDAV",- "body": "multipart",+ "path": "/api/system/getWorkspaces",+ "handler": "getWorkspaces",+ "body": "none","request": {- "$ref": "#/$defs/SyncProviderImportRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -86866,48 +92438,23 @@0]},- "data": {- "$ref": "#/$defs/SyncWebDAVData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SystemWorkspace"+ },+ {+ "type": "null"+ }+ ]+ }},{"type": "null"- },- {- "$ref": "#/$defs/SyncWebDAVData"}]},@@ -86920,42 +92467,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/sync/listCloudSyncDir",- "handler": "listCloudSyncDir",- "body": "none",- "request": {- "$ref": "#/$defs/EmptyRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/CloudSyncDirsData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -86964,8 +92475,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -87003,8 +92513,8 @@},{"method": "POST",- "path": "/api/sync/performBootSync",- "handler": "performBootSync",+ "path": "/api/system/ignoreAddMicrosoftDefenderExclusion",+ "handler": "ignoreAddMicrosoftDefenderExclusion","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -87040,8 +92550,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -87079,11 +92588,11 @@},{"method": "POST",- "path": "/api/sync/performSync",- "handler": "performSync",- "body": "json",+ "path": "/api/system/importConf",+ "handler": "importConf",+ "body": "multipart","request": {- "$ref": "#/$defs/PerformSyncRequestInput"+ "$ref": "#/$defs/SystemImportConfRequestInput"},"response": {"anyOf": [@@ -87154,11 +92663,11 @@},{"method": "POST",- "path": "/api/sync/removeCloudSyncDir",- "handler": "removeCloudSyncDir",- "body": "json",+ "path": "/api/system/importCustomFont",+ "handler": "importCustomFont",+ "body": "multipart","request": {- "$ref": "#/$defs/SyncNameRequestInput"+ "$ref": "#/$defs/SystemImportFileRequestInput"},"response": {"anyOf": [@@ -87171,42 +92680,10 @@0]},- "data": {- "type": "string"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false- },- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- -1- ]- },"data": {"anyOf": [{- "type": "object",- "properties": {- "closeTimeout": {- "type": "number"- }- },- "required": [- "closeTimeout"- ],- "additionalProperties": false+ "$ref": "#/$defs/SystemCustomFont"},{"type": "null"@@ -87222,42 +92699,6 @@"msg","data"],- "additionalProperties": true- }- ]- }- },- {- "method": "POST",- "path": "/api/sync/setCloudSyncDir",- "handler": "setCloudSyncDir",- "body": "json",- "request": {- "$ref": "#/$defs/SyncNameRequestInput"- },- "response": {- "anyOf": [- {- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "type": "null"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],"additionalProperties": false},{@@ -87266,7 +92707,9 @@"code": {"type": "integer","enum": [- -1+ -1,+ 400,+ 413]},"data": {@@ -87304,11 +92747,11 @@},{"method": "POST",- "path": "/api/sync/setSyncAssetDownloadMode",- "handler": "setSyncAssetDownloadMode",- "body": "json",+ "path": "/api/system/importTLSCABundle",+ "handler": "importTLSCABundle",+ "body": "multipart","request": {- "$ref": "#/$defs/SyncModeRequestInput"+ "$ref": "#/$defs/SystemImportFileRequestInput"},"response": {"anyOf": [@@ -87322,7 +92765,7 @@]},"data": {- "$ref": "#/$defs/SyncAssetDownloadModeData"+ "$ref": "#/$defs/SystemMessageData"},"msg": {"type": "string"@@ -87379,11 +92822,11 @@},{"method": "POST",- "path": "/api/sync/setSyncEnable",- "handler": "setSyncEnable",+ "path": "/api/system/loginAuth",+ "handler": "loginAuth","body": "json","request": {- "$ref": "#/$defs/SyncEnabledRequestInput"+ "$ref": "#/$defs/SystemLoginAuthRequestInput"},"response": {"anyOf": [@@ -87416,7 +92859,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -87454,11 +92898,11 @@},{"method": "POST",- "path": "/api/sync/setSyncGenerateConflictDoc",- "handler": "setSyncGenerateConflictDoc",- "body": "json",+ "path": "/api/system/logoutAuth",+ "handler": "logoutAuth",+ "body": "none","request": {- "$ref": "#/$defs/SyncEnabledRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -87491,7 +92935,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -87529,11 +92974,11 @@},{"method": "POST",- "path": "/api/sync/setSyncInterval",- "handler": "setSyncInterval",- "body": "json",+ "path": "/api/system/oidc/mobileCallback",+ "handler": "oidcMobileCallback",+ "body": "structJSON","request": {- "$ref": "#/$defs/SyncIntervalRequestInput"+ "$ref": "#/$defs/SystemOIDCMobileRequestInput"},"response": {"anyOf": [@@ -87547,7 +92992,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SystemOIDCMobileData"},"msg": {"type": "string"@@ -87604,11 +93049,11 @@},{"method": "POST",- "path": "/api/sync/setSyncLAN",- "handler": "setSyncLAN",- "body": "json",+ "path": "/api/system/oidc/poll",+ "handler": "oidcPoll",+ "body": "structJSON","request": {- "$ref": "#/$defs/SyncLANRequestInput"+ "$ref": "#/$defs/SystemOIDCPollRequestInput"},"response": {"anyOf": [@@ -87622,7 +93067,7 @@]},"data": {- "$ref": "#/$defs/SyncLANStatus"+ "$ref": "#/$defs/SystemOIDCPollData"},"msg": {"type": "string"@@ -87679,11 +93124,11 @@},{"method": "POST",- "path": "/api/sync/setSyncMode",- "handler": "setSyncMode",- "body": "json",+ "path": "/api/system/oidc/start",+ "handler": "oidcStart",+ "body": "structJSON","request": {- "$ref": "#/$defs/SyncModeRequestInput"+ "$ref": "#/$defs/SystemOIDCStartRequestInput"},"response": {"anyOf": [@@ -87697,7 +93142,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SystemOIDCStartData"},"msg": {"type": "string"@@ -87754,11 +93199,11 @@},{"method": "POST",- "path": "/api/sync/setSyncPerception",- "handler": "setSyncPerception",- "body": "json",+ "path": "/api/system/oidc/validate",+ "handler": "oidcValidateStart",+ "body": "structJSON","request": {- "$ref": "#/$defs/SyncEnabledRequestInput"+ "$ref": "#/$defs/SystemOIDCRequestInput"},"response": {"anyOf": [@@ -87772,7 +93217,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SystemOIDCStartData"},"msg": {"type": "string"@@ -87829,11 +93274,11 @@},{"method": "POST",- "path": "/api/sync/setSyncProvider",- "handler": "setSyncProvider",- "body": "json",+ "path": "/api/system/oidc/validateActivate",+ "handler": "oidcValidateActivate",+ "body": "structJSON","request": {- "$ref": "#/$defs/SyncProviderRequestInput"+ "$ref": "#/$defs/SystemOIDCPollRequestInput"},"response": {"anyOf": [@@ -87847,7 +93292,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SystemOIDCActivateData"},"msg": {"type": "string"@@ -87904,11 +93349,11 @@},{"method": "POST",- "path": "/api/sync/setSyncProviderLocal",- "handler": "setSyncProviderLocal",- "body": "json",+ "path": "/api/system/oidc/validateCancel",+ "handler": "oidcValidateCancel",+ "body": "structJSON","request": {- "$ref": "#/$defs/SetSyncLocalRequestInput"+ "$ref": "#/$defs/SystemOIDCPollRequestInput"},"response": {"anyOf": [@@ -87922,7 +93367,7 @@]},"data": {- "$ref": "#/$defs/SyncLocalData"+ "type": "null"},"msg": {"type": "string"@@ -87979,11 +93424,11 @@},{"method": "POST",- "path": "/api/sync/setSyncProviderS3",- "handler": "setSyncProviderS3",- "body": "json",+ "path": "/api/system/oidc/validatePoll",+ "handler": "oidcValidatePoll",+ "body": "structJSON","request": {- "$ref": "#/$defs/SetSyncS3RequestInput"+ "$ref": "#/$defs/SystemOIDCPollRequestInput"},"response": {"anyOf": [@@ -87997,7 +93442,7 @@]},"data": {- "$ref": "#/$defs/SyncS3Data"+ "$ref": "#/$defs/SystemOIDCValidatePollData"},"msg": {"type": "string"@@ -88054,11 +93499,11 @@},{"method": "POST",- "path": "/api/sync/setSyncProviderWebDAV",- "handler": "setSyncProviderWebDAV",- "body": "json",+ "path": "/api/system/rebuildDataIndex",+ "handler": "rebuildDataIndex",+ "body": "none","request": {- "$ref": "#/$defs/SetSyncWebDAVRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -88072,7 +93517,7 @@]},"data": {- "$ref": "#/$defs/SyncWebDAVData"+ "type": "null"},"msg": {"type": "string"@@ -88129,8 +93574,8 @@},{"method": "POST",- "path": "/api/system/addMicrosoftDefenderExclusion",- "handler": "addMicrosoftDefenderExclusion",+ "path": "/api/system/reloadUI",+ "handler": "deprecatedReloadUI","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -88204,11 +93649,11 @@},{"method": "POST",- "path": "/api/system/bootProgress",- "handler": "bootProgress",- "body": "none",+ "path": "/api/system/removeCustomFont",+ "handler": "removeCustomFont",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SystemRemoveCustomFontRequestInput"},"response": {"anyOf": [@@ -88222,7 +93667,7 @@]},"data": {- "$ref": "#/$defs/BootProgressData"+ "$ref": "#/$defs/SystemRemoveCustomFontData"},"msg": {"type": "string"@@ -88241,7 +93686,9 @@"code": {"type": "integer","enum": [- -1+ -1,+ 400,+ 404]},"data": {@@ -88279,11 +93726,11 @@},{"method": "POST",- "path": "/api/system/clearTempFiles",- "handler": "clearTempFiles",- "body": "none",+ "path": "/api/system/removeWorkspaceDir",+ "handler": "removeWorkspaceDir",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SystemPathRequestInput"},"response": {"anyOf": [@@ -88354,11 +93801,11 @@},{"method": "POST",- "path": "/api/system/currentTime",- "handler": "currentTime",- "body": "none",+ "path": "/api/system/removeWorkspaceDirPhysically",+ "handler": "removeWorkspaceDirPhysically",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SystemPathRequestInput"},"response": {"anyOf": [@@ -88372,7 +93819,7 @@]},"data": {- "type": "integer"+ "type": "null"},"msg": {"type": "string"@@ -88429,11 +93876,11 @@},{"method": "POST",- "path": "/api/system/getNetwork",- "handler": "getNetwork",- "body": "none",+ "path": "/api/system/setAPIToken",+ "handler": "setAPIToken",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SystemAPITokenRequestInput"},"response": {"anyOf": [@@ -88447,7 +93894,7 @@]},"data": {- "$ref": "#/$defs/NetworkData"+ "type": "null"},"msg": {"type": "string"@@ -88504,11 +93951,11 @@},{"method": "POST",- "path": "/api/system/getWorkspaceInfo",- "handler": "getWorkspaceInfo",- "body": "none",+ "path": "/api/system/setAccessAuthCode",+ "handler": "setAccessAuthCode",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SystemAccessAuthCodeRequestInput"},"response": {"anyOf": [@@ -88522,7 +93969,7 @@]},"data": {- "$ref": "#/$defs/WorkspaceInfoData"+ "type": "null"},"msg": {"type": "string"@@ -88579,11 +94026,11 @@},{"method": "POST",- "path": "/api/system/ignoreAddMicrosoftDefenderExclusion",- "handler": "ignoreAddMicrosoftDefenderExclusion",- "body": "none",+ "path": "/api/system/setAppearanceMode",+ "handler": "setAppearanceMode",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SystemAppearanceModeRequestInput"},"response": {"anyOf": [@@ -88597,7 +94044,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SystemAppearanceData"},"msg": {"type": "string"@@ -88654,11 +94101,11 @@},{"method": "POST",- "path": "/api/system/rebuildDataIndex",- "handler": "rebuildDataIndex",- "body": "none",+ "path": "/api/system/setAutoLaunch",+ "handler": "setAutoLaunch",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/AutoLaunchRequestInput"},"response": {"anyOf": [@@ -88729,11 +94176,11 @@},{"method": "POST",- "path": "/api/system/reloadUI",- "handler": "deprecatedReloadUI",- "body": "none",+ "path": "/api/system/setDownloadInstallPkg",+ "handler": "setDownloadInstallPkg",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/DownloadInstallPkgRequestInput"},"response": {"anyOf": [@@ -88804,11 +94251,11 @@},{"method": "POST",- "path": "/api/system/setAutoLaunch",- "handler": "setAutoLaunch",+ "path": "/api/system/setFollowSystemLockScreen",+ "handler": "setFollowSystemLockScreen","body": "json","request": {- "$ref": "#/$defs/AutoLaunchRequestInput"+ "$ref": "#/$defs/LockScreenRequestInput"},"response": {"anyOf": [@@ -88879,11 +94326,11 @@},{"method": "POST",- "path": "/api/system/setDownloadInstallPkg",- "handler": "setDownloadInstallPkg",+ "path": "/api/system/setNetworkProxy",+ "handler": "setNetworkProxy","body": "json","request": {- "$ref": "#/$defs/DownloadInstallPkgRequestInput"+ "$ref": "#/$defs/NetworkProxyInput"},"response": {"anyOf": [@@ -88954,11 +94401,11 @@},{"method": "POST",- "path": "/api/system/setFollowSystemLockScreen",- "handler": "setFollowSystemLockScreen",+ "path": "/api/system/setNetworkServe",+ "handler": "setNetworkServe","body": "json","request": {- "$ref": "#/$defs/LockScreenRequestInput"+ "$ref": "#/$defs/NetworkServeRequestInput"},"response": {"anyOf": [@@ -89029,11 +94476,11 @@},{"method": "POST",- "path": "/api/system/setNetworkProxy",- "handler": "setNetworkProxy",+ "path": "/api/system/setNetworkServeTLS",+ "handler": "setNetworkServeTLS","body": "json","request": {- "$ref": "#/$defs/NetworkProxyInput"+ "$ref": "#/$defs/NetworkServeTLSRequestInput"},"response": {"anyOf": [@@ -89104,11 +94551,11 @@},{"method": "POST",- "path": "/api/system/setNetworkServe",- "handler": "setNetworkServe",- "body": "json",+ "path": "/api/system/setOIDC",+ "handler": "setOIDC",+ "body": "structJSON","request": {- "$ref": "#/$defs/NetworkServeRequestInput"+ "$ref": "#/$defs/SystemOIDCRequestInput"},"response": {"anyOf": [@@ -89122,7 +94569,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/SystemOIDC"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -89179,11 +94633,11 @@},{"method": "POST",- "path": "/api/system/setNetworkServeTLS",- "handler": "setNetworkServeTLS",+ "path": "/api/system/setUILayout",+ "handler": "setUILayout","body": "json","request": {- "$ref": "#/$defs/NetworkServeTLSRequestInput"+ "$ref": "#/$defs/SystemUILayoutRequestInput"},"response": {"anyOf": [@@ -89327,6 +94781,159 @@]}},+ {+ "method": "POST",+ "path": "/api/system/setWorkspaceDir",+ "handler": "setWorkspaceDir",+ "body": "json",+ "request": {+ "$ref": "#/$defs/SystemPathRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/system/uiproc",+ "handler": "addUIProcess",+ "body": "none",+ "request": {+ "$ref": "#/$defs/SystemUIProcessRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "null"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1+ ]+ },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ },+ "emptyResponseStatuses": [+ 200+ ]+ },{"method": "POST","path": "/api/system/vacuumDataIndex",diff --git a/kernel/apicontract/system.go b/kernel/apicontract/system.gonew file mode 100644index 0000000000..2408e3b296--- /dev/null+++ b/kernel/apicontract/system.go@@ -0,0 +1,173 @@+package apicontract++import "mime/multipart"++type SystemPathRequest struct {+ Path string `json:"path"`+}+type SystemWorkspaceCheckData struct {+ IsWorkspace bool `json:"isWorkspace"`+}+type SystemWorkspace struct {+ Path string `json:"path"`+ Closed bool `json:"closed"`+}+type SystemChangelogRequest struct {+ Force bool `json:"force" api:"optional,nullable"`+}+type SystemChangelogData struct {+ Show bool `json:"show"`+ HTML string `json:"html"`+ Version string `json:"version"`+}+type SystemCheckUpdateRequest struct {+ ShowMsg bool `json:"showMsg"`+}+type SystemZipData struct {+ Zip string `json:"zip"`+}+type SystemExportConfData struct {+ Name string `json:"name"`+ Zip string `json:"zip"`+}+type SystemPathData struct {+ Path string `json:"path"`+}+type SystemMessageData struct {+ Msg string `json:"msg"`+}+type SystemConfData struct {+ Conf *SystemAppConf `json:"conf"`+ Start bool `json:"start"`+ IsPublish bool `json:"isPublish"`+}+type SystemImportConfRequest struct {+ File []*multipart.FileHeader `json:"file" api:"optional"`+}+type SystemImportFileRequest struct {+ File *multipart.FileHeader `json:"file" api:"optional"`+}+type SystemCustomEmojiRequest struct {+ File *multipart.FileHeader `json:"file" api:"optional"`+ URL string `json:"url" api:"optional"`+ Name string `json:"name" api:"optional"`+}+type SystemEmojiGroup struct {+ ID string `json:"id"`+ Title string `json:"title"`+ TitleZhCN string `json:"title_zh_cn"`+ TitleJaJP string `json:"title_ja_jp"`+ Items []*SystemEmoji `json:"items"`+}+type SystemEmoji struct {+ Unicode string `json:"unicode"`+ Description string `json:"description"`+ DescriptionZhCN string `json:"description_zh_cn"`+ DescriptionJaJP string `json:"description_ja_jp"`+ Keywords string `json:"keywords"`+}+type SystemUILayoutRequest struct {+ Layout map[string]JSONValue `json:"layout" api:"optional,nullable"`+ layoutError error+}++func (r SystemUILayoutRequest) LayoutError() error { return r.layoutError }++type SystemAPITokenRequest struct {+ Token string `json:"token"`+}+type SystemAccessAuthCodeRequest struct {+ AccessAuthCode string `json:"accessAuthCode"`+}+type SystemRemoveCustomFontRequest struct {+ ID string `json:"id" api:"optional,nullable,ignoretype"`+}+type SystemRemoveCustomFontData struct {+ Font *SystemCustomFont `json:"font"`+ Editor *SettingEditor `json:"editor"`+ Appearance *SettingAppearance `json:"appearance"`+}+type SystemAppearanceModeRequest struct {+ Mode float64 `json:"mode"`+}+type SystemAppearanceData struct {+ Appearance *SettingAppearance `json:"appearance"`+}+type SystemUIProcessRequest struct {+ PID string `json:"pid" api:"optional,nullable"`+}+type SystemExitRequest struct {+ Force bool `json:"force" api:"optional,nullable"`+ ExecInstallPkg float64 `json:"execInstallPkg" api:"optional,nullable"`+ SetCurrentWorkspace *bool `json:"setCurrentWorkspace" api:"optional,nullable"`+}+type SystemExitData struct {+ CloseTimeout int `json:"closeTimeout"`+ InstallPkgPath string `json:"installPkgPath,omitempty"`+}+type SystemOIDCStartRequest struct {+ Flow string `json:"flow" api:"optional,nullable"`+ To string `json:"to" api:"optional,nullable"`+ RememberMe bool `json:"rememberMe" api:"optional,nullable"`+ parseError error+}++func (r SystemOIDCStartRequest) ParseError() error { return r.parseError }++type SystemOIDCRequest struct {+ SystemOIDC+ parseError error+}++func (r SystemOIDCRequest) ParseError() error { return r.parseError }++type SystemOIDCStartData struct {+ AuthURL string `json:"authURL"`+ ExpiresIn int `json:"expiresIn"`+ PollToken string `json:"pollToken,omitempty"`+}+type SystemOIDCCallbackRequest struct {+ State string `json:"state" api:"optional,nullable"`+ Code string `json:"code" api:"optional,nullable"`+ Error string `json:"error" api:"optional,nullable"`+}+type SystemOIDCMobileRequest struct {+ CallbackURL string `json:"callbackURL" api:"optional,nullable"`+ parseError error+}++func (r SystemOIDCMobileRequest) ParseError() error { return r.parseError }++type SystemOIDCMobileData struct {+ Validation bool `json:"validation,omitempty" api:"const=true"`+ To string `json:"to,omitempty"`+}+type SystemOIDCPollRequest struct {+ PollToken string `json:"pollToken" api:"optional,nullable"`+ parseError error+}++func (r SystemOIDCPollRequest) ParseError() error { return r.parseError }++type SystemOIDCPollData struct {+ Status string `json:"status" api:"enum=pending|completed"`+ To string `json:"to,omitempty"`+}++type SystemOIDCValidatePollData struct {+ Status string `json:"status" api:"enum=pending|completed"`+}+type SystemOIDCActivateData struct {+ Status string `json:"status" api:"const=\"completed\""`+ Config *SystemOIDC `json:"config"`+}+type SystemLoginAuthRequest struct {+ AuthCode string `json:"authCode"`+ Captcha string `json:"captcha" api:"optional,nullable"`+ RememberMe bool `json:"rememberMe" api:"optional,nullable"`+ authCodeError error+ captchaError error+}++func (r SystemLoginAuthRequest) AuthCodeError() error { return r.authCodeError }+func (r SystemLoginAuthRequest) CaptchaError() error { return r.captchaError }diff --git a/kernel/apicontract/system_conf.go b/kernel/apicontract/system_conf.gonew file mode 100644index 0000000000..620a5cd9a9--- /dev/null+++ b/kernel/apicontract/system_conf.go@@ -0,0 +1,261 @@+package apicontract++type SystemAppConf struct {+ LogLevel string `json:"logLevel" api:"optional,nullable"`+ Appearance *SettingAppearance `json:"appearance" api:"optional,nullable"`+ Langs []*SystemLang `json:"langs" api:"optional,nullable"`+ Lang string `json:"lang" api:"optional,nullable"`+ FileTree *SettingFileTree `json:"fileTree" api:"optional,nullable"`+ Tag *SystemTag `json:"tag" api:"optional,nullable"`+ Editor *SettingEditor `json:"editor" api:"optional,nullable"`+ Export *SettingExport `json:"export" api:"optional,nullable"`+ Graph *SystemGraph `json:"graph" api:"optional,nullable"`+ UILayout *map[string]JSONValue `json:"uiLayout" api:"optional,nullable"`+ UserData string `json:"userData" api:"optional,nullable"`+ ReadOnly bool `json:"readonly" api:"optional,nullable"`+ ServerAddrs []string `json:"serverAddrs" api:"optional,nullable"`+ AccessAuthCode string `json:"accessAuthCode" api:"optional,nullable"`+ OIDC *SystemOIDC `json:"oidc" api:"optional,nullable"`+ System *SystemSystem `json:"system" api:"optional,nullable"`+ Keymap *map[string]JSONValue `json:"keymap" api:"optional,nullable"`+ Sync *SystemSync `json:"sync" api:"optional,nullable"`+ Search *SettingSearch `json:"search" api:"optional,nullable"`+ Flashcard *SettingFlashcard `json:"flashcard" api:"optional,nullable"`+ AI *SettingAI `json:"ai" api:"optional,nullable"`+ Secrets *SettingSecrets `json:"secrets" api:"optional,nullable"`+ Variables *SettingVariables `json:"variables" api:"optional,nullable"`+ Bazaar *SettingBazaar `json:"bazaar" api:"optional,nullable"`+ Stat *SystemStat `json:"stat" api:"optional,nullable"`+ Api *SystemAPI `json:"api" api:"optional,nullable"`+ Repo *SystemRepo `json:"repo" api:"optional,nullable"`+ NotebookCrypto *SystemNotebookCrypto `json:"notebookCrypto" api:"optional,nullable"`+ Publish *SettingPublish `json:"publish" api:"optional,nullable"`+ Onboarding *SystemOnboarding `json:"onboarding" api:"optional,nullable"`+ ShowChangelog bool `json:"showChangelog" api:"optional,nullable"`+ CloudRegion int `json:"cloudRegion" api:"optional,nullable"`+ Snippet *SettingSnpt `json:"snippet" api:"optional,nullable"`+ DataIndexState int `json:"dataIndexState" api:"optional,nullable"`+ CookieKey string `json:"cookieKey" api:"optional,nullable"`+ MCPOAuth string `json:"mcpOAuth" api:"optional,nullable"`+}++type SystemLang struct {+ Label string `json:"label" api:"optional,nullable"`+ Name string `json:"name" api:"optional,nullable"`+}++type SystemTag struct {+ Sort int `json:"sort" api:"optional,nullable"`+}++type SystemGraph struct {+ MaxBlocks int `json:"maxBlocks" api:"optional,nullable"`+ Local *SystemLocalGraph `json:"local" api:"optional,nullable"`+ Global *SystemGlobalGraph `json:"global" api:"optional,nullable"`+}++type SystemLocalGraph struct {+ DailyNote bool `json:"dailyNote" api:"optional,nullable"`+ TypeFilter *SystemTypeFilter `json:"type" api:"optional,nullable"`+ D3 *SystemD3 `json:"d3" api:"optional,nullable"`+}++type SystemTypeFilter struct {+ Tag bool `json:"tag" api:"optional,nullable"`+ Paragraph bool `json:"paragraph" api:"optional,nullable"`+ Heading bool `json:"heading" api:"optional,nullable"`+ Math bool `json:"math" api:"optional,nullable"`+ Code bool `json:"code" api:"optional,nullable"`+ Table bool `json:"table" api:"optional,nullable"`+ List bool `json:"list" api:"optional,nullable"`+ ListItem bool `json:"listItem" api:"optional,nullable"`+ Blockquote bool `json:"blockquote" api:"optional,nullable"`+ Super bool `json:"super" api:"optional,nullable"`+ Callout bool `json:"callout" api:"optional,nullable"`+}++type SystemD3 struct {+ NodeSize float64 `json:"nodeSize" api:"optional,nullable"`+ LineWidth float64 `json:"linkWidth" api:"optional,nullable"`+ LineOpacity float64 `json:"lineOpacity" api:"optional,nullable"`+ CenterStrength float64 `json:"centerStrength" api:"optional,nullable"`+ CollideRadius float64 `json:"collideRadius" api:"optional,nullable"`+ CollideStrength float64 `json:"collideStrength" api:"optional,nullable"`+ LinkDistance int `json:"linkDistance" api:"optional,nullable"`+ Arrow bool `json:"arrow" api:"optional,nullable"`+}++type SystemGlobalGraph struct {+ MinRefs int `json:"minRefs" api:"optional,nullable"`+ DailyNote bool `json:"dailyNote" api:"optional,nullable"`+ TypeFilter *SystemTypeFilter `json:"type" api:"optional,nullable"`+ D3 *SystemD3 `json:"d3" api:"optional,nullable"`+}++type SystemOIDC struct {+ Enabled bool `json:"enabled" api:"optional,nullable"`+ Provider string `json:"provider" api:"optional,nullable"`+ IssuerURL string `json:"issuerURL" api:"optional,nullable"`+ ClientID string `json:"clientID" api:"optional,nullable"`+ ClientSecret string `json:"clientSecret" api:"optional,nullable"`+ Scopes []string `json:"scopes" api:"optional,nullable"`+ RedirectURL string `json:"redirectURL" api:"optional,nullable"`+ AllowAll bool `json:"allowAll" api:"optional,nullable"`+ ClaimRules []*SystemOIDCClaimRule `json:"claimRules" api:"optional,nullable"`+}++type SystemOIDCClaimRule struct {+ Claim string `json:"claim" api:"optional,nullable"`+ Operator string `json:"operator" api:"optional,nullable"`+ Values []string `json:"values" api:"optional,nullable"`+}++type SystemSystem struct {+ ID string `json:"id" api:"optional,nullable"`+ Name string `json:"name" api:"optional,nullable"`+ KernelVersion string `json:"kernelVersion" api:"optional,nullable"`+ OS string `json:"os" api:"optional,nullable"`+ OSPlatform string `json:"osPlatform" api:"optional,nullable"`+ Container string `json:"container" api:"optional,nullable"`+ IsMicrosoftStore bool `json:"isMicrosoftStore" api:"optional,nullable"`+ HomeDir string `json:"homeDir" api:"optional,nullable"`+ WorkspaceDir string `json:"workspaceDir" api:"optional,nullable"`+ AppDir string `json:"appDir" api:"optional,nullable"`+ ConfDir string `json:"confDir" api:"optional,nullable"`+ DataDir string `json:"dataDir" api:"optional,nullable"`+ NetworkServe bool `json:"networkServe" api:"optional,nullable"`+ NetworkServeTLS bool `json:"networkServeTLS" api:"optional,nullable"`+ NetworkProxy *SystemNetworkProxy `json:"networkProxy" api:"optional,nullable"`+ DownloadInstallPkg bool `json:"downloadInstallPkg" api:"optional,nullable"`+ UpdateChannel string `json:"updateChannel,omitempty" api:"optional,nullable"`+ AutoLaunch2 int `json:"autoLaunch2" api:"optional,nullable"`+ LockScreenMode int `json:"lockScreenMode" api:"optional,nullable"`+ DisabledFeatures []string `json:"disabledFeatures" api:"optional,nullable"`+ MicrosoftDefenderExcluded bool `json:"microsoftDefenderExcluded" api:"optional,nullable"`+ SafeMode bool `json:"safeMode" api:"optional,nullable"`+}++type SystemNetworkProxy struct {+ Scheme string `json:"scheme" api:"optional,nullable"`+ Host string `json:"host" api:"optional,nullable"`+ Port string `json:"port" api:"optional,nullable"`+}++type SystemSync struct {+ CloudName string `json:"cloudName" api:"optional,nullable"`+ Enabled bool `json:"enabled" api:"optional,nullable"`+ Perception bool `json:"perception" api:"optional,nullable"`+ Mode int `json:"mode" api:"optional,nullable"`+ Interval int `json:"interval" api:"optional,nullable"`+ Synced int64 `json:"synced" api:"optional,nullable"`+ Stat string `json:"stat" api:"optional,nullable"`+ GenerateConflictDoc bool `json:"generateConflictDoc" api:"optional,nullable"`+ AssetDownloadMode int `json:"assetDownloadMode" api:"optional,nullable"`+ Provider int `json:"provider" api:"optional,nullable"`+ S3 *SystemS3 `json:"s3" api:"optional,nullable"`+ WebDAV *SystemWebDAV `json:"webdav" api:"optional,nullable"`+ Local *SystemLocal `json:"local" api:"optional,nullable"`+ LAN *SystemLANSync `json:"lan" api:"optional,nullable"`+}++type SystemS3 struct {+ Endpoint string `json:"endpoint" api:"optional,nullable"`+ AccessKey string `json:"accessKey" api:"optional,nullable"`+ SecretKey string `json:"secretKey" api:"optional,nullable"`+ Bucket string `json:"bucket" api:"optional,nullable"`+ Region string `json:"region" api:"optional,nullable"`+ PathStyle bool `json:"pathStyle" api:"optional,nullable"`+ SkipTlsVerify bool `json:"skipTlsVerify" api:"optional,nullable"`+ Timeout int `json:"timeout" api:"optional,nullable"`+ ConcurrentReqs int `json:"concurrentReqs" api:"optional,nullable"`+}++type SystemWebDAV struct {+ Endpoint string `json:"endpoint" api:"optional,nullable"`+ Username string `json:"username" api:"optional,nullable"`+ Password string `json:"password" api:"optional,nullable"`+ SkipTlsVerify bool `json:"skipTlsVerify" api:"optional,nullable"`+ Timeout int `json:"timeout" api:"optional,nullable"`+ ConcurrentReqs int `json:"concurrentReqs" api:"optional,nullable"`+}++type SystemLocal struct {+ Endpoint string `json:"endpoint" api:"optional,nullable"`+ Timeout int `json:"timeout" api:"optional,nullable"`+ ConcurrentReqs int `json:"concurrentReqs" api:"optional,nullable"`+}++type SystemLANSync struct {+ Enabled bool `json:"enabled" api:"optional,nullable"`+ MaxConcurrentReqs int `json:"maxConcurrentReqs" api:"optional,nullable"`+}++type SystemStat struct {+ TreeCount int `json:"treeCount" api:"optional,nullable"`+ CTreeCount int `json:"cTreeCount" api:"optional,nullable"`+ BlockCount int `json:"blockCount" api:"optional,nullable"`+ CBlockCount int `json:"cBlockCount" api:"optional,nullable"`+ DataSize int64 `json:"dataSize" api:"optional,nullable"`+ CDataSize int64 `json:"cDataSize" api:"optional,nullable"`+ AssetsSize int64 `json:"assetsSize" api:"optional,nullable"`+ CAssetsSize int64 `json:"cAssetsSize" api:"optional,nullable"`+}++type SystemAPI struct {+ Token string `json:"token" api:"optional,nullable"`+}++type SystemRepo struct {+ Key Base64Bytes `json:"key" api:"optional,nullable"`+ SyncIndexTiming int64 `json:"syncIndexTiming" api:"optional,nullable"`+ IndexRetentionDays int `json:"indexRetentionDays" api:"optional,nullable"`+ RetentionIndexesDaily int `json:"retentionIndexesDaily" api:"optional,nullable"`+}++type SystemNotebookCrypto struct {+ Enabled bool `json:"enabled" api:"optional,nullable"`+ MasterSalt Base64Bytes `json:"masterSalt" api:"optional,nullable"`+ KDFParams SystemArgon2Params `json:"kdfParams" api:"optional,nullable"`+ KEKVerifier Base64Bytes `json:"kekVerifier" api:"optional,nullable"`+ VerifierNonce Base64Bytes `json:"verifierNonce" api:"optional,nullable"`+ AutoLockMinutes int `json:"autoLockMinutes" api:"optional,nullable"`+ Spec int `json:"spec" api:"optional,nullable"`+ BackupID string `json:"backupID,omitempty" api:"optional,nullable"`+ CreatedAt int64 `json:"createdAt,omitempty" api:"optional,nullable"`+ Checksum string `json:"checksum,omitempty" api:"optional,nullable"`+ KEKMAC Base64Bytes `json:"kekMAC,omitempty" api:"optional,nullable"`+ HistoryKEKs []Base64Bytes `json:"historyKEKs,omitempty" api:"optional,nullable"`+}++type SystemArgon2Params struct {+ Memory uint32 `json:"memory" api:"optional,nullable"`+ Iterations uint32 `json:"iterations" api:"optional,nullable"`+ Parallelism uint8 `json:"parallelism" api:"optional,nullable"`+ KeyLength uint32 `json:"keyLength" api:"optional,nullable"`+}++type SystemOnboarding struct {+ State string `json:"state" api:"optional,nullable"`+ NewUser bool `json:"newUser" api:"optional,nullable"`+ Dismissed bool `json:"dismissed" api:"optional,nullable"`+ NotebookID string `json:"notebookID" api:"optional,nullable"`+ DocumentID string `json:"documentID" api:"optional,nullable"`+}++type SystemFont struct {+ Family string `json:"family" api:"optional,nullable"`+ Weight int `json:"weight" api:"optional,nullable"`+ DisplayName string `json:"displayName" api:"optional,nullable"`+ Aliases []string `json:"aliases,omitempty" api:"optional,nullable"`+ Spacing string `json:"spacing,omitempty" api:"optional,nullable"`+}++type SystemCustomFont struct {+ ID string `json:"id" api:"optional,nullable"`+ Family string `json:"family" api:"optional,nullable"`+ Weight int `json:"weight" api:"optional,nullable"`+ DisplayName string `json:"displayName" api:"optional,nullable"`+ Aliases []string `json:"aliases,omitempty" api:"optional,nullable"`+ Spacing string `json:"spacing,omitempty" api:"optional,nullable"`+ URL string `json:"url" api:"optional,nullable"`+}diff --git a/kernel/apicontract/system_input.go b/kernel/apicontract/system_input.gonew file mode 100644index 0000000000..f1373949fd--- /dev/null+++ b/kernel/apicontract/system_input.go@@ -0,0 +1,86 @@+package apicontract++import (+ "encoding/json"+ "errors"+ "io"+ "net/http"+ "strings"+)++func init() {+ SystemGetChangelog.decodeRequest = func(reader io.Reader) (r SystemChangelogRequest, err error) {+ config, err := decodeSettingConfig(reader, SystemGetChangelog.Definition().Path, false)+ if err != nil {+ return r, nil+ }+ r.Force, err = legacyField[bool](config.fields, "force", "Boolean", false)+ return+ }+ SystemSetUILayout.decodeRequest = func(reader io.Reader) (r SystemUILayoutRequest, err error) {+ config, err := decodeSettingConfig(reader, SystemSetUILayout.Definition().Path, false)+ if err != nil {+ return r, err+ }+ raw := config.fields["layout"]+ if len(raw) == 0 {+ raw = []byte("null")+ }+ r.Layout, r.layoutError = legacyJSONValue[map[string]JSONValue](raw)+ if r.layoutError != nil {+ r.layoutError = errors.New(strings.ReplaceAll(r.layoutError.Error(), "map[string]apicontract.JSONValue", "conf.UILayout"))+ }+ return+ }+ SystemLoginAuth.decodeRequest = func(reader io.Reader) (r SystemLoginAuthRequest, err error) {+ config, err := decodeSettingConfig(reader, SystemLoginAuth.Definition().Path, false)+ if err != nil {+ return r, err+ }+ r.AuthCode, r.authCodeError = legacyField[string](config.fields, "authCode", "String", true)+ r.Captcha, r.captchaError = legacyField[string](config.fields, "captcha", "String", false)+ r.RememberMe, _ = legacyField[bool](config.fields, "rememberMe", "Boolean", false)+ return+ }+ SystemOIDCStart.decodeRequest = func(reader io.Reader) (r SystemOIDCStartRequest, err error) {+ r.parseError = json.NewDecoder(reader).Decode(&r)+ return+ }+ SystemOIDCMobileCallback.decodeRequest = func(reader io.Reader) (r SystemOIDCMobileRequest, err error) {+ r.parseError = json.NewDecoder(reader).Decode(&r)+ return+ }+ SystemOIDCPoll.decodeRequest = func(reader io.Reader) (r SystemOIDCPollRequest, err error) {+ r.parseError = json.NewDecoder(reader).Decode(&r)+ return+ }+ SystemOIDCValidatePoll.decodeRequest = func(reader io.Reader) (r SystemOIDCPollRequest, err error) {+ r.parseError = json.NewDecoder(reader).Decode(&r)+ return+ }+ SystemOIDCValidateActivate.decodeRequest = func(reader io.Reader) (r SystemOIDCPollRequest, err error) {+ r.parseError = json.NewDecoder(reader).Decode(&r)+ return+ }+ SystemOIDCValidateCancel.decodeRequest = func(reader io.Reader) (r SystemOIDCPollRequest, err error) {+ r.parseError = json.NewDecoder(reader).Decode(&r)+ return+ }+ decodeOIDC := func(reader io.Reader) (r SystemOIDCRequest, err error) {+ r.SystemOIDC = SystemOIDC{Provider: "custom", Scopes: []string{"openid", "profile", "email"}, ClaimRules: []*SystemOIDCClaimRule{}}+ r.parseError = json.NewDecoder(reader).Decode(&r.SystemOIDC)+ return+ }+ SystemSetOIDC.decodeRequest = decodeOIDC+ SystemOIDCValidateStart.decodeRequest = decodeOIDC+ SystemImportCustomFont.decodeFailure = func(err error) Response[*SystemCustomFont] {+ var sizeError *http.MaxBytesError+ if errors.As(err, &sizeError) {+ return Failure[*SystemCustomFont](413, "font file is too large")+ }+ return Failure[*SystemCustomFont](400, "Field [file] must not be empty")+ }+ SystemImportTLSCABundle.decodeFailure = func(err error) Response[SystemMessageData] {+ return Failure[SystemMessageData](-1, "[file] is required: "+err.Error())+ }+}diff --git a/kernel/apicontract/system_schema.go b/kernel/apicontract/system_schema.gonew file mode 100644index 0000000000..1d94854301--- /dev/null+++ b/kernel/apicontract/system_schema.go@@ -0,0 +1,47 @@+package apicontract++import "reflect"++type SystemOIDCMobileValidationData struct {+ Validation bool `json:"validation" api:"const=true"`+}++type SystemOIDCMobileRedirectData struct {+ To string `json:"to"`+}++type SystemOIDCPendingData struct {+ Status string `json:"status" api:"const=\"pending\""`+}++type SystemOIDCCompletedData struct {+ Status string `json:"status" api:"const=\"completed\""`+ To string `json:"to"`+}++// systemVariantSchema 区分移动登录验证与跳转,以及桌面轮询完成后必需的目标地址。+func systemVariantSchema(b *schemaBuilder, t reflect.Type, input bool) (*Schema, error) {+ var members []reflect.Type+ switch t {+ case reflect.TypeFor[SystemOIDCMobileData]():+ members = []reflect.Type{reflect.TypeFor[SystemOIDCMobileValidationData](), reflect.TypeFor[SystemOIDCMobileRedirectData]()}+ case reflect.TypeFor[SystemOIDCPollData]():+ members = []reflect.Type{reflect.TypeFor[SystemOIDCPendingData](), reflect.TypeFor[SystemOIDCCompletedData]()}+ default:+ return nil, nil+ }+ name := t.Name()+ if _, exists := b.definitions[name]; exists {+ return &Schema{Ref: "#/$defs/" + name}, nil+ }+ result := &Schema{}+ b.definitions[name] = result+ for _, member := range members {+ schema, err := b.schema(member, input)+ if err != nil {+ return nil, err+ }+ result.AnyOf = append(result.AnyOf, schema)+ }+ return &Schema{Ref: "#/$defs/" + name}, nil+}diff --git a/kernel/apicontract/system_test.go b/kernel/apicontract/system_test.gonew file mode 100644index 0000000000..b0a92a956c--- /dev/null+++ b/kernel/apicontract/system_test.go@@ -0,0 +1,86 @@+package apicontract++import (+ "encoding/json"+ "mime/multipart"+ "reflect"+ "strings"+ "testing"+)++func TestAPIContractSystemRequestCompatibility(t *testing.T) {+ for _, body := range []string{`{}`, `null`, `{"force":null}`, `{"force":true}`, `{"force":true} {}`, `{"unknown":1e1000}`, ``} {+ var legacy map[string]interface{}+ legacyErr := json.NewDecoder(strings.NewReader(body)).Decode(&legacy)+ request, err := SystemGetChangelog.Decode(strings.NewReader(body))+ if err != nil {+ t.Fatal(err)+ }+ want := legacyErr == nil && legacy["force"] == true+ if request.Force != want {+ t.Fatalf("optional changelog parsing changed for %s", body)+ }+ }+ for _, body := range []string{`{"force":"true"}`, `{"force":1}`, `{"force":[]}`} {+ if _, err := SystemGetChangelog.Decode(strings.NewReader(body)); err == nil {+ t.Fatalf("invalid changelog force accepted: %s", body)+ }+ }+ request, err := SystemLoginAuth.Decode(strings.NewReader(`{"authCode":{},"captcha":{},"rememberMe":{}}`))+ if err != nil || request.AuthCodeError() == nil || request.CaptchaError() == nil || request.RememberMe {+ t.Fatalf("conditional login validation moved into decoding: %#v %v", request, err)+ }+ path, err := SystemCheckWorkspaceDir.Decode(strings.NewReader(`{"path":" folder "}`))+ if err != nil || path.Path != " folder " {+ t.Fatalf("workspace path was trimmed: %#v %v", path, err)+ }+ for _, body := range []string{`{}`, `{"id":null}`, `{"id":{}}`, `{"id":1}`} {+ font, err := SystemRemoveCustomFont.Decode(strings.NewReader(body))+ if err != nil || font.ID != "" {+ t.Fatalf("ignored font ID type changed: %#v %v", font, err)+ }+ }+}++func TestAPIContractSystemUploadSelection(t *testing.T) {+ first, second := &multipart.FileHeader{Filename: "one"}, &multipart.FileHeader{Filename: "two"}+ form := &multipart.Form{Value: map[string][]string{"url": {"first", "second"}, "name": {"first", "second"}}, File: map[string][]*multipart.FileHeader{"file": {first, second}}}+ emoji, err := SystemAddCustomEmoji.DecodeMultipart(form)+ if err != nil || emoji.File != first || emoji.URL != "first" || emoji.Name != "first" {+ t.Fatalf("emoji first-file and first-field selection changed: %#v %v", emoji, err)+ }+ imported, err := SystemImportConf.DecodeMultipart(form)+ if err != nil || !reflect.DeepEqual(imported.File, []*multipart.FileHeader{first, second}) {+ t.Fatalf("configuration upload lost exact-file-count validation: %#v %v", imported, err)+ }+ font, err := SystemImportCustomFont.DecodeMultipart(&multipart.Form{})+ if err != nil || font.File != nil {+ t.Fatalf("missing font should reach the existing handler error: %#v %v", font, err)+ }+}++func TestAPIContractSystemOIDCResponseVariants(t *testing.T) {+ bundle, err := BuildBundle()+ if err != nil {+ t.Fatal(err)+ }+ for _, test := range []struct {+ route string+ data string+ valid bool+ }{+ {"poll", `{"status":"pending"}`, true},+ {"poll", `{"status":"completed","to":"/"}`, true},+ {"poll", `{"status":"completed"}`, false},+ {"validatePoll", `{"status":"completed"}`, true},+ {"mobileCallback", `{"validation":true}`, true},+ {"mobileCallback", `{"to":"/"}`, true},+ {"mobileCallback", `{}`, false},+ {"mobileCallback", `{"validation":false}`, false},+ } {+ err := bundle.ValidateResponse("POST", "/api/system/oidc/"+test.route, []byte(`{"code":0,"msg":"","data":`+test.data+`}`))+ if (err == nil) != test.valid {+ t.Fatalf("OIDC %s variant %s: %v", test.route, test.data, err)+ }+ }+}diff --git a/kernel/model/oidc.go b/kernel/model/oidc.goindex 03e2794780..797724fb5c 100644--- a/kernel/model/oidc.go+++ b/kernel/model/oidc.go@@ -21,9 +21,9 @@ import ("sync""time"- "github.com/88250/gulu""github.com/gin-gonic/gin""github.com/siyuan-note/logging"+ "github.com/siyuan-note/siyuan/kernel/apicontract""github.com/siyuan-note/siyuan/kernel/conf""github.com/siyuan-note/siyuan/kernel/model/oidc_provider""github.com/siyuan-note/siyuan/kernel/util"@@ -96,36 +96,31 @@ type oidcPollInput struct {PollToken string `json:"pollToken"`}-func OIDCValidateStart(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+func OIDCValidateStart(c *gin.Context, request apicontract.SystemOIDCRequest) (ret apicontract.Response[apicontract.SystemOIDCStartData]) {+ ret = apicontract.Success(apicontract.SystemOIDCStartData{})- config := conf.NewOIDC()- if err := c.ShouldBindJSON(config); err != nil {- ret.Code = -1- ret.Msg = oidcLanguage(369, "Invalid OIDC configuration")+ config := SystemOIDCConfig(request.SystemOIDC)+ if err := request.ParseError(); err != nil {+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcLanguage(369, "Invalid OIDC configuration"))return}config.Normalize()mobileValidation := util.IsMobileContainer()if mobileValidation && config.Provider == conf.OIDCProviderGoogle {- ret.Code = -1- ret.Msg = oidcLanguage(368, "This OIDC provider does not support the SiYuan mobile callback URI")+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcLanguage(368, "This OIDC provider does not support the SiYuan mobile callback URI"))logging.LogErrorf("validate mobile OIDC candidate configuration failed [ip=%s]: Google does not support the fixed SiYuan mobile OIDC callback URI", c.ClientIP())return}requireRemoteAuthentication := util.ContainerDocker == util.Container || !IsLocalRequest(c)if err := ValidateOIDCConfigurationChange(c.Request.Context(), config, requireRemoteAuthentication,Conf.AccessAuthCode != "", util.SiYuanAccessAuthCodeBypass); err != nil {- ret.Code = -1- ret.Msg = oidcLanguage(369, "Invalid OIDC configuration")+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcLanguage(369, "Invalid OIDC configuration"))logging.LogErrorf("validate OIDC candidate configuration failed [ip=%s]: %s", c.ClientIP(), err)return}redirectURL, err := oidcValidationRedirectURL(c, config, mobileValidation)if err != nil {- ret.Code = -1- ret.Msg = oidcLanguage(369, "Invalid OIDC configuration")+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcLanguage(369, "Invalid OIDC configuration"))logging.LogErrorf("resolve OIDC validation redirect URL failed: %s", err)return}@@ -133,8 +128,7 @@ func OIDCValidateStart(c *gin.Context) {defer cancel()provider, err := oidc_provider.New(providerContext, config, redirectURL)if err != nil {- ret.Code = -1- ret.Msg = oidcLanguage(369, "Invalid OIDC configuration")+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcLanguage(369, "Invalid OIDC configuration"))logging.LogErrorf("create OIDC validation provider failed: %s", err)return}@@ -143,66 +137,49 @@ func OIDCValidateStart(c *gin.Context) {workspaceSession := util.GetWorkspaceSession(session)if workspaceSession.OIDCBinding == "" {if workspaceSession.OIDCBinding, err = secureRandomToken(32); err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcUserMessage())return}}transaction, err := newOIDCTransaction(&oidcStartInput{Flow: oidcFlowValidate}, workspaceSession.OIDCBinding,c.ClientIP(), redirectURL)if err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcUserMessage())return}transaction.Config = configtransaction.Provider = providertransaction.MobileValidation = mobileValidationif err = session.Save(c); err != nil {- ret.Code = -1- ret.Msg = Conf.Language(258)+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, Conf.Language(258))return}if err = storeOIDCTransaction(transaction); err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcUserMessage())logging.LogWarnf("store OIDC validation transaction failed [ip=%s]: %s", c.ClientIP(), err)return}- ret.Data = map[string]any{- "authURL": provider.AuthURL(transaction.State, transaction.Nonce, transaction.CodeVerifier),- "pollToken": transaction.PollToken,- "expiresIn": int(oidcTransactionTimeout.Seconds()),- }+ ret = apicontract.Success(apicontract.SystemOIDCStartData{AuthURL: provider.AuthURL(transaction.State, transaction.Nonce, transaction.CodeVerifier), PollToken: transaction.PollToken, ExpiresIn: int(oidcTransactionTimeout.Seconds())})+ return}-func OIDCStart(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+func OIDCStart(c *gin.Context, request apicontract.SystemOIDCStartRequest) (ret apicontract.Response[apicontract.SystemOIDCStartData]) {+ ret = apicontract.Success(apicontract.SystemOIDCStartData{})- if err := validateOIDCConfiguration(); err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()- logging.LogErrorf("invalid OIDC login configuration: %s", err)- return- }- input := &oidcStartInput{}- if err := c.ShouldBindJSON(input); err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()+ input := &oidcStartInput{Flow: request.Flow, To: request.To, RememberMe: request.RememberMe}+ if err := request.ParseError(); err != nil {+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcUserMessage())return}if input.Flow == "" {input.Flow = oidcFlowWeb}if input.Flow != oidcFlowWeb && input.Flow != oidcFlowDesktop && input.Flow != oidcFlowMobile {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcUserMessage())return}if input.Flow == oidcFlowMobile && Conf.GetOIDC().Provider == conf.OIDCProviderGoogle {- ret.Code = -1- ret.Msg = oidcLanguage(368, "This OIDC provider does not support the SiYuan mobile callback URI")+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcLanguage(368, "This OIDC provider does not support the SiYuan mobile callback URI"))logging.LogWarn("Google does not support the fixed SiYuan mobile OIDC callback URI")return}@@ -213,267 +190,236 @@ func OIDCStart(c *gin.Context) {var err errorworkspaceSession.OIDCBinding, err = secureRandomToken(32)if err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcUserMessage())logging.LogErrorf("create OIDC login binding failed: %s", err)return}}redirectURL, err := effectiveOIDCRedirectURL(c, input.Flow)if err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcUserMessage())logging.LogErrorf("resolve OIDC redirect URL failed: %s", err)return}transaction, err := newOIDCTransaction(input, workspaceSession.OIDCBinding, c.ClientIP(), redirectURL)if err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcUserMessage())logging.LogErrorf("create OIDC login transaction failed: %s", err)return}provider, err := getOIDCProvider(c.Request.Context(), redirectURL)if err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcUserMessage())logging.LogErrorf("create OIDC provider failed: %s", err)return}if err = session.Save(c); err != nil {- ret.Code = -1- ret.Msg = Conf.Language(258)+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, Conf.Language(258))return}if err = storeOIDCTransaction(transaction); err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcUserMessage())logging.LogWarnf("store OIDC login transaction failed [ip=%s]: %s", c.ClientIP(), err)return}authURL := provider.AuthURL(transaction.State, transaction.Nonce, transaction.CodeVerifier)- ret.Data = map[string]any{"authURL": authURL, "expiresIn": int(oidcTransactionTimeout.Seconds())}+ data := apicontract.SystemOIDCStartData{AuthURL: authURL, ExpiresIn: int(oidcTransactionTimeout.Seconds())}if input.Flow == oidcFlowDesktop {- ret.Data.(map[string]any)["pollToken"] = transaction.PollToken+ data.PollToken = transaction.PollToken}+ return apicontract.Success(data)}-func OIDCCallback(c *gin.Context) {- state := c.Query("state")+func OIDCCallback(c *gin.Context, request apicontract.SystemOIDCCallbackRequest) apicontract.Response[apicontract.BinaryContent] {+ request.State = c.Query("state")+ request.Code = c.Query("code")+ request.Error = c.Query("error")+ state := request.StateworkspaceSession := util.GetWorkspaceSession(util.GetSession(c))transaction, repeated, err := claimOIDCTransaction(c.Request.Context(), state, workspaceSession.OIDCBinding, true)if err != nil {logging.LogWarnf("claim OIDC callback transaction failed: %s", err)- writeOIDCCallbackPage(c, false, oidcUserMessage())- return+ return writeOIDCCallbackPage(c, false, oidcUserMessage())}if repeated {- respondRepeatedOIDCCallback(c, transaction)- return+ return respondRepeatedOIDCCallback(c, transaction)}if transaction.Flow == oidcFlowMobile || (transaction.Flow == oidcFlowValidate && transaction.MobileValidation) {completeOIDCTransaction(transaction.State, false, oidcUserMessage())- writeOIDCCallbackPage(c, false, oidcUserMessage())- return+ return writeOIDCCallbackPage(c, false, oidcUserMessage())}if transaction.Flow == oidcFlowWeb {if workspaceSession.OIDCBinding == "" || workspaceSession.OIDCBinding != transaction.Binding {logging.LogWarn("OIDC login binding does not match")completeOIDCTransaction(transaction.State, false, oidcUserMessage())- writeOIDCCallbackPage(c, false, oidcUserMessage())- return+ return writeOIDCCallbackPage(c, false, oidcUserMessage())}}- if providerError := c.Query("error"); providerError != "" {+ if providerError := request.Error; providerError != "" {logging.LogWarnf("OIDC provider rejected the login: %s", providerError)message := oidcUserMessage()completeOIDCTransaction(transaction.State, false, message)- writeOIDCCallbackPage(c, false, message)- return+ return writeOIDCCallbackPage(c, false, message)}- if err = finishOIDCExchange(c, transaction, c.Query("code")); err != nil {+ if err = finishOIDCExchange(c, transaction, request.Code); err != nil {logging.LogErrorf("finish OIDC authorization code exchange failed: %s", err)completeOIDCTransaction(transaction.State, false, oidcUserMessage())- writeOIDCCallbackPage(c, false, oidcUserMessage())- return+ return writeOIDCCallbackPage(c, false, oidcUserMessage())}if transaction.Flow == oidcFlowValidate {completeOIDCTransaction(transaction.State, true, "")- writeOIDCCallbackPage(c, true, oidcLanguage(367, "You can close this window and return to SiYuan"))- return+ return writeOIDCCallbackPage(c, true, oidcLanguage(367, "You can close this window and return to SiYuan"))}if transaction.Flow == oidcFlowDesktop {completeOIDCTransaction(transaction.State, true, "")- writeOIDCCallbackPage(c, true, oidcLanguage(367, "You can close this window and return to SiYuan"))- return+ return writeOIDCCallbackPage(c, true, oidcLanguage(367, "You can close this window and return to SiYuan"))}if err = authenticateOIDCSession(c, transaction.RememberMe); err != nil {completeOIDCTransaction(transaction.State, false, oidcUserMessage())- writeOIDCCallbackPage(c, false, oidcUserMessage())- return+ return writeOIDCCallbackPage(c, false, oidcUserMessage())}completeOIDCTransaction(transaction.State, true, "")- c.Redirect(http.StatusFound, safeOIDCRedirectTarget(transaction.To))+ return apicontract.RedirectHTTPContent(http.StatusFound, safeOIDCRedirectTarget(transaction.To))}-func OIDCMobileCallback(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)- input := &oidcMobileCallbackInput{}- if err := c.ShouldBindJSON(input); err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()+func OIDCMobileCallback(c *gin.Context, request apicontract.SystemOIDCMobileRequest) (ret apicontract.Response[apicontract.SystemOIDCMobileData]) {+ ret = apicontract.Success(apicontract.SystemOIDCMobileData{})+ input := request+ if err := request.ParseError(); err != nil {+ ret = apicontract.Failure[apicontract.SystemOIDCMobileData](-1, oidcUserMessage())return}callbackURL, err := url.Parse(input.CallbackURL)if err != nil || callbackURL.Scheme != "siyuan" || callbackURL.Host != "" || callbackURL.Path != "/oidc-callback" {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCMobileData](-1, oidcUserMessage())return}workspaceSession := util.GetWorkspaceSession(util.GetSession(c))transaction, repeated, err := claimOIDCTransaction(c.Request.Context(), callbackURL.Query().Get("state"),workspaceSession.OIDCBinding, false)if err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCMobileData](-1, oidcUserMessage())logging.LogWarnf("claim mobile OIDC callback transaction failed: %s", err)return}if repeated {if transaction.Flow == oidcFlowValidate && transaction.MobileValidation && transaction.Success {- ret.Data = map[string]any{"validation": true}+ ret = apicontract.Success(apicontract.SystemOIDCMobileData{Validation: true})return}if transaction.Flow != oidcFlowMobile || !transaction.Success {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCMobileData](-1, oidcUserMessage())return}if err = authenticateOIDCSession(c, transaction.RememberMe); err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCMobileData](-1, oidcUserMessage())return}- ret.Data = map[string]any{"to": safeOIDCRedirectTarget(transaction.To)}+ ret = apicontract.Success(apicontract.SystemOIDCMobileData{To: safeOIDCRedirectTarget(transaction.To)})return}if transaction.Flow != oidcFlowMobile && !(transaction.Flow == oidcFlowValidate && transaction.MobileValidation) {- ret.Code = -1- ret.Msg = oidcUserMessage()- completeOIDCTransaction(transaction.State, false, ret.Msg)+ ret = apicontract.Failure[apicontract.SystemOIDCMobileData](-1, oidcUserMessage())+ completeOIDCTransaction(transaction.State, false, oidcUserMessage())return}if providerError := callbackURL.Query().Get("error"); providerError != "" {logging.LogWarnf("OIDC provider rejected the mobile login: %s", providerError)- ret.Code = -1- ret.Msg = oidcUserMessage()- completeOIDCTransaction(transaction.State, false, ret.Msg)+ ret = apicontract.Failure[apicontract.SystemOIDCMobileData](-1, oidcUserMessage())+ completeOIDCTransaction(transaction.State, false, oidcUserMessage())return}if err = finishOIDCExchange(c, transaction, callbackURL.Query().Get("code")); err != nil {logging.LogErrorf("finish mobile OIDC authorization code exchange failed: %s", err)- ret.Code = -1- ret.Msg = oidcUserMessage()- completeOIDCTransaction(transaction.State, false, ret.Msg)+ ret = apicontract.Failure[apicontract.SystemOIDCMobileData](-1, oidcUserMessage())+ completeOIDCTransaction(transaction.State, false, oidcUserMessage())return}if transaction.Flow == oidcFlowValidate {completeOIDCTransaction(transaction.State, true, "")- ret.Data = map[string]any{"validation": true}+ ret = apicontract.Success(apicontract.SystemOIDCMobileData{Validation: true})return}if err = authenticateOIDCSession(c, transaction.RememberMe); err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()- completeOIDCTransaction(transaction.State, false, ret.Msg)+ ret = apicontract.Failure[apicontract.SystemOIDCMobileData](-1, oidcUserMessage())+ completeOIDCTransaction(transaction.State, false, oidcUserMessage())return}completeOIDCTransaction(transaction.State, true, "")- ret.Data = map[string]any{"to": safeOIDCRedirectTarget(transaction.To)}+ ret = apicontract.Success(apicontract.SystemOIDCMobileData{To: safeOIDCRedirectTarget(transaction.To)})+ return}-func OIDCPoll(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)- input := &oidcPollInput{}- if err := c.ShouldBindJSON(input); err != nil || input.PollToken == "" {- ret.Code = -1- ret.Msg = oidcUserMessage()+func OIDCPoll(c *gin.Context, request apicontract.SystemOIDCPollRequest) (ret apicontract.Response[apicontract.SystemOIDCPollData]) {+ ret = apicontract.Success(apicontract.SystemOIDCPollData{})+ input := request+ if err := request.ParseError(); err != nil || input.PollToken == "" {+ ret = apicontract.Failure[apicontract.SystemOIDCPollData](-1, oidcUserMessage())return}workspaceSession := util.GetWorkspaceSession(util.GetSession(c))transaction, found := pollOIDCTransaction(input.PollToken, workspaceSession.OIDCBinding)if !found || transaction.Flow != oidcFlowDesktop {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCPollData](-1, oidcUserMessage())return}if !transaction.Completed {- ret.Data = map[string]any{"status": "pending"}+ ret = apicontract.Success(apicontract.SystemOIDCPollData{Status: "pending"})return}if !transaction.Success {- ret.Code = -1- ret.Msg = transaction.Message+ ret = apicontract.Failure[apicontract.SystemOIDCPollData](-1, transaction.Message)return}if err := authenticateOIDCSession(c, transaction.RememberMe); err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCPollData](-1, oidcUserMessage())return}- ret.Data = map[string]any{"status": "completed", "to": safeOIDCRedirectTarget(transaction.To)}+ ret = apicontract.Success(apicontract.SystemOIDCPollData{Status: "completed", To: safeOIDCRedirectTarget(transaction.To)})+ return}-func OIDCValidatePoll(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)- input := &oidcPollInput{}- if err := c.ShouldBindJSON(input); err != nil || input.PollToken == "" {- ret.Code = -1- ret.Msg = oidcUserMessage()+func OIDCValidatePoll(c *gin.Context, request apicontract.SystemOIDCPollRequest) (ret apicontract.Response[apicontract.SystemOIDCValidatePollData]) {+ ret = apicontract.Success(apicontract.SystemOIDCValidatePollData{})+ input := request+ if err := request.ParseError(); err != nil || input.PollToken == "" {+ ret = apicontract.Failure[apicontract.SystemOIDCValidatePollData](-1, oidcUserMessage())return}workspaceSession := util.GetWorkspaceSession(util.GetSession(c))transaction, found := pollOIDCTransaction(input.PollToken, workspaceSession.OIDCBinding)if !found || transaction.Flow != oidcFlowValidate {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCValidatePollData](-1, oidcUserMessage())return}if !transaction.Completed {- ret.Data = map[string]any{"status": "pending"}+ ret = apicontract.Success(apicontract.SystemOIDCValidatePollData{Status: "pending"})return}if !transaction.Success {- ret.Code = -1- ret.Msg = transaction.Message+ ret = apicontract.Failure[apicontract.SystemOIDCValidatePollData](-1, transaction.Message)return}- ret.Data = map[string]any{"status": "completed"}+ ret = apicontract.Success(apicontract.SystemOIDCValidatePollData{Status: "completed"})+ return}-func OIDCValidateActivate(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)- input := &oidcPollInput{}- if err := c.ShouldBindJSON(input); err != nil || input.PollToken == "" {- ret.Code = -1- ret.Msg = oidcLanguage(369, "Invalid OIDC configuration")+func OIDCValidateActivate(c *gin.Context, request apicontract.SystemOIDCPollRequest) (ret apicontract.Response[apicontract.SystemOIDCActivateData]) {+ ret = apicontract.Success(apicontract.SystemOIDCActivateData{})+ input := request+ if err := request.ParseError(); err != nil || input.PollToken == "" {+ ret = apicontract.Failure[apicontract.SystemOIDCActivateData](-1, oidcLanguage(369, "Invalid OIDC configuration"))return}workspaceSession := util.GetWorkspaceSession(util.GetSession(c))activated, err := activateOIDCValidation(input.PollToken, workspaceSession.OIDCBinding)if err != nil {- ret.Code = -1- ret.Msg = oidcLanguage(369, "Invalid OIDC configuration")+ ret = apicontract.Failure[apicontract.SystemOIDCActivateData](-1, oidcLanguage(369, "Invalid OIDC configuration"))logging.LogErrorf("activate validated OIDC configuration failed: %s", err)return}if err = authenticateOIDCSession(c, false); err != nil {- ret.Code = -1- ret.Msg = oidcUserMessage()+ ret = apicontract.Failure[apicontract.SystemOIDCActivateData](-1, oidcUserMessage())return}if activated {@@ -481,27 +427,25 @@ func OIDCValidateActivate(c *gin.Context) {}masked, err := GetMaskedConf()if err != nil {- ret.Code = -1- ret.Msg = oidcLanguage(369, "Invalid OIDC configuration")+ ret = apicontract.Failure[apicontract.SystemOIDCActivateData](-1, oidcLanguage(369, "Invalid OIDC configuration"))return}- ret.Data = map[string]any{"status": "completed", "config": masked.OIDC}+ ret = apicontract.Success(apicontract.SystemOIDCActivateData{Status: "completed", Config: SystemOIDCPayload(masked.OIDC)})+ return}-func OIDCValidateCancel(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)- input := &oidcPollInput{}- if err := c.ShouldBindJSON(input); err != nil || input.PollToken == "" {- ret.Code = -1- ret.Msg = oidcLanguage(369, "Invalid OIDC configuration")+func OIDCValidateCancel(c *gin.Context, request apicontract.SystemOIDCPollRequest) (ret apicontract.Response[apicontract.Null]) {+ ret = apicontract.Success(apicontract.Null{})+ input := request+ if err := request.ParseError(); err != nil || input.PollToken == "" {+ ret = apicontract.Failure[apicontract.Null](-1, oidcLanguage(369, "Invalid OIDC configuration"))return}workspaceSession := util.GetWorkspaceSession(util.GetSession(c))if !cancelOIDCValidation(input.PollToken, workspaceSession.OIDCBinding) {- ret.Code = -1- ret.Msg = oidcLanguage(369, "Invalid OIDC configuration")+ ret = apicontract.Failure[apicontract.Null](-1, oidcLanguage(369, "Invalid OIDC configuration"))}+ return}func validateOIDCConfiguration() error {@@ -869,24 +813,20 @@ func deleteOIDCTransactionLocked(state string) {delete(oidcTransactions.byState, state)}-func respondRepeatedOIDCCallback(c *gin.Context, transaction *oidcTransaction) {+func respondRepeatedOIDCCallback(c *gin.Context, transaction *oidcTransaction) apicontract.Response[apicontract.BinaryContent] {if !transaction.Success {- writeOIDCCallbackPage(c, false, oidcUserMessage())- return+ return writeOIDCCallbackPage(c, false, oidcUserMessage())}if transaction.Flow == oidcFlowDesktop || transaction.Flow == oidcFlowValidate {- writeOIDCCallbackPage(c, true, oidcLanguage(367, "You can close this window and return to SiYuan"))- return+ return writeOIDCCallbackPage(c, true, oidcLanguage(367, "You can close this window and return to SiYuan"))}if transaction.Flow != oidcFlowWeb {- writeOIDCCallbackPage(c, false, oidcUserMessage())- return+ return writeOIDCCallbackPage(c, false, oidcUserMessage())}if err := authenticateOIDCSession(c, transaction.RememberMe); err != nil {- writeOIDCCallbackPage(c, false, oidcUserMessage())- return+ return writeOIDCCallbackPage(c, false, oidcUserMessage())}- c.Redirect(http.StatusFound, safeOIDCRedirectTarget(transaction.To))+ return apicontract.RedirectHTTPContent(http.StatusFound, safeOIDCRedirectTarget(transaction.To))}func cleanupOIDCTransactionsLocked() {@@ -1028,7 +968,7 @@ func safeOIDCRedirectTarget(target string) string {return target}-func writeOIDCCallbackPage(c *gin.Context, success bool, message string) {+func writeOIDCCallbackPage(c *gin.Context, success bool, message string) apicontract.Response[apicontract.BinaryContent] {title := oidcUserMessage()if success {title = oidcLanguage(366, "OIDC login completed")@@ -1041,5 +981,14 @@ func writeOIDCCallbackPage(c *gin.Context, success bool, message string) {if Conf != nil {lang = util.LangToBCP47(Conf.Lang)}- c.Data(http.StatusOK, "text/html; charset=utf-8", util.RenderOAuthCallbackPage(lang, title, message, success))+ return apicontract.SuccessHTTPContent(http.StatusOK, "text/html; charset=utf-8", util.RenderOAuthCallbackPage(lang, title, message, success))+}++func OIDCStartPreflight(c *gin.Context) *apicontract.Response[apicontract.SystemOIDCStartData] {+ if err := validateOIDCConfiguration(); err != nil {+ logging.LogErrorf("invalid OIDC login configuration: %s", err)+ response := apicontract.Failure[apicontract.SystemOIDCStartData](-1, oidcUserMessage())+ return &response+ }+ return nil}diff --git a/kernel/model/oidc_test.go b/kernel/model/oidc_test.goindex 23b8b1c4ea..7a642092ce 100644--- a/kernel/model/oidc_test.go+++ b/kernel/model/oidc_test.go@@ -439,9 +439,11 @@ func TestWriteOIDCCallbackPageUsesSharedOAuthStyle(t *testing.T) {recorder := httptest.NewRecorder()context, _ := gin.CreateTestContext(recorder)- writeOIDCCallbackPage(context, false, "登录失败<script>")-- page := recorder.Body.String()+ response := writeOIDCCallbackPage(context, false, "登录失败<script>")+ if response.Binary() == nil {+ t.Fatal("OIDC callback page has no HTTP content")+ }+ page := string(response.Binary().Bytes)for _, expected := range []string{`lang="zh-CN"`, `class="brand">SiYuan</div>`, `class="mark mark--error"`, "登录失败<script>"} {if !strings.Contains(page, expected) {t.Fatalf("OIDC callback page does not contain %q: %s", expected, page)diff --git a/kernel/model/session.go b/kernel/model/session.goindex 0d8895351b..7a815e065b 100644--- a/kernel/model/session.go+++ b/kernel/model/session.go@@ -17,6 +17,7 @@package modelimport (+ "bytes""image/color""net/http""net/url"@@ -31,6 +32,7 @@ import ("github.com/gin-gonic/gin""github.com/gorilla/websocket""github.com/siyuan-note/logging"+ "github.com/siyuan-note/siyuan/kernel/apicontract""github.com/siyuan-note/siyuan/kernel/util""github.com/steambap/captcha")@@ -40,14 +42,11 @@ var (BasicAuthHeaderValue = "Basic realm=\"SiYuan Authorization Require\", charset=\"UTF-8\"")-func LogoutAuth(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+func LogoutAuth(c *gin.Context, request apicontract.EmptyRequest) (ret apicontract.Response[apicontract.Null]) {+ ret = apicontract.Success(apicontract.Null{})if !IsAccessAuthRequired() {- ret.Code = -1- ret.Msg = Conf.Language(86)- ret.Data = map[string]any{"closeTimeout": 5000}+ ret = apicontract.FailureWithTimeout[apicontract.Null](-1, Conf.Language(86), 5000)return}@@ -56,82 +55,70 @@ func LogoutAuth(c *gin.Context) {if err := session.Save(c); err != nil {logging.LogError("saves session failed: " + err.Error())session.Clear(c)- ret.Code = 1- ret.Msg = Conf.Language(258)+ ret = apicontract.Failure[apicontract.Null](1, Conf.Language(258))return}util.BroadcastByType("main", "logoutAuth", 0, "", nil)+ return}-func LoginAuth(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }+func LoginAuth(c *gin.Context, request apicontract.SystemLoginAuthRequest) (ret apicontract.Response[apicontract.Null]) {+ ret = apicontract.Success(apicontract.Null{})var inputCaptcha stringsession := util.GetSession(c)workspaceSession := util.GetWorkspaceSession(session)if util.NeedCaptcha() {- captchaArg := arg["captcha"]- if nil == captchaArg {- ret.Code = 1- ret.Msg = Conf.Language(21)- logging.LogWarnf("invalid captcha")- return+ if request.CaptchaError() != nil {+ return apicontract.Failure[apicontract.Null](-1, request.CaptchaError().Error())}- inputCaptcha = captchaArg.(string)- if "" == inputCaptcha {- ret.Code = 1- ret.Msg = Conf.Language(21)+ if request.Captcha == "" {+ ret = apicontract.Failure[apicontract.Null](1, Conf.Language(21))logging.LogWarnf("invalid captcha")return}+ inputCaptcha = request.Captchaif strings.ToLower(workspaceSession.Captcha) != strings.ToLower(inputCaptcha) {- ret.Code = 1- ret.Msg = Conf.Language(22)+ ret = apicontract.Failure[apicontract.Null](1, Conf.Language(22))logging.LogWarnf("invalid captcha")workspaceSession.Captcha = gulu.Rand.String(7) // https://github.com/siyuan-note/siyuan/issues/13147if err := session.Save(c); err != nil {logging.LogError("save session failed: " + err.Error())session.Clear(c)- ret.Code = 1- ret.Msg = Conf.Language(258)+ ret = apicontract.Failure[apicontract.Null](1, Conf.Language(258))return}return}}- authCode := arg["authCode"].(string)+ if request.AuthCodeError() != nil {+ return apicontract.Failure[apicontract.Null](-1, request.AuthCodeError().Error())+ }+ authCode := request.AuthCodeauthCode = util.RemoveInvalid(authCode)authCode = strings.TrimSpace(authCode)if Conf.AccessAuthCode == "" || !util.AuthCodeEquals(Conf.AccessAuthCode, authCode) {- ret.Code = -1- ret.Msg = Conf.Language(83)+ code := -1logging.LogWarnf("invalid auth code [ip=%s]", util.GetRemoteAddr(c.Request))util.WrongAuthCount++workspaceSession.Captcha = gulu.Rand.String(7)if util.NeedCaptcha() {- ret.Code = 1 // 需要渲染验证码+ code = 1 // 需要渲染验证码}if err := session.Save(c); err != nil {logging.LogError("save session failed: " + err.Error())session.Clear(c)- ret.Code = 1- ret.Msg = Conf.Language(258)+ ret = apicontract.Failure[apicontract.Null](1, Conf.Language(258))return}- return+ return apicontract.Failure[apicontract.Null](code, Conf.Language(83))}workspaceSession.AccessAuthCode = authCode@@ -141,7 +128,7 @@ func LoginAuth(c *gin.Context) {workspaceSession.Captcha = gulu.Rand.String(7)maxAge := 0 // Default session expiration (browser session)- if rememberMe, ok := arg["rememberMe"].(bool); ok && rememberMe {+ if request.RememberMe {// Add a 'Remember me' checkbox when logging in to save a session https://github.com/siyuan-note/siyuan/pull/14964maxAge = 60 * 60 * 24 * 30 // 30 days}@@ -157,15 +144,15 @@ func LoginAuth(c *gin.Context) {if err := session.Save(c); err != nil {logging.LogError("save session failed: " + err.Error())session.Clear(c)- ret.Code = 1- ret.Msg = Conf.Language(258)+ ret = apicontract.Failure[apicontract.Null](1, Conf.Language(258))return}util.BroadcastByType("auth", "loginAuth", 0, "", nil)+ return}-func GetCaptcha(c *gin.Context) {+func GetCaptcha(c *gin.Context, request apicontract.EmptyRequest) apicontract.Response[apicontract.BinaryContent] {img, err := captcha.New(100, 26, func(options *captcha.Options) {options.CharPreset = "ABCDEFGHKLMNPQRSTUVWXYZ23456789"options.Noise = 0.5@@ -174,8 +161,7 @@ func GetCaptcha(c *gin.Context) {})if err != nil {logging.LogError("generates captcha failed: " + err.Error())- c.Status(http.StatusInternalServerError)- return+ return apicontract.EmptyHTTPResponse[apicontract.BinaryContent](http.StatusInternalServerError)}session := util.GetSession(c)@@ -183,16 +169,15 @@ func GetCaptcha(c *gin.Context) {workspaceSession.Captcha = img.Textif err = session.Save(c); err != nil {logging.LogError("save session failed: " + err.Error())- c.Status(http.StatusInternalServerError)- return+ return apicontract.EmptyHTTPResponse[apicontract.BinaryContent](http.StatusInternalServerError)}- if err = img.WriteImage(c.Writer); err != nil {+ var data bytes.Buffer+ if err = img.WriteImage(&data); err != nil {logging.LogError("writes captcha image failed: " + err.Error())- c.Status(http.StatusInternalServerError)- return+ return apicontract.EmptyHTTPResponse[apicontract.BinaryContent](http.StatusInternalServerError)}- c.Status(http.StatusOK)+ return apicontract.SuccessHTTPContent(http.StatusOK, "image/png", data.Bytes())}func CheckReadonly(c *gin.Context) {diff --git a/kernel/model/system_contract.go b/kernel/model/system_contract.gonew file mode 100644index 0000000000..3013ca1e02--- /dev/null+++ b/kernel/model/system_contract.go@@ -0,0 +1,34 @@+package model++import (+ "github.com/siyuan-note/siyuan/kernel/apicontract"+ "github.com/siyuan-note/siyuan/kernel/conf"+)++func SystemOIDCConfig(value apicontract.SystemOIDC) *conf.OIDC {+ result := &conf.OIDC{Enabled: value.Enabled, Provider: value.Provider, IssuerURL: value.IssuerURL, ClientID: value.ClientID, ClientSecret: value.ClientSecret, Scopes: value.Scopes, RedirectURL: value.RedirectURL, AllowAll: value.AllowAll}+ if value.ClaimRules != nil {+ result.ClaimRules = make([]*conf.OIDCClaimRule, len(value.ClaimRules))+ for i, rule := range value.ClaimRules {+ if rule != nil {+ result.ClaimRules[i] = &conf.OIDCClaimRule{Claim: rule.Claim, Operator: rule.Operator, Values: rule.Values}+ }+ }+ }+ return result+}+func SystemOIDCPayload(value *conf.OIDC) *apicontract.SystemOIDC {+ if value == nil {+ return nil+ }+ result := &apicontract.SystemOIDC{Enabled: value.Enabled, Provider: value.Provider, IssuerURL: value.IssuerURL, ClientID: value.ClientID, ClientSecret: value.ClientSecret, Scopes: value.Scopes, RedirectURL: value.RedirectURL, AllowAll: value.AllowAll}+ if value.ClaimRules != nil {+ result.ClaimRules = make([]*apicontract.SystemOIDCClaimRule, len(value.ClaimRules))+ for i, rule := range value.ClaimRules {+ if rule != nil {+ result.ClaimRules[i] = &apicontract.SystemOIDCClaimRule{Claim: rule.Claim, Operator: rule.Operator, Values: rule.Values}+ }+ }+ }+ return result+}