@bitefoundry/notion 0.3.0 → 0.4.0
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/LICENSE +21 -21
- package/README.md +152 -141
- package/docs/API.md +37 -35
- package/docs/MCP.md +120 -113
- package/docs/NPM.md +21 -21
- package/docs/openapi.yaml +185 -185
- package/package.json +50 -50
- package/scripts/postinstall.mjs +266 -266
package/docs/openapi.yaml
CHANGED
|
@@ -1,185 +1,185 @@
|
|
|
1
|
-
openapi: 3.1.0
|
|
2
|
-
info:
|
|
3
|
-
title: "@bitefoundry/notion Local HTTP API"
|
|
4
|
-
version: 0.1.0
|
|
5
|
-
description: Local HTTP JSON API exposed by `notion serve` (default `127.0.0.1:8791`).
|
|
6
|
-
servers:
|
|
7
|
-
- url: http://127.0.0.1:8791
|
|
8
|
-
paths:
|
|
9
|
-
/health:
|
|
10
|
-
get:
|
|
11
|
-
summary: Health check
|
|
12
|
-
responses:
|
|
13
|
-
"200":
|
|
14
|
-
description: Service status
|
|
15
|
-
/api/v1/whoami:
|
|
16
|
-
get:
|
|
17
|
-
summary: Current authenticated Notion bot/user & active workspace
|
|
18
|
-
responses:
|
|
19
|
-
"200":
|
|
20
|
-
description: User and workspace metadata
|
|
21
|
-
/api/v1/workspaces:
|
|
22
|
-
get:
|
|
23
|
-
summary: List configured Notion workspace profiles
|
|
24
|
-
responses:
|
|
25
|
-
"200":
|
|
26
|
-
description: Workspace profile registry
|
|
27
|
-
/api/v1/search:
|
|
28
|
-
get:
|
|
29
|
-
summary: Search Notion pages and databases (SQLite FTS5 + Korean <3 char LIKE or remote)
|
|
30
|
-
parameters:
|
|
31
|
-
- name: q
|
|
32
|
-
in: query
|
|
33
|
-
required: true
|
|
34
|
-
schema: { type: string }
|
|
35
|
-
- name: remote
|
|
36
|
-
in: query
|
|
37
|
-
schema: { type: boolean, default: false }
|
|
38
|
-
- name: offline
|
|
39
|
-
in: query
|
|
40
|
-
schema: { type: boolean, default: false }
|
|
41
|
-
- name: limit
|
|
42
|
-
in: query
|
|
43
|
-
schema: { type: integer, default: 50 }
|
|
44
|
-
responses:
|
|
45
|
-
"200":
|
|
46
|
-
description: Search hits
|
|
47
|
-
/api/v1/pages:
|
|
48
|
-
get:
|
|
49
|
-
summary: List workspace pages
|
|
50
|
-
responses:
|
|
51
|
-
"200":
|
|
52
|
-
description: Page list
|
|
53
|
-
post:
|
|
54
|
-
summary: Create a Notion page
|
|
55
|
-
responses:
|
|
56
|
-
"200":
|
|
57
|
-
description: Created page
|
|
58
|
-
/api/v1/pages/{id}:
|
|
59
|
-
get:
|
|
60
|
-
summary: Get full Notion page detail (metadata, blocks, comments, markdown, media, incomplete_blocks, comments_has_more)
|
|
61
|
-
parameters:
|
|
62
|
-
- name: id
|
|
63
|
-
in: path
|
|
64
|
-
required: true
|
|
65
|
-
schema: { type: string }
|
|
66
|
-
- name: offline
|
|
67
|
-
in: query
|
|
68
|
-
schema: { type: boolean, default: false }
|
|
69
|
-
description: Read only from the local offline cache.
|
|
70
|
-
responses:
|
|
71
|
-
"200":
|
|
72
|
-
description: Page detail
|
|
73
|
-
"404":
|
|
74
|
-
description: Page not found or page body unavailable in the offline cache
|
|
75
|
-
patch:
|
|
76
|
-
summary: Update page metadata, properties, or archive state
|
|
77
|
-
parameters:
|
|
78
|
-
- name: id
|
|
79
|
-
in: path
|
|
80
|
-
required: true
|
|
81
|
-
schema: { type: string }
|
|
82
|
-
responses:
|
|
83
|
-
"200":
|
|
84
|
-
description: Updated page
|
|
85
|
-
/api/v1/pages/{id}/blocks:
|
|
86
|
-
get:
|
|
87
|
-
summary: Get recursive children of a page or block
|
|
88
|
-
parameters:
|
|
89
|
-
- name: id
|
|
90
|
-
in: path
|
|
91
|
-
required: true
|
|
92
|
-
schema: { type: string }
|
|
93
|
-
- name: offline
|
|
94
|
-
in: query
|
|
95
|
-
schema: { type: boolean, default: false }
|
|
96
|
-
description: Use locally cached children.
|
|
97
|
-
responses:
|
|
98
|
-
"200":
|
|
99
|
-
description: Block tree, including a verified empty list
|
|
100
|
-
"404":
|
|
101
|
-
description: Resource not found or children unavailable in the offline cache
|
|
102
|
-
post:
|
|
103
|
-
summary: Append Markdown or slash-style blocks to a page
|
|
104
|
-
parameters:
|
|
105
|
-
- name: id
|
|
106
|
-
in: path
|
|
107
|
-
required: true
|
|
108
|
-
schema: { type: string }
|
|
109
|
-
responses:
|
|
110
|
-
"200":
|
|
111
|
-
description: Appended blocks
|
|
112
|
-
/api/v1/blocks/{id}:
|
|
113
|
-
patch:
|
|
114
|
-
summary: Update block text or toggle to_do checkbox
|
|
115
|
-
parameters:
|
|
116
|
-
- name: id
|
|
117
|
-
in: path
|
|
118
|
-
required: true
|
|
119
|
-
schema: { type: string }
|
|
120
|
-
responses:
|
|
121
|
-
"200":
|
|
122
|
-
description: Updated block
|
|
123
|
-
/api/v1/databases:
|
|
124
|
-
get:
|
|
125
|
-
summary: List Notion databases
|
|
126
|
-
responses:
|
|
127
|
-
"200":
|
|
128
|
-
description: Database list
|
|
129
|
-
/api/v1/databases/{id}/query:
|
|
130
|
-
post:
|
|
131
|
-
summary: Query database rows
|
|
132
|
-
parameters:
|
|
133
|
-
- name: id
|
|
134
|
-
in: path
|
|
135
|
-
required: true
|
|
136
|
-
schema: { type: string }
|
|
137
|
-
responses:
|
|
138
|
-
"200":
|
|
139
|
-
description: Database rows
|
|
140
|
-
"400":
|
|
141
|
-
description: Invalid offline query (filter or sorts combined with offline=true) or invalid limit
|
|
142
|
-
/api/v1/databases/{id}/items:
|
|
143
|
-
post:
|
|
144
|
-
summary: Create a new database item row
|
|
145
|
-
parameters:
|
|
146
|
-
- name: id
|
|
147
|
-
in: path
|
|
148
|
-
required: true
|
|
149
|
-
schema: { type: string }
|
|
150
|
-
responses:
|
|
151
|
-
"200":
|
|
152
|
-
description: Created item
|
|
153
|
-
/api/v1/pages/{id}/comments:
|
|
154
|
-
get:
|
|
155
|
-
summary: List comments on a page
|
|
156
|
-
parameters:
|
|
157
|
-
- name: id
|
|
158
|
-
in: path
|
|
159
|
-
required: true
|
|
160
|
-
schema: { type: string }
|
|
161
|
-
- name: offline
|
|
162
|
-
in: query
|
|
163
|
-
schema: { type: boolean, default: false }
|
|
164
|
-
description: Read only from the local offline cache.
|
|
165
|
-
responses:
|
|
166
|
-
"200":
|
|
167
|
-
description: Comments list
|
|
168
|
-
"404":
|
|
169
|
-
description: Page not found or comments unavailable in the offline cache
|
|
170
|
-
post:
|
|
171
|
-
summary: Add a comment or discussion reply
|
|
172
|
-
parameters:
|
|
173
|
-
- name: id
|
|
174
|
-
in: path
|
|
175
|
-
required: true
|
|
176
|
-
schema: { type: string }
|
|
177
|
-
responses:
|
|
178
|
-
"200":
|
|
179
|
-
description: Created comment
|
|
180
|
-
/api/v1/sync:
|
|
181
|
-
post:
|
|
182
|
-
summary: Trigger immediate workspace sync into SQLite WAL + FTS5
|
|
183
|
-
responses:
|
|
184
|
-
"200":
|
|
185
|
-
description: Sync summary
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
info:
|
|
3
|
+
title: "@bitefoundry/notion Local HTTP API"
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
description: Local HTTP JSON API exposed by `notion serve` (default `127.0.0.1:8791`).
|
|
6
|
+
servers:
|
|
7
|
+
- url: http://127.0.0.1:8791
|
|
8
|
+
paths:
|
|
9
|
+
/health:
|
|
10
|
+
get:
|
|
11
|
+
summary: Health check
|
|
12
|
+
responses:
|
|
13
|
+
"200":
|
|
14
|
+
description: Service status
|
|
15
|
+
/api/v1/whoami:
|
|
16
|
+
get:
|
|
17
|
+
summary: Current authenticated Notion bot/user & active workspace
|
|
18
|
+
responses:
|
|
19
|
+
"200":
|
|
20
|
+
description: User and workspace metadata
|
|
21
|
+
/api/v1/workspaces:
|
|
22
|
+
get:
|
|
23
|
+
summary: List configured Notion workspace profiles
|
|
24
|
+
responses:
|
|
25
|
+
"200":
|
|
26
|
+
description: Workspace profile registry
|
|
27
|
+
/api/v1/search:
|
|
28
|
+
get:
|
|
29
|
+
summary: Search Notion pages and databases (SQLite FTS5 + Korean <3 char LIKE or remote)
|
|
30
|
+
parameters:
|
|
31
|
+
- name: q
|
|
32
|
+
in: query
|
|
33
|
+
required: true
|
|
34
|
+
schema: { type: string }
|
|
35
|
+
- name: remote
|
|
36
|
+
in: query
|
|
37
|
+
schema: { type: boolean, default: false }
|
|
38
|
+
- name: offline
|
|
39
|
+
in: query
|
|
40
|
+
schema: { type: boolean, default: false }
|
|
41
|
+
- name: limit
|
|
42
|
+
in: query
|
|
43
|
+
schema: { type: integer, default: 50 }
|
|
44
|
+
responses:
|
|
45
|
+
"200":
|
|
46
|
+
description: Search hits
|
|
47
|
+
/api/v1/pages:
|
|
48
|
+
get:
|
|
49
|
+
summary: List workspace pages
|
|
50
|
+
responses:
|
|
51
|
+
"200":
|
|
52
|
+
description: Page list
|
|
53
|
+
post:
|
|
54
|
+
summary: Create a Notion page
|
|
55
|
+
responses:
|
|
56
|
+
"200":
|
|
57
|
+
description: Created page
|
|
58
|
+
/api/v1/pages/{id}:
|
|
59
|
+
get:
|
|
60
|
+
summary: Get full Notion page detail (metadata, blocks, comments, markdown, media, incomplete_blocks, comments_has_more)
|
|
61
|
+
parameters:
|
|
62
|
+
- name: id
|
|
63
|
+
in: path
|
|
64
|
+
required: true
|
|
65
|
+
schema: { type: string }
|
|
66
|
+
- name: offline
|
|
67
|
+
in: query
|
|
68
|
+
schema: { type: boolean, default: false }
|
|
69
|
+
description: Read only from the local offline cache.
|
|
70
|
+
responses:
|
|
71
|
+
"200":
|
|
72
|
+
description: Page detail
|
|
73
|
+
"404":
|
|
74
|
+
description: Page not found or page body unavailable in the offline cache
|
|
75
|
+
patch:
|
|
76
|
+
summary: Update page metadata, properties, or archive state
|
|
77
|
+
parameters:
|
|
78
|
+
- name: id
|
|
79
|
+
in: path
|
|
80
|
+
required: true
|
|
81
|
+
schema: { type: string }
|
|
82
|
+
responses:
|
|
83
|
+
"200":
|
|
84
|
+
description: Updated page
|
|
85
|
+
/api/v1/pages/{id}/blocks:
|
|
86
|
+
get:
|
|
87
|
+
summary: Get recursive children of a page or block
|
|
88
|
+
parameters:
|
|
89
|
+
- name: id
|
|
90
|
+
in: path
|
|
91
|
+
required: true
|
|
92
|
+
schema: { type: string }
|
|
93
|
+
- name: offline
|
|
94
|
+
in: query
|
|
95
|
+
schema: { type: boolean, default: false }
|
|
96
|
+
description: Use locally cached children.
|
|
97
|
+
responses:
|
|
98
|
+
"200":
|
|
99
|
+
description: Block tree, including a verified empty list
|
|
100
|
+
"404":
|
|
101
|
+
description: Resource not found or children unavailable in the offline cache
|
|
102
|
+
post:
|
|
103
|
+
summary: Append Markdown or slash-style blocks to a page
|
|
104
|
+
parameters:
|
|
105
|
+
- name: id
|
|
106
|
+
in: path
|
|
107
|
+
required: true
|
|
108
|
+
schema: { type: string }
|
|
109
|
+
responses:
|
|
110
|
+
"200":
|
|
111
|
+
description: Appended blocks
|
|
112
|
+
/api/v1/blocks/{id}:
|
|
113
|
+
patch:
|
|
114
|
+
summary: Update block text or toggle to_do checkbox
|
|
115
|
+
parameters:
|
|
116
|
+
- name: id
|
|
117
|
+
in: path
|
|
118
|
+
required: true
|
|
119
|
+
schema: { type: string }
|
|
120
|
+
responses:
|
|
121
|
+
"200":
|
|
122
|
+
description: Updated block
|
|
123
|
+
/api/v1/databases:
|
|
124
|
+
get:
|
|
125
|
+
summary: List Notion databases
|
|
126
|
+
responses:
|
|
127
|
+
"200":
|
|
128
|
+
description: Database list
|
|
129
|
+
/api/v1/databases/{id}/query:
|
|
130
|
+
post:
|
|
131
|
+
summary: Query database rows
|
|
132
|
+
parameters:
|
|
133
|
+
- name: id
|
|
134
|
+
in: path
|
|
135
|
+
required: true
|
|
136
|
+
schema: { type: string }
|
|
137
|
+
responses:
|
|
138
|
+
"200":
|
|
139
|
+
description: Database rows
|
|
140
|
+
"400":
|
|
141
|
+
description: Invalid offline query (filter or sorts combined with offline=true) or invalid limit
|
|
142
|
+
/api/v1/databases/{id}/items:
|
|
143
|
+
post:
|
|
144
|
+
summary: Create a new database item row
|
|
145
|
+
parameters:
|
|
146
|
+
- name: id
|
|
147
|
+
in: path
|
|
148
|
+
required: true
|
|
149
|
+
schema: { type: string }
|
|
150
|
+
responses:
|
|
151
|
+
"200":
|
|
152
|
+
description: Created item
|
|
153
|
+
/api/v1/pages/{id}/comments:
|
|
154
|
+
get:
|
|
155
|
+
summary: List comments on a page
|
|
156
|
+
parameters:
|
|
157
|
+
- name: id
|
|
158
|
+
in: path
|
|
159
|
+
required: true
|
|
160
|
+
schema: { type: string }
|
|
161
|
+
- name: offline
|
|
162
|
+
in: query
|
|
163
|
+
schema: { type: boolean, default: false }
|
|
164
|
+
description: Read only from the local offline cache.
|
|
165
|
+
responses:
|
|
166
|
+
"200":
|
|
167
|
+
description: Comments list
|
|
168
|
+
"404":
|
|
169
|
+
description: Page not found or comments unavailable in the offline cache
|
|
170
|
+
post:
|
|
171
|
+
summary: Add a comment or discussion reply
|
|
172
|
+
parameters:
|
|
173
|
+
- name: id
|
|
174
|
+
in: path
|
|
175
|
+
required: true
|
|
176
|
+
schema: { type: string }
|
|
177
|
+
responses:
|
|
178
|
+
"200":
|
|
179
|
+
description: Created comment
|
|
180
|
+
/api/v1/sync:
|
|
181
|
+
post:
|
|
182
|
+
summary: Trigger immediate workspace sync into SQLite WAL + FTS5
|
|
183
|
+
responses:
|
|
184
|
+
"200":
|
|
185
|
+
description: Sync summary
|
package/package.json
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bitefoundry/notion",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Notion terminal client & AI agent toolkit — Pages, Blocks, Databases (Table/Board/List), Comments & Multi-Workspace (CLI, TUI, HTTP API, MCP)",
|
|
5
|
-
"repository": {
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/BiteFoundry/notion.git"
|
|
8
|
-
},
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"bin": {
|
|
11
|
-
"notion": "bin/notion.js"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"bin/notion.js",
|
|
15
|
-
"scripts/postinstall.mjs",
|
|
16
|
-
"docs/NPM.md",
|
|
17
|
-
"docs/API.md",
|
|
18
|
-
"docs/MCP.md",
|
|
19
|
-
"docs/openapi.yaml",
|
|
20
|
-
"README.md"
|
|
21
|
-
],
|
|
22
|
-
"engines": {
|
|
23
|
-
"node": ">=18"
|
|
24
|
-
},
|
|
25
|
-
"keywords": [
|
|
26
|
-
"notion",
|
|
27
|
-
"notion-cli",
|
|
28
|
-
"notion-tui",
|
|
29
|
-
"knowledge-base",
|
|
30
|
-
"kanban",
|
|
31
|
-
"database",
|
|
32
|
-
"markdown",
|
|
33
|
-
"cli",
|
|
34
|
-
"tui",
|
|
35
|
-
"mcp"
|
|
36
|
-
],
|
|
37
|
-
"scripts": {
|
|
38
|
-
"postinstall": "node scripts/postinstall.mjs",
|
|
39
|
-
"sync-version": "node scripts/sync-version.mjs",
|
|
40
|
-
"build:npm": "node scripts/build-npm.mjs"
|
|
41
|
-
},
|
|
42
|
-
"optionalDependencies": {
|
|
43
|
-
"@bitefoundry/notion-win32-x64": "0.
|
|
44
|
-
"@bitefoundry/notion-win32-arm64": "0.
|
|
45
|
-
"@bitefoundry/notion-darwin-x64": "0.
|
|
46
|
-
"@bitefoundry/notion-darwin-arm64": "0.
|
|
47
|
-
"@bitefoundry/notion-linux-x64": "0.
|
|
48
|
-
"@bitefoundry/notion-linux-arm64": "0.
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@bitefoundry/notion",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Notion terminal client & AI agent toolkit — Pages, Blocks, Databases (Table/Board/List), Comments & Multi-Workspace (CLI, TUI, HTTP API, MCP)",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/BiteFoundry/notion.git"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"bin": {
|
|
11
|
+
"notion": "bin/notion.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"bin/notion.js",
|
|
15
|
+
"scripts/postinstall.mjs",
|
|
16
|
+
"docs/NPM.md",
|
|
17
|
+
"docs/API.md",
|
|
18
|
+
"docs/MCP.md",
|
|
19
|
+
"docs/openapi.yaml",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=18"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"notion",
|
|
27
|
+
"notion-cli",
|
|
28
|
+
"notion-tui",
|
|
29
|
+
"knowledge-base",
|
|
30
|
+
"kanban",
|
|
31
|
+
"database",
|
|
32
|
+
"markdown",
|
|
33
|
+
"cli",
|
|
34
|
+
"tui",
|
|
35
|
+
"mcp"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"postinstall": "node scripts/postinstall.mjs",
|
|
39
|
+
"sync-version": "node scripts/sync-version.mjs",
|
|
40
|
+
"build:npm": "node scripts/build-npm.mjs"
|
|
41
|
+
},
|
|
42
|
+
"optionalDependencies": {
|
|
43
|
+
"@bitefoundry/notion-win32-x64": "0.4.0",
|
|
44
|
+
"@bitefoundry/notion-win32-arm64": "0.4.0",
|
|
45
|
+
"@bitefoundry/notion-darwin-x64": "0.4.0",
|
|
46
|
+
"@bitefoundry/notion-darwin-arm64": "0.4.0",
|
|
47
|
+
"@bitefoundry/notion-linux-x64": "0.4.0",
|
|
48
|
+
"@bitefoundry/notion-linux-arm64": "0.4.0"
|
|
49
|
+
}
|
|
50
|
+
}
|