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 repository API contracts https://github.com/siyuan-note/siyuan/issues/19378
Daniel8af7054f97d5
diff --git a/.github/workflows/api-contracts.yml b/.github/workflows/api-contracts.ymlindex ebcf27438d..bded6aafb3 100644--- a/.github/workflows/api-contracts.yml+++ b/.github/workflows/api-contracts.yml@@ -43,7 +43,7 @@ jobs:run: go test ./apicontract/...working-directory: kernel- name: Test actual API responses and compatibility- run: go test -tags "fts5 sqlcipher" ./api -run "TestAPIContract|TestBlockAttrsRespectPublishAccess|TestGetBlockInfoRecovery|TestGetBlockInfoPublishAccess|TestListNotebooksSortsBySubDocCount|TestContract.*NotebookResponseLease" -count=1+ run: go test -tags "fts5 sqlcipher" ./api ./plugin -run "TestAPIContract|TestBazaarContract|TestRepoContract|TestRepoFileWireCompatibility|TestRPC.*Contract|TestRPCWebSocketOriginCheck|TestBlockAttrsRespectPublishAccess|TestGetBlockInfoRecovery|TestGetBlockInfoPublishAccess|TestListNotebooksSortsBySubDocCount|TestContract.*NotebookResponseLease" -count=1working-directory: kernel- name: Test frontend transport behaviorrun: pnpm exec tsx --test src/util/fetch.test.ts src/util/fetchTimeout.test.tsdiff --git a/app/src/history/diff.ts b/app/src/history/diff.tsindex 3eb08178c0..c8ac1ab064 100644--- a/app/src/history/diff.ts+++ b/app/src/history/diff.ts@@ -540,14 +540,14 @@ const genHTML = (left: string, right: string, dialog: Dialog, direct: string, fi<div class="fn__flex-1 fn__flex" data-type="editors"><div class="fn__none fn__flex-1 fn__flex-column"><div class="history__date">${dayjs(response.data.left.created).format("YYYY-MM-DD HH:mm")}</div>- <div class="protyle-title__input ft__center ft__breakword">${escapeHtml(response.data.left.title)}</div>+ <div class="protyle-title__input ft__center ft__breakword"></div><div class="ft__center"></div><textarea class="history__text fn__none fn__flex-1" readonly></textarea><div class="fn__flex-1"></div></div><div class="fn__none fn__flex-1 fn__flex-column" style="border-left: 1px solid var(--b3-border-color);">- <div class="history__date">${escapeHtml(response.data.right.title)} ${dayjs(response.data.right.created).format("YYYY-MM-DD HH:mm")}</div>- <div class="protyle-title__input ft__center ft__breakword">${escapeHtml(response.data.right.title)}</div>+ <div class="history__date">${dayjs(response.data.right.created).format("YYYY-MM-DD HH:mm")}</div>+ <div class="protyle-title__input ft__center ft__breakword"></div><div class="ft__center"></div><textarea class="history__text fn__none fn__flex-1" readonly></textarea><div class="fn__flex-1"></div>diff --git a/app/src/history/history.ts b/app/src/history/history.tsindex 927e43c671..53cf15a0f1 100644--- a/app/src/history/history.ts+++ b/app/src/history/history.ts@@ -8,6 +8,7 @@ import {Protyle} from "../protyle";import {disabledProtyle, onGet} from "../protyle/util/onGet";import * as dayjs from "dayjs";import {fetchPost} from "../util/fetch";+import type {APICallbackResponse, APIPOSTRoutes} from "../types/api";import {escapeAttr, escapeHtml} from "../util/escape";import {isMobile} from "../util/functions";import {showDiff} from "./diff";@@ -405,7 +406,8 @@ const renderRepo = (element: Element, currentPage: number) => {renderRepoSearchResult(response, element);});} else if (selectValue === "getRepoTagSnapshots" || selectValue === "getCloudRepoTagSnapshots") {- fetchPost(`/api/repo/${selectValue}`, {}, (response) => {+ const endpoint = `/api/repo/${selectValue}` as const;+ fetchPost(endpoint, {}, (response: APICallbackResponse<APIPOSTRoutes[typeof endpoint]["response"]>) => {renderRepoItem(response, element, selectValue);selectElement.disabled = false;});diff --git a/app/src/types/api/index.d.ts b/app/src/types/api/index.d.tsindex d1882444bc..287b5c2f8f 100644--- a/app/src/types/api/index.d.ts+++ b/app/src/types/api/index.d.ts@@ -202,6 +202,8 @@ export type CheckBlocksExistRequestInput = { "id"?: string | null; "ids": Array<export type CheckSnapshotData = { "changed": boolean; };+export type CheckoutRepoRequestInput = { "id": string; "sessionID"?: string | null; };+export type ChildBlock = { "content"?: string; "id": string; "markdown"?: string; "subType"?: string; "type": string; };export type CleanupRichTextRequestInput = { "batch": string; "groups": Array<string>; };@@ -272,6 +274,8 @@ export type DeleteBlockRequestInput = { "id": string; };export type DiffDocVersionsRequestInput = { "left": DocVersionRefInput; "right": DocVersionRefInput; };+export type DiffRepoSnapshotsRequestInput = { "left": string; "right": string; };+export type DirectoryEntry = { "isDir": boolean; "isSymlink": boolean; "name": string; "updated": number; };export type DocAttrView = { "id": string; "name": string; };@@ -298,6 +302,8 @@ export type DocVersionRefInput = { "id"?: string | null; "path"?: string | null;export type DocsInfoRequestInput = { "av": boolean; "ids": Array<string>; "refCount": boolean; };+export type DownloadCloudSnapshotRequestInput = { "id": string; "tag": string; };+export type DownloadInstallPkgRequestInput = { "downloadInstallPkg": boolean; };export type EditorReadOnlyRequestInput = { "readonly": boolean; };@@ -314,6 +320,8 @@ export type EncryptedNotebookStatus = { "id": string; "name": string; "state": "export type EncryptedNotebookStatusData = { "boxes": Array<EncryptedNotebookStatus>; "count": number; "enabled": boolean; "hasHistoryDependency": boolean; "migrationBoxes": Array<string> | null; "migrationPending": boolean; "state": "Disabled" | "Enabled" | "RecoveryRequired"; };+export type ExportRepoFileRequestInput = { "id": string; };+export type FileAnnotationRefRequestInput = { "id": string; "notebook"?: string | null; };export type FilePathData = { "path": string; };@@ -348,6 +356,8 @@ export type GetBazaarThemeRequestInput = { "frontend"?: string | null; "keyword"export type GetBazaarWidgetRequestInput = { "keyword"?: string | null; };+export type GetCloudRepoSnapshotsRequestInput = { "page": number; };+export type GetEmbedBlockRequestInput = { "breadcrumb"?: boolean | null; "embedBlockID": string; "headingMode"?: number | null; "includeIDs": Array<string>; "notebook"?: string | null; };export type GetInstalledIconRequestInput = { "keyword"?: string | null; };@@ -362,6 +372,12 @@ export type GetInstalledThemeRequestInput = { "frontend"?: string | null; "keywoexport type GetInstalledWidgetRequestInput = { "keyword"?: string | null; };+export type GetRepoDocHistoryRequestInput = { "id": string; "page": number; };++export type GetRepoFileRequestInput = { "id": string; };++export type GetRepoSnapshotsRequestInput = { "page": number; };+export type GetSnippetRequestInput = { "enabled": number; "keyword"?: string | null; "type": string; };export type GetTagRequestInput = { "app"?: string | null; "ignoreMaxListHint"?: boolean | null; "sort"?: number | null; };@@ -432,6 +448,8 @@ export type ImportMarkdownRequestInput = { "localPath": string; "notebook": striexport type ImportNotebookCryptoBackupRequestInput = { "file": Blob; "password"?: string; };+export type ImportRepoKeyRequestInput = { "key": string; };+export type ImportSYRequestInput = { "file"?: Blob; "notebook"?: string; "toPath"?: string; };export type ImportTokenRequestInput = { "token": string; };@@ -442,6 +460,8 @@ export type ImportedNotebook = { "notebook": Notebook | null; };export type ImportedNotebooks = { "notebooks": Array<Notebook | null> | null; };+export type InitRepoKeyFromPassphraseRequestInput = { "pass": string; };+export type InlineStyle = { "dark": InlineStyleTheme | null; "hidden"?: boolean; "id": string; "light": InlineStyleTheme | null; "name": string; };export type InlineStyleAV = { "colors": Array<AttributeViewCustomColor | null> | null; "order": Array<string> | null; };@@ -572,6 +592,8 @@ export type ObsidianVaultTask = { "analysis"?: ObsidianVaultAnalysis; "detail"?:export type OpenNotebookRequestInput = { "app"?: string | null; "notebook": string; };+export type OpenRepoSnapshotFileRequestInput = { "id": string; };+export type OrderedListStartData = { "found": boolean; "start": number; };export type OutlineRequestInput = { "id"?: string | null; "notebook"?: string | null; "preview"?: boolean | null; };@@ -634,10 +656,14 @@ export type RefreshBacklinkRequestInput = { "id": string; };export type RemoveBookmarkRequestInput = { "bookmark": string; };+export type RemoveCloudRepoTagSnapshotRequestInput = { "tag": string; };+export type RemoveCriterionRequestInput = { "name": string; };export type RemoveFileRequestInput = { "app"?: string | null; "path": string; };+export type RemoveRepoTagSnapshotRequestInput = { "tag": string; };+export type RemoveShorthandsRequestInput = { "ids": Array<string>; };export type RemoveTagRequestInput = { "label": string; };@@ -662,6 +688,40 @@ export type ReorderData = { "changed": boolean; "notebook"?: string; "parentPathexport type ReorderNotebooksRequestInput = { "position"?: string | null; "sourceIDs"?: Array<string> | null; "targetID"?: string | null; };+export type RepoCloudSnapshotsData = { "pageCount": number; "snapshots": Array<RepoLog | null> | null; "totalCount": number; };++export type RepoCloudTagsData = { "snapshots": Array<RepoLog | null> | null; };++export type RepoDiffData = { "addsLeft": Array<RepoDiffFile | null> | null; "left": RepoDiffIndex | null; "removesRight": Array<RepoDiffFile | null> | null; "right": RepoDiffIndex | null; "updatesLeft": Array<RepoDiffFile | null> | null; "updatesRight": Array<RepoDiffFile | null> | null; };++export type RepoDiffFile = { "fileID": string; "hPath"?: string; "hSize": string; "indexID": string; "path": string; "title": string; "updated": number; };++export type RepoDiffIndex = { "created": number; "id": string; };++export type RepoDocHistory = { "fileID": string; "hSize": string; "indexID": string; "title": string; "updated": number; };++export type RepoDocHistoryData = { "files": Array<RepoDocHistory | null> | null; "pageCount": number; "totalCount": number; };++export type RepoExportData = { "path": string; };++export type RepoFile = { "chunks": Array<string> | null; "id": string; "path": string; "size": number; "updated": number; };++export type RepoKeyData = { "key": string; };++export type RepoLog = { "count": number; "created": number; "files": Array<RepoFile | null> | null; "hCreated": string; "hSize": string; "hTagUpdated": string; "id": string; "memo": string; "size": number; "systemID": string; "systemName": string; "systemOS": string; "tag": string; };++export type RepoOpenFileData = { "content": string; "displayInText": boolean; "title": string; "updated": number; };++export type RepoSearchData = { "files": Array<RepoDiffFile | null> | null; "pageCount": number; "totalCount": number; };++export type RepoSnapshot = { "count": number; "created": number; "files": Array<RepoFile | null> | null; "hCreated": string; "hSize": string; "hTagUpdated": string; "id": string; "memo": string; "requiresDownload": boolean; "size": number; "systemID": string; "systemName": string; "systemOS": string; "tag": string; "typesCount": Array<RepoTypeCount | null> | null; };++export type RepoSnapshotsData = { "pageCount": number; "snapshots": Array<RepoSnapshot | null> | null; "totalCount": number; };++export type RepoTagsData = { "snapshots": Array<RepoSnapshot | null> | null; };++export type RepoTypeCount = { "count": number; "type": string; };+export type ResetGraphData = { "conf": GlobalGraphConf; };export type ResetLocalGraphData = { "conf": LocalGraphConf; };@@ -706,6 +766,8 @@ export type RiffReviewedCardInput = { "cardID": string; };export type RiffTreeDueCardsRequestInput = { "reviewedCards"?: Array<RiffReviewedCardInput> | null; "rootID": string; };+export type RollbackRepoSnapshotFileRequestInput = { "id": string; };+export type SQLQueryRequestInput = { "mode"?: string | null; "stmt": string; };export type SaveTemplateRequestInput = { "databaseMode"?: string; "directory"?: string; "id": string; "name": string; "overwrite": boolean; };@@ -750,6 +812,8 @@ export type SearchRefCorrelation = { "reqId": JSONValue; };export type SearchRefResult = { "blocks": Array<SearchBlock | null> | null; "k": string; "newDoc": boolean; "reqId": JSONValue; };+export type SearchRepoFileRequestInput = { "keyword": string; "page": number; };+export type SearchSubTypes = { "heading": Record<string, boolean> | null; "list": Record<string, boolean> | null; "listItem": Record<string, boolean> | null; };export type SearchSubTypesInput = { "heading"?: Record<string, boolean> | null; "list"?: Record<string, boolean> | null; "listItem"?: Record<string, boolean> | null; };@@ -786,6 +850,10 @@ export type SetPetalEnabledRequestInput = { "app"?: string | null; "enabled": boexport type SetPetalPublishEnabledRequestInput = { "enabled": boolean; "packageName": string; };+export type SetRepoIndexRetentionDaysRequestInput = { "days": number; };++export type SetRetentionIndexesDailyRequestInput = { "indexes": number; };+export type SetRiffCardsDueRequestInput = { "cardDues": Array<RiffCardDueInput>; };export type SetSnapshotMemoRequestInput = { "id": string; "memo": string; };@@ -872,6 +940,8 @@ export type SyncWebDAVInput = { "concurrentReqs"?: number | null; "endpoint"?: sexport type TagData = { "children": Array<TagData | null> | null; "count": number; "depth": number; "label": string; "name": string; "type": string; };+export type TagSnapshotRequestInput = { "id": string; "name": string; };+export type TailChildBlocksRequestInput = { "id": string; "ids"?: Array<string> | null; "n"?: number | null; "notebook"?: string | null; };export type TaskListMarkerRequestInput = { "id": string; "marker": string; };@@ -926,6 +996,8 @@ export type UpdateEmbedBlockRequestInput = { "content": string; "id": string; };export type UpdatePinnedDocsRequestInput = { "action": string; "after"?: boolean; "ids": Array<string>; "targetID"?: string; };+export type UploadCloudSnapshotRequestInput = { "id": string; "tag": string; };+export type ViewStatePatchRequestInput = { "key": string; "removeKeys"?: Array<string> | null; "values"?: { [key: string]: JSONValue }; };export type VirtualBlockRefRequestInput = { "keywords": Array<string>; };@@ -1180,31 +1252,6 @@ export type APILegacyPOSTPath ="/api/network/echo/*path" |"/api/network/forwardProxy" |"/api/network/proxy" |- "/api/repo/checkoutRepo" |- "/api/repo/diffRepoSnapshots" |- "/api/repo/downloadCloudSnapshot" |- "/api/repo/exportRepoFile" |- "/api/repo/getCloudRepoSnapshots" |- "/api/repo/getCloudRepoTagSnapshots" |- "/api/repo/getRepoDocHistory" |- "/api/repo/getRepoFile" |- "/api/repo/getRepoSnapshots" |- "/api/repo/getRepoTagSnapshots" |- "/api/repo/importRepoKey" |- "/api/repo/initRepoKey" |- "/api/repo/initRepoKeyFromPassphrase" |- "/api/repo/openRepoSnapshotFile" |- "/api/repo/purgeCloudRepo" |- "/api/repo/purgeRepo" |- "/api/repo/removeCloudRepoTagSnapshot" |- "/api/repo/removeRepoTagSnapshot" |- "/api/repo/resetRepo" |- "/api/repo/rollbackRepoSnapshotFile" |- "/api/repo/searchRepoFile" |- "/api/repo/setRepoIndexRetentionDays" |- "/api/repo/setRetentionIndexesDaily" |- "/api/repo/tagSnapshot" |- "/api/repo/uploadCloudSnapshot" |"/api/setting/getBootAppearances" |"/api/setting/getCloudUser" |"/api/setting/getPublish" |@@ -2352,16 +2399,142 @@ export interface APIPOSTRoutes {response: { "code": 0; "data": CheckSnapshotData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };body: "none";};+ "/api/repo/checkoutRepo": {+ request: CheckoutRepoRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };"/api/repo/createSnapshot": {request: CreateSnapshotRequestInput;response: { "code": 0; "data": CreateSnapshotData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };body: "json";};+ "/api/repo/diffRepoSnapshots": {+ request: DiffRepoSnapshotsRequestInput;+ response: { "code": 0; "data": RepoDiffData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/downloadCloudSnapshot": {+ request: DownloadCloudSnapshotRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/exportRepoFile": {+ request: ExportRepoFileRequestInput;+ response: { "code": 0; "data": RepoExportData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/getCloudRepoSnapshots": {+ request: GetCloudRepoSnapshotsRequestInput;+ response: { "code": 0; "data": RepoCloudSnapshotsData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/getCloudRepoTagSnapshots": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": RepoCloudTagsData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/repo/getRepoDocHistory": {+ request: GetRepoDocHistoryRequestInput;+ response: { "code": 0; "data": RepoDocHistoryData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/getRepoFile": {+ request: GetRepoFileRequestInput;+ response: Blob | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ output: "binary";+ };+ "/api/repo/getRepoSnapshots": {+ request: GetRepoSnapshotsRequestInput;+ response: { "code": 0; "data": RepoSnapshotsData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/getRepoTagSnapshots": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": RepoTagsData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/repo/importRepoKey": {+ request: ImportRepoKeyRequestInput;+ response: { "code": 0; "data": RepoKeyData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/initRepoKey": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": RepoKeyData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/repo/initRepoKeyFromPassphrase": {+ request: InitRepoKeyFromPassphraseRequestInput;+ response: { "code": 0; "data": RepoKeyData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/openRepoSnapshotFile": {+ request: OpenRepoSnapshotFileRequestInput;+ response: { "code": 0; "data": RepoOpenFileData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/purgeCloudRepo": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/repo/purgeRepo": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/repo/removeCloudRepoTagSnapshot": {+ request: RemoveCloudRepoTagSnapshotRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/removeRepoTagSnapshot": {+ request: RemoveRepoTagSnapshotRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/resetRepo": {+ request: EmptyRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "none";+ };+ "/api/repo/rollbackRepoSnapshotFile": {+ request: RollbackRepoSnapshotFileRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/searchRepoFile": {+ request: SearchRepoFileRequestInput;+ response: { "code": 0; "data": RepoSearchData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/setRepoIndexRetentionDays": {+ request: SetRepoIndexRetentionDaysRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/setRetentionIndexesDaily": {+ request: SetRetentionIndexesDailyRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };"/api/repo/setSnapshotMemo": {request: SetSnapshotMemoRequestInput;response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };body: "json";};+ "/api/repo/tagSnapshot": {+ request: TagSnapshotRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };+ "/api/repo/uploadCloudSnapshot": {+ request: UploadCloudSnapshotRequestInput;+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };+ body: "json";+ };"/api/riff/addRiffCards": {request: RiffDeckCardsRequestInput;response: { "code": 0; "data": RiffDeck | null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };diff --git a/app/tests/api-contract.types.ts b/app/tests/api-contract.types.tsindex 14f226d2fe..5538bcb090 100644--- a/app/tests/api-contract.types.ts+++ b/app/tests/api-contract.types.ts@@ -6,6 +6,19 @@ declare const fetchGet: FetchGet;declare const fetchSyncPost: FetchSyncPost;declare const dynamicURL: string;+fetchPost("/api/repo/getRepoSnapshots", {page: 1}, response => {+ const snapshots = response.data.snapshots;+ void snapshots;+});+fetchPost("/api/repo/getRepoFile", {id: "file"}, response => {+ const content: JSONValue = response;+ void content;+});+// @ts-expect-error 仓库保留时间必须为数值。+fetchPost("/api/repo/setRepoIndexRetentionDays", {days: "180"});+// @ts-expect-error 导入仓库密钥需要密钥字段。+fetchPost("/api/repo/importRepoKey", {});+fetchPost("/api/riff/getRiffDecks", {}, response => {const decks: Array<{id: string; name: string} | null> = response.data;void decks;diff --git a/docs/API-CONTRACTS.md b/docs/API-CONTRACTS.mdindex dde414ab63..8bd0bca8d1 100644--- a/docs/API-CONTRACTS.md+++ b/docs/API-CONTRACTS.md@@ -24,6 +24,8 @@ Encrypted notebook lifecycle endpoints use typed requests and responses while re## Compatibility requirements+Repository contracts retain key encoding, snapshot metadata, numeric truncation and retention defaults, cloud pagination, and file access leases. Repository-file reads retain their media type and bytes; empty files retain the success envelope. Both file success and JSON failure use HTTP 200. For this explicitly declared shared status, `ValidateHTTPResponse` accepts raw file bytes and `ValidateErrorResponse` separately verifies known error payloads. No key material, encrypted file format, or snapshot recovery behavior changes.+Flashcard contracts retain numeric truncation, pagination defaults, optional reviewed-card lists, nullable block results, and non-null deck lists. Notebook and document admission still occurs before deferred pagination errors. Card and deck mutations keep their model-layer validation and persistence behavior; encrypted notebook restrictions remain unchanged.Sync contracts retain numeric truncation, conditional direction validation in manual mode, configuration field matching and JSON numeric normalization, and message display durations. Provider imports require exactly one file and preserve encrypted package contents and recovery paths. Authorization and read-only checks still precede body decoding; synchronization and notebook encryption remain in the model layer.@@ -120,7 +122,7 @@ Run from `kernel/`:```textgo test ./apicontract/...-go test -tags "fts5 sqlcipher" ./api -run "TestAPIContract|TestBlockAttrsRespectPublishAccess|TestGetBlockInfoRecovery|TestGetBlockInfoPublishAccess|TestListNotebooksSortsBySubDocCount|TestContract.*NotebookResponseLease" -count=1+go test -tags "fts5 sqlcipher" ./api ./plugin -run "TestAPIContract|TestBazaarContract|TestRepoContract|TestRepoFileWireCompatibility|TestRPC.*Contract|TestRPCWebSocketOriginCheck|TestBlockAttrsRespectPublishAccess|TestGetBlockInfoRecovery|TestGetBlockInfoPublishAccess|TestListNotebooksSortsBySubDocCount|TestContract.*NotebookResponseLease" -count=1````tsconfig.api.json` separately enables strict checks and declaration-file checking for invalid parameters, misspelled fields, required bodies, success and failure branches, nullability, and method mismatches. The main application retains its existing configuration; do not assume strict null checks apply to every call. Handler tests use temporary workspaces and isolated test processes without starting or restarting the running kernel.diff --git a/docs/API-CONTRACTS.zh-CN.md b/docs/API-CONTRACTS.zh-CN.mdindex dab32998a8..fdae27db63 100644--- a/docs/API-CONTRACTS.zh-CN.md+++ b/docs/API-CONTRACTS.zh-CN.md@@ -24,6 +24,8 @@## 兼容要求+仓库契约保留密钥编码、快照元数据、数值截断与保留期限默认值、云端分页及文件访问租约。仓库文件读取保留媒体类型和原始字节,空文件保留成功信封。文件成功与 JSON 失败均返回 HTTP 200。对于显式声明的共用状态,`ValidateHTTPResponse` 接受文件原始字节,`ValidateErrorResponse` 单独验证已知错误载荷。密钥材料、加密文件格式及快照恢复行为保持不变。+闪卡契约保留数值截断、分页默认值、可选的已复习卡片列表、块结果的空值以及非空牌组列表。笔记本和文档准入仍先于延迟的分页错误。卡片与牌组修改保留模型层校验及持久化行为,加密笔记本限制保持不变。同步契约保留数值截断、手动模式下的条件方向校验、配置字段匹配与 JSON 数字归一化,以及消息显示时长。同步配置导入要求恰好一个文件,并保留加密包内容与恢复路径。鉴权及只读检查仍先于请求体解码,同步和笔记本加密继续由模型层处理。@@ -120,7 +122,7 @@ pnpm exec tsx --test src/util/fetch.test.ts src/util/fetchTimeout.test.ts```textgo test ./apicontract/...-go test -tags "fts5 sqlcipher" ./api -run "TestAPIContract|TestBlockAttrsRespectPublishAccess|TestGetBlockInfoRecovery|TestGetBlockInfoPublishAccess|TestListNotebooksSortsBySubDocCount|TestContract.*NotebookResponseLease" -count=1+go test -tags "fts5 sqlcipher" ./api ./plugin -run "TestAPIContract|TestBazaarContract|TestRepoContract|TestRepoFileWireCompatibility|TestRPC.*Contract|TestRPCWebSocketOriginCheck|TestBlockAttrsRespectPublishAccess|TestGetBlockInfoRecovery|TestGetBlockInfoPublishAccess|TestListNotebooksSortsBySubDocCount|TestContract.*NotebookResponseLease" -count=1````tsconfig.api.json` 单独启用严格检查并检查声明文件,覆盖参数错误、字段拼写、必填请求体、成功与失败分支、可空值和方法不匹配。主应用继续沿用现有配置,不假定全部调用都启用了严格空值检查。处理函数测试使用临时工作区和独立测试进程,不启动或重启运行中的内核。diff --git a/kernel/api/contract_repo_test.go b/kernel/api/contract_repo_test.gonew file mode 100644index 0000000000..13dbf1837a--- /dev/null+++ b/kernel/api/contract_repo_test.go@@ -0,0 +1,667 @@+package api++import (+ "bytes"+ "encoding/base64"+ "encoding/json"+ "fmt"+ "github.com/88250/gulu"+ "github.com/gabriel-vasile/mimetype"+ "github.com/gin-gonic/gin"+ "github.com/siyuan-note/dejavu"+ "github.com/siyuan-note/dejavu/entity"+ "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"+ "io"+ "mime"+ "net/http"+ "net/http/httptest"+ "path/filepath"+ "strings"+ "testing"+)++func TestRepoContractInputs(t *testing.T) {+ t.Run("setRepoIndexRetentionDays", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var days float64+ if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("days", &days, true, false)) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "setRepoIndexRetentionDays", `{"days":1.75}`, legacy, func(body []byte) error {+ _, err := apicontract.SetRepoIndexRetentionDays.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("setRetentionIndexesDaily", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var indexes float64+ if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("indexes", &indexes, true, false)) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "setRetentionIndexesDaily", `{"indexes":1.75}`, legacy, func(body []byte) error {+ _, err := apicontract.SetRetentionIndexesDaily.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("getRepoFile", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {++ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var id string+ if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("id", &id, true, true)) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "getRepoFile", `{"id":" value "}`, legacy, func(body []byte) error { _, err := apicontract.GetRepoFile.Decode(bytes.NewReader(body)); return err })+ })+ t.Run("rollbackRepoSnapshotFile", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var id string+ if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("id", &id, true, true)) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "rollbackRepoSnapshotFile", `{"id":" value "}`, legacy, func(body []byte) error {+ _, err := apicontract.RollbackRepoSnapshotFile.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("openRepoSnapshotFile", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var id string+ if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("id", &id, true, true)) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "openRepoSnapshotFile", `{"id":" value "}`, legacy, func(body []byte) error {+ _, err := apicontract.OpenRepoSnapshotFile.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("diffRepoSnapshots", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var left, right string+ if !util.ParseJsonArgs(arg, ret,+ util.BindJsonArg("left", &left, true, true),+ util.BindJsonArg("right", &right, true, true),+ ) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "diffRepoSnapshots", `{"left":" value ","right":" value "}`, legacy, func(body []byte) error {+ _, err := apicontract.DiffRepoSnapshots.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("checkoutRepo", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var id, sessionID string+ if !util.ParseJsonArgs(arg, ret,+ util.BindJsonArg("id", &id, true, true),+ util.BindJsonArg("sessionID", &sessionID, false, false),+ ) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "checkoutRepo", `{"id":" value ","sessionID":" value "}`, legacy, func(body []byte) error { _, err := apicontract.CheckoutRepo.Decode(bytes.NewReader(body)); return err })+ })+ t.Run("downloadCloudSnapshot", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var id, tag string+ if !util.ParseJsonArgs(arg, ret,+ util.BindJsonArg("id", &id, true, true),+ util.BindJsonArg("tag", &tag, true, false),+ ) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "downloadCloudSnapshot", `{"id":" value ","tag":" value "}`, legacy, func(body []byte) error {+ _, err := apicontract.DownloadCloudSnapshot.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("uploadCloudSnapshot", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var id, tag string+ if !util.ParseJsonArgs(arg, ret,+ util.BindJsonArg("id", &id, true, true),+ util.BindJsonArg("tag", &tag, true, false),+ ) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "uploadCloudSnapshot", `{"id":" value ","tag":" value "}`, legacy, func(body []byte) error {+ _, err := apicontract.UploadCloudSnapshot.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("getRepoSnapshots", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var page float64+ if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("page", &page, true, false)) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "getRepoSnapshots", `{"page":1.75}`, legacy, func(body []byte) error {+ _, err := apicontract.GetRepoSnapshots.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("searchRepoFile", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var keyword string+ var page float64+ if !util.ParseJsonArgs(arg, ret,+ util.BindJsonArg("keyword", &keyword, true, true),+ util.BindJsonArg("page", &page, true, false),+ ) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "searchRepoFile", `{"keyword":" value ","page":1.75}`, legacy, func(body []byte) error {+ _, err := apicontract.SearchRepoFile.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("getRepoDocHistory", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var id string+ var page float64+ if !util.ParseJsonArgs(arg, ret,+ util.BindJsonArg("id", &id, true, true),+ util.BindJsonArg("page", &page, true, false),+ ) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "getRepoDocHistory", `{"id":" value ","page":1.75}`, legacy, func(body []byte) error {+ _, err := apicontract.GetRepoDocHistory.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("exportRepoFile", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var id string+ if !util.ParseJsonArgs(arg, ret,+ util.BindJsonArg("id", &id, true, true),+ ) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "exportRepoFile", `{"id":" value "}`, legacy, func(body []byte) error {+ _, err := apicontract.ExportRepoFile.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("getCloudRepoSnapshots", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var page float64+ if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("page", &page, true, false)) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "getCloudRepoSnapshots", `{"page":1.75}`, legacy, func(body []byte) error {+ _, err := apicontract.GetCloudRepoSnapshots.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("getCloudRepoTagSnapshots", func(t *testing.T) {+ if _, err := apicontract.GetCloudRepoTagSnapshots.Decode(strings.NewReader("invalid JSON")); err != nil {+ t.Fatal(err)+ }+ })+ t.Run("removeCloudRepoTagSnapshot", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var tag string+ if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("tag", &tag, true, true)) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "removeCloudRepoTagSnapshot", `{"tag":" value "}`, legacy, func(body []byte) error {+ _, err := apicontract.RemoveCloudRepoTagSnapshot.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("getRepoTagSnapshots", func(t *testing.T) {+ if _, err := apicontract.GetRepoTagSnapshots.Decode(strings.NewReader("invalid JSON")); err != nil {+ t.Fatal(err)+ }+ })+ t.Run("removeRepoTagSnapshot", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var tag string+ if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("tag", &tag, true, true)) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "removeRepoTagSnapshot", `{"tag":" value "}`, legacy, func(body []byte) error {+ _, err := apicontract.RemoveRepoTagSnapshot.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("tagSnapshot", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var id, name string+ if !util.ParseJsonArgs(arg, ret,+ util.BindJsonArg("id", &id, true, true),+ util.BindJsonArg("name", &name, true, false),+ ) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "tagSnapshot", `{"id":" value ","name":" value "}`, legacy, func(body []byte) error { _, err := apicontract.TagSnapshot.Decode(bytes.NewReader(body)); return err })+ })+ t.Run("importRepoKey", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var base64Key string+ if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("key", &base64Key, true, false)) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "importRepoKey", `{"key":" value "}`, legacy, func(body []byte) error { _, err := apicontract.ImportRepoKey.Decode(bytes.NewReader(body)); return err })+ })+ t.Run("initRepoKeyFromPassphrase", func(t *testing.T) {+ legacy := func(c *gin.Context) (result *gulu.Result) {+ ret := gulu.Ret.NewResult()+ defer func() { result = ret }()++ arg, ok := util.JsonArg(c, ret)+ if !ok {+ return+ }++ var pass string+ if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("pass", &pass, true, false)) {+ return+ }+ return+ }+ checkRepoInputCompatibility(t, "initRepoKeyFromPassphrase", `{"pass":" value "}`, legacy, func(body []byte) error {+ _, err := apicontract.InitRepoKeyFromPassphrase.Decode(bytes.NewReader(body))+ return err+ })+ })+ t.Run("initRepoKey", func(t *testing.T) {+ if _, err := apicontract.InitRepoKey.Decode(strings.NewReader("invalid JSON")); err != nil {+ t.Fatal(err)+ }+ })+ t.Run("resetRepo", func(t *testing.T) {+ if _, err := apicontract.ResetRepo.Decode(strings.NewReader("invalid JSON")); err != nil {+ t.Fatal(err)+ }+ })+ t.Run("purgeRepo", func(t *testing.T) {+ if _, err := apicontract.PurgeRepo.Decode(strings.NewReader("invalid JSON")); err != nil {+ t.Fatal(err)+ }+ })+ t.Run("purgeCloudRepo", func(t *testing.T) {+ if _, err := apicontract.PurgeCloudRepo.Decode(strings.NewReader("invalid JSON")); err != nil {+ t.Fatal(err)+ }+ })+}++func checkRepoInputCompatibility(t *testing.T, name, valid string, legacy func(*gin.Context) *gulu.Result, decode func([]byte) error) {+ t.Helper()+ base := map[string]json.RawMessage{}+ json.Unmarshal([]byte(valid), &base)+ bodies := [][]byte{[]byte(valid), []byte(`{}`), []byte(`null`), []byte(``), []byte(`[`), []byte(`[]`), []byte(`1`)}+ for key := range base {+ for _, value := range []string{"null", "false", "1", "[]", "{}", `""`, `" "`} {+ changed := map[string]json.RawMessage{}+ for k, v := range base {+ changed[k] = v+ }+ changed[key] = json.RawMessage(value)+ data, _ := json.Marshal(changed)+ bodies = append(bodies, data)+ }+ changed := map[string]json.RawMessage{}+ for k, v := range base {+ if k != key {+ changed[k] = v+ }+ }+ data, _ := json.Marshal(changed)+ bodies = append(bodies, data)+ }+ for _, body := range bodies {+ c, _ := gin.CreateTestContext(httptest.NewRecorder())+ c.Request = httptest.NewRequest(http.MethodPost, "/api/repo/"+name, bytes.NewReader(body))+ expected := legacy(c)+ err := decode(body)+ message := ""+ if err != nil {+ message = err.Error()+ }+ if message != expected.Msg {+ t.Errorf("body %s: got %q want %q", body, message, expected.Msg)+ }+ }+}++func TestRepoFileWireCompatibility(t *testing.T) {+ for _, test := range []struct {+ path string+ data []byte+ }{{"file.txt", []byte("hello")}, {"file.json", []byte(`{"value":1}`)}, {"file", []byte{0, 255, 1}}, {"empty", nil}} {+ t.Run(test.path, func(t *testing.T) {+ legacy := func(c *gin.Context) {+ ret := gulu.Ret.NewResult()+ defer c.JSON(http.StatusOK, ret)+ contentType := mime.TypeByExtension(filepath.Ext(test.path))+ if contentType == "" {+ if m := mimetype.Detect(test.data); m != nil {+ contentType = m.String()+ }+ }+ if contentType == "" {+ contentType = "application/octet-stream"+ }+ c.Data(http.StatusOK, contentType, test.data)+ }+ typed := contractHandler(apicontract.GetRepoFile, func(c *gin.Context, request apicontract.GetRepoFileRequest) apicontract.Response[apicontract.BinaryContent] {+ return repoFileResponse(test.data, test.path)+ })+ engine := gin.New()+ engine.POST("/legacy", legacy)+ engine.POST("/typed", typed)+ server := httptest.NewServer(engine)+ defer server.Close()+ // 各请求独立建连,避免超出 Content-Length 的参考写入影响下一次连接复用。+ transport := &http.Transport{DisableKeepAlives: true}+ defer transport.CloseIdleConnections()+ client := &http.Client{Transport: transport}+ var payloads [][]byte+ var media []string+ for _, path := range []string{"/legacy", "/typed"} {+ response, err := client.Post(server.URL+path, "application/json", strings.NewReader(`{"id":"file"}`))+ if err != nil {+ t.Fatal(err)+ }+ body, err := io.ReadAll(response.Body)+ response.Body.Close()+ if err != nil {+ t.Fatal(err)+ }+ if response.StatusCode != 200 {+ t.Fatal(response.StatusCode)+ }+ payloads = append(payloads, body)+ media = append(media, response.Header.Get("Content-Type"))+ }+ if !bytes.Equal(payloads[0], payloads[1]) || media[0] != media[1] {+ t.Fatalf("wire mismatch: %q / %q, media %v", payloads[0], payloads[1], media)+ }+ expected := test.data+ if len(expected) == 0 {+ expected = []byte(`{"code":0,"msg":"","data":null}`)+ }+ if !bytes.Equal(payloads[1], expected) {+ t.Fatalf("unexpected file bytes: %q", payloads[1])+ }+ })+ }+}++func TestRepoContractTransport(t *testing.T) {+ log := &dejavu.Log{ID: "index", Memo: "memo", Created: 9223372036854775807, HCreated: "created", Files: []*entity.File{nil, {ID: "file", Path: "box/doc.sy", Size: 42, Updated: 2, Chunks: []string{"chunk"}}}, Count: 1, Size: 42, HSize: "42B", SystemID: "system", SystemName: "name", SystemOS: "os", Tag: "tag", HTagUpdated: "updated"}+ snapshot := &model.Snapshot{Log: log, TypesCount: []*model.TypeCount{nil, {Type: "sy", Count: 1}}, RequiresDownload: true}+ for _, pair := range [][2]interface{}{{log, repoLog(log)}, {snapshot, repoSnapshots([]*model.Snapshot{snapshot})[0]}, {[]*dejavu.Log{nil, log}, repoLogs([]*dejavu.Log{nil, log})}, {([]*dejavu.Log)(nil), repoLogs(nil)}, {[]*dejavu.Log{}, repoLogs([]*dejavu.Log{})}, {[]*model.DiffFile{nil, {FileID: "f", IndexID: "i", Title: "t", Path: "p", HPath: "h", HSize: "s", Updated: 5}}, repoDiffFiles([]*model.DiffFile{nil, {FileID: "f", IndexID: "i", Title: "t", Path: "p", HPath: "h", HSize: "s", Updated: 5}})}} {+ left, _ := json.Marshal(pair[0])+ right, _ := json.Marshal(pair[1])+ if !bytes.Equal(left, right) {+ t.Fatalf("transport mismatch: %s / %s", left, right)+ }+ }+ key := []byte{0, 1, 2, 3, 255}+ left, _ := json.Marshal(map[string][]byte{"key": key})+ right, _ := json.Marshal(apicontract.RepoKeyData{Key: base64.StdEncoding.EncodeToString(key)})+ if !bytes.Equal(left, right) {+ t.Fatalf("key encoding differs")+ }+}++func TestRepoContractHTTPFailures(t *testing.T) {+ bundle, err := apicontract.BuildBundle()+ if err != nil {+ t.Fatal(err)+ }+ for _, test := range []struct {+ name, body string+ handler gin.HandlerFunc+ }{{"getRepoFile", `{}`, getRepoFile}, {"checkoutRepo", `{"id":"snapshot","sessionID":"invalid"}`, checkoutRepo}, {"getRepoDocHistory", `{"id":"invalid","page":1}`, getRepoDocHistory}} {+ engine := gin.New()+ path := "/api/repo/" + test.name+ engine.POST(path, test.handler)+ recorder := httptest.NewRecorder()+ engine.ServeHTTP(recorder, httptest.NewRequest(http.MethodPost, path, strings.NewReader(test.body)))+ if recorder.Code != http.StatusOK || !strings.HasPrefix(recorder.Header().Get("Content-Type"), "application/json") {+ t.Fatalf("unexpected repository error status or media: %d %s", recorder.Code, recorder.Header().Get("Content-Type"))+ }+ if err := bundle.ValidateErrorResponse(http.MethodPost, path, recorder.Body.Bytes()); err != nil {+ t.Fatal(err)+ }+ var response struct {+ Code int+ Data json.RawMessage+ }+ json.Unmarshal(recorder.Body.Bytes(), &response)+ if response.Code != -1 || string(response.Data) != "null" {+ t.Fatal(recorder.Body.String())+ }+ }+}++func TestRepoContractLockedFileAdmission(t *testing.T) {+ root, boxID := setupArchiveWorkspace(t)+ previousConf, previousRepo, previousTemp := model.Conf, util.RepoDir, util.TempDir+ model.Conf = model.NewAppConf()+ model.Conf.Repo = conf.NewRepo()+ model.Conf.Sync = conf.NewSync()+ model.Conf.System = &conf.System{ID: "contract-device", Name: "contract-device", OS: "test"}+ model.Conf.Repo.Key = bytes.Repeat([]byte{1}, 32)+ util.RepoDir, util.TempDir = filepath.Join(root, "repo"), filepath.Join(root, "temp")+ t.Cleanup(func() { model.Conf, util.RepoDir, util.TempDir = previousConf, previousRepo, previousTemp })+ store, err := dejavu.NewStore(util.RepoDir, model.Conf.Repo.Key)+ if err != nil {+ t.Fatal(err)+ }+ file := entity.NewFile("/"+boxID+"/20260101000000-abcdefg.sy", 10, 1000)+ if err := store.PutFile(file); err != nil {+ t.Fatal(err)+ }+ bundle, err := apicontract.BuildBundle()+ if err != nil {+ t.Fatal(err)+ }+ for _, test := range []struct {+ name string+ handler gin.HandlerFunc+ }{{"getRepoFile", getRepoFile}, {"rollbackRepoSnapshotFile", rollbackRepoSnapshotFile}, {"openRepoSnapshotFile", openRepoSnapshotFile}, {"exportRepoFile", exportRepoFile}} {+ path := "/api/repo/" + test.name+ engine := gin.New()+ engine.POST(path, test.handler)+ recorder := httptest.NewRecorder()+ engine.ServeHTTP(recorder, httptest.NewRequest(http.MethodPost, path, strings.NewReader(fmt.Sprintf(`{"id":%q}`, file.ID))))+ var response struct {+ Code int+ Msg string+ }+ json.Unmarshal(recorder.Body.Bytes(), &response)+ if response.Code != -1 || response.Msg != model.Conf.Language(314) {+ t.Fatalf("%s locked admission: %s", test.name, recorder.Body.String())+ }+ if err := bundle.ValidateErrorResponse(http.MethodPost, path, recorder.Body.Bytes()); err != nil {+ t.Fatal(err)+ }+ }+}diff --git a/kernel/api/repo.go b/kernel/api/repo.goindex 9925685462..dbc1727ec5 100644--- a/kernel/api/repo.go+++ b/kernel/api/repo.go@@ -17,192 +17,100 @@package apiimport (+ "encoding/base64""encoding/json""fmt""mime"- "net/http""os""path/filepath""github.com/88250/gulu""github.com/gabriel-vasile/mimetype""github.com/gin-gonic/gin"+ "github.com/siyuan-note/dejavu"+ "github.com/siyuan-note/dejavu/entity""github.com/siyuan-note/siyuan/kernel/apicontract""github.com/siyuan-note/siyuan/kernel/model""github.com/siyuan-note/siyuan/kernel/treenode""github.com/siyuan-note/siyuan/kernel/util")-func setRepoIndexRetentionDays(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }-- var days float64- if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("days", &days, true, false)) {- return- }- daysInt := int(days)+var setRepoIndexRetentionDays = contractHandler(apicontract.SetRepoIndexRetentionDays, func(c *gin.Context, request apicontract.SetRepoIndexRetentionDaysRequest) apicontract.Response[apicontract.Null] {+ daysInt := int(request.Days)if 1 > daysInt {daysInt = 180}model.Conf.Repo.IndexRetentionDays = daysIntmodel.Conf.Save()-}--func setRetentionIndexesDaily(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }+ return apicontract.Success(apicontract.Null{})+})- var indexes float64- if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("indexes", &indexes, true, false)) {- return- }- indexesInt := int(indexes)+var setRetentionIndexesDaily = contractHandler(apicontract.SetRetentionIndexesDaily, func(c *gin.Context, request apicontract.SetRetentionIndexesDailyRequest) apicontract.Response[apicontract.Null] {+ indexesInt := int(request.Indexes)if 1 > indexesInt {indexesInt = 180}model.Conf.Repo.RetentionIndexesDaily = indexesIntmodel.Conf.Save()-}-func getRepoFile(c *gin.Context) {- // Add internal kernel API `/api/repo/getRepoFile` https://github.com/siyuan-note/siyuan/issues/10101+ return apicontract.Success(apicontract.Null{})+})+var getRepoFile = contractHandler(apicontract.GetRepoFile, func(c *gin.Context, request apicontract.GetRepoFileRequest) apicontract.Response[apicontract.BinaryContent] {ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)- arg, ok := util.JsonArg(c, ret)- if !ok {- return+ if !holdRepoFileRequest(c, request.ID, ret) {+ return contractFailure[apicontract.BinaryContent](ret)}-- var id string- if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("id", &id, true, true)) {- return- }- if !holdRepoFileRequest(c, id, ret) {- return- }- data, p, err := model.GetRepoFile(id)+ data, p, err := model.GetRepoFile(request.ID)if err != nil {- ret.Code = -1- ret.Msg = err.Error()- return+ return apicontract.Failure[apicontract.BinaryContent](-1, err.Error())}- contentType := mime.TypeByExtension(filepath.Ext(p))- if "" == contentType {- if m := mimetype.Detect(data); nil != m {- contentType = m.String()- }- }- if "" == contentType {- contentType = "application/octet-stream"- }- c.Data(http.StatusOK, contentType, data)-}+ return repoFileResponse(data, p)+})-func rollbackRepoSnapshotFile(c *gin.Context) {+var rollbackRepoSnapshotFile = contractHandler(apicontract.RollbackRepoSnapshotFile, func(c *gin.Context, request apicontract.RollbackRepoSnapshotFileRequest) apicontract.Response[apicontract.Null] {ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }-- var id string- if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("id", &id, true, true)) {- return- }- if !holdRepoFileRequest(c, id, ret) {- return+ if !holdRepoFileRequest(c, request.ID, ret) {+ return contractFailure[apicontract.Null](ret)}- err := model.RollbackRepoSnapshotFile(id)+ err := model.RollbackRepoSnapshotFile(request.ID)if nil != err {- ret.Code = -1- ret.Msg = err.Error()- return+ return apicontract.Failure[apicontract.Null](-1, err.Error())}-}-func openRepoSnapshotFile(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+ return apicontract.Success(apicontract.Null{})+})- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }+var openRepoSnapshotFile = contractHandler(apicontract.OpenRepoSnapshotFile, func(c *gin.Context, request apicontract.OpenRepoSnapshotFileRequest) apicontract.Response[apicontract.RepoOpenFileData] {+ ret := gulu.Ret.NewResult()- var id string- if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("id", &id, true, true)) {- return- }- if !holdRepoFileRequest(c, id, ret) {- return+ if !holdRepoFileRequest(c, request.ID, ret) {+ return contractFailure[apicontract.RepoOpenFileData](ret)}- title, content, displayInText, updated, err := model.OpenRepoSnapshotFile(id)+ title, content, displayInText, updated, err := model.OpenRepoSnapshotFile(request.ID)if err != nil {- ret.Code = -1- ret.Msg = err.Error()- return- }-- ret.Data = map[string]any{- "title": title,- "content": content,- "displayInText": displayInText,- "updated": updated,+ return apicontract.Failure[apicontract.RepoOpenFileData](-1, err.Error())}-}--func diffRepoSnapshots(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }+ return apicontract.Success(apicontract.RepoOpenFileData{Title: title, Content: content, DisplayInText: displayInText, Updated: updated})+})- var left, right string- if !util.ParseJsonArgs(arg, ret,- util.BindJsonArg("left", &left, true, true),- util.BindJsonArg("right", &right, true, true),- ) {- return- }- diff, err := model.DiffRepoSnapshots(left, right)+var diffRepoSnapshots = contractHandler(apicontract.DiffRepoSnapshots, func(c *gin.Context, request apicontract.DiffRepoSnapshotsRequest) apicontract.Response[apicontract.RepoDiffData] {+ diff, err := model.DiffRepoSnapshots(request.Left, request.Right)if err != nil {- ret.Code = -1- ret.Msg = err.Error()- return+ return apicontract.Failure[apicontract.RepoDiffData](-1, err.Error())}- ret.Data = map[string]any{- "addsLeft": diff.AddsLeft,- "updatesLeft": diff.UpdatesLeft,- "updatesRight": diff.UpdatesRight,- "removesRight": diff.RemovesRight,- "left": diff.LeftIndex,- "right": diff.RightIndex,- }-}+ return apicontract.Success(apicontract.RepoDiffData{AddsLeft: repoDiffFiles(diff.AddsLeft), UpdatesLeft: repoDiffFiles(diff.UpdatesLeft), UpdatesRight: repoDiffFiles(diff.UpdatesRight), RemovesRight: repoDiffFiles(diff.RemovesRight), Left: (*apicontract.RepoDiffIndex)(diff.LeftIndex), Right: (*apicontract.RepoDiffIndex)(diff.RightIndex)})+})var getCloudSpace = contractHandler(apicontract.GetCloudSpace, func(c *gin.Context, request apicontract.EmptyRequest) apicontract.Response[apicontract.CloudSpaceData] {sync, backup, hSize, hAssetSize, hTotalSize, exchangeSize, hTrafficUploadSize, hTrafficDownloadSize, hTrafficAPIGet, hTrafficAPIPut, err := model.GetCloudSpace()@@ -218,216 +126,98 @@ var getCloudSpace = contractHandler(apicontract.GetCloudSpace, func(c *gin.Conte})})-func checkoutRepo(c *gin.Context) {+var checkoutRepo = contractHandler(apicontract.CheckoutRepo, func(c *gin.Context, request apicontract.CheckoutRepoRequest) apicontract.Response[apicontract.Null] {ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }-- var id, sessionID string- if !util.ParseJsonArgs(arg, ret,- util.BindJsonArg("id", &id, true, true),- util.BindJsonArg("sessionID", &sessionID, false, false),- ) {- return- }- if sessionID != "" {- if util.InvalidIDPattern(sessionID, ret) {- return+ if request.SessionID != "" {+ if util.InvalidIDPattern(request.SessionID, ret) {+ return contractFailure[apicontract.Null](ret)}markerDir := filepath.Join(util.TempDir, "ai", "agent")os.MkdirAll(markerDir, 0755)- markerPath := filepath.Join(markerDir, "agentRollback_"+sessionID+".json")- marker := map[string]string{"sessionID": sessionID, "snapshotID": id}+ markerPath := filepath.Join(markerDir, "agentRollback_"+request.SessionID+".json")+ marker := map[string]string{"sessionID": request.SessionID, "snapshotID": request.ID}if data, err := json.Marshal(marker); err == nil {os.WriteFile(markerPath, data, 0644)}}- model.CheckoutRepo(id)-}--func downloadCloudSnapshot(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+ model.CheckoutRepo(request.ID)- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }+ return apicontract.Success(apicontract.Null{})+})- var id, tag string- if !util.ParseJsonArgs(arg, ret,- util.BindJsonArg("id", &id, true, true),- util.BindJsonArg("tag", &tag, true, false),- ) {- return- }- if err := model.DownloadCloudSnapshot(tag, id); err != nil {- ret.Code = -1- ret.Msg = err.Error()- return+var downloadCloudSnapshot = contractHandler(apicontract.DownloadCloudSnapshot, func(c *gin.Context, request apicontract.DownloadCloudSnapshotRequest) apicontract.Response[apicontract.Null] {+ if err := model.DownloadCloudSnapshot(request.Tag, request.ID); err != nil {+ return apicontract.Failure[apicontract.Null](-1, err.Error())}-}-func uploadCloudSnapshot(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }+ return apicontract.Success(apicontract.Null{})+})- var id, tag string- if !util.ParseJsonArgs(arg, ret,- util.BindJsonArg("id", &id, true, true),- util.BindJsonArg("tag", &tag, true, false),- ) {- return- }- if err := model.UploadCloudSnapshot(tag, id); err != nil {- ret.Code = -1- ret.Msg = err.Error()- return+var uploadCloudSnapshot = contractHandler(apicontract.UploadCloudSnapshot, func(c *gin.Context, request apicontract.UploadCloudSnapshotRequest) apicontract.Response[apicontract.Null] {+ if err := model.UploadCloudSnapshot(request.Tag, request.ID); err != nil {+ return apicontract.Failure[apicontract.Null](-1, err.Error())}-}-func getRepoSnapshots(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }+ return apicontract.Success(apicontract.Null{})+})- var page float64- if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("page", &page, true, false)) {- return- }- snapshots, pageCount, totalCount, err := model.GetRepoSnapshots(int(page))+var getRepoSnapshots = contractHandler(apicontract.GetRepoSnapshots, func(c *gin.Context, request apicontract.GetRepoSnapshotsRequest) apicontract.Response[apicontract.RepoSnapshotsData] {+ snapshots, pageCount, totalCount, err := model.GetRepoSnapshots(int(request.Page))if err != nil {- ret.Code = -1- ret.Msg = err.Error()- return- }- ret.Data = map[string]any{- "snapshots": snapshots,- "pageCount": pageCount,- "totalCount": totalCount,- }-}--func searchRepoFile(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- arg, ok := util.JsonArg(c, ret)- if !ok {- return+ return apicontract.Failure[apicontract.RepoSnapshotsData](-1, err.Error())}+ return apicontract.Success(apicontract.RepoSnapshotsData{Snapshots: repoSnapshots(snapshots), PageCount: pageCount, TotalCount: totalCount})+})- var keyword string- var page float64- if !util.ParseJsonArgs(arg, ret,- util.BindJsonArg("keyword", &keyword, true, true),- util.BindJsonArg("page", &page, true, false),- ) {- return- }- if 1 > len(keyword) {- ret.Code = -1- ret.Msg = "keyword is empty"- return+var searchRepoFile = contractHandler(apicontract.SearchRepoFile, func(c *gin.Context, request apicontract.SearchRepoFileRequest) apicontract.Response[apicontract.RepoSearchData] {+ if 1 > len(request.Keyword) {+ return apicontract.Failure[apicontract.RepoSearchData](-1, "keyword is empty")}- files, pageCount, totalCount, err := model.SearchRepoFile(keyword, int(page))+ files, pageCount, totalCount, err := model.SearchRepoFile(request.Keyword, int(request.Page))if err != nil {- ret.Code = -1- ret.Msg = err.Error()- return+ return apicontract.Failure[apicontract.RepoSearchData](-1, err.Error())}- ret.Data = map[string]any{- "files": files,- "pageCount": pageCount,- "totalCount": totalCount,- }-}+ return apicontract.Success(apicontract.RepoSearchData{Files: repoDiffFiles(files), PageCount: pageCount, TotalCount: totalCount})+})-func getRepoDocHistory(c *gin.Context) {+var getRepoDocHistory = contractHandler(apicontract.GetRepoDocHistory, func(c *gin.Context, request apicontract.GetRepoDocHistoryRequest) apicontract.Response[apicontract.RepoDocHistoryData] {ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- arg, ok := util.JsonArg(c, ret)- if !ok {- return+ if util.InvalidIDPattern(request.ID, ret) {+ return contractFailure[apicontract.RepoDocHistoryData](ret)}- var id string- var page float64- if !util.ParseJsonArgs(arg, ret,- util.BindJsonArg("id", &id, true, true),- util.BindJsonArg("page", &page, true, false),- ) || util.InvalidIDPattern(id, ret) {- return- }- if block := treenode.GetBlockTree(id); block != nil {+ if block := treenode.GetBlockTree(request.ID); block != nil {if err := holdEncryptedBoxRequest(c, block.BoxID); err != nil {- ret.Code = -1- ret.Msg = model.Conf.Language(314)- return+ return apicontract.Failure[apicontract.RepoDocHistoryData](-1, model.Conf.Language(314))}}- files, pageCount, totalCount, err := model.GetRepoDocHistory(id, int(page))+ files, pageCount, totalCount, err := model.GetRepoDocHistory(request.ID, int(request.Page))if err != nil {- ret.Code = -1- ret.Msg = err.Error()- return+ return apicontract.Failure[apicontract.RepoDocHistoryData](-1, err.Error())}- ret.Data = map[string]any{- "files": files,- "pageCount": pageCount,- "totalCount": totalCount,- }-}+ return apicontract.Success(apicontract.RepoDocHistoryData{Files: repoDocHistories(files), PageCount: pageCount, TotalCount: totalCount})+})-func exportRepoFile(c *gin.Context) {+var exportRepoFile = contractHandler(apicontract.ExportRepoFile, func(c *gin.Context, request apicontract.ExportRepoFileRequest) apicontract.Response[apicontract.RepoExportData] {ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }- var id string- if !util.ParseJsonArgs(arg, ret,- util.BindJsonArg("id", &id, true, true),- ) {- return- }- if !holdRepoFileRequest(c, id, ret) {- return+ if !holdRepoFileRequest(c, request.ID, ret) {+ return contractFailure[apicontract.RepoExportData](ret)}- exportPath, err := model.ExportRepoFile(id)+ exportPath, err := model.ExportRepoFile(request.ID)if err != nil {- ret.Code = -1- ret.Msg = err.Error()- return+ return apicontract.Failure[apicontract.RepoExportData](-1, err.Error())}- ret.Data = map[string]any{- "path": exportPath,- }-}+ return apicontract.Success(apicontract.RepoExportData{Path: exportPath})+})func holdRepoFileRequest(c *gin.Context, id string, ret *gulu.Result) bool {boxID, err := model.ResolveRepoFileBoxID(id)@@ -444,107 +234,50 @@ func holdRepoFileRequest(c *gin.Context, id string, ret *gulu.Result) bool {return true}-func getCloudRepoSnapshots(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }-- var page float64- if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("page", &page, true, false)) {- return- }-- snapshots, pageCount, totalCount, err := model.GetCloudRepoSnapshots(int(page))+var getCloudRepoSnapshots = contractHandler(apicontract.GetCloudRepoSnapshots, func(c *gin.Context, request apicontract.GetCloudRepoSnapshotsRequest) apicontract.Response[apicontract.RepoCloudSnapshotsData] {+ snapshots, pageCount, totalCount, err := model.GetCloudRepoSnapshots(int(request.Page))if err != nil {- ret.Code = -1- ret.Msg = err.Error()- return+ return apicontract.Failure[apicontract.RepoCloudSnapshotsData](-1, err.Error())}- ret.Data = map[string]any{- "snapshots": snapshots,- "pageCount": pageCount,- "totalCount": totalCount,- }-}--func getCloudRepoTagSnapshots(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+ return apicontract.Success(apicontract.RepoCloudSnapshotsData{Snapshots: repoLogs(snapshots), PageCount: pageCount, TotalCount: totalCount})+})+var getCloudRepoTagSnapshots = contractHandler(apicontract.GetCloudRepoTagSnapshots, func(c *gin.Context, request apicontract.EmptyRequest) apicontract.Response[apicontract.RepoCloudTagsData] {snapshots, err := model.GetCloudRepoTagSnapshots()if err != nil {- ret.Code = -1- ret.Msg = err.Error()- return- }-- ret.Data = map[string]any{- "snapshots": snapshots,+ return apicontract.Failure[apicontract.RepoCloudTagsData](-1, err.Error())}-}--func removeCloudRepoTagSnapshot(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }+ return apicontract.Success(apicontract.RepoCloudTagsData{Snapshots: repoLogs(snapshots)})+})- var tag string- if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("tag", &tag, true, true)) {- return- }- err := model.RemoveCloudRepoTag(tag)+var removeCloudRepoTagSnapshot = contractHandler(apicontract.RemoveCloudRepoTagSnapshot, func(c *gin.Context, request apicontract.RemoveCloudRepoTagSnapshotRequest) apicontract.Response[apicontract.Null] {+ err := model.RemoveCloudRepoTag(request.Tag)if err != nil {- ret.Code = -1- ret.Msg = err.Error()- return+ return apicontract.Failure[apicontract.Null](-1, err.Error())}-}-func getRepoTagSnapshots(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+ return apicontract.Success(apicontract.Null{})+})+var getRepoTagSnapshots = contractHandler(apicontract.GetRepoTagSnapshots, func(c *gin.Context, request apicontract.EmptyRequest) apicontract.Response[apicontract.RepoTagsData] {snapshots, err := model.GetTagSnapshots()if err != nil {- ret.Code = -1- ret.Msg = err.Error()- return- }-- ret.Data = map[string]any{- "snapshots": snapshots,+ return apicontract.Failure[apicontract.RepoTagsData](-1, err.Error())}-}--func removeRepoTagSnapshot(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)- arg, ok := util.JsonArg(c, ret)- if !ok {- return- }+ return apicontract.Success(apicontract.RepoTagsData{Snapshots: repoSnapshots(snapshots)})+})- var tag string- if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("tag", &tag, true, true)) {- return- }- err := model.RemoveTagSnapshot(tag)+var removeRepoTagSnapshot = contractHandler(apicontract.RemoveRepoTagSnapshot, func(c *gin.Context, request apicontract.RemoveRepoTagSnapshotRequest) apicontract.Response[apicontract.Null] {+ err := model.RemoveTagSnapshot(request.Tag)if err != nil {- ret.Code = -1- ret.Msg = err.Error()- return+ return apicontract.Failure[apicontract.Null](-1, err.Error())}-}++ return apicontract.Success(apicontract.Null{})+})var createSnapshot = contractHandler(apicontract.CreateSnapshot, func(c *gin.Context, request apicontract.CreateSnapshotRequest) apicontract.Response[apicontract.CreateSnapshotData] {id, created, err := model.CreateRepoSnapshot(request.Memo)@@ -569,129 +302,141 @@ var setSnapshotMemo = contractHandler(apicontract.SetSnapshotMemo, func(c *gin.Creturn apicontract.Success(apicontract.Null{})})-func tagSnapshot(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- arg, ok := util.JsonArg(c, ret)- if !ok {- return+var tagSnapshot = contractHandler(apicontract.TagSnapshot, func(c *gin.Context, request apicontract.TagSnapshotRequest) apicontract.Response[apicontract.Null] {+ if err := model.TagSnapshot(request.ID, request.Name); err != nil {+ return apicontract.FailureWithTimeout[apicontract.Null](-1, fmt.Sprintf(model.Conf.Language(140), err), 5000)}- var id, name string- if !util.ParseJsonArgs(arg, ret,- util.BindJsonArg("id", &id, true, true),- util.BindJsonArg("name", &name, true, false),- ) {- return- }- if err := model.TagSnapshot(id, name); err != nil {- ret.Code = -1- ret.Msg = fmt.Sprintf(model.Conf.Language(140), err)- ret.Data = map[string]any{"closeTimeout": 5000}- return+ return apicontract.Success(apicontract.Null{})+})++var importRepoKey = contractHandler(apicontract.ImportRepoKey, func(c *gin.Context, request apicontract.ImportRepoKeyRequest) apicontract.Response[apicontract.RepoKeyData] {+ retKey, err := model.ImportRepoKey(request.Key)+ if err != nil {+ return apicontract.FailureWithTimeout[apicontract.RepoKeyData](-1, fmt.Sprintf(model.Conf.Language(137), err), 5000)}-}-func importRepoKey(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+ return apicontract.Success(apicontract.RepoKeyData{Key: retKey})+})- arg, ok := util.JsonArg(c, ret)- if !ok {- return+var initRepoKeyFromPassphrase = contractHandler(apicontract.InitRepoKeyFromPassphrase, func(c *gin.Context, request apicontract.InitRepoKeyFromPassphraseRequest) apicontract.Response[apicontract.RepoKeyData] {+ if err := model.InitRepoKeyFromPassphrase(request.Pass); err != nil {+ return apicontract.FailureWithTimeout[apicontract.RepoKeyData](-1, fmt.Sprintf(model.Conf.Language(137), err), 5000)}- var base64Key string- if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("key", &base64Key, true, false)) {- return+ return apicontract.Success(apicontract.RepoKeyData{Key: base64.StdEncoding.EncodeToString(model.Conf.Repo.Key)})+})++var initRepoKey = contractHandler(apicontract.InitRepoKey, func(c *gin.Context, request apicontract.EmptyRequest) apicontract.Response[apicontract.RepoKeyData] {+ if err := model.InitRepoKey(); err != nil {+ return apicontract.FailureWithTimeout[apicontract.RepoKeyData](-1, fmt.Sprintf(model.Conf.Language(137), err), 5000)}- retKey, err := model.ImportRepoKey(base64Key)- if err != nil {- ret.Code = -1- ret.Msg = fmt.Sprintf(model.Conf.Language(137), err)- ret.Data = map[string]any{"closeTimeout": 5000}- return++ return apicontract.Success(apicontract.RepoKeyData{Key: base64.StdEncoding.EncodeToString(model.Conf.Repo.Key)})+})++var resetRepo = contractHandler(apicontract.ResetRepo, func(c *gin.Context, request apicontract.EmptyRequest) apicontract.Response[apicontract.Null] {+ if err := model.ResetRepo(); err != nil {+ return apicontract.FailureWithTimeout[apicontract.Null](-1, fmt.Sprintf(model.Conf.Language(146), err.Error()), 5000)}- ret.Data = map[string]any{- "key": retKey,+ return apicontract.Success(apicontract.Null{})+})++var purgeRepo = contractHandler(apicontract.PurgeRepo, func(c *gin.Context, request apicontract.EmptyRequest) apicontract.Response[apicontract.Null] {+ if err := model.PurgeRepo(); err != nil {+ return apicontract.FailureWithTimeout[apicontract.Null](-1, fmt.Sprintf(model.Conf.Language(201), err.Error()), 5000)}-}-func initRepoKeyFromPassphrase(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)+ return apicontract.Success(apicontract.Null{})+})- arg, ok := util.JsonArg(c, ret)- if !ok {- return+var purgeCloudRepo = contractHandler(apicontract.PurgeCloudRepo, func(c *gin.Context, request apicontract.EmptyRequest) apicontract.Response[apicontract.Null] {+ if err := model.PurgeCloud(); err != nil {+ return apicontract.FailureWithTimeout[apicontract.Null](-1, fmt.Sprintf(model.Conf.Language(201), err.Error()), 5000)}- var pass string- if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("pass", &pass, true, false)) {- return+ return apicontract.Success(apicontract.Null{})+})++// repoFileResponse 保留文件媒体类型和文件内容末尾的成功信封。+func repoFileResponse(data []byte, path string) apicontract.Response[apicontract.BinaryContent] {+ contentType := mime.TypeByExtension(filepath.Ext(path))+ if contentType == "" {+ if detected := mimetype.Detect(data); detected != nil {+ contentType = detected.String()+ }}- if err := model.InitRepoKeyFromPassphrase(pass); err != nil {- ret.Code = -1- ret.Msg = fmt.Sprintf(model.Conf.Language(137), err)- ret.Data = map[string]any{"closeTimeout": 5000}- return+ if contentType == "" {+ contentType = "application/octet-stream"}-- ret.Data = map[string]any{- "key": model.Conf.Repo.Key,+ // 非空文件由 Content-Length 限定载荷;空文件保留成功信封。+ if len(data) == 0 {+ data, _ = json.Marshal(apicontract.Success(apicontract.Null{}))}+ return apicontract.SuccessBinary(contentType, data)}--func initRepoKey(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- if err := model.InitRepoKey(); err != nil {- ret.Code = -1- ret.Msg = fmt.Sprintf(model.Conf.Language(137), err)- ret.Data = map[string]any{"closeTimeout": 5000}- return+func repoDiffFiles(values []*model.DiffFile) []*apicontract.RepoDiffFile {+ if values == nil {+ return nil}-- ret.Data = map[string]any{- "key": model.Conf.Repo.Key,+ ret := make([]*apicontract.RepoDiffFile, len(values))+ for i, value := range values {+ ret[i] = (*apicontract.RepoDiffFile)(value)}+ return ret}--func resetRepo(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- if err := model.ResetRepo(); err != nil {- ret.Code = -1- ret.Msg = fmt.Sprintf(model.Conf.Language(146), err.Error())- ret.Data = map[string]any{"closeTimeout": 5000}- return+func repoDocHistories(values []*model.RepoDocHistory) []*apicontract.RepoDocHistory {+ if values == nil {+ return nil}+ ret := make([]*apicontract.RepoDocHistory, len(values))+ for i, value := range values {+ ret[i] = (*apicontract.RepoDocHistory)(value)+ }+ return ret}--func purgeRepo(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- if err := model.PurgeRepo(); err != nil {- ret.Code = -1- ret.Msg = fmt.Sprintf(model.Conf.Language(201), err.Error())- ret.Data = map[string]any{"closeTimeout": 5000}- return+func repoLog(value *dejavu.Log) *apicontract.RepoLog {+ if value == nil {+ return nil+ }+ ret := &apicontract.RepoLog{ID: value.ID, Memo: value.Memo, Created: value.Created, HCreated: value.HCreated, Count: value.Count, Size: value.Size, HSize: value.HSize, SystemID: value.SystemID, SystemName: value.SystemName, SystemOS: value.SystemOS, Tag: value.Tag, HTagUpdated: value.HTagUpdated}+ if value.Files != nil {+ ret.Files = make([]*apicontract.RepoFile, len(value.Files))+ for i, file := range value.Files {+ ret.Files[i] = repoFile(file)+ }}+ return ret}--func purgeCloudRepo(c *gin.Context) {- ret := gulu.Ret.NewResult()- defer c.JSON(http.StatusOK, ret)-- if err := model.PurgeCloud(); err != nil {- ret.Code = -1- ret.Msg = fmt.Sprintf(model.Conf.Language(201), err.Error())- ret.Data = map[string]any{"closeTimeout": 5000}- return+func repoFile(value *entity.File) *apicontract.RepoFile { return (*apicontract.RepoFile)(value) }+func repoLogs(values []*dejavu.Log) []*apicontract.RepoLog {+ if values == nil {+ return nil+ }+ ret := make([]*apicontract.RepoLog, len(values))+ for i, value := range values {+ ret[i] = repoLog(value)+ }+ return ret+}+func repoSnapshots(values []*model.Snapshot) []*apicontract.RepoSnapshot {+ if values == nil {+ return nil+ }+ ret := make([]*apicontract.RepoSnapshot, len(values))+ for i, value := range values {+ if value == nil {+ continue+ }+ snapshot := &apicontract.RepoSnapshot{RepoLog: *repoLog(value.Log), RequiresDownload: value.RequiresDownload}+ if value.TypesCount != nil {+ snapshot.TypesCount = make([]*apicontract.RepoTypeCount, len(value.TypesCount))+ for j, count := range value.TypesCount {+ snapshot.TypesCount[j] = (*apicontract.RepoTypeCount)(count)+ }+ }+ ret[i] = snapshot}+ return ret}diff --git a/kernel/apicontract/contracts.go b/kernel/apicontract/contracts.goindex 94ffa70776..e5837c0b43 100644--- a/kernel/apicontract/contracts.go+++ b/kernel/apicontract/contracts.go@@ -649,3 +649,29 @@ var RenameRiffDeck = define[RenameRiffDeckRequest, Null]("renameRiffDeck", "/apivar RemoveRiffDeck = define[RiffDeckRequest, Null]("removeRiffDeck", "/api/riff/removeRiffDeck", JSONBody, ResponseOptions{}, "POST")var CreateRiffDeck = define[CreateRiffDeckRequest, *RiffDeck]("createRiffDeck", "/api/riff/createRiffDeck", JSONBody, ResponseOptions{}, "POST")var GetRiffDecks = define[EmptyRequest, []*RiffDeck]("getRiffDecks", "/api/riff/getRiffDecks", NoBody, ResponseOptions{NonNullable: true}, "POST")++var SetRepoIndexRetentionDays = define[SetRepoIndexRetentionDaysRequest, Null]("setRepoIndexRetentionDays", "/api/repo/setRepoIndexRetentionDays", JSONBody, ResponseOptions{}, "POST")+var SetRetentionIndexesDaily = define[SetRetentionIndexesDailyRequest, Null]("setRetentionIndexesDaily", "/api/repo/setRetentionIndexesDaily", JSONBody, ResponseOptions{}, "POST")+var GetRepoFile = define[GetRepoFileRequest, BinaryContent]("getRepoFile", "/api/repo/getRepoFile", JSONBody, ResponseOptions{Output: BinaryOutput, ErrorStatus: 200}, "POST")+var RollbackRepoSnapshotFile = define[RollbackRepoSnapshotFileRequest, Null]("rollbackRepoSnapshotFile", "/api/repo/rollbackRepoSnapshotFile", JSONBody, ResponseOptions{}, "POST")+var OpenRepoSnapshotFile = define[OpenRepoSnapshotFileRequest, RepoOpenFileData]("openRepoSnapshotFile", "/api/repo/openRepoSnapshotFile", JSONBody, ResponseOptions{}, "POST")+var DiffRepoSnapshots = define[DiffRepoSnapshotsRequest, RepoDiffData]("diffRepoSnapshots", "/api/repo/diffRepoSnapshots", JSONBody, ResponseOptions{}, "POST")+var CheckoutRepo = define[CheckoutRepoRequest, Null]("checkoutRepo", "/api/repo/checkoutRepo", JSONBody, ResponseOptions{}, "POST")+var DownloadCloudSnapshot = define[DownloadCloudSnapshotRequest, Null]("downloadCloudSnapshot", "/api/repo/downloadCloudSnapshot", JSONBody, ResponseOptions{}, "POST")+var UploadCloudSnapshot = define[UploadCloudSnapshotRequest, Null]("uploadCloudSnapshot", "/api/repo/uploadCloudSnapshot", JSONBody, ResponseOptions{}, "POST")+var GetRepoSnapshots = define[GetRepoSnapshotsRequest, RepoSnapshotsData]("getRepoSnapshots", "/api/repo/getRepoSnapshots", JSONBody, ResponseOptions{}, "POST")+var SearchRepoFile = define[SearchRepoFileRequest, RepoSearchData]("searchRepoFile", "/api/repo/searchRepoFile", JSONBody, ResponseOptions{}, "POST")+var GetRepoDocHistory = define[GetRepoDocHistoryRequest, RepoDocHistoryData]("getRepoDocHistory", "/api/repo/getRepoDocHistory", JSONBody, ResponseOptions{}, "POST")+var ExportRepoFile = define[ExportRepoFileRequest, RepoExportData]("exportRepoFile", "/api/repo/exportRepoFile", JSONBody, ResponseOptions{}, "POST")+var GetCloudRepoSnapshots = define[GetCloudRepoSnapshotsRequest, RepoCloudSnapshotsData]("getCloudRepoSnapshots", "/api/repo/getCloudRepoSnapshots", JSONBody, ResponseOptions{}, "POST")+var GetCloudRepoTagSnapshots = define[EmptyRequest, RepoCloudTagsData]("getCloudRepoTagSnapshots", "/api/repo/getCloudRepoTagSnapshots", NoBody, ResponseOptions{}, "POST")+var RemoveCloudRepoTagSnapshot = define[RemoveCloudRepoTagSnapshotRequest, Null]("removeCloudRepoTagSnapshot", "/api/repo/removeCloudRepoTagSnapshot", JSONBody, ResponseOptions{}, "POST")+var GetRepoTagSnapshots = define[EmptyRequest, RepoTagsData]("getRepoTagSnapshots", "/api/repo/getRepoTagSnapshots", NoBody, ResponseOptions{}, "POST")+var RemoveRepoTagSnapshot = define[RemoveRepoTagSnapshotRequest, Null]("removeRepoTagSnapshot", "/api/repo/removeRepoTagSnapshot", JSONBody, ResponseOptions{}, "POST")+var TagSnapshot = define[TagSnapshotRequest, Null]("tagSnapshot", "/api/repo/tagSnapshot", JSONBody, ResponseOptions{}, "POST")+var ImportRepoKey = define[ImportRepoKeyRequest, RepoKeyData]("importRepoKey", "/api/repo/importRepoKey", JSONBody, ResponseOptions{}, "POST")+var InitRepoKeyFromPassphrase = define[InitRepoKeyFromPassphraseRequest, RepoKeyData]("initRepoKeyFromPassphrase", "/api/repo/initRepoKeyFromPassphrase", JSONBody, ResponseOptions{}, "POST")+var InitRepoKey = define[EmptyRequest, RepoKeyData]("initRepoKey", "/api/repo/initRepoKey", NoBody, ResponseOptions{}, "POST")+var ResetRepo = define[EmptyRequest, Null]("resetRepo", "/api/repo/resetRepo", NoBody, ResponseOptions{}, "POST")+var PurgeRepo = define[EmptyRequest, Null]("purgeRepo", "/api/repo/purgeRepo", NoBody, ResponseOptions{}, "POST")+var PurgeCloudRepo = define[EmptyRequest, Null]("purgeCloudRepo", "/api/repo/purgeCloudRepo", NoBody, ResponseOptions{}, "POST")diff --git a/kernel/apicontract/legacy_routes.json b/kernel/apicontract/legacy_routes.jsonindex bbf49b6916..929e009a87 100644--- a/kernel/apicontract/legacy_routes.json+++ b/kernel/apicontract/legacy_routes.json@@ -187,31 +187,6 @@{"method":"POST","path":"/api/filetree/setSort","handler":"setSort"},{"method":"POST","path":"/api/filetree/upsertIndexes","handler":"upsertIndexes"},{"method":"POST","path":"/api/network/forwardProxy","handler":"forwardProxy"},- {"method":"POST","path":"/api/repo/checkoutRepo","handler":"checkoutRepo"},- {"method":"POST","path":"/api/repo/diffRepoSnapshots","handler":"diffRepoSnapshots"},- {"method":"POST","path":"/api/repo/downloadCloudSnapshot","handler":"downloadCloudSnapshot"},- {"method":"POST","path":"/api/repo/exportRepoFile","handler":"exportRepoFile"},- {"method":"POST","path":"/api/repo/getCloudRepoSnapshots","handler":"getCloudRepoSnapshots"},- {"method":"POST","path":"/api/repo/getCloudRepoTagSnapshots","handler":"getCloudRepoTagSnapshots"},- {"method":"POST","path":"/api/repo/getRepoDocHistory","handler":"getRepoDocHistory"},- {"method":"POST","path":"/api/repo/getRepoFile","handler":"getRepoFile"},- {"method":"POST","path":"/api/repo/getRepoSnapshots","handler":"getRepoSnapshots"},- {"method":"POST","path":"/api/repo/getRepoTagSnapshots","handler":"getRepoTagSnapshots"},- {"method":"POST","path":"/api/repo/importRepoKey","handler":"importRepoKey"},- {"method":"POST","path":"/api/repo/initRepoKey","handler":"initRepoKey"},- {"method":"POST","path":"/api/repo/initRepoKeyFromPassphrase","handler":"initRepoKeyFromPassphrase"},- {"method":"POST","path":"/api/repo/openRepoSnapshotFile","handler":"openRepoSnapshotFile"},- {"method":"POST","path":"/api/repo/purgeCloudRepo","handler":"purgeCloudRepo"},- {"method":"POST","path":"/api/repo/purgeRepo","handler":"purgeRepo"},- {"method":"POST","path":"/api/repo/removeCloudRepoTagSnapshot","handler":"removeCloudRepoTagSnapshot"},- {"method":"POST","path":"/api/repo/removeRepoTagSnapshot","handler":"removeRepoTagSnapshot"},- {"method":"POST","path":"/api/repo/resetRepo","handler":"resetRepo"},- {"method":"POST","path":"/api/repo/rollbackRepoSnapshotFile","handler":"rollbackRepoSnapshotFile"},- {"method":"POST","path":"/api/repo/searchRepoFile","handler":"searchRepoFile"},- {"method":"POST","path":"/api/repo/setRepoIndexRetentionDays","handler":"setRepoIndexRetentionDays"},- {"method":"POST","path":"/api/repo/setRetentionIndexesDaily","handler":"setRetentionIndexesDaily"},- {"method":"POST","path":"/api/repo/tagSnapshot","handler":"tagSnapshot"},- {"method":"POST","path":"/api/repo/uploadCloudSnapshot","handler":"uploadCloudSnapshot"},{"method":"POST","path":"/api/setting/getBootAppearances","handler":"getBootAppearances"},{"method":"POST","path":"/api/setting/getCloudUser","handler":"getCloudUser"},{"method":"POST","path":"/api/setting/getPublish","handler":"getPublish"},diff --git a/kernel/apicontract/repo.go b/kernel/apicontract/repo.goindex 8119ce1246..30ac3f503b 100644--- a/kernel/apicontract/repo.go+++ b/kernel/apicontract/repo.go@@ -1,5 +1,13 @@package apicontract+import (+ "encoding/json"+ "errors"+ "fmt"+ "io"+ "strings"+)+type CreateSnapshotRequest struct {Memo string `json:"memo" api:"optional"`}@@ -17,3 +25,400 @@ type SetSnapshotMemoRequest struct {ID string `json:"id"`Memo string `json:"memo"`}++type SetRepoIndexRetentionDaysRequest struct {+ Days float64 `json:"days"`+}+type SetRetentionIndexesDailyRequest struct {+ Indexes float64 `json:"indexes"`+}+type GetRepoFileRequest struct {+ ID string `json:"id" api:"trim"`+}+type RollbackRepoSnapshotFileRequest struct {+ ID string `json:"id" api:"trim"`+}+type OpenRepoSnapshotFileRequest struct {+ ID string `json:"id" api:"trim"`+}+type DiffRepoSnapshotsRequest struct {+ Left string `json:"left" api:"trim"`+ Right string `json:"right" api:"trim"`+}+type CheckoutRepoRequest struct {+ ID string `json:"id" api:"trim"`+ SessionID string `json:"sessionID" api:"optional,nullable"`+}+type DownloadCloudSnapshotRequest struct {+ ID string `json:"id" api:"trim"`+ Tag string `json:"tag"`+}+type UploadCloudSnapshotRequest struct {+ ID string `json:"id" api:"trim"`+ Tag string `json:"tag"`+}+type GetRepoSnapshotsRequest struct {+ Page float64 `json:"page"`+}+type SearchRepoFileRequest struct {+ Keyword string `json:"keyword" api:"trim"`+ Page float64 `json:"page"`+}+type GetRepoDocHistoryRequest struct {+ ID string `json:"id" api:"trim"`+ Page float64 `json:"page"`+}+type ExportRepoFileRequest struct {+ ID string `json:"id" api:"trim"`+}+type GetCloudRepoSnapshotsRequest struct {+ Page float64 `json:"page"`+}+type RemoveCloudRepoTagSnapshotRequest struct {+ Tag string `json:"tag" api:"trim"`+}+type RemoveRepoTagSnapshotRequest struct {+ Tag string `json:"tag" api:"trim"`+}+type TagSnapshotRequest struct {+ ID string `json:"id" api:"trim"`+ Name string `json:"name"`+}+type ImportRepoKeyRequest struct {+ Key string `json:"key"`+}+type InitRepoKeyFromPassphraseRequest struct {+ Pass string `json:"pass"`+}++type RepoOpenFileData struct {+ Title string `json:"title"`+ Content string `json:"content"`+ DisplayInText bool `json:"displayInText"`+ Updated int64 `json:"updated"`+}+type RepoDiffData struct {+ AddsLeft []*RepoDiffFile `json:"addsLeft"`+ UpdatesLeft []*RepoDiffFile `json:"updatesLeft"`+ UpdatesRight []*RepoDiffFile `json:"updatesRight"`+ RemovesRight []*RepoDiffFile `json:"removesRight"`+ Left *RepoDiffIndex `json:"left"`+ Right *RepoDiffIndex `json:"right"`+}+type RepoSnapshotsData struct {+ Snapshots []*RepoSnapshot `json:"snapshots"`+ PageCount int `json:"pageCount"`+ TotalCount int `json:"totalCount"`+}+type RepoCloudSnapshotsData struct {+ Snapshots []*RepoLog `json:"snapshots"`+ PageCount int `json:"pageCount"`+ TotalCount int `json:"totalCount"`+}+type RepoTagsData struct {+ Snapshots []*RepoSnapshot `json:"snapshots"`+}+type RepoCloudTagsData struct {+ Snapshots []*RepoLog `json:"snapshots"`+}+type RepoSearchData struct {+ Files []*RepoDiffFile `json:"files"`+ PageCount int `json:"pageCount"`+ TotalCount int `json:"totalCount"`+}+type RepoDocHistoryData struct {+ Files []*RepoDocHistory `json:"files"`+ PageCount int `json:"pageCount"`+ TotalCount int `json:"totalCount"`+}+type RepoExportData struct {+ Path string `json:"path"`+}+type RepoKeyData struct {+ Key string `json:"key"`+}+type RepoSnapshot struct {+ RepoLog+ TypesCount []*RepoTypeCount `json:"typesCount"`+ RequiresDownload bool `json:"requiresDownload"`+}+type RepoDiffFile struct {+ FileID string `json:"fileID"`+ IndexID string `json:"indexID"`+ Title string `json:"title"`+ Path string `json:"path"`+ HPath string `json:"hPath,omitempty"`+ HSize string `json:"hSize"`+ Updated int64 `json:"updated"`+}+type RepoDiffIndex struct {+ ID string `json:"id"`+ Created int64 `json:"created"`+}+type RepoDocHistory struct {+ FileID string `json:"fileID"`+ IndexID string `json:"indexID"`+ Title string `json:"title"`+ HSize string `json:"hSize"`+ Updated int64 `json:"updated"`+}+type RepoTypeCount struct {+ Type string `json:"type"`+ Count int `json:"count"`+}+type RepoLog struct {+ ID string `json:"id"` // 索引 ID+ Memo string `json:"memo"` // 索引备注+ Created int64 `json:"created"` // 索引时间+ HCreated string `json:"hCreated"` // 索引时间 "2006-01-02 15:04:05"+ Files []*RepoFile `json:"files"` // 文件列表+ Count int `json:"count"` // 文件总数+ Size int64 `json:"size"` // 文件总大小+ HSize string `json:"hSize"` // 格式化好的文件总大小 "10.00 MB"+ SystemID string `json:"systemID"` // 设备 ID+ SystemName string `json:"systemName"` // 设备名称+ SystemOS string `json:"systemOS"` // 设备操作系统+ Tag string `json:"tag"` // 索引标记名称+ HTagUpdated string `json:"hTagUpdated"` // 标记时间 "2006-01-02 15:04:05"+}+type RepoFile struct {+ ID string `json:"id"` // 文件标识+ Path string `json:"path"` // 文件路径+ Size int64 `json:"size"` // 文件大小+ Updated int64 `json:"updated"` // 最后更新时间+ Chunks []string `json:"chunks"` // 文件分块列表+}++func repoRequestFields(reader io.Reader, path string) (map[string]json.RawMessage, error) {+ fields, err := blockRequestFields(reader, path)+ if err != nil {+ return nil, errors.New(strings.ReplaceAll(err.Error(), "map[string]json.RawMessage", "map[string]interface {}"))+ }+ return fields, nil+}+func repoRequestString(fields map[string]json.RawMessage, key string, required, trim bool) (string, error) {+ value, err := legacyField[string](fields, key, "String", required)+ if err != nil {+ return "", err+ }+ if trim && len(fields[key]) > 0 && string(fields[key]) != "null" {+ value = strings.TrimSpace(value)+ if value == "" {+ return "", fmt.Errorf("Field [%s] must not be empty", key)+ }+ }+ return value, nil+}+func init() {+ SetRepoIndexRetentionDays.decodeRequest = func(reader io.Reader) (request SetRepoIndexRetentionDaysRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/setRepoIndexRetentionDays")+ if err != nil {+ return request, err+ }+ if request.Days, err = legacyField[float64](fields, "days", "Number", true); err != nil {+ return request, err+ }+ return request, nil+ }+ SetRetentionIndexesDaily.decodeRequest = func(reader io.Reader) (request SetRetentionIndexesDailyRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/setRetentionIndexesDaily")+ if err != nil {+ return request, err+ }+ if request.Indexes, err = legacyField[float64](fields, "indexes", "Number", true); err != nil {+ return request, err+ }+ return request, nil+ }+ GetRepoFile.decodeRequest = func(reader io.Reader) (request GetRepoFileRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/getRepoFile")+ if err != nil {+ return request, err+ }+ if request.ID, err = repoRequestString(fields, "id", true, true); err != nil {+ return request, err+ }+ return request, nil+ }+ RollbackRepoSnapshotFile.decodeRequest = func(reader io.Reader) (request RollbackRepoSnapshotFileRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/rollbackRepoSnapshotFile")+ if err != nil {+ return request, err+ }+ if request.ID, err = repoRequestString(fields, "id", true, true); err != nil {+ return request, err+ }+ return request, nil+ }+ OpenRepoSnapshotFile.decodeRequest = func(reader io.Reader) (request OpenRepoSnapshotFileRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/openRepoSnapshotFile")+ if err != nil {+ return request, err+ }+ if request.ID, err = repoRequestString(fields, "id", true, true); err != nil {+ return request, err+ }+ return request, nil+ }+ DiffRepoSnapshots.decodeRequest = func(reader io.Reader) (request DiffRepoSnapshotsRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/diffRepoSnapshots")+ if err != nil {+ return request, err+ }+ if request.Left, err = repoRequestString(fields, "left", true, true); err != nil {+ return request, err+ }+ if request.Right, err = repoRequestString(fields, "right", true, true); err != nil {+ return request, err+ }+ return request, nil+ }+ CheckoutRepo.decodeRequest = func(reader io.Reader) (request CheckoutRepoRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/checkoutRepo")+ if err != nil {+ return request, err+ }+ if request.ID, err = repoRequestString(fields, "id", true, true); err != nil {+ return request, err+ }+ if request.SessionID, err = repoRequestString(fields, "sessionID", false, false); err != nil {+ return request, err+ }+ return request, nil+ }+ DownloadCloudSnapshot.decodeRequest = func(reader io.Reader) (request DownloadCloudSnapshotRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/downloadCloudSnapshot")+ if err != nil {+ return request, err+ }+ if request.ID, err = repoRequestString(fields, "id", true, true); err != nil {+ return request, err+ }+ if request.Tag, err = repoRequestString(fields, "tag", true, false); err != nil {+ return request, err+ }+ return request, nil+ }+ UploadCloudSnapshot.decodeRequest = func(reader io.Reader) (request UploadCloudSnapshotRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/uploadCloudSnapshot")+ if err != nil {+ return request, err+ }+ if request.ID, err = repoRequestString(fields, "id", true, true); err != nil {+ return request, err+ }+ if request.Tag, err = repoRequestString(fields, "tag", true, false); err != nil {+ return request, err+ }+ return request, nil+ }+ GetRepoSnapshots.decodeRequest = func(reader io.Reader) (request GetRepoSnapshotsRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/getRepoSnapshots")+ if err != nil {+ return request, err+ }+ if request.Page, err = legacyField[float64](fields, "page", "Number", true); err != nil {+ return request, err+ }+ return request, nil+ }+ SearchRepoFile.decodeRequest = func(reader io.Reader) (request SearchRepoFileRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/searchRepoFile")+ if err != nil {+ return request, err+ }+ if request.Keyword, err = repoRequestString(fields, "keyword", true, true); err != nil {+ return request, err+ }+ if request.Page, err = legacyField[float64](fields, "page", "Number", true); err != nil {+ return request, err+ }+ return request, nil+ }+ GetRepoDocHistory.decodeRequest = func(reader io.Reader) (request GetRepoDocHistoryRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/getRepoDocHistory")+ if err != nil {+ return request, err+ }+ if request.ID, err = repoRequestString(fields, "id", true, true); err != nil {+ return request, err+ }+ if request.Page, err = legacyField[float64](fields, "page", "Number", true); err != nil {+ return request, err+ }+ return request, nil+ }+ ExportRepoFile.decodeRequest = func(reader io.Reader) (request ExportRepoFileRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/exportRepoFile")+ if err != nil {+ return request, err+ }+ if request.ID, err = repoRequestString(fields, "id", true, true); err != nil {+ return request, err+ }+ return request, nil+ }+ GetCloudRepoSnapshots.decodeRequest = func(reader io.Reader) (request GetCloudRepoSnapshotsRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/getCloudRepoSnapshots")+ if err != nil {+ return request, err+ }+ if request.Page, err = legacyField[float64](fields, "page", "Number", true); err != nil {+ return request, err+ }+ return request, nil+ }+ RemoveCloudRepoTagSnapshot.decodeRequest = func(reader io.Reader) (request RemoveCloudRepoTagSnapshotRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/removeCloudRepoTagSnapshot")+ if err != nil {+ return request, err+ }+ if request.Tag, err = repoRequestString(fields, "tag", true, true); err != nil {+ return request, err+ }+ return request, nil+ }+ RemoveRepoTagSnapshot.decodeRequest = func(reader io.Reader) (request RemoveRepoTagSnapshotRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/removeRepoTagSnapshot")+ if err != nil {+ return request, err+ }+ if request.Tag, err = repoRequestString(fields, "tag", true, true); err != nil {+ return request, err+ }+ return request, nil+ }+ TagSnapshot.decodeRequest = func(reader io.Reader) (request TagSnapshotRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/tagSnapshot")+ if err != nil {+ return request, err+ }+ if request.ID, err = repoRequestString(fields, "id", true, true); err != nil {+ return request, err+ }+ if request.Name, err = repoRequestString(fields, "name", true, false); err != nil {+ return request, err+ }+ return request, nil+ }+ ImportRepoKey.decodeRequest = func(reader io.Reader) (request ImportRepoKeyRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/importRepoKey")+ if err != nil {+ return request, err+ }+ if request.Key, err = repoRequestString(fields, "key", true, false); err != nil {+ return request, err+ }+ return request, nil+ }+ InitRepoKeyFromPassphrase.decodeRequest = func(reader io.Reader) (request InitRepoKeyFromPassphraseRequest, err error) {+ fields, err := repoRequestFields(reader, "/api/repo/initRepoKeyFromPassphrase")+ if err != nil {+ return request, err+ }+ if request.Pass, err = repoRequestString(fields, "pass", true, false); err != nil {+ return request, err+ }+ return request, nil+ }+}diff --git a/kernel/apicontract/repo_test.go b/kernel/apicontract/repo_test.goindex f7160e7688..1e56df1bca 100644--- a/kernel/apicontract/repo_test.go+++ b/kernel/apicontract/repo_test.go@@ -33,3 +33,33 @@ func TestSnapshotContracts(t *testing.T) {}}}++func TestRepoRemainingResponseContracts(t *testing.T) {+ bundle, err := BuildBundle()+ if err != nil {+ t.Fatal(err)+ }+ for _, test := range []struct {+ path string+ body string+ }{+ {"getRepoSnapshots", `{"code":0,"msg":"","data":{"snapshots":[],"pageCount":0,"totalCount":0}}`},+ {"getRepoTagSnapshots", `{"code":0,"msg":"","data":{"snapshots":null}}`},+ {"getCloudRepoSnapshots", `{"code":0,"msg":"","data":{"snapshots":[null],"pageCount":1,"totalCount":1}}`},+ {"diffRepoSnapshots", `{"code":0,"msg":"","data":{"addsLeft":[],"updatesLeft":null,"updatesRight":[],"removesRight":[],"left":{"id":"left","created":1},"right":{"id":"right","created":2}}}`},+ {"initRepoKey", `{"code":0,"msg":"","data":{"key":"AAECAw=="}}`},+ {"importRepoKey", `{"code":-1,"msg":"invalid key","data":{"closeTimeout":5000}}`},+ {"purgeRepo", `{"code":-1,"msg":"failed","data":{"closeTimeout":5000}}`},+ {"tagSnapshot", `{"code":-1,"msg":"failed","data":{"closeTimeout":5000}}`},+ } {+ if err := bundle.ValidateResponse("POST", "/api/repo/"+test.path, []byte(test.body)); err != nil {+ t.Errorf("%s: %v", test.path, err)+ }+ }+ if err := bundle.ValidateErrorResponse("POST", "/api/repo/getRepoFile", []byte(`{"code":-1,"msg":"locked","data":null}`)); err != nil {+ t.Fatal(err)+ }+ if err := bundle.ValidateErrorResponse("POST", "/api/repo/getRepoFile", []byte(`{"code":-1,"msg":"locked","data":{"unexpected":1}}`)); err == nil {+ t.Fatal("undeclared repository error payload accepted")+ }+}diff --git a/kernel/apicontract/schema.json b/kernel/apicontract/schema.jsonindex 0d79dfe9b2..0b705e6218 100644--- a/kernel/apicontract/schema.json+++ b/kernel/apicontract/schema.json@@ -3697,6 +3697,28 @@],"additionalProperties": false},+ "CheckoutRepoRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ },+ "sessionID": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "id"+ ],+ "additionalProperties": false+ },"ChildBlock": {"type": "object","properties": {@@ -5164,6 +5186,22 @@],"additionalProperties": false},+ "DiffRepoSnapshotsRequestInput": {+ "type": "object",+ "properties": {+ "left": {+ "type": "string"+ },+ "right": {+ "type": "string"+ }+ },+ "required": [+ "left",+ "right"+ ],+ "additionalProperties": false+ },"DirectoryEntry": {"type": "object","properties": {@@ -5628,6 +5666,22 @@],"additionalProperties": false},+ "DownloadCloudSnapshotRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ },+ "tag": {+ "type": "string"+ }+ },+ "required": [+ "id",+ "tag"+ ],+ "additionalProperties": false+ },"DownloadInstallPkgRequestInput": {"type": "object","properties": {@@ -5858,6 +5912,18 @@],"additionalProperties": false},+ "ExportRepoFileRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ }+ },+ "required": [+ "id"+ ],+ "additionalProperties": false+ },"FileAnnotationRefRequestInput": {"type": "object","properties": {@@ -6435,6 +6501,18 @@},"additionalProperties": false},+ "GetCloudRepoSnapshotsRequestInput": {+ "type": "object",+ "properties": {+ "page": {+ "type": "number"+ }+ },+ "required": [+ "page"+ ],+ "additionalProperties": false+ },"GetEmbedBlockRequestInput": {"type": "object","properties": {@@ -6596,6 +6674,46 @@},"additionalProperties": false},+ "GetRepoDocHistoryRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ },+ "page": {+ "type": "number"+ }+ },+ "required": [+ "id",+ "page"+ ],+ "additionalProperties": false+ },+ "GetRepoFileRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ }+ },+ "required": [+ "id"+ ],+ "additionalProperties": false+ },+ "GetRepoSnapshotsRequestInput": {+ "type": "object",+ "properties": {+ "page": {+ "type": "number"+ }+ },+ "required": [+ "page"+ ],+ "additionalProperties": false+ },"GetSnippetRequestInput": {"type": "object","properties": {@@ -7815,6 +7933,18 @@],"additionalProperties": false},+ "ImportRepoKeyRequestInput": {+ "type": "object",+ "properties": {+ "key": {+ "type": "string"+ }+ },+ "required": [+ "key"+ ],+ "additionalProperties": false+ },"ImportSYRequestInput": {"type": "object","properties": {@@ -7910,6 +8040,18 @@],"additionalProperties": false},+ "InitRepoKeyFromPassphraseRequestInput": {+ "type": "object",+ "properties": {+ "pass": {+ "type": "string"+ }+ },+ "required": [+ "pass"+ ],+ "additionalProperties": false+ },"InlineStyle": {"type": "object","properties": {@@ -10337,6 +10479,18 @@],"additionalProperties": false},+ "OpenRepoSnapshotFileRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ }+ },+ "required": [+ "id"+ ],+ "additionalProperties": false+ },"OrderedListStartData": {"type": "object","properties": {@@ -11131,6 +11285,18 @@],"additionalProperties": false},+ "RemoveCloudRepoTagSnapshotRequestInput": {+ "type": "object",+ "properties": {+ "tag": {+ "type": "string"+ }+ },+ "required": [+ "tag"+ ],+ "additionalProperties": false+ },"RemoveCriterionRequestInput": {"type": "object","properties": {@@ -11165,6 +11331,18 @@],"additionalProperties": false},+ "RemoveRepoTagSnapshotRequestInput": {+ "type": "object",+ "properties": {+ "tag": {+ "type": "string"+ }+ },+ "required": [+ "tag"+ ],+ "additionalProperties": false+ },"RemoveShorthandsRequestInput": {"type": "object","properties": {@@ -11399,39 +11577,25 @@},"additionalProperties": false},- "ResetGraphData": {- "type": "object",- "properties": {- "conf": {- "$ref": "#/$defs/GlobalGraphConf"- }- },- "required": [- "conf"- ],- "additionalProperties": false- },- "ResetLocalGraphData": {- "type": "object",- "properties": {- "conf": {- "$ref": "#/$defs/LocalGraphConf"- }- },- "required": [- "conf"- ],- "additionalProperties": false- },- "ResetRiffCardsRequestInput": {+ "RepoCloudSnapshotsData": {"type": "object","properties": {- "blockIDs": {+ "pageCount": {+ "type": "integer"+ },+ "snapshots": {"anyOf": [{"type": "array","items": {- "type": "string"+ "anyOf": [+ {+ "$ref": "#/$defs/RepoLog"+ },+ {+ "type": "null"+ }+ ]}},{@@ -11439,41 +11603,33 @@}]},- "deckID": {- "type": "string"- },- "id": {- "type": "string"- },- "type": {- "type": "string"+ "totalCount": {+ "type": "integer"}},"required": [- "deckID",- "id",- "type"+ "pageCount",+ "snapshots",+ "totalCount"],"additionalProperties": false},- "ReviewRiffCardRequestInput": {+ "RepoCloudTagsData": {"type": "object","properties": {- "cardID": {- "type": "string"- },- "deckID": {- "type": "string"- },- "rating": {- "type": "number"- },- "reviewedCards": {+ "snapshots": {"anyOf": [{"type": "array","items": {- "$ref": "#/$defs/RiffReviewedCardInput"+ "anyOf": [+ {+ "$ref": "#/$defs/RepoLog"+ },+ {+ "type": "null"+ }+ ]}},{@@ -11483,40 +11639,56 @@}},"required": [- "cardID",- "deckID",- "rating"+ "snapshots"],"additionalProperties": false},- "RichClipboardAssetInput": {+ "RepoDiffData": {"type": "object","properties": {- "box": {- "type": "string"+ "addsLeft": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/RepoDiffFile"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},- "index": {- "type": "integer"+ "left": {+ "anyOf": [+ {+ "$ref": "#/$defs/RepoDiffIndex"+ },+ {+ "type": "null"+ }+ ]},- "path": {- "type": "string"- }- },- "required": [- "index",- "path"- ],- "additionalProperties": false- },- "RichClipboardPrepared": {- "type": "object",- "properties": {- "assets": {+ "removesRight": {"anyOf": [{"type": "array","items": {- "$ref": "#/$defs/RichClipboardPreparedAsset"+ "anyOf": [+ {+ "$ref": "#/$defs/RepoDiffFile"+ },+ {+ "type": "null"+ }+ ]}},{@@ -11524,72 +11696,44 @@}]},- "batch": {- "type": "string"+ "right": {+ "anyOf": [+ {+ "$ref": "#/$defs/RepoDiffIndex"+ },+ {+ "type": "null"+ }+ ]},- "groups": {+ "updatesLeft": {"anyOf": [{"type": "array","items": {- "type": "string"+ "anyOf": [+ {+ "$ref": "#/$defs/RepoDiffFile"+ },+ {+ "type": "null"+ }+ ]}},{"type": "null"}]- }- },- "required": [- "assets",- "batch",- "groups"- ],- "additionalProperties": false- },- "RichClipboardPreparedAsset": {- "type": "object",- "properties": {- "index": {- "type": "integer"},- "path": {- "type": "string"- }- },- "required": [- "index",- "path"- ],- "additionalProperties": false- },- "RiffBlockIDsRequestInput": {- "type": "object",- "properties": {- "blockIDs": {- "type": "array",- "items": {- "type": "string"- }- }- },- "required": [- "blockIDs"- ],- "additionalProperties": false- },- "RiffBlocksData": {- "type": "object",- "properties": {- "blocks": {+ "updatesRight": {"anyOf": [{"type": "array","items": {"anyOf": [{- "$ref": "#/$defs/SearchBlock"+ "$ref": "#/$defs/RepoDiffFile"},{"type": "null"@@ -11604,53 +11748,105 @@}},"required": [- "blocks"+ "addsLeft",+ "left",+ "removesRight",+ "right",+ "updatesLeft",+ "updatesRight"],"additionalProperties": false},- "RiffCardDueInput": {+ "RepoDiffFile": {"type": "object","properties": {- "due": {+ "fileID": {+ "type": "string"+ },+ "hPath": {+ "type": "string"+ },+ "hSize": {+ "type": "string"+ },+ "indexID": {+ "type": "string"+ },+ "path": {+ "type": "string"+ },+ "title": {"type": "string"},+ "updated": {+ "type": "integer"+ }+ },+ "required": [+ "fileID",+ "hSize",+ "indexID",+ "path",+ "title",+ "updated"+ ],+ "additionalProperties": false+ },+ "RepoDiffIndex": {+ "type": "object",+ "properties": {+ "created": {+ "type": "integer"+ },"id": {"type": "string"}},"required": [- "due",+ "created","id"],"additionalProperties": false},- "RiffCardRequestInput": {+ "RepoDocHistory": {"type": "object","properties": {- "cardID": {+ "fileID": {"type": "string"},- "deckID": {+ "hSize": {+ "type": "string"+ },+ "indexID": {+ "type": "string"+ },+ "title": {"type": "string"+ },+ "updated": {+ "type": "integer"}},"required": [- "cardID",- "deckID"+ "fileID",+ "hSize",+ "indexID",+ "title",+ "updated"],"additionalProperties": false},- "RiffCardsData": {+ "RepoDocHistoryData": {"type": "object","properties": {- "blocks": {+ "files": {"anyOf": [{"type": "array","items": {"anyOf": [{- "$ref": "#/$defs/SearchBlock"+ "$ref": "#/$defs/RepoDocHistory"},{"type": "null"@@ -11666,126 +11862,101 @@"pageCount": {"type": "integer"},- "total": {+ "totalCount": {"type": "integer"}},"required": [- "blocks",+ "files","pageCount",- "total"+ "totalCount"],"additionalProperties": false},- "RiffCardsRequestInput": {+ "RepoExportData": {"type": "object","properties": {- "id": {+ "path": {"type": "string"- },- "page": {- "type": "number"- },- "pageSize": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]}},"required": [- "id",- "page"+ "path"],"additionalProperties": false},- "RiffDeck": {+ "RepoFile": {"type": "object","properties": {- "created": {- "type": "string"+ "chunks": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"id": {"type": "string"},- "name": {+ "path": {"type": "string"},"size": {"type": "integer"},"updated": {- "type": "string"+ "type": "integer"}},"required": [- "created",+ "chunks","id",- "name",+ "path","size","updated"],"additionalProperties": false},- "RiffDeckCardsRequestInput": {- "type": "object",- "properties": {- "blockIDs": {- "type": "array",- "items": {- "type": "string"- }- },- "deckID": {- "type": "string"- }- },- "required": [- "blockIDs",- "deckID"- ],- "additionalProperties": false- },- "RiffDeckRequestInput": {+ "RepoKeyData": {"type": "object","properties": {- "deckID": {+ "key": {"type": "string"}},"required": [- "deckID"+ "key"],"additionalProperties": false},- "RiffDueCard": {+ "RepoLog": {"type": "object","properties": {- "blockID": {- "type": "string"- },- "cardID": {- "type": "string"- },- "deckID": {- "type": "string"- },- "lapses": {+ "count": {"type": "integer"},- "lastReview": {+ "created": {"type": "integer"},- "nextDues": {+ "files": {"anyOf": [{- "type": "object",- "additionalProperties": {- "type": "string"+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/RepoFile"+ },+ {+ "type": "null"+ }+ ]}},{@@ -11793,36 +11964,89 @@}]},- "reps": {- "type": "integer"+ "hCreated": {+ "type": "string"},- "state": {- "type": "integer"- }+ "hSize": {+ "type": "string"+ },+ "hTagUpdated": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "memo": {+ "type": "string"+ },+ "size": {+ "type": "integer"+ },+ "systemID": {+ "type": "string"+ },+ "systemName": {+ "type": "string"+ },+ "systemOS": {+ "type": "string"+ },+ "tag": {+ "type": "string"+ }},"required": [- "blockID",- "cardID",- "deckID",- "lapses",- "lastReview",- "nextDues",- "reps",- "state"+ "count",+ "created",+ "files",+ "hCreated",+ "hSize",+ "hTagUpdated",+ "id",+ "memo",+ "size",+ "systemID",+ "systemName",+ "systemOS",+ "tag"],"additionalProperties": false},- "RiffDueCardsData": {+ "RepoOpenFileData": {"type": "object","properties": {- "cards": {+ "content": {+ "type": "string"+ },+ "displayInText": {+ "type": "boolean"+ },+ "title": {+ "type": "string"+ },+ "updated": {+ "type": "integer"+ }+ },+ "required": [+ "content",+ "displayInText",+ "title",+ "updated"+ ],+ "additionalProperties": false+ },+ "RepoSearchData": {+ "type": "object",+ "properties": {+ "files": {"anyOf": [{"type": "array","items": {"anyOf": [{- "$ref": "#/$defs/RiffDueCard"+ "$ref": "#/$defs/RepoDiffFile"},{"type": "null"@@ -11835,61 +12059,95 @@}]},- "unreviewedCount": {- "type": "integer"- },- "unreviewedNewCardCount": {+ "pageCount": {"type": "integer"},- "unreviewedOldCardCount": {+ "totalCount": {"type": "integer"}},"required": [- "cards",- "unreviewedCount",- "unreviewedNewCardCount",- "unreviewedOldCardCount"+ "files",+ "pageCount",+ "totalCount"],"additionalProperties": false},- "RiffDueCardsRequestInput": {+ "RepoSnapshot": {"type": "object","properties": {- "deckID": {- "type": "string"+ "count": {+ "type": "integer"},- "reviewedCards": {+ "created": {+ "type": "integer"+ },+ "files": {"anyOf": [{"type": "array","items": {- "$ref": "#/$defs/RiffReviewedCardInput"+ "anyOf": [+ {+ "$ref": "#/$defs/RepoFile"+ },+ {+ "type": "null"+ }+ ]}},{"type": "null"}]- }- },- "required": [- "deckID"- ],- "additionalProperties": false- },- "RiffNotebookDueCardsRequestInput": {- "type": "object",- "properties": {- "notebook": {+ },+ "hCreated": {"type": "string"},- "reviewedCards": {+ "hSize": {+ "type": "string"+ },+ "hTagUpdated": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "memo": {+ "type": "string"+ },+ "requiresDownload": {+ "type": "boolean"+ },+ "size": {+ "type": "integer"+ },+ "systemID": {+ "type": "string"+ },+ "systemName": {+ "type": "string"+ },+ "systemOS": {+ "type": "string"+ },+ "tag": {+ "type": "string"+ },+ "typesCount": {"anyOf": [{"type": "array","items": {- "$ref": "#/$defs/RiffReviewedCardInput"+ "anyOf": [+ {+ "$ref": "#/$defs/RepoTypeCount"+ },+ {+ "type": "null"+ }+ ]}},{@@ -11899,31 +12157,43 @@}},"required": [- "notebook"- ],- "additionalProperties": false- },- "RiffReviewedCardInput": {- "type": "object",- "properties": {- "cardID": {- "type": "string"- }- },- "required": [- "cardID"+ "count",+ "created",+ "files",+ "hCreated",+ "hSize",+ "hTagUpdated",+ "id",+ "memo",+ "requiresDownload",+ "size",+ "systemID",+ "systemName",+ "systemOS",+ "tag",+ "typesCount"],"additionalProperties": false},- "RiffTreeDueCardsRequestInput": {+ "RepoSnapshotsData": {"type": "object","properties": {- "reviewedCards": {+ "pageCount": {+ "type": "integer"+ },+ "snapshots": {"anyOf": [{"type": "array","items": {- "$ref": "#/$defs/RiffReviewedCardInput"+ "anyOf": [+ {+ "$ref": "#/$defs/RepoSnapshot"+ },+ {+ "type": "null"+ }+ ]}},{@@ -11931,99 +12201,95 @@}]},- "rootID": {- "type": "string"+ "totalCount": {+ "type": "integer"}},"required": [- "rootID"+ "pageCount",+ "snapshots",+ "totalCount"],"additionalProperties": false},- "SQLQueryRequestInput": {+ "RepoTagsData": {"type": "object","properties": {- "mode": {+ "snapshots": {"anyOf": [{- "type": "string"+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/RepoSnapshot"+ },+ {+ "type": "null"+ }+ ]+ }},{"type": "null"}]- },- "stmt": {- "type": "string"}},"required": [- "stmt"+ "snapshots"],"additionalProperties": false},- "SaveTemplateRequestInput": {+ "RepoTypeCount": {"type": "object","properties": {- "databaseMode": {- "type": "string"- },- "directory": {- "type": "string"- },- "id": {- "type": "string"+ "count": {+ "type": "integer"},- "name": {+ "type": {"type": "string"- },- "overwrite": {- "type": "boolean"}},"required": [- "id",- "name",- "overwrite"+ "count",+ "type"],"additionalProperties": false},- "SearchAsset": {+ "ResetGraphData": {"type": "object","properties": {- "hName": {- "type": "string"- },- "path": {- "type": "string"- },- "updated": {- "type": "integer"+ "conf": {+ "$ref": "#/$defs/GlobalGraphConf"}},"required": [- "hName",- "path",- "updated"+ "conf"],"additionalProperties": false},- "SearchAssetContentData": {+ "ResetLocalGraphData": {"type": "object","properties": {- "assetContents": {+ "conf": {+ "$ref": "#/$defs/LocalGraphConf"+ }+ },+ "required": [+ "conf"+ ],+ "additionalProperties": false+ },+ "ResetRiffCardsRequestInput": {+ "type": "object",+ "properties": {+ "blockIDs": {"anyOf": [{"type": "array","items": {- "anyOf": [- {- "$ref": "#/$defs/AssetContent"- },- {- "type": "null"- }- ]+ "type": "string"}},{@@ -12031,79 +12297,100 @@}]},- "matchedAssetCount": {- "type": "integer"+ "deckID": {+ "type": "string"},- "pageCount": {- "type": "integer"+ "id": {+ "type": "string"+ },+ "type": {+ "type": "string"}},"required": [- "assetContents",- "matchedAssetCount",- "pageCount"+ "deckID",+ "id",+ "type"],"additionalProperties": false},- "SearchAssetContentRequestInput": {+ "ReviewRiffCardRequestInput": {"type": "object","properties": {- "method": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]+ "cardID": {+ "type": "string"},- "orderBy": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]+ "deckID": {+ "type": "string"},- "page": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]+ "rating": {+ "type": "number"},- "pageSize": {+ "reviewedCards": {"anyOf": [{- "type": "number"+ "type": "array",+ "items": {+ "$ref": "#/$defs/RiffReviewedCardInput"+ }},{"type": "null"}]+ }+ },+ "required": [+ "cardID",+ "deckID",+ "rating"+ ],+ "additionalProperties": false+ },+ "RichClipboardAssetInput": {+ "type": "object",+ "properties": {+ "box": {+ "type": "string"},- "query": {+ "index": {+ "type": "integer"+ },+ "path": {+ "type": "string"+ }+ },+ "required": [+ "index",+ "path"+ ],+ "additionalProperties": false+ },+ "RichClipboardPrepared": {+ "type": "object",+ "properties": {+ "assets": {"anyOf": [{- "type": "string"+ "type": "array",+ "items": {+ "$ref": "#/$defs/RichClipboardPreparedAsset"+ }},{"type": "null"}]},- "types": {+ "batch": {+ "type": "string"+ },+ "groups": {"anyOf": [{- "type": "object",- "additionalProperties": {- "type": "boolean"+ "type": "array",+ "items": {+ "type": "string"}},{@@ -12112,43 +12399,109 @@]}},+ "required": [+ "assets",+ "batch",+ "groups"+ ],"additionalProperties": false},- "SearchAssetRequestInput": {+ "RichClipboardPreparedAsset": {"type": "object","properties": {- "exts": {+ "index": {+ "type": "integer"+ },+ "path": {+ "type": "string"+ }+ },+ "required": [+ "index",+ "path"+ ],+ "additionalProperties": false+ },+ "RiffBlockIDsRequestInput": {+ "type": "object",+ "properties": {+ "blockIDs": {+ "type": "array",+ "items": {+ "type": "string"+ }+ }+ },+ "required": [+ "blockIDs"+ ],+ "additionalProperties": false+ },+ "RiffBlocksData": {+ "type": "object",+ "properties": {+ "blocks": {"anyOf": [{"type": "array","items": {- "type": "string"+ "anyOf": [+ {+ "$ref": "#/$defs/SearchBlock"+ },+ {+ "type": "null"+ }+ ]}},{"type": "null"}]+ }+ },+ "required": [+ "blocks"+ ],+ "additionalProperties": false+ },+ "RiffCardDueInput": {+ "type": "object",+ "properties": {+ "due": {+ "type": "string"},- "k": {+ "id": {"type": "string"}},"required": [- "k"+ "due",+ "id"],"additionalProperties": false},- "SearchBlock": {+ "RiffCardRequestInput": {"type": "object","properties": {- "alias": {+ "cardID": {"type": "string"},- "box": {+ "deckID": {"type": "string"- },- "children": {+ }+ },+ "required": [+ "cardID",+ "deckID"+ ],+ "additionalProperties": false+ },+ "RiffCardsData": {+ "type": "object",+ "properties": {+ "blocks": {"anyOf": [{"type": "array",@@ -12168,245 +12521,128 @@}]},- "content": {- "type": "string"- },- "count": {+ "pageCount": {"type": "integer"},- "created": {- "type": "string"- },- "defID": {- "type": "string"- },- "defPath": {- "type": "string"- },- "depth": {+ "total": {"type": "integer"- },- "fcontent": {+ }+ },+ "required": [+ "blocks",+ "pageCount",+ "total"+ ],+ "additionalProperties": false+ },+ "RiffCardsRequestInput": {+ "type": "object",+ "properties": {+ "id": {"type": "string"},- "folded": {- "type": "boolean"- },- "hPath": {- "type": "string"+ "page": {+ "type": "number"},- "ial": {+ "pageSize": {"anyOf": [{- "type": "object",- "additionalProperties": {- "type": "string"- }+ "type": "number"},{"type": "null"}]+ }+ },+ "required": [+ "id",+ "page"+ ],+ "additionalProperties": false+ },+ "RiffDeck": {+ "type": "object",+ "properties": {+ "created": {+ "type": "string"},"id": {"type": "string"},- "markdown": {- "type": "string"- },- "memo": {- "type": "string"- },"name": {"type": "string"},- "number": {- "type": "string"- },- "parentID": {- "type": "string"- },- "path": {- "type": "string"- },- "refCount": {- "type": "integer"- },- "refText": {- "type": "string"- },- "refs": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/SearchBlock"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]- },- "riffCard": {- "anyOf": [- {- "$ref": "#/$defs/SearchBlockCard"- },- {- "type": "null"- }- ]- },- "riffCardID": {- "type": "string"- },- "rootID": {- "type": "string"- },- "sort": {+ "size": {"type": "integer"},- "subType": {- "type": "string"- },- "tag": {- "type": "string"- },- "type": {- "type": "string"- },"updated": {"type": "string"}},"required": [- "alias",- "box",- "children",- "content",- "count","created",- "defID",- "defPath",- "depth",- "fcontent",- "folded",- "hPath",- "ial","id",- "markdown",- "memo","name",- "parentID",- "path",- "refCount",- "refText",- "refs",- "riffCard",- "riffCardID",- "rootID",- "sort",- "subType",- "tag",- "type",+ "size","updated"],"additionalProperties": false},- "SearchBlockCard": {+ "RiffDeckCardsRequestInput": {"type": "object","properties": {- "due": {- "type": "string"- },- "lapses": {- "type": "integer"+ "blockIDs": {+ "type": "array",+ "items": {+ "type": "string"+ }},- "lastReview": {+ "deckID": {"type": "string"- },- "reps": {- "type": "integer"- },- "state": {- "type": "integer"}},"required": [- "due",- "lapses",- "lastReview",- "reps",- "state"+ "blockIDs",+ "deckID"],"additionalProperties": false},- "SearchBlockRequestInput": {+ "RiffDeckRequestInput": {"type": "object","properties": {- "groupBy": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]+ "deckID": {+ "type": "string"+ }+ },+ "required": [+ "deckID"+ ],+ "additionalProperties": false+ },+ "RiffDueCard": {+ "type": "object",+ "properties": {+ "blockID": {+ "type": "string"},- "method": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]+ "cardID": {+ "type": "string"},- "orderBy": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]+ "deckID": {+ "type": "string"},- "page": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]+ "lapses": {+ "type": "integer"},- "pageSize": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]+ "lastReview": {+ "type": "integer"},- "paths": {+ "nextDues": {"anyOf": [{- "type": "array",- "items": {+ "type": "object",+ "additionalProperties": {"type": "string"}},@@ -12415,53 +12651,36 @@}]},- "query": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "subTypes": {- "anyOf": [- {- "$ref": "#/$defs/SearchSubtypeFilterInput"- },- {- "type": "null"- }- ]+ "reps": {+ "type": "integer"},- "types": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "type": "boolean"- }- },- {- "type": "null"- }- ]+ "state": {+ "type": "integer"}},+ "required": [+ "blockID",+ "cardID",+ "deckID",+ "lapses",+ "lastReview",+ "nextDues",+ "reps",+ "state"+ ],"additionalProperties": false},- "SearchBlocksData": {+ "RiffDueCardsData": {"type": "object","properties": {- "blocks": {+ "cards": {"anyOf": [{"type": "array","items": {"anyOf": [{- "$ref": "#/$defs/SearchBlock"+ "$ref": "#/$defs/RiffDueCard"},{"type": "null"@@ -12474,159 +12693,207 @@}]},- "matchedBlockCount": {+ "unreviewedCount": {"type": "integer"},- "matchedRootCount": {+ "unreviewedNewCardCount": {"type": "integer"},- "pageCount": {+ "unreviewedOldCardCount": {"type": "integer"}},"required": [- "blocks",- "matchedBlockCount",- "matchedRootCount",- "pageCount"+ "cards",+ "unreviewedCount",+ "unreviewedNewCardCount",+ "unreviewedOldCardCount"],"additionalProperties": false},- "SearchEmbedBlockRequestInput": {+ "RiffDueCardsRequestInput": {"type": "object","properties": {- "breadcrumb": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]- },- "embedBlockID": {+ "deckID": {"type": "string"},- "excludeIDs": {- "type": "array",- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- }- },- "headingMode": {+ "reviewedCards": {"anyOf": [{- "type": "number"+ "type": "array",+ "items": {+ "$ref": "#/$defs/RiffReviewedCardInput"+ }},{"type": "null"}]- },+ }+ },+ "required": [+ "deckID"+ ],+ "additionalProperties": false+ },+ "RiffNotebookDueCardsRequestInput": {+ "type": "object",+ "properties": {"notebook": {+ "type": "string"+ },+ "reviewedCards": {"anyOf": [{- "type": "string"+ "type": "array",+ "items": {+ "$ref": "#/$defs/RiffReviewedCardInput"+ }},{"type": "null"}]- },- "stmt": {+ }+ },+ "required": [+ "notebook"+ ],+ "additionalProperties": false+ },+ "RiffReviewedCardInput": {+ "type": "object",+ "properties": {+ "cardID": {"type": "string"}},"required": [- "embedBlockID",- "excludeIDs",- "stmt"+ "cardID"],"additionalProperties": false},- "SearchHeadingFilterInput": {+ "RiffTreeDueCardsRequestInput": {"type": "object","properties": {- "h1": {+ "reviewedCards": {"anyOf": [{- "type": "boolean"+ "type": "array",+ "items": {+ "$ref": "#/$defs/RiffReviewedCardInput"+ }},{"type": "null"}]},- "h2": {+ "rootID": {+ "type": "string"+ }+ },+ "required": [+ "rootID"+ ],+ "additionalProperties": false+ },+ "RollbackRepoSnapshotFileRequestInput": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ }+ },+ "required": [+ "id"+ ],+ "additionalProperties": false+ },+ "SQLQueryRequestInput": {+ "type": "object",+ "properties": {+ "mode": {"anyOf": [{- "type": "boolean"+ "type": "string"},{"type": "null"}]},- "h3": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]+ "stmt": {+ "type": "string"+ }+ },+ "required": [+ "stmt"+ ],+ "additionalProperties": false+ },+ "SaveTemplateRequestInput": {+ "type": "object",+ "properties": {+ "databaseMode": {+ "type": "string"},- "h4": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]+ "directory": {+ "type": "string"},- "h5": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]+ "id": {+ "type": "string"},- "h6": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]+ "name": {+ "type": "string"+ },+ "overwrite": {+ "type": "boolean"}},+ "required": [+ "id",+ "name",+ "overwrite"+ ],"additionalProperties": false},- "SearchHistoryData": {+ "SearchAsset": {"type": "object","properties": {- "histories": {+ "hName": {+ "type": "string"+ },+ "path": {+ "type": "string"+ },+ "updated": {+ "type": "integer"+ }+ },+ "required": [+ "hName",+ "path",+ "updated"+ ],+ "additionalProperties": false+ },+ "SearchAssetContentData": {+ "type": "object",+ "properties": {+ "assetContents": {"anyOf": [{"type": "array","items": {- "type": "string"+ "anyOf": [+ {+ "$ref": "#/$defs/AssetContent"+ },+ {+ "type": "null"+ }+ ]}},{@@ -12634,37 +12901,37 @@}]},- "pageCount": {+ "matchedAssetCount": {"type": "integer"},- "totalCount": {+ "pageCount": {"type": "integer"}},"required": [- "histories",- "pageCount",- "totalCount"+ "assetContents",+ "matchedAssetCount",+ "pageCount"],"additionalProperties": false},- "SearchHistoryRequestInput": {+ "SearchAssetContentRequestInput": {"type": "object","properties": {- "notebook": {+ "method": {"anyOf": [{- "type": "string"+ "type": "number"},{"type": "null"}]},- "op": {+ "orderBy": {"anyOf": [{- "type": "string"+ "type": "number"},{"type": "null"@@ -12681,6 +12948,16 @@}]},+ "pageSize": {+ "anyOf": [+ {+ "type": "number"+ },+ {+ "type": "null"+ }+ ]+ },"query": {"anyOf": [{@@ -12691,10 +12968,13 @@}]},- "type": {+ "types": {"anyOf": [{- "type": "number"+ "type": "object",+ "additionalProperties": {+ "type": "boolean"+ }},{"type": "null"@@ -12704,142 +12984,172 @@},"additionalProperties": false},- "SearchKeywordRequestInput": {+ "SearchAssetRequestInput": {"type": "object","properties": {- "k": {- "type": "string"- }- },- "required": [- "k"- ],- "additionalProperties": false- },- "SearchListFilterInput": {- "type": "object",- "properties": {- "o": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]- },- "t": {+ "exts": {"anyOf": [{- "type": "boolean"+ "type": "array",+ "items": {+ "type": "string"+ }},{"type": "null"}]},- "u": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]+ "k": {+ "type": "string"}},+ "required": [+ "k"+ ],"additionalProperties": false},- "SearchPageRequestInput": {+ "SearchBlock": {"type": "object","properties": {- "page": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]+ "alias": {+ "type": "string"},- "pageSize": {+ "box": {+ "type": "string"+ },+ "children": {"anyOf": [{- "type": "number"+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchBlock"+ },+ {+ "type": "null"+ }+ ]+ }},{"type": "null"}]- }- },- "additionalProperties": false- },- "SearchPath": {- "type": "object",- "properties": {- "blocks": {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/SearchBlock"- },- {- "type": "null"- }- ]- }},- "box": {+ "content": {"type": "string"},- "children": {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/SearchPath"- },- {- "type": "null"- }- ]- }- },"count": {"type": "integer"},"created": {"type": "string"},+ "defID": {+ "type": "string"+ },+ "defPath": {+ "type": "string"+ },"depth": {"type": "integer"},+ "fcontent": {+ "type": "string"+ },"folded": {"type": "boolean"},"hPath": {"type": "string"},+ "ial": {+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]+ },"id": {"type": "string"},- "name": {+ "markdown": {"type": "string"},- "nodeType": {+ "memo": {+ "type": "string"+ },+ "name": {"type": "string"},"number": {"type": "string"},+ "parentID": {+ "type": "string"+ },+ "path": {+ "type": "string"+ },+ "refCount": {+ "type": "integer"+ },+ "refText": {+ "type": "string"+ },+ "refs": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchBlock"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "riffCard": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchBlockCard"+ },+ {+ "type": "null"+ }+ ]+ },+ "riffCardID": {+ "type": "string"+ },+ "rootID": {+ "type": "string"+ },+ "sort": {+ "type": "integer"+ },"subType": {"type": "string"},+ "tag": {+ "type": "string"+ },"type": {"type": "string"},@@ -12848,111 +13158,170 @@}},"required": [+ "alias","box",+ "children",+ "content","count","created",+ "defID",+ "defPath","depth",+ "fcontent","folded","hPath",+ "ial","id",+ "markdown",+ "memo","name",- "nodeType",+ "parentID",+ "path",+ "refCount",+ "refText",+ "refs",+ "riffCard",+ "riffCardID",+ "rootID",+ "sort","subType",+ "tag","type","updated"],"additionalProperties": false},- "SearchPathRequestInput": {+ "SearchBlockCard": {"type": "object","properties": {- "path": {+ "due": {+ "type": "string"+ },+ "lapses": {+ "type": "integer"+ },+ "lastReview": {"type": "string"+ },+ "reps": {+ "type": "integer"+ },+ "state": {+ "type": "integer"}},"required": [- "path"+ "due",+ "lapses",+ "lastReview",+ "reps",+ "state"],"additionalProperties": false},- "SearchRefBlockRequestInput": {+ "SearchBlockRequestInput": {"type": "object","properties": {- "beforeLen": {- "type": "number"- },- "id": {+ "groupBy": {"anyOf": [{- "type": "string"+ "type": "number"},{"type": "null"}]},- "isDatabase": {+ "method": {"anyOf": [{- "type": "boolean"+ "type": "number"},{"type": "null"}]},- "isSquareBrackets": {+ "orderBy": {"anyOf": [{- "type": "boolean"+ "type": "number"},{"type": "null"}]},- "k": {- "type": "string"- },- "notebook": {+ "page": {"anyOf": [{- "type": "string"+ "type": "number"},{"type": "null"}]},- "reqId": {+ "pageSize": {"anyOf": [{- "$ref": "#/$defs/JSONValue"+ "type": "number"},{"type": "null"}]},- "rootID": {- "type": "string"- }- },- "additionalProperties": false- },- "SearchRefCorrelation": {- "type": "object",- "properties": {- "reqId": {- "$ref": "#/$defs/JSONValue"+ "paths": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "query": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "subTypes": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchSubtypeFilterInput"+ },+ {+ "type": "null"+ }+ ]+ },+ "types": {+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "boolean"+ }+ },+ {+ "type": "null"+ }+ ]}},- "required": [- "reqId"- ],"additionalProperties": false},- "SearchRefResult": {+ "SearchBlocksData": {"type": "object","properties": {"blocks": {@@ -12975,146 +13344,141 @@}]},- "k": {- "type": "string"+ "matchedBlockCount": {+ "type": "integer"},- "newDoc": {- "type": "boolean"+ "matchedRootCount": {+ "type": "integer"},- "reqId": {- "$ref": "#/$defs/JSONValue"+ "pageCount": {+ "type": "integer"}},"required": ["blocks",- "k",- "newDoc",- "reqId"+ "matchedBlockCount",+ "matchedRootCount",+ "pageCount"],"additionalProperties": false},- "SearchSubTypes": {+ "SearchEmbedBlockRequestInput": {"type": "object","properties": {- "heading": {+ "breadcrumb": {"anyOf": [{- "type": "object",- "additionalProperties": {- "type": "boolean"- }+ "type": "boolean"},{"type": "null"}]},- "list": {+ "embedBlockID": {+ "type": "string"+ },+ "excludeIDs": {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "headingMode": {"anyOf": [{- "type": "object",- "additionalProperties": {- "type": "boolean"- }+ "type": "number"},{"type": "null"}]},- "listItem": {+ "notebook": {"anyOf": [{- "type": "object",- "additionalProperties": {- "type": "boolean"- }+ "type": "string"},{"type": "null"}]+ },+ "stmt": {+ "type": "string"}},"required": [- "heading",- "list",- "listItem"+ "embedBlockID",+ "excludeIDs",+ "stmt"],"additionalProperties": false},- "SearchSubTypesInput": {+ "SearchHeadingFilterInput": {"type": "object","properties": {- "heading": {+ "h1": {"anyOf": [{- "type": "object",- "additionalProperties": {- "type": "boolean"- }+ "type": "boolean"},{"type": "null"}]},- "list": {+ "h2": {"anyOf": [{- "type": "object",- "additionalProperties": {- "type": "boolean"- }+ "type": "boolean"},{"type": "null"}]},- "listItem": {+ "h3": {"anyOf": [{- "type": "object",- "additionalProperties": {- "type": "boolean"- }+ "type": "boolean"},{"type": "null"}]- }- },- "additionalProperties": false- },- "SearchSubtypeFilterInput": {- "type": "object",- "properties": {- "heading": {+ },+ "h4": {"anyOf": [{- "$ref": "#/$defs/SearchHeadingFilterInput"+ "type": "boolean"},{"type": "null"}]},- "list": {+ "h5": {"anyOf": [{- "$ref": "#/$defs/SearchListFilterInput"+ "type": "boolean"},{"type": "null"}]},- "listItem": {+ "h6": {"anyOf": [{- "$ref": "#/$defs/SearchListFilterInput"+ "type": "boolean"},{"type": "null"@@ -13124,192 +13488,83 @@},"additionalProperties": false},- "SearchTagData": {- "type": "object",- "properties": {- "k": {- "type": "string"- },- "tags": {- "type": "array",- "items": {- "type": "string"- }- }- },- "required": [- "k",- "tags"- ],- "additionalProperties": false- },- "SearchTagRequestInput": {- "type": "object",- "properties": {- "k": {- "type": "string"- }- },- "required": [- "k"- ],- "additionalProperties": false- },- "SearchTemplateData": {+ "SearchHistoryData": {"type": "object","properties": {- "k": {- "type": "string"- },- "templates": {+ "histories": {"anyOf": [{"type": "array","items": {- "anyOf": [- {- "$ref": "#/$defs/SearchTemplateResult"- },- {- "type": "null"- }- ]+ "type": "string"}},{"type": "null"}]- }- },- "required": [- "k",- "templates"- ],- "additionalProperties": false- },- "SearchTemplateResult": {- "type": "object",- "properties": {- "content": {- "type": "string"},- "path": {- "type": "string"+ "pageCount": {+ "type": "integer"},- "relativePath": {- "type": "string"+ "totalCount": {+ "type": "integer"}},"required": [- "content",- "path",- "relativePath"+ "histories",+ "pageCount",+ "totalCount"],"additionalProperties": false},- "SearchWidgetData": {+ "SearchHistoryRequestInput": {"type": "object","properties": {- "k": {- "type": "string"+ "notebook": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]},- "widgets": {+ "op": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/SearchWidgetResult"- },- {- "type": "null"- }- ]- }+ "type": "string"},{"type": "null"}]- }- },- "required": [- "k",- "widgets"- ],- "additionalProperties": false- },- "SearchWidgetResult": {- "type": "object",- "properties": {- "content": {- "type": "string"- },- "name": {- "type": "string"- }- },- "required": [- "content",- "name"- ],- "additionalProperties": false- },- "SetBazaarPackageRatingRequestInput": {- "type": "object",- "properties": {- "packageName": {- "type": "string"},- "packageType": {- "type": "string"+ "page": {+ "anyOf": [+ {+ "type": "number"+ },+ {+ "type": "null"+ }+ ]},- "rating": {- "type": "number"- }- },- "required": [- "packageName",- "packageType",- "rating"- ],- "additionalProperties": false- },- "SetBlockAttrsRequestInput": {- "type": "object",- "properties": {- "attrs": {- "type": "object",- "additionalProperties": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- }+ "query": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]},- "id": {- "type": "string"- }- },- "required": [- "attrs",- "id"- ],- "additionalProperties": false- },- "SetCriterionRequestInput": {- "type": "object",- "properties": {- "criterion": {+ "type": {"anyOf": [{- "$ref": "#/$defs/CriterionInput"+ "type": "number"},{"type": "null"@@ -13317,76 +13572,107 @@]}},- "required": [- "criterion"- ],"additionalProperties": false},- "SetGraphConfRequestInput": {+ "SearchKeywordRequestInput": {"type": "object","properties": {- "conf": {- "$ref": "#/$defs/GraphConfigurationFieldsInput"- },- "type": {+ "k": {"type": "string"}},"required": [- "conf",- "type"+ "k"],"additionalProperties": false},- "SetInlineStylesRequestInput": {+ "SearchListFilterInput": {"type": "object","properties": {- "app": {+ "o": {"anyOf": [{- "type": "string"+ "type": "boolean"},{"type": "null"}]},- "av": {+ "t": {"anyOf": [{- "$ref": "#/$defs/InlineStyleAVInput"+ "type": "boolean"},{"type": "null"}]},- "builtin": {+ "u": {"anyOf": [{- "$ref": "#/$defs/InlineStyleBuiltinInput"+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "additionalProperties": false+ },+ "SearchPageRequestInput": {+ "type": "object",+ "properties": {+ "page": {+ "anyOf": [+ {+ "type": "number"},{"type": "null"}]},- "order": {+ "pageSize": {"anyOf": [{- "$ref": "#/$defs/InlineStyleOrderInput"+ "type": "number"},{"type": "null"}]+ }+ },+ "additionalProperties": false+ },+ "SearchPath": {+ "type": "object",+ "properties": {+ "blocks": {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchBlock"+ },+ {+ "type": "null"+ }+ ]+ }},- "styles": {+ "box": {+ "type": "string"+ },+ "children": {"type": "array","items": {"anyOf": [{- "$ref": "#/$defs/InlineStyleInput"+ "$ref": "#/$defs/SearchPath"},{"type": "null"@@ -13394,58 +13680,78 @@]}},- "version": {- "type": "number"- }- },- "required": [- "styles",- "version"- ],- "additionalProperties": false- },- "SetNotebookConfRequestInput": {- "type": "object",- "properties": {- "conf": {- "anyOf": [- {- "$ref": "#/$defs/NotebookConfPatchInput"- },- {- "type": "null"- }- ]+ "count": {+ "type": "integer"},- "notebook": {+ "created": {+ "type": "string"+ },+ "depth": {+ "type": "integer"+ },+ "folded": {+ "type": "boolean"+ },+ "hPath": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "name": {+ "type": "string"+ },+ "nodeType": {+ "type": "string"+ },+ "number": {+ "type": "string"+ },+ "subType": {+ "type": "string"+ },+ "type": {+ "type": "string"+ },+ "updated": {"type": "string"}},"required": [- "notebook"+ "box",+ "count",+ "created",+ "depth",+ "folded",+ "hPath",+ "id",+ "name",+ "nodeType",+ "subType",+ "type",+ "updated"],"additionalProperties": false},- "SetNotebookIconRequestInput": {+ "SearchPathRequestInput": {"type": "object","properties": {- "icon": {- "type": "string"- },- "notebook": {+ "path": {"type": "string"}},"required": [- "icon",- "notebook"+ "path"],"additionalProperties": false},- "SetPetalEnabledRequestInput": {+ "SearchRefBlockRequestInput": {"type": "object","properties": {- "app": {+ "beforeLen": {+ "type": "number"+ },+ "id": {"anyOf": [{"type": "string"@@ -13455,365 +13761,470 @@}]},- "enabled": {- "type": "boolean"+ "isDatabase": {+ "anyOf": [+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]},- "packageName": {+ "isSquareBrackets": {+ "anyOf": [+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ },+ "k": {"type": "string"- }- },- "required": [- "enabled",- "packageName"- ],- "additionalProperties": false- },- "SetPetalPublishEnabledRequestInput": {- "type": "object",- "properties": {- "enabled": {- "type": "boolean"},- "packageName": {+ "notebook": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]+ },+ "reqId": {+ "anyOf": [+ {+ "$ref": "#/$defs/JSONValue"+ },+ {+ "type": "null"+ }+ ]+ },+ "rootID": {"type": "string"}},- "required": [- "enabled",- "packageName"- ],"additionalProperties": false},- "SetRiffCardsDueRequestInput": {+ "SearchRefCorrelation": {"type": "object","properties": {- "cardDues": {- "type": "array",- "items": {- "$ref": "#/$defs/RiffCardDueInput"- }+ "reqId": {+ "$ref": "#/$defs/JSONValue"}},"required": [- "cardDues"+ "reqId"],"additionalProperties": false},- "SetSnapshotMemoRequestInput": {+ "SearchRefResult": {"type": "object","properties": {- "id": {- "type": "string"+ "blocks": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchBlock"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},- "memo": {+ "k": {"type": "string"+ },+ "newDoc": {+ "type": "boolean"+ },+ "reqId": {+ "$ref": "#/$defs/JSONValue"}},"required": [- "id",- "memo"+ "blocks",+ "k",+ "newDoc",+ "reqId"],"additionalProperties": false},- "SetSnippetRequestInput": {+ "SearchRepoFileRequestInput": {"type": "object","properties": {- "snippets": {- "type": "array",- "items": {- "$ref": "#/$defs/SnippetInput"- }+ "keyword": {+ "type": "string"+ },+ "page": {+ "type": "number"}},"required": [- "snippets"+ "keyword",+ "page"],"additionalProperties": false},- "SetSyncLocalRequestInput": {+ "SearchSubTypes": {"type": "object","properties": {- "local": {- "$ref": "#/$defs/SyncLocalInput"+ "heading": {+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "boolean"+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "list": {+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "boolean"+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "listItem": {+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "boolean"+ }+ },+ {+ "type": "null"+ }+ ]}},"required": [- "local"+ "heading",+ "list",+ "listItem"],"additionalProperties": false},- "SetSyncS3RequestInput": {+ "SearchSubTypesInput": {"type": "object","properties": {- "s3": {- "$ref": "#/$defs/SyncS3Input"+ "heading": {+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "boolean"+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "list": {+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "boolean"+ }+ },+ {+ "type": "null"+ }+ ]+ },+ "listItem": {+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "boolean"+ }+ },+ {+ "type": "null"+ }+ ]}},- "required": [- "s3"- ],"additionalProperties": false},- "SetSyncWebDAVRequestInput": {+ "SearchSubtypeFilterInput": {"type": "object","properties": {- "webdav": {- "$ref": "#/$defs/SyncWebDAVInput"+ "heading": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchHeadingFilterInput"+ },+ {+ "type": "null"+ }+ ]+ },+ "list": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchListFilterInput"+ },+ {+ "type": "null"+ }+ ]+ },+ "listItem": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchListFilterInput"+ },+ {+ "type": "null"+ }+ ]}},- "required": [- "webdav"- ],"additionalProperties": false},- "Shorthand": {+ "SearchTagData": {"type": "object","properties": {- "hCreated": {- "type": "string"- },- "oId": {- "type": "string"- },- "shorthandContent": {- "type": "string"- },- "shorthandDesc": {- "type": "string"- },- "shorthandFrom": {- "type": "integer"- },- "shorthandMd": {- "type": "string"- },- "shorthandTitle": {+ "k": {"type": "string"},- "shorthandURL": {- "type": "string"+ "tags": {+ "type": "array",+ "items": {+ "type": "string"+ }}},"required": [- "hCreated",- "oId",- "shorthandContent",- "shorthandDesc",- "shorthandFrom",- "shorthandMd",- "shorthandTitle",- "shorthandURL"+ "k",+ "tags"],"additionalProperties": false},- "ShorthandPage": {+ "SearchTagRequestInput": {"type": "object","properties": {- "pagination": {- "$ref": "#/$defs/ShorthandPagination"- },- "shorthands": {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/Shorthand"- },- {- "type": "null"- }- ]- }+ "k": {+ "type": "string"}},"required": [- "pagination",- "shorthands"+ "k"],"additionalProperties": false},- "ShorthandPagination": {+ "SearchTemplateData": {"type": "object","properties": {- "paginationPageCount": {- "type": "integer"+ "k": {+ "type": "string"},- "paginationPageNums": {+ "templates": {"anyOf": [{"type": "array","items": {- "type": "integer"+ "anyOf": [+ {+ "$ref": "#/$defs/SearchTemplateResult"+ },+ {+ "type": "null"+ }+ ]}},{"type": "null"}]- },- "paginationRecordCount": {- "type": "integer"}},"required": [- "paginationPageCount",- "paginationPageNums",- "paginationRecordCount"+ "k",+ "templates"],"additionalProperties": false},- "ShorthandsData": {+ "SearchTemplateResult": {"type": "object","properties": {- "code": {- "type": "integer"+ "content": {+ "type": "string"},- "data": {- "$ref": "#/$defs/ShorthandPage"+ "path": {+ "type": "string"},- "msg": {+ "relativePath": {"type": "string"}},"required": [- "code",- "data",- "msg"+ "content",+ "path",+ "relativePath"],"additionalProperties": false},- "ShorthandsRequestInput": {+ "SearchWidgetData": {"type": "object","properties": {- "page": {- "type": "number"+ "k": {+ "type": "string"+ },+ "widgets": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchWidgetResult"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]}},"required": [- "page"+ "k",+ "widgets"],"additionalProperties": false},- "Snippet": {+ "SearchWidgetResult": {"type": "object","properties": {"content": {"type": "string"},- "disabledInPublish": {- "type": "boolean"- },- "enabled": {- "type": "boolean"- },- "id": {- "type": "string"- },"name": {"type": "string"- },- "type": {- "type": "string"}},"required": ["content",- "disabledInPublish",- "enabled",- "id",- "name",- "type"+ "name"],"additionalProperties": false},- "SnippetInput": {+ "SetBazaarPackageRatingRequestInput": {"type": "object","properties": {- "content": {- "type": "string"- },- "disabledInPublish": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]- },- "enabled": {- "type": "boolean"- },- "id": {+ "packageName": {"type": "string"},- "name": {+ "packageType": {"type": "string"},- "type": {- "type": "string"+ "rating": {+ "type": "number"}},"required": [- "content",- "enabled",- "id",- "name",- "type"+ "packageName",+ "packageType",+ "rating"],"additionalProperties": false},- "SnippetsData": {+ "SetBlockAttrsRequestInput": {"type": "object","properties": {- "snippets": {- "type": "array",- "items": {+ "attrs": {+ "type": "object",+ "additionalProperties": {"anyOf": [{- "$ref": "#/$defs/Snippet"+ "type": "string"},{"type": "null"}]}+ },+ "id": {+ "type": "string"}},"required": [- "snippets"+ "attrs",+ "id"],"additionalProperties": false},- "StorageKeyRequestInput": {+ "SetCriterionRequestInput": {"type": "object","properties": {- "key": {- "type": "string"+ "criterion": {+ "anyOf": [+ {+ "$ref": "#/$defs/CriterionInput"+ },+ {+ "type": "null"+ }+ ]}},"required": [- "key"+ "criterion"],"additionalProperties": false},- "StorageKeysRequestInput": {+ "SetGraphConfRequestInput": {"type": "object","properties": {- "keys": {- "type": "array",- "items": {- "type": "string"- }+ "conf": {+ "$ref": "#/$defs/GraphConfigurationFieldsInput"+ },+ "type": {+ "type": "string"}},"required": [- "keys"+ "conf",+ "type"],"additionalProperties": false},- "StorageRemoveKeysRequestInput": {+ "SetInlineStylesRequestInput": {"type": "object","properties": {"app": {@@ -13826,66 +14237,98 @@}]},- "keys": {- "type": "array",- "items": {- "type": "string"- }- }- },- "required": [- "keys"- ],- "additionalProperties": false- },- "StorageRemoveRequestInput": {- "type": "object",- "properties": {- "app": {+ "av": {"anyOf": [{- "type": "string"+ "$ref": "#/$defs/InlineStyleAVInput"},{"type": "null"}]},- "key": {- "type": "string"+ "builtin": {+ "anyOf": [+ {+ "$ref": "#/$defs/InlineStyleBuiltinInput"+ },+ {+ "type": "null"+ }+ ]+ },+ "order": {+ "anyOf": [+ {+ "$ref": "#/$defs/InlineStyleOrderInput"+ },+ {+ "type": "null"+ }+ ]+ },+ "styles": {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/InlineStyleInput"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "version": {+ "type": "number"}},"required": [- "key"+ "styles",+ "version"],"additionalProperties": false},- "StorageSetKeysRequestInput": {+ "SetNotebookConfRequestInput": {"type": "object","properties": {- "app": {+ "conf": {"anyOf": [{- "type": "string"+ "$ref": "#/$defs/NotebookConfPatchInput"},{"type": "null"}]},- "keyVals": {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/JSONValue"- }+ "notebook": {+ "type": "string"}},"required": [- "keyVals"+ "notebook"],"additionalProperties": false},- "StorageSetRequestInput": {+ "SetNotebookIconRequestInput": {+ "type": "object",+ "properties": {+ "icon": {+ "type": "string"+ },+ "notebook": {+ "type": "string"+ }+ },+ "required": [+ "icon",+ "notebook"+ ],+ "additionalProperties": false+ },+ "SetPetalEnabledRequestInput": {"type": "object","properties": {"app": {@@ -13898,400 +14341,417 @@}]},- "key": {- "type": "string"+ "enabled": {+ "type": "boolean"},- "val": {- "anyOf": [- {- "$ref": "#/$defs/JSONValue"- },- {- "type": "null"- }- ]+ "packageName": {+ "type": "string"}},"required": [- "key"+ "enabled",+ "packageName"],"additionalProperties": false},- "SwapBlockRefRequestInput": {+ "SetPetalPublishEnabledRequestInput": {"type": "object","properties": {- "defID": {- "type": "string"- },- "includeChildren": {+ "enabled": {"type": "boolean"},- "refID": {+ "packageName": {"type": "string"}},"required": [- "defID",- "includeChildren",- "refID"+ "enabled",+ "packageName"],"additionalProperties": false},- "SyncAssetDownloadModeData": {+ "SetRepoIndexRetentionDaysRequestInput": {"type": "object","properties": {- "assetDownloadMode": {- "type": "integer"+ "days": {+ "type": "number"}},"required": [- "assetDownloadMode"+ "days"],"additionalProperties": false},- "SyncEnabledRequestInput": {+ "SetRetentionIndexesDailyRequestInput": {"type": "object","properties": {- "enabled": {- "type": "boolean"+ "indexes": {+ "type": "number"}},"required": [- "enabled"+ "indexes"],"additionalProperties": false},- "SyncInfoData": {+ "SetRiffCardsDueRequestInput": {"type": "object","properties": {- "kernel": {- "type": "string"- },- "kernels": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/SyncOnlineKernel"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]- },- "stat": {- "type": "string"- },- "synced": {- "type": "integer"+ "cardDues": {+ "type": "array",+ "items": {+ "$ref": "#/$defs/RiffCardDueInput"+ }}},"required": [- "kernel",- "kernels",- "stat",- "synced"+ "cardDues"],"additionalProperties": false},- "SyncIntervalRequestInput": {+ "SetSnapshotMemoRequestInput": {"type": "object","properties": {- "interval": {- "type": "number"+ "id": {+ "type": "string"+ },+ "memo": {+ "type": "string"}},"required": [- "interval"+ "id",+ "memo"],"additionalProperties": false},- "SyncLANRequestInput": {+ "SetSnippetRequestInput": {"type": "object","properties": {- "enabled": {- "type": "boolean"- },- "maxConcurrentReqs": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]+ "snippets": {+ "type": "array",+ "items": {+ "$ref": "#/$defs/SnippetInput"+ }}},"required": [- "enabled"+ "snippets"],"additionalProperties": false},- "SyncLANStatus": {+ "SetSyncLocalRequestInput": {"type": "object","properties": {- "active": {- "type": "boolean"- },- "connectedPeers": {- "type": "integer"- },- "discoveredPeers": {- "type": "integer"- },- "enabled": {- "type": "boolean"- },- "maxConcurrentReqs": {- "type": "integer"+ "local": {+ "$ref": "#/$defs/SyncLocalInput"}},"required": [- "active",- "connectedPeers",- "discoveredPeers",- "enabled",- "maxConcurrentReqs"+ "local"],"additionalProperties": false},- "SyncLocal": {+ "SetSyncS3RequestInput": {"type": "object","properties": {- "concurrentReqs": {- "type": "integer"- },- "endpoint": {- "type": "string"- },- "timeout": {- "type": "integer"+ "s3": {+ "$ref": "#/$defs/SyncS3Input"}},"required": [- "concurrentReqs",- "endpoint",- "timeout"+ "s3"],"additionalProperties": false},- "SyncLocalData": {+ "SetSyncWebDAVRequestInput": {"type": "object","properties": {- "local": {- "anyOf": [- {- "$ref": "#/$defs/SyncLocal"- },- {- "type": "null"- }- ]+ "webdav": {+ "$ref": "#/$defs/SyncWebDAVInput"}},"required": [- "local"+ "webdav"],"additionalProperties": false},- "SyncLocalInput": {+ "Shorthand": {"type": "object","properties": {- "concurrentReqs": {- "anyOf": [- {- "type": "integer"- },- {- "type": "null"- }- ]+ "hCreated": {+ "type": "string"},- "endpoint": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]+ "oId": {+ "type": "string"},- "timeout": {+ "shorthandContent": {+ "type": "string"+ },+ "shorthandDesc": {+ "type": "string"+ },+ "shorthandFrom": {+ "type": "integer"+ },+ "shorthandMd": {+ "type": "string"+ },+ "shorthandTitle": {+ "type": "string"+ },+ "shorthandURL": {+ "type": "string"+ }+ },+ "required": [+ "hCreated",+ "oId",+ "shorthandContent",+ "shorthandDesc",+ "shorthandFrom",+ "shorthandMd",+ "shorthandTitle",+ "shorthandURL"+ ],+ "additionalProperties": false+ },+ "ShorthandPage": {+ "type": "object",+ "properties": {+ "pagination": {+ "$ref": "#/$defs/ShorthandPagination"+ },+ "shorthands": {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/Shorthand"+ },+ {+ "type": "null"+ }+ ]+ }+ }+ },+ "required": [+ "pagination",+ "shorthands"+ ],+ "additionalProperties": false+ },+ "ShorthandPagination": {+ "type": "object",+ "properties": {+ "paginationPageCount": {+ "type": "integer"+ },+ "paginationPageNums": {"anyOf": [{- "type": "integer"+ "type": "array",+ "items": {+ "type": "integer"+ }},{"type": "null"}]+ },+ "paginationRecordCount": {+ "type": "integer"}},+ "required": [+ "paginationPageCount",+ "paginationPageNums",+ "paginationRecordCount"+ ],"additionalProperties": false},- "SyncModeRequestInput": {+ "ShorthandsData": {"type": "object","properties": {- "mode": {- "type": "number"+ "code": {+ "type": "integer"+ },+ "data": {+ "$ref": "#/$defs/ShorthandPage"+ },+ "msg": {+ "type": "string"}},"required": [- "mode"+ "code",+ "data",+ "msg"],"additionalProperties": false},- "SyncNameRequestInput": {+ "ShorthandsRequestInput": {"type": "object","properties": {- "name": {- "type": "string"+ "page": {+ "type": "number"}},"required": [- "name"+ "page"],"additionalProperties": false},- "SyncOnlineKernel": {+ "Snippet": {"type": "object","properties": {- "hostname": {+ "content": {"type": "string"},+ "disabledInPublish": {+ "type": "boolean"+ },+ "enabled": {+ "type": "boolean"+ },"id": {"type": "string"},- "os": {+ "name": {"type": "string"},- "ver": {+ "type": {"type": "string"}},"required": [- "hostname",+ "content",+ "disabledInPublish",+ "enabled","id",- "os",- "ver"+ "name",+ "type"],"additionalProperties": false},- "SyncProviderExportData": {+ "SnippetInput": {"type": "object","properties": {+ "content": {+ "type": "string"+ },+ "disabledInPublish": {+ "anyOf": [+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ },+ "enabled": {+ "type": "boolean"+ },+ "id": {+ "type": "string"+ },"name": {"type": "string"},- "zip": {+ "type": {"type": "string"}},"required": [+ "content",+ "enabled",+ "id","name",- "zip"+ "type"],"additionalProperties": false},- "SyncProviderImportRequestInput": {+ "SnippetsData": {"type": "object","properties": {- "file": {- "type": "string",- "format": "binary"+ "snippets": {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/Snippet"+ },+ {+ "type": "null"+ }+ ]+ }}},+ "required": [+ "snippets"+ ],"additionalProperties": false},- "SyncProviderRequestInput": {+ "StorageKeyRequestInput": {"type": "object","properties": {- "provider": {- "type": "number"+ "key": {+ "type": "string"}},"required": [- "provider"+ "key"],"additionalProperties": false},- "SyncS3": {+ "StorageKeysRequestInput": {"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"+ "keys": {+ "type": "array",+ "items": {+ "type": "string"+ }}},"required": [- "accessKey",- "bucket",- "concurrentReqs",- "endpoint",- "pathStyle",- "region",- "secretKey",- "skipTlsVerify",- "timeout"+ "keys"],"additionalProperties": false},- "SyncS3Data": {+ "StorageRemoveKeysRequestInput": {"type": "object","properties": {- "s3": {+ "app": {"anyOf": [{- "$ref": "#/$defs/SyncS3"+ "type": "string"},{"type": "null"}]+ },+ "keys": {+ "type": "array",+ "items": {+ "type": "string"+ }}},"required": [- "s3"+ "keys"],"additionalProperties": false},- "SyncS3Input": {+ "StorageRemoveRequestInput": {"type": "object","properties": {- "accessKey": {+ "app": {"anyOf": [{"type": "string"@@ -14301,27 +14761,44 @@}]},- "bucket": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "concurrentReqs": {+ "key": {+ "type": "string"+ }+ },+ "required": [+ "key"+ ],+ "additionalProperties": false+ },+ "StorageSetKeysRequestInput": {+ "type": "object",+ "properties": {+ "app": {"anyOf": [{- "type": "integer"+ "type": "string"},{"type": "null"}]},- "endpoint": {+ "keyVals": {+ "type": "object",+ "additionalProperties": {+ "$ref": "#/$defs/JSONValue"+ }+ }+ },+ "required": [+ "keyVals"+ ],+ "additionalProperties": false+ },+ "StorageSetRequestInput": {+ "type": "object",+ "properties": {+ "app": {"anyOf": [{"type": "string"@@ -14331,50 +14808,132 @@}]},- "pathStyle": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]+ "key": {+ "type": "string"},- "region": {+ "val": {"anyOf": [{- "type": "string"+ "$ref": "#/$defs/JSONValue"},{"type": "null"}]+ }+ },+ "required": [+ "key"+ ],+ "additionalProperties": false+ },+ "SwapBlockRefRequestInput": {+ "type": "object",+ "properties": {+ "defID": {+ "type": "string"},- "secretKey": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]+ "includeChildren": {+ "type": "boolean"},- "skipTlsVerify": {+ "refID": {+ "type": "string"+ }+ },+ "required": [+ "defID",+ "includeChildren",+ "refID"+ ],+ "additionalProperties": false+ },+ "SyncAssetDownloadModeData": {+ "type": "object",+ "properties": {+ "assetDownloadMode": {+ "type": "integer"+ }+ },+ "required": [+ "assetDownloadMode"+ ],+ "additionalProperties": false+ },+ "SyncEnabledRequestInput": {+ "type": "object",+ "properties": {+ "enabled": {+ "type": "boolean"+ }+ },+ "required": [+ "enabled"+ ],+ "additionalProperties": false+ },+ "SyncInfoData": {+ "type": "object",+ "properties": {+ "kernel": {+ "type": "string"+ },+ "kernels": {"anyOf": [{- "type": "boolean"+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SyncOnlineKernel"+ },+ {+ "type": "null"+ }+ ]+ }},{"type": "null"}]},- "timeout": {+ "stat": {+ "type": "string"+ },+ "synced": {+ "type": "integer"+ }+ },+ "required": [+ "kernel",+ "kernels",+ "stat",+ "synced"+ ],+ "additionalProperties": false+ },+ "SyncIntervalRequestInput": {+ "type": "object",+ "properties": {+ "interval": {+ "type": "number"+ }+ },+ "required": [+ "interval"+ ],+ "additionalProperties": false+ },+ "SyncLANRequestInput": {+ "type": "object",+ "properties": {+ "enabled": {+ "type": "boolean"+ },+ "maxConcurrentReqs": {"anyOf": [{- "type": "integer"+ "type": "number"},{"type": "null"@@ -14382,47 +14941,66 @@]}},+ "required": [+ "enabled"+ ],"additionalProperties": false},- "SyncWebDAV": {+ "SyncLANStatus": {"type": "object","properties": {- "concurrentReqs": {- "type": "integer"+ "active": {+ "type": "boolean"},- "endpoint": {- "type": "string"+ "connectedPeers": {+ "type": "integer"},- "password": {- "type": "string"+ "discoveredPeers": {+ "type": "integer"},- "skipTlsVerify": {+ "enabled": {"type": "boolean"},- "timeout": {+ "maxConcurrentReqs": {+ "type": "integer"+ }+ },+ "required": [+ "active",+ "connectedPeers",+ "discoveredPeers",+ "enabled",+ "maxConcurrentReqs"+ ],+ "additionalProperties": false+ },+ "SyncLocal": {+ "type": "object",+ "properties": {+ "concurrentReqs": {"type": "integer"},- "username": {+ "endpoint": {"type": "string"+ },+ "timeout": {+ "type": "integer"}},"required": ["concurrentReqs","endpoint",- "password",- "skipTlsVerify",- "timeout",- "username"+ "timeout"],"additionalProperties": false},- "SyncWebDAVData": {+ "SyncLocalData": {"type": "object","properties": {- "webdav": {+ "local": {"anyOf": [{- "$ref": "#/$defs/SyncWebDAV"+ "$ref": "#/$defs/SyncLocal"},{"type": "null"@@ -14431,11 +15009,11 @@}},"required": [- "webdav"+ "local"],"additionalProperties": false},- "SyncWebDAVInput": {+ "SyncLocalInput": {"type": "object","properties": {"concurrentReqs": {@@ -14458,26 +15036,6 @@}]},- "password": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "skipTlsVerify": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]- },"timeout": {"anyOf": [{@@ -14487,256 +15045,147 @@"type": "null"}]- },- "username": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]}},"additionalProperties": false},- "TagData": {+ "SyncModeRequestInput": {"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"+ "mode": {+ "type": "number"}},"required": [- "children",- "count",- "depth",- "label",- "name",- "type"+ "mode"],"additionalProperties": false},- "TailChildBlocksRequestInput": {+ "SyncNameRequestInput": {"type": "object","properties": {- "id": {+ "name": {"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"+ "name"],"additionalProperties": false},- "TaskListMarkerRequestInput": {+ "SyncOnlineKernel": {"type": "object","properties": {+ "hostname": {+ "type": "string"+ },"id": {"type": "string"},- "marker": {+ "os": {+ "type": "string"+ },+ "ver": {"type": "string"}},"required": [+ "hostname","id",- "marker"+ "os",+ "ver"],"additionalProperties": false},- "TemplateDocumentInfo": {+ "SyncProviderExportData": {"type": "object","properties": {- "directory": {+ "name": {"type": "string"},- "hasDatabase": {- "type": "boolean"- },- "name": {+ "zip": {"type": "string"}},"required": [- "directory",- "hasDatabase",- "name"+ "name",+ "zip"],"additionalProperties": false},- "TemplateDocumentRequestInput": {+ "SyncProviderImportRequestInput": {"type": "object","properties": {- "id": {- "type": "string"+ "file": {+ "type": "string",+ "format": "binary"}},- "required": [- "id"- ],"additionalProperties": false},- "TemplateFileEntry": {+ "SyncProviderRequestInput": {"type": "object","properties": {- "isDir": {- "type": "boolean"- },- "isPackage": {- "type": "boolean"- },- "path": {- "type": "string"+ "provider": {+ "type": "number"}},"required": [- "isDir",- "path"+ "provider"],"additionalProperties": false},- "TemplateFileRequestInput": {+ "SyncS3": {"type": "object","properties": {- "action": {+ "accessKey": {"type": "string"},- "content": {+ "bucket": {"type": "string"},- "path": {- "type": "string"+ "concurrentReqs": {+ "type": "integer"},- "revision": {+ "endpoint": {"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"+ "pathStyle": {+ "type": "boolean"},- "path": {+ "region": {"type": "string"},- "revision": {+ "secretKey": {"type": "string"+ },+ "skipTlsVerify": {+ "type": "boolean"+ },+ "timeout": {+ "type": "integer"}},"required": [- "content",- "revision"+ "accessKey",+ "bucket",+ "concurrentReqs",+ "endpoint",+ "pathStyle",+ "region",+ "secretKey",+ "skipTlsVerify",+ "timeout"],"additionalProperties": false},- "TemplatePlan": {+ "SyncS3Data": {"type": "object","properties": {- "count": {- "type": "integer"- },- "id": {- "type": "string"- },- "nodes": {+ "s3": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/TemplatePlanNode"- },- {- "type": "null"- }- ]- }+ "$ref": "#/$defs/SyncS3"},{"type": "null"@@ -14745,60 +15194,54 @@}},"required": [- "count",- "id",- "nodes"+ "s3"],"additionalProperties": false},- "TemplatePlanNode": {+ "SyncS3Input": {"type": "object","properties": {- "depth": {- "type": "integer"+ "accessKey": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]},- "hPath": {- "type": "string"+ "bucket": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]},- "id": {- "type": "string"+ "concurrentReqs": {+ "anyOf": [+ {+ "type": "integer"+ },+ {+ "type": "null"+ }+ ]},- "parentID": {- "type": "string"- },- "title": {- "type": "string"- }- },- "required": [- "depth",- "hPath",- "id",- "parentID",- "title"- ],- "additionalProperties": false- },- "TransferBlockRefRequestInput": {- "type": "object",- "properties": {- "fromID": {- "type": "string"- },- "refIDs": {+ "endpoint": {"anyOf": [{- "type": "array",- "items": {- "type": "string"- }+ "type": "string"},{"type": "null"}]},- "reloadUI": {+ "pathStyle": {"anyOf": [{"type": "boolean"@@ -14808,82 +15251,27 @@}]},- "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": {+ "region": {"anyOf": [{- "$ref": "#/$defs/BlockStat"+ "type": "string"},{"type": "null"}]- }- },- "required": [- "reqId",- "stat"- ],- "additionalProperties": false- },- "TreeStatRequestInput": {- "type": "object",- "properties": {- "id": {- "type": "string"},- "ids": {+ "secretKey": {"anyOf": [{- "type": "array",- "items": {- "type": "string"- }+ "type": "string"},{"type": "null"}]},- "includeEmbed": {+ "skipTlsVerify": {"anyOf": [{"type": "boolean"@@ -14893,20 +15281,10 @@}]},- "notebook": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "reqId": {+ "timeout": {"anyOf": [{- "$ref": "#/$defs/JSONValue"+ "type": "integer"},{"type": "null"@@ -14914,71 +15292,73 @@]}},- "required": [- "id"- ],"additionalProperties": false},- "TrimmedIDRequestInput": {+ "SyncWebDAV": {"type": "object","properties": {- "id": {+ "concurrentReqs": {+ "type": "integer"+ },+ "endpoint": {"type": "string"- }- },- "required": [- "id"- ],- "additionalProperties": false- },- "UnfoldedParentData": {- "type": "object",- "properties": {- "parentID": {+ },+ "password": {+ "type": "string"+ },+ "skipTlsVerify": {+ "type": "boolean"+ },+ "timeout": {+ "type": "integer"+ },+ "username": {"type": "string"}},"required": [- "parentID"+ "concurrentReqs",+ "endpoint",+ "password",+ "skipTlsVerify",+ "timeout",+ "username"],"additionalProperties": false},- "UninstallBazaarIconRequestInput": {+ "SyncWebDAVData": {"type": "object","properties": {- "keyword": {+ "webdav": {"anyOf": [{- "type": "string"+ "$ref": "#/$defs/SyncWebDAV"},{"type": "null"}]- },- "packageName": {- "type": "string"}},"required": [- "packageName"+ "webdav"],"additionalProperties": false},- "UninstallBazaarPluginRequestInput": {+ "SyncWebDAVInput": {"type": "object","properties": {- "frontend": {+ "concurrentReqs": {"anyOf": [{- "type": "string"+ "type": "integer"},{"type": "null"}]},- "keyword": {+ "endpoint": {"anyOf": [{"type": "string"@@ -14988,19 +15368,7 @@}]},- "packageName": {- "type": "string"- }- },- "required": [- "packageName"- ],- "additionalProperties": false- },- "UninstallBazaarTemplateRequestInput": {- "type": "object",- "properties": {- "keyword": {+ "password": {"anyOf": [{"type": "string"@@ -15010,349 +15378,438 @@}]},- "packageName": {- "type": "string"- }- },- "required": [- "packageName"- ],- "additionalProperties": false- },- "UninstallBazaarThemeRequestInput": {- "type": "object",- "properties": {- "frontend": {+ "skipTlsVerify": {"anyOf": [{- "type": "string"+ "type": "boolean"},{"type": "null"}]},- "keyword": {+ "timeout": {"anyOf": [{- "type": "string"+ "type": "integer"},{"type": "null"}]},- "packageName": {- "type": "string"+ "username": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]}},- "required": [- "packageName"- ],"additionalProperties": false},- "UninstallBazaarWidgetRequestInput": {+ "TagData": {"type": "object","properties": {- "keyword": {+ "children": {"anyOf": [{- "type": "string"+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/TagData"+ },+ {+ "type": "null"+ }+ ]+ }},{"type": "null"}]},- "packageName": {+ "count": {+ "type": "integer"+ },+ "depth": {+ "type": "integer"+ },+ "label": {+ "type": "string"+ },+ "name": {+ "type": "string"+ },+ "type": {"type": "string"}},"required": [- "packageName"+ "children",+ "count",+ "depth",+ "label",+ "name",+ "type"],"additionalProperties": false},- "UnlockNotebookRequestInput": {+ "TagSnapshotRequestInput": {"type": "object","properties": {- "notebook": {+ "id": {"type": "string"},- "password": {+ "name": {"type": "string"}},"required": [- "notebook",- "password"- ],- "additionalProperties": false- },- "UnzipRequestInput": {- "type": "object",- "properties": {- "path": {- "type": "string"- },- "zipPath": {- "type": "string"- }- },- "required": [- "path",- "zipPath"+ "id",+ "name"],"additionalProperties": false},- "UpdateBazaarPackageRequestInput": {+ "TailChildBlocksRequestInput": {"type": "object","properties": {- "frontend": {+ "id": {"type": "string"},- "keyword": {+ "ids": {"anyOf": [{- "type": "string"+ "type": "array",+ "items": {+ "type": "string"+ }},{"type": "null"}]},- "packageName": {- "type": "string"+ "n": {+ "anyOf": [+ {+ "type": "number"+ },+ {+ "type": "null"+ }+ ]},- "packageType": {- "type": "string"+ "notebook": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]}},"required": [- "frontend",- "packageName",- "packageType"+ "id"],"additionalProperties": false},- "UpdateBlockRequestInput": {+ "TaskListMarkerRequestInput": {"type": "object","properties": {- "data": {- "type": "string"- },- "dataType": {- "type": "string"- },"id": {"type": "string"},- "lockType": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]+ "marker": {+ "type": "string"}},"required": [- "data",- "dataType",- "id"+ "id",+ "marker"],"additionalProperties": false},- "UpdateChannelRequestInput": {+ "TemplateDocumentInfo": {"type": "object","properties": {- "updateChannel": {+ "directory": {+ "type": "string"+ },+ "hasDatabase": {+ "type": "boolean"+ },+ "name": {"type": "string"}},"required": [- "updateChannel"+ "directory",+ "hasDatabase",+ "name"],"additionalProperties": false},- "UpdateEmbedBlockRequestInput": {+ "TemplateDocumentRequestInput": {"type": "object","properties": {- "content": {- "type": "string"- },"id": {"type": "string"}},"required": [- "content","id"],"additionalProperties": false},- "UpdatePinnedDocsRequestInput": {+ "TemplateFileEntry": {"type": "object","properties": {- "action": {- "type": "string"- },- "after": {+ "isDir": {"type": "boolean"},- "ids": {- "type": "array",- "items": {- "type": "string"- }+ "isPackage": {+ "type": "boolean"},- "targetID": {+ "path": {"type": "string"}},"required": [- "action",- "ids"+ "isDir",+ "path"],"additionalProperties": false},- "ViewStatePatchRequestInput": {+ "TemplateFileRequestInput": {"type": "object","properties": {- "key": {+ "action": {"type": "string"},- "removeKeys": {- "anyOf": [- {- "type": "array",- "items": {- "type": "string"- }- },- {- "type": "null"- }- ]+ "content": {+ "type": "string"},- "values": {- "type": "object",- "additionalProperties": {- "$ref": "#/$defs/JSONValue"- }+ "path": {+ "type": "string"+ },+ "revision": {+ "type": "string"+ },+ "target": {+ "type": "string"}},- "required": [- "key"- ],"additionalProperties": false},- "VirtualBlockRefRequestInput": {+ "TemplateFileRevision": {"type": "object","properties": {- "keywords": {- "type": "array",- "items": {- "type": "string"- }+ "revision": {+ "type": "string"}},"required": [- "keywords"+ "revision"],"additionalProperties": false},- "WPSPresentationData": {+ "TemplateFileSource": {"type": "object","properties": {- "converted": {- "type": "boolean"+ "content": {+ "type": "string"},- "dom": {+ "path": {+ "type": "string"+ },+ "revision": {"type": "string"}},"required": [- "converted",- "dom"+ "content",+ "revision"],"additionalProperties": false},- "WPSPresentationRequestInput": {+ "TemplatePlan": {"type": "object","properties": {- "data": {+ "count": {+ "type": "integer"+ },+ "id": {"type": "string"},- "text": {+ "nodes": {"anyOf": [{- "type": "string"+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/TemplatePlanNode"+ },+ {+ "type": "null"+ }+ ]+ }},{"type": "null"}]- },- "type": {- "type": "string"}},"required": [- "data",- "type"+ "count",+ "id",+ "nodes"],"additionalProperties": false},- "WordCountData": {+ "TemplatePlanNode": {"type": "object","properties": {- "reqId": {- "$ref": "#/$defs/JSONValue"+ "depth": {+ "type": "integer"},- "stat": {- "anyOf": [- {- "$ref": "#/$defs/BlockStat"- },- {- "type": "null"- }- ]+ "hPath": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "parentID": {+ "type": "string"+ },+ "title": {+ "type": "string"}},"required": [- "reqId",- "stat"+ "depth",+ "hPath",+ "id",+ "parentID",+ "title"],"additionalProperties": false},- "WorkspaceAVBuiltinColorUpdateInput": {+ "TransferBlockRefRequestInput": {"type": "object","properties": {- "customized": {+ "fromID": {+ "type": "string"+ },+ "refIDs": {"anyOf": [{- "type": "boolean"+ "type": "array",+ "items": {+ "type": "string"+ }},{"type": "null"}]},- "dark": {+ "reloadUI": {"anyOf": [{- "$ref": "#/$defs/InlineStyleThemeInput"+ "type": "boolean"},{"type": "null"}]},- "hidden": {+ "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"@@ -15362,20 +15819,20 @@}]},- "index": {+ "notebook": {"anyOf": [{- "type": "integer"+ "type": "string"},{"type": "null"}]},- "light": {+ "reqId": {"anyOf": [{- "$ref": "#/$defs/InlineStyleThemeInput"+ "$ref": "#/$defs/JSONValue"},{"type": "null"@@ -15383,12 +15840,39 @@]}},+ "required": [+ "id"+ ],"additionalProperties": false},- "WorkspaceAVPaletteRequestInput": {+ "TrimmedIDRequestInput": {"type": "object","properties": {- "app": {+ "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"@@ -15398,93 +15882,2416 @@}]},- "builtinColors": {+ "packageName": {+ "type": "string"+ }+ },+ "required": [+ "packageName"+ ],+ "additionalProperties": false+ },+ "UninstallBazaarPluginRequestInput": {+ "type": "object",+ "properties": {+ "frontend": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/WorkspaceAVBuiltinColorUpdateInput"- },- {- "type": "null"- }- ]- }+ "type": "string"},{"type": "null"}]},- "colors": {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/AttributeViewCustomColorInput"- },- {- "type": "null"- }- ]- }+ "keyword": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ]},- "order": {- "type": "array",- "items": {- "type": "string"- }+ "packageName": {+ "type": "string"}},"required": [- "colors",- "order"+ "packageName"],"additionalProperties": false},- "WorkspaceInfoData": {+ "UninstallBazaarTemplateRequestInput": {"type": "object","properties": {- "siyuanVer": {+ "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"+ }+ ]},- "workspaceDir": {+ "packageName": {"type": "string"}},"required": [- "siyuanVer",- "workspaceDir"+ "packageName"],"additionalProperties": false},- "ZipRequestInput": {+ "UnlockNotebookRequestInput": {"type": "object","properties": {- "path": {+ "notebook": {"type": "string"},- "zipPath": {+ "password": {"type": "string"}},"required": [- "path",- "zipPath"+ "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+ },+ "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": "GET",- "path": "/api/plugin",- "handler": "listLoadedPluginsGET",- "body": "none",+ "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/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": "/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": "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/archive/unzip",+ "handler": "unzip",+ "body": "json",+ "request": {+ "$ref": "#/$defs/UnzipRequestInput"+ },+ "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/archive/zip",+ "handler": "zip",+ "body": "json",+ "request": {+ "$ref": "#/$defs/ZipRequestInput"+ },+ "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/attr/batchGetBlockAttrs",+ "handler": "batchGetBlockAttrs",+ "body": "json",+ "request": {+ "$ref": "#/$defs/BlockIDsRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "object",+ "additionalProperties": {+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "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"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/attr/batchSetBlockAttrs",+ "handler": "batchSetBlockAttrs",+ "body": "json",+ "request": {+ "$ref": "#/$defs/BatchSetBlockAttrsRequestInput"+ },+ "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/attr/getBlockAttrs",+ "handler": "getBlockAttrs",+ "body": "json",+ "request": {+ "$ref": "#/$defs/BlockIDRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "type": "object",+ "additionalProperties": {+ "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": "POST",+ "path": "/api/attr/getBookmarkLabels",+ "handler": "getBookmarkLabels",+ "body": "none",+ "request": {+ "$ref": "#/$defs/EmptyRequestInput"+ },+ "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"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false+ },+ {+ "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+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/attr/setBlockAttrs",+ "handler": "setBlockAttrs",+ "body": "json",+ "request": {+ "$ref": "#/$defs/SetBlockAttrsRequestInput"+ },+ "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/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+ },+ {+ "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/bazaar/batchUpdatePackage",+ "handler": "batchUpdatePackage",+ "body": "json",+ "request": {+ "$ref": "#/$defs/BatchUpdatePackageRequestInput"+ },+ "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"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/bazaar/getBazaarIcon",+ "handler": "getBazaarIcon",+ "body": "json",+ "request": {+ "$ref": "#/$defs/GetBazaarIconRequestInput"+ },+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 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+ },+ {+ "type": "null"+ }+ ]+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]+ }+ },+ {+ "method": "POST",+ "path": "/api/bazaar/getBazaarPackage",+ "handler": "getBazaarPackage",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetBazaarPackageRequestInput"},"response": {"anyOf": [@@ -15498,24 +18305,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/LoadedPlugin"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BazaarPackageDetail"},"msg": {"type": "string"@@ -15534,7 +18324,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -15571,12 +18362,12 @@}},{- "method": "GET",- "path": "/api/plugin/rpc",- "handler": "getLoadedPluginRPC",+ "method": "POST",+ "path": "/api/bazaar/getBazaarPackageREADME",+ "handler": "getBazaarPackageREADME","body": "json","request": {- "$ref": "#/$defs/LoadedPluginRequestInput"+ "$ref": "#/$defs/GetBazaarPackageREADMERequestInput"},"response": {"anyOf": [@@ -15590,14 +18381,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/LoadedPlugin"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BazaarREADMEData"},"msg": {"type": "string"@@ -15617,10 +18401,7 @@"type": "integer","enum": [-1,- 1,- 2,- 3,- 4+ 1]},"data": {@@ -15657,12 +18438,12 @@}},{- "method": "GET",- "path": "/api/plugin/rpc/:name",- "handler": "getLoadedPluginRPCByName",+ "method": "POST",+ "path": "/api/bazaar/getBazaarPackageRating",+ "handler": "getBazaarPackageRating","body": "json","request": {- "$ref": "#/$defs/LoadedPluginRequestInput"+ "$ref": "#/$defs/GetBazaarPackageRatingRequestInput"},"response": {"anyOf": [@@ -15676,14 +18457,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/LoadedPlugin"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BazaarRatingResult"},"msg": {"type": "string"@@ -15703,10 +18477,7 @@"type": "integer","enum": [-1,- 1,- 2,- 3,- 4+ 1]},"data": {@@ -15725,6 +18496,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/BazaarRatingResult"}]},@@ -15743,12 +18517,12 @@}},{- "method": "GET",- "path": "/api/system/bootProgress",- "handler": "bootProgress",- "body": "none",+ "method": "POST",+ "path": "/api/bazaar/getBazaarPackageRatings",+ "handler": "getBazaarPackageRatings",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetBazaarPackageRatingsRequestInput"},"response": {"anyOf": [@@ -15762,7 +18536,7 @@]},"data": {- "$ref": "#/$defs/BootProgressData"+ "$ref": "#/$defs/BazaarRatingsData"},"msg": {"type": "string"@@ -15781,7 +18555,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -15818,12 +18593,12 @@}},{- "method": "GET",- "path": "/api/system/version",- "handler": "version",- "body": "none",+ "method": "POST",+ "path": "/api/bazaar/getBazaarPackageUserRatings",+ "handler": "getBazaarPackageUserRatings",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetBazaarPackageUserRatingsRequestInput"},"response": {"anyOf": [@@ -15837,7 +18612,7 @@]},"data": {- "type": "string"+ "$ref": "#/$defs/BazaarUserRatingsResult"},"msg": {"type": "string"@@ -15856,7 +18631,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -15875,6 +18651,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/BazaarUserRatingsResult"}]},@@ -15893,17 +18672,37 @@}},{- "method": "GET",- "path": "/ws/plugin/rpc",- "handler": "pluginJsonRpcWebSocket",- "body": "none",+ "method": "POST",+ "path": "/api/bazaar/getBazaarPlugin",+ "handler": "getBazaarPlugin",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetBazaarPluginRequestInput"},"response": {"anyOf": [{- "$ref": "#/$defs/PluginRPCFailure"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/BazaarPackagesData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -15911,7 +18710,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -15945,65 +18745,116 @@"additionalProperties": true}]+ }+ },+ {+ "method": "POST",+ "path": "/api/bazaar/getBazaarTemplate",+ "handler": "getBazaarTemplate",+ "body": "json",+ "request": {+ "$ref": "#/$defs/GetBazaarTemplateRequestInput"},- "output": "websocket",- "websocket": {- "incoming": {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCRequestFieldsInput"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/PluginRPCRequestFieldsInput"+ "response": {+ "anyOf": [+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]},- "minItems": 1- }- ]- },- "outgoing": {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCSuccess"- },- {- "$ref": "#/$defs/PluginRPCFailure"+ "data": {+ "$ref": "#/$defs/BazaarPackagesData"+ },+ "msg": {+ "type": "string"+ }},- {- "type": "array",- "items": {+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false+ },+ {+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ -1,+ 1+ ]+ },+ "data": {"anyOf": [{- "$ref": "#/$defs/PluginRPCSuccess"+ "type": "object",+ "properties": {+ "closeTimeout": {+ "type": "number"+ }+ },+ "required": [+ "closeTimeout"+ ],+ "additionalProperties": false},{- "$ref": "#/$defs/PluginRPCFailure"+ "type": "null"}]},- "minItems": 1+ "msg": {+ "type": "string"+ }},- {- "$ref": "#/$defs/PluginRPCNotification"- }- ]- },- "failureStatus": 404+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": true+ }+ ]}},{- "method": "GET",- "path": "/ws/plugin/rpc/:name",- "handler": "pluginJsonRpcWebSocketByName",- "body": "none",+ "method": "POST",+ "path": "/api/bazaar/getBazaarTheme",+ "handler": "getBazaarTheme",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetBazaarThemeRequestInput"},"response": {"anyOf": [{- "$ref": "#/$defs/PluginRPCFailure"+ "type": "object",+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0+ ]+ },+ "data": {+ "$ref": "#/$defs/BazaarPackagesData"+ },+ "msg": {+ "type": "string"+ }+ },+ "required": [+ "code",+ "msg",+ "data"+ ],+ "additionalProperties": false},{"type": "object",@@ -16011,7 +18862,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -16045,60 +18897,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": "POST",- "path": "/api/account/checkActivationcode",- "handler": "checkActivationcode",+ "path": "/api/bazaar/getBazaarWidget",+ "handler": "getBazaarWidget","body": "json","request": {- "$ref": "#/$defs/CheckActivationCodeRequestInput"+ "$ref": "#/$defs/GetBazaarWidgetRequestInput"},"response": {"anyOf": [@@ -16112,7 +18919,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -16149,9 +18956,6 @@],"additionalProperties": false},- {- "type": "null"- },{"type": "null"}@@ -16173,11 +18977,11 @@},{"method": "POST",- "path": "/api/account/deactivate",- "handler": "deactivateUser",- "body": "none",+ "path": "/api/bazaar/getInstalledIcon",+ "handler": "getInstalledIcon",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetInstalledIconRequestInput"},"response": {"anyOf": [@@ -16191,7 +18995,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -16210,7 +19014,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -16248,11 +19053,11 @@},{"method": "POST",- "path": "/api/account/login",- "handler": "login",+ "path": "/api/bazaar/getInstalledPackageSize",+ "handler": "getInstalledPackageSize","body": "json","request": {- "$ref": "#/$defs/AccountLoginRequestInput"+ "$ref": "#/$defs/GetInstalledPackageSizeRequestInput"},"response": {"anyOf": [@@ -16266,14 +19071,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/AccountLoginData"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BazaarPackageSizeData"},"msg": {"type": "string"@@ -16293,8 +19091,7 @@"type": "integer","enum": [-1,- 1,- 10+ 1]},"data": {@@ -16313,16 +19110,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/AccountLoginData"- },- {- "type": "null"- }- ]}]},@@ -16342,11 +19129,11 @@},{"method": "POST",- "path": "/api/account/startFreeTrial",- "handler": "startFreeTrial",- "body": "none",+ "path": "/api/bazaar/getInstalledPlugin",+ "handler": "getInstalledPlugin",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetInstalledPluginRequestInput"},"response": {"anyOf": [@@ -16360,7 +19147,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -16379,7 +19166,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -16417,11 +19205,11 @@},{"method": "POST",- "path": "/api/account/useActivationcode",- "handler": "useActivationcode",+ "path": "/api/bazaar/getInstalledTemplate",+ "handler": "getInstalledTemplate","body": "json","request": {- "$ref": "#/$defs/ActivationCodeRequestInput"+ "$ref": "#/$defs/GetInstalledTemplateRequestInput"},"response": {"anyOf": [@@ -16435,7 +19223,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -16454,7 +19242,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -16492,11 +19281,11 @@},{"method": "POST",- "path": "/api/archive/unzip",- "handler": "unzip",+ "path": "/api/bazaar/getInstalledTheme",+ "handler": "getInstalledTheme","body": "json","request": {- "$ref": "#/$defs/UnzipRequestInput"+ "$ref": "#/$defs/GetInstalledThemeRequestInput"},"response": {"anyOf": [@@ -16510,7 +19299,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -16529,7 +19318,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -16567,11 +19357,11 @@},{"method": "POST",- "path": "/api/archive/zip",- "handler": "zip",+ "path": "/api/bazaar/getInstalledWidget",+ "handler": "getInstalledWidget","body": "json","request": {- "$ref": "#/$defs/ZipRequestInput"+ "$ref": "#/$defs/GetInstalledWidgetRequestInput"},"response": {"anyOf": [@@ -16585,7 +19375,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -16604,7 +19394,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -16642,11 +19433,11 @@},{"method": "POST",- "path": "/api/attr/batchGetBlockAttrs",- "handler": "batchGetBlockAttrs",+ "path": "/api/bazaar/getUpdatedPackage",+ "handler": "getUpdatedPackage","body": "json","request": {- "$ref": "#/$defs/BlockIDsRequestInput"+ "$ref": "#/$defs/GetUpdatedPackageRequestInput"},"response": {"anyOf": [@@ -16660,20 +19451,7 @@]},"data": {- "type": "object",- "additionalProperties": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "type": "string"- }- },- {- "type": "null"- }- ]- }+ "$ref": "#/$defs/BazaarUpdatedData"},"msg": {"type": "string"@@ -16692,7 +19470,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -16730,11 +19509,11 @@},{"method": "POST",- "path": "/api/attr/batchSetBlockAttrs",- "handler": "batchSetBlockAttrs",+ "path": "/api/bazaar/installBazaarIcon",+ "handler": "installBazaarIcon","body": "json","request": {- "$ref": "#/$defs/BatchSetBlockAttrsRequestInput"+ "$ref": "#/$defs/InstallBazaarIconRequestInput"},"response": {"anyOf": [@@ -16748,7 +19527,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarAppearancePackagesData"},"msg": {"type": "string"@@ -16767,7 +19546,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -16805,11 +19585,11 @@},{"method": "POST",- "path": "/api/attr/getBlockAttrs",- "handler": "getBlockAttrs",+ "path": "/api/bazaar/installBazaarPlugin",+ "handler": "installBazaarPlugin","body": "json","request": {- "$ref": "#/$defs/BlockIDRequestInput"+ "$ref": "#/$defs/InstallBazaarPluginRequestInput"},"response": {"anyOf": [@@ -16823,10 +19603,7 @@]},"data": {- "type": "object",- "additionalProperties": {- "type": "string"- }+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -16845,7 +19622,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -16883,36 +19661,26 @@},{"method": "POST",- "path": "/api/attr/getBookmarkLabels",- "handler": "getBookmarkLabels",- "body": "none",+ "path": "/api/bazaar/installBazaarTemplate",+ "handler": "installBazaarTemplate",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/InstallBazaarTemplateRequestInput"},"response": {"anyOf": [{"type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "anyOf": [- {- "type": "array",- "items": {- "type": "string"- }- },- {- "type": "null"- }+ "properties": {+ "code": {+ "type": "integer",+ "enum": [+ 0]},+ "data": {+ "$ref": "#/$defs/BazaarPackagesData"+ },"msg": {"type": "string"}@@ -16930,7 +19698,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -16968,11 +19737,11 @@},{"method": "POST",- "path": "/api/attr/resetBlockAttrs",- "handler": "resetBlockAttrs",- "body": "none",+ "path": "/api/bazaar/installBazaarTheme",+ "handler": "installBazaarTheme",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/InstallBazaarThemeRequestInput"},"response": {"anyOf": [@@ -16986,7 +19755,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarAppearancePackagesData"},"msg": {"type": "string"@@ -17005,7 +19774,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -17043,11 +19813,11 @@},{"method": "POST",- "path": "/api/attr/setBlockAttrs",- "handler": "setBlockAttrs",+ "path": "/api/bazaar/installBazaarWidget",+ "handler": "installBazaarWidget","body": "json","request": {- "$ref": "#/$defs/SetBlockAttrsRequestInput"+ "$ref": "#/$defs/InstallBazaarWidgetRequestInput"},"response": {"anyOf": [@@ -17061,7 +19831,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -17080,7 +19850,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -17118,11 +19889,11 @@},{"method": "POST",- "path": "/api/av/searchAttributeViewNonRelationKey",- "handler": "searchAttributeViewNonRelationKey",- "body": "none",+ "path": "/api/bazaar/installLocalBazaarPackage",+ "handler": "installLocalBazaarPackage",+ "body": "multipart","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/InstallLocalBazaarPackageRequestInput"},"response": {"anyOf": [@@ -17136,7 +19907,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarLocalInstallResult"},"msg": {"type": "string"@@ -17155,7 +19926,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -17174,6 +19946,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/BazaarLocalInstallResult"}]},@@ -17193,11 +19968,11 @@},{"method": "POST",- "path": "/api/bazaar/batchUpdatePackage",- "handler": "batchUpdatePackage",+ "path": "/api/bazaar/setBazaarPackageRating",+ "handler": "setBazaarPackageRating","body": "json","request": {- "$ref": "#/$defs/BatchUpdatePackageRequestInput"+ "$ref": "#/$defs/SetBazaarPackageRatingRequestInput"},"response": {"anyOf": [@@ -17211,7 +19986,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BazaarRatingResult"},"msg": {"type": "string"@@ -17250,6 +20025,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/BazaarRatingResult"}]},@@ -17269,11 +20047,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarIcon",- "handler": "getBazaarIcon",+ "path": "/api/bazaar/uninstallBazaarIcon",+ "handler": "uninstallBazaarIcon","body": "json","request": {- "$ref": "#/$defs/GetBazaarIconRequestInput"+ "$ref": "#/$defs/UninstallBazaarIconRequestInput"},"response": {"anyOf": [@@ -17287,7 +20065,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "$ref": "#/$defs/BazaarAppearancePackagesData"},"msg": {"type": "string"@@ -17345,11 +20123,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarPackage",- "handler": "getBazaarPackage",+ "path": "/api/bazaar/uninstallBazaarPlugin",+ "handler": "uninstallBazaarPlugin","body": "json","request": {- "$ref": "#/$defs/GetBazaarPackageRequestInput"+ "$ref": "#/$defs/UninstallBazaarPluginRequestInput"},"response": {"anyOf": [@@ -17363,7 +20141,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackageDetail"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -17421,11 +20199,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarPackageREADME",- "handler": "getBazaarPackageREADME",+ "path": "/api/bazaar/uninstallBazaarTemplate",+ "handler": "uninstallBazaarTemplate","body": "json","request": {- "$ref": "#/$defs/GetBazaarPackageREADMERequestInput"+ "$ref": "#/$defs/UninstallBazaarTemplateRequestInput"},"response": {"anyOf": [@@ -17439,7 +20217,7 @@]},"data": {- "$ref": "#/$defs/BazaarREADMEData"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -17497,11 +20275,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarPackageRating",- "handler": "getBazaarPackageRating",+ "path": "/api/bazaar/uninstallBazaarTheme",+ "handler": "uninstallBazaarTheme","body": "json","request": {- "$ref": "#/$defs/GetBazaarPackageRatingRequestInput"+ "$ref": "#/$defs/UninstallBazaarThemeRequestInput"},"response": {"anyOf": [@@ -17515,7 +20293,7 @@]},"data": {- "$ref": "#/$defs/BazaarRatingResult"+ "$ref": "#/$defs/BazaarAppearancePackagesData"},"msg": {"type": "string"@@ -17554,9 +20332,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/BazaarRatingResult"}]},@@ -17576,11 +20351,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarPackageRatings",- "handler": "getBazaarPackageRatings",+ "path": "/api/bazaar/uninstallBazaarWidget",+ "handler": "uninstallBazaarWidget","body": "json","request": {- "$ref": "#/$defs/GetBazaarPackageRatingsRequestInput"+ "$ref": "#/$defs/UninstallBazaarWidgetRequestInput"},"response": {"anyOf": [@@ -17594,7 +20369,7 @@]},"data": {- "$ref": "#/$defs/BazaarRatingsData"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -17652,11 +20427,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarPackageUserRatings",- "handler": "getBazaarPackageUserRatings",+ "path": "/api/bazaar/updateBazaarPackage",+ "handler": "updateBazaarPackage","body": "json","request": {- "$ref": "#/$defs/GetBazaarPackageUserRatingsRequestInput"+ "$ref": "#/$defs/UpdateBazaarPackageRequestInput"},"response": {"anyOf": [@@ -17670,7 +20445,7 @@]},"data": {- "$ref": "#/$defs/BazaarUserRatingsResult"+ "$ref": "#/$defs/BazaarPackagesData"},"msg": {"type": "string"@@ -17709,9 +20484,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/BazaarUserRatingsResult"}]},@@ -17731,11 +20503,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarPlugin",- "handler": "getBazaarPlugin",+ "path": "/api/block/appendBlock",+ "handler": "appendBlock","body": "json","request": {- "$ref": "#/$defs/GetBazaarPluginRequestInput"+ "$ref": "#/$defs/AppendBlockRequestInput"},"response": {"anyOf": [@@ -17749,7 +20521,24 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -17768,8 +20557,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -17807,11 +20595,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarTemplate",- "handler": "getBazaarTemplate",+ "path": "/api/block/appendDailyNoteBlock",+ "handler": "appendDailyNoteBlock","body": "json","request": {- "$ref": "#/$defs/GetBazaarTemplateRequestInput"+ "$ref": "#/$defs/DailyNoteBlockRequestInput"},"response": {"anyOf": [@@ -17825,7 +20613,24 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -17844,8 +20649,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -17883,11 +20687,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarTheme",- "handler": "getBazaarTheme",+ "path": "/api/block/appendHeadingChildren",+ "handler": "appendHeadingChildren","body": "json","request": {- "$ref": "#/$defs/GetBazaarThemeRequestInput"+ "$ref": "#/$defs/AppendHeadingChildrenRequestInput"},"response": {"anyOf": [@@ -17901,7 +20705,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "type": "null"},"msg": {"type": "string"@@ -17920,8 +20724,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -17959,11 +20762,11 @@},{"method": "POST",- "path": "/api/bazaar/getBazaarWidget",- "handler": "getBazaarWidget",+ "path": "/api/block/batchAppendBlock",+ "handler": "batchAppendBlock","body": "json","request": {- "$ref": "#/$defs/GetBazaarWidgetRequestInput"+ "$ref": "#/$defs/BatchParentBlockRequestInput"},"response": {"anyOf": [@@ -17977,7 +20780,24 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -17996,8 +20816,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -18035,11 +20854,11 @@},{"method": "POST",- "path": "/api/bazaar/getInstalledIcon",- "handler": "getInstalledIcon",+ "path": "/api/block/batchInsertBlock",+ "handler": "batchInsertBlock","body": "json","request": {- "$ref": "#/$defs/GetInstalledIconRequestInput"+ "$ref": "#/$defs/BatchInsertBlockRequestInput"},"response": {"anyOf": [@@ -18053,7 +20872,24 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -18072,8 +20908,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -18111,11 +20946,11 @@},{"method": "POST",- "path": "/api/bazaar/getInstalledPackageSize",- "handler": "getInstalledPackageSize",+ "path": "/api/block/batchPrependBlock",+ "handler": "batchPrependBlock","body": "json","request": {- "$ref": "#/$defs/GetInstalledPackageSizeRequestInput"+ "$ref": "#/$defs/BatchParentBlockRequestInput"},"response": {"anyOf": [@@ -18128,9 +20963,26 @@0]},- "data": {- "$ref": "#/$defs/BazaarPackageSizeData"- },+ "data": {+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]+ },"msg": {"type": "string"}@@ -18148,8 +21000,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -18187,11 +21038,11 @@},{"method": "POST",- "path": "/api/bazaar/getInstalledPlugin",- "handler": "getInstalledPlugin",+ "path": "/api/block/batchUpdateBlock",+ "handler": "batchUpdateBlock","body": "json","request": {- "$ref": "#/$defs/GetInstalledPluginRequestInput"+ "$ref": "#/$defs/BatchUpdateBlockRequestInput"},"response": {"anyOf": [@@ -18205,7 +21056,24 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -18224,8 +21092,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -18263,11 +21130,11 @@},{"method": "POST",- "path": "/api/bazaar/getInstalledTemplate",- "handler": "getInstalledTemplate",+ "path": "/api/block/batchUpdateTaskListItemMarker",+ "handler": "batchUpdateTaskListItemMarker","body": "json","request": {- "$ref": "#/$defs/GetInstalledTemplateRequestInput"+ "$ref": "#/$defs/BatchTaskListMarkerRequestInput"},"response": {"anyOf": [@@ -18281,7 +21148,24 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -18300,8 +21184,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -18339,11 +21222,11 @@},{"method": "POST",- "path": "/api/bazaar/getInstalledTheme",- "handler": "getInstalledTheme",+ "path": "/api/block/checkBlockExist",+ "handler": "checkBlockExist","body": "json","request": {- "$ref": "#/$defs/GetInstalledThemeRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -18357,7 +21240,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "type": "boolean"},"msg": {"type": "string"@@ -18376,8 +21259,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -18415,11 +21297,11 @@},{"method": "POST",- "path": "/api/bazaar/getInstalledWidget",- "handler": "getInstalledWidget",+ "path": "/api/block/checkBlockFold",+ "handler": "checkBlockFold","body": "json","request": {- "$ref": "#/$defs/GetInstalledWidgetRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -18433,7 +21315,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "$ref": "#/$defs/BlockFoldData"},"msg": {"type": "string"@@ -18452,8 +21334,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -18491,11 +21372,11 @@},{"method": "POST",- "path": "/api/bazaar/getUpdatedPackage",- "handler": "getUpdatedPackage",+ "path": "/api/block/checkBlockRef",+ "handler": "checkBlockRef","body": "json","request": {- "$ref": "#/$defs/GetUpdatedPackageRequestInput"+ "$ref": "#/$defs/CheckBlockRefRequestInput"},"response": {"anyOf": [@@ -18509,7 +21390,7 @@]},"data": {- "$ref": "#/$defs/BazaarUpdatedData"+ "type": "boolean"},"msg": {"type": "string"@@ -18528,8 +21409,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -18548,6 +21428,9 @@},{"type": "null"+ },+ {+ "type": "boolean"}]},@@ -18567,11 +21450,11 @@},{"method": "POST",- "path": "/api/bazaar/installBazaarIcon",- "handler": "installBazaarIcon",+ "path": "/api/block/checkBlocksExist",+ "handler": "checkBlocksExist","body": "json","request": {- "$ref": "#/$defs/InstallBazaarIconRequestInput"+ "$ref": "#/$defs/CheckBlocksExistRequestInput"},"response": {"anyOf": [@@ -18585,7 +21468,17 @@]},"data": {- "$ref": "#/$defs/BazaarAppearancePackagesData"+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "boolean"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -18604,8 +21497,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -18643,11 +21535,11 @@},{"method": "POST",- "path": "/api/bazaar/installBazaarPlugin",- "handler": "installBazaarPlugin",+ "path": "/api/block/deleteBlock",+ "handler": "deleteBlock","body": "json","request": {- "$ref": "#/$defs/InstallBazaarPluginRequestInput"+ "$ref": "#/$defs/DeleteBlockRequestInput"},"response": {"anyOf": [@@ -18661,7 +21553,24 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -18680,8 +21589,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -18719,11 +21627,11 @@},{"method": "POST",- "path": "/api/bazaar/installBazaarTemplate",- "handler": "installBazaarTemplate",+ "path": "/api/block/foldBlock",+ "handler": "foldBlock","body": "json","request": {- "$ref": "#/$defs/InstallBazaarTemplateRequestInput"+ "$ref": "#/$defs/BlockIDRequestInput"},"response": {"anyOf": [@@ -18737,7 +21645,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "type": "null"},"msg": {"type": "string"@@ -18756,8 +21664,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -18795,11 +21702,11 @@},{"method": "POST",- "path": "/api/bazaar/installBazaarTheme",- "handler": "installBazaarTheme",+ "path": "/api/block/getBlockBreadcrumb",+ "handler": "getBlockBreadcrumb","body": "json","request": {- "$ref": "#/$defs/InstallBazaarThemeRequestInput"+ "$ref": "#/$defs/BlockBreadcrumbRequestInput"},"response": {"anyOf": [@@ -18813,7 +21720,24 @@]},"data": {- "$ref": "#/$defs/BazaarAppearancePackagesData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockPath"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -18832,8 +21756,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -18871,11 +21794,11 @@},{"method": "POST",- "path": "/api/bazaar/installBazaarWidget",- "handler": "installBazaarWidget",+ "path": "/api/block/getBlockBreadcrumbChildren",+ "handler": "getBlockBreadcrumbChildren","body": "json","request": {- "$ref": "#/$defs/InstallBazaarWidgetRequestInput"+ "$ref": "#/$defs/BlockBreadcrumbChildrenRequestInput"},"response": {"anyOf": [@@ -18889,7 +21812,14 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "anyOf": [+ {+ "$ref": "#/$defs/BlockBreadcrumbChildren"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -18908,8 +21838,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -18947,11 +21876,11 @@},{"method": "POST",- "path": "/api/bazaar/installLocalBazaarPackage",- "handler": "installLocalBazaarPackage",- "body": "multipart",+ "path": "/api/block/getBlockDOM",+ "handler": "getBlockDOM",+ "body": "json","request": {- "$ref": "#/$defs/InstallLocalBazaarPackageRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -18965,7 +21894,7 @@]},"data": {- "$ref": "#/$defs/BazaarLocalInstallResult"+ "$ref": "#/$defs/BlockDOMData"},"msg": {"type": "string"@@ -18984,8 +21913,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -19004,9 +21932,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/BazaarLocalInstallResult"}]},@@ -19026,11 +21951,11 @@},{"method": "POST",- "path": "/api/bazaar/setBazaarPackageRating",- "handler": "setBazaarPackageRating",+ "path": "/api/block/getBlockDOMWithEmbed",+ "handler": "getBlockDOMWithEmbed","body": "json","request": {- "$ref": "#/$defs/SetBazaarPackageRatingRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -19044,7 +21969,7 @@]},"data": {- "$ref": "#/$defs/BazaarRatingResult"+ "$ref": "#/$defs/BlockDOMData"},"msg": {"type": "string"@@ -19063,8 +21988,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -19083,9 +22007,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/BazaarRatingResult"}]},@@ -19105,11 +22026,11 @@},{"method": "POST",- "path": "/api/bazaar/uninstallBazaarIcon",- "handler": "uninstallBazaarIcon",+ "path": "/api/block/getBlockDOMs",+ "handler": "getBlockDOMs","body": "json","request": {- "$ref": "#/$defs/UninstallBazaarIconRequestInput"+ "$ref": "#/$defs/BlocksQueryRequestInput"},"response": {"anyOf": [@@ -19122,9 +22043,19 @@0]},- "data": {- "$ref": "#/$defs/BazaarAppearancePackagesData"- },+ "data": {+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]+ },"msg": {"type": "string"}@@ -19142,8 +22073,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -19181,11 +22111,11 @@},{"method": "POST",- "path": "/api/bazaar/uninstallBazaarPlugin",- "handler": "uninstallBazaarPlugin",+ "path": "/api/block/getBlockDOMsWithEmbed",+ "handler": "getBlockDOMsWithEmbed","body": "json","request": {- "$ref": "#/$defs/UninstallBazaarPluginRequestInput"+ "$ref": "#/$defs/BlocksQueryRequestInput"},"response": {"anyOf": [@@ -19199,7 +22129,17 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -19218,8 +22158,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -19257,11 +22196,11 @@},{"method": "POST",- "path": "/api/bazaar/uninstallBazaarTemplate",- "handler": "uninstallBazaarTemplate",+ "path": "/api/block/getBlockDefIDsByRefText",+ "handler": "getBlockDefIDsByRefText","body": "json","request": {- "$ref": "#/$defs/UninstallBazaarTemplateRequestInput"+ "$ref": "#/$defs/RefTextQueryRequestInput"},"response": {"anyOf": [@@ -19275,7 +22214,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "$ref": "#/$defs/RefDefsData"},"msg": {"type": "string"@@ -19294,8 +22233,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -19333,11 +22271,11 @@},{"method": "POST",- "path": "/api/bazaar/uninstallBazaarTheme",- "handler": "uninstallBazaarTheme",+ "path": "/api/block/getBlockIndex",+ "handler": "getBlockIndex","body": "json","request": {- "$ref": "#/$defs/UninstallBazaarThemeRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -19351,7 +22289,7 @@]},"data": {- "$ref": "#/$defs/BazaarAppearancePackagesData"+ "type": "integer"},"msg": {"type": "string"@@ -19370,8 +22308,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -19409,11 +22346,11 @@},{"method": "POST",- "path": "/api/bazaar/uninstallBazaarWidget",- "handler": "uninstallBazaarWidget",+ "path": "/api/block/getBlockInfo",+ "handler": "getBlockInfo","body": "json","request": {- "$ref": "#/$defs/UninstallBazaarWidgetRequestInput"+ "$ref": "#/$defs/BlockInfoRequestInput"},"response": {"anyOf": [@@ -19427,7 +22364,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "$ref": "#/$defs/BlockInfoData"},"msg": {"type": "string"@@ -19447,7 +22384,7 @@"type": "integer","enum": [-1,- 1+ 3]},"data": {@@ -19466,6 +22403,9 @@},{"type": "null"+ },+ {+ "type": "string"}]},@@ -19485,11 +22425,11 @@},{"method": "POST",- "path": "/api/bazaar/updateBazaarPackage",- "handler": "updateBazaarPackage",+ "path": "/api/block/getBlockKramdown",+ "handler": "getBlockKramdown","body": "json","request": {- "$ref": "#/$defs/UpdateBazaarPackageRequestInput"+ "$ref": "#/$defs/BlockKramdownRequestInput"},"response": {"anyOf": [@@ -19503,7 +22443,7 @@]},"data": {- "$ref": "#/$defs/BazaarPackagesData"+ "$ref": "#/$defs/BlockKramdownData"},"msg": {"type": "string"@@ -19522,8 +22462,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -19561,11 +22500,11 @@},{"method": "POST",- "path": "/api/block/appendBlock",- "handler": "appendBlock",+ "path": "/api/block/getBlockKramdowns",+ "handler": "getBlockKramdowns","body": "json","request": {- "$ref": "#/$defs/AppendBlockRequestInput"+ "$ref": "#/$defs/BlocksKramdownRequestInput"},"response": {"anyOf": [@@ -19581,16 +22520,9 @@"data": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]+ "type": "object",+ "additionalProperties": {+ "type": "string"}},{@@ -19653,11 +22585,11 @@},{"method": "POST",- "path": "/api/block/appendDailyNoteBlock",- "handler": "appendDailyNoteBlock",+ "path": "/api/block/getBlockRelevantIDs",+ "handler": "getBlockRelevantIDs","body": "json","request": {- "$ref": "#/$defs/DailyNoteBlockRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -19671,24 +22603,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BlockRelevantData"},"msg": {"type": "string"@@ -19745,11 +22660,11 @@},{"method": "POST",- "path": "/api/block/appendHeadingChildren",- "handler": "appendHeadingChildren",+ "path": "/api/block/getBlockSiblingID",+ "handler": "getBlockSiblingID","body": "json","request": {- "$ref": "#/$defs/AppendHeadingChildrenRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -19763,7 +22678,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BlockSiblingData"},"msg": {"type": "string"@@ -19820,11 +22735,11 @@},{"method": "POST",- "path": "/api/block/batchAppendBlock",- "handler": "batchAppendBlock",+ "path": "/api/block/getBlockTreeInfos",+ "handler": "getBlockTreeInfos","body": "json","request": {- "$ref": "#/$defs/BatchParentBlockRequestInput"+ "$ref": "#/$defs/BlocksQueryRequestInput"},"response": {"anyOf": [@@ -19840,11 +22755,11 @@"data": {"anyOf": [{- "type": "array",- "items": {+ "type": "object",+ "additionalProperties": {"anyOf": [{- "$ref": "#/$defs/BlockTransaction"+ "$ref": "#/$defs/BlockTreeInfo"},{"type": "null"@@ -19912,11 +22827,11 @@},{"method": "POST",- "path": "/api/block/batchInsertBlock",- "handler": "batchInsertBlock",+ "path": "/api/block/getBlocksIndexes",+ "handler": "getBlocksIndexes","body": "json","request": {- "$ref": "#/$defs/BatchInsertBlockRequestInput"+ "$ref": "#/$defs/BlocksQueryRequestInput"},"response": {"anyOf": [@@ -19932,16 +22847,9 @@"data": {"anyOf": [{- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]+ "type": "object",+ "additionalProperties": {+ "type": "integer"}},{@@ -20004,11 +22912,11 @@},{"method": "POST",- "path": "/api/block/batchPrependBlock",- "handler": "batchPrependBlock",+ "path": "/api/block/getBlocksWordCount",+ "handler": "getBlocksWordCount","body": "json","request": {- "$ref": "#/$defs/BatchParentBlockRequestInput"+ "$ref": "#/$defs/BlocksWordCountRequestInput"},"response": {"anyOf": [@@ -20022,24 +22930,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/WordCountData"},"msg": {"type": "string"@@ -20096,11 +22987,11 @@},{"method": "POST",- "path": "/api/block/batchUpdateBlock",- "handler": "batchUpdateBlock",+ "path": "/api/block/getChildBlocks",+ "handler": "getChildBlocks","body": "json","request": {- "$ref": "#/$defs/BatchUpdateBlockRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -20114,24 +23005,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"@@ -20188,11 +23072,11 @@},{"method": "POST",- "path": "/api/block/batchUpdateTaskListItemMarker",- "handler": "batchUpdateTaskListItemMarker",+ "path": "/api/block/getContentWordCount",+ "handler": "getContentWordCount","body": "json","request": {- "$ref": "#/$defs/BatchTaskListMarkerRequestInput"+ "$ref": "#/$defs/ContentWordCountRequestInput"},"response": {"anyOf": [@@ -20206,24 +23090,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/WordCountData"},"msg": {"type": "string"@@ -20280,11 +23147,11 @@},{"method": "POST",- "path": "/api/block/checkBlockExist",- "handler": "checkBlockExist",+ "path": "/api/block/getDOMText",+ "handler": "getDOMText","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/DOMTextRequestInput"},"response": {"anyOf": [@@ -20298,7 +23165,7 @@]},"data": {- "type": "boolean"+ "type": "string"},"msg": {"type": "string"@@ -20355,11 +23222,11 @@},{"method": "POST",- "path": "/api/block/checkBlockFold",- "handler": "checkBlockFold",+ "path": "/api/block/getDocBlocksOrders",+ "handler": "getDocBlocksOrders","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/DocOrdersRequestInput"},"response": {"anyOf": [@@ -20373,7 +23240,17 @@]},"data": {- "$ref": "#/$defs/BlockFoldData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -20430,11 +23307,11 @@},{"method": "POST",- "path": "/api/block/checkBlockRef",- "handler": "checkBlockRef",- "body": "json",+ "path": "/api/block/getDocHeadingLevelTransaction",+ "handler": "getDocHeadingLevelTransaction",+ "body": "structJSON","request": {- "$ref": "#/$defs/CheckBlockRefRequestInput"+ "$ref": "#/$defs/DocHeadingLevelRequestInput"},"response": {"anyOf": [@@ -20448,7 +23325,14 @@]},"data": {- "type": "boolean"+ "anyOf": [+ {+ "$ref": "#/$defs/DocHeadingLevelData"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -20486,9 +23370,6 @@},{"type": "null"- },- {- "type": "boolean"}]},@@ -20508,11 +23389,11 @@},{"method": "POST",- "path": "/api/block/checkBlocksExist",- "handler": "checkBlocksExist",+ "path": "/api/block/getDocInfo",+ "handler": "getDocInfo","body": "json","request": {- "$ref": "#/$defs/CheckBlocksExistRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -20528,10 +23409,7 @@"data": {"anyOf": [{- "type": "object",- "additionalProperties": {- "type": "boolean"- }+ "$ref": "#/$defs/DocInfo"},{"type": "null"@@ -20593,11 +23471,11 @@},{"method": "POST",- "path": "/api/block/deleteBlock",- "handler": "deleteBlock",+ "path": "/api/block/getDocsInfo",+ "handler": "getDocsInfo","body": "json","request": {- "$ref": "#/$defs/DeleteBlockRequestInput"+ "$ref": "#/$defs/DocsInfoRequestInput"},"response": {"anyOf": [@@ -20617,7 +23495,7 @@"items": {"anyOf": [{- "$ref": "#/$defs/BlockTransaction"+ "$ref": "#/$defs/DocInfo"},{"type": "null"@@ -20685,11 +23563,11 @@},{"method": "POST",- "path": "/api/block/foldBlock",- "handler": "foldBlock",+ "path": "/api/block/getHeadingChildrenDOM",+ "handler": "getHeadingChildrenDOM","body": "json","request": {- "$ref": "#/$defs/BlockIDRequestInput"+ "$ref": "#/$defs/HeadingChildrenRequestInput"},"response": {"anyOf": [@@ -20703,7 +23581,7 @@]},"data": {- "type": "null"+ "type": "string"},"msg": {"type": "string"@@ -20760,11 +23638,11 @@},{"method": "POST",- "path": "/api/block/getBlockBreadcrumb",- "handler": "getBlockBreadcrumb",+ "path": "/api/block/getHeadingChildrenIDs",+ "handler": "getHeadingChildrenIDs","body": "json","request": {- "$ref": "#/$defs/BlockBreadcrumbRequestInput"+ "$ref": "#/$defs/BlockIDRequestInput"},"response": {"anyOf": [@@ -20782,14 +23660,7 @@{"type": "array","items": {- "anyOf": [- {- "$ref": "#/$defs/BlockPath"- },- {- "type": "null"- }- ]+ "type": "string"}},{@@ -20852,11 +23723,11 @@},{"method": "POST",- "path": "/api/block/getBlockBreadcrumbChildren",- "handler": "getBlockBreadcrumbChildren",+ "path": "/api/block/getHeadingDeleteTransaction",+ "handler": "getHeadingDeleteTransaction","body": "json","request": {- "$ref": "#/$defs/BlockBreadcrumbChildrenRequestInput"+ "$ref": "#/$defs/BlockIDRequestInput"},"response": {"anyOf": [@@ -20872,7 +23743,7 @@"data": {"anyOf": [{- "$ref": "#/$defs/BlockBreadcrumbChildren"+ "$ref": "#/$defs/BlockTransaction"},{"type": "null"@@ -20934,11 +23805,11 @@},{"method": "POST",- "path": "/api/block/getBlockDOM",- "handler": "getBlockDOM",+ "path": "/api/block/getHeadingFoldTransaction",+ "handler": "getHeadingFoldTransaction","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/HeadingFoldRequestInput"},"response": {"anyOf": [@@ -20952,7 +23823,14 @@]},"data": {- "$ref": "#/$defs/BlockDOMData"+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -21009,11 +23887,11 @@},{"method": "POST",- "path": "/api/block/getBlockDOMWithEmbed",- "handler": "getBlockDOMWithEmbed",+ "path": "/api/block/getHeadingInsertTransaction",+ "handler": "getHeadingInsertTransaction","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/BlockIDRequestInput"},"response": {"anyOf": [@@ -21027,7 +23905,14 @@]},"data": {- "$ref": "#/$defs/BlockDOMData"+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -21084,11 +23969,11 @@},{"method": "POST",- "path": "/api/block/getBlockDOMs",- "handler": "getBlockDOMs",+ "path": "/api/block/getHeadingLevelTransaction",+ "handler": "getHeadingLevelTransaction","body": "json","request": {- "$ref": "#/$defs/BlocksQueryRequestInput"+ "$ref": "#/$defs/HeadingLevelRequestInput"},"response": {"anyOf": [@@ -21104,10 +23989,7 @@"data": {"anyOf": [{- "type": "object",- "additionalProperties": {- "type": "string"- }+ "$ref": "#/$defs/BlockTransaction"},{"type": "null"@@ -21169,11 +24051,11 @@},{"method": "POST",- "path": "/api/block/getBlockDOMsWithEmbed",- "handler": "getBlockDOMsWithEmbed",+ "path": "/api/block/getOrderedListContinueStart",+ "handler": "getOrderedListContinueStart","body": "json","request": {- "$ref": "#/$defs/BlocksQueryRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -21187,17 +24069,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "type": "string"- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/OrderedListStartData"},"msg": {"type": "string"@@ -21254,11 +24126,11 @@},{"method": "POST",- "path": "/api/block/getBlockDefIDsByRefText",- "handler": "getBlockDefIDsByRefText",- "body": "json",+ "path": "/api/block/getRecentUpdatedBlocks",+ "handler": "getRecentUpdatedBlocks",+ "body": "none","request": {- "$ref": "#/$defs/RefTextQueryRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -21272,7 +24144,24 @@]},"data": {- "$ref": "#/$defs/RefDefsData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchBlock"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -21329,11 +24218,11 @@},{"method": "POST",- "path": "/api/block/getBlockIndex",- "handler": "getBlockIndex",+ "path": "/api/block/getRefIDs",+ "handler": "getRefIDs","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/RefIDsRequestInput"},"response": {"anyOf": [@@ -21347,7 +24236,7 @@]},"data": {- "type": "integer"+ "$ref": "#/$defs/RefIDsData"},"msg": {"type": "string"@@ -21404,11 +24293,11 @@},{"method": "POST",- "path": "/api/block/getBlockInfo",- "handler": "getBlockInfo",+ "path": "/api/block/getRefIDsByFileAnnotationID",+ "handler": "getRefIDsByFileAnnotationID","body": "json","request": {- "$ref": "#/$defs/BlockInfoRequestInput"+ "$ref": "#/$defs/FileAnnotationRefRequestInput"},"response": {"anyOf": [@@ -21422,7 +24311,7 @@]},"data": {- "$ref": "#/$defs/BlockInfoData"+ "$ref": "#/$defs/RefDefsData"},"msg": {"type": "string"@@ -21441,8 +24330,7 @@"code": {"type": "integer","enum": [- -1,- 3+ -1]},"data": {@@ -21461,9 +24349,6 @@},{"type": "null"- },- {- "type": "string"}]},@@ -21483,11 +24368,11 @@},{"method": "POST",- "path": "/api/block/getBlockKramdown",- "handler": "getBlockKramdown",+ "path": "/api/block/getRefText",+ "handler": "getRefText","body": "json","request": {- "$ref": "#/$defs/BlockKramdownRequestInput"+ "$ref": "#/$defs/BlockQueryRequestInput"},"response": {"anyOf": [@@ -21501,7 +24386,7 @@]},"data": {- "$ref": "#/$defs/BlockKramdownData"+ "type": "string"},"msg": {"type": "string"@@ -21558,11 +24443,11 @@},{"method": "POST",- "path": "/api/block/getBlockKramdowns",- "handler": "getBlockKramdowns",+ "path": "/api/block/getTailChildBlocks",+ "handler": "getTailChildBlocks","body": "json","request": {- "$ref": "#/$defs/BlocksKramdownRequestInput"+ "$ref": "#/$defs/TailChildBlocksRequestInput"},"response": {"anyOf": [@@ -21576,17 +24461,17 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "type": "string"+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/ChildBlock"+ },+ {+ "type": "null"}- },- {- "type": "null"- }- ]+ ]+ }},"msg": {"type": "string"@@ -21643,11 +24528,11 @@},{"method": "POST",- "path": "/api/block/getBlockRelevantIDs",- "handler": "getBlockRelevantIDs",+ "path": "/api/block/getTreeStat",+ "handler": "getTreeStat","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/TreeStatRequestInput"},"response": {"anyOf": [@@ -21661,7 +24546,7 @@]},"data": {- "$ref": "#/$defs/BlockRelevantData"+ "$ref": "#/$defs/TreeStatData"},"msg": {"type": "string"@@ -21718,8 +24603,8 @@},{"method": "POST",- "path": "/api/block/getBlockSiblingID",- "handler": "getBlockSiblingID",+ "path": "/api/block/getUnfoldedParentID",+ "handler": "getUnfoldedParentID","body": "json","request": {"$ref": "#/$defs/BlockQueryRequestInput"@@ -21736,7 +24621,7 @@]},"data": {- "$ref": "#/$defs/BlockSiblingData"+ "$ref": "#/$defs/UnfoldedParentData"},"msg": {"type": "string"@@ -21793,11 +24678,11 @@},{"method": "POST",- "path": "/api/block/getBlockTreeInfos",- "handler": "getBlockTreeInfos",+ "path": "/api/block/insertBlock",+ "handler": "insertBlock","body": "json","request": {- "$ref": "#/$defs/BlocksQueryRequestInput"+ "$ref": "#/$defs/InsertBlockRequestInput"},"response": {"anyOf": [@@ -21813,11 +24698,11 @@"data": {"anyOf": [{- "type": "object",- "additionalProperties": {+ "type": "array",+ "items": {"anyOf": [{- "$ref": "#/$defs/BlockTreeInfo"+ "$ref": "#/$defs/BlockTransaction"},{"type": "null"@@ -21885,11 +24770,11 @@},{"method": "POST",- "path": "/api/block/getBlocksIndexes",- "handler": "getBlocksIndexes",+ "path": "/api/block/moveBlock",+ "handler": "moveBlock","body": "json","request": {- "$ref": "#/$defs/BlocksQueryRequestInput"+ "$ref": "#/$defs/MoveBlockRequestInput"},"response": {"anyOf": [@@ -21903,17 +24788,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "type": "integer"- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -21970,11 +24845,11 @@},{"method": "POST",- "path": "/api/block/getBlocksWordCount",- "handler": "getBlocksWordCount",+ "path": "/api/block/moveOutlineHeading",+ "handler": "moveOutlineHeading","body": "json","request": {- "$ref": "#/$defs/BlocksWordCountRequestInput"+ "$ref": "#/$defs/MoveBlockRequestInput"},"response": {"anyOf": [@@ -21988,7 +24863,24 @@]},"data": {- "$ref": "#/$defs/WordCountData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -22045,11 +24937,11 @@},{"method": "POST",- "path": "/api/block/getChildBlocks",- "handler": "getChildBlocks",+ "path": "/api/block/prependBlock",+ "handler": "prependBlock","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/PrependBlockRequestInput"},"response": {"anyOf": [@@ -22063,17 +24955,24 @@]},"data": {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/ChildBlock"- },- {- "type": "null"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]}- ]- }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -22130,11 +25029,11 @@},{"method": "POST",- "path": "/api/block/getContentWordCount",- "handler": "getContentWordCount",+ "path": "/api/block/prependDailyNoteBlock",+ "handler": "prependDailyNoteBlock","body": "json","request": {- "$ref": "#/$defs/ContentWordCountRequestInput"+ "$ref": "#/$defs/DailyNoteBlockRequestInput"},"response": {"anyOf": [@@ -22148,7 +25047,24 @@]},"data": {- "$ref": "#/$defs/WordCountData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -22205,11 +25121,11 @@},{"method": "POST",- "path": "/api/block/getDOMText",- "handler": "getDOMText",+ "path": "/api/block/setBlockReminder",+ "handler": "setBlockReminder","body": "json","request": {- "$ref": "#/$defs/DOMTextRequestInput"+ "$ref": "#/$defs/BlockReminderRequestInput"},"response": {"anyOf": [@@ -22223,7 +25139,7 @@]},"data": {- "type": "string"+ "type": "null"},"msg": {"type": "string"@@ -22280,11 +25196,11 @@},{"method": "POST",- "path": "/api/block/getDocBlocksOrders",- "handler": "getDocBlocksOrders",+ "path": "/api/block/swapBlockRef",+ "handler": "swapBlockRef","body": "json","request": {- "$ref": "#/$defs/DocOrdersRequestInput"+ "$ref": "#/$defs/SwapBlockRefRequestInput"},"response": {"anyOf": [@@ -22298,17 +25214,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "type": "string"- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -22365,11 +25271,11 @@},{"method": "POST",- "path": "/api/block/getDocHeadingLevelTransaction",- "handler": "getDocHeadingLevelTransaction",- "body": "structJSON",+ "path": "/api/block/transferBlockRef",+ "handler": "transferBlockRef",+ "body": "json","request": {- "$ref": "#/$defs/DocHeadingLevelRequestInput"+ "$ref": "#/$defs/TransferBlockRefRequestInput"},"response": {"anyOf": [@@ -22383,14 +25289,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/DocHeadingLevelData"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -22447,11 +25346,11 @@},{"method": "POST",- "path": "/api/block/getDocInfo",- "handler": "getDocInfo",+ "path": "/api/block/unfoldBlock",+ "handler": "unfoldBlock","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/BlockIDRequestInput"},"response": {"anyOf": [@@ -22465,14 +25364,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/DocInfo"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -22529,11 +25421,11 @@},{"method": "POST",- "path": "/api/block/getDocsInfo",- "handler": "getDocsInfo",+ "path": "/api/block/updateBlock",+ "handler": "updateBlock","body": "json","request": {- "$ref": "#/$defs/DocsInfoRequestInput"+ "$ref": "#/$defs/UpdateBlockRequestInput"},"response": {"anyOf": [@@ -22553,7 +25445,7 @@"items": {"anyOf": [{- "$ref": "#/$defs/DocInfo"+ "$ref": "#/$defs/BlockTransaction"},{"type": "null"@@ -22621,11 +25513,11 @@},{"method": "POST",- "path": "/api/block/getHeadingChildrenDOM",- "handler": "getHeadingChildrenDOM",+ "path": "/api/block/updateTaskListItemMarker",+ "handler": "updateTaskListItemMarker","body": "json","request": {- "$ref": "#/$defs/HeadingChildrenRequestInput"+ "$ref": "#/$defs/TaskListMarkerRequestInput"},"response": {"anyOf": [@@ -22639,7 +25531,24 @@]},"data": {- "type": "string"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/BlockTransaction"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -22696,11 +25605,11 @@},{"method": "POST",- "path": "/api/block/getHeadingChildrenIDs",- "handler": "getHeadingChildrenIDs",- "body": "json",+ "path": "/api/bookmark/getBookmark",+ "handler": "getBookmark",+ "body": "none","request": {- "$ref": "#/$defs/BlockIDRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -22718,7 +25627,14 @@{"type": "array","items": {- "type": "string"+ "anyOf": [+ {+ "$ref": "#/$defs/Bookmark"+ },+ {+ "type": "null"+ }+ ]}},{@@ -22781,11 +25697,11 @@},{"method": "POST",- "path": "/api/block/getHeadingDeleteTransaction",- "handler": "getHeadingDeleteTransaction",+ "path": "/api/bookmark/removeBookmark",+ "handler": "removeBookmark","body": "json","request": {- "$ref": "#/$defs/BlockIDRequestInput"+ "$ref": "#/$defs/RemoveBookmarkRequestInput"},"response": {"anyOf": [@@ -22799,14 +25715,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -22863,11 +25772,11 @@},{"method": "POST",- "path": "/api/block/getHeadingFoldTransaction",- "handler": "getHeadingFoldTransaction",+ "path": "/api/bookmark/renameBookmark",+ "handler": "renameBookmark","body": "json","request": {- "$ref": "#/$defs/HeadingFoldRequestInput"+ "$ref": "#/$defs/RenameBookmarkRequestInput"},"response": {"anyOf": [@@ -22881,14 +25790,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -22945,33 +25847,26 @@},{"method": "POST",- "path": "/api/block/getHeadingInsertTransaction",- "handler": "getHeadingInsertTransaction",+ "path": "/api/broadcast/getChannelInfo",+ "handler": "getChannelInfo","body": "json","request": {- "$ref": "#/$defs/BlockIDRequestInput"+ "$ref": "#/$defs/BroadcastChannelRequestInput"},"response": {"anyOf": [{"type": "object","properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }+ "code": {+ "type": "integer",+ "enum": [+ 0]},+ "data": {+ "$ref": "#/$defs/BroadcastChannelData"+ },"msg": {"type": "string"}@@ -23027,11 +25922,11 @@},{"method": "POST",- "path": "/api/block/getHeadingLevelTransaction",- "handler": "getHeadingLevelTransaction",- "body": "json",+ "path": "/api/broadcast/getChannels",+ "handler": "getChannels",+ "body": "none","request": {- "$ref": "#/$defs/HeadingLevelRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -23045,14 +25940,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BroadcastChannelsData"},"msg": {"type": "string"@@ -23109,11 +25997,11 @@},{"method": "POST",- "path": "/api/block/getOrderedListContinueStart",- "handler": "getOrderedListContinueStart",+ "path": "/api/broadcast/postMessage",+ "handler": "postMessage","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/BroadcastMessageRequestInput"},"response": {"anyOf": [@@ -23127,7 +26015,7 @@]},"data": {- "$ref": "#/$defs/OrderedListStartData"+ "$ref": "#/$defs/BroadcastChannelData"},"msg": {"type": "string"@@ -23146,7 +26034,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -23184,11 +26073,25 @@},{"method": "POST",- "path": "/api/block/getRecentUpdatedBlocks",- "handler": "getRecentUpdatedBlocks",- "body": "none",+ "path": "/api/broadcast/publish",+ "handler": "broadcastPublish",+ "body": "multipart","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "type": "object",+ "additionalProperties": {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "string",+ "format": "binary"+ }+ ]+ }+ }},"response": {"anyOf": [@@ -23202,24 +26105,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/SearchBlock"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BroadcastPublishData"},"msg": {"type": "string"@@ -23238,7 +26124,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -23276,11 +26163,11 @@},{"method": "POST",- "path": "/api/block/getRefIDs",- "handler": "getRefIDs",+ "path": "/api/clipboard/cleanupRichText",+ "handler": "cleanupRichText","body": "json","request": {- "$ref": "#/$defs/RefIDsRequestInput"+ "$ref": "#/$defs/CleanupRichTextRequestInput"},"response": {"anyOf": [@@ -23294,7 +26181,7 @@]},"data": {- "$ref": "#/$defs/RefIDsData"+ "type": "null"},"msg": {"type": "string"@@ -23351,11 +26238,11 @@},{"method": "POST",- "path": "/api/block/getRefIDsByFileAnnotationID",- "handler": "getRefIDsByFileAnnotationID",+ "path": "/api/clipboard/prepareRichText",+ "handler": "prepareRichText","body": "json","request": {- "$ref": "#/$defs/FileAnnotationRefRequestInput"+ "$ref": "#/$defs/PrepareRichTextRequestInput"},"response": {"anyOf": [@@ -23369,7 +26256,14 @@]},"data": {- "$ref": "#/$defs/RefDefsData"+ "anyOf": [+ {+ "$ref": "#/$defs/RichClipboardPrepared"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -23426,11 +26320,11 @@},{"method": "POST",- "path": "/api/block/getRefText",- "handler": "getRefText",- "body": "json",+ "path": "/api/clipboard/readFilePaths",+ "handler": "readFilePaths",+ "body": "none","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -23444,7 +26338,10 @@]},"data": {- "type": "string"+ "type": "array",+ "items": {+ "$ref": "#/$defs/ClipboardFile"+ }},"msg": {"type": "string"@@ -23501,11 +26398,11 @@},{"method": "POST",- "path": "/api/block/getTailChildBlocks",- "handler": "getTailChildBlocks",+ "path": "/api/clipboard/writeFilePath",+ "handler": "writeFilePath","body": "json","request": {- "$ref": "#/$defs/TailChildBlocksRequestInput"+ "$ref": "#/$defs/ClipboardPathRequestInput"},"response": {"anyOf": [@@ -23519,17 +26416,7 @@]},"data": {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/ChildBlock"- },- {- "type": "null"- }- ]- }+ "type": "null"},"msg": {"type": "string"@@ -23586,11 +26473,11 @@},{"method": "POST",- "path": "/api/block/getTreeStat",- "handler": "getTreeStat",- "body": "json",+ "path": "/api/cloud/getCloudSpace",+ "handler": "getCloudSpace",+ "body": "none","request": {- "$ref": "#/$defs/TreeStatRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -23604,7 +26491,7 @@]},"data": {- "$ref": "#/$defs/TreeStatData"+ "$ref": "#/$defs/CloudSpaceData"},"msg": {"type": "string"@@ -23623,7 +26510,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -23661,11 +26549,11 @@},{"method": "POST",- "path": "/api/block/getUnfoldedParentID",- "handler": "getUnfoldedParentID",+ "path": "/api/cloud/setCloudReminder",+ "handler": "setCloudReminder","body": "json","request": {- "$ref": "#/$defs/BlockQueryRequestInput"+ "$ref": "#/$defs/CloudReminderRequestInput"},"response": {"anyOf": [@@ -23679,7 +26567,7 @@]},"data": {- "$ref": "#/$defs/UnfoldedParentData"+ "type": "null"},"msg": {"type": "string"@@ -23736,11 +26624,11 @@},{"method": "POST",- "path": "/api/block/insertBlock",- "handler": "insertBlock",+ "path": "/api/convert/pandoc",+ "handler": "pandoc","body": "json","request": {- "$ref": "#/$defs/InsertBlockRequestInput"+ "$ref": "#/$defs/PandocRequestInput"},"response": {"anyOf": [@@ -23754,24 +26642,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/PandocData"},"msg": {"type": "string"@@ -23828,11 +26699,11 @@},{"method": "POST",- "path": "/api/block/moveBlock",- "handler": "moveBlock",+ "path": "/api/file/copyFile",+ "handler": "copyFile","body": "json","request": {- "$ref": "#/$defs/MoveBlockRequestInput"+ "$ref": "#/$defs/CopyFileRequestInput"},"response": {"anyOf": [@@ -23865,7 +26736,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ -2]},"data": {@@ -23903,37 +26775,46 @@},{"method": "POST",- "path": "/api/block/moveOutlineHeading",- "handler": "moveOutlineHeading",+ "path": "/api/file/getFile",+ "handler": "getFile","body": "json","request": {- "$ref": "#/$defs/MoveBlockRequestInput"+ "$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"@@ -23949,6 +26830,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},{@@ -23957,7 +26876,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ -3]},"data": {@@ -23995,11 +26915,11 @@},{"method": "POST",- "path": "/api/block/prependBlock",- "handler": "prependBlock",+ "path": "/api/file/globalCopyFiles",+ "handler": "globalCopyFiles","body": "json","request": {- "$ref": "#/$defs/PrependBlockRequestInput"+ "$ref": "#/$defs/CopyFilesRequestInput"},"response": {"anyOf": [@@ -24013,24 +26933,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -24049,7 +26952,10 @@"code": {"type": "integer","enum": [- -1+ -1,+ -2,+ -3,+ 403]},"data": {@@ -24087,11 +26993,11 @@},{"method": "POST",- "path": "/api/block/prependDailyNoteBlock",- "handler": "prependDailyNoteBlock",- "body": "json",+ "path": "/api/file/putFile",+ "handler": "putFile",+ "body": "form","request": {- "$ref": "#/$defs/DailyNoteBlockRequestInput"+ "$ref": "#/$defs/PutFileRequestInput"},"response": {"anyOf": [@@ -24105,24 +27011,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -24141,7 +27030,11 @@"code": {"type": "integer","enum": [- -1+ -1,+ -3,+ 400,+ 403,+ 500]},"data": {@@ -24179,11 +27072,11 @@},{"method": "POST",- "path": "/api/block/setBlockReminder",- "handler": "setBlockReminder",+ "path": "/api/file/readDir",+ "handler": "readDir","body": "json","request": {- "$ref": "#/$defs/BlockReminderRequestInput"+ "$ref": "#/$defs/ReadDirectoryRequestInput"},"response": {"anyOf": [@@ -24197,7 +27090,10 @@]},"data": {- "type": "null"+ "type": "array",+ "items": {+ "$ref": "#/$defs/DirectoryEntry"+ }},"msg": {"type": "string"@@ -24216,7 +27112,12 @@"code": {"type": "integer","enum": [- -1+ -1,+ -3,+ 403,+ 404,+ 409,+ 500]},"data": {@@ -24254,11 +27155,11 @@},{"method": "POST",- "path": "/api/block/swapBlockRef",- "handler": "swapBlockRef",+ "path": "/api/file/removeFile",+ "handler": "removeFile","body": "json","request": {- "$ref": "#/$defs/SwapBlockRefRequestInput"+ "$ref": "#/$defs/RemoveFileRequestInput"},"response": {"anyOf": [@@ -24291,7 +27192,11 @@"code": {"type": "integer","enum": [- -1+ -1,+ -3,+ 403,+ 404,+ 500]},"data": {@@ -24329,11 +27234,11 @@},{"method": "POST",- "path": "/api/block/transferBlockRef",- "handler": "transferBlockRef",+ "path": "/api/file/renameFile",+ "handler": "renameFile","body": "json","request": {- "$ref": "#/$defs/TransferBlockRefRequestInput"+ "$ref": "#/$defs/RenameFileRequestInput"},"response": {"anyOf": [@@ -24366,7 +27271,12 @@"code": {"type": "integer","enum": [- -1+ -1,+ -3,+ 403,+ 404,+ 409,+ 500]},"data": {@@ -24404,11 +27314,11 @@},{"method": "POST",- "path": "/api/block/unfoldBlock",- "handler": "unfoldBlock",+ "path": "/api/file/workspaceCopyFiles",+ "handler": "workspaceCopyFiles","body": "json","request": {- "$ref": "#/$defs/BlockIDRequestInput"+ "$ref": "#/$defs/CopyFilesRequestInput"},"response": {"anyOf": [@@ -24441,7 +27351,10 @@"code": {"type": "integer","enum": [- -1+ -1,+ -2,+ -3,+ 403]},"data": {@@ -24479,11 +27392,11 @@},{"method": "POST",- "path": "/api/block/updateBlock",- "handler": "updateBlock",- "body": "json",+ "path": "/api/filetree/getPinnedDocs",+ "handler": "getPinnedDocs",+ "body": "none","request": {- "$ref": "#/$defs/UpdateBlockRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -24497,24 +27410,10 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "type": "array",+ "items": {+ "$ref": "#/$defs/PinnedDoc"+ }},"msg": {"type": "string"@@ -24571,11 +27470,11 @@},{"method": "POST",- "path": "/api/block/updateTaskListItemMarker",- "handler": "updateTaskListItemMarker",+ "path": "/api/filetree/updatePinnedDocs",+ "handler": "updatePinnedDocs","body": "json","request": {- "$ref": "#/$defs/TaskListMarkerRequestInput"+ "$ref": "#/$defs/UpdatePinnedDocsRequestInput"},"response": {"anyOf": [@@ -24589,24 +27488,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/BlockTransaction"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -24663,11 +27545,11 @@},{"method": "POST",- "path": "/api/bookmark/getBookmark",- "handler": "getBookmark",- "body": "none",+ "path": "/api/format/autoSpace",+ "handler": "autoSpace",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/TrimmedIDRequestInput"},"response": {"anyOf": [@@ -24681,24 +27563,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/Bookmark"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -24755,11 +27620,11 @@},{"method": "POST",- "path": "/api/bookmark/removeBookmark",- "handler": "removeBookmark",+ "path": "/api/format/netAssets2LocalAssets",+ "handler": "netAssets2LocalAssets","body": "json","request": {- "$ref": "#/$defs/RemoveBookmarkRequestInput"+ "$ref": "#/$defs/TrimmedIDRequestInput"},"response": {"anyOf": [@@ -24830,11 +27695,11 @@},{"method": "POST",- "path": "/api/bookmark/renameBookmark",- "handler": "renameBookmark",+ "path": "/api/format/netImg2LocalAssets",+ "handler": "netImg2LocalAssets","body": "json","request": {- "$ref": "#/$defs/RenameBookmarkRequestInput"+ "$ref": "#/$defs/NetImageAssetsRequestInput"},"response": {"anyOf": [@@ -24905,11 +27770,11 @@},{"method": "POST",- "path": "/api/broadcast/getChannelInfo",- "handler": "getChannelInfo",+ "path": "/api/graph/getGraph",+ "handler": "getGraph","body": "json","request": {- "$ref": "#/$defs/BroadcastChannelRequestInput"+ "$ref": "#/$defs/GlobalGraphRequestInput"},"response": {"anyOf": [@@ -24923,7 +27788,14 @@]},"data": {- "$ref": "#/$defs/BroadcastChannelData"+ "anyOf": [+ {+ "$ref": "#/$defs/GlobalGraphResult"+ },+ {+ "$ref": "#/$defs/GraphCorrelation"+ }+ ]},"msg": {"type": "string"@@ -24961,6 +27833,16 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/GlobalGraphResult"+ },+ {+ "$ref": "#/$defs/GraphCorrelation"+ }+ ]}]},@@ -24980,11 +27862,11 @@},{"method": "POST",- "path": "/api/broadcast/getChannels",- "handler": "getChannels",- "body": "none",+ "path": "/api/graph/getLocalGraph",+ "handler": "getLocalGraph",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/LocalGraphRequestInput"},"response": {"anyOf": [@@ -24998,7 +27880,14 @@]},"data": {- "$ref": "#/$defs/BroadcastChannelsData"+ "anyOf": [+ {+ "$ref": "#/$defs/LocalGraphResult"+ },+ {+ "$ref": "#/$defs/GraphCorrelation"+ }+ ]},"msg": {"type": "string"@@ -25036,6 +27925,16 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/LocalGraphResult"+ },+ {+ "$ref": "#/$defs/GraphCorrelation"+ }+ ]}]},@@ -25055,11 +27954,11 @@},{"method": "POST",- "path": "/api/broadcast/postMessage",- "handler": "postMessage",- "body": "json",+ "path": "/api/graph/resetGraph",+ "handler": "resetGraph",+ "body": "none","request": {- "$ref": "#/$defs/BroadcastMessageRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -25073,7 +27972,7 @@]},"data": {- "$ref": "#/$defs/BroadcastChannelData"+ "$ref": "#/$defs/ResetGraphData"},"msg": {"type": "string"@@ -25092,8 +27991,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -25131,25 +28029,11 @@},{"method": "POST",- "path": "/api/broadcast/publish",- "handler": "broadcastPublish",- "body": "multipart",+ "path": "/api/graph/resetLocalGraph",+ "handler": "resetLocalGraph",+ "body": "none","request": {- "type": "object",- "additionalProperties": {- "type": "array",- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "string",- "format": "binary"- }- ]- }- }+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -25163,7 +28047,7 @@]},"data": {- "$ref": "#/$defs/BroadcastPublishData"+ "$ref": "#/$defs/ResetLocalGraphData"},"msg": {"type": "string"@@ -25182,8 +28066,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -25221,11 +28104,11 @@},{"method": "POST",- "path": "/api/clipboard/cleanupRichText",- "handler": "cleanupRichText",+ "path": "/api/graph/setGraphConf",+ "handler": "setGraphConf","body": "json","request": {- "$ref": "#/$defs/CleanupRichTextRequestInput"+ "$ref": "#/$defs/SetGraphConfRequestInput"},"response": {"anyOf": [@@ -25239,7 +28122,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/GlobalGraphConf"+ },+ {+ "$ref": "#/$defs/LocalGraphConf"+ }+ ]},"msg": {"type": "string"@@ -25296,11 +28186,11 @@},{"method": "POST",- "path": "/api/clipboard/prepareRichText",- "handler": "prepareRichText",- "body": "json",+ "path": "/api/history/clearWorkspaceHistory",+ "handler": "clearWorkspaceHistory",+ "body": "none","request": {- "$ref": "#/$defs/PrepareRichTextRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -25314,14 +28204,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/RichClipboardPrepared"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -25378,11 +28261,11 @@},{"method": "POST",- "path": "/api/clipboard/readFilePaths",- "handler": "readFilePaths",- "body": "none",+ "path": "/api/history/createAssetHistory",+ "handler": "createAssetHistory",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/CreateAssetHistoryRequestInput"},"response": {"anyOf": [@@ -25396,10 +28279,7 @@]},"data": {- "type": "array",- "items": {- "$ref": "#/$defs/ClipboardFile"- }+ "type": "null"},"msg": {"type": "string"@@ -25456,11 +28336,11 @@},{"method": "POST",- "path": "/api/clipboard/writeFilePath",- "handler": "writeFilePath",+ "path": "/api/history/createDocHistory",+ "handler": "createDocHistory","body": "json","request": {- "$ref": "#/$defs/ClipboardPathRequestInput"+ "$ref": "#/$defs/CreateDocHistoryRequestInput"},"response": {"anyOf": [@@ -25531,11 +28411,11 @@},{"method": "POST",- "path": "/api/cloud/getCloudSpace",- "handler": "getCloudSpace",- "body": "none",+ "path": "/api/history/diffDocVersions",+ "handler": "diffDocVersions",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/DiffDocVersionsRequestInput"},"response": {"anyOf": [@@ -25549,7 +28429,14 @@]},"data": {- "$ref": "#/$defs/CloudSpaceData"+ "anyOf": [+ {+ "$ref": "#/$defs/DocVersionDiffResult"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -25568,8 +28455,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -25607,11 +28493,11 @@},{"method": "POST",- "path": "/api/cloud/setCloudReminder",- "handler": "setCloudReminder",+ "path": "/api/history/getDocHistoryContent",+ "handler": "getDocHistoryContent","body": "json","request": {- "$ref": "#/$defs/CloudReminderRequestInput"+ "$ref": "#/$defs/DocHistoryContentRequestInput"},"response": {"anyOf": [@@ -25625,7 +28511,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/DocHistoryContentData"},"msg": {"type": "string"@@ -25682,11 +28568,11 @@},{"method": "POST",- "path": "/api/convert/pandoc",- "handler": "pandoc",+ "path": "/api/history/getHistoryItems",+ "handler": "getHistoryItems","body": "json","request": {- "$ref": "#/$defs/PandocRequestInput"+ "$ref": "#/$defs/HistoryItemsRequestInput"},"response": {"anyOf": [@@ -25700,7 +28586,7 @@]},"data": {- "$ref": "#/$defs/PandocData"+ "$ref": "#/$defs/HistoryItemsData"},"msg": {"type": "string"@@ -25757,11 +28643,11 @@},{"method": "POST",- "path": "/api/file/copyFile",- "handler": "copyFile",- "body": "json",+ "path": "/api/history/getNotebookHistory",+ "handler": "getNotebookHistory",+ "body": "none","request": {- "$ref": "#/$defs/CopyFileRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -25775,7 +28661,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/NotebookHistoryData"},"msg": {"type": "string"@@ -25794,8 +28680,7 @@"code": {"type": "integer","enum": [- -1,- -2+ -1]},"data": {@@ -25833,17 +28718,36 @@},{"method": "POST",- "path": "/api/file/getFile",- "handler": "getFile",- "body": "json",+ "path": "/api/history/reindexHistory",+ "handler": "reindexHistory",+ "body": "none","request": {- "$ref": "#/$defs/FilePathRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"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",@@ -25851,13 +28755,7 @@"code": {"type": "integer","enum": [- -1,- -3,- 403,- 404,- 409,- 500,- 503+ -1]},"data": {@@ -25891,17 +28789,15 @@"additionalProperties": true}]- },- "output": "binary",- "errorStatus": 202+ }},{"method": "POST",- "path": "/api/file/getUniqueFilename",- "handler": "getUniqueFilename",+ "path": "/api/history/rollbackAssetsHistory",+ "handler": "rollbackAssetsHistory","body": "json","request": {- "$ref": "#/$defs/FilePathRequestInput"+ "$ref": "#/$defs/HistoryPathRequestInput"},"response": {"anyOf": [@@ -25915,7 +28811,7 @@]},"data": {- "$ref": "#/$defs/FilePathData"+ "type": "null"},"msg": {"type": "string"@@ -25934,8 +28830,7 @@"code": {"type": "integer","enum": [- -1,- -3+ -1]},"data": {@@ -25973,11 +28868,11 @@},{"method": "POST",- "path": "/api/file/globalCopyFiles",- "handler": "globalCopyFiles",+ "path": "/api/history/rollbackAttributeViewHistory",+ "handler": "rollbackAttributeViewHistory","body": "json","request": {- "$ref": "#/$defs/CopyFilesRequestInput"+ "$ref": "#/$defs/HistoryPathRequestInput"},"response": {"anyOf": [@@ -26010,10 +28905,7 @@"code": {"type": "integer","enum": [- -1,- -2,- -3,- 403+ -1]},"data": {@@ -26051,11 +28943,11 @@},{"method": "POST",- "path": "/api/file/putFile",- "handler": "putFile",- "body": "form",+ "path": "/api/history/rollbackDocHistory",+ "handler": "rollbackDocHistory",+ "body": "json","request": {- "$ref": "#/$defs/PutFileRequestInput"+ "$ref": "#/$defs/HistoryPathRequestInput"},"response": {"anyOf": [@@ -26088,11 +28980,7 @@"code": {"type": "integer","enum": [- -1,- -3,- 400,- 403,- 500+ -1]},"data": {@@ -26130,11 +29018,11 @@},{"method": "POST",- "path": "/api/file/readDir",- "handler": "readDir",+ "path": "/api/history/rollbackNotebookHistory",+ "handler": "rollbackNotebookHistory","body": "json","request": {- "$ref": "#/$defs/ReadDirectoryRequestInput"+ "$ref": "#/$defs/HistoryPathRequestInput"},"response": {"anyOf": [@@ -26148,10 +29036,7 @@]},"data": {- "type": "array",- "items": {- "$ref": "#/$defs/DirectoryEntry"- }+ "type": "null"},"msg": {"type": "string"@@ -26169,13 +29054,8 @@"properties": {"code": {"type": "integer",- "enum": [- -1,- -3,- 403,- 404,- 409,- 500+ "enum": [+ -1]},"data": {@@ -26213,11 +29093,11 @@},{"method": "POST",- "path": "/api/file/removeFile",- "handler": "removeFile",+ "path": "/api/history/searchHistory",+ "handler": "searchHistory","body": "json","request": {- "$ref": "#/$defs/RemoveFileRequestInput"+ "$ref": "#/$defs/SearchHistoryRequestInput"},"response": {"anyOf": [@@ -26231,7 +29111,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/SearchHistoryData"},"msg": {"type": "string"@@ -26250,11 +29130,7 @@"code": {"type": "integer","enum": [- -1,- -3,- 403,- 404,- 500+ -1]},"data": {@@ -26292,11 +29168,11 @@},{"method": "POST",- "path": "/api/file/renameFile",- "handler": "renameFile",+ "path": "/api/import/cancelImportSY",+ "handler": "cancelImportSY","body": "json","request": {- "$ref": "#/$defs/RenameFileRequestInput"+ "$ref": "#/$defs/ImportTokenRequestInput"},"response": {"anyOf": [@@ -26329,12 +29205,7 @@"code": {"type": "integer","enum": [- -1,- -3,- 403,- 404,- 409,- 500+ -1]},"data": {@@ -26372,11 +29243,11 @@},{"method": "POST",- "path": "/api/file/workspaceCopyFiles",- "handler": "workspaceCopyFiles",+ "path": "/api/import/cancelObsidianVaultTask",+ "handler": "cancelObsidianVaultTask","body": "json","request": {- "$ref": "#/$defs/CopyFilesRequestInput"+ "$ref": "#/$defs/ObsidianTaskRequestInput"},"response": {"anyOf": [@@ -26390,7 +29261,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/ObsidianVaultTask"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -26409,10 +29287,7 @@"code": {"type": "integer","enum": [- -1,- -2,- -3,- 403+ -1]},"data": {@@ -26431,6 +29306,16 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/ObsidianVaultTask"+ },+ {+ "type": "null"+ }+ ]}]},@@ -26450,11 +29335,11 @@},{"method": "POST",- "path": "/api/filetree/getPinnedDocs",- "handler": "getPinnedDocs",- "body": "none",+ "path": "/api/import/continueImportSY",+ "handler": "continueImportSY",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/ContinueImportSYRequestInput"},"response": {"anyOf": [@@ -26468,10 +29353,7 @@]},"data": {- "type": "array",- "items": {- "$ref": "#/$defs/PinnedDoc"- }+ "$ref": "#/$defs/ImportDocumentData"},"msg": {"type": "string"@@ -26528,11 +29410,11 @@},{"method": "POST",- "path": "/api/filetree/updatePinnedDocs",- "handler": "updatePinnedDocs",+ "path": "/api/import/getObsidianVaultTask",+ "handler": "getObsidianVaultTask","body": "json","request": {- "$ref": "#/$defs/UpdatePinnedDocsRequestInput"+ "$ref": "#/$defs/ObsidianTaskRequestInput"},"response": {"anyOf": [@@ -26546,7 +29428,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/ObsidianVaultTask"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -26603,11 +29492,11 @@},{"method": "POST",- "path": "/api/format/autoSpace",- "handler": "autoSpace",- "body": "json",+ "path": "/api/import/importData",+ "handler": "importData",+ "body": "multipart","request": {- "$ref": "#/$defs/TrimmedIDRequestInput"+ "$ref": "#/$defs/ImportDataRequestInput"},"response": {"anyOf": [@@ -26678,11 +29567,11 @@},{"method": "POST",- "path": "/api/format/netAssets2LocalAssets",- "handler": "netAssets2LocalAssets",- "body": "json",+ "path": "/api/import/importSY",+ "handler": "importSY",+ "body": "multipart","request": {- "$ref": "#/$defs/TrimmedIDRequestInput"+ "$ref": "#/$defs/ImportSYRequestInput"},"response": {"anyOf": [@@ -26753,11 +29642,11 @@},{"method": "POST",- "path": "/api/format/netImg2LocalAssets",- "handler": "netImg2LocalAssets",- "body": "json",+ "path": "/api/import/importSYAuto",+ "handler": "importSYAuto",+ "body": "multipart","request": {- "$ref": "#/$defs/NetImageAssetsRequestInput"+ "$ref": "#/$defs/ImportSYRequestInput"},"response": {"anyOf": [@@ -26771,7 +29660,17 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/ImportAutoDocument"+ },+ {+ "$ref": "#/$defs/ImportAutoNotebook"+ },+ {+ "$ref": "#/$defs/ImportAutoNotebooks"+ }+ ]},"msg": {"type": "string"@@ -26809,6 +29708,19 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/ImportAutoDocument"+ },+ {+ "$ref": "#/$defs/ImportAutoNotebook"+ },+ {+ "$ref": "#/$defs/ImportAutoNotebooks"+ }+ ]}]},@@ -26828,11 +29740,11 @@},{"method": "POST",- "path": "/api/graph/getGraph",- "handler": "getGraph",- "body": "json",+ "path": "/api/import/importSYNotebook",+ "handler": "importSYNotebook",+ "body": "multipart","request": {- "$ref": "#/$defs/GlobalGraphRequestInput"+ "$ref": "#/$defs/ImportDataRequestInput"},"response": {"anyOf": [@@ -26848,10 +29760,10 @@"data": {"anyOf": [{- "$ref": "#/$defs/GlobalGraphResult"+ "$ref": "#/$defs/ImportedNotebook"},{- "$ref": "#/$defs/GraphCorrelation"+ "$ref": "#/$defs/ImportedNotebooks"}]},@@ -26891,16 +29803,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/GlobalGraphResult"- },- {- "$ref": "#/$defs/GraphCorrelation"- }- ]}]},@@ -26920,11 +29822,11 @@},{"method": "POST",- "path": "/api/graph/getLocalGraph",- "handler": "getLocalGraph",+ "path": "/api/import/importStdMd",+ "handler": "importStdMd","body": "json","request": {- "$ref": "#/$defs/LocalGraphRequestInput"+ "$ref": "#/$defs/ImportMarkdownRequestInput"},"response": {"anyOf": [@@ -26938,14 +29840,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/LocalGraphResult"- },- {- "$ref": "#/$defs/GraphCorrelation"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -26983,16 +29878,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/LocalGraphResult"- },- {- "$ref": "#/$defs/GraphCorrelation"- }- ]}]},@@ -27012,11 +29897,11 @@},{"method": "POST",- "path": "/api/graph/resetGraph",- "handler": "resetGraph",- "body": "none",+ "path": "/api/import/importZipMd",+ "handler": "importZipMd",+ "body": "multipart","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/ImportZipMarkdownRequestInput"},"response": {"anyOf": [@@ -27030,7 +29915,7 @@]},"data": {- "$ref": "#/$defs/ResetGraphData"+ "type": "null"},"msg": {"type": "string"@@ -27087,11 +29972,11 @@},{"method": "POST",- "path": "/api/graph/resetLocalGraph",- "handler": "resetLocalGraph",- "body": "none",+ "path": "/api/import/startObsidianVaultAnalysis",+ "handler": "startObsidianVaultAnalysis",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/ObsidianAnalysisRequestInput"},"response": {"anyOf": [@@ -27105,7 +29990,14 @@]},"data": {- "$ref": "#/$defs/ResetLocalGraphData"+ "anyOf": [+ {+ "$ref": "#/$defs/ObsidianVaultTask"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -27162,11 +30054,11 @@},{"method": "POST",- "path": "/api/graph/setGraphConf",- "handler": "setGraphConf",+ "path": "/api/import/startObsidianVaultImport",+ "handler": "startObsidianVaultImport","body": "json","request": {- "$ref": "#/$defs/SetGraphConfRequestInput"+ "$ref": "#/$defs/ObsidianImportRequestInput"},"response": {"anyOf": [@@ -27182,10 +30074,10 @@"data": {"anyOf": [{- "$ref": "#/$defs/GlobalGraphConf"+ "$ref": "#/$defs/ObsidianVaultTask"},{- "$ref": "#/$defs/LocalGraphConf"+ "type": "null"}]},@@ -27244,11 +30136,11 @@},{"method": "POST",- "path": "/api/history/clearWorkspaceHistory",- "handler": "clearWorkspaceHistory",- "body": "none",+ "path": "/api/inbox/getShorthand",+ "handler": "getShorthand",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/TrimmedIDRequestInput"},"response": {"anyOf": [@@ -27262,7 +30154,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/Shorthand"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -27281,7 +30180,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -27319,11 +30219,11 @@},{"method": "POST",- "path": "/api/history/createAssetHistory",- "handler": "createAssetHistory",+ "path": "/api/inbox/getShorthands",+ "handler": "getShorthands","body": "json","request": {- "$ref": "#/$defs/CreateAssetHistoryRequestInput"+ "$ref": "#/$defs/ShorthandsRequestInput"},"response": {"anyOf": [@@ -27336,9 +30236,16 @@0]},- "data": {- "type": "null"- },+ "data": {+ "anyOf": [+ {+ "$ref": "#/$defs/ShorthandsData"+ },+ {+ "type": "null"+ }+ ]+ },"msg": {"type": "string"}@@ -27356,7 +30263,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -27394,11 +30302,11 @@},{"method": "POST",- "path": "/api/history/createDocHistory",- "handler": "createDocHistory",+ "path": "/api/inbox/removeShorthands",+ "handler": "removeShorthands","body": "json","request": {- "$ref": "#/$defs/CreateDocHistoryRequestInput"+ "$ref": "#/$defs/RemoveShorthandsRequestInput"},"response": {"anyOf": [@@ -27431,7 +30339,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -27469,11 +30378,11 @@},{"method": "POST",- "path": "/api/history/diffDocVersions",- "handler": "diffDocVersions",+ "path": "/api/lute/copyStdMarkdown",+ "handler": "copyStdMarkdown","body": "json","request": {- "$ref": "#/$defs/DiffDocVersionsRequestInput"+ "$ref": "#/$defs/CopyStdMarkdownRequestInput"},"response": {"anyOf": [@@ -27487,14 +30396,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/DocVersionDiffResult"- },- {- "type": "null"- }- ]+ "type": "string"},"msg": {"type": "string"@@ -27551,11 +30453,11 @@},{"method": "POST",- "path": "/api/history/getDocHistoryContent",- "handler": "getDocHistoryContent",+ "path": "/api/lute/html2BlockDOM",+ "handler": "html2BlockDOM","body": "json","request": {- "$ref": "#/$defs/DocHistoryContentRequestInput"+ "$ref": "#/$defs/HTMLClipboardRequestInput"},"response": {"anyOf": [@@ -27569,7 +30471,14 @@]},"data": {- "$ref": "#/$defs/DocHistoryContentData"+ "anyOf": [+ {+ "type": "string"+ },+ {+ "$ref": "#/$defs/HTMLClipboardPreflight"+ }+ ]},"msg": {"type": "string"@@ -27626,11 +30535,11 @@},{"method": "POST",- "path": "/api/history/getHistoryItems",- "handler": "getHistoryItems",+ "path": "/api/lute/md2html",+ "handler": "md2HTML","body": "json","request": {- "$ref": "#/$defs/HistoryItemsRequestInput"+ "$ref": "#/$defs/MarkdownHTMLRequestInput"},"response": {"anyOf": [@@ -27644,7 +30553,7 @@]},"data": {- "$ref": "#/$defs/HistoryItemsData"+ "$ref": "#/$defs/HTMLData"},"msg": {"type": "string"@@ -27701,11 +30610,11 @@},{"method": "POST",- "path": "/api/history/getNotebookHistory",- "handler": "getNotebookHistory",- "body": "none",+ "path": "/api/lute/spinBlockDOM",+ "handler": "spinBlockDOM",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/DOMTextRequestInput"},"response": {"anyOf": [@@ -27719,7 +30628,7 @@]},"data": {- "$ref": "#/$defs/NotebookHistoryData"+ "$ref": "#/$defs/DOMData"},"msg": {"type": "string"@@ -27738,7 +30647,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 413]},"data": {@@ -27776,11 +30686,11 @@},{"method": "POST",- "path": "/api/history/reindexHistory",- "handler": "reindexHistory",- "body": "none",+ "path": "/api/lute/wpsPresentation2BlockDOM",+ "handler": "wpsPresentation2BlockDOM",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/WPSPresentationRequestInput"},"response": {"anyOf": [@@ -27794,7 +30704,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/WPSPresentationData"},"msg": {"type": "string"@@ -27832,6 +30742,9 @@},{"type": "null"+ },+ {+ "$ref": "#/$defs/WPSPresentationData"}]},@@ -27851,11 +30764,11 @@},{"method": "POST",- "path": "/api/history/rollbackAssetsHistory",- "handler": "rollbackAssetsHistory",+ "path": "/api/notebook/changeMasterPassword",+ "handler": "changeMasterPassword","body": "json","request": {- "$ref": "#/$defs/HistoryPathRequestInput"+ "$ref": "#/$defs/ChangeMasterPasswordRequestInput"},"response": {"anyOf": [@@ -27926,11 +30839,11 @@},{"method": "POST",- "path": "/api/history/rollbackAttributeViewHistory",- "handler": "rollbackAttributeViewHistory",+ "path": "/api/notebook/changeSortNotebook",+ "handler": "changeSortNotebook","body": "json","request": {- "$ref": "#/$defs/HistoryPathRequestInput"+ "$ref": "#/$defs/ChangeSortNotebookRequestInput"},"response": {"anyOf": [@@ -28001,11 +30914,11 @@},{"method": "POST",- "path": "/api/history/rollbackDocHistory",- "handler": "rollbackDocHistory",+ "path": "/api/notebook/closeNotebook",+ "handler": "closeNotebook","body": "json","request": {- "$ref": "#/$defs/HistoryPathRequestInput"+ "$ref": "#/$defs/CloseNotebookRequestInput"},"response": {"anyOf": [@@ -28076,11 +30989,11 @@},{"method": "POST",- "path": "/api/history/rollbackNotebookHistory",- "handler": "rollbackNotebookHistory",+ "path": "/api/notebook/createEncryptedNotebook",+ "handler": "createEncryptedNotebook","body": "json","request": {- "$ref": "#/$defs/HistoryPathRequestInput"+ "$ref": "#/$defs/CreateEncryptedNotebookRequestInput"},"response": {"anyOf": [@@ -28094,7 +31007,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/CreateNotebookData"},"msg": {"type": "string"@@ -28151,11 +31064,11 @@},{"method": "POST",- "path": "/api/history/searchHistory",- "handler": "searchHistory",+ "path": "/api/notebook/createNotebook",+ "handler": "createNotebook","body": "json","request": {- "$ref": "#/$defs/SearchHistoryRequestInput"+ "$ref": "#/$defs/CreateNotebookRequestInput"},"response": {"anyOf": [@@ -28169,7 +31082,7 @@]},"data": {- "$ref": "#/$defs/SearchHistoryData"+ "$ref": "#/$defs/CreateNotebookData"},"msg": {"type": "string"@@ -28226,11 +31139,11 @@},{"method": "POST",- "path": "/api/import/cancelImportSY",- "handler": "cancelImportSY",- "body": "json",+ "path": "/api/notebook/disableEncryptedNotebooks",+ "handler": "disableEncryptedNotebooks",+ "body": "none","request": {- "$ref": "#/$defs/ImportTokenRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -28301,11 +31214,11 @@},{"method": "POST",- "path": "/api/import/cancelObsidianVaultTask",- "handler": "cancelObsidianVaultTask",+ "path": "/api/notebook/enableEncryptedNotebooks",+ "handler": "enableEncryptedNotebooks","body": "json","request": {- "$ref": "#/$defs/ObsidianTaskRequestInput"+ "$ref": "#/$defs/NotebookPasswordRequestInput"},"response": {"anyOf": [@@ -28319,14 +31232,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/ObsidianVaultTask"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -28364,16 +31270,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/ObsidianVaultTask"- },- {- "type": "null"- }- ]}]},@@ -28393,11 +31289,11 @@},{"method": "POST",- "path": "/api/import/continueImportSY",- "handler": "continueImportSY",- "body": "json",+ "path": "/api/notebook/exportNotebookCryptoBackup",+ "handler": "exportNotebookCryptoBackup",+ "body": "none","request": {- "$ref": "#/$defs/ContinueImportSYRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -28411,7 +31307,7 @@]},"data": {- "$ref": "#/$defs/ImportDocumentData"+ "$ref": "#/$defs/NotebookCryptoBackupData"},"msg": {"type": "string"@@ -28468,11 +31364,11 @@},{"method": "POST",- "path": "/api/import/getObsidianVaultTask",- "handler": "getObsidianVaultTask",- "body": "json",+ "path": "/api/notebook/getEncryptedNotebookStatus",+ "handler": "getEncryptedNotebookStatus",+ "body": "none","request": {- "$ref": "#/$defs/ObsidianTaskRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -28486,14 +31382,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/ObsidianVaultTask"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/EncryptedNotebookStatusData"},"msg": {"type": "string"@@ -28550,11 +31439,11 @@},{"method": "POST",- "path": "/api/import/importData",- "handler": "importData",- "body": "multipart",+ "path": "/api/notebook/getNotebookConf",+ "handler": "getNotebookConf",+ "body": "json","request": {- "$ref": "#/$defs/ImportDataRequestInput"+ "$ref": "#/$defs/CloseNotebookRequestInput"},"response": {"anyOf": [@@ -28568,7 +31457,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/NotebookConfData"},"msg": {"type": "string"@@ -28625,11 +31514,11 @@},{"method": "POST",- "path": "/api/import/importSY",- "handler": "importSY",- "body": "multipart",+ "path": "/api/notebook/getNotebookInfo",+ "handler": "getNotebookInfo",+ "body": "json","request": {- "$ref": "#/$defs/ImportSYRequestInput"+ "$ref": "#/$defs/NotebookIDRequestInput"},"response": {"anyOf": [@@ -28643,7 +31532,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/NotebookInfoData"},"msg": {"type": "string"@@ -28700,11 +31589,11 @@},{"method": "POST",- "path": "/api/import/importSYAuto",- "handler": "importSYAuto",+ "path": "/api/notebook/importNotebookCryptoBackup",+ "handler": "importNotebookCryptoBackup","body": "multipart","request": {- "$ref": "#/$defs/ImportSYRequestInput"+ "$ref": "#/$defs/ImportNotebookCryptoBackupRequestInput"},"response": {"anyOf": [@@ -28718,17 +31607,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/ImportAutoDocument"- },- {- "$ref": "#/$defs/ImportAutoNotebook"- },- {- "$ref": "#/$defs/ImportAutoNotebooks"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -28766,19 +31645,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/ImportAutoDocument"- },- {- "$ref": "#/$defs/ImportAutoNotebook"- },- {- "$ref": "#/$defs/ImportAutoNotebooks"- }- ]}]},@@ -28798,11 +31664,11 @@},{"method": "POST",- "path": "/api/import/importSYNotebook",- "handler": "importSYNotebook",- "body": "multipart",+ "path": "/api/notebook/lockNotebook",+ "handler": "lockNotebook",+ "body": "json","request": {- "$ref": "#/$defs/ImportDataRequestInput"+ "$ref": "#/$defs/NotebookIDRequestInput"},"response": {"anyOf": [@@ -28816,14 +31682,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/ImportedNotebook"- },- {- "$ref": "#/$defs/ImportedNotebooks"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -28880,11 +31739,11 @@},{"method": "POST",- "path": "/api/import/importStdMd",- "handler": "importStdMd",- "body": "json",+ "path": "/api/notebook/lsNotebooks",+ "handler": "lsNotebooks",+ "body": "legacyOptional","request": {- "$ref": "#/$defs/ImportMarkdownRequestInput"+ "$ref": "#/$defs/ListNotebooksRequestInput"},"response": {"anyOf": [@@ -28897,9 +31756,16 @@0]},- "data": {- "type": "null"- },+ "data": {+ "anyOf": [+ {+ "$ref": "#/$defs/ListNotebooksData"+ },+ {+ "type": "null"+ }+ ]+ },"msg": {"type": "string"}@@ -28955,11 +31821,11 @@},{"method": "POST",- "path": "/api/import/importZipMd",- "handler": "importZipMd",- "body": "multipart",+ "path": "/api/notebook/openNotebook",+ "handler": "openNotebook",+ "body": "json","request": {- "$ref": "#/$defs/ImportZipMarkdownRequestInput"+ "$ref": "#/$defs/OpenNotebookRequestInput"},"response": {"anyOf": [@@ -29030,11 +31896,11 @@},{"method": "POST",- "path": "/api/import/startObsidianVaultAnalysis",- "handler": "startObsidianVaultAnalysis",+ "path": "/api/notebook/removeNotebook",+ "handler": "removeNotebook","body": "json","request": {- "$ref": "#/$defs/ObsidianAnalysisRequestInput"+ "$ref": "#/$defs/NotebookIDRequestInput"},"response": {"anyOf": [@@ -29048,14 +31914,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/ObsidianVaultTask"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -29112,11 +31971,11 @@},{"method": "POST",- "path": "/api/import/startObsidianVaultImport",- "handler": "startObsidianVaultImport",+ "path": "/api/notebook/renameNotebook",+ "handler": "renameNotebook","body": "json","request": {- "$ref": "#/$defs/ObsidianImportRequestInput"+ "$ref": "#/$defs/RenameNotebookRequestInput"},"response": {"anyOf": [@@ -29130,14 +31989,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/ObsidianVaultTask"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -29194,11 +32046,11 @@},{"method": "POST",- "path": "/api/inbox/getShorthand",- "handler": "getShorthand",- "body": "json",+ "path": "/api/notebook/reorder",+ "handler": "reorderNotebooks",+ "body": "structJSON","request": {- "$ref": "#/$defs/TrimmedIDRequestInput"+ "$ref": "#/$defs/ReorderNotebooksRequestInput"},"response": {"anyOf": [@@ -29214,7 +32066,7 @@"data": {"anyOf": [{- "$ref": "#/$defs/Shorthand"+ "$ref": "#/$defs/ReorderData"},{"type": "null"@@ -29238,8 +32090,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -29258,6 +32109,16 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/ReorderData"+ },+ {+ "type": "null"+ }+ ]}]},@@ -29277,11 +32138,11 @@},{"method": "POST",- "path": "/api/inbox/getShorthands",- "handler": "getShorthands",+ "path": "/api/notebook/setNotebookConf",+ "handler": "setNotebookConf","body": "json","request": {- "$ref": "#/$defs/ShorthandsRequestInput"+ "$ref": "#/$defs/SetNotebookConfRequestInput"},"response": {"anyOf": [@@ -29297,7 +32158,7 @@"data": {"anyOf": [{- "$ref": "#/$defs/ShorthandsData"+ "$ref": "#/$defs/NotebookConf"},{"type": "null"@@ -29321,8 +32182,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -29360,11 +32220,11 @@},{"method": "POST",- "path": "/api/inbox/removeShorthands",- "handler": "removeShorthands",+ "path": "/api/notebook/setNotebookCryptoAutoLock",+ "handler": "setNotebookCryptoAutoLock","body": "json","request": {- "$ref": "#/$defs/RemoveShorthandsRequestInput"+ "$ref": "#/$defs/NotebookCryptoAutoLockRequestInput"},"response": {"anyOf": [@@ -29397,8 +32257,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -29436,11 +32295,11 @@},{"method": "POST",- "path": "/api/lute/copyStdMarkdown",- "handler": "copyStdMarkdown",+ "path": "/api/notebook/setNotebookIcon",+ "handler": "setNotebookIcon","body": "json","request": {- "$ref": "#/$defs/CopyStdMarkdownRequestInput"+ "$ref": "#/$defs/SetNotebookIconRequestInput"},"response": {"anyOf": [@@ -29454,7 +32313,7 @@]},"data": {- "type": "string"+ "type": "null"},"msg": {"type": "string"@@ -29511,11 +32370,11 @@},{"method": "POST",- "path": "/api/lute/html2BlockDOM",- "handler": "html2BlockDOM",- "body": "json",+ "path": "/api/notebook/touchEncryptedNotebooks",+ "handler": "touchEncryptedNotebooks",+ "body": "none","request": {- "$ref": "#/$defs/HTMLClipboardRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -29529,14 +32388,7 @@]},"data": {- "anyOf": [- {- "type": "string"- },- {- "$ref": "#/$defs/HTMLClipboardPreflight"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -29593,11 +32445,11 @@},{"method": "POST",- "path": "/api/lute/md2html",- "handler": "md2HTML",+ "path": "/api/notebook/unlockAndOpenNotebook",+ "handler": "unlockAndOpenNotebook","body": "json","request": {- "$ref": "#/$defs/MarkdownHTMLRequestInput"+ "$ref": "#/$defs/UnlockNotebookRequestInput"},"response": {"anyOf": [@@ -29611,7 +32463,7 @@]},"data": {- "$ref": "#/$defs/HTMLData"+ "type": "null"},"msg": {"type": "string"@@ -29668,11 +32520,11 @@},{"method": "POST",- "path": "/api/lute/spinBlockDOM",- "handler": "spinBlockDOM",+ "path": "/api/notebook/unlockNotebook",+ "handler": "unlockNotebook","body": "json","request": {- "$ref": "#/$defs/DOMTextRequestInput"+ "$ref": "#/$defs/UnlockNotebookRequestInput"},"response": {"anyOf": [@@ -29686,7 +32538,7 @@]},"data": {- "$ref": "#/$defs/DOMData"+ "type": "null"},"msg": {"type": "string"@@ -29705,8 +32557,7 @@"code": {"type": "integer","enum": [- -1,- 413+ -1]},"data": {@@ -29744,11 +32595,11 @@},{"method": "POST",- "path": "/api/lute/wpsPresentation2BlockDOM",- "handler": "wpsPresentation2BlockDOM",+ "path": "/api/notification/pushErrMsg",+ "handler": "pushErrMsg","body": "json","request": {- "$ref": "#/$defs/WPSPresentationRequestInput"+ "$ref": "#/$defs/NotificationRequestInput"},"response": {"anyOf": [@@ -29762,7 +32613,7 @@]},"data": {- "$ref": "#/$defs/WPSPresentationData"+ "$ref": "#/$defs/NotificationData"},"msg": {"type": "string"@@ -29800,9 +32651,6 @@},{"type": "null"- },- {- "$ref": "#/$defs/WPSPresentationData"}]},@@ -29822,11 +32670,11 @@},{"method": "POST",- "path": "/api/notebook/changeMasterPassword",- "handler": "changeMasterPassword",+ "path": "/api/notification/pushMsg",+ "handler": "pushMsg","body": "json","request": {- "$ref": "#/$defs/ChangeMasterPasswordRequestInput"+ "$ref": "#/$defs/NotificationRequestInput"},"response": {"anyOf": [@@ -29840,7 +32688,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/NotificationData"},"msg": {"type": "string"@@ -29897,11 +32745,11 @@},{"method": "POST",- "path": "/api/notebook/changeSortNotebook",- "handler": "changeSortNotebook",+ "path": "/api/outline/getDocHeadingNumbers",+ "handler": "getDocHeadingNumbers","body": "json","request": {- "$ref": "#/$defs/ChangeSortNotebookRequestInput"+ "$ref": "#/$defs/HeadingNumbersRequestInput"},"response": {"anyOf": [@@ -29915,7 +32763,17 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "type": "object",+ "additionalProperties": {+ "type": "string"+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -29934,7 +32792,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -29972,11 +32831,11 @@},{"method": "POST",- "path": "/api/notebook/closeNotebook",- "handler": "closeNotebook",+ "path": "/api/outline/getDocOutline",+ "handler": "getDocOutline","body": "json","request": {- "$ref": "#/$defs/CloseNotebookRequestInput"+ "$ref": "#/$defs/OutlineRequestInput"},"response": {"anyOf": [@@ -29990,7 +32849,24 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/SearchPath"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -30009,7 +32885,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -30047,11 +32924,11 @@},{"method": "POST",- "path": "/api/notebook/createEncryptedNotebook",- "handler": "createEncryptedNotebook",+ "path": "/api/petal/loadPetals",+ "handler": "loadPetals","body": "json","request": {- "$ref": "#/$defs/CreateEncryptedNotebookRequestInput"+ "$ref": "#/$defs/LoadPetalsRequestInput"},"response": {"anyOf": [@@ -30065,7 +32942,24 @@]},"data": {- "$ref": "#/$defs/CreateNotebookData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/Petal"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -30122,11 +33016,11 @@},{"method": "POST",- "path": "/api/notebook/createNotebook",- "handler": "createNotebook",+ "path": "/api/petal/setPetalEnabled",+ "handler": "setPetalEnabled","body": "json","request": {- "$ref": "#/$defs/CreateNotebookRequestInput"+ "$ref": "#/$defs/SetPetalEnabledRequestInput"},"response": {"anyOf": [@@ -30140,7 +33034,14 @@]},"data": {- "$ref": "#/$defs/CreateNotebookData"+ "anyOf": [+ {+ "$ref": "#/$defs/Petal"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -30197,11 +33098,11 @@},{"method": "POST",- "path": "/api/notebook/disableEncryptedNotebooks",- "handler": "disableEncryptedNotebooks",- "body": "none",+ "path": "/api/petal/setPetalPublishEnabled",+ "handler": "setPetalPublishEnabled",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SetPetalPublishEnabledRequestInput"},"response": {"anyOf": [@@ -30215,7 +33116,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/Petal"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -30272,11 +33180,11 @@},{"method": "POST",- "path": "/api/notebook/enableEncryptedNotebooks",- "handler": "enableEncryptedNotebooks",+ "path": "/api/plugin/getLoadedPlugin",+ "handler": "getLoadedPlugin","body": "json","request": {- "$ref": "#/$defs/NotebookPasswordRequestInput"+ "$ref": "#/$defs/LoadedPluginRequestInput"},"response": {"anyOf": [@@ -30290,7 +33198,14 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/LoadedPlugin"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -30309,7 +33224,11 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1,+ 2,+ 3,+ 4]},"data": {@@ -30347,8 +33266,8 @@},{"method": "POST",- "path": "/api/notebook/exportNotebookCryptoBackup",- "handler": "exportNotebookCryptoBackup",+ "path": "/api/plugin/listLoadedPlugins",+ "handler": "listLoadedPlugins","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -30365,7 +33284,24 @@]},"data": {- "$ref": "#/$defs/NotebookCryptoBackupData"+ "anyOf": [+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/LoadedPlugin"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -30422,36 +33358,52 @@},{"method": "POST",- "path": "/api/notebook/getEncryptedNotebookStatus",- "handler": "getEncryptedNotebookStatus",- "body": "none",+ "path": "/api/plugin/rpc",+ "handler": "pluginJsonRpcHttp",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCRequestFieldsInput"+ },+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/PluginRPCRequestFieldsInput"+ },+ "minItems": 1+ }+ ]},"response": {"anyOf": [{- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0+ "anyOf": [+ {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCSuccess"+ },+ {+ "$ref": "#/$defs/PluginRPCFailure"+ }]},- "data": {- "$ref": "#/$defs/EncryptedNotebookStatusData"- },- "msg": {- "type": "string"+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCSuccess"+ },+ {+ "$ref": "#/$defs/PluginRPCFailure"+ }+ ]+ },+ "minItems": 1}- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false+ ]},{"type": "object",@@ -30493,40 +33445,58 @@"additionalProperties": true}]- }+ },+ "output": "directJSON",+ "noContent": true},{"method": "POST",- "path": "/api/notebook/getNotebookConf",- "handler": "getNotebookConf",+ "path": "/api/plugin/rpc/:name",+ "handler": "pluginJsonRpcHttpByName","body": "json","request": {- "$ref": "#/$defs/CloseNotebookRequestInput"+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCRequestFieldsInput"+ },+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/PluginRPCRequestFieldsInput"+ },+ "minItems": 1+ }+ ]},"response": {"anyOf": [{- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0+ "anyOf": [+ {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCSuccess"+ },+ {+ "$ref": "#/$defs/PluginRPCFailure"+ }]},- "data": {- "$ref": "#/$defs/NotebookConfData"- },- "msg": {- "type": "string"+ {+ "type": "array",+ "items": {+ "anyOf": [+ {+ "$ref": "#/$defs/PluginRPCSuccess"+ },+ {+ "$ref": "#/$defs/PluginRPCFailure"+ }+ ]+ },+ "minItems": 1}- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false+ ]},{"type": "object",@@ -30568,15 +33538,17 @@"additionalProperties": true}]- }+ },+ "output": "directJSON",+ "noContent": true},{"method": "POST",- "path": "/api/notebook/getNotebookInfo",- "handler": "getNotebookInfo",+ "path": "/api/query/sql",+ "handler": "SQL","body": "json","request": {- "$ref": "#/$defs/NotebookIDRequestInput"+ "$ref": "#/$defs/SQLQueryRequestInput"},"response": {"anyOf": [@@ -30590,16 +33562,50 @@]},"data": {- "$ref": "#/$defs/NotebookInfoData"+ "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},@@ -30609,7 +33615,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -30647,11 +33654,11 @@},{"method": "POST",- "path": "/api/notebook/importNotebookCryptoBackup",- "handler": "importNotebookCryptoBackup",- "body": "multipart",+ "path": "/api/ref/getBacklink2",+ "handler": "getBacklink2",+ "body": "json","request": {- "$ref": "#/$defs/ImportNotebookCryptoBackupRequestInput"+ "$ref": "#/$defs/BacklinkListRequestInput"},"response": {"anyOf": [@@ -30665,7 +33672,17 @@]},"data": {- "type": "null"+ "anyOf": [+ {+ "$ref": "#/$defs/BacklinkList"+ },+ {+ "$ref": "#/$defs/BacklinkRefDefs"+ },+ {+ "type": "null"+ }+ ]},"msg": {"type": "string"@@ -30684,7 +33701,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -30703,6 +33721,19 @@},{"type": "null"+ },+ {+ "anyOf": [+ {+ "$ref": "#/$defs/BacklinkList"+ },+ {+ "$ref": "#/$defs/BacklinkRefDefs"+ },+ {+ "type": "null"+ }+ ]}]},@@ -30721,12 +33752,12 @@}},{- "method": "POST",- "path": "/api/notebook/lockNotebook",- "handler": "lockNotebook",+ "method": "POST",+ "path": "/api/ref/getBacklinkDoc",+ "handler": "getBacklinkDoc","body": "json","request": {- "$ref": "#/$defs/NotebookIDRequestInput"+ "$ref": "#/$defs/BacklinkDocumentRequestInput"},"response": {"anyOf": [@@ -30740,7 +33771,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/BacklinkContextData"},"msg": {"type": "string"@@ -30759,7 +33790,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -30797,11 +33829,11 @@},{"method": "POST",- "path": "/api/notebook/lsNotebooks",- "handler": "lsNotebooks",- "body": "legacyOptional",+ "path": "/api/ref/getBackmentionDoc",+ "handler": "getBackmentionDoc",+ "body": "json","request": {- "$ref": "#/$defs/ListNotebooksRequestInput"+ "$ref": "#/$defs/BackmentionDocumentRequestInput"},"response": {"anyOf": [@@ -30815,14 +33847,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/ListNotebooksData"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/BacklinkContextData"},"msg": {"type": "string"@@ -30841,7 +33866,8 @@"code": {"type": "integer","enum": [- -1+ -1,+ 1]},"data": {@@ -30879,11 +33905,11 @@},{"method": "POST",- "path": "/api/notebook/openNotebook",- "handler": "openNotebook",+ "path": "/api/ref/refreshBacklink",+ "handler": "refreshBacklink","body": "json","request": {- "$ref": "#/$defs/OpenNotebookRequestInput"+ "$ref": "#/$defs/RefreshBacklinkRequestInput"},"response": {"anyOf": [@@ -30954,11 +33980,11 @@},{"method": "POST",- "path": "/api/notebook/removeNotebook",- "handler": "removeNotebook",- "body": "json",+ "path": "/api/repo/checkSnapshot",+ "handler": "checkSnapshot",+ "body": "none","request": {- "$ref": "#/$defs/NotebookIDRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -30972,7 +33998,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/CheckSnapshotData"},"msg": {"type": "string"@@ -31029,11 +34055,11 @@},{"method": "POST",- "path": "/api/notebook/renameNotebook",- "handler": "renameNotebook",+ "path": "/api/repo/checkoutRepo",+ "handler": "checkoutRepo","body": "json","request": {- "$ref": "#/$defs/RenameNotebookRequestInput"+ "$ref": "#/$defs/CheckoutRepoRequestInput"},"response": {"anyOf": [@@ -31104,11 +34130,11 @@},{"method": "POST",- "path": "/api/notebook/reorder",- "handler": "reorderNotebooks",- "body": "structJSON",+ "path": "/api/repo/createSnapshot",+ "handler": "createSnapshot",+ "body": "json","request": {- "$ref": "#/$defs/ReorderNotebooksRequestInput"+ "$ref": "#/$defs/CreateSnapshotRequestInput"},"response": {"anyOf": [@@ -31122,14 +34148,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/ReorderData"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/CreateSnapshotData"},"msg": {"type": "string"@@ -31167,16 +34186,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/ReorderData"- },- {- "type": "null"- }- ]}]},@@ -31196,11 +34205,11 @@},{"method": "POST",- "path": "/api/notebook/setNotebookConf",- "handler": "setNotebookConf",+ "path": "/api/repo/diffRepoSnapshots",+ "handler": "diffRepoSnapshots","body": "json","request": {- "$ref": "#/$defs/SetNotebookConfRequestInput"+ "$ref": "#/$defs/DiffRepoSnapshotsRequestInput"},"response": {"anyOf": [@@ -31214,14 +34223,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/NotebookConf"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/RepoDiffData"},"msg": {"type": "string"@@ -31278,11 +34280,11 @@},{"method": "POST",- "path": "/api/notebook/setNotebookCryptoAutoLock",- "handler": "setNotebookCryptoAutoLock",+ "path": "/api/repo/downloadCloudSnapshot",+ "handler": "downloadCloudSnapshot","body": "json","request": {- "$ref": "#/$defs/NotebookCryptoAutoLockRequestInput"+ "$ref": "#/$defs/DownloadCloudSnapshotRequestInput"},"response": {"anyOf": [@@ -31353,11 +34355,11 @@},{"method": "POST",- "path": "/api/notebook/setNotebookIcon",- "handler": "setNotebookIcon",+ "path": "/api/repo/exportRepoFile",+ "handler": "exportRepoFile","body": "json","request": {- "$ref": "#/$defs/SetNotebookIconRequestInput"+ "$ref": "#/$defs/ExportRepoFileRequestInput"},"response": {"anyOf": [@@ -31371,7 +34373,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/RepoExportData"},"msg": {"type": "string"@@ -31428,11 +34430,11 @@},{"method": "POST",- "path": "/api/notebook/touchEncryptedNotebooks",- "handler": "touchEncryptedNotebooks",- "body": "none",+ "path": "/api/repo/getCloudRepoSnapshots",+ "handler": "getCloudRepoSnapshots",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/GetCloudRepoSnapshotsRequestInput"},"response": {"anyOf": [@@ -31446,7 +34448,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/RepoCloudSnapshotsData"},"msg": {"type": "string"@@ -31503,11 +34505,11 @@},{"method": "POST",- "path": "/api/notebook/unlockAndOpenNotebook",- "handler": "unlockAndOpenNotebook",- "body": "json",+ "path": "/api/repo/getCloudRepoTagSnapshots",+ "handler": "getCloudRepoTagSnapshots",+ "body": "none","request": {- "$ref": "#/$defs/UnlockNotebookRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -31521,7 +34523,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/RepoCloudTagsData"},"msg": {"type": "string"@@ -31578,11 +34580,11 @@},{"method": "POST",- "path": "/api/notebook/unlockNotebook",- "handler": "unlockNotebook",+ "path": "/api/repo/getRepoDocHistory",+ "handler": "getRepoDocHistory","body": "json","request": {- "$ref": "#/$defs/UnlockNotebookRequestInput"+ "$ref": "#/$defs/GetRepoDocHistoryRequestInput"},"response": {"anyOf": [@@ -31596,7 +34598,7 @@]},"data": {- "type": "null"+ "$ref": "#/$defs/RepoDocHistoryData"},"msg": {"type": "string"@@ -31653,36 +34655,17 @@},{"method": "POST",- "path": "/api/notification/pushErrMsg",- "handler": "pushErrMsg",+ "path": "/api/repo/getRepoFile",+ "handler": "getRepoFile","body": "json","request": {- "$ref": "#/$defs/NotificationRequestInput"+ "$ref": "#/$defs/GetRepoFileRequestInput"},"response": {"anyOf": [{- "type": "object",- "properties": {- "code": {- "type": "integer",- "enum": [- 0- ]- },- "data": {- "$ref": "#/$defs/NotificationData"- },- "msg": {- "type": "string"- }- },- "required": [- "code",- "msg",- "data"- ],- "additionalProperties": false+ "type": "string",+ "format": "binary"},{"type": "object",@@ -31724,15 +34707,17 @@"additionalProperties": true}]- }+ },+ "output": "binary",+ "errorStatus": 200},{"method": "POST",- "path": "/api/notification/pushMsg",- "handler": "pushMsg",+ "path": "/api/repo/getRepoSnapshots",+ "handler": "getRepoSnapshots","body": "json","request": {- "$ref": "#/$defs/NotificationRequestInput"+ "$ref": "#/$defs/GetRepoSnapshotsRequestInput"},"response": {"anyOf": [@@ -31746,7 +34731,7 @@]},"data": {- "$ref": "#/$defs/NotificationData"+ "$ref": "#/$defs/RepoSnapshotsData"},"msg": {"type": "string"@@ -31803,11 +34788,11 @@},{"method": "POST",- "path": "/api/outline/getDocHeadingNumbers",- "handler": "getDocHeadingNumbers",- "body": "json",+ "path": "/api/repo/getRepoTagSnapshots",+ "handler": "getRepoTagSnapshots",+ "body": "none","request": {- "$ref": "#/$defs/HeadingNumbersRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -31821,17 +34806,7 @@]},"data": {- "anyOf": [- {- "type": "object",- "additionalProperties": {- "type": "string"- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/RepoTagsData"},"msg": {"type": "string"@@ -31850,8 +34825,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -31889,11 +34863,11 @@},{"method": "POST",- "path": "/api/outline/getDocOutline",- "handler": "getDocOutline",+ "path": "/api/repo/importRepoKey",+ "handler": "importRepoKey","body": "json","request": {- "$ref": "#/$defs/OutlineRequestInput"+ "$ref": "#/$defs/ImportRepoKeyRequestInput"},"response": {"anyOf": [@@ -31907,24 +34881,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/SearchPath"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/RepoKeyData"},"msg": {"type": "string"@@ -31943,8 +34900,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -31982,11 +34938,11 @@},{"method": "POST",- "path": "/api/petal/loadPetals",- "handler": "loadPetals",- "body": "json",+ "path": "/api/repo/initRepoKey",+ "handler": "initRepoKey",+ "body": "none","request": {- "$ref": "#/$defs/LoadPetalsRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -32000,24 +34956,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/Petal"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/RepoKeyData"},"msg": {"type": "string"@@ -32074,11 +35013,11 @@},{"method": "POST",- "path": "/api/petal/setPetalEnabled",- "handler": "setPetalEnabled",+ "path": "/api/repo/initRepoKeyFromPassphrase",+ "handler": "initRepoKeyFromPassphrase","body": "json","request": {- "$ref": "#/$defs/SetPetalEnabledRequestInput"+ "$ref": "#/$defs/InitRepoKeyFromPassphraseRequestInput"},"response": {"anyOf": [@@ -32092,14 +35031,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/Petal"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/RepoKeyData"},"msg": {"type": "string"@@ -32156,11 +35088,11 @@},{"method": "POST",- "path": "/api/petal/setPetalPublishEnabled",- "handler": "setPetalPublishEnabled",+ "path": "/api/repo/openRepoSnapshotFile",+ "handler": "openRepoSnapshotFile","body": "json","request": {- "$ref": "#/$defs/SetPetalPublishEnabledRequestInput"+ "$ref": "#/$defs/OpenRepoSnapshotFileRequestInput"},"response": {"anyOf": [@@ -32174,14 +35106,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/Petal"- },- {- "type": "null"- }- ]+ "$ref": "#/$defs/RepoOpenFileData"},"msg": {"type": "string"@@ -32238,11 +35163,11 @@},{"method": "POST",- "path": "/api/plugin/getLoadedPlugin",- "handler": "getLoadedPlugin",- "body": "json",+ "path": "/api/repo/purgeCloudRepo",+ "handler": "purgeCloudRepo",+ "body": "none","request": {- "$ref": "#/$defs/LoadedPluginRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -32256,14 +35181,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/LoadedPlugin"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -32280,13 +35198,9 @@"type": "object","properties": {"code": {- "type": "integer",- "enum": [- -1,- 1,- 2,- 3,- 4+ "type": "integer",+ "enum": [+ -1]},"data": {@@ -32324,8 +35238,8 @@},{"method": "POST",- "path": "/api/plugin/listLoadedPlugins",- "handler": "listLoadedPlugins",+ "path": "/api/repo/purgeRepo",+ "handler": "purgeRepo","body": "none","request": {"$ref": "#/$defs/EmptyRequestInput"@@ -32342,24 +35256,7 @@]},"data": {- "anyOf": [- {- "type": "array",- "items": {- "anyOf": [- {- "$ref": "#/$defs/LoadedPlugin"- },- {- "type": "null"- }- ]- }- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -32416,52 +35313,36 @@},{"method": "POST",- "path": "/api/plugin/rpc",- "handler": "pluginJsonRpcHttp",+ "path": "/api/repo/removeCloudRepoTagSnapshot",+ "handler": "removeCloudRepoTagSnapshot","body": "json","request": {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCRequestFieldsInput"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/PluginRPCRequestFieldsInput"- },- "minItems": 1- }- ]+ "$ref": "#/$defs/RemoveCloudRepoTagSnapshotRequestInput"},"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",@@ -32503,58 +35384,40 @@"additionalProperties": true}]- },- "output": "directJSON",- "noContent": true+ }},{"method": "POST",- "path": "/api/plugin/rpc/:name",- "handler": "pluginJsonRpcHttpByName",+ "path": "/api/repo/removeRepoTagSnapshot",+ "handler": "removeRepoTagSnapshot","body": "json","request": {- "anyOf": [- {- "$ref": "#/$defs/PluginRPCRequestFieldsInput"- },- {- "type": "array",- "items": {- "$ref": "#/$defs/PluginRPCRequestFieldsInput"- },- "minItems": 1- }- ]+ "$ref": "#/$defs/RemoveRepoTagSnapshotRequestInput"},"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",@@ -32596,17 +35459,15 @@"additionalProperties": true}]- },- "output": "directJSON",- "noContent": true+ }},{"method": "POST",- "path": "/api/query/sql",- "handler": "SQL",- "body": "json",+ "path": "/api/repo/resetRepo",+ "handler": "resetRepo",+ "body": "none","request": {- "$ref": "#/$defs/SQLQueryRequestInput"+ "$ref": "#/$defs/EmptyRequestInput"},"response": {"anyOf": [@@ -32620,50 +35481,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},@@ -32673,8 +35500,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -32712,11 +35538,11 @@},{"method": "POST",- "path": "/api/ref/getBacklink2",- "handler": "getBacklink2",+ "path": "/api/repo/rollbackRepoSnapshotFile",+ "handler": "rollbackRepoSnapshotFile","body": "json","request": {- "$ref": "#/$defs/BacklinkListRequestInput"+ "$ref": "#/$defs/RollbackRepoSnapshotFileRequestInput"},"response": {"anyOf": [@@ -32730,17 +35556,7 @@]},"data": {- "anyOf": [- {- "$ref": "#/$defs/BacklinkList"- },- {- "$ref": "#/$defs/BacklinkRefDefs"- },- {- "type": "null"- }- ]+ "type": "null"},"msg": {"type": "string"@@ -32759,8 +35575,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -32779,19 +35594,6 @@},{"type": "null"- },- {- "anyOf": [- {- "$ref": "#/$defs/BacklinkList"- },- {- "$ref": "#/$defs/BacklinkRefDefs"- },- {- "type": "null"- }- ]}]},@@ -32811,11 +35613,11 @@},{"method": "POST",- "path": "/api/ref/getBacklinkDoc",- "handler": "getBacklinkDoc",+ "path": "/api/repo/searchRepoFile",+ "handler": "searchRepoFile","body": "json","request": {- "$ref": "#/$defs/BacklinkDocumentRequestInput"+ "$ref": "#/$defs/SearchRepoFileRequestInput"},"response": {"anyOf": [@@ -32829,7 +35631,7 @@]},"data": {- "$ref": "#/$defs/BacklinkContextData"+ "$ref": "#/$defs/RepoSearchData"},"msg": {"type": "string"@@ -32848,8 +35650,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -32887,11 +35688,11 @@},{"method": "POST",- "path": "/api/ref/getBackmentionDoc",- "handler": "getBackmentionDoc",+ "path": "/api/repo/setRepoIndexRetentionDays",+ "handler": "setRepoIndexRetentionDays","body": "json","request": {- "$ref": "#/$defs/BackmentionDocumentRequestInput"+ "$ref": "#/$defs/SetRepoIndexRetentionDaysRequestInput"},"response": {"anyOf": [@@ -32905,7 +35706,7 @@]},"data": {- "$ref": "#/$defs/BacklinkContextData"+ "type": "null"},"msg": {"type": "string"@@ -32924,8 +35725,7 @@"code": {"type": "integer","enum": [- -1,- 1+ -1]},"data": {@@ -32963,11 +35763,11 @@},{"method": "POST",- "path": "/api/ref/refreshBacklink",- "handler": "refreshBacklink",+ "path": "/api/repo/setRetentionIndexesDaily",+ "handler": "setRetentionIndexesDaily","body": "json","request": {- "$ref": "#/$defs/RefreshBacklinkRequestInput"+ "$ref": "#/$defs/SetRetentionIndexesDailyRequestInput"},"response": {"anyOf": [@@ -33038,11 +35838,11 @@},{"method": "POST",- "path": "/api/repo/checkSnapshot",- "handler": "checkSnapshot",- "body": "none",+ "path": "/api/repo/setSnapshotMemo",+ "handler": "setSnapshotMemo",+ "body": "json","request": {- "$ref": "#/$defs/EmptyRequestInput"+ "$ref": "#/$defs/SetSnapshotMemoRequestInput"},"response": {"anyOf": [@@ -33056,7 +35856,7 @@]},"data": {- "$ref": "#/$defs/CheckSnapshotData"+ "type": "null"},"msg": {"type": "string"@@ -33113,11 +35913,11 @@},{"method": "POST",- "path": "/api/repo/createSnapshot",- "handler": "createSnapshot",+ "path": "/api/repo/tagSnapshot",+ "handler": "tagSnapshot","body": "json","request": {- "$ref": "#/$defs/CreateSnapshotRequestInput"+ "$ref": "#/$defs/TagSnapshotRequestInput"},"response": {"anyOf": [@@ -33131,7 +35931,7 @@]},"data": {- "$ref": "#/$defs/CreateSnapshotData"+ "type": "null"},"msg": {"type": "string"@@ -33188,11 +35988,11 @@},{"method": "POST",- "path": "/api/repo/setSnapshotMemo",- "handler": "setSnapshotMemo",+ "path": "/api/repo/uploadCloudSnapshot",+ "handler": "uploadCloudSnapshot","body": "json","request": {- "$ref": "#/$defs/SetSnapshotMemoRequestInput"+ "$ref": "#/$defs/UploadCloudSnapshotRequestInput"},"response": {"anyOf": [