mnapis

原生图片挖空

给已存在图片/PDF 摘录笔记增/替原生遮罩(highlight_pic.maskRects)。Body {coordinateSpace:normalized, operation:add|replace, masks:[{rect:{x,y,w,h},group?,flags?,isText?}](1..200), expectedSourceFingerprint, confirm?, expectedMaskFingerprint?}。须先读 batch-get,用 occlusionBaseContentPath 底图出候选并预览。真 dry-run(422 CONFIRM_REQUIRED + sourceFingerprint/maskFingerprint/映射数/旧复习卡警告);指纹变了 409 IMAGE_SOURCE_CHANGED/OCCLUSION_CHANGED。persisted:true 才成功;已有复习卡为快照,不自动改写。

POST
/notes/{id}/image-occlusions

给已存在图片/PDF 摘录笔记增/替原生遮罩(highlight_pic.maskRects)。Body {coordinateSpace:normalized, operation:add|replace, masks:{rect:{x,y,w,h},group?,flags?,isText?}, expectedSourceFingerprint, confirm?, expectedMaskFingerprint?}。须先读 batch-get,用 occlusionBaseContentPath 底图出候选并预览。真 dry-run(422 CONFIRM_REQUIRED + sourceFingerprint/maskFingerprint/映射数/旧复习卡警告);指纹变了 409 IMAGE_SOURCE_CHANGED/OCCLUSION_CHANGED。persisted:true 才成功;已有复习卡为快照,不自动改写。

Authorization

bearerAuth
AuthorizationBearer <token>

安装脚本写入 ~/.config/mn-bridge/token,或环境变量 MN_BRIDGE_TOKEN。不要带 Origin 头。

In: header

Path Parameters

id*string

图片/PDF 摘录笔记 noteid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/notes/string/image-occlusions" \  -H "Content-Type: application/json" \  -d '{    "masks": [      {}    ],    "expectedSourceFingerprint": "string"  }'
Empty