@bitefoundry/onenote 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/API.md +4 -4
- package/docs/openapi.yaml +14 -5
- package/package.json +7 -7
package/docs/API.md
CHANGED
|
@@ -27,7 +27,7 @@ All OneNote endpoints are served under both `/v1/onenote/...` and the shorter `/
|
|
|
27
27
|
| --- | --- | --- |
|
|
28
28
|
| `GET` | `/health` | Health check (`{ ok, service, version }`) |
|
|
29
29
|
| `GET` | `/v1/whoami` | Signed-in Microsoft 365 user profile |
|
|
30
|
-
| `GET` | `/v1/onenote/notebooks` | List notebooks (`?include_teams=
|
|
30
|
+
| `GET` | `/v1/onenote/notebooks` | List notebooks (`?include_teams=false&refresh=false&offline=false`) |
|
|
31
31
|
| `POST` | `/v1/onenote/notebooks` | Create notebook (`{ name, group_id?, site_id? }`) |
|
|
32
32
|
| `GET` | `/v1/onenote/sections` | List sections (`?notebook=...&refresh=false&offline=false`) |
|
|
33
33
|
| `POST` | `/v1/onenote/sections` | Create section (`{ notebook, name }`) |
|
|
@@ -36,10 +36,10 @@ All OneNote endpoints are served under both `/v1/onenote/...` and the shorter `/
|
|
|
36
36
|
| `GET` | `/v1/onenote/pages/{page}` | Get structured page detail (`?section=...&refresh=false&offline=false`) |
|
|
37
37
|
| `PATCH` | `/v1/onenote/pages/{page}` | Update block or page (`{ block_id?, title?, markdown?, section? }`) |
|
|
38
38
|
| `DELETE` | `/v1/onenote/pages/{page}` | Delete page (`?section=...`) |
|
|
39
|
-
| `POST` | `/v1/onenote/pages/{page}/append` | Append Markdown/images (`{ markdown, images?, section? }`) |
|
|
40
|
-
| `POST` | `/v1/onenote/pages/{page}/todo` |
|
|
39
|
+
| `POST` | `/v1/onenote/pages/{page}/append` | Append Markdown/images (`{ markdown, images? \| image_paths?, section? }`) |
|
|
40
|
+
| `POST` | `/v1/onenote/pages/{page}/todo` | Set or toggle checkbox (`{ block_id?, index?, completed?, expected_content?, force?, section? }`; alias: `/pages/{page}/toggle-todo`) |
|
|
41
41
|
| `GET` | `/v1/onenote/search` | Search local FTS5 cache (`?q=...§ion=...&limit=20&refresh=false`) |
|
|
42
|
-
| `POST` | `/v1/onenote/resources/download` | Download embedded resource (`{ page, index?, url?, out?, section? }`) |
|
|
42
|
+
| `POST` | `/v1/onenote/resources/download` | Download embedded resource (`{ page, index?, url?, out? \| out_dir?, section? }`; alias: `/pages/{page}/resources/download`) |
|
|
43
43
|
|
|
44
44
|
### Resource Download Response
|
|
45
45
|
|
package/docs/openapi.yaml
CHANGED
|
@@ -46,7 +46,7 @@ paths:
|
|
|
46
46
|
parameters:
|
|
47
47
|
- name: include_teams
|
|
48
48
|
in: query
|
|
49
|
-
schema: { type: boolean, default:
|
|
49
|
+
schema: { type: boolean, default: false }
|
|
50
50
|
- name: refresh
|
|
51
51
|
in: query
|
|
52
52
|
schema: { type: boolean, default: false }
|
|
@@ -237,13 +237,19 @@ paths:
|
|
|
237
237
|
images:
|
|
238
238
|
type: array
|
|
239
239
|
items: { type: string }
|
|
240
|
+
description: Alias of `image_paths` (do not send both keys in the same request).
|
|
241
|
+
image_paths:
|
|
242
|
+
type: array
|
|
243
|
+
items: { type: string }
|
|
240
244
|
section: { type: string }
|
|
241
245
|
responses:
|
|
242
246
|
'200':
|
|
243
247
|
description: Updated page detail
|
|
248
|
+
'400':
|
|
249
|
+
description: Invalid input, including specifying both `images` and `image_paths`
|
|
244
250
|
/v1/onenote/pages/{page}/todo:
|
|
245
251
|
post:
|
|
246
|
-
summary:
|
|
252
|
+
summary: Set or toggle a OneNote checkbox on a block (also served at `/pages/{page}/toggle-todo`)
|
|
247
253
|
security:
|
|
248
254
|
- bearerAuth: []
|
|
249
255
|
parameters:
|
|
@@ -257,10 +263,12 @@ paths:
|
|
|
257
263
|
application/json:
|
|
258
264
|
schema:
|
|
259
265
|
type: object
|
|
260
|
-
required: [block_id]
|
|
261
266
|
properties:
|
|
262
267
|
block_id: { type: string }
|
|
268
|
+
index: { type: integer, minimum: 0 }
|
|
263
269
|
completed: { type: boolean }
|
|
270
|
+
expected_content: { type: string }
|
|
271
|
+
force: { type: boolean, default: false }
|
|
264
272
|
section: { type: string }
|
|
265
273
|
responses:
|
|
266
274
|
'200':
|
|
@@ -289,7 +297,7 @@ paths:
|
|
|
289
297
|
description: Search hits
|
|
290
298
|
/v1/onenote/resources/download:
|
|
291
299
|
post:
|
|
292
|
-
summary: Download an embedded OneNote image or file attachment
|
|
300
|
+
summary: Download an embedded OneNote image or file attachment (also served at `/pages/{page}/resources/download`)
|
|
293
301
|
security:
|
|
294
302
|
- bearerAuth: []
|
|
295
303
|
requestBody:
|
|
@@ -301,9 +309,10 @@ paths:
|
|
|
301
309
|
required: [page]
|
|
302
310
|
properties:
|
|
303
311
|
page: { type: string }
|
|
304
|
-
index: { type: integer }
|
|
312
|
+
index: { type: integer, minimum: 0 }
|
|
305
313
|
url: { type: string }
|
|
306
314
|
out: { type: string }
|
|
315
|
+
out_dir: { type: string }
|
|
307
316
|
section: { type: string }
|
|
308
317
|
responses:
|
|
309
318
|
'200':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitefoundry/onenote",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Microsoft OneNote terminal client & AI agent toolkit — Notebooks, Sections, Pages, XHTML/Markdown & Resources (CLI, TUI, HTTP API, MCP)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"build:npm": "node scripts/build-npm.mjs"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@bitefoundry/onenote-win32-x64": "0.2.
|
|
44
|
-
"@bitefoundry/onenote-win32-arm64": "0.2.
|
|
45
|
-
"@bitefoundry/onenote-darwin-x64": "0.2.
|
|
46
|
-
"@bitefoundry/onenote-darwin-arm64": "0.2.
|
|
47
|
-
"@bitefoundry/onenote-linux-x64": "0.2.
|
|
48
|
-
"@bitefoundry/onenote-linux-arm64": "0.2.
|
|
43
|
+
"@bitefoundry/onenote-win32-x64": "0.2.2",
|
|
44
|
+
"@bitefoundry/onenote-win32-arm64": "0.2.2",
|
|
45
|
+
"@bitefoundry/onenote-darwin-x64": "0.2.2",
|
|
46
|
+
"@bitefoundry/onenote-darwin-arm64": "0.2.2",
|
|
47
|
+
"@bitefoundry/onenote-linux-x64": "0.2.2",
|
|
48
|
+
"@bitefoundry/onenote-linux-arm64": "0.2.2"
|
|
49
49
|
}
|
|
50
50
|
}
|