Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:recycle: Migrate backlink API contracts https://github.com/siyuan-note/siyuan/issues/19378

Daniel5df06e256989
diff --git a/app/src/layout/dock/BacklinkContent.ts b/app/src/layout/dock/BacklinkContent.ts
index 58ecc55bea..82e98a9f89 100644
--- a/app/src/layout/dock/BacklinkContent.ts
+++ b/app/src/layout/dock/BacklinkContent.ts
@@ -1111,7 +1111,7 @@ export class BacklinkContent extends Model {
const viewStateGeneration = this.viewStateGeneration;
const contextRequestVersion = this.contextRequestVersions[index];
const requestGeneration = ++record.requestGeneration;
- const param: {[key: string]: string | number | boolean | IBacklinkSourceFilter} = {
+ const param: import("../../types/api").BacklinkDocumentRequestInput = {
defID: blockId,
refTreeID: docId,
highlight: !isSupportCSSHL(),
@@ -1137,7 +1137,7 @@ export class BacklinkContent extends Model {
requestGeneration !== record.requestGeneration) {
return;
}
- if (!response.data) {
+ if (response.code !== 0 || !response.data) {
return;
}
svgElement.removeAttribute("disabled");
@@ -1949,7 +1949,7 @@ export class BacklinkContent extends Model {
this.markDirty();
return;
}
- if (!response.data) {
+ if (response.code !== 0 || !response.data || !("revision" in response.data)) {
if (this.showingLoading || init) {
this.render(undefined, init);
}
diff --git a/app/src/layout/dock/backlinkRefFilterMenu.ts b/app/src/layout/dock/backlinkRefFilterMenu.ts
index 7c78580d43..23ac6d2de5 100644
--- a/app/src/layout/dock/backlinkRefFilterMenu.ts
+++ b/app/src/layout/dock/backlinkRefFilterMenu.ts
@@ -23,7 +23,7 @@ export const loadBacklinkRefFilterMenu = async (options: {
id: options.id, k: options.keyword, mk: "", notebook: options.notebook,
sourceFilter: options.filter, refDefCandidates: true,
});
- if (!options.isCurrent() || response.code !== 0) {
+ if (!options.isCurrent() || response.code !== 0 || !response.data || !("refDefs" in response.data)) {
return [];
}
const candidates: IRefDef[] = response.data.refDefs || [];
diff --git a/app/src/protyle/util/reload.ts b/app/src/protyle/util/reload.ts
index 09c5c86b4e..d5e1014e01 100644
--- a/app/src/protyle/util/reload.ts
+++ b/app/src/protyle/util/reload.ts
@@ -58,7 +58,7 @@ export const reloadProtyle = (protyle: IProtyle, focus: boolean, updateReadonly?
if (tabElement) {
const inputsElement = tabElement.querySelectorAll(".b3-text-field") as NodeListOf<HTMLInputElement>;
const keyword = isMention ? inputsElement[1].value : inputsElement[0].value;
- const param: IObject = {
+ const param: import("../../types/api").BacklinkDocumentRequestInput = {
defID: protyle.element.getAttribute("data-defid"),
refTreeID: protyle.block.rootID,
highlight: !isSupportCSSHL(),
@@ -72,7 +72,7 @@ export const reloadProtyle = (protyle: IProtyle, focus: boolean, updateReadonly?
param.knownRevision = revision;
}
fetchPost(isMention ? "/api/ref/getBackmentionDoc" : "/api/ref/getBacklinkDoc", param, response => {
- if (!response.data) {
+ if (response.code !== 0 || !response.data) {
removeLoading(protyle);
return;
}
diff --git a/app/src/types/api/index.d.ts b/app/src/types/api/index.d.ts
index 0d3e0845ae..a012380167 100644
--- a/app/src/types/api/index.d.ts
+++ b/app/src/types/api/index.d.ts
@@ -20,6 +20,30 @@ export type AttributeViewCustomColorInput = { "dark"?: AttributeViewColorThemeIn
export type AutoLaunchRequestInput = { "autoLaunch": number; };
+export type BacklinkAttributeViewMatch = { "defIDs": Array<string> | null; "itemID": string; "keyID": string; "keyName": string; "title": string; "valueID": string; };
+
+export type BacklinkAttributeViewTarget = { "blockID": string; "matches": Array<BacklinkAttributeViewMatch | null> | null; };
+
+export type BacklinkContext = { "attributeViewTargets"?: Array<BacklinkAttributeViewTarget | null>; "blockPaths": Array<BlockPath | null> | null; "dom": string; "expand": boolean; "id": string; "referenceBlockID"?: string; "revision": string; "type"?: string; };
+
+export type BacklinkContextData = { "backlinks": Array<BacklinkContext | null> | null; "backmentions": Array<BacklinkContext | null> | null; "keywords": Array<string> | null; "revision": string; "unchanged": boolean; };
+
+export type BacklinkDocumentRequestInput = { "containChildren"?: boolean | null; "defID": string; "highlight"?: boolean | null; "keyword": string; "knownRevision"?: string | null; "notebook"?: string; "refTreeID": string; "sourceFilter"?: BacklinkSourceFilterInput | null; };
+
+export type BacklinkList = { "backlinks": Array<BacklinkPath | null> | null; "backmentions": Array<BacklinkPath | null> | null; "box": string; "k": string; "linkRefsCount": number; "mentionsCount": number; "mk": string; "revision": string; "unchanged": boolean; };
+
+export type BacklinkListRequestInput = { "containChildren"?: boolean | null; "id"?: string | null; "includeMentions"?: boolean | null; "k"?: string; "knownRevision"?: string | null; "mSort"?: string | null; "mk"?: string; "notebook"?: string | null; "refDefCandidates"?: boolean | null; "sort"?: string | null; "sourceFilter"?: BacklinkSourceFilterInput | null; };
+
+export type BacklinkPath = { "blocks"?: Array<SearchBlock | null>; "box": string; "children"?: Array<SearchPath | null>; "count": number; "created": string; "depth": number; "folded": boolean; "hPath": string; "id": string; "name": string; "nodeType": string; "number"?: string; "revision": string; "subType": string; "type": string; "updated": string; };
+
+export type BacklinkRefDef = { "id": string; "path": string; "text": string; };
+
+export type BacklinkRefDefs = { "refDefs": Array<BacklinkRefDef | null> | null; };
+
+export type BacklinkSourceFilterInput = { "dailyNote"?: string | null; "excludeSelf"?: boolean | null; "excludedNotebookIDs"?: Array<string> | null; "excludedRefDefIDs"?: Array<string> | null; };
+
+export type BackmentionDocumentRequestInput = { "containChildren"?: boolean | null; "defID": string; "highlight"?: boolean | null; "keyword": string; "knownRevision"?: string | null; "notebook"?: string; "refTreeID": string; };
+
export type BatchInsertBlockRequestInput = { "blocks": Array<BlockInsertInputInput>; };
export type BatchParentBlockRequestInput = { "blocks": Array<PrependBlockRequestInput>; };
@@ -392,6 +416,8 @@ export type RefIDsRequestInput = { "id"?: string | null; "ids"?: Array<string> |
export type RefTextQueryRequestInput = { "anchor": string; "notebook"?: string | null; };
+export type RefreshBacklinkRequestInput = { "id": string; };
+
export type RemoveBookmarkRequestInput = { "bookmark": string; };
export type RemoveCriterionRequestInput = { "name": string; };
@@ -831,10 +857,6 @@ export type APILegacyPOSTPath =
"/api/plugin/listLoadedPlugins" |
"/api/plugin/rpc" |
"/api/plugin/rpc/:name" |
- "/api/ref/getBacklink2" |
- "/api/ref/getBacklinkDoc" |
- "/api/ref/getBackmentionDoc" |
- "/api/ref/refreshBacklink" |
"/api/repo/checkoutRepo" |
"/api/repo/diffRepoSnapshots" |
"/api/repo/downloadCloudSnapshot" |
@@ -1749,6 +1771,26 @@ export interface APIPOSTRoutes {
response: { "code": 0; "data": Array<Record<string, null | string | number | boolean> | null>; "limit": number; "msg": string; "truncated": boolean; } | ({ "code": -1 | 1; "data": { "closeTimeout": number; } | null; "msg": string; } & { "limit"?: never; "truncated"?: never; });
body: "json";
};
+ "/api/ref/getBacklink2": {
+ request: BacklinkListRequestInput;
+ response: { "code": 0; "data": BacklinkList | BacklinkRefDefs | null; "msg": string; } | { "code": -1 | 1; "data": { "closeTimeout": number; } | null | BacklinkList | BacklinkRefDefs | null; "msg": string; };
+ body: "json";
+ };
+ "/api/ref/getBacklinkDoc": {
+ request: BacklinkDocumentRequestInput;
+ response: { "code": 0; "data": BacklinkContextData; "msg": string; } | { "code": -1 | 1; "data": { "closeTimeout": number; } | null; "msg": string; };
+ body: "json";
+ };
+ "/api/ref/getBackmentionDoc": {
+ request: BackmentionDocumentRequestInput;
+ response: { "code": 0; "data": BacklinkContextData; "msg": string; } | { "code": -1 | 1; "data": { "closeTimeout": number; } | null; "msg": string; };
+ body: "json";
+ };
+ "/api/ref/refreshBacklink": {
+ request: RefreshBacklinkRequestInput;
+ response: { "code": 0; "data": null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };
+ body: "json";
+ };
"/api/repo/checkSnapshot": {
request: EmptyRequestInput;
response: { "code": 0; "data": CheckSnapshotData; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };
diff --git a/docs/API-CONTRACTS.md b/docs/API-CONTRACTS.md
index 07df343db1..e5d323ce69 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
+Backlink contracts preserve untrimmed query fields, optional flag defaults, source-filter normalization, and revision hashes. Missing list IDs still return null; unchanged revisions retain the existing fields with null arrays. Candidate-definition failures retain their empty `refDefs` payload. Publish filtering, encrypted-notebook admission, and request-held leases remain in the handlers, and context payloads retain recursive block paths and attribute-view reference targets.
+
Graph contracts preserve partial configuration defaults, case-insensitive configuration fields, and numeric normalization. Query responses distinguish full graph data from correlation-only payloads, including errors and local queries without an ID; node and link arrays retain their original nullability. Configuration persistence still requires administrator access outside read-only mode. Publish filtering and encrypted-notebook rejection retain their existing order relative to configuration decoding.
Template contracts retain path checks before mode and source validation, explicit-mode precedence over the legacy preview flag, database-mode defaults, and the code `1` overwrite prompt. File management keeps Go struct JSON binding and its fixed parse-error message, with separate list, source, revision, and null payloads. Revision checks, symlink restrictions, and sync invalidation remain in the existing model operations.
diff --git a/docs/API-CONTRACTS.zh-CN.md b/docs/API-CONTRACTS.zh-CN.md
index 846b24ca04..212e520bef 100644
--- a/docs/API-CONTRACTS.zh-CN.md
+++ b/docs/API-CONTRACTS.zh-CN.md
@@ -24,6 +24,8 @@
## 兼容要求
+反链契约保留查询字段的空白、可选开关默认值、来源过滤归一化和版本哈希。列表查询缺少 ID 时仍返回空值;版本未变化时保留既有字段和空值数组。候选定义查询失败时保留空的 `refDefs` 数组。发布过滤、加密笔记本准入和请求期间的租约仍由处理器维护,上下文载荷保留递归块路径和数据库引用位置。
+
图谱契约保留局部配置的默认值、配置字段不区分大小写和数值归一化行为。查询响应区分完整图数据和仅含请求标识的结果,后者包括错误及未提供 ID 的局部查询;节点和连线数组保留原有的空值语义。配置持久化仍要求管理员权限且不处于只读模式。发布过滤、加密笔记本拒绝访问与配置解码之间的执行顺序保持不变。
模板契约保留路径先于模式和源内容校验、显式模式优先于旧预览开关、数据库模式默认值,以及代码 `1` 的覆盖提示。文件管理保留 Go 结构体 JSON 绑定及其固定解析错误消息,分别声明列表、源内容、版本号和空载荷。版本校验、符号链接限制和同步失效处理仍由现有模型操作执行。
diff --git a/kernel/api/backlink_ref_filter_test.go b/kernel/api/backlink_ref_filter_test.go
index b1ec039629..bee3fefa37 100644
--- a/kernel/api/backlink_ref_filter_test.go
+++ b/kernel/api/backlink_ref_filter_test.go
@@ -42,6 +42,7 @@ func TestPublishReaderBacklinkRefCandidates(t *testing.T) {
`{"id":"20260909160000-archive","k":"","mk":"","refDefCandidates":true,"sourceFilter":{"excludedRefDefIDs":["20260909160001-private"]}}`))
request.Header.Set("Content-Type", "application/json")
engine.ServeHTTP(recorder, request)
+ requireAPIContract(t, "POST", "/api/ref/getBacklink2", recorder)
var response struct {
Code int `json:"code"`
Data struct {
diff --git a/kernel/api/contract_ref_test.go b/kernel/api/contract_ref_test.go
new file mode 100644
index 0000000000..a1194bf85f
--- /dev/null
+++ b/kernel/api/contract_ref_test.go
@@ -0,0 +1,94 @@
+package api
+
+import (
+ "encoding/json"
+ "net/http/httptest"
+ "strings"
+ "testing"
+
+ "github.com/gin-gonic/gin"
+ "github.com/siyuan-note/siyuan/kernel/conf"
+ "github.com/siyuan-note/siyuan/kernel/model"
+ "github.com/siyuan-note/siyuan/kernel/util"
+)
+
+func TestAPIContractRefreshBacklinkInvalidID(t *testing.T) {
+ engine := gin.New()
+ engine.POST("/api/ref/refreshBacklink", refreshBacklink)
+ for _, body := range []string{`{`, `{}`, `{"id":null}`, `{"id":true}`, `{"id":" "}`, `{"id":" invalid "}`} {
+ recorder := httptest.NewRecorder()
+ engine.ServeHTTP(recorder, httptest.NewRequest("POST", "/api/ref/refreshBacklink", strings.NewReader(body)))
+ requireAPIContract(t, "POST", "/api/ref/refreshBacklink", recorder)
+ var response struct {
+ Code int `json:"code"`
+ Data json.RawMessage `json:"data"`
+ }
+ if err := json.Unmarshal(recorder.Body.Bytes(), &response); err != nil || response.Code != -1 || string(response.Data) != "null" {
+ t.Fatalf("invalid backlink response changed: %s, %v", recorder.Body.String(), err)
+ }
+ }
+}
+
+func TestAPIContractBackmentionPublishedEncryptedNotebook(t *testing.T) {
+ for _, path := range []string{"/api/ref/getBackmentionDoc", "/api/ref/getBacklinkDoc"} {
+ t.Run(path, func(t *testing.T) { testBacklinkContextPublishedEncryptedNotebook(t, path) })
+ }
+}
+
+func testBacklinkContextPublishedEncryptedNotebook(t *testing.T, path string) {
+ t.Helper()
+ previousConf, previousData := model.Conf, util.DataDir
+ model.Conf, util.DataDir = model.NewAppConf(), t.TempDir()
+ model.Conf.Editor = conf.NewEditor()
+ t.Cleanup(func() { model.Conf, util.DataDir = previousConf, previousData })
+ boxID := "20260726000003-encrypt"
+ boxConf := conf.NewBoxConf()
+ boxConf.Encrypted = true
+ if err := (&model.Box{ID: boxID}).SaveConf(boxConf); err != nil {
+ t.Fatal(err)
+ }
+ engine := gin.New()
+ engine.Use(func(c *gin.Context) { c.Set(model.RoleContextKey, model.RoleReader) })
+ engine.POST("/api/ref/getBackmentionDoc", getBackmentionDoc)
+ engine.POST("/api/ref/getBacklinkDoc", getBacklinkDoc)
+ revision := ""
+ for _, unchanged := range []bool{false, true} {
+ body := `{"defID":"def","refTreeID":"ref","keyword":"","notebook":"` + boxID + `","knownRevision":"` + revision + `"}`
+ recorder := httptest.NewRecorder()
+ engine.ServeHTTP(recorder, httptest.NewRequest("POST", path, strings.NewReader(body)))
+ requireAPIContract(t, "POST", path, recorder)
+ var response struct {
+ Code int `json:"code"`
+ Data backlinkContextResult `json:"data"`
+ }
+ if err := json.Unmarshal(recorder.Body.Bytes(), &response); err != nil || response.Code != 0 || response.Data.Unchanged != unchanged || response.Data.Revision == "" {
+ t.Fatalf("backmention revision response changed: %s, %v", recorder.Body.String(), err)
+ }
+ items, other := response.Data.Backmentions, response.Data.Backlinks
+ if path == "/api/ref/getBacklinkDoc" {
+ items, other = other, items
+ }
+ if len(items) != 0 || other != nil || (items == nil) != unchanged || (response.Data.Keywords == nil) != unchanged {
+ t.Fatalf("published encrypted backmention payload changed: %s", recorder.Body.String())
+ }
+ revision = response.Data.Revision
+ }
+}
+
+func TestAPIContractBacklinkContextConversion(t *testing.T) {
+ items := []*backlinkContextResponse{nil, {
+ ID: "id", DOM: "dom", Revision: "revision", Type: "NodeAttributeView", ReferenceBlockID: "ref", Expand: true,
+ BlockPaths: []*model.BlockPath{nil, {ID: "parent", Children: []*model.BlockPath{{ID: "child", HasChildren: true}}}},
+ AttributeViewTargets: []*model.BacklinkAttributeViewTarget{nil, {BlockID: "av", Matches: []*model.BacklinkAttributeViewMatch{nil, {ItemID: "item", KeyID: "key", ValueID: "value", Title: "title", KeyName: "name", DefIDs: []string{"def"}}}}},
+ }}
+ for _, input := range [][]*backlinkContextResponse{nil, {}, items} {
+ expected, err := json.Marshal(input)
+ if err != nil {
+ t.Fatal(err)
+ }
+ actual, err := json.Marshal(backlinkContextContracts(input))
+ if err != nil || string(expected) != string(actual) {
+ t.Fatalf("backlink context serialization changed: %s != %s, %v", expected, actual, err)
+ }
+ }
+}
diff --git a/kernel/api/ref.go b/kernel/api/ref.go
index 860deb88aa..e802aa60e6 100644
--- a/kernel/api/ref.go
+++ b/kernel/api/ref.go
@@ -17,31 +17,25 @@
package api
import (
- "net/http"
+ "encoding/json"
"strconv"
"github.com/88250/gulu"
"github.com/gin-gonic/gin"
+ "github.com/siyuan-note/siyuan/kernel/apicontract"
"github.com/siyuan-note/siyuan/kernel/model"
"github.com/siyuan-note/siyuan/kernel/util"
)
-func refreshBacklink(c *gin.Context) {
+var refreshBacklink = contractHandler(apicontract.RefreshBacklink, func(c *gin.Context, request apicontract.RefreshBacklinkRequest) apicontract.Response[apicontract.Null] {
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.Null](ret)
}
-
- var id string
- if !util.ParseJsonArgs(arg, ret, util.BindJsonArg("id", &id, true, true)) || util.InvalidIDPattern(id, ret) {
- return
- }
- model.RefreshBacklink(id)
+ model.RefreshBacklink(request.ID)
model.FlushTxQueue()
-}
+ return apicontract.Success(apicontract.Null{})
+})
func isBacklinkDocAccessible(c *gin.Context, refTreeID string) bool {
if !model.IsReadOnlyRoleContext(c) {
@@ -51,41 +45,25 @@ func isBacklinkDocAccessible(c *gin.Context, refTreeID string) bool {
return model.CheckBlockIdAccessableByPublishAccess(c, model.GetPublishAccess(), refTreeID)
}
-func getBackmentionDoc(c *gin.Context) {
- ret := gulu.Ret.NewResult()
- defer c.JSON(http.StatusOK, ret)
-
- arg, ok := util.JsonArg(c, ret)
- if !ok {
- return
- }
-
- defID := arg["defID"].(string)
- refTreeID := arg["refTreeID"].(string)
- knownRevision, _ := arg["knownRevision"].(string)
- keyword := arg["keyword"].(string)
- var notebook string
- if val, ok := arg["notebook"]; ok {
- notebook = val.(string)
- }
+var getBackmentionDoc = contractHandler(apicontract.GetBackmentionDoc, func(c *gin.Context, request apicontract.BackmentionDocumentRequest) apicontract.Response[apicontract.BacklinkContextData] {
+ defID, refTreeID := request.DefID, request.RefTreeID
+ knownRevision, keyword, notebook := request.KnownRevision, request.Keyword, request.Notebook
encryptedNotebookDenied := isEncryptedNotebookDeniedForPublish(c, notebook)
if notebook != "" && !model.IsEncryptedBox(notebook) {
notebook = ""
}
if !encryptedNotebookDenied {
if err := holdEncryptedBoxRequest(c, notebook); err != nil {
- ret.Code = 1
- ret.Msg = err.Error()
- return
+ return apicontract.Failure[apicontract.BacklinkContextData](1, err.Error())
}
}
containChildren := model.Conf.Editor.BacklinkContainChildren
- if val, ok := arg["containChildren"]; ok {
- containChildren = val.(bool)
+ if request.ContainChildren != nil {
+ containChildren = *request.ContainChildren
}
highlight := true
- if val, ok := arg["highlight"]; ok {
- highlight = val.(bool)
+ if request.Highlight != nil {
+ highlight = *request.Highlight
}
var backlinks []*model.Backlink
@@ -110,47 +88,62 @@ func getBackmentionDoc(c *gin.Context) {
Keywords []string
}{defID, refTreeID, keyword, notebook, containChildren, highlight, items, keywords})
if knownRevision == revision {
- ret.Data = &backlinkContextResult{Unchanged: true, Revision: revision}
- return
+ return apicontract.Success(apicontract.BacklinkContextData{Unchanged: true, Revision: revision})
}
- ret.Data = &backlinkContextResult{Revision: revision, Backmentions: items, Keywords: keywords}
-}
-
-func getBacklinkDoc(c *gin.Context) {
- ret := gulu.Ret.NewResult()
- defer c.JSON(http.StatusOK, ret)
+ return apicontract.Success(apicontract.BacklinkContextData{Revision: revision, Backmentions: backlinkContextContracts(items), Keywords: keywords})
+})
- arg, ok := util.JsonArg(c, ret)
- if !ok {
- return
+func backlinkContextContracts(items []*backlinkContextResponse) []*apicontract.BacklinkContext {
+ if items == nil {
+ return nil
}
-
- defID := arg["defID"].(string)
- refTreeID := arg["refTreeID"].(string)
- knownRevision, _ := arg["knownRevision"].(string)
- keyword := arg["keyword"].(string)
- var notebook string
- if val, ok := arg["notebook"]; ok {
- notebook = val.(string)
+ ret := make([]*apicontract.BacklinkContext, len(items))
+ for i, item := range items {
+ if item == nil {
+ continue
+ }
+ value := &apicontract.BacklinkContext{Type: item.Type, ReferenceBlockID: item.ReferenceBlockID, ID: item.ID,
+ DOM: item.DOM, BlockPaths: blockPathContracts(item.BlockPaths), Expand: item.Expand, Revision: item.Revision}
+ if item.AttributeViewTargets != nil {
+ value.AttributeViewTargets = make([]*apicontract.BacklinkAttributeViewTarget, len(item.AttributeViewTargets))
+ for j, target := range item.AttributeViewTargets {
+ if target == nil {
+ continue
+ }
+ converted := &apicontract.BacklinkAttributeViewTarget{BlockID: target.BlockID}
+ if target.Matches != nil {
+ converted.Matches = make([]*apicontract.BacklinkAttributeViewMatch, len(target.Matches))
+ for k, match := range target.Matches {
+ converted.Matches[k] = (*apicontract.BacklinkAttributeViewMatch)(match)
+ }
+ }
+ value.AttributeViewTargets[j] = converted
+ }
+ }
+ ret[i] = value
}
+ return ret
+}
+
+var getBacklinkDoc = contractHandler(apicontract.GetBacklinkDoc, func(c *gin.Context, request apicontract.BacklinkDocumentRequest) apicontract.Response[apicontract.BacklinkContextData] {
+ defID, refTreeID := request.DefID, request.RefTreeID
+ knownRevision, keyword, notebook := request.KnownRevision, request.Keyword, request.Notebook
encryptedNotebookDenied := isEncryptedNotebookDeniedForPublish(c, notebook)
if notebook != "" && !model.IsEncryptedBox(notebook) {
notebook = ""
}
if !encryptedNotebookDenied {
if err := holdEncryptedBoxRequest(c, notebook); err != nil {
- ret.Code = 1
- ret.Msg = err.Error()
- return
+ return apicontract.Failure[apicontract.BacklinkContextData](1, err.Error())
}
}
containChildren := model.Conf.Editor.BacklinkContainChildren
- if val, ok := arg["containChildren"]; ok {
- containChildren = val.(bool)
+ if request.ContainChildren != nil {
+ containChildren = *request.ContainChildren
}
highlight := true
- if val, ok := arg["highlight"]; ok {
- highlight = val.(bool)
+ if request.Highlight != nil {
+ highlight = *request.Highlight
}
var backlinks []*model.Backlink
@@ -158,9 +151,9 @@ func getBacklinkDoc(c *gin.Context) {
if encryptedNotebookDenied || !isBacklinkDocAccessible(c, refTreeID) {
backlinks, keywords = []*model.Backlink{}, []string{}
} else if notebook != "" && model.IsEncryptedBox(notebook) {
- backlinks, keywords = model.GetBacklinkDocInBox(defID, refTreeID, keyword, containChildren, highlight, notebook, parseBacklinkSourceFilter(arg))
+ backlinks, keywords = model.GetBacklinkDocInBox(defID, refTreeID, keyword, containChildren, highlight, notebook, backlinkSourceFilterModel(request.SourceFilter))
} else {
- backlinks, keywords = model.GetBacklinkDoc(defID, refTreeID, keyword, containChildren, highlight, parseBacklinkSourceFilter(arg))
+ backlinks, keywords = model.GetBacklinkDoc(defID, refTreeID, keyword, containChildren, highlight, backlinkSourceFilterModel(request.SourceFilter))
}
keywords = canonicalBacklinkKeywords(keywords)
items := newBacklinkContextResponses(backlinks)
@@ -175,80 +168,75 @@ func getBacklinkDoc(c *gin.Context) {
Keywords []string
}{defID, refTreeID, keyword, notebook, containChildren, highlight, items, keywords})
if knownRevision == revision {
- ret.Data = &backlinkContextResult{Unchanged: true, Revision: revision}
- return
+ return apicontract.Success(apicontract.BacklinkContextData{Unchanged: true, Revision: revision})
}
- ret.Data = &backlinkContextResult{Revision: revision, Backlinks: items, Keywords: keywords}
-}
+ return apicontract.Success(apicontract.BacklinkContextData{Revision: revision, Backlinks: backlinkContextContracts(items), Keywords: keywords})
+})
-func getBacklink2(c *gin.Context) {
- ret := gulu.Ret.NewResult()
- defer c.JSON(http.StatusOK, ret)
-
- arg, ok := util.JsonArg(c, ret)
- if !ok {
- return
+func backlinkSourceFilterModel(filter *apicontract.BacklinkSourceFilter) *model.BacklinkSourceFilter {
+ if filter == nil {
+ return nil
}
+ return model.NormalizeBacklinkSourceFilter(&model.BacklinkSourceFilter{DailyNote: filter.DailyNote, ExcludeSelf: filter.ExcludeSelf,
+ ExcludedRefDefIDs: filter.ExcludedRefDefIDs, ExcludedNotebookIDs: filter.ExcludedNotebookIDs})
+}
- if nil == arg["id"] {
- return
+var getBacklink2 = contractHandler(apicontract.GetBacklink2, func(c *gin.Context, request apicontract.BacklinkListRequest) apicontract.Response[apicontract.BacklinkListData] {
+ if request.ID == nil {
+ return apicontract.Success(apicontract.BacklinkListData{})
}
-
- id := arg["id"].(string)
- knownRevision, _ := arg["knownRevision"].(string)
- keyword := arg["k"].(string)
- mentionKeyword := arg["mk"].(string)
+ id, knownRevision := *request.ID, request.KnownRevision
+ keyword, mentionKeyword := request.K, request.MK
includeMentions := true
- if val, ok := arg["includeMentions"].(bool); ok {
- includeMentions = val
+ if request.IncludeMentions != nil {
+ includeMentions = *request.IncludeMentions
}
- sortArg := arg["sort"]
sort := util.SortModeUpdatedDESC
- if nil != sortArg {
- sort, _ = strconv.Atoi(sortArg.(string))
+ if request.Sort != nil {
+ sort, _ = strconv.Atoi(*request.Sort)
}
- mentionSortArg := arg["mSort"]
mentionSort := util.SortModeUpdatedDESC
- if nil != mentionSortArg {
- mentionSort, _ = strconv.Atoi(mentionSortArg.(string))
+ if request.MentionSort != nil {
+ mentionSort, _ = strconv.Atoi(*request.MentionSort)
}
containChildren := model.Conf.Editor.BacklinkContainChildren
- if val, ok := arg["containChildren"]; ok {
- containChildren = val.(bool)
- }
- sourceFilter := parseBacklinkSourceFilter(arg)
- if candidates, _ := arg["refDefCandidates"].(bool); candidates {
- defs := []*model.BacklinkRefDef{}
- ret.Data = map[string]any{"refDefs": defs}
- notebook, _ := arg["notebook"].(string)
+ if request.ContainChildren != nil {
+ containChildren = *request.ContainChildren
+ }
+ sourceFilter := backlinkSourceFilterModel(request.SourceFilter)
+ if request.RefDefCandidates {
+ empty := apicontract.BacklinkDefinitionsResult([]*apicontract.BacklinkRefDef{})
+ notebook := request.Notebook
if model.IsReadOnlyRoleContext(c) || isEncryptedNotebookDeniedForPublish(c, notebook) {
- return
+ return apicontract.Success(empty)
}
if err := holdEncryptedBoxRequest(c, notebook); nil != err {
- ret.Code, ret.Msg = 1, err.Error()
- return
+ return apicontract.GetBacklink2.FailureWithData(1, err.Error(), empty)
}
if !model.IsEncryptedBox(notebook) {
notebook = ""
}
defs, err := model.GetBacklinkRefDefs(id, keyword, containChildren, notebook, sourceFilter)
if nil != err {
- ret.Code, ret.Msg = 1, err.Error()
- return
+ return apicontract.GetBacklink2.FailureWithData(1, err.Error(), empty)
+ }
+ var converted []*apicontract.BacklinkRefDef
+ if defs != nil {
+ converted = make([]*apicontract.BacklinkRefDef, len(defs))
+ for i, def := range defs {
+ converted[i] = (*apicontract.BacklinkRefDef)(def)
+ }
}
- ret.Data = map[string]any{"refDefs": defs}
- return
+ return apicontract.Success(apicontract.BacklinkDefinitionsResult(converted))
}
var boxID string
var backlinks, backmentions []*model.Path
var linkRefsCount, mentionsCount int
// 加密笔记本的反链面板走 InBox 版(查加密 content db)
- notebook, _ := arg["notebook"].(string)
+ notebook := request.Notebook
if !isEncryptedNotebookDeniedForPublish(c, notebook) {
if err := holdEncryptedBoxRequest(c, notebook); err != nil {
- ret.Code = 1
- ret.Msg = err.Error()
- return
+ return apicontract.Failure[apicontract.BacklinkListData](1, err.Error())
}
if notebook != "" && model.IsEncryptedBox(notebook) {
boxID, backlinks, backmentions, linkRefsCount, mentionsCount = model.GetBacklink2InBoxWithOptions(id, keyword, mentionKeyword, sort, mentionSort, containChildren, notebook, sourceFilter, includeMentions)
@@ -304,11 +292,18 @@ func getBacklink2(c *gin.Context) {
boxID,
})
if knownRevision == response.Revision {
- ret.Data = &backlinkListResponse{Unchanged: true, Revision: response.Revision}
- return
+ return apicontract.Success(apicontract.BacklinkListResult(apicontract.BacklinkList{Unchanged: true, Revision: response.Revision}))
}
- ret.Data = response
-}
+ encoded, err := json.Marshal(response)
+ if err != nil {
+ return apicontract.Failure[apicontract.BacklinkListData](-1, err.Error())
+ }
+ var result apicontract.BacklinkList
+ if err = json.Unmarshal(encoded, &result); err != nil {
+ return apicontract.Failure[apicontract.BacklinkListData](-1, err.Error())
+ }
+ return apicontract.Success(apicontract.BacklinkListResult(result))
+})
func parseBacklinkSourceFilter(arg map[string]any) *model.BacklinkSourceFilter {
filterArg, ok := arg["sourceFilter"].(map[string]any)
diff --git a/kernel/apicontract/contracts.go b/kernel/apicontract/contracts.go
index ed9a92e5cd..04bd9ccb53 100644
--- a/kernel/apicontract/contracts.go
+++ b/kernel/apicontract/contracts.go
@@ -500,3 +500,8 @@ var ResetLocalGraph = define[EmptyRequest, ResetLocalGraphData]("resetLocalGraph
var SetGraphConf = define[SetGraphConfRequest, GraphConfigurationData]("setGraphConf", "/api/graph/setGraphConf", JSONBody, ResponseOptions{}, "POST")
var GetGraph = define[GlobalGraphRequest, GlobalGraphData]("getGraph", "/api/graph/getGraph", JSONBody, ResponseOptions{DataOnError: true}, "POST")
var GetLocalGraph = define[LocalGraphRequest, LocalGraphData]("getLocalGraph", "/api/graph/getLocalGraph", JSONBody, ResponseOptions{DataOnError: true}, "POST")
+
+var RefreshBacklink = define[RefreshBacklinkRequest, Null]("refreshBacklink", "/api/ref/refreshBacklink", JSONBody, ResponseOptions{}, "POST")
+var GetBackmentionDoc = define[BackmentionDocumentRequest, BacklinkContextData]("getBackmentionDoc", "/api/ref/getBackmentionDoc", JSONBody, ResponseOptions{AdditionalCodes: []int{1}}, "POST")
+var GetBacklinkDoc = define[BacklinkDocumentRequest, BacklinkContextData]("getBacklinkDoc", "/api/ref/getBacklinkDoc", JSONBody, ResponseOptions{AdditionalCodes: []int{1}}, "POST")
+var GetBacklink2 = define[BacklinkListRequest, BacklinkListData]("getBacklink2", "/api/ref/getBacklink2", JSONBody, ResponseOptions{AdditionalCodes: []int{1}, DataOnError: true}, "POST")
diff --git a/kernel/apicontract/legacy_routes.json b/kernel/apicontract/legacy_routes.json
index 8b0bd0cfd3..db89763f37 100644
--- a/kernel/apicontract/legacy_routes.json
+++ b/kernel/apicontract/legacy_routes.json
@@ -249,10 +249,6 @@
{"method":"POST","path":"/api/plugin/listLoadedPlugins","handler":"listLoadedPlugins"},
{"method":"POST","path":"/api/plugin/rpc","handler":"pluginJsonRpcHttp"},
{"method":"POST","path":"/api/plugin/rpc/:name","handler":"pluginJsonRpcHttp"},
- {"method":"POST","path":"/api/ref/getBacklink2","handler":"getBacklink2"},
- {"method":"POST","path":"/api/ref/getBacklinkDoc","handler":"getBacklinkDoc"},
- {"method":"POST","path":"/api/ref/getBackmentionDoc","handler":"getBackmentionDoc"},
- {"method":"POST","path":"/api/ref/refreshBacklink","handler":"refreshBacklink"},
{"method":"POST","path":"/api/repo/checkoutRepo","handler":"checkoutRepo"},
{"method":"POST","path":"/api/repo/diffRepoSnapshots","handler":"diffRepoSnapshots"},
{"method":"POST","path":"/api/repo/downloadCloudSnapshot","handler":"downloadCloudSnapshot"},
diff --git a/kernel/apicontract/ref.go b/kernel/apicontract/ref.go
new file mode 100644
index 0000000000..e50843ef2a
--- /dev/null
+++ b/kernel/apicontract/ref.go
@@ -0,0 +1,145 @@
+package apicontract
+
+import (
+ "bytes"
+ "encoding/json"
+ "io"
+)
+
+type RefreshBacklinkRequest struct {
+ ID string `json:"id" api:"trim"`
+}
+
+type BackmentionDocumentRequest struct {
+ DefID string `json:"defID"`
+ RefTreeID string `json:"refTreeID"`
+ Keyword string `json:"keyword"`
+ KnownRevision string `json:"knownRevision" api:"optional,nullable,ignoretype"`
+ Notebook string `json:"notebook" api:"optional"`
+ ContainChildren *bool `json:"containChildren" api:"optional"`
+ Highlight *bool `json:"highlight" api:"optional"`
+}
+
+type BacklinkAttributeViewMatch struct {
+ ItemID string `json:"itemID"`
+ KeyID string `json:"keyID"`
+ ValueID string `json:"valueID"`
+ Title string `json:"title"`
+ KeyName string `json:"keyName"`
+ DefIDs []string `json:"defIDs"`
+}
+
+type BacklinkDocumentRequest struct {
+ BackmentionDocumentRequest
+ SourceFilter *BacklinkSourceFilter `json:"sourceFilter" api:"optional"`
+}
+
+type BacklinkSourceFilter struct {
+ DailyNote string `json:"dailyNote" api:"optional,nullable,ignoretype"`
+ ExcludeSelf bool `json:"excludeSelf" api:"optional,nullable"`
+ ExcludedRefDefIDs []string `json:"excludedRefDefIDs" api:"optional,nullable,filterstrings"`
+ ExcludedNotebookIDs []string `json:"excludedNotebookIDs" api:"optional,nullable,filterstrings"`
+}
+
+type BacklinkAttributeViewTarget struct {
+ BlockID string `json:"blockID"`
+ Matches []*BacklinkAttributeViewMatch `json:"matches"`
+}
+
+type BacklinkContext struct {
+ Type string `json:"type,omitempty"`
+ ReferenceBlockID string `json:"referenceBlockID,omitempty"`
+ AttributeViewTargets []*BacklinkAttributeViewTarget `json:"attributeViewTargets,omitempty"`
+ ID string `json:"id"`
+ DOM string `json:"dom"`
+ BlockPaths []*BlockPath `json:"blockPaths"`
+ Expand bool `json:"expand"`
+ Revision string `json:"revision"`
+}
+
+type BacklinkContextData struct {
+ Unchanged bool `json:"unchanged"`
+ Revision string `json:"revision"`
+ Backlinks []*BacklinkContext `json:"backlinks"`
+ Backmentions []*BacklinkContext `json:"backmentions"`
+ Keywords []string `json:"keywords"`
+}
+
+func init() {
+ GetBacklinkDoc.decodeRequest = func(reader io.Reader) (request BacklinkDocumentRequest, err error) {
+ fields, err := blockRequestFields(reader, "/api/ref/getBacklinkDoc")
+ if err != nil {
+ return request, err
+ }
+ data, err := json.Marshal(fields)
+ if err != nil {
+ return request, err
+ }
+ request.BackmentionDocumentRequest, err = GetBackmentionDoc.Decode(bytes.NewReader(data))
+ if err != nil {
+ return request, err
+ }
+ request.SourceFilter = decodeBacklinkSourceFilter(fields["sourceFilter"])
+ return request, nil
+ }
+ GetBackmentionDoc.decodeRequest = func(reader io.Reader) (request BackmentionDocumentRequest, err error) {
+ fields, err := blockRequestFields(reader, "/api/ref/getBackmentionDoc")
+ if err != nil {
+ return request, err
+ }
+ if request.DefID, err = legacyField[string](fields, "defID", "String", true); err != nil {
+ return request, err
+ }
+ if request.RefTreeID, err = legacyField[string](fields, "refTreeID", "String", true); err != nil {
+ return request, err
+ }
+ if request.Keyword, err = legacyField[string](fields, "keyword", "String", true); err != nil {
+ return request, err
+ }
+ _ = json.Unmarshal(fields["knownRevision"], &request.KnownRevision)
+ if _, exists := fields["notebook"]; exists {
+ if request.Notebook, err = legacyField[string](fields, "notebook", "String", true); err != nil {
+ return request, err
+ }
+ }
+ for _, field := range []struct {
+ name string
+ target **bool
+ }{{"containChildren", &request.ContainChildren}, {"highlight", &request.Highlight}} {
+ if _, exists := fields[field.name]; exists {
+ value, decodeErr := legacyField[bool](fields, field.name, "Bool", true)
+ if decodeErr != nil {
+ return request, decodeErr
+ }
+ *field.target = &value
+ }
+ }
+ return request, nil
+ }
+}
+
+func decodeBacklinkSourceFilter(raw json.RawMessage) *BacklinkSourceFilter {
+ var fields map[string]json.RawMessage
+ if json.Unmarshal(raw, &fields) != nil || fields == nil {
+ return nil
+ }
+ filter := &BacklinkSourceFilter{}
+ _ = json.Unmarshal(fields["dailyNote"], &filter.DailyNote)
+ _ = json.Unmarshal(fields["excludeSelf"], &filter.ExcludeSelf)
+ for _, field := range []struct {
+ name string
+ target *[]string
+ }{{"excludedRefDefIDs", &filter.ExcludedRefDefIDs}, {"excludedNotebookIDs", &filter.ExcludedNotebookIDs}} {
+ var values []json.RawMessage
+ if json.Unmarshal(fields[field.name], &values) != nil {
+ continue
+ }
+ for _, value := range values {
+ var id string
+ if len(value) > 0 && value[0] == '"' && json.Unmarshal(value, &id) == nil {
+ *field.target = append(*field.target, id)
+ }
+ }
+ }
+ return filter
+}
diff --git a/kernel/apicontract/ref_list.go b/kernel/apicontract/ref_list.go
new file mode 100644
index 0000000000..9a4dbb8483
--- /dev/null
+++ b/kernel/apicontract/ref_list.go
@@ -0,0 +1,118 @@
+package apicontract
+
+import (
+ "bytes"
+ "encoding/json"
+ "io"
+)
+
+type BacklinkListRequest struct {
+ ID *string `json:"id" api:"optional"`
+ K string `json:"k" api:"optional"`
+ MK string `json:"mk" api:"optional"`
+ KnownRevision string `json:"knownRevision" api:"optional,nullable,ignoretype"`
+ Notebook string `json:"notebook" api:"optional,nullable,ignoretype"`
+ IncludeMentions *bool `json:"includeMentions" api:"optional"`
+ Sort *string `json:"sort" api:"optional"`
+ MentionSort *string `json:"mSort" api:"optional"`
+ ContainChildren *bool `json:"containChildren" api:"optional"`
+ RefDefCandidates bool `json:"refDefCandidates" api:"optional,nullable"`
+ SourceFilter *BacklinkSourceFilter `json:"sourceFilter" api:"optional"`
+}
+
+func init() { GetBacklink2.decodeRequest = decodeBacklinkListRequest }
+
+// decodeBacklinkListRequest 保留缺少 ID 时提前返回及可选开关忽略错误类型的规则。
+func decodeBacklinkListRequest(reader io.Reader) (request BacklinkListRequest, err error) {
+ fields, err := blockRequestFields(reader, "/api/ref/getBacklink2")
+ if err != nil {
+ return request, err
+ }
+ if raw := fields["id"]; len(raw) == 0 || bytes.Equal(raw, []byte("null")) {
+ return request, nil
+ }
+ id, err := legacyField[string](fields, "id", "String", true)
+ if err != nil {
+ return request, err
+ }
+ request.ID = &id
+ if request.K, err = legacyField[string](fields, "k", "String", true); err != nil {
+ return request, err
+ }
+ if request.MK, err = legacyField[string](fields, "mk", "String", true); err != nil {
+ return request, err
+ }
+ _ = json.Unmarshal(fields["knownRevision"], &request.KnownRevision)
+ _ = json.Unmarshal(fields["notebook"], &request.Notebook)
+ _ = json.Unmarshal(fields["refDefCandidates"], &request.RefDefCandidates)
+ var includeMentions bool
+ if raw := fields["includeMentions"]; !bytes.Equal(raw, []byte("null")) && json.Unmarshal(raw, &includeMentions) == nil {
+ request.IncludeMentions = &includeMentions
+ }
+ for _, field := range []struct {
+ name string
+ target **string
+ }{{"sort", &request.Sort}, {"mSort", &request.MentionSort}} {
+ if raw := fields[field.name]; len(raw) > 0 && !bytes.Equal(raw, []byte("null")) {
+ value, decodeErr := legacyField[string](fields, field.name, "String", true)
+ if decodeErr != nil {
+ return request, decodeErr
+ }
+ *field.target = &value
+ }
+ }
+ if _, exists := fields["containChildren"]; exists {
+ value, decodeErr := legacyField[bool](fields, "containChildren", "Bool", true)
+ if decodeErr != nil {
+ return request, decodeErr
+ }
+ request.ContainChildren = &value
+ }
+ request.SourceFilter = decodeBacklinkSourceFilter(fields["sourceFilter"])
+ return request, nil
+}
+
+type BacklinkPath struct {
+ SearchPath
+ Revision string `json:"revision"`
+}
+
+type BacklinkList struct {
+ Unchanged bool `json:"unchanged"`
+ Revision string `json:"revision"`
+ Backlinks []*BacklinkPath `json:"backlinks"`
+ LinkRefsCount int `json:"linkRefsCount"`
+ Backmentions []*BacklinkPath `json:"backmentions"`
+ MentionsCount int `json:"mentionsCount"`
+ K string `json:"k"`
+ MK string `json:"mk"`
+ Box string `json:"box"`
+}
+
+type BacklinkRefDef struct {
+ ID string `json:"id"`
+ Text string `json:"text"`
+ Path string `json:"path"`
+}
+
+type BacklinkRefDefs struct {
+ RefDefs []*BacklinkRefDef `json:"refDefs"`
+}
+
+type BacklinkListData struct {
+ list *BacklinkList
+ definitions *BacklinkRefDefs
+}
+
+func BacklinkListResult(list BacklinkList) BacklinkListData { return BacklinkListData{list: &list} }
+
+func BacklinkDefinitionsResult(definitions []*BacklinkRefDef) BacklinkListData {
+ return BacklinkListData{definitions: &BacklinkRefDefs{RefDefs: definitions}}
+}
+
+func (value BacklinkListData) MarshalJSON() ([]byte, error) {
+ if value.list != nil {
+ return json.Marshal(value.list)
+ }
+ return json.Marshal(value.definitions)
+}
diff --git a/kernel/apicontract/ref_list_test.go b/kernel/apicontract/ref_list_test.go
new file mode 100644
index 0000000000..0652f09c89
--- /dev/null
+++ b/kernel/apicontract/ref_list_test.go
@@ -0,0 +1,33 @@
+package apicontract
+
+import (
+ "strings"
+ "testing"
+)
+
+func TestBacklinkListRequestCompatibility(t *testing.T) {
+ for _, body := range []string{`{}`, `{"id":null,"k":false,"sort":false,"containChildren":null}`} {
+ request, err := decodeBacklinkListRequest(strings.NewReader(body))
+ if err != nil || request.ID != nil {
+ t.Fatalf("missing ID no-op changed: %+v, %v", request, err)
+ }
+ }
+ for _, raw := range []string{`null`, `false`, `true`, `"ignored"`, `7`} {
+ request, err := decodeBacklinkListRequest(strings.NewReader(`{"id":" id ","k":" ","mk":"","includeMentions":` + raw + `,"notebook":false,"knownRevision":{},"sort":"","mSort":null}`))
+ if err != nil || request.ID == nil || *request.ID != " id " || request.K != " " || request.Notebook != "" || request.KnownRevision != "" || request.Sort == nil || *request.Sort != "" || request.MentionSort != nil {
+ t.Fatalf("backlink list parameters changed: %+v, %v", request, err)
+ }
+ if raw == "true" || raw == "false" {
+ if request.IncludeMentions == nil || *request.IncludeMentions != (raw == "true") {
+ t.Fatalf("explicit mention flag changed: %+v", request)
+ }
+ } else if request.IncludeMentions != nil {
+ t.Fatalf("ignored mention flag changed: %+v", request)
+ }
+ }
+ for _, body := range []string{`{"id":"id"}`, `{"id":"id","k":"","mk":"","containChildren":null}`, `{"id":"id","k":"","mk":"","sort":7}`} {
+ if _, err := decodeBacklinkListRequest(strings.NewReader(body)); err == nil {
+ t.Fatalf("invalid backlink fields accepted: %s", body)
+ }
+ }
+}
diff --git a/kernel/apicontract/ref_test.go b/kernel/apicontract/ref_test.go
new file mode 100644
index 0000000000..3e3a3bc807
--- /dev/null
+++ b/kernel/apicontract/ref_test.go
@@ -0,0 +1,46 @@
+package apicontract
+
+import (
+ "strings"
+ "testing"
+)
+
+func TestRefreshBacklinkRequestCompatibility(t *testing.T) {
+ request, err := RefreshBacklink.Decode(strings.NewReader(`{"id":" 20240101000000-abcdefg "}`))
+ if err != nil || request.ID != "20240101000000-abcdefg" {
+ t.Fatalf("backlink ID trimming changed: %+v, %v", request, err)
+ }
+ for _, body := range []string{`{`, `{}`, `{"id":null}`, `{"id":false}`, `{"id":" "}`} {
+ if _, err := RefreshBacklink.Decode(strings.NewReader(body)); err == nil {
+ t.Fatalf("invalid backlink ID accepted: %s", body)
+ }
+ }
+}
+
+func TestBackmentionDocumentRequestCompatibility(t *testing.T) {
+ request, err := GetBackmentionDoc.Decode(strings.NewReader(`{"defID":" def ","refTreeID":" ref ","keyword":" ","knownRevision":false,"highlight":false}`))
+ if err != nil || request.DefID != " def " || request.RefTreeID != " ref " || request.Keyword != " " || request.KnownRevision != "" || request.ContainChildren != nil || request.Highlight == nil || *request.Highlight {
+ t.Fatalf("backmention request compatibility changed: %+v, %v", request, err)
+ }
+ request, err = GetBackmentionDoc.Decode(strings.NewReader(`{"defID":"","refTreeID":"","keyword":""}`))
+ if err != nil || request.Highlight != nil {
+ t.Fatalf("empty query or highlight default changed: %+v, %v", request, err)
+ }
+}
+
+func TestBacklinkSourceFilterCompatibility(t *testing.T) {
+ request, err := GetBacklinkDoc.Decode(strings.NewReader(`{"defID":"","refTreeID":"","keyword":"","sourceFilter":{"dailyNote":false,"excludeSelf":"ignored","excludedRefDefIDs":[null,7,"",false,"id"],"excludedNotebookIDs":false}}`))
+ if err != nil || request.SourceFilter == nil {
+ t.Fatalf("filter decode failed: %+v, %v", request, err)
+ }
+ filter := request.SourceFilter
+ if filter.DailyNote != "" || filter.ExcludeSelf || len(filter.ExcludedRefDefIDs) != 2 || filter.ExcludedRefDefIDs[0] != "" || filter.ExcludedRefDefIDs[1] != "id" || filter.ExcludedNotebookIDs != nil {
+ t.Fatalf("source filter compatibility changed: %+v", filter)
+ }
+ for _, raw := range []string{`null`, `false`, `[]`, `"ignored"`} {
+ request, err := GetBacklinkDoc.Decode(strings.NewReader(`{"defID":"","refTreeID":"","keyword":"","sourceFilter":` + raw + `}`))
+ if err != nil || request.SourceFilter != nil {
+ t.Fatalf("ignored source filter changed: %+v, %v", request, err)
+ }
+ }
+}
diff --git a/kernel/apicontract/schema.go b/kernel/apicontract/schema.go
index 032547ecfe..1e391ad27b 100644
--- a/kernel/apicontract/schema.go
+++ b/kernel/apicontract/schema.go
@@ -75,6 +75,17 @@ func nonnullable(schema *Schema) *Schema {
}
func (b *schemaBuilder) schema(t reflect.Type, input bool) (*Schema, error) {
+ if t == reflect.TypeFor[BacklinkListData]() {
+ list, err := b.schema(reflect.TypeFor[BacklinkList](), false)
+ if err != nil {
+ return nil, err
+ }
+ definitions, err := b.schema(reflect.TypeFor[BacklinkRefDefs](), false)
+ if err != nil {
+ return nil, err
+ }
+ return &Schema{AnyOf: []*Schema{list, definitions, {Type: "null"}}}, nil
+ }
if t == reflect.TypeFor[GlobalGraphData]() || t == reflect.TypeFor[LocalGraphData]() {
resultType := reflect.TypeFor[GlobalGraphResult]()
if t == reflect.TypeFor[LocalGraphData]() {
diff --git a/kernel/apicontract/schema.json b/kernel/apicontract/schema.json
index ad279d654a..1c2c173a09 100644
--- a/kernel/apicontract/schema.json
+++ b/kernel/apicontract/schema.json
@@ -237,88 +237,98 @@
],
"additionalProperties": false
},
- "BatchInsertBlockRequestInput": {
- "type": "object",
- "properties": {
- "blocks": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/BlockInsertInputInput"
- }
- }
- },
- "required": [
- "blocks"
- ],
- "additionalProperties": false
- },
- "BatchParentBlockRequestInput": {
+ "BacklinkAttributeViewMatch": {
"type": "object",
"properties": {
- "blocks": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/PrependBlockRequestInput"
- }
- }
- },
- "required": [
- "blocks"
- ],
- "additionalProperties": false
- },
- "BatchSetBlockAttrsRequestInput": {
- "type": "object",
- "properties": {
- "blockAttrs": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/SetBlockAttrsRequestInput"
- }
+ "defIDs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "itemID": {
+ "type": "string"
+ },
+ "keyID": {
+ "type": "string"
+ },
+ "keyName": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "valueID": {
+ "type": "string"
}
},
"required": [
- "blockAttrs"
+ "defIDs",
+ "itemID",
+ "keyID",
+ "keyName",
+ "title",
+ "valueID"
],
"additionalProperties": false
},
- "BatchTaskListMarkerRequestInput": {
+ "BacklinkAttributeViewTarget": {
"type": "object",
"properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/TaskListMarkerRequestInput"
- }
+ "blockID": {
+ "type": "string"
+ },
+ "matches": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BacklinkAttributeViewMatch"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"required": [
- "items"
+ "blockID",
+ "matches"
],
"additionalProperties": false
},
- "BatchUpdateBlockRequestInput": {
+ "BacklinkContext": {
"type": "object",
"properties": {
- "blocks": {
+ "attributeViewTargets": {
"type": "array",
"items": {
- "$ref": "#/$defs/UpdateBlockRequestInput"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BacklinkAttributeViewTarget"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
- }
- },
- "required": [
- "blocks"
- ],
- "additionalProperties": false
- },
- "BlockBreadcrumbChildren": {
- "type": "object",
- "properties": {
- "hasMore": {
- "type": "boolean"
},
- "items": {
+ "blockPaths": {
"anyOf": [
{
"type": "array",
@@ -337,23 +347,51 @@
"type": "null"
}
]
+ },
+ "dom": {
+ "type": "string"
+ },
+ "expand": {
+ "type": "boolean"
+ },
+ "id": {
+ "type": "string"
+ },
+ "referenceBlockID": {
+ "type": "string"
+ },
+ "revision": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
}
},
"required": [
- "hasMore",
- "items"
+ "blockPaths",
+ "dom",
+ "expand",
+ "id",
+ "revision"
],
"additionalProperties": false
},
- "BlockBreadcrumbChildrenRequestInput": {
+ "BacklinkContextData": {
"type": "object",
"properties": {
- "excludeTypes": {
+ "backlinks": {
"anyOf": [
{
"type": "array",
"items": {
- "type": "string"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BacklinkContext"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
{
@@ -361,10 +399,27 @@
}
]
},
- "id": {
- "type": "string"
+ "backmentions": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BacklinkContext"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
- "ids": {
+ "keywords": {
"anyOf": [
{
"type": "array",
@@ -377,17 +432,52 @@
}
]
},
- "limit": {
+ "revision": {
+ "type": "string"
+ },
+ "unchanged": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "backlinks",
+ "backmentions",
+ "keywords",
+ "revision",
+ "unchanged"
+ ],
+ "additionalProperties": false
+ },
+ "BacklinkDocumentRequestInput": {
+ "type": "object",
+ "properties": {
+ "containChildren": {
"anyOf": [
{
- "type": "number"
+ "type": "boolean"
},
{
"type": "null"
}
]
},
- "notebook": {
+ "defID": {
+ "type": "string"
+ },
+ "highlight": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "keyword": {
+ "type": "string"
+ },
+ "knownRevision": {
"anyOf": [
{
"type": "string"
@@ -397,10 +487,16 @@
}
]
},
- "offset": {
+ "notebook": {
+ "type": "string"
+ },
+ "refTreeID": {
+ "type": "string"
+ },
+ "sourceFilter": {
"anyOf": [
{
- "type": "number"
+ "$ref": "#/$defs/BacklinkSourceFilterInput"
},
{
"type": "null"
@@ -409,19 +505,28 @@
}
},
"required": [
- "id"
+ "defID",
+ "keyword",
+ "refTreeID"
],
"additionalProperties": false
},
- "BlockBreadcrumbRequestInput": {
+ "BacklinkList": {
"type": "object",
"properties": {
- "excludeTypes": {
+ "backlinks": {
"anyOf": [
{
"type": "array",
"items": {
- "type": "string"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BacklinkPath"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
{
@@ -429,15 +534,19 @@
}
]
},
- "id": {
- "type": "string"
- },
- "ids": {
+ "backmentions": {
"anyOf": [
{
"type": "array",
"items": {
- "type": "string"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BacklinkPath"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
{
@@ -445,123 +554,88 @@
}
]
},
- "notebook": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": [
- "id"
- ],
- "additionalProperties": false
- },
- "BlockDOMData": {
- "type": "object",
- "properties": {
- "dom": {
+ "box": {
"type": "string"
},
- "id": {
+ "k": {
"type": "string"
- }
- },
- "required": [
- "dom",
- "id"
- ],
- "additionalProperties": false
- },
- "BlockDeleteData": {
- "type": "object",
- "properties": {
- "createEmptyParagraph": {
- "type": "boolean"
- }
- },
- "required": [
- "createEmptyParagraph"
- ],
- "additionalProperties": false
- },
- "BlockFoldData": {
- "type": "object",
- "properties": {
- "isFolded": {
- "type": "boolean"
},
- "isRoot": {
- "type": "boolean"
- }
- },
- "required": [
- "isFolded",
- "isRoot"
- ],
- "additionalProperties": false
- },
- "BlockIDRequestInput": {
- "type": "object",
- "properties": {
- "id": {
+ "linkRefsCount": {
+ "type": "integer"
+ },
+ "mentionsCount": {
+ "type": "integer"
+ },
+ "mk": {
+ "type": "string"
+ },
+ "revision": {
"type": "string"
+ },
+ "unchanged": {
+ "type": "boolean"
}
},
"required": [
- "id"
+ "backlinks",
+ "backmentions",
+ "box",
+ "k",
+ "linkRefsCount",
+ "mentionsCount",
+ "mk",
+ "revision",
+ "unchanged"
],
"additionalProperties": false
},
- "BlockIDsRequestInput": {
+ "BacklinkListRequestInput": {
"type": "object",
"properties": {
- "ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "ids"
- ],
- "additionalProperties": false
- },
- "BlockInfoData": {
- "anyOf": [
- {
- "$ref": "#/$defs/FullBlockInfo"
+ "containChildren": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
- {
- "$ref": "#/$defs/PublishedBlockInfo"
- }
- ]
- },
- "BlockInfoRequestInput": {
- "type": "object",
- "properties": {
"id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "includeMentions": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "k": {
"type": "string"
},
- "ids": {
+ "knownRevision": {
"anyOf": [
{
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "string"
},
{
"type": "null"
}
]
},
- "notebook": {
+ "mSort": {
"anyOf": [
{
"type": "string"
@@ -570,23 +644,11 @@
"type": "null"
}
]
- }
- },
- "required": [
- "id"
- ],
- "additionalProperties": false
- },
- "BlockInsertInputInput": {
- "type": "object",
- "properties": {
- "data": {
- "type": "string"
},
- "dataType": {
+ "mk": {
"type": "string"
},
- "nextID": {
+ "notebook": {
"anyOf": [
{
"type": "string"
@@ -596,17 +658,17 @@
}
]
},
- "parentID": {
+ "refDefCandidates": {
"anyOf": [
{
- "type": "string"
+ "type": "boolean"
},
{
"type": "null"
}
]
},
- "previousID": {
+ "sort": {
"anyOf": [
{
"type": "string"
@@ -615,50 +677,162 @@
"type": "null"
}
]
+ },
+ "sourceFilter": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BacklinkSourceFilterInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
- "required": [
- "data",
- "dataType"
- ],
"additionalProperties": false
},
- "BlockKramdownData": {
+ "BacklinkPath": {
"type": "object",
"properties": {
+ "blocks": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SearchBlock"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "box": {
+ "type": "string"
+ },
+ "children": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SearchPath"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "count": {
+ "type": "integer"
+ },
+ "created": {
+ "type": "string"
+ },
+ "depth": {
+ "type": "integer"
+ },
+ "folded": {
+ "type": "boolean"
+ },
+ "hPath": {
+ "type": "string"
+ },
"id": {
"type": "string"
},
- "kramdown": {
+ "name": {
+ "type": "string"
+ },
+ "nodeType": {
+ "type": "string"
+ },
+ "number": {
+ "type": "string"
+ },
+ "revision": {
+ "type": "string"
+ },
+ "subType": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "updated": {
"type": "string"
}
},
"required": [
+ "box",
+ "count",
+ "created",
+ "depth",
+ "folded",
+ "hPath",
"id",
- "kramdown"
+ "name",
+ "nodeType",
+ "revision",
+ "subType",
+ "type",
+ "updated"
],
"additionalProperties": false
},
- "BlockKramdownRequestInput": {
+ "BacklinkRefDef": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
- "ids": {
+ "path": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "path",
+ "text"
+ ],
+ "additionalProperties": false
+ },
+ "BacklinkRefDefs": {
+ "type": "object",
+ "properties": {
+ "refDefs": {
"anyOf": [
{
"type": "array",
"items": {
- "type": "string"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BacklinkRefDef"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
{
"type": "null"
}
]
- },
- "mode": {
+ }
+ },
+ "required": [
+ "refDefs"
+ ],
+ "additionalProperties": false
+ },
+ "BacklinkSourceFilterInput": {
+ "type": "object",
+ "properties": {
+ "dailyNote": {
"anyOf": [
{
"type": "string"
@@ -668,49 +842,17 @@
}
]
},
- "notebook": {
+ "excludeSelf": {
"anyOf": [
{
- "type": "string"
+ "type": "boolean"
},
{
"type": "null"
}
]
- }
- },
- "required": [
- "id"
- ],
- "additionalProperties": false
- },
- "BlockOperation": {
- "type": "object",
- "properties": {
- "action": {
- "type": "string",
- "enum": [
- "delete",
- "insert",
- "update",
- "foldHeading",
- "unfoldHeading",
- "setAttrs",
- "moveOutlineHeading",
- "appendInsert",
- "prependInsert"
- ]
- },
- "avID": {
- "type": "string"
- },
- "backRelationKeyID": {
- "type": "string"
- },
- "blockID": {
- "type": "string"
},
- "blockIDs": {
+ "excludedNotebookIDs": {
"anyOf": [
{
"type": "array",
@@ -723,11 +865,11 @@
}
]
},
- "context": {
+ "excludedRefDefIDs": {
"anyOf": [
{
- "type": "object",
- "additionalProperties": {
+ "type": "array",
+ "items": {
"type": "string"
}
},
@@ -735,156 +877,145 @@
"type": "null"
}
]
- },
- "data": {
+ }
+ },
+ "additionalProperties": false
+ },
+ "BackmentionDocumentRequestInput": {
+ "type": "object",
+ "properties": {
+ "containChildren": {
"anyOf": [
{
- "type": "null"
- },
- {
- "type": "string"
+ "type": "boolean"
},
{
- "$ref": "#/$defs/BlockDeleteData"
+ "type": "null"
}
]
},
- "deckID": {
- "type": "string"
- },
- "format": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "ignoreDefaultFill": {
- "type": "boolean"
- },
- "isDetached": {
- "type": "boolean"
- },
- "isTwoWay": {
- "type": "boolean"
- },
- "keyID": {
- "type": "string"
- },
- "layout": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "nextID": {
- "type": "string"
- },
- "parentID": {
- "type": "string"
- },
- "previousID": {
+ "defID": {
"type": "string"
},
- "removeDest": {
- "type": "boolean"
- },
- "retData": {
+ "highlight": {
"anyOf": [
{
- "type": "null"
- },
- {
- "type": "string"
+ "type": "boolean"
},
{
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "null"
}
]
},
- "rootID": {
- "type": "string"
- },
- "rowID": {
+ "keyword": {
"type": "string"
},
- "srcIDs": {
+ "knownRevision": {
"anyOf": [
{
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "string"
},
{
"type": "null"
}
]
},
- "srcs": {
- "type": "null"
- },
- "targetGroupID": {
+ "notebook": {
"type": "string"
},
- "type": {
- "type": "string",
- "enum": [
- ""
- ]
- },
- "viewID": {
+ "refTreeID": {
"type": "string"
- },
- "viewIDs": {
+ }
+ },
+ "required": [
+ "defID",
+ "keyword",
+ "refTreeID"
+ ],
+ "additionalProperties": false
+ },
+ "BatchInsertBlockRequestInput": {
+ "type": "object",
+ "properties": {
+ "blocks": {
"type": "array",
"items": {
- "type": "string"
+ "$ref": "#/$defs/BlockInsertInputInput"
}
}
},
"required": [
- "action",
- "avID",
- "backRelationKeyID",
- "blockID",
- "blockIDs",
- "context",
- "data",
- "deckID",
- "format",
- "groupID",
- "id",
- "ignoreDefaultFill",
- "isDetached",
- "isTwoWay",
- "keyID",
- "layout",
- "name",
- "nextID",
- "parentID",
- "previousID",
- "removeDest",
- "retData",
- "rootID",
- "rowID",
- "srcIDs",
- "srcs",
- "targetGroupID",
- "type",
- "viewID"
+ "blocks"
],
"additionalProperties": false
},
- "BlockPath": {
+ "BatchParentBlockRequestInput": {
"type": "object",
"properties": {
- "children": {
+ "blocks": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/PrependBlockRequestInput"
+ }
+ }
+ },
+ "required": [
+ "blocks"
+ ],
+ "additionalProperties": false
+ },
+ "BatchSetBlockAttrsRequestInput": {
+ "type": "object",
+ "properties": {
+ "blockAttrs": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SetBlockAttrsRequestInput"
+ }
+ }
+ },
+ "required": [
+ "blockAttrs"
+ ],
+ "additionalProperties": false
+ },
+ "BatchTaskListMarkerRequestInput": {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TaskListMarkerRequestInput"
+ }
+ }
+ },
+ "required": [
+ "items"
+ ],
+ "additionalProperties": false
+ },
+ "BatchUpdateBlockRequestInput": {
+ "type": "object",
+ "properties": {
+ "blocks": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/UpdateBlockRequestInput"
+ }
+ }
+ },
+ "required": [
+ "blocks"
+ ],
+ "additionalProperties": false
+ },
+ "BlockBreadcrumbChildren": {
+ "type": "object",
+ "properties": {
+ "hasMore": {
+ "type": "boolean"
+ },
+ "items": {
"anyOf": [
{
"type": "array",
@@ -903,35 +1034,30 @@
"type": "null"
}
]
- },
- "hasChildren": {
- "type": "boolean"
- },
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "subType": {
- "type": "string"
- },
- "type": {
- "type": "string"
}
},
"required": [
- "children",
- "id",
- "name",
- "subType",
- "type"
+ "hasMore",
+ "items"
],
"additionalProperties": false
},
- "BlockQueryRequestInput": {
+ "BlockBreadcrumbChildrenRequestInput": {
"type": "object",
"properties": {
+ "excludeTypes": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
"id": {
"type": "string"
},
@@ -948,6 +1074,16 @@
}
]
},
+ "limit": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
"notebook": {
"anyOf": [
{
@@ -957,6 +1093,16 @@
"type": "null"
}
]
+ },
+ "offset": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"required": [
@@ -964,110 +1110,147 @@
],
"additionalProperties": false
},
- "BlockRelevantData": {
+ "BlockBreadcrumbRequestInput": {
"type": "object",
"properties": {
- "nextID": {
- "type": "string"
+ "excludeTypes": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
- "parentID": {
+ "id": {
"type": "string"
},
- "previousID": {
- "type": "string"
+ "ids": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "notebook": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"required": [
- "nextID",
- "parentID",
- "previousID"
+ "id"
],
"additionalProperties": false
},
- "BlockReminderRequestInput": {
+ "BlockDOMData": {
"type": "object",
"properties": {
- "id": {
+ "dom": {
"type": "string"
},
- "timed": {
+ "id": {
"type": "string"
}
},
"required": [
- "id",
- "timed"
+ "dom",
+ "id"
],
"additionalProperties": false
},
- "BlockSiblingData": {
+ "BlockDeleteData": {
"type": "object",
"properties": {
- "next": {
- "type": "string"
- },
- "parent": {
- "type": "string"
+ "createEmptyParagraph": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "createEmptyParagraph"
+ ],
+ "additionalProperties": false
+ },
+ "BlockFoldData": {
+ "type": "object",
+ "properties": {
+ "isFolded": {
+ "type": "boolean"
},
- "previous": {
+ "isRoot": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "isFolded",
+ "isRoot"
+ ],
+ "additionalProperties": false
+ },
+ "BlockIDRequestInput": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
}
},
"required": [
- "next",
- "parent",
- "previous"
+ "id"
],
"additionalProperties": false
},
- "BlockStat": {
+ "BlockIDsRequestInput": {
"type": "object",
"properties": {
- "blockCount": {
- "type": "integer"
- },
- "imageCount": {
- "type": "integer"
- },
- "linkCount": {
- "type": "integer"
- },
- "refCount": {
- "type": "integer"
- },
- "runeCount": {
- "type": "integer"
- },
- "wordCount": {
- "type": "integer"
+ "ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
},
"required": [
- "blockCount",
- "imageCount",
- "linkCount",
- "refCount",
- "runeCount",
- "wordCount"
+ "ids"
],
"additionalProperties": false
},
- "BlockTransaction": {
+ "BlockInfoData": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/FullBlockInfo"
+ },
+ {
+ "$ref": "#/$defs/PublishedBlockInfo"
+ }
+ ]
+ },
+ "BlockInfoRequestInput": {
"type": "object",
"properties": {
- "doOperations": {
+ "id": {
+ "type": "string"
+ },
+ "ids": {
"anyOf": [
{
"type": "array",
"items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockOperation"
- },
- {
- "type": "null"
- }
- ]
+ "type": "string"
}
},
{
@@ -1075,26 +1258,10 @@
}
]
},
- "templateDocTreePlanID": {
- "type": "string"
- },
- "timestamp": {
- "type": "integer"
- },
- "undoOperations": {
+ "notebook": {
"anyOf": [
{
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockOperation"
- },
- {
- "type": "null"
- }
- ]
- }
+ "type": "string"
},
{
"type": "null"
@@ -1103,71 +1270,91 @@
}
},
"required": [
- "doOperations",
- "timestamp",
- "undoOperations"
+ "id"
],
"additionalProperties": false
},
- "BlockTreeInfo": {
+ "BlockInsertInputInput": {
"type": "object",
"properties": {
- "id": {
+ "data": {
"type": "string"
},
- "nextID": {
+ "dataType": {
"type": "string"
},
- "nextType": {
- "type": "string"
+ "nextID": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"parentID": {
- "type": "string"
- },
- "parentType": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"previousID": {
- "type": "string"
- },
- "previousType": {
- "type": "string"
- },
- "type": {
- "type": "string"
- }
- },
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "data",
+ "dataType"
+ ],
+ "additionalProperties": false
+ },
+ "BlockKramdownData": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "kramdown": {
+ "type": "string"
+ }
+ },
"required": [
"id",
- "nextID",
- "nextType",
- "parentID",
- "parentType",
- "previousID",
- "previousType",
- "type"
+ "kramdown"
],
"additionalProperties": false
},
- "BlocksKramdownRequestInput": {
+ "BlockKramdownRequestInput": {
"type": "object",
"properties": {
"id": {
+ "type": "string"
+ },
+ "ids": {
"anyOf": [
{
- "type": "string"
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
{
"type": "null"
}
]
},
- "ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
"mode": {
"anyOf": [
{
@@ -1190,101 +1377,218 @@
}
},
"required": [
- "ids"
+ "id"
],
"additionalProperties": false
},
- "BlocksQueryRequestInput": {
+ "BlockOperation": {
"type": "object",
"properties": {
- "id": {
+ "action": {
+ "type": "string",
+ "enum": [
+ "delete",
+ "insert",
+ "update",
+ "foldHeading",
+ "unfoldHeading",
+ "setAttrs",
+ "moveOutlineHeading",
+ "appendInsert",
+ "prependInsert"
+ ]
+ },
+ "avID": {
+ "type": "string"
+ },
+ "backRelationKeyID": {
+ "type": "string"
+ },
+ "blockID": {
+ "type": "string"
+ },
+ "blockIDs": {
"anyOf": [
{
- "type": "string"
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
{
"type": "null"
}
]
},
- "ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "notebook": {
+ "context": {
"anyOf": [
{
- "type": "string"
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
},
{
"type": "null"
}
]
- }
- },
- "required": [
- "ids"
- ],
- "additionalProperties": false
- },
- "BlocksWordCountRequestInput": {
- "type": "object",
- "properties": {
- "id": {
+ },
+ "data": {
"anyOf": [
+ {
+ "type": "null"
+ },
{
"type": "string"
},
{
- "type": "null"
+ "$ref": "#/$defs/BlockDeleteData"
}
]
},
- "ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "deckID": {
+ "type": "string"
},
- "notebook": {
+ "format": {
+ "type": "string"
+ },
+ "groupID": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "ignoreDefaultFill": {
+ "type": "boolean"
+ },
+ "isDetached": {
+ "type": "boolean"
+ },
+ "isTwoWay": {
+ "type": "boolean"
+ },
+ "keyID": {
+ "type": "string"
+ },
+ "layout": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "nextID": {
+ "type": "string"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "previousID": {
+ "type": "string"
+ },
+ "removeDest": {
+ "type": "boolean"
+ },
+ "retData": {
"anyOf": [
+ {
+ "type": "null"
+ },
{
"type": "string"
},
{
- "type": "null"
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
]
},
- "reqId": {
+ "rootID": {
+ "type": "string"
+ },
+ "rowID": {
+ "type": "string"
+ },
+ "srcIDs": {
"anyOf": [
{
- "$ref": "#/$defs/JSONValue"
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
{
"type": "null"
}
]
+ },
+ "srcs": {
+ "type": "null"
+ },
+ "targetGroupID": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ ""
+ ]
+ },
+ "viewID": {
+ "type": "string"
+ },
+ "viewIDs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
},
"required": [
- "ids"
+ "action",
+ "avID",
+ "backRelationKeyID",
+ "blockID",
+ "blockIDs",
+ "context",
+ "data",
+ "deckID",
+ "format",
+ "groupID",
+ "id",
+ "ignoreDefaultFill",
+ "isDetached",
+ "isTwoWay",
+ "keyID",
+ "layout",
+ "name",
+ "nextID",
+ "parentID",
+ "previousID",
+ "removeDest",
+ "retData",
+ "rootID",
+ "rowID",
+ "srcIDs",
+ "srcs",
+ "targetGroupID",
+ "type",
+ "viewID"
],
"additionalProperties": false
},
- "Bookmark": {
+ "BlockPath": {
"type": "object",
"properties": {
- "blocks": {
+ "children": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
- "$ref": "#/$defs/SearchBlock"
+ "$ref": "#/$defs/BlockPath"
},
{
"type": "null"
@@ -1297,67 +1601,54 @@
}
]
},
- "count": {
- "type": "integer"
+ "hasChildren": {
+ "type": "boolean"
},
- "depth": {
- "type": "integer"
+ "id": {
+ "type": "string"
},
"name": {
"type": "string"
},
+ "subType": {
+ "type": "string"
+ },
"type": {
"type": "string"
}
},
"required": [
- "blocks",
- "count",
- "depth",
- "name",
+ "children",
+ "id",
+ "name",
+ "subType",
"type"
],
"additionalProperties": false
},
- "BootProgressData": {
+ "BlockQueryRequestInput": {
"type": "object",
"properties": {
- "details": {
+ "id": {
"type": "string"
},
- "progress": {
- "type": "integer"
- }
- },
- "required": [
- "details",
- "progress"
- ],
- "additionalProperties": false
- },
- "BroadcastChannel": {
- "type": "object",
- "properties": {
- "count": {
- "type": "integer"
+ "ids": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
- "name": {
- "type": "string"
- }
- },
- "required": [
- "count",
- "name"
- ],
- "additionalProperties": false
- },
- "BroadcastChannelData": {
- "type": "object",
- "properties": {
- "channel": {
+ "notebook": {
"anyOf": [
{
- "$ref": "#/$defs/BroadcastChannel"
+ "type": "string"
},
{
"type": "null"
@@ -1366,188 +1657,198 @@
}
},
"required": [
- "channel"
+ "id"
],
"additionalProperties": false
},
- "BroadcastChannelRequestInput": {
+ "BlockRelevantData": {
"type": "object",
"properties": {
- "name": {
+ "nextID": {
+ "type": "string"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "previousID": {
"type": "string"
}
},
"required": [
- "name"
+ "nextID",
+ "parentID",
+ "previousID"
],
"additionalProperties": false
},
- "BroadcastChannelsData": {
+ "BlockReminderRequestInput": {
"type": "object",
"properties": {
- "channels": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BroadcastChannel"
- },
- {
- "type": "null"
- }
- ]
- }
+ "id": {
+ "type": "string"
+ },
+ "timed": {
+ "type": "string"
}
},
"required": [
- "channels"
+ "id",
+ "timed"
],
"additionalProperties": false
},
- "BroadcastMessageRequestInput": {
+ "BlockSiblingData": {
"type": "object",
"properties": {
- "channel": {
+ "next": {
"type": "string"
},
- "message": {
+ "parent": {
+ "type": "string"
+ },
+ "previous": {
"type": "string"
}
},
"required": [
- "channel",
- "message"
+ "next",
+ "parent",
+ "previous"
],
"additionalProperties": false
},
- "BroadcastPublishData": {
+ "BlockStat": {
"type": "object",
"properties": {
- "results": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BroadcastPublishResult"
- },
- {
- "type": "null"
- }
- ]
- }
+ "blockCount": {
+ "type": "integer"
+ },
+ "imageCount": {
+ "type": "integer"
+ },
+ "linkCount": {
+ "type": "integer"
+ },
+ "refCount": {
+ "type": "integer"
+ },
+ "runeCount": {
+ "type": "integer"
+ },
+ "wordCount": {
+ "type": "integer"
}
},
"required": [
- "results"
+ "blockCount",
+ "imageCount",
+ "linkCount",
+ "refCount",
+ "runeCount",
+ "wordCount"
],
"additionalProperties": false
},
- "BroadcastPublishMessage": {
+ "BlockTransaction": {
"type": "object",
"properties": {
- "filename": {
+ "doOperations": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockOperation"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "templateDocTreePlanID": {
"type": "string"
},
- "size": {
+ "timestamp": {
"type": "integer"
},
- "type": {
- "type": "string",
- "enum": [
- "string",
- "binary"
+ "undoOperations": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockOperation"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
]
}
},
"required": [
- "filename",
- "size",
- "type"
+ "doOperations",
+ "timestamp",
+ "undoOperations"
],
"additionalProperties": false
},
- "BroadcastPublishResult": {
+ "BlockTreeInfo": {
"type": "object",
"properties": {
- "channel": {
- "$ref": "#/$defs/BroadcastChannel"
+ "id": {
+ "type": "string"
},
- "code": {
- "type": "integer"
+ "nextID": {
+ "type": "string"
},
- "message": {
- "$ref": "#/$defs/BroadcastPublishMessage"
+ "nextType": {
+ "type": "string"
},
- "msg": {
+ "parentID": {
"type": "string"
- }
- },
- "required": [
- "channel",
- "code",
- "message",
- "msg"
- ],
- "additionalProperties": false
- },
- "ChangeMasterPasswordRequestInput": {
- "type": "object",
- "properties": {
- "newPassword": {
+ },
+ "parentType": {
"type": "string"
},
- "oldPassword": {
+ "previousID": {
+ "type": "string"
+ },
+ "previousType": {
+ "type": "string"
+ },
+ "type": {
"type": "string"
}
},
"required": [
- "newPassword",
- "oldPassword"
+ "id",
+ "nextID",
+ "nextType",
+ "parentID",
+ "parentType",
+ "previousID",
+ "previousType",
+ "type"
],
"additionalProperties": false
},
- "ChangeSortNotebookRequestInput": {
+ "BlocksKramdownRequestInput": {
"type": "object",
"properties": {
- "notebooks": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "notebooks"
- ],
- "additionalProperties": false
- },
- "CheckActivationCodeRequestInput": {
- "type": "object",
- "properties": {
- "data": {
- "type": "string"
- }
- },
- "required": [
- "data"
- ],
- "additionalProperties": false
- },
- "CheckBlockRefRequestInput": {
- "type": "object",
- "properties": {
- "deletedIDs": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "exactIDs": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
"id": {
"anyOf": [
{
@@ -1564,7 +1865,7 @@
"type": "string"
}
},
- "notebook": {
+ "mode": {
"anyOf": [
{
"type": "string"
@@ -1574,19 +1875,23 @@
}
]
},
- "paths": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "scope": {
- "type": "string"
+ "notebook": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
+ "required": [
+ "ids"
+ ],
"additionalProperties": false
},
- "CheckBlocksExistRequestInput": {
+ "BlocksQueryRequestInput": {
"type": "object",
"properties": {
"id": {
@@ -1602,7 +1907,7 @@
"ids": {
"type": "array",
"items": {
- "$ref": "#/$defs/JSONValue"
+ "type": "string"
}
},
"notebook": {
@@ -1621,31 +1926,81 @@
],
"additionalProperties": false
},
- "CheckSnapshotData": {
+ "BlocksWordCountRequestInput": {
"type": "object",
"properties": {
- "changed": {
- "type": "boolean"
+ "id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "notebook": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "reqId": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/JSONValue"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"required": [
- "changed"
+ "ids"
],
"additionalProperties": false
},
- "ChildBlock": {
+ "Bookmark": {
"type": "object",
"properties": {
- "content": {
- "type": "string"
+ "blocks": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SearchBlock"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
- "id": {
- "type": "string"
+ "count": {
+ "type": "integer"
},
- "markdown": {
- "type": "string"
+ "depth": {
+ "type": "integer"
},
- "subType": {
+ "name": {
"type": "string"
},
"type": {
@@ -1653,261 +2008,205 @@
}
},
"required": [
- "id",
+ "blocks",
+ "count",
+ "depth",
+ "name",
"type"
],
"additionalProperties": false
},
- "CleanupRichTextRequestInput": {
+ "BootProgressData": {
"type": "object",
"properties": {
- "batch": {
+ "details": {
"type": "string"
},
- "groups": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "progress": {
+ "type": "integer"
}
},
"required": [
- "batch",
- "groups"
+ "details",
+ "progress"
],
"additionalProperties": false
},
- "ClipboardFile": {
+ "BroadcastChannel": {
"type": "object",
"properties": {
- "isDir": {
- "type": "boolean"
+ "count": {
+ "type": "integer"
},
"name": {
"type": "string"
- },
- "path": {
- "type": "string"
- },
- "size": {
- "type": "integer"
- },
- "updated": {
- "type": "integer"
}
},
"required": [
- "isDir",
- "name",
- "path",
- "size",
- "updated"
+ "count",
+ "name"
],
"additionalProperties": false
},
- "ClipboardPathRequestInput": {
+ "BroadcastChannelData": {
"type": "object",
"properties": {
- "path": {
- "type": "string"
+ "channel": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BroadcastChannel"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"required": [
- "path"
+ "channel"
],
"additionalProperties": false
},
- "CloseNotebookRequestInput": {
+ "BroadcastChannelRequestInput": {
"type": "object",
"properties": {
- "notebook": {
+ "name": {
"type": "string"
}
},
"required": [
- "notebook"
+ "name"
],
"additionalProperties": false
},
- "CloudBackup": {
+ "BroadcastChannelsData": {
"type": "object",
"properties": {
- "hSize": {
- "type": "string"
- },
- "saveDir": {
- "type": "string"
- },
- "size": {
- "type": "integer"
- },
- "updated": {
- "type": "string"
+ "channels": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BroadcastChannel"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
}
},
"required": [
- "hSize",
- "saveDir",
- "size",
- "updated"
+ "channels"
],
"additionalProperties": false
},
- "CloudReminderRequestInput": {
+ "BroadcastMessageRequestInput": {
"type": "object",
"properties": {
- "content": {
- "type": "string"
- },
- "id": {
+ "channel": {
"type": "string"
},
- "timed": {
+ "message": {
"type": "string"
}
},
"required": [
- "content",
- "id",
- "timed"
+ "channel",
+ "message"
],
"additionalProperties": false
},
- "CloudSpaceData": {
+ "BroadcastPublishData": {
"type": "object",
"properties": {
- "backup": {
- "anyOf": [
- {
- "$ref": "#/$defs/CloudBackup"
- },
- {
- "type": "null"
- }
- ]
- },
- "hAssetSize": {
- "type": "string"
- },
- "hExchangeSize": {
- "type": "string"
- },
- "hSize": {
- "type": "string"
- },
- "hTotalSize": {
- "type": "string"
- },
- "hTrafficAPIGet": {
- "type": "string"
- },
- "hTrafficAPIPut": {
- "type": "string"
- },
- "hTrafficDownloadSize": {
- "type": "string"
- },
- "hTrafficUploadSize": {
- "type": "string"
- },
- "sync": {
- "anyOf": [
- {
- "$ref": "#/$defs/CloudSync"
- },
- {
- "type": "null"
- }
- ]
+ "results": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BroadcastPublishResult"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
}
},
"required": [
- "backup",
- "hAssetSize",
- "hExchangeSize",
- "hSize",
- "hTotalSize",
- "hTrafficAPIGet",
- "hTrafficAPIPut",
- "hTrafficDownloadSize",
- "hTrafficUploadSize",
- "sync"
+ "results"
],
"additionalProperties": false
},
- "CloudSync": {
+ "BroadcastPublishMessage": {
"type": "object",
"properties": {
- "cloudName": {
- "type": "string"
- },
- "hSize": {
- "type": "string"
- },
- "saveDir": {
+ "filename": {
"type": "string"
},
"size": {
"type": "integer"
},
- "updated": {
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": [
+ "string",
+ "binary"
+ ]
}
},
"required": [
- "cloudName",
- "hSize",
- "saveDir",
+ "filename",
"size",
- "updated"
+ "type"
],
"additionalProperties": false
},
- "ContentWordCountRequestInput": {
+ "BroadcastPublishResult": {
"type": "object",
"properties": {
- "content": {
- "type": "string"
+ "channel": {
+ "$ref": "#/$defs/BroadcastChannel"
},
- "reqId": {
- "anyOf": [
- {
- "$ref": "#/$defs/JSONValue"
- },
- {
- "type": "null"
- }
- ]
+ "code": {
+ "type": "integer"
+ },
+ "message": {
+ "$ref": "#/$defs/BroadcastPublishMessage"
+ },
+ "msg": {
+ "type": "string"
}
},
"required": [
- "content"
+ "channel",
+ "code",
+ "message",
+ "msg"
],
"additionalProperties": false
},
- "CopyFileRequestInput": {
+ "ChangeMasterPasswordRequestInput": {
"type": "object",
"properties": {
- "dest": {
+ "newPassword": {
"type": "string"
},
- "src": {
+ "oldPassword": {
"type": "string"
}
},
"required": [
- "dest",
- "src"
+ "newPassword",
+ "oldPassword"
],
"additionalProperties": false
},
- "CopyFilesRequestInput": {
+ "ChangeSortNotebookRequestInput": {
"type": "object",
"properties": {
- "destDir": {
- "type": "string"
- },
- "srcs": {
+ "notebooks": {
"type": "array",
"items": {
"type": "string"
@@ -1915,51 +2214,98 @@
}
},
"required": [
- "destDir",
- "srcs"
+ "notebooks"
],
"additionalProperties": false
},
- "CopyStdMarkdownRequestInput": {
+ "CheckActivationCodeRequestInput": {
"type": "object",
"properties": {
- "adjustHeadingLevel": {
+ "data": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "data"
+ ],
+ "additionalProperties": false
+ },
+ "CheckBlockRefRequestInput": {
+ "type": "object",
+ "properties": {
+ "deletedIDs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "exactIDs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "id": {
"anyOf": [
{
- "type": "boolean"
+ "type": "string"
},
{
"type": "null"
}
]
},
- "assetsDestSpace2Underscore": {
+ "ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "notebook": {
"anyOf": [
{
- "type": "boolean"
+ "type": "string"
},
{
"type": "null"
}
]
},
- "fillCSSVar": {
+ "paths": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "scope": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "CheckBlocksExistRequestInput": {
+ "type": "object",
+ "properties": {
+ "id": {
"anyOf": [
{
- "type": "boolean"
+ "type": "string"
},
{
"type": "null"
}
]
},
- "id": {
- "type": "string"
+ "ids": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/JSONValue"
+ }
},
- "imgTag": {
+ "notebook": {
"anyOf": [
{
- "type": "boolean"
+ "type": "string"
},
{
"type": "null"
@@ -1968,139 +2314,262 @@
}
},
"required": [
- "id"
+ "ids"
],
"additionalProperties": false
},
- "CreateEncryptedNotebookRequestInput": {
+ "CheckSnapshotData": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "password": {
- "type": "string"
+ "changed": {
+ "type": "boolean"
}
},
"required": [
- "name",
- "password"
+ "changed"
],
"additionalProperties": false
},
- "CreateNotebookData": {
+ "ChildBlock": {
"type": "object",
"properties": {
- "notebook": {
- "anyOf": [
- {
- "$ref": "#/$defs/Notebook"
- },
- {
- "type": "null"
- }
- ]
+ "content": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "markdown": {
+ "type": "string"
+ },
+ "subType": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
}
},
"required": [
- "notebook"
+ "id",
+ "type"
],
"additionalProperties": false
},
- "CreateNotebookRequestInput": {
+ "CleanupRichTextRequestInput": {
"type": "object",
"properties": {
- "name": {
+ "batch": {
"type": "string"
+ },
+ "groups": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
},
"required": [
- "name"
+ "batch",
+ "groups"
],
"additionalProperties": false
},
- "CreateSnapshotData": {
+ "ClipboardFile": {
"type": "object",
"properties": {
- "created": {
+ "isDir": {
"type": "boolean"
},
- "id": {
+ "name": {
"type": "string"
- }
- },
+ },
+ "path": {
+ "type": "string"
+ },
+ "size": {
+ "type": "integer"
+ },
+ "updated": {
+ "type": "integer"
+ }
+ },
"required": [
- "created",
- "id"
+ "isDir",
+ "name",
+ "path",
+ "size",
+ "updated"
],
"additionalProperties": false
},
- "CreateSnapshotRequestInput": {
+ "ClipboardPathRequestInput": {
"type": "object",
"properties": {
- "memo": {
+ "path": {
"type": "string"
}
},
+ "required": [
+ "path"
+ ],
"additionalProperties": false
},
- "Criterion": {
+ "CloseNotebookRequestInput": {
"type": "object",
"properties": {
- "group": {
+ "notebook": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "notebook"
+ ],
+ "additionalProperties": false
+ },
+ "CloudBackup": {
+ "type": "object",
+ "properties": {
+ "hSize": {
+ "type": "string"
+ },
+ "saveDir": {
+ "type": "string"
+ },
+ "size": {
"type": "integer"
},
- "hPath": {
+ "updated": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "hSize",
+ "saveDir",
+ "size",
+ "updated"
+ ],
+ "additionalProperties": false
+ },
+ "CloudReminderRequestInput": {
+ "type": "object",
+ "properties": {
+ "content": {
"type": "string"
},
- "hasReplace": {
- "type": "boolean"
+ "id": {
+ "type": "string"
},
- "idPath": {
+ "timed": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "content",
+ "id",
+ "timed"
+ ],
+ "additionalProperties": false
+ },
+ "CloudSpaceData": {
+ "type": "object",
+ "properties": {
+ "backup": {
"anyOf": [
{
- "type": "array",
- "items": {
- "type": "string"
- }
+ "$ref": "#/$defs/CloudBackup"
},
{
"type": "null"
}
]
},
- "k": {
+ "hAssetSize": {
"type": "string"
},
- "method": {
- "type": "integer"
+ "hExchangeSize": {
+ "type": "string"
},
- "name": {
+ "hSize": {
"type": "string"
},
- "r": {
+ "hTotalSize": {
"type": "string"
},
- "replaceTypes": {
+ "hTrafficAPIGet": {
+ "type": "string"
+ },
+ "hTrafficAPIPut": {
+ "type": "string"
+ },
+ "hTrafficDownloadSize": {
+ "type": "string"
+ },
+ "hTrafficUploadSize": {
+ "type": "string"
+ },
+ "sync": {
"anyOf": [
{
- "$ref": "#/$defs/CriterionReplaceTypes"
+ "$ref": "#/$defs/CloudSync"
},
{
"type": "null"
}
]
+ }
+ },
+ "required": [
+ "backup",
+ "hAssetSize",
+ "hExchangeSize",
+ "hSize",
+ "hTotalSize",
+ "hTrafficAPIGet",
+ "hTrafficAPIPut",
+ "hTrafficDownloadSize",
+ "hTrafficUploadSize",
+ "sync"
+ ],
+ "additionalProperties": false
+ },
+ "CloudSync": {
+ "type": "object",
+ "properties": {
+ "cloudName": {
+ "type": "string"
},
- "sort": {
+ "hSize": {
+ "type": "string"
+ },
+ "saveDir": {
+ "type": "string"
+ },
+ "size": {
"type": "integer"
},
- "subTypes": {
- "$ref": "#/$defs/SearchSubTypes"
+ "updated": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "cloudName",
+ "hSize",
+ "saveDir",
+ "size",
+ "updated"
+ ],
+ "additionalProperties": false
+ },
+ "ContentWordCountRequestInput": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "string"
},
- "types": {
+ "reqId": {
"anyOf": [
{
- "$ref": "#/$defs/CriterionTypes"
+ "$ref": "#/$defs/JSONValue"
},
{
"type": "null"
@@ -2109,45 +2578,49 @@
}
},
"required": [
- "group",
- "hPath",
- "hasReplace",
- "idPath",
- "k",
- "method",
- "name",
- "r",
- "replaceTypes",
- "sort",
- "subTypes",
- "types"
+ "content"
],
"additionalProperties": false
},
- "CriterionInput": {
+ "CopyFileRequestInput": {
"type": "object",
"properties": {
- "group": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ]
+ "dest": {
+ "type": "string"
},
- "hPath": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "src": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "dest",
+ "src"
+ ],
+ "additionalProperties": false
+ },
+ "CopyFilesRequestInput": {
+ "type": "object",
+ "properties": {
+ "destDir": {
+ "type": "string"
},
- "hasReplace": {
+ "srcs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "destDir",
+ "srcs"
+ ],
+ "additionalProperties": false
+ },
+ "CopyStdMarkdownRequestInput": {
+ "type": "object",
+ "properties": {
+ "adjustHeadingLevel": {
"anyOf": [
{
"type": "boolean"
@@ -2157,40 +2630,264 @@
}
]
},
- "idPath": {
+ "assetsDestSpace2Underscore": {
"anyOf": [
{
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "boolean"
},
{
"type": "null"
}
]
},
- "k": {
+ "fillCSSVar": {
"anyOf": [
{
- "type": "string"
+ "type": "boolean"
},
{
"type": "null"
}
]
},
- "method": {
+ "id": {
+ "type": "string"
+ },
+ "imgTag": {
"anyOf": [
{
- "type": "integer"
+ "type": "boolean"
},
{
"type": "null"
}
]
- },
- "name": {
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "additionalProperties": false
+ },
+ "CreateEncryptedNotebookRequestInput": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "password"
+ ],
+ "additionalProperties": false
+ },
+ "CreateNotebookData": {
+ "type": "object",
+ "properties": {
+ "notebook": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Notebook"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "notebook"
+ ],
+ "additionalProperties": false
+ },
+ "CreateNotebookRequestInput": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "CreateSnapshotData": {
+ "type": "object",
+ "properties": {
+ "created": {
+ "type": "boolean"
+ },
+ "id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "created",
+ "id"
+ ],
+ "additionalProperties": false
+ },
+ "CreateSnapshotRequestInput": {
+ "type": "object",
+ "properties": {
+ "memo": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "Criterion": {
+ "type": "object",
+ "properties": {
+ "group": {
+ "type": "integer"
+ },
+ "hPath": {
+ "type": "string"
+ },
+ "hasReplace": {
+ "type": "boolean"
+ },
+ "idPath": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "k": {
+ "type": "string"
+ },
+ "method": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "r": {
+ "type": "string"
+ },
+ "replaceTypes": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/CriterionReplaceTypes"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "sort": {
+ "type": "integer"
+ },
+ "subTypes": {
+ "$ref": "#/$defs/SearchSubTypes"
+ },
+ "types": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/CriterionTypes"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "group",
+ "hPath",
+ "hasReplace",
+ "idPath",
+ "k",
+ "method",
+ "name",
+ "r",
+ "replaceTypes",
+ "sort",
+ "subTypes",
+ "types"
+ ],
+ "additionalProperties": false
+ },
+ "CriterionInput": {
+ "type": "object",
+ "properties": {
+ "group": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "hPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "hasReplace": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "idPath": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "k": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "method": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "name": {
"anyOf": [
{
"type": "string"
@@ -6775,6 +7472,18 @@
],
"additionalProperties": false
},
+ "RefreshBacklinkRequestInput": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "additionalProperties": false
+ },
"RemoveBookmarkRequestInput": {
"type": "object",
"properties": {
@@ -9109,7 +9818,311 @@
"handler": "bootProgress",
"body": "none",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$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": "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": [
@@ -9123,7 +10136,14 @@
]
},
"data": {
- "$ref": "#/$defs/BootProgressData"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AccountLoginData"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -9142,7 +10162,9 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ 1,
+ 10
]
},
"data": {
@@ -9161,6 +10183,16 @@
},
{
"type": "null"
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AccountLoginData"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
]
},
@@ -9179,9 +10211,9 @@
}
},
{
- "method": "GET",
- "path": "/api/system/version",
- "handler": "version",
+ "method": "POST",
+ "path": "/api/account/startFreeTrial",
+ "handler": "startFreeTrial",
"body": "none",
"request": {
"$ref": "#/$defs/EmptyRequestInput"
@@ -9198,7 +10230,7 @@
]
},
"data": {
- "type": "string"
+ "type": "null"
},
"msg": {
"type": "string"
@@ -9255,11 +10287,11 @@
},
{
"method": "POST",
- "path": "/api/account/checkActivationcode",
- "handler": "checkActivationcode",
+ "path": "/api/account/useActivationcode",
+ "handler": "useActivationcode",
"body": "json",
"request": {
- "$ref": "#/$defs/CheckActivationCodeRequestInput"
+ "$ref": "#/$defs/ActivationCodeRequestInput"
},
"response": {
"anyOf": [
@@ -9292,8 +10324,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- 1
+ -1
]
},
"data": {
@@ -9310,9 +10341,6 @@
],
"additionalProperties": false
},
- {
- "type": "null"
- },
{
"type": "null"
}
@@ -9334,11 +10362,11 @@
},
{
"method": "POST",
- "path": "/api/account/deactivate",
- "handler": "deactivateUser",
- "body": "none",
+ "path": "/api/archive/unzip",
+ "handler": "unzip",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/UnzipRequestInput"
},
"response": {
"anyOf": [
@@ -9409,11 +10437,11 @@
},
{
"method": "POST",
- "path": "/api/account/login",
- "handler": "login",
+ "path": "/api/archive/zip",
+ "handler": "zip",
"body": "json",
"request": {
- "$ref": "#/$defs/AccountLoginRequestInput"
+ "$ref": "#/$defs/ZipRequestInput"
},
"response": {
"anyOf": [
@@ -9427,14 +10455,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/AccountLoginData"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"msg": {
"type": "string"
@@ -9453,9 +10474,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- 1,
- 10
+ -1
]
},
"data": {
@@ -9474,16 +10493,6 @@
},
{
"type": "null"
- },
- {
- "anyOf": [
- {
- "$ref": "#/$defs/AccountLoginData"
- },
- {
- "type": "null"
- }
- ]
}
]
},
@@ -9503,11 +10512,11 @@
},
{
"method": "POST",
- "path": "/api/account/startFreeTrial",
- "handler": "startFreeTrial",
- "body": "none",
+ "path": "/api/attr/batchGetBlockAttrs",
+ "handler": "batchGetBlockAttrs",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/BlockIDsRequestInput"
},
"response": {
"anyOf": [
@@ -9521,7 +10530,20 @@
]
},
"data": {
- "type": "null"
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
},
"msg": {
"type": "string"
@@ -9578,11 +10600,11 @@
},
{
"method": "POST",
- "path": "/api/account/useActivationcode",
- "handler": "useActivationcode",
+ "path": "/api/attr/batchSetBlockAttrs",
+ "handler": "batchSetBlockAttrs",
"body": "json",
"request": {
- "$ref": "#/$defs/ActivationCodeRequestInput"
+ "$ref": "#/$defs/BatchSetBlockAttrsRequestInput"
},
"response": {
"anyOf": [
@@ -9653,11 +10675,11 @@
},
{
"method": "POST",
- "path": "/api/archive/unzip",
- "handler": "unzip",
+ "path": "/api/attr/getBlockAttrs",
+ "handler": "getBlockAttrs",
"body": "json",
"request": {
- "$ref": "#/$defs/UnzipRequestInput"
+ "$ref": "#/$defs/BlockIDRequestInput"
},
"response": {
"anyOf": [
@@ -9671,7 +10693,10 @@
]
},
"data": {
- "type": "null"
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
},
"msg": {
"type": "string"
@@ -9728,11 +10753,11 @@
},
{
"method": "POST",
- "path": "/api/archive/zip",
- "handler": "zip",
- "body": "json",
+ "path": "/api/attr/getBookmarkLabels",
+ "handler": "getBookmarkLabels",
+ "body": "none",
"request": {
- "$ref": "#/$defs/ZipRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -9746,7 +10771,17 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -9803,11 +10838,11 @@
},
{
"method": "POST",
- "path": "/api/attr/batchGetBlockAttrs",
- "handler": "batchGetBlockAttrs",
- "body": "json",
+ "path": "/api/attr/resetBlockAttrs",
+ "handler": "resetBlockAttrs",
+ "body": "none",
"request": {
- "$ref": "#/$defs/BlockIDsRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -9821,20 +10856,7 @@
]
},
"data": {
- "type": "object",
- "additionalProperties": {
- "anyOf": [
- {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
- }
+ "type": "null"
},
"msg": {
"type": "string"
@@ -9891,11 +10913,11 @@
},
{
"method": "POST",
- "path": "/api/attr/batchSetBlockAttrs",
- "handler": "batchSetBlockAttrs",
+ "path": "/api/attr/setBlockAttrs",
+ "handler": "setBlockAttrs",
"body": "json",
"request": {
- "$ref": "#/$defs/BatchSetBlockAttrsRequestInput"
+ "$ref": "#/$defs/SetBlockAttrsRequestInput"
},
"response": {
"anyOf": [
@@ -9966,11 +10988,11 @@
},
{
"method": "POST",
- "path": "/api/attr/getBlockAttrs",
- "handler": "getBlockAttrs",
- "body": "json",
+ "path": "/api/av/searchAttributeViewNonRelationKey",
+ "handler": "searchAttributeViewNonRelationKey",
+ "body": "none",
"request": {
- "$ref": "#/$defs/BlockIDRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -9984,10 +11006,7 @@
]
},
"data": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
+ "type": "null"
},
"msg": {
"type": "string"
@@ -10044,11 +11063,11 @@
},
{
"method": "POST",
- "path": "/api/attr/getBookmarkLabels",
- "handler": "getBookmarkLabels",
- "body": "none",
+ "path": "/api/block/appendBlock",
+ "handler": "appendBlock",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/AppendBlockRequestInput"
},
"response": {
"anyOf": [
@@ -10066,7 +11085,14 @@
{
"type": "array",
"items": {
- "type": "string"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockTransaction"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
{
@@ -10129,11 +11155,11 @@
},
{
"method": "POST",
- "path": "/api/attr/resetBlockAttrs",
- "handler": "resetBlockAttrs",
- "body": "none",
+ "path": "/api/block/appendDailyNoteBlock",
+ "handler": "appendDailyNoteBlock",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/DailyNoteBlockRequestInput"
},
"response": {
"anyOf": [
@@ -10147,7 +11173,24 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockTransaction"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -10204,11 +11247,11 @@
},
{
"method": "POST",
- "path": "/api/attr/setBlockAttrs",
- "handler": "setBlockAttrs",
+ "path": "/api/block/appendHeadingChildren",
+ "handler": "appendHeadingChildren",
"body": "json",
"request": {
- "$ref": "#/$defs/SetBlockAttrsRequestInput"
+ "$ref": "#/$defs/AppendHeadingChildrenRequestInput"
},
"response": {
"anyOf": [
@@ -10279,11 +11322,11 @@
},
{
"method": "POST",
- "path": "/api/av/searchAttributeViewNonRelationKey",
- "handler": "searchAttributeViewNonRelationKey",
- "body": "none",
+ "path": "/api/block/batchAppendBlock",
+ "handler": "batchAppendBlock",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/BatchParentBlockRequestInput"
},
"response": {
"anyOf": [
@@ -10296,9 +11339,26 @@
0
]
},
- "data": {
- "type": "null"
- },
+ "data": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockTransaction"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
"msg": {
"type": "string"
}
@@ -10354,11 +11414,11 @@
},
{
"method": "POST",
- "path": "/api/block/appendBlock",
- "handler": "appendBlock",
+ "path": "/api/block/batchInsertBlock",
+ "handler": "batchInsertBlock",
"body": "json",
"request": {
- "$ref": "#/$defs/AppendBlockRequestInput"
+ "$ref": "#/$defs/BatchInsertBlockRequestInput"
},
"response": {
"anyOf": [
@@ -10446,11 +11506,11 @@
},
{
"method": "POST",
- "path": "/api/block/appendDailyNoteBlock",
- "handler": "appendDailyNoteBlock",
+ "path": "/api/block/batchPrependBlock",
+ "handler": "batchPrependBlock",
"body": "json",
"request": {
- "$ref": "#/$defs/DailyNoteBlockRequestInput"
+ "$ref": "#/$defs/BatchParentBlockRequestInput"
},
"response": {
"anyOf": [
@@ -10538,11 +11598,11 @@
},
{
"method": "POST",
- "path": "/api/block/appendHeadingChildren",
- "handler": "appendHeadingChildren",
+ "path": "/api/block/batchUpdateBlock",
+ "handler": "batchUpdateBlock",
"body": "json",
"request": {
- "$ref": "#/$defs/AppendHeadingChildrenRequestInput"
+ "$ref": "#/$defs/BatchUpdateBlockRequestInput"
},
"response": {
"anyOf": [
@@ -10556,7 +11616,24 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockTransaction"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -10613,11 +11690,11 @@
},
{
"method": "POST",
- "path": "/api/block/batchAppendBlock",
- "handler": "batchAppendBlock",
+ "path": "/api/block/batchUpdateTaskListItemMarker",
+ "handler": "batchUpdateTaskListItemMarker",
"body": "json",
"request": {
- "$ref": "#/$defs/BatchParentBlockRequestInput"
+ "$ref": "#/$defs/BatchTaskListMarkerRequestInput"
},
"response": {
"anyOf": [
@@ -10705,11 +11782,11 @@
},
{
"method": "POST",
- "path": "/api/block/batchInsertBlock",
- "handler": "batchInsertBlock",
+ "path": "/api/block/checkBlockExist",
+ "handler": "checkBlockExist",
"body": "json",
"request": {
- "$ref": "#/$defs/BatchInsertBlockRequestInput"
+ "$ref": "#/$defs/BlockQueryRequestInput"
},
"response": {
"anyOf": [
@@ -10723,24 +11800,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockTransaction"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
+ "type": "boolean"
},
"msg": {
"type": "string"
@@ -10797,11 +11857,11 @@
},
{
"method": "POST",
- "path": "/api/block/batchPrependBlock",
- "handler": "batchPrependBlock",
+ "path": "/api/block/checkBlockFold",
+ "handler": "checkBlockFold",
"body": "json",
"request": {
- "$ref": "#/$defs/BatchParentBlockRequestInput"
+ "$ref": "#/$defs/BlockQueryRequestInput"
},
"response": {
"anyOf": [
@@ -10815,24 +11875,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockTransaction"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
+ "$ref": "#/$defs/BlockFoldData"
},
"msg": {
"type": "string"
@@ -10889,11 +11932,11 @@
},
{
"method": "POST",
- "path": "/api/block/batchUpdateBlock",
- "handler": "batchUpdateBlock",
+ "path": "/api/block/checkBlockRef",
+ "handler": "checkBlockRef",
"body": "json",
"request": {
- "$ref": "#/$defs/BatchUpdateBlockRequestInput"
+ "$ref": "#/$defs/CheckBlockRefRequestInput"
},
"response": {
"anyOf": [
@@ -10907,24 +11950,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockTransaction"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
+ "type": "boolean"
},
"msg": {
"type": "string"
@@ -10962,6 +11988,9 @@
},
{
"type": "null"
+ },
+ {
+ "type": "boolean"
}
]
},
@@ -10981,11 +12010,11 @@
},
{
"method": "POST",
- "path": "/api/block/batchUpdateTaskListItemMarker",
- "handler": "batchUpdateTaskListItemMarker",
+ "path": "/api/block/checkBlocksExist",
+ "handler": "checkBlocksExist",
"body": "json",
"request": {
- "$ref": "#/$defs/BatchTaskListMarkerRequestInput"
+ "$ref": "#/$defs/CheckBlocksExistRequestInput"
},
"response": {
"anyOf": [
@@ -11001,16 +12030,9 @@
"data": {
"anyOf": [
{
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockTransaction"
- },
- {
- "type": "null"
- }
- ]
+ "type": "object",
+ "additionalProperties": {
+ "type": "boolean"
}
},
{
@@ -11073,11 +12095,11 @@
},
{
"method": "POST",
- "path": "/api/block/checkBlockExist",
- "handler": "checkBlockExist",
+ "path": "/api/block/deleteBlock",
+ "handler": "deleteBlock",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockQueryRequestInput"
+ "$ref": "#/$defs/DeleteBlockRequestInput"
},
"response": {
"anyOf": [
@@ -11091,7 +12113,24 @@
]
},
"data": {
- "type": "boolean"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockTransaction"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -11148,11 +12187,11 @@
},
{
"method": "POST",
- "path": "/api/block/checkBlockFold",
- "handler": "checkBlockFold",
+ "path": "/api/block/foldBlock",
+ "handler": "foldBlock",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockQueryRequestInput"
+ "$ref": "#/$defs/BlockIDRequestInput"
},
"response": {
"anyOf": [
@@ -11166,7 +12205,7 @@
]
},
"data": {
- "$ref": "#/$defs/BlockFoldData"
+ "type": "null"
},
"msg": {
"type": "string"
@@ -11223,11 +12262,11 @@
},
{
"method": "POST",
- "path": "/api/block/checkBlockRef",
- "handler": "checkBlockRef",
+ "path": "/api/block/getBlockBreadcrumb",
+ "handler": "getBlockBreadcrumb",
"body": "json",
"request": {
- "$ref": "#/$defs/CheckBlockRefRequestInput"
+ "$ref": "#/$defs/BlockBreadcrumbRequestInput"
},
"response": {
"anyOf": [
@@ -11241,7 +12280,24 @@
]
},
"data": {
- "type": "boolean"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockPath"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -11279,9 +12335,6 @@
},
{
"type": "null"
- },
- {
- "type": "boolean"
}
]
},
@@ -11301,11 +12354,11 @@
},
{
"method": "POST",
- "path": "/api/block/checkBlocksExist",
- "handler": "checkBlocksExist",
+ "path": "/api/block/getBlockBreadcrumbChildren",
+ "handler": "getBlockBreadcrumbChildren",
"body": "json",
"request": {
- "$ref": "#/$defs/CheckBlocksExistRequestInput"
+ "$ref": "#/$defs/BlockBreadcrumbChildrenRequestInput"
},
"response": {
"anyOf": [
@@ -11321,10 +12374,7 @@
"data": {
"anyOf": [
{
- "type": "object",
- "additionalProperties": {
- "type": "boolean"
- }
+ "$ref": "#/$defs/BlockBreadcrumbChildren"
},
{
"type": "null"
@@ -11386,43 +12436,26 @@
},
{
"method": "POST",
- "path": "/api/block/deleteBlock",
- "handler": "deleteBlock",
+ "path": "/api/block/getBlockDOM",
+ "handler": "getBlockDOM",
"body": "json",
"request": {
- "$ref": "#/$defs/DeleteBlockRequestInput"
+ "$ref": "#/$defs/BlockQueryRequestInput"
},
"response": {
"anyOf": [
{
"type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- 0
- ]
- },
- "data": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockTransaction"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
+ "properties": {
+ "code": {
+ "type": "integer",
+ "enum": [
+ 0
]
},
+ "data": {
+ "$ref": "#/$defs/BlockDOMData"
+ },
"msg": {
"type": "string"
}
@@ -11478,11 +12511,11 @@
},
{
"method": "POST",
- "path": "/api/block/foldBlock",
- "handler": "foldBlock",
+ "path": "/api/block/getBlockDOMWithEmbed",
+ "handler": "getBlockDOMWithEmbed",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockIDRequestInput"
+ "$ref": "#/$defs/BlockQueryRequestInput"
},
"response": {
"anyOf": [
@@ -11496,7 +12529,7 @@
]
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/BlockDOMData"
},
"msg": {
"type": "string"
@@ -11553,11 +12586,11 @@
},
{
"method": "POST",
- "path": "/api/block/getBlockBreadcrumb",
- "handler": "getBlockBreadcrumb",
+ "path": "/api/block/getBlockDOMs",
+ "handler": "getBlockDOMs",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockBreadcrumbRequestInput"
+ "$ref": "#/$defs/BlocksQueryRequestInput"
},
"response": {
"anyOf": [
@@ -11573,16 +12606,9 @@
"data": {
"anyOf": [
{
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockPath"
- },
- {
- "type": "null"
- }
- ]
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
}
},
{
@@ -11645,11 +12671,11 @@
},
{
"method": "POST",
- "path": "/api/block/getBlockBreadcrumbChildren",
- "handler": "getBlockBreadcrumbChildren",
+ "path": "/api/block/getBlockDOMsWithEmbed",
+ "handler": "getBlockDOMsWithEmbed",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockBreadcrumbChildrenRequestInput"
+ "$ref": "#/$defs/BlocksQueryRequestInput"
},
"response": {
"anyOf": [
@@ -11665,7 +12691,10 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/BlockBreadcrumbChildren"
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
},
{
"type": "null"
@@ -11727,11 +12756,11 @@
},
{
"method": "POST",
- "path": "/api/block/getBlockDOM",
- "handler": "getBlockDOM",
+ "path": "/api/block/getBlockDefIDsByRefText",
+ "handler": "getBlockDefIDsByRefText",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockQueryRequestInput"
+ "$ref": "#/$defs/RefTextQueryRequestInput"
},
"response": {
"anyOf": [
@@ -11745,7 +12774,7 @@
]
},
"data": {
- "$ref": "#/$defs/BlockDOMData"
+ "$ref": "#/$defs/RefDefsData"
},
"msg": {
"type": "string"
@@ -11802,8 +12831,8 @@
},
{
"method": "POST",
- "path": "/api/block/getBlockDOMWithEmbed",
- "handler": "getBlockDOMWithEmbed",
+ "path": "/api/block/getBlockIndex",
+ "handler": "getBlockIndex",
"body": "json",
"request": {
"$ref": "#/$defs/BlockQueryRequestInput"
@@ -11820,7 +12849,7 @@
]
},
"data": {
- "$ref": "#/$defs/BlockDOMData"
+ "type": "integer"
},
"msg": {
"type": "string"
@@ -11877,11 +12906,11 @@
},
{
"method": "POST",
- "path": "/api/block/getBlockDOMs",
- "handler": "getBlockDOMs",
+ "path": "/api/block/getBlockInfo",
+ "handler": "getBlockInfo",
"body": "json",
"request": {
- "$ref": "#/$defs/BlocksQueryRequestInput"
+ "$ref": "#/$defs/BlockInfoRequestInput"
},
"response": {
"anyOf": [
@@ -11895,17 +12924,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
+ "$ref": "#/$defs/BlockInfoData"
},
"msg": {
"type": "string"
@@ -11924,7 +12943,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ 3
]
},
"data": {
@@ -11943,6 +12963,9 @@
},
{
"type": "null"
+ },
+ {
+ "type": "string"
}
]
},
@@ -11962,11 +12985,11 @@
},
{
"method": "POST",
- "path": "/api/block/getBlockDOMsWithEmbed",
- "handler": "getBlockDOMsWithEmbed",
+ "path": "/api/block/getBlockKramdown",
+ "handler": "getBlockKramdown",
"body": "json",
"request": {
- "$ref": "#/$defs/BlocksQueryRequestInput"
+ "$ref": "#/$defs/BlockKramdownRequestInput"
},
"response": {
"anyOf": [
@@ -11980,17 +13003,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
+ "$ref": "#/$defs/BlockKramdownData"
},
"msg": {
"type": "string"
@@ -12047,11 +13060,11 @@
},
{
"method": "POST",
- "path": "/api/block/getBlockDefIDsByRefText",
- "handler": "getBlockDefIDsByRefText",
+ "path": "/api/block/getBlockKramdowns",
+ "handler": "getBlockKramdowns",
"body": "json",
"request": {
- "$ref": "#/$defs/RefTextQueryRequestInput"
+ "$ref": "#/$defs/BlocksKramdownRequestInput"
},
"response": {
"anyOf": [
@@ -12065,7 +13078,17 @@
]
},
"data": {
- "$ref": "#/$defs/RefDefsData"
+ "anyOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -12122,8 +13145,8 @@
},
{
"method": "POST",
- "path": "/api/block/getBlockIndex",
- "handler": "getBlockIndex",
+ "path": "/api/block/getBlockRelevantIDs",
+ "handler": "getBlockRelevantIDs",
"body": "json",
"request": {
"$ref": "#/$defs/BlockQueryRequestInput"
@@ -12140,7 +13163,7 @@
]
},
"data": {
- "type": "integer"
+ "$ref": "#/$defs/BlockRelevantData"
},
"msg": {
"type": "string"
@@ -12197,11 +13220,11 @@
},
{
"method": "POST",
- "path": "/api/block/getBlockInfo",
- "handler": "getBlockInfo",
+ "path": "/api/block/getBlockSiblingID",
+ "handler": "getBlockSiblingID",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockInfoRequestInput"
+ "$ref": "#/$defs/BlockQueryRequestInput"
},
"response": {
"anyOf": [
@@ -12215,7 +13238,7 @@
]
},
"data": {
- "$ref": "#/$defs/BlockInfoData"
+ "$ref": "#/$defs/BlockSiblingData"
},
"msg": {
"type": "string"
@@ -12234,8 +13257,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- 3
+ -1
]
},
"data": {
@@ -12254,9 +13276,6 @@
},
{
"type": "null"
- },
- {
- "type": "string"
}
]
},
@@ -12276,11 +13295,11 @@
},
{
"method": "POST",
- "path": "/api/block/getBlockKramdown",
- "handler": "getBlockKramdown",
+ "path": "/api/block/getBlockTreeInfos",
+ "handler": "getBlockTreeInfos",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockKramdownRequestInput"
+ "$ref": "#/$defs/BlocksQueryRequestInput"
},
"response": {
"anyOf": [
@@ -12294,7 +13313,24 @@
]
},
"data": {
- "$ref": "#/$defs/BlockKramdownData"
+ "anyOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockTreeInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -12351,11 +13387,11 @@
},
{
"method": "POST",
- "path": "/api/block/getBlockKramdowns",
- "handler": "getBlockKramdowns",
+ "path": "/api/block/getBlocksIndexes",
+ "handler": "getBlocksIndexes",
"body": "json",
"request": {
- "$ref": "#/$defs/BlocksKramdownRequestInput"
+ "$ref": "#/$defs/BlocksQueryRequestInput"
},
"response": {
"anyOf": [
@@ -12373,7 +13409,7 @@
{
"type": "object",
"additionalProperties": {
- "type": "string"
+ "type": "integer"
}
},
{
@@ -12436,11 +13472,11 @@
},
{
"method": "POST",
- "path": "/api/block/getBlockRelevantIDs",
- "handler": "getBlockRelevantIDs",
+ "path": "/api/block/getBlocksWordCount",
+ "handler": "getBlocksWordCount",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockQueryRequestInput"
+ "$ref": "#/$defs/BlocksWordCountRequestInput"
},
"response": {
"anyOf": [
@@ -12454,7 +13490,7 @@
]
},
"data": {
- "$ref": "#/$defs/BlockRelevantData"
+ "$ref": "#/$defs/WordCountData"
},
"msg": {
"type": "string"
@@ -12511,8 +13547,8 @@
},
{
"method": "POST",
- "path": "/api/block/getBlockSiblingID",
- "handler": "getBlockSiblingID",
+ "path": "/api/block/getChildBlocks",
+ "handler": "getChildBlocks",
"body": "json",
"request": {
"$ref": "#/$defs/BlockQueryRequestInput"
@@ -12529,7 +13565,17 @@
]
},
"data": {
- "$ref": "#/$defs/BlockSiblingData"
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ChildBlock"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
},
"msg": {
"type": "string"
@@ -12586,11 +13632,11 @@
},
{
"method": "POST",
- "path": "/api/block/getBlockTreeInfos",
- "handler": "getBlockTreeInfos",
+ "path": "/api/block/getContentWordCount",
+ "handler": "getContentWordCount",
"body": "json",
"request": {
- "$ref": "#/$defs/BlocksQueryRequestInput"
+ "$ref": "#/$defs/ContentWordCountRequestInput"
},
"response": {
"anyOf": [
@@ -12604,24 +13650,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "object",
- "additionalProperties": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockTreeInfo"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
+ "$ref": "#/$defs/WordCountData"
},
"msg": {
"type": "string"
@@ -12678,11 +13707,11 @@
},
{
"method": "POST",
- "path": "/api/block/getBlocksIndexes",
- "handler": "getBlocksIndexes",
+ "path": "/api/block/getDOMText",
+ "handler": "getDOMText",
"body": "json",
"request": {
- "$ref": "#/$defs/BlocksQueryRequestInput"
+ "$ref": "#/$defs/DOMTextRequestInput"
},
"response": {
"anyOf": [
@@ -12696,17 +13725,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "object",
- "additionalProperties": {
- "type": "integer"
- }
- },
- {
- "type": "null"
- }
- ]
+ "type": "string"
},
"msg": {
"type": "string"
@@ -12763,11 +13782,11 @@
},
{
"method": "POST",
- "path": "/api/block/getBlocksWordCount",
- "handler": "getBlocksWordCount",
+ "path": "/api/block/getDocBlocksOrders",
+ "handler": "getDocBlocksOrders",
"body": "json",
"request": {
- "$ref": "#/$defs/BlocksWordCountRequestInput"
+ "$ref": "#/$defs/DocOrdersRequestInput"
},
"response": {
"anyOf": [
@@ -12781,7 +13800,17 @@
]
},
"data": {
- "$ref": "#/$defs/WordCountData"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -12838,11 +13867,11 @@
},
{
"method": "POST",
- "path": "/api/block/getChildBlocks",
- "handler": "getChildBlocks",
- "body": "json",
+ "path": "/api/block/getDocHeadingLevelTransaction",
+ "handler": "getDocHeadingLevelTransaction",
+ "body": "structJSON",
"request": {
- "$ref": "#/$defs/BlockQueryRequestInput"
+ "$ref": "#/$defs/DocHeadingLevelRequestInput"
},
"response": {
"anyOf": [
@@ -12856,17 +13885,14 @@
]
},
"data": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/ChildBlock"
- },
- {
- "type": "null"
- }
- ]
- }
+ "anyOf": [
+ {
+ "$ref": "#/$defs/DocHeadingLevelData"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -12923,11 +13949,11 @@
},
{
"method": "POST",
- "path": "/api/block/getContentWordCount",
- "handler": "getContentWordCount",
+ "path": "/api/block/getDocInfo",
+ "handler": "getDocInfo",
"body": "json",
"request": {
- "$ref": "#/$defs/ContentWordCountRequestInput"
+ "$ref": "#/$defs/BlockQueryRequestInput"
},
"response": {
"anyOf": [
@@ -12941,7 +13967,14 @@
]
},
"data": {
- "$ref": "#/$defs/WordCountData"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/DocInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -12998,11 +14031,11 @@
},
{
"method": "POST",
- "path": "/api/block/getDOMText",
- "handler": "getDOMText",
+ "path": "/api/block/getDocsInfo",
+ "handler": "getDocsInfo",
"body": "json",
"request": {
- "$ref": "#/$defs/DOMTextRequestInput"
+ "$ref": "#/$defs/DocsInfoRequestInput"
},
"response": {
"anyOf": [
@@ -13016,7 +14049,24 @@
]
},
"data": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/DocInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -13073,11 +14123,11 @@
},
{
"method": "POST",
- "path": "/api/block/getDocBlocksOrders",
- "handler": "getDocBlocksOrders",
+ "path": "/api/block/getHeadingChildrenDOM",
+ "handler": "getHeadingChildrenDOM",
"body": "json",
"request": {
- "$ref": "#/$defs/DocOrdersRequestInput"
+ "$ref": "#/$defs/HeadingChildrenRequestInput"
},
"response": {
"anyOf": [
@@ -13091,17 +14141,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
+ "type": "string"
},
"msg": {
"type": "string"
@@ -13158,11 +14198,11 @@
},
{
"method": "POST",
- "path": "/api/block/getDocHeadingLevelTransaction",
- "handler": "getDocHeadingLevelTransaction",
- "body": "structJSON",
+ "path": "/api/block/getHeadingChildrenIDs",
+ "handler": "getHeadingChildrenIDs",
+ "body": "json",
"request": {
- "$ref": "#/$defs/DocHeadingLevelRequestInput"
+ "$ref": "#/$defs/BlockIDRequestInput"
},
"response": {
"anyOf": [
@@ -13178,7 +14218,10 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/DocHeadingLevelData"
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
{
"type": "null"
@@ -13240,11 +14283,11 @@
},
{
"method": "POST",
- "path": "/api/block/getDocInfo",
- "handler": "getDocInfo",
+ "path": "/api/block/getHeadingDeleteTransaction",
+ "handler": "getHeadingDeleteTransaction",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockQueryRequestInput"
+ "$ref": "#/$defs/BlockIDRequestInput"
},
"response": {
"anyOf": [
@@ -13260,7 +14303,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/DocInfo"
+ "$ref": "#/$defs/BlockTransaction"
},
{
"type": "null"
@@ -13322,11 +14365,11 @@
},
{
"method": "POST",
- "path": "/api/block/getDocsInfo",
- "handler": "getDocsInfo",
+ "path": "/api/block/getHeadingFoldTransaction",
+ "handler": "getHeadingFoldTransaction",
"body": "json",
"request": {
- "$ref": "#/$defs/DocsInfoRequestInput"
+ "$ref": "#/$defs/HeadingFoldRequestInput"
},
"response": {
"anyOf": [
@@ -13342,17 +14385,7 @@
"data": {
"anyOf": [
{
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/DocInfo"
- },
- {
- "type": "null"
- }
- ]
- }
+ "$ref": "#/$defs/BlockTransaction"
},
{
"type": "null"
@@ -13414,11 +14447,11 @@
},
{
"method": "POST",
- "path": "/api/block/getHeadingChildrenDOM",
- "handler": "getHeadingChildrenDOM",
+ "path": "/api/block/getHeadingInsertTransaction",
+ "handler": "getHeadingInsertTransaction",
"body": "json",
"request": {
- "$ref": "#/$defs/HeadingChildrenRequestInput"
+ "$ref": "#/$defs/BlockIDRequestInput"
},
"response": {
"anyOf": [
@@ -13432,7 +14465,14 @@
]
},
"data": {
- "type": "string"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockTransaction"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -13489,11 +14529,11 @@
},
{
"method": "POST",
- "path": "/api/block/getHeadingChildrenIDs",
- "handler": "getHeadingChildrenIDs",
+ "path": "/api/block/getHeadingLevelTransaction",
+ "handler": "getHeadingLevelTransaction",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockIDRequestInput"
+ "$ref": "#/$defs/HeadingLevelRequestInput"
},
"response": {
"anyOf": [
@@ -13509,10 +14549,7 @@
"data": {
"anyOf": [
{
- "type": "array",
- "items": {
- "type": "string"
- }
+ "$ref": "#/$defs/BlockTransaction"
},
{
"type": "null"
@@ -13574,11 +14611,11 @@
},
{
"method": "POST",
- "path": "/api/block/getHeadingDeleteTransaction",
- "handler": "getHeadingDeleteTransaction",
+ "path": "/api/block/getOrderedListContinueStart",
+ "handler": "getOrderedListContinueStart",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockIDRequestInput"
+ "$ref": "#/$defs/BlockQueryRequestInput"
},
"response": {
"anyOf": [
@@ -13592,14 +14629,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockTransaction"
- },
- {
- "type": "null"
- }
- ]
+ "$ref": "#/$defs/OrderedListStartData"
},
"msg": {
"type": "string"
@@ -13656,11 +14686,11 @@
},
{
"method": "POST",
- "path": "/api/block/getHeadingFoldTransaction",
- "handler": "getHeadingFoldTransaction",
- "body": "json",
+ "path": "/api/block/getRecentUpdatedBlocks",
+ "handler": "getRecentUpdatedBlocks",
+ "body": "none",
"request": {
- "$ref": "#/$defs/HeadingFoldRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -13676,7 +14706,17 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/BlockTransaction"
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SearchBlock"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
},
{
"type": "null"
@@ -13738,11 +14778,11 @@
},
{
"method": "POST",
- "path": "/api/block/getHeadingInsertTransaction",
- "handler": "getHeadingInsertTransaction",
+ "path": "/api/block/getRefIDs",
+ "handler": "getRefIDs",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockIDRequestInput"
+ "$ref": "#/$defs/RefIDsRequestInput"
},
"response": {
"anyOf": [
@@ -13756,14 +14796,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockTransaction"
- },
- {
- "type": "null"
- }
- ]
+ "$ref": "#/$defs/RefIDsData"
},
"msg": {
"type": "string"
@@ -13820,11 +14853,11 @@
},
{
"method": "POST",
- "path": "/api/block/getHeadingLevelTransaction",
- "handler": "getHeadingLevelTransaction",
+ "path": "/api/block/getRefIDsByFileAnnotationID",
+ "handler": "getRefIDsByFileAnnotationID",
"body": "json",
"request": {
- "$ref": "#/$defs/HeadingLevelRequestInput"
+ "$ref": "#/$defs/FileAnnotationRefRequestInput"
},
"response": {
"anyOf": [
@@ -13838,14 +14871,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockTransaction"
- },
- {
- "type": "null"
- }
- ]
+ "$ref": "#/$defs/RefDefsData"
},
"msg": {
"type": "string"
@@ -13902,8 +14928,8 @@
},
{
"method": "POST",
- "path": "/api/block/getOrderedListContinueStart",
- "handler": "getOrderedListContinueStart",
+ "path": "/api/block/getRefText",
+ "handler": "getRefText",
"body": "json",
"request": {
"$ref": "#/$defs/BlockQueryRequestInput"
@@ -13920,7 +14946,7 @@
]
},
"data": {
- "$ref": "#/$defs/OrderedListStartData"
+ "type": "string"
},
"msg": {
"type": "string"
@@ -13977,43 +15003,36 @@
},
{
"method": "POST",
- "path": "/api/block/getRecentUpdatedBlocks",
- "handler": "getRecentUpdatedBlocks",
- "body": "none",
+ "path": "/api/block/getTailChildBlocks",
+ "handler": "getTailChildBlocks",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/TailChildBlocksRequestInput"
},
"response": {
"anyOf": [
{
"type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- 0
- ]
- },
- "data": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/SearchBlock"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
+ "properties": {
+ "code": {
+ "type": "integer",
+ "enum": [
+ 0
]
},
+ "data": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ChildBlock"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
"msg": {
"type": "string"
}
@@ -14069,11 +15088,11 @@
},
{
"method": "POST",
- "path": "/api/block/getRefIDs",
- "handler": "getRefIDs",
+ "path": "/api/block/getTreeStat",
+ "handler": "getTreeStat",
"body": "json",
"request": {
- "$ref": "#/$defs/RefIDsRequestInput"
+ "$ref": "#/$defs/TreeStatRequestInput"
},
"response": {
"anyOf": [
@@ -14087,7 +15106,7 @@
]
},
"data": {
- "$ref": "#/$defs/RefIDsData"
+ "$ref": "#/$defs/TreeStatData"
},
"msg": {
"type": "string"
@@ -14144,11 +15163,11 @@
},
{
"method": "POST",
- "path": "/api/block/getRefIDsByFileAnnotationID",
- "handler": "getRefIDsByFileAnnotationID",
+ "path": "/api/block/getUnfoldedParentID",
+ "handler": "getUnfoldedParentID",
"body": "json",
"request": {
- "$ref": "#/$defs/FileAnnotationRefRequestInput"
+ "$ref": "#/$defs/BlockQueryRequestInput"
},
"response": {
"anyOf": [
@@ -14162,7 +15181,7 @@
]
},
"data": {
- "$ref": "#/$defs/RefDefsData"
+ "$ref": "#/$defs/UnfoldedParentData"
},
"msg": {
"type": "string"
@@ -14219,11 +15238,11 @@
},
{
"method": "POST",
- "path": "/api/block/getRefText",
- "handler": "getRefText",
+ "path": "/api/block/insertBlock",
+ "handler": "insertBlock",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockQueryRequestInput"
+ "$ref": "#/$defs/InsertBlockRequestInput"
},
"response": {
"anyOf": [
@@ -14237,7 +15256,24 @@
]
},
"data": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockTransaction"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -14294,11 +15330,11 @@
},
{
"method": "POST",
- "path": "/api/block/getTailChildBlocks",
- "handler": "getTailChildBlocks",
+ "path": "/api/block/moveBlock",
+ "handler": "moveBlock",
"body": "json",
"request": {
- "$ref": "#/$defs/TailChildBlocksRequestInput"
+ "$ref": "#/$defs/MoveBlockRequestInput"
},
"response": {
"anyOf": [
@@ -14312,17 +15348,7 @@
]
},
"data": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/ChildBlock"
- },
- {
- "type": "null"
- }
- ]
- }
+ "type": "null"
},
"msg": {
"type": "string"
@@ -14379,11 +15405,11 @@
},
{
"method": "POST",
- "path": "/api/block/getTreeStat",
- "handler": "getTreeStat",
+ "path": "/api/block/moveOutlineHeading",
+ "handler": "moveOutlineHeading",
"body": "json",
"request": {
- "$ref": "#/$defs/TreeStatRequestInput"
+ "$ref": "#/$defs/MoveBlockRequestInput"
},
"response": {
"anyOf": [
@@ -14397,7 +15423,24 @@
]
},
"data": {
- "$ref": "#/$defs/TreeStatData"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockTransaction"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -14454,11 +15497,11 @@
},
{
"method": "POST",
- "path": "/api/block/getUnfoldedParentID",
- "handler": "getUnfoldedParentID",
+ "path": "/api/block/prependBlock",
+ "handler": "prependBlock",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockQueryRequestInput"
+ "$ref": "#/$defs/PrependBlockRequestInput"
},
"response": {
"anyOf": [
@@ -14472,7 +15515,24 @@
]
},
"data": {
- "$ref": "#/$defs/UnfoldedParentData"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockTransaction"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -14529,11 +15589,11 @@
},
{
"method": "POST",
- "path": "/api/block/insertBlock",
- "handler": "insertBlock",
+ "path": "/api/block/prependDailyNoteBlock",
+ "handler": "prependDailyNoteBlock",
"body": "json",
"request": {
- "$ref": "#/$defs/InsertBlockRequestInput"
+ "$ref": "#/$defs/DailyNoteBlockRequestInput"
},
"response": {
"anyOf": [
@@ -14621,11 +15681,11 @@
},
{
"method": "POST",
- "path": "/api/block/moveBlock",
- "handler": "moveBlock",
+ "path": "/api/block/setBlockReminder",
+ "handler": "setBlockReminder",
"body": "json",
"request": {
- "$ref": "#/$defs/MoveBlockRequestInput"
+ "$ref": "#/$defs/BlockReminderRequestInput"
},
"response": {
"anyOf": [
@@ -14696,11 +15756,11 @@
},
{
"method": "POST",
- "path": "/api/block/moveOutlineHeading",
- "handler": "moveOutlineHeading",
+ "path": "/api/block/swapBlockRef",
+ "handler": "swapBlockRef",
"body": "json",
"request": {
- "$ref": "#/$defs/MoveBlockRequestInput"
+ "$ref": "#/$defs/SwapBlockRefRequestInput"
},
"response": {
"anyOf": [
@@ -14714,24 +15774,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockTransaction"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"msg": {
"type": "string"
@@ -14788,11 +15831,11 @@
},
{
"method": "POST",
- "path": "/api/block/prependBlock",
- "handler": "prependBlock",
+ "path": "/api/block/transferBlockRef",
+ "handler": "transferBlockRef",
"body": "json",
"request": {
- "$ref": "#/$defs/PrependBlockRequestInput"
+ "$ref": "#/$defs/TransferBlockRefRequestInput"
},
"response": {
"anyOf": [
@@ -14806,24 +15849,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockTransaction"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"msg": {
"type": "string"
@@ -14880,11 +15906,11 @@
},
{
"method": "POST",
- "path": "/api/block/prependDailyNoteBlock",
- "handler": "prependDailyNoteBlock",
+ "path": "/api/block/unfoldBlock",
+ "handler": "unfoldBlock",
"body": "json",
"request": {
- "$ref": "#/$defs/DailyNoteBlockRequestInput"
+ "$ref": "#/$defs/BlockIDRequestInput"
},
"response": {
"anyOf": [
@@ -14898,24 +15924,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockTransaction"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"msg": {
"type": "string"
@@ -14972,11 +15981,11 @@
},
{
"method": "POST",
- "path": "/api/block/setBlockReminder",
- "handler": "setBlockReminder",
+ "path": "/api/block/updateBlock",
+ "handler": "updateBlock",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockReminderRequestInput"
+ "$ref": "#/$defs/UpdateBlockRequestInput"
},
"response": {
"anyOf": [
@@ -14990,7 +15999,24 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockTransaction"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -15047,11 +16073,11 @@
},
{
"method": "POST",
- "path": "/api/block/swapBlockRef",
- "handler": "swapBlockRef",
+ "path": "/api/block/updateTaskListItemMarker",
+ "handler": "updateTaskListItemMarker",
"body": "json",
"request": {
- "$ref": "#/$defs/SwapBlockRefRequestInput"
+ "$ref": "#/$defs/TaskListMarkerRequestInput"
},
"response": {
"anyOf": [
@@ -15064,9 +16090,26 @@
0
]
},
- "data": {
- "type": "null"
- },
+ "data": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BlockTransaction"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
"msg": {
"type": "string"
}
@@ -15122,11 +16165,11 @@
},
{
"method": "POST",
- "path": "/api/block/transferBlockRef",
- "handler": "transferBlockRef",
- "body": "json",
+ "path": "/api/bookmark/getBookmark",
+ "handler": "getBookmark",
+ "body": "none",
"request": {
- "$ref": "#/$defs/TransferBlockRefRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -15140,7 +16183,24 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Bookmark"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -15197,11 +16257,11 @@
},
{
"method": "POST",
- "path": "/api/block/unfoldBlock",
- "handler": "unfoldBlock",
+ "path": "/api/bookmark/removeBookmark",
+ "handler": "removeBookmark",
"body": "json",
"request": {
- "$ref": "#/$defs/BlockIDRequestInput"
+ "$ref": "#/$defs/RemoveBookmarkRequestInput"
},
"response": {
"anyOf": [
@@ -15272,11 +16332,11 @@
},
{
"method": "POST",
- "path": "/api/block/updateBlock",
- "handler": "updateBlock",
+ "path": "/api/bookmark/renameBookmark",
+ "handler": "renameBookmark",
"body": "json",
"request": {
- "$ref": "#/$defs/UpdateBlockRequestInput"
+ "$ref": "#/$defs/RenameBookmarkRequestInput"
},
"response": {
"anyOf": [
@@ -15290,24 +16350,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockTransaction"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"msg": {
"type": "string"
@@ -15364,11 +16407,11 @@
},
{
"method": "POST",
- "path": "/api/block/updateTaskListItemMarker",
- "handler": "updateTaskListItemMarker",
+ "path": "/api/broadcast/getChannelInfo",
+ "handler": "getChannelInfo",
"body": "json",
"request": {
- "$ref": "#/$defs/TaskListMarkerRequestInput"
+ "$ref": "#/$defs/BroadcastChannelRequestInput"
},
"response": {
"anyOf": [
@@ -15382,24 +16425,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/BlockTransaction"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
+ "$ref": "#/$defs/BroadcastChannelData"
},
"msg": {
"type": "string"
@@ -15456,8 +16482,8 @@
},
{
"method": "POST",
- "path": "/api/bookmark/getBookmark",
- "handler": "getBookmark",
+ "path": "/api/broadcast/getChannels",
+ "handler": "getChannels",
"body": "none",
"request": {
"$ref": "#/$defs/EmptyRequestInput"
@@ -15474,24 +16500,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/Bookmark"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
+ "$ref": "#/$defs/BroadcastChannelsData"
},
"msg": {
"type": "string"
@@ -15548,11 +16557,11 @@
},
{
"method": "POST",
- "path": "/api/bookmark/removeBookmark",
- "handler": "removeBookmark",
+ "path": "/api/broadcast/postMessage",
+ "handler": "postMessage",
"body": "json",
"request": {
- "$ref": "#/$defs/RemoveBookmarkRequestInput"
+ "$ref": "#/$defs/BroadcastMessageRequestInput"
},
"response": {
"anyOf": [
@@ -15566,7 +16575,7 @@
]
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/BroadcastChannelData"
},
"msg": {
"type": "string"
@@ -15585,7 +16594,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ 1
]
},
"data": {
@@ -15623,11 +16633,25 @@
},
{
"method": "POST",
- "path": "/api/bookmark/renameBookmark",
- "handler": "renameBookmark",
- "body": "json",
+ "path": "/api/broadcast/publish",
+ "handler": "broadcastPublish",
+ "body": "multipart",
"request": {
- "$ref": "#/$defs/RenameBookmarkRequestInput"
+ "type": "object",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "string",
+ "format": "binary"
+ }
+ ]
+ }
+ }
},
"response": {
"anyOf": [
@@ -15641,7 +16665,7 @@
]
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/BroadcastPublishData"
},
"msg": {
"type": "string"
@@ -15660,7 +16684,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ 1
]
},
"data": {
@@ -15698,11 +16723,11 @@
},
{
"method": "POST",
- "path": "/api/broadcast/getChannelInfo",
- "handler": "getChannelInfo",
+ "path": "/api/clipboard/cleanupRichText",
+ "handler": "cleanupRichText",
"body": "json",
"request": {
- "$ref": "#/$defs/BroadcastChannelRequestInput"
+ "$ref": "#/$defs/CleanupRichTextRequestInput"
},
"response": {
"anyOf": [
@@ -15716,7 +16741,7 @@
]
},
"data": {
- "$ref": "#/$defs/BroadcastChannelData"
+ "type": "null"
},
"msg": {
"type": "string"
@@ -15773,11 +16798,11 @@
},
{
"method": "POST",
- "path": "/api/broadcast/getChannels",
- "handler": "getChannels",
- "body": "none",
+ "path": "/api/clipboard/prepareRichText",
+ "handler": "prepareRichText",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/PrepareRichTextRequestInput"
},
"response": {
"anyOf": [
@@ -15791,7 +16816,14 @@
]
},
"data": {
- "$ref": "#/$defs/BroadcastChannelsData"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/RichClipboardPrepared"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -15848,11 +16880,11 @@
},
{
"method": "POST",
- "path": "/api/broadcast/postMessage",
- "handler": "postMessage",
- "body": "json",
+ "path": "/api/clipboard/readFilePaths",
+ "handler": "readFilePaths",
+ "body": "none",
"request": {
- "$ref": "#/$defs/BroadcastMessageRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -15866,7 +16898,10 @@
]
},
"data": {
- "$ref": "#/$defs/BroadcastChannelData"
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ClipboardFile"
+ }
},
"msg": {
"type": "string"
@@ -15885,8 +16920,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- 1
+ -1
]
},
"data": {
@@ -15924,25 +16958,11 @@
},
{
"method": "POST",
- "path": "/api/broadcast/publish",
- "handler": "broadcastPublish",
- "body": "multipart",
+ "path": "/api/clipboard/writeFilePath",
+ "handler": "writeFilePath",
+ "body": "json",
"request": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "string",
- "format": "binary"
- }
- ]
- }
- }
+ "$ref": "#/$defs/ClipboardPathRequestInput"
},
"response": {
"anyOf": [
@@ -15956,7 +16976,7 @@
]
},
"data": {
- "$ref": "#/$defs/BroadcastPublishData"
+ "type": "null"
},
"msg": {
"type": "string"
@@ -15975,8 +16995,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- 1
+ -1
]
},
"data": {
@@ -16014,11 +17033,11 @@
},
{
"method": "POST",
- "path": "/api/clipboard/cleanupRichText",
- "handler": "cleanupRichText",
- "body": "json",
+ "path": "/api/cloud/getCloudSpace",
+ "handler": "getCloudSpace",
+ "body": "none",
"request": {
- "$ref": "#/$defs/CleanupRichTextRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -16032,7 +17051,7 @@
]
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/CloudSpaceData"
},
"msg": {
"type": "string"
@@ -16051,7 +17070,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ 1
]
},
"data": {
@@ -16089,11 +17109,11 @@
},
{
"method": "POST",
- "path": "/api/clipboard/prepareRichText",
- "handler": "prepareRichText",
+ "path": "/api/cloud/setCloudReminder",
+ "handler": "setCloudReminder",
"body": "json",
"request": {
- "$ref": "#/$defs/PrepareRichTextRequestInput"
+ "$ref": "#/$defs/CloudReminderRequestInput"
},
"response": {
"anyOf": [
@@ -16107,14 +17127,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/RichClipboardPrepared"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"msg": {
"type": "string"
@@ -16170,12 +17183,12 @@
}
},
{
- "method": "POST",
- "path": "/api/clipboard/readFilePaths",
- "handler": "readFilePaths",
- "body": "none",
+ "method": "POST",
+ "path": "/api/convert/pandoc",
+ "handler": "pandoc",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/PandocRequestInput"
},
"response": {
"anyOf": [
@@ -16189,10 +17202,7 @@
]
},
"data": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/ClipboardFile"
- }
+ "$ref": "#/$defs/PandocData"
},
"msg": {
"type": "string"
@@ -16249,11 +17259,11 @@
},
{
"method": "POST",
- "path": "/api/clipboard/writeFilePath",
- "handler": "writeFilePath",
+ "path": "/api/file/copyFile",
+ "handler": "copyFile",
"body": "json",
"request": {
- "$ref": "#/$defs/ClipboardPathRequestInput"
+ "$ref": "#/$defs/CopyFileRequestInput"
},
"response": {
"anyOf": [
@@ -16286,7 +17296,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ -2
]
},
"data": {
@@ -16324,36 +17335,17 @@
},
{
"method": "POST",
- "path": "/api/cloud/getCloudSpace",
- "handler": "getCloudSpace",
- "body": "none",
+ "path": "/api/file/getFile",
+ "handler": "getFile",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/FilePathRequestInput"
},
"response": {
"anyOf": [
{
- "type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- 0
- ]
- },
- "data": {
- "$ref": "#/$defs/CloudSpaceData"
- },
- "msg": {
- "type": "string"
- }
- },
- "required": [
- "code",
- "msg",
- "data"
- ],
- "additionalProperties": false
+ "type": "string",
+ "format": "binary"
},
{
"type": "object",
@@ -16362,7 +17354,12 @@
"type": "integer",
"enum": [
-1,
- 1
+ -3,
+ 403,
+ 404,
+ 409,
+ 500,
+ 503
]
},
"data": {
@@ -16396,15 +17393,17 @@
"additionalProperties": true
}
]
- }
+ },
+ "output": "binary",
+ "errorStatus": 202
},
{
"method": "POST",
- "path": "/api/cloud/setCloudReminder",
- "handler": "setCloudReminder",
+ "path": "/api/file/getUniqueFilename",
+ "handler": "getUniqueFilename",
"body": "json",
"request": {
- "$ref": "#/$defs/CloudReminderRequestInput"
+ "$ref": "#/$defs/FilePathRequestInput"
},
"response": {
"anyOf": [
@@ -16418,7 +17417,7 @@
]
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/FilePathData"
},
"msg": {
"type": "string"
@@ -16437,7 +17436,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ -3
]
},
"data": {
@@ -16475,11 +17475,11 @@
},
{
"method": "POST",
- "path": "/api/convert/pandoc",
- "handler": "pandoc",
+ "path": "/api/file/globalCopyFiles",
+ "handler": "globalCopyFiles",
"body": "json",
"request": {
- "$ref": "#/$defs/PandocRequestInput"
+ "$ref": "#/$defs/CopyFilesRequestInput"
},
"response": {
"anyOf": [
@@ -16493,7 +17493,7 @@
]
},
"data": {
- "$ref": "#/$defs/PandocData"
+ "type": "null"
},
"msg": {
"type": "string"
@@ -16512,7 +17512,10 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ -2,
+ -3,
+ 403
]
},
"data": {
@@ -16550,11 +17553,11 @@
},
{
"method": "POST",
- "path": "/api/file/copyFile",
- "handler": "copyFile",
- "body": "json",
+ "path": "/api/file/putFile",
+ "handler": "putFile",
+ "body": "form",
"request": {
- "$ref": "#/$defs/CopyFileRequestInput"
+ "$ref": "#/$defs/PutFileRequestInput"
},
"response": {
"anyOf": [
@@ -16588,7 +17591,10 @@
"type": "integer",
"enum": [
-1,
- -2
+ -3,
+ 400,
+ 403,
+ 500
]
},
"data": {
@@ -16626,17 +17632,39 @@
},
{
"method": "POST",
- "path": "/api/file/getFile",
- "handler": "getFile",
+ "path": "/api/file/readDir",
+ "handler": "readDir",
"body": "json",
"request": {
- "$ref": "#/$defs/FilePathRequestInput"
+ "$ref": "#/$defs/ReadDirectoryRequestInput"
},
"response": {
"anyOf": [
{
- "type": "string",
- "format": "binary"
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "enum": [
+ 0
+ ]
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/DirectoryEntry"
+ }
+ },
+ "msg": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "msg",
+ "data"
+ ],
+ "additionalProperties": false
},
{
"type": "object",
@@ -16649,8 +17677,7 @@
403,
404,
409,
- 500,
- 503
+ 500
]
},
"data": {
@@ -16684,17 +17711,15 @@
"additionalProperties": true
}
]
- },
- "output": "binary",
- "errorStatus": 202
+ }
},
{
"method": "POST",
- "path": "/api/file/getUniqueFilename",
- "handler": "getUniqueFilename",
+ "path": "/api/file/removeFile",
+ "handler": "removeFile",
"body": "json",
"request": {
- "$ref": "#/$defs/FilePathRequestInput"
+ "$ref": "#/$defs/RemoveFileRequestInput"
},
"response": {
"anyOf": [
@@ -16708,7 +17733,7 @@
]
},
"data": {
- "$ref": "#/$defs/FilePathData"
+ "type": "null"
},
"msg": {
"type": "string"
@@ -16728,7 +17753,10 @@
"type": "integer",
"enum": [
-1,
- -3
+ -3,
+ 403,
+ 404,
+ 500
]
},
"data": {
@@ -16766,11 +17794,11 @@
},
{
"method": "POST",
- "path": "/api/file/globalCopyFiles",
- "handler": "globalCopyFiles",
+ "path": "/api/file/renameFile",
+ "handler": "renameFile",
"body": "json",
"request": {
- "$ref": "#/$defs/CopyFilesRequestInput"
+ "$ref": "#/$defs/RenameFileRequestInput"
},
"response": {
"anyOf": [
@@ -16804,9 +17832,11 @@
"type": "integer",
"enum": [
-1,
- -2,
-3,
- 403
+ 403,
+ 404,
+ 409,
+ 500
]
},
"data": {
@@ -16844,11 +17874,11 @@
},
{
"method": "POST",
- "path": "/api/file/putFile",
- "handler": "putFile",
- "body": "form",
+ "path": "/api/file/workspaceCopyFiles",
+ "handler": "workspaceCopyFiles",
+ "body": "json",
"request": {
- "$ref": "#/$defs/PutFileRequestInput"
+ "$ref": "#/$defs/CopyFilesRequestInput"
},
"response": {
"anyOf": [
@@ -16882,10 +17912,9 @@
"type": "integer",
"enum": [
-1,
+ -2,
-3,
- 400,
- 403,
- 500
+ 403
]
},
"data": {
@@ -16923,11 +17952,11 @@
},
{
"method": "POST",
- "path": "/api/file/readDir",
- "handler": "readDir",
- "body": "json",
+ "path": "/api/filetree/getPinnedDocs",
+ "handler": "getPinnedDocs",
+ "body": "none",
"request": {
- "$ref": "#/$defs/ReadDirectoryRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -16943,7 +17972,7 @@
"data": {
"type": "array",
"items": {
- "$ref": "#/$defs/DirectoryEntry"
+ "$ref": "#/$defs/PinnedDoc"
}
},
"msg": {
@@ -16963,12 +17992,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- -3,
- 403,
- 404,
- 409,
- 500
+ -1
]
},
"data": {
@@ -17006,11 +18030,11 @@
},
{
"method": "POST",
- "path": "/api/file/removeFile",
- "handler": "removeFile",
+ "path": "/api/filetree/updatePinnedDocs",
+ "handler": "updatePinnedDocs",
"body": "json",
"request": {
- "$ref": "#/$defs/RemoveFileRequestInput"
+ "$ref": "#/$defs/UpdatePinnedDocsRequestInput"
},
"response": {
"anyOf": [
@@ -17043,11 +18067,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- -3,
- 403,
- 404,
- 500
+ -1
]
},
"data": {
@@ -17085,11 +18105,11 @@
},
{
"method": "POST",
- "path": "/api/file/renameFile",
- "handler": "renameFile",
+ "path": "/api/format/autoSpace",
+ "handler": "autoSpace",
"body": "json",
"request": {
- "$ref": "#/$defs/RenameFileRequestInput"
+ "$ref": "#/$defs/TrimmedIDRequestInput"
},
"response": {
"anyOf": [
@@ -17122,12 +18142,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- -3,
- 403,
- 404,
- 409,
- 500
+ -1
]
},
"data": {
@@ -17165,11 +18180,11 @@
},
{
"method": "POST",
- "path": "/api/file/workspaceCopyFiles",
- "handler": "workspaceCopyFiles",
+ "path": "/api/format/netAssets2LocalAssets",
+ "handler": "netAssets2LocalAssets",
"body": "json",
"request": {
- "$ref": "#/$defs/CopyFilesRequestInput"
+ "$ref": "#/$defs/TrimmedIDRequestInput"
},
"response": {
"anyOf": [
@@ -17202,10 +18217,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- -2,
- -3,
- 403
+ -1
]
},
"data": {
@@ -17243,11 +18255,11 @@
},
{
"method": "POST",
- "path": "/api/filetree/getPinnedDocs",
- "handler": "getPinnedDocs",
- "body": "none",
+ "path": "/api/format/netImg2LocalAssets",
+ "handler": "netImg2LocalAssets",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/NetImageAssetsRequestInput"
},
"response": {
"anyOf": [
@@ -17261,10 +18273,7 @@
]
},
"data": {
- "type": "array",
- "items": {
- "$ref": "#/$defs/PinnedDoc"
- }
+ "type": "null"
},
"msg": {
"type": "string"
@@ -17321,11 +18330,11 @@
},
{
"method": "POST",
- "path": "/api/filetree/updatePinnedDocs",
- "handler": "updatePinnedDocs",
+ "path": "/api/graph/getGraph",
+ "handler": "getGraph",
"body": "json",
"request": {
- "$ref": "#/$defs/UpdatePinnedDocsRequestInput"
+ "$ref": "#/$defs/GlobalGraphRequestInput"
},
"response": {
"anyOf": [
@@ -17339,7 +18348,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/GlobalGraphResult"
+ },
+ {
+ "$ref": "#/$defs/GraphCorrelation"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -17377,6 +18393,16 @@
},
{
"type": "null"
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/GlobalGraphResult"
+ },
+ {
+ "$ref": "#/$defs/GraphCorrelation"
+ }
+ ]
}
]
},
@@ -17396,11 +18422,11 @@
},
{
"method": "POST",
- "path": "/api/format/autoSpace",
- "handler": "autoSpace",
+ "path": "/api/graph/getLocalGraph",
+ "handler": "getLocalGraph",
"body": "json",
"request": {
- "$ref": "#/$defs/TrimmedIDRequestInput"
+ "$ref": "#/$defs/LocalGraphRequestInput"
},
"response": {
"anyOf": [
@@ -17414,7 +18440,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/LocalGraphResult"
+ },
+ {
+ "$ref": "#/$defs/GraphCorrelation"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -17452,6 +18485,16 @@
},
{
"type": "null"
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/LocalGraphResult"
+ },
+ {
+ "$ref": "#/$defs/GraphCorrelation"
+ }
+ ]
}
]
},
@@ -17471,11 +18514,11 @@
},
{
"method": "POST",
- "path": "/api/format/netAssets2LocalAssets",
- "handler": "netAssets2LocalAssets",
- "body": "json",
+ "path": "/api/graph/resetGraph",
+ "handler": "resetGraph",
+ "body": "none",
"request": {
- "$ref": "#/$defs/TrimmedIDRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -17489,7 +18532,7 @@
]
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/ResetGraphData"
},
"msg": {
"type": "string"
@@ -17546,11 +18589,11 @@
},
{
"method": "POST",
- "path": "/api/format/netImg2LocalAssets",
- "handler": "netImg2LocalAssets",
- "body": "json",
+ "path": "/api/graph/resetLocalGraph",
+ "handler": "resetLocalGraph",
+ "body": "none",
"request": {
- "$ref": "#/$defs/NetImageAssetsRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -17564,7 +18607,7 @@
]
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/ResetLocalGraphData"
},
"msg": {
"type": "string"
@@ -17621,11 +18664,11 @@
},
{
"method": "POST",
- "path": "/api/graph/getGraph",
- "handler": "getGraph",
+ "path": "/api/graph/setGraphConf",
+ "handler": "setGraphConf",
"body": "json",
"request": {
- "$ref": "#/$defs/GlobalGraphRequestInput"
+ "$ref": "#/$defs/SetGraphConfRequestInput"
},
"response": {
"anyOf": [
@@ -17641,10 +18684,10 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/GlobalGraphResult"
+ "$ref": "#/$defs/GlobalGraphConf"
},
{
- "$ref": "#/$defs/GraphCorrelation"
+ "$ref": "#/$defs/LocalGraphConf"
}
]
},
@@ -17684,16 +18727,6 @@
},
{
"type": "null"
- },
- {
- "anyOf": [
- {
- "$ref": "#/$defs/GlobalGraphResult"
- },
- {
- "$ref": "#/$defs/GraphCorrelation"
- }
- ]
}
]
},
@@ -17713,11 +18746,11 @@
},
{
"method": "POST",
- "path": "/api/graph/getLocalGraph",
- "handler": "getLocalGraph",
- "body": "json",
+ "path": "/api/history/clearWorkspaceHistory",
+ "handler": "clearWorkspaceHistory",
+ "body": "none",
"request": {
- "$ref": "#/$defs/LocalGraphRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -17731,14 +18764,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/LocalGraphResult"
- },
- {
- "$ref": "#/$defs/GraphCorrelation"
- }
- ]
+ "type": "null"
},
"msg": {
"type": "string"
@@ -17776,16 +18802,6 @@
},
{
"type": "null"
- },
- {
- "anyOf": [
- {
- "$ref": "#/$defs/LocalGraphResult"
- },
- {
- "$ref": "#/$defs/GraphCorrelation"
- }
- ]
}
]
},
@@ -17805,8 +18821,8 @@
},
{
"method": "POST",
- "path": "/api/graph/resetGraph",
- "handler": "resetGraph",
+ "path": "/api/history/reindexHistory",
+ "handler": "reindexHistory",
"body": "none",
"request": {
"$ref": "#/$defs/EmptyRequestInput"
@@ -17823,7 +18839,7 @@
]
},
"data": {
- "$ref": "#/$defs/ResetGraphData"
+ "type": "null"
},
"msg": {
"type": "string"
@@ -17880,11 +18896,11 @@
},
{
"method": "POST",
- "path": "/api/graph/resetLocalGraph",
- "handler": "resetLocalGraph",
- "body": "none",
+ "path": "/api/history/searchHistory",
+ "handler": "searchHistory",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/SearchHistoryRequestInput"
},
"response": {
"anyOf": [
@@ -17898,7 +18914,7 @@
]
},
"data": {
- "$ref": "#/$defs/ResetLocalGraphData"
+ "$ref": "#/$defs/SearchHistoryData"
},
"msg": {
"type": "string"
@@ -17955,11 +18971,11 @@
},
{
"method": "POST",
- "path": "/api/graph/setGraphConf",
- "handler": "setGraphConf",
+ "path": "/api/inbox/getShorthand",
+ "handler": "getShorthand",
"body": "json",
"request": {
- "$ref": "#/$defs/SetGraphConfRequestInput"
+ "$ref": "#/$defs/TrimmedIDRequestInput"
},
"response": {
"anyOf": [
@@ -17975,10 +18991,10 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/GlobalGraphConf"
+ "$ref": "#/$defs/Shorthand"
},
{
- "$ref": "#/$defs/LocalGraphConf"
+ "type": "null"
}
]
},
@@ -17999,7 +19015,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ 1
]
},
"data": {
@@ -18037,11 +19054,11 @@
},
{
"method": "POST",
- "path": "/api/history/clearWorkspaceHistory",
- "handler": "clearWorkspaceHistory",
- "body": "none",
+ "path": "/api/inbox/getShorthands",
+ "handler": "getShorthands",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/ShorthandsRequestInput"
},
"response": {
"anyOf": [
@@ -18055,7 +19072,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ShorthandsData"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -18074,7 +19098,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ 1
]
},
"data": {
@@ -18112,11 +19137,11 @@
},
{
"method": "POST",
- "path": "/api/history/reindexHistory",
- "handler": "reindexHistory",
- "body": "none",
+ "path": "/api/inbox/removeShorthands",
+ "handler": "removeShorthands",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/RemoveShorthandsRequestInput"
},
"response": {
"anyOf": [
@@ -18149,7 +19174,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ 1
]
},
"data": {
@@ -18187,11 +19213,11 @@
},
{
"method": "POST",
- "path": "/api/history/searchHistory",
- "handler": "searchHistory",
+ "path": "/api/lute/copyStdMarkdown",
+ "handler": "copyStdMarkdown",
"body": "json",
"request": {
- "$ref": "#/$defs/SearchHistoryRequestInput"
+ "$ref": "#/$defs/CopyStdMarkdownRequestInput"
},
"response": {
"anyOf": [
@@ -18205,7 +19231,7 @@
]
},
"data": {
- "$ref": "#/$defs/SearchHistoryData"
+ "type": "string"
},
"msg": {
"type": "string"
@@ -18262,11 +19288,11 @@
},
{
"method": "POST",
- "path": "/api/inbox/getShorthand",
- "handler": "getShorthand",
+ "path": "/api/lute/html2BlockDOM",
+ "handler": "html2BlockDOM",
"body": "json",
"request": {
- "$ref": "#/$defs/TrimmedIDRequestInput"
+ "$ref": "#/$defs/HTMLClipboardRequestInput"
},
"response": {
"anyOf": [
@@ -18282,10 +19308,10 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/Shorthand"
+ "type": "string"
},
{
- "type": "null"
+ "$ref": "#/$defs/HTMLClipboardPreflight"
}
]
},
@@ -18306,8 +19332,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- 1
+ -1
]
},
"data": {
@@ -18345,11 +19370,11 @@
},
{
"method": "POST",
- "path": "/api/inbox/getShorthands",
- "handler": "getShorthands",
+ "path": "/api/lute/md2html",
+ "handler": "md2HTML",
"body": "json",
"request": {
- "$ref": "#/$defs/ShorthandsRequestInput"
+ "$ref": "#/$defs/MarkdownHTMLRequestInput"
},
"response": {
"anyOf": [
@@ -18363,14 +19388,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/ShorthandsData"
- },
- {
- "type": "null"
- }
- ]
+ "$ref": "#/$defs/HTMLData"
},
"msg": {
"type": "string"
@@ -18389,8 +19407,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- 1
+ -1
]
},
"data": {
@@ -18428,11 +19445,11 @@
},
{
"method": "POST",
- "path": "/api/inbox/removeShorthands",
- "handler": "removeShorthands",
+ "path": "/api/lute/spinBlockDOM",
+ "handler": "spinBlockDOM",
"body": "json",
"request": {
- "$ref": "#/$defs/RemoveShorthandsRequestInput"
+ "$ref": "#/$defs/DOMTextRequestInput"
},
"response": {
"anyOf": [
@@ -18446,7 +19463,7 @@
]
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/DOMData"
},
"msg": {
"type": "string"
@@ -18466,7 +19483,7 @@
"type": "integer",
"enum": [
-1,
- 1
+ 413
]
},
"data": {
@@ -18504,11 +19521,11 @@
},
{
"method": "POST",
- "path": "/api/lute/copyStdMarkdown",
- "handler": "copyStdMarkdown",
+ "path": "/api/lute/wpsPresentation2BlockDOM",
+ "handler": "wpsPresentation2BlockDOM",
"body": "json",
"request": {
- "$ref": "#/$defs/CopyStdMarkdownRequestInput"
+ "$ref": "#/$defs/WPSPresentationRequestInput"
},
"response": {
"anyOf": [
@@ -18522,7 +19539,7 @@
]
},
"data": {
- "type": "string"
+ "$ref": "#/$defs/WPSPresentationData"
},
"msg": {
"type": "string"
@@ -18560,6 +19577,9 @@
},
{
"type": "null"
+ },
+ {
+ "$ref": "#/$defs/WPSPresentationData"
}
]
},
@@ -18579,11 +19599,11 @@
},
{
"method": "POST",
- "path": "/api/lute/html2BlockDOM",
- "handler": "html2BlockDOM",
+ "path": "/api/notebook/changeMasterPassword",
+ "handler": "changeMasterPassword",
"body": "json",
"request": {
- "$ref": "#/$defs/HTMLClipboardRequestInput"
+ "$ref": "#/$defs/ChangeMasterPasswordRequestInput"
},
"response": {
"anyOf": [
@@ -18597,14 +19617,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "$ref": "#/$defs/HTMLClipboardPreflight"
- }
- ]
+ "type": "null"
},
"msg": {
"type": "string"
@@ -18661,11 +19674,11 @@
},
{
"method": "POST",
- "path": "/api/lute/md2html",
- "handler": "md2HTML",
+ "path": "/api/notebook/changeSortNotebook",
+ "handler": "changeSortNotebook",
"body": "json",
"request": {
- "$ref": "#/$defs/MarkdownHTMLRequestInput"
+ "$ref": "#/$defs/ChangeSortNotebookRequestInput"
},
"response": {
"anyOf": [
@@ -18679,7 +19692,7 @@
]
},
"data": {
- "$ref": "#/$defs/HTMLData"
+ "type": "null"
},
"msg": {
"type": "string"
@@ -18736,11 +19749,11 @@
},
{
"method": "POST",
- "path": "/api/lute/spinBlockDOM",
- "handler": "spinBlockDOM",
+ "path": "/api/notebook/closeNotebook",
+ "handler": "closeNotebook",
"body": "json",
"request": {
- "$ref": "#/$defs/DOMTextRequestInput"
+ "$ref": "#/$defs/CloseNotebookRequestInput"
},
"response": {
"anyOf": [
@@ -18754,7 +19767,7 @@
]
},
"data": {
- "$ref": "#/$defs/DOMData"
+ "type": "null"
},
"msg": {
"type": "string"
@@ -18773,8 +19786,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- 413
+ -1
]
},
"data": {
@@ -18812,11 +19824,11 @@
},
{
"method": "POST",
- "path": "/api/lute/wpsPresentation2BlockDOM",
- "handler": "wpsPresentation2BlockDOM",
+ "path": "/api/notebook/createEncryptedNotebook",
+ "handler": "createEncryptedNotebook",
"body": "json",
"request": {
- "$ref": "#/$defs/WPSPresentationRequestInput"
+ "$ref": "#/$defs/CreateEncryptedNotebookRequestInput"
},
"response": {
"anyOf": [
@@ -18830,7 +19842,7 @@
]
},
"data": {
- "$ref": "#/$defs/WPSPresentationData"
+ "$ref": "#/$defs/CreateNotebookData"
},
"msg": {
"type": "string"
@@ -18868,9 +19880,6 @@
},
{
"type": "null"
- },
- {
- "$ref": "#/$defs/WPSPresentationData"
}
]
},
@@ -18890,11 +19899,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/changeMasterPassword",
- "handler": "changeMasterPassword",
+ "path": "/api/notebook/createNotebook",
+ "handler": "createNotebook",
"body": "json",
"request": {
- "$ref": "#/$defs/ChangeMasterPasswordRequestInput"
+ "$ref": "#/$defs/CreateNotebookRequestInput"
},
"response": {
"anyOf": [
@@ -18908,7 +19917,7 @@
]
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/CreateNotebookData"
},
"msg": {
"type": "string"
@@ -18965,11 +19974,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/changeSortNotebook",
- "handler": "changeSortNotebook",
- "body": "json",
+ "path": "/api/notebook/disableEncryptedNotebooks",
+ "handler": "disableEncryptedNotebooks",
+ "body": "none",
"request": {
- "$ref": "#/$defs/ChangeSortNotebookRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -19040,11 +20049,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/closeNotebook",
- "handler": "closeNotebook",
+ "path": "/api/notebook/enableEncryptedNotebooks",
+ "handler": "enableEncryptedNotebooks",
"body": "json",
"request": {
- "$ref": "#/$defs/CloseNotebookRequestInput"
+ "$ref": "#/$defs/NotebookPasswordRequestInput"
},
"response": {
"anyOf": [
@@ -19115,11 +20124,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/createEncryptedNotebook",
- "handler": "createEncryptedNotebook",
- "body": "json",
+ "path": "/api/notebook/exportNotebookCryptoBackup",
+ "handler": "exportNotebookCryptoBackup",
+ "body": "none",
"request": {
- "$ref": "#/$defs/CreateEncryptedNotebookRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -19133,7 +20142,7 @@
]
},
"data": {
- "$ref": "#/$defs/CreateNotebookData"
+ "$ref": "#/$defs/NotebookCryptoBackupData"
},
"msg": {
"type": "string"
@@ -19190,11 +20199,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/createNotebook",
- "handler": "createNotebook",
- "body": "json",
+ "path": "/api/notebook/getEncryptedNotebookStatus",
+ "handler": "getEncryptedNotebookStatus",
+ "body": "none",
"request": {
- "$ref": "#/$defs/CreateNotebookRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -19208,7 +20217,7 @@
]
},
"data": {
- "$ref": "#/$defs/CreateNotebookData"
+ "$ref": "#/$defs/EncryptedNotebookStatusData"
},
"msg": {
"type": "string"
@@ -19265,11 +20274,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/disableEncryptedNotebooks",
- "handler": "disableEncryptedNotebooks",
- "body": "none",
+ "path": "/api/notebook/getNotebookConf",
+ "handler": "getNotebookConf",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/CloseNotebookRequestInput"
},
"response": {
"anyOf": [
@@ -19283,7 +20292,7 @@
]
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/NotebookConfData"
},
"msg": {
"type": "string"
@@ -19340,11 +20349,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/enableEncryptedNotebooks",
- "handler": "enableEncryptedNotebooks",
+ "path": "/api/notebook/getNotebookInfo",
+ "handler": "getNotebookInfo",
"body": "json",
"request": {
- "$ref": "#/$defs/NotebookPasswordRequestInput"
+ "$ref": "#/$defs/NotebookIDRequestInput"
},
"response": {
"anyOf": [
@@ -19358,7 +20367,7 @@
]
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/NotebookInfoData"
},
"msg": {
"type": "string"
@@ -19415,11 +20424,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/exportNotebookCryptoBackup",
- "handler": "exportNotebookCryptoBackup",
- "body": "none",
+ "path": "/api/notebook/importNotebookCryptoBackup",
+ "handler": "importNotebookCryptoBackup",
+ "body": "multipart",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/ImportNotebookCryptoBackupRequestInput"
},
"response": {
"anyOf": [
@@ -19433,7 +20442,7 @@
]
},
"data": {
- "$ref": "#/$defs/NotebookCryptoBackupData"
+ "type": "null"
},
"msg": {
"type": "string"
@@ -19490,11 +20499,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/getEncryptedNotebookStatus",
- "handler": "getEncryptedNotebookStatus",
- "body": "none",
+ "path": "/api/notebook/lockNotebook",
+ "handler": "lockNotebook",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/NotebookIDRequestInput"
},
"response": {
"anyOf": [
@@ -19508,7 +20517,7 @@
]
},
"data": {
- "$ref": "#/$defs/EncryptedNotebookStatusData"
+ "type": "null"
},
"msg": {
"type": "string"
@@ -19565,11 +20574,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/getNotebookConf",
- "handler": "getNotebookConf",
- "body": "json",
+ "path": "/api/notebook/lsNotebooks",
+ "handler": "lsNotebooks",
+ "body": "legacyOptional",
"request": {
- "$ref": "#/$defs/CloseNotebookRequestInput"
+ "$ref": "#/$defs/ListNotebooksRequestInput"
},
"response": {
"anyOf": [
@@ -19583,7 +20592,14 @@
]
},
"data": {
- "$ref": "#/$defs/NotebookConfData"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ListNotebooksData"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -19640,11 +20656,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/getNotebookInfo",
- "handler": "getNotebookInfo",
+ "path": "/api/notebook/openNotebook",
+ "handler": "openNotebook",
"body": "json",
"request": {
- "$ref": "#/$defs/NotebookIDRequestInput"
+ "$ref": "#/$defs/OpenNotebookRequestInput"
},
"response": {
"anyOf": [
@@ -19658,7 +20674,7 @@
]
},
"data": {
- "$ref": "#/$defs/NotebookInfoData"
+ "type": "null"
},
"msg": {
"type": "string"
@@ -19715,11 +20731,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/importNotebookCryptoBackup",
- "handler": "importNotebookCryptoBackup",
- "body": "multipart",
+ "path": "/api/notebook/removeNotebook",
+ "handler": "removeNotebook",
+ "body": "json",
"request": {
- "$ref": "#/$defs/ImportNotebookCryptoBackupRequestInput"
+ "$ref": "#/$defs/NotebookIDRequestInput"
},
"response": {
"anyOf": [
@@ -19790,11 +20806,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/lockNotebook",
- "handler": "lockNotebook",
+ "path": "/api/notebook/renameNotebook",
+ "handler": "renameNotebook",
"body": "json",
"request": {
- "$ref": "#/$defs/NotebookIDRequestInput"
+ "$ref": "#/$defs/RenameNotebookRequestInput"
},
"response": {
"anyOf": [
@@ -19865,11 +20881,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/lsNotebooks",
- "handler": "lsNotebooks",
- "body": "legacyOptional",
+ "path": "/api/notebook/reorder",
+ "handler": "reorderNotebooks",
+ "body": "structJSON",
"request": {
- "$ref": "#/$defs/ListNotebooksRequestInput"
+ "$ref": "#/$defs/ReorderNotebooksRequestInput"
},
"response": {
"anyOf": [
@@ -19885,7 +20901,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/ListNotebooksData"
+ "$ref": "#/$defs/ReorderData"
},
{
"type": "null"
@@ -19928,6 +20944,16 @@
},
{
"type": "null"
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ReorderData"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
]
},
@@ -19947,11 +20973,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/openNotebook",
- "handler": "openNotebook",
+ "path": "/api/notebook/setNotebookConf",
+ "handler": "setNotebookConf",
"body": "json",
"request": {
- "$ref": "#/$defs/OpenNotebookRequestInput"
+ "$ref": "#/$defs/SetNotebookConfRequestInput"
},
"response": {
"anyOf": [
@@ -19965,7 +20991,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/NotebookConf"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -20022,11 +21055,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/removeNotebook",
- "handler": "removeNotebook",
+ "path": "/api/notebook/setNotebookCryptoAutoLock",
+ "handler": "setNotebookCryptoAutoLock",
"body": "json",
"request": {
- "$ref": "#/$defs/NotebookIDRequestInput"
+ "$ref": "#/$defs/NotebookCryptoAutoLockRequestInput"
},
"response": {
"anyOf": [
@@ -20097,11 +21130,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/renameNotebook",
- "handler": "renameNotebook",
+ "path": "/api/notebook/setNotebookIcon",
+ "handler": "setNotebookIcon",
"body": "json",
"request": {
- "$ref": "#/$defs/RenameNotebookRequestInput"
+ "$ref": "#/$defs/SetNotebookIconRequestInput"
},
"response": {
"anyOf": [
@@ -20172,11 +21205,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/reorder",
- "handler": "reorderNotebooks",
- "body": "structJSON",
+ "path": "/api/notebook/touchEncryptedNotebooks",
+ "handler": "touchEncryptedNotebooks",
+ "body": "none",
"request": {
- "$ref": "#/$defs/ReorderNotebooksRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -20190,14 +21223,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/ReorderData"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"msg": {
"type": "string"
@@ -20235,16 +21261,6 @@
},
{
"type": "null"
- },
- {
- "anyOf": [
- {
- "$ref": "#/$defs/ReorderData"
- },
- {
- "type": "null"
- }
- ]
}
]
},
@@ -20264,11 +21280,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/setNotebookConf",
- "handler": "setNotebookConf",
+ "path": "/api/notebook/unlockAndOpenNotebook",
+ "handler": "unlockAndOpenNotebook",
"body": "json",
"request": {
- "$ref": "#/$defs/SetNotebookConfRequestInput"
+ "$ref": "#/$defs/UnlockNotebookRequestInput"
},
"response": {
"anyOf": [
@@ -20282,14 +21298,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/NotebookConf"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"msg": {
"type": "string"
@@ -20346,11 +21355,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/setNotebookCryptoAutoLock",
- "handler": "setNotebookCryptoAutoLock",
+ "path": "/api/notebook/unlockNotebook",
+ "handler": "unlockNotebook",
"body": "json",
"request": {
- "$ref": "#/$defs/NotebookCryptoAutoLockRequestInput"
+ "$ref": "#/$defs/UnlockNotebookRequestInput"
},
"response": {
"anyOf": [
@@ -20421,11 +21430,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/setNotebookIcon",
- "handler": "setNotebookIcon",
+ "path": "/api/notification/pushErrMsg",
+ "handler": "pushErrMsg",
"body": "json",
"request": {
- "$ref": "#/$defs/SetNotebookIconRequestInput"
+ "$ref": "#/$defs/NotificationRequestInput"
},
"response": {
"anyOf": [
@@ -20439,7 +21448,7 @@
]
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/NotificationData"
},
"msg": {
"type": "string"
@@ -20496,11 +21505,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/touchEncryptedNotebooks",
- "handler": "touchEncryptedNotebooks",
- "body": "none",
+ "path": "/api/notification/pushMsg",
+ "handler": "pushMsg",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/NotificationRequestInput"
},
"response": {
"anyOf": [
@@ -20514,7 +21523,7 @@
]
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/NotificationData"
},
"msg": {
"type": "string"
@@ -20571,11 +21580,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/unlockAndOpenNotebook",
- "handler": "unlockAndOpenNotebook",
+ "path": "/api/outline/getDocHeadingNumbers",
+ "handler": "getDocHeadingNumbers",
"body": "json",
"request": {
- "$ref": "#/$defs/UnlockNotebookRequestInput"
+ "$ref": "#/$defs/HeadingNumbersRequestInput"
},
"response": {
"anyOf": [
@@ -20588,9 +21597,19 @@
0
]
},
- "data": {
- "type": "null"
- },
+ "data": {
+ "anyOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
"msg": {
"type": "string"
}
@@ -20608,7 +21627,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ 1
]
},
"data": {
@@ -20646,11 +21666,11 @@
},
{
"method": "POST",
- "path": "/api/notebook/unlockNotebook",
- "handler": "unlockNotebook",
+ "path": "/api/outline/getDocOutline",
+ "handler": "getDocOutline",
"body": "json",
"request": {
- "$ref": "#/$defs/UnlockNotebookRequestInput"
+ "$ref": "#/$defs/OutlineRequestInput"
},
"response": {
"anyOf": [
@@ -20664,7 +21684,24 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SearchPath"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -20683,7 +21720,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ 1
]
},
"data": {
@@ -20721,11 +21759,11 @@
},
{
"method": "POST",
- "path": "/api/notification/pushErrMsg",
- "handler": "pushErrMsg",
+ "path": "/api/petal/loadPetals",
+ "handler": "loadPetals",
"body": "json",
"request": {
- "$ref": "#/$defs/NotificationRequestInput"
+ "$ref": "#/$defs/LoadPetalsRequestInput"
},
"response": {
"anyOf": [
@@ -20739,7 +21777,24 @@
]
},
"data": {
- "$ref": "#/$defs/NotificationData"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Petal"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -20796,11 +21851,11 @@
},
{
"method": "POST",
- "path": "/api/notification/pushMsg",
- "handler": "pushMsg",
+ "path": "/api/petal/setPetalEnabled",
+ "handler": "setPetalEnabled",
"body": "json",
"request": {
- "$ref": "#/$defs/NotificationRequestInput"
+ "$ref": "#/$defs/SetPetalEnabledRequestInput"
},
"response": {
"anyOf": [
@@ -20814,7 +21869,14 @@
]
},
"data": {
- "$ref": "#/$defs/NotificationData"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Petal"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -20871,11 +21933,11 @@
},
{
"method": "POST",
- "path": "/api/outline/getDocHeadingNumbers",
- "handler": "getDocHeadingNumbers",
+ "path": "/api/petal/setPetalPublishEnabled",
+ "handler": "setPetalPublishEnabled",
"body": "json",
"request": {
- "$ref": "#/$defs/HeadingNumbersRequestInput"
+ "$ref": "#/$defs/SetPetalPublishEnabledRequestInput"
},
"response": {
"anyOf": [
@@ -20891,10 +21953,7 @@
"data": {
"anyOf": [
{
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
+ "$ref": "#/$defs/Petal"
},
{
"type": "null"
@@ -20918,8 +21977,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- 1
+ -1
]
},
"data": {
@@ -20957,11 +22015,11 @@
},
{
"method": "POST",
- "path": "/api/outline/getDocOutline",
- "handler": "getDocOutline",
+ "path": "/api/query/sql",
+ "handler": "SQL",
"body": "json",
"request": {
- "$ref": "#/$defs/OutlineRequestInput"
+ "$ref": "#/$defs/SQLQueryRequestInput"
},
"response": {
"anyOf": [
@@ -20975,33 +22033,50 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/SearchPath"
- },
- {
- "type": "null"
- }
- ]
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
}
- },
- {
- "type": "null"
- }
- ]
+ ]
+ }
+ },
+ "limit": {
+ "type": "integer"
},
"msg": {
"type": "string"
+ },
+ "truncated": {
+ "type": "boolean"
}
},
"required": [
"code",
"msg",
- "data"
+ "data",
+ "limit",
+ "truncated"
],
"additionalProperties": false
},
@@ -21050,11 +22125,11 @@
},
{
"method": "POST",
- "path": "/api/petal/loadPetals",
- "handler": "loadPetals",
+ "path": "/api/ref/getBacklink2",
+ "handler": "getBacklink2",
"body": "json",
"request": {
- "$ref": "#/$defs/LoadPetalsRequestInput"
+ "$ref": "#/$defs/BacklinkListRequestInput"
},
"response": {
"anyOf": [
@@ -21070,17 +22145,10 @@
"data": {
"anyOf": [
{
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/Petal"
- },
- {
- "type": "null"
- }
- ]
- }
+ "$ref": "#/$defs/BacklinkList"
+ },
+ {
+ "$ref": "#/$defs/BacklinkRefDefs"
},
{
"type": "null"
@@ -21104,7 +22172,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ 1
]
},
"data": {
@@ -21123,6 +22192,19 @@
},
{
"type": "null"
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BacklinkList"
+ },
+ {
+ "$ref": "#/$defs/BacklinkRefDefs"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
]
},
@@ -21142,11 +22224,11 @@
},
{
"method": "POST",
- "path": "/api/petal/setPetalEnabled",
- "handler": "setPetalEnabled",
+ "path": "/api/ref/getBacklinkDoc",
+ "handler": "getBacklinkDoc",
"body": "json",
"request": {
- "$ref": "#/$defs/SetPetalEnabledRequestInput"
+ "$ref": "#/$defs/BacklinkDocumentRequestInput"
},
"response": {
"anyOf": [
@@ -21160,14 +22242,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/Petal"
- },
- {
- "type": "null"
- }
- ]
+ "$ref": "#/$defs/BacklinkContextData"
},
"msg": {
"type": "string"
@@ -21186,7 +22261,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ 1
]
},
"data": {
@@ -21224,11 +22300,11 @@
},
{
"method": "POST",
- "path": "/api/petal/setPetalPublishEnabled",
- "handler": "setPetalPublishEnabled",
+ "path": "/api/ref/getBackmentionDoc",
+ "handler": "getBackmentionDoc",
"body": "json",
"request": {
- "$ref": "#/$defs/SetPetalPublishEnabledRequestInput"
+ "$ref": "#/$defs/BackmentionDocumentRequestInput"
},
"response": {
"anyOf": [
@@ -21242,14 +22318,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/Petal"
- },
- {
- "type": "null"
- }
- ]
+ "$ref": "#/$defs/BacklinkContextData"
},
"msg": {
"type": "string"
@@ -21268,7 +22337,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ 1
]
},
"data": {
@@ -21306,11 +22376,11 @@
},
{
"method": "POST",
- "path": "/api/query/sql",
- "handler": "SQL",
+ "path": "/api/ref/refreshBacklink",
+ "handler": "refreshBacklink",
"body": "json",
"request": {
- "$ref": "#/$defs/SQLQueryRequestInput"
+ "$ref": "#/$defs/RefreshBacklinkRequestInput"
},
"response": {
"anyOf": [
@@ -21324,50 +22394,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
},
@@ -21377,8 +22413,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- 1
+ -1
]
},
"data": {