better-notion 1.5.0__py3-none-any.whl → 1.5.2__py3-none-any.whl
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.
- better_notion/_api/collections/databases.py +32 -0
- better_notion/_cli/commands/pages.py +32 -0
- better_notion/_sdk/models/database.py +12 -7
- better_notion/plugins/official/agents.py +25 -22
- better_notion/utils/agents/schemas.py +91 -68
- better_notion/utils/agents/workspace.py +3 -2
- {better_notion-1.5.0.dist-info → better_notion-1.5.2.dist-info}/METADATA +1 -1
- {better_notion-1.5.0.dist-info → better_notion-1.5.2.dist-info}/RECORD +11 -11
- {better_notion-1.5.0.dist-info → better_notion-1.5.2.dist-info}/WHEEL +0 -0
- {better_notion-1.5.0.dist-info → better_notion-1.5.2.dist-info}/entry_points.txt +0 -0
- {better_notion-1.5.0.dist-info → better_notion-1.5.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -73,3 +73,35 @@ class DatabaseCollection:
|
|
|
73
73
|
# Ensure parent is set to the database
|
|
74
74
|
page_data = {"parent": {"database_id": database_id}, **kwargs}
|
|
75
75
|
return await self._api._request("POST", "/pages", json=page_data)
|
|
76
|
+
|
|
77
|
+
async def create(
|
|
78
|
+
self,
|
|
79
|
+
parent: dict[str, Any],
|
|
80
|
+
title: str,
|
|
81
|
+
properties: dict[str, Any]
|
|
82
|
+
) -> dict[str, Any]:
|
|
83
|
+
"""Create a new database.
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
parent: Parent object (e.g., {"type": "page_id", "page_id": "..."})
|
|
87
|
+
title: Database title
|
|
88
|
+
properties: Database schema/properties configuration
|
|
89
|
+
|
|
90
|
+
Returns:
|
|
91
|
+
Raw database data dict from Notion API.
|
|
92
|
+
|
|
93
|
+
Raises:
|
|
94
|
+
ValidationError: If the database configuration is invalid.
|
|
95
|
+
NotFoundError: If the parent page does not exist.
|
|
96
|
+
"""
|
|
97
|
+
# Build title array
|
|
98
|
+
title_array = [{"type": "text", "text": {"content": title}}]
|
|
99
|
+
|
|
100
|
+
# Create database request
|
|
101
|
+
database_data = {
|
|
102
|
+
"parent": parent,
|
|
103
|
+
"title": title_array,
|
|
104
|
+
"properties": properties
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return await self._api._request("POST", "/databases", json=database_data)
|
|
@@ -359,6 +359,38 @@ async def restore(page_id: str) -> None:
|
|
|
359
359
|
typer.echo(result)
|
|
360
360
|
|
|
361
361
|
|
|
362
|
+
@app.command()
|
|
363
|
+
async def clear(page_id: str) -> None:
|
|
364
|
+
"""
|
|
365
|
+
Clear all blocks from a page.
|
|
366
|
+
|
|
367
|
+
Deletes all content blocks from a page while keeping the page itself.
|
|
368
|
+
The page title and properties are preserved.
|
|
369
|
+
"""
|
|
370
|
+
client = get_client()
|
|
371
|
+
page = await client.pages.get(page_id)
|
|
372
|
+
|
|
373
|
+
# Collect all block IDs first
|
|
374
|
+
block_ids = []
|
|
375
|
+
async for block in page.children():
|
|
376
|
+
block_ids.append(block.id)
|
|
377
|
+
|
|
378
|
+
# Delete all blocks
|
|
379
|
+
for block_id in block_ids:
|
|
380
|
+
try:
|
|
381
|
+
await client.api.blocks.delete(block_id)
|
|
382
|
+
except Exception:
|
|
383
|
+
# Continue even if deletion fails
|
|
384
|
+
pass
|
|
385
|
+
|
|
386
|
+
result = format_success({
|
|
387
|
+
"id": page_id,
|
|
388
|
+
"blocks_deleted": len(block_ids),
|
|
389
|
+
"status": "cleared",
|
|
390
|
+
})
|
|
391
|
+
typer.echo(result)
|
|
392
|
+
|
|
393
|
+
|
|
362
394
|
@app.command("create-from-md")
|
|
363
395
|
async def create_from_md(
|
|
364
396
|
file: str = typer.Option(..., "--file", "-f", help="Path to markdown file"),
|
|
@@ -94,7 +94,8 @@ class Database(BaseEntity):
|
|
|
94
94
|
*,
|
|
95
95
|
client: "NotionClient",
|
|
96
96
|
title: str,
|
|
97
|
-
properties: dict[str, Any]
|
|
97
|
+
properties: dict[str, Any] | None = None,
|
|
98
|
+
schema: dict[str, Any] | None = None,
|
|
98
99
|
) -> "Database":
|
|
99
100
|
"""Create a new database.
|
|
100
101
|
|
|
@@ -102,7 +103,8 @@ class Database(BaseEntity):
|
|
|
102
103
|
parent: Parent Page
|
|
103
104
|
client: NotionClient instance
|
|
104
105
|
title: Database title
|
|
105
|
-
properties: Property schema configuration
|
|
106
|
+
properties: Property schema configuration (alias for schema)
|
|
107
|
+
schema: Property schema configuration
|
|
106
108
|
|
|
107
109
|
Returns:
|
|
108
110
|
Newly created Database object
|
|
@@ -112,7 +114,7 @@ class Database(BaseEntity):
|
|
|
112
114
|
... parent=page,
|
|
113
115
|
... client=client,
|
|
114
116
|
... title="Tasks",
|
|
115
|
-
...
|
|
117
|
+
... schema={
|
|
116
118
|
... "Name": {"type": "title"},
|
|
117
119
|
... "Status": {"type": "select"}
|
|
118
120
|
... }
|
|
@@ -120,13 +122,16 @@ class Database(BaseEntity):
|
|
|
120
122
|
"""
|
|
121
123
|
from better_notion._api.properties import Title
|
|
122
124
|
|
|
123
|
-
#
|
|
124
|
-
|
|
125
|
+
# Support both properties and schema as parameter names
|
|
126
|
+
if schema is not None and properties is None:
|
|
127
|
+
properties = schema
|
|
128
|
+
elif properties is None:
|
|
129
|
+
properties = {}
|
|
125
130
|
|
|
126
|
-
# Create database via API
|
|
131
|
+
# Create database via API (pass title string - API layer will build the array)
|
|
127
132
|
data = await client.api.databases.create(
|
|
128
133
|
parent={"type": "page_id", "page_id": parent.id},
|
|
129
|
-
title=
|
|
134
|
+
title=title,
|
|
130
135
|
properties=properties
|
|
131
136
|
)
|
|
132
137
|
|
|
@@ -73,7 +73,7 @@ class AgentsPlugin(CombinedPluginInterface):
|
|
|
73
73
|
|
|
74
74
|
# Register sub-commands
|
|
75
75
|
@agents_app.command("init")
|
|
76
|
-
|
|
76
|
+
def init_workspace(
|
|
77
77
|
parent_page_id: str = typer.Option(
|
|
78
78
|
...,
|
|
79
79
|
"--parent-page",
|
|
@@ -109,6 +109,7 @@ class AgentsPlugin(CombinedPluginInterface):
|
|
|
109
109
|
Example:
|
|
110
110
|
$ notion agents init --parent-page page123 --name "My Workspace"
|
|
111
111
|
"""
|
|
112
|
+
import asyncio
|
|
112
113
|
import logging
|
|
113
114
|
import sys
|
|
114
115
|
|
|
@@ -122,31 +123,33 @@ class AgentsPlugin(CombinedPluginInterface):
|
|
|
122
123
|
# Also enable httpx debug logging
|
|
123
124
|
logging.getLogger("httpx").setLevel(logging.DEBUG)
|
|
124
125
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
async def _init() -> str:
|
|
127
|
+
try:
|
|
128
|
+
client = get_client()
|
|
129
|
+
initializer = WorkspaceInitializer(client)
|
|
128
130
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
database_ids = await initializer.initialize_workspace(
|
|
132
|
+
parent_page_id=parent_page_id,
|
|
133
|
+
workspace_name=workspace_name,
|
|
134
|
+
)
|
|
133
135
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
# Save database IDs
|
|
137
|
+
initializer.save_database_ids()
|
|
136
138
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
typer.echo(result)
|
|
139
|
+
return format_success(
|
|
140
|
+
{
|
|
141
|
+
"message": "Workspace initialized successfully",
|
|
142
|
+
"databases_created": len(database_ids),
|
|
143
|
+
"database_ids": database_ids,
|
|
144
|
+
}
|
|
145
|
+
)
|
|
145
146
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
except Exception as e:
|
|
148
|
+
result = format_error("INIT_ERROR", str(e), retry=False)
|
|
149
|
+
return result
|
|
150
|
+
|
|
151
|
+
result = asyncio.run(_init())
|
|
152
|
+
typer.echo(result)
|
|
150
153
|
|
|
151
154
|
@agents_app.command("init-project")
|
|
152
155
|
def init_project(
|
|
@@ -50,159 +50,174 @@ class SelectOption:
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
class PropertyBuilder:
|
|
53
|
-
"""
|
|
53
|
+
"""
|
|
54
|
+
Helper class for building Notion database properties.
|
|
55
|
+
|
|
56
|
+
Notion API create format:
|
|
57
|
+
"Name": {"title": {}}
|
|
58
|
+
"Status": {"select": {"options": [...]}}
|
|
59
|
+
"""
|
|
54
60
|
|
|
55
61
|
@staticmethod
|
|
56
|
-
def title(name: str = "Name") -> Dict[str,
|
|
57
|
-
"""
|
|
62
|
+
def title(name: str = "Name") -> Dict[str, Any]:
|
|
63
|
+
"""
|
|
64
|
+
Create a title property.
|
|
58
65
|
|
|
59
66
|
Args:
|
|
60
67
|
name: Property name (default: "Name")
|
|
61
68
|
|
|
62
69
|
Returns:
|
|
63
|
-
Title property schema
|
|
70
|
+
Title property schema for Notion API create
|
|
64
71
|
"""
|
|
65
|
-
return {"
|
|
72
|
+
return {"title": {}}
|
|
66
73
|
|
|
67
74
|
@staticmethod
|
|
68
|
-
def text(name: str) -> Dict[str,
|
|
69
|
-
"""
|
|
75
|
+
def text(name: str) -> Dict[str, Any]:
|
|
76
|
+
"""
|
|
77
|
+
Create a text property.
|
|
70
78
|
|
|
71
79
|
Args:
|
|
72
80
|
name: Property name
|
|
73
81
|
|
|
74
82
|
Returns:
|
|
75
|
-
Text property schema
|
|
83
|
+
Text property schema for Notion API create
|
|
76
84
|
"""
|
|
77
|
-
return {"
|
|
85
|
+
return {"rich_text": {}}
|
|
78
86
|
|
|
79
87
|
@staticmethod
|
|
80
88
|
def number(name: str, format: Optional[str] = None) -> Dict[str, Any]:
|
|
81
|
-
"""
|
|
89
|
+
"""
|
|
90
|
+
Create a number property.
|
|
82
91
|
|
|
83
92
|
Args:
|
|
84
93
|
name: Property name
|
|
85
94
|
format: Number format (number, percent, dollar, euro, pound, yen, ruble)
|
|
86
95
|
|
|
87
96
|
Returns:
|
|
88
|
-
Number property schema
|
|
97
|
+
Number property schema for Notion API create
|
|
89
98
|
"""
|
|
90
|
-
prop: Dict[str, Any] = {"type": "number", "name": name}
|
|
91
|
-
|
|
92
99
|
if format:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return prop
|
|
100
|
+
return {"number": {"format": format}}
|
|
101
|
+
return {"number": {}}
|
|
96
102
|
|
|
97
103
|
@staticmethod
|
|
98
104
|
def select(name: str, options: List[Dict[str, str]]) -> Dict[str, Any]:
|
|
99
|
-
"""
|
|
105
|
+
"""
|
|
106
|
+
Create a select property.
|
|
100
107
|
|
|
101
108
|
Args:
|
|
102
109
|
name: Property name
|
|
103
110
|
options: List of option dicts from SelectOption.option()
|
|
104
111
|
|
|
105
112
|
Returns:
|
|
106
|
-
Select property schema
|
|
113
|
+
Select property schema for Notion API create
|
|
107
114
|
"""
|
|
108
|
-
return {"
|
|
115
|
+
return {"select": {"options": options}}
|
|
109
116
|
|
|
110
117
|
@staticmethod
|
|
111
118
|
def multi_select(name: str, options: List[Dict[str, str]]) -> Dict[str, Any]:
|
|
112
|
-
"""
|
|
119
|
+
"""
|
|
120
|
+
Create a multi-select property.
|
|
113
121
|
|
|
114
122
|
Args:
|
|
115
123
|
name: Property name
|
|
116
124
|
options: List of option dicts
|
|
117
125
|
|
|
118
126
|
Returns:
|
|
119
|
-
Multi-select property schema
|
|
127
|
+
Multi-select property schema for Notion API create
|
|
120
128
|
"""
|
|
121
|
-
return {"
|
|
129
|
+
return {"multi_select": {"options": options}}
|
|
122
130
|
|
|
123
131
|
@staticmethod
|
|
124
|
-
def date(name: str) -> Dict[str,
|
|
125
|
-
"""
|
|
132
|
+
def date(name: str) -> Dict[str, Any]:
|
|
133
|
+
"""
|
|
134
|
+
Create a date property.
|
|
126
135
|
|
|
127
136
|
Args:
|
|
128
137
|
name: Property name
|
|
129
138
|
|
|
130
139
|
Returns:
|
|
131
|
-
Date property schema
|
|
140
|
+
Date property schema for Notion API create
|
|
132
141
|
"""
|
|
133
|
-
return {"
|
|
142
|
+
return {"date": {}}
|
|
134
143
|
|
|
135
144
|
@staticmethod
|
|
136
|
-
def checkbox(name: str) -> Dict[str,
|
|
137
|
-
"""
|
|
145
|
+
def checkbox(name: str) -> Dict[str, Any]:
|
|
146
|
+
"""
|
|
147
|
+
Create a checkbox property.
|
|
138
148
|
|
|
139
149
|
Args:
|
|
140
150
|
name: Property name
|
|
141
151
|
|
|
142
152
|
Returns:
|
|
143
|
-
Checkbox property schema
|
|
153
|
+
Checkbox property schema for Notion API create
|
|
144
154
|
"""
|
|
145
|
-
return {"
|
|
155
|
+
return {"checkbox": {}}
|
|
146
156
|
|
|
147
157
|
@staticmethod
|
|
148
|
-
def url(name: str) -> Dict[str,
|
|
149
|
-
"""
|
|
158
|
+
def url(name: str) -> Dict[str, Any]:
|
|
159
|
+
"""
|
|
160
|
+
Create a URL property.
|
|
150
161
|
|
|
151
162
|
Args:
|
|
152
163
|
name: Property name
|
|
153
164
|
|
|
154
165
|
Returns:
|
|
155
|
-
URL property schema
|
|
166
|
+
URL property schema for Notion API create
|
|
156
167
|
"""
|
|
157
|
-
return {"
|
|
168
|
+
return {"url": {}}
|
|
158
169
|
|
|
159
170
|
@staticmethod
|
|
160
|
-
def email(name: str) -> Dict[str,
|
|
161
|
-
"""
|
|
171
|
+
def email(name: str) -> Dict[str, Any]:
|
|
172
|
+
"""
|
|
173
|
+
Create an email property.
|
|
162
174
|
|
|
163
175
|
Args:
|
|
164
176
|
name: Property name
|
|
165
177
|
|
|
166
178
|
Returns:
|
|
167
|
-
Email property schema
|
|
179
|
+
Email property schema for Notion API create
|
|
168
180
|
"""
|
|
169
|
-
return {"
|
|
181
|
+
return {"email": {}}
|
|
170
182
|
|
|
171
183
|
@staticmethod
|
|
172
|
-
def phone(name: str) -> Dict[str,
|
|
173
|
-
"""
|
|
184
|
+
def phone(name: str) -> Dict[str, Any]:
|
|
185
|
+
"""
|
|
186
|
+
Create a phone property.
|
|
174
187
|
|
|
175
188
|
Args:
|
|
176
189
|
name: Property name
|
|
177
190
|
|
|
178
191
|
Returns:
|
|
179
|
-
Phone property schema
|
|
192
|
+
Phone property schema for Notion API create
|
|
180
193
|
"""
|
|
181
|
-
return {"
|
|
194
|
+
return {"phone_number": {}}
|
|
182
195
|
|
|
183
196
|
@staticmethod
|
|
184
|
-
def people(name: str) -> Dict[str,
|
|
185
|
-
"""
|
|
197
|
+
def people(name: str) -> Dict[str, Any]:
|
|
198
|
+
"""
|
|
199
|
+
Create a people property.
|
|
186
200
|
|
|
187
201
|
Args:
|
|
188
202
|
name: Property name
|
|
189
203
|
|
|
190
204
|
Returns:
|
|
191
|
-
People property schema
|
|
205
|
+
People property schema for Notion API create
|
|
192
206
|
"""
|
|
193
|
-
return {"
|
|
207
|
+
return {"people": {}}
|
|
194
208
|
|
|
195
209
|
@staticmethod
|
|
196
|
-
def files(name: str) -> Dict[str,
|
|
197
|
-
"""
|
|
210
|
+
def files(name: str) -> Dict[str, Any]:
|
|
211
|
+
"""
|
|
212
|
+
Create a files property.
|
|
198
213
|
|
|
199
214
|
Args:
|
|
200
215
|
name: Property name
|
|
201
216
|
|
|
202
217
|
Returns:
|
|
203
|
-
Files property schema
|
|
218
|
+
Files property schema for Notion API create
|
|
204
219
|
"""
|
|
205
|
-
return {"
|
|
220
|
+
return {"files": {}}
|
|
206
221
|
|
|
207
222
|
@staticmethod
|
|
208
223
|
def relation(
|
|
@@ -210,7 +225,8 @@ class PropertyBuilder:
|
|
|
210
225
|
database_id: Optional[str] = None,
|
|
211
226
|
dual_property: bool = True,
|
|
212
227
|
) -> Dict[str, Any]:
|
|
213
|
-
"""
|
|
228
|
+
"""
|
|
229
|
+
Create a relation property.
|
|
214
230
|
|
|
215
231
|
Args:
|
|
216
232
|
name: Property name
|
|
@@ -224,19 +240,22 @@ class PropertyBuilder:
|
|
|
224
240
|
If database_id is None, it must be set later when the related
|
|
225
241
|
database is created.
|
|
226
242
|
"""
|
|
227
|
-
|
|
243
|
+
relation_config: Dict[str, Any] = {}
|
|
228
244
|
|
|
229
245
|
if database_id:
|
|
230
|
-
|
|
246
|
+
relation_config["database_id"] = database_id
|
|
231
247
|
|
|
232
248
|
if dual_property:
|
|
233
|
-
|
|
249
|
+
relation_config["dual_property"] = {}
|
|
250
|
+
else:
|
|
251
|
+
relation_config["single_property"] = {}
|
|
234
252
|
|
|
235
|
-
return
|
|
253
|
+
return {"relation": relation_config}
|
|
236
254
|
|
|
237
255
|
@staticmethod
|
|
238
256
|
def formula(name: str, expression: str) -> Dict[str, Any]:
|
|
239
|
-
"""
|
|
257
|
+
"""
|
|
258
|
+
Create a formula property.
|
|
240
259
|
|
|
241
260
|
Args:
|
|
242
261
|
name: Property name
|
|
@@ -245,11 +264,12 @@ class PropertyBuilder:
|
|
|
245
264
|
Returns:
|
|
246
265
|
Formula property schema
|
|
247
266
|
"""
|
|
248
|
-
return {"
|
|
267
|
+
return {"formula": {"expression": expression}}
|
|
249
268
|
|
|
250
269
|
@staticmethod
|
|
251
|
-
def created_time(name: str = "Created time") -> Dict[str,
|
|
252
|
-
"""
|
|
270
|
+
def created_time(name: str = "Created time") -> Dict[str, Any]:
|
|
271
|
+
"""
|
|
272
|
+
Create a created_time property.
|
|
253
273
|
|
|
254
274
|
Args:
|
|
255
275
|
name: Property name (default: "Created time")
|
|
@@ -257,11 +277,12 @@ class PropertyBuilder:
|
|
|
257
277
|
Returns:
|
|
258
278
|
Created time property schema
|
|
259
279
|
"""
|
|
260
|
-
return {"
|
|
280
|
+
return {"created_time": {}}
|
|
261
281
|
|
|
262
282
|
@staticmethod
|
|
263
|
-
def created_by(name: str = "Created by") -> Dict[str,
|
|
264
|
-
"""
|
|
283
|
+
def created_by(name: str = "Created by") -> Dict[str, Any]:
|
|
284
|
+
"""
|
|
285
|
+
Create a created_by property.
|
|
265
286
|
|
|
266
287
|
Args:
|
|
267
288
|
name: Property name (default: "Created by")
|
|
@@ -269,7 +290,7 @@ class PropertyBuilder:
|
|
|
269
290
|
Returns:
|
|
270
291
|
Created by property schema
|
|
271
292
|
"""
|
|
272
|
-
return {"
|
|
293
|
+
return {"created_by": {}}
|
|
273
294
|
|
|
274
295
|
|
|
275
296
|
class OrganizationSchema:
|
|
@@ -277,7 +298,8 @@ class OrganizationSchema:
|
|
|
277
298
|
|
|
278
299
|
@staticmethod
|
|
279
300
|
def get_schema() -> Dict[str, Dict[str, Any]]:
|
|
280
|
-
"""
|
|
301
|
+
"""
|
|
302
|
+
Return Notion database schema for Organizations.
|
|
281
303
|
|
|
282
304
|
Returns:
|
|
283
305
|
Dict mapping property names to property schemas
|
|
@@ -332,7 +354,7 @@ class ProjectSchema:
|
|
|
332
354
|
SelectOption.option("React", "blue"),
|
|
333
355
|
SelectOption.option("Vue", "green"),
|
|
334
356
|
SelectOption.option("Node.js", "green"),
|
|
335
|
-
SelectOption.option("Go", "
|
|
357
|
+
SelectOption.option("Go", "blue"),
|
|
336
358
|
SelectOption.option("Rust", "orange"),
|
|
337
359
|
SelectOption.option("Java", "red"),
|
|
338
360
|
SelectOption.option("C++", "blue"),
|
|
@@ -389,7 +411,8 @@ class VersionSchema:
|
|
|
389
411
|
"Branch Name": PropertyBuilder.text("Branch Name"),
|
|
390
412
|
"Progress": PropertyBuilder.number("Progress", format="percent"),
|
|
391
413
|
"Release Date": PropertyBuilder.date("Release Date"),
|
|
392
|
-
|
|
414
|
+
# Note: "Superseded By" self-referential relation removed because
|
|
415
|
+
# it can't be created during initial database creation (needs its own ID)
|
|
393
416
|
}
|
|
394
417
|
|
|
395
418
|
|
|
@@ -435,8 +458,8 @@ class TaskSchema:
|
|
|
435
458
|
SelectOption.option("Low", "blue"),
|
|
436
459
|
],
|
|
437
460
|
),
|
|
438
|
-
|
|
439
|
-
|
|
461
|
+
# Note: Self-referential relations (Dependencies, Dependent Tasks) removed because
|
|
462
|
+
# they can't be created during initial database creation (need the database's own ID)
|
|
440
463
|
"Estimated Hours": PropertyBuilder.number("Estimated Hours"),
|
|
441
464
|
"Actual Hours": PropertyBuilder.number("Actual Hours"),
|
|
442
465
|
"Assignee": PropertyBuilder.people("Assignee"),
|
|
@@ -221,8 +221,8 @@ class WorkspaceInitializer:
|
|
|
221
221
|
# Update relations
|
|
222
222
|
if "projects" in self._database_ids:
|
|
223
223
|
schema["Project"]["relation"]["database_id"] = self._database_ids["projects"]
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
if "tasks" in self._database_ids:
|
|
225
|
+
schema["Related Task"]["relation"]["database_id"] = self._database_ids["tasks"]
|
|
226
226
|
db = await self._client.databases.create(
|
|
227
227
|
parent=parent,
|
|
228
228
|
title="Ideas",
|
|
@@ -247,6 +247,7 @@ class WorkspaceInitializer:
|
|
|
247
247
|
schema["Project"]["relation"]["database_id"] = self._database_ids["projects"]
|
|
248
248
|
if "tasks" in self._database_ids:
|
|
249
249
|
schema["Task"]["relation"]["database_id"] = self._database_ids["tasks"]
|
|
250
|
+
schema["Fix Tasks"]["relation"]["database_id"] = self._database_ids["tasks"]
|
|
250
251
|
if "ideas" in self._database_ids:
|
|
251
252
|
schema["Related Idea"]["relation"]["database_id"] = self._database_ids["ideas"]
|
|
252
253
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: better-notion
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.2
|
|
4
4
|
Summary: A high-level Python SDK for the Notion API with developer experience in mind.
|
|
5
5
|
Project-URL: Homepage, https://github.com/nesalia-inc/better-notion
|
|
6
6
|
Project-URL: Documentation, https://github.com/nesalia-inc/better-notion#readme
|
|
@@ -6,7 +6,7 @@ better_notion/_api/oauth.py,sha256=pDQFtwJzb90zroFSLQleNEwMwVsNwlsO7MIieaegPz4,4
|
|
|
6
6
|
better_notion/_api/collections/__init__.py,sha256=snBRDpUOWxKR-w6FjNtfRddclO1LF2LNy65T7dbv57A,539
|
|
7
7
|
better_notion/_api/collections/blocks.py,sha256=Ka8HbVk9NCDh1zMJeKvP1XCjxJI_1yuGzYyzSxFgYGY,3703
|
|
8
8
|
better_notion/_api/collections/comments.py,sha256=Qkl2pOxqiti1ALJpBi1TE1arQoSc8Y6cuOkqpsXrzpE,3222
|
|
9
|
-
better_notion/_api/collections/databases.py,sha256=
|
|
9
|
+
better_notion/_api/collections/databases.py,sha256=eUpNSwSWn8J5AkCq1uZEBPb7rNmrrzvNMqFTsfFCcDc,3084
|
|
10
10
|
better_notion/_api/collections/pages.py,sha256=qX_QwNJsq8jPvWp91A44zfais69gIXNSRjeH7NL8ha0,3174
|
|
11
11
|
better_notion/_api/collections/users.py,sha256=h-J5fQbXQSj7ZgMfHRDoXLKUv1lP3On6uWO-3YO4dlc,1309
|
|
12
12
|
better_notion/_api/entities/__init__.py,sha256=QYSgFMr5kC94M6nzpkr_KSjUZcCpdZBObBod7XOrhU4,521
|
|
@@ -42,7 +42,7 @@ better_notion/_cli/commands/blocks.py,sha256=ErcR-SHhPoz6B9uy0xOG6CGZB-bhvny5lxB
|
|
|
42
42
|
better_notion/_cli/commands/comments.py,sha256=dBdxvpkjk_yA_1WUivXl1Nt8Ig-uYD5-k4XtenHU_cI,4981
|
|
43
43
|
better_notion/_cli/commands/config.py,sha256=3bOCmcRnpTb5SHB2TJPXdxrRshy84nZRAsULxfbSqk0,5360
|
|
44
44
|
better_notion/_cli/commands/databases.py,sha256=SRfUi74Cm7YVvdwPjbcwP1g__DiZsMyY0YLQTY-skx4,12953
|
|
45
|
-
better_notion/_cli/commands/pages.py,sha256=
|
|
45
|
+
better_notion/_cli/commands/pages.py,sha256=JMeD-UfrzG2cu73G4X84vZV3gjqFIvS3XifWMSFES18,13894
|
|
46
46
|
better_notion/_cli/commands/plugins.py,sha256=mBYSVciwwgnCRXYOuJfSYDV2UMAr_9P8KwPuiC-pY2A,27067
|
|
47
47
|
better_notion/_cli/commands/search.py,sha256=JM20W5TiohsOKLyEUABEaWr0yB82W2_qAGQ1w64_pGk,4671
|
|
48
48
|
better_notion/_cli/commands/update.py,sha256=NfmijzTpCbVTEY2h0QdcJZXEiGmWkk-iyEtZCqrgmAk,4997
|
|
@@ -65,7 +65,7 @@ better_notion/_sdk/managers/user_manager.py,sha256=AfFWhxKbaWhMCqJmRoU55JwfZNJHh
|
|
|
65
65
|
better_notion/_sdk/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
66
66
|
better_notion/_sdk/models/block.py,sha256=4Wpx46zVUy0LrwE2eEvUof37iyflmY-nL-NttC7o8tI,15163
|
|
67
67
|
better_notion/_sdk/models/comment.py,sha256=R82jfAhQODNCdvVywv8dIrmA9lfKgkI8ZSKThQFvG98,8485
|
|
68
|
-
better_notion/_sdk/models/database.py,sha256=
|
|
68
|
+
better_notion/_sdk/models/database.py,sha256=NaplivKjbbxnpYtB19f80yY6075tHZWuvimCPA9j0h4,16746
|
|
69
69
|
better_notion/_sdk/models/page.py,sha256=KVGTdt-xuhEYlb1snmZ0VdjMZAQDSWcUwZ18oK5me4g,20541
|
|
70
70
|
better_notion/_sdk/models/user.py,sha256=1yo4F7horPDf7m9Z1Xl1VGxcmgG7vCn_pEFj_oiPyVo,10261
|
|
71
71
|
better_notion/_sdk/models/blocks/__init__.py,sha256=8kykYs4cvuBlgn6R1tq7b5RMJu7ng7IcWA-0y7kww6A,1928
|
|
@@ -107,7 +107,7 @@ better_notion/plugins/base.py,sha256=3h9jOZzS--UqmVW3RREtcQ2h1GTWWPUryTencsJKhTM
|
|
|
107
107
|
better_notion/plugins/loader.py,sha256=zCWsMdJyvZs1IHFm0zjEiqm_l_5jB1Uw4x30Kq8rLS4,9527
|
|
108
108
|
better_notion/plugins/state.py,sha256=jH_tZWvC35hqLO4qwl2Kwq9ziWVavwCEUcCqy3s5wMY,3780
|
|
109
109
|
better_notion/plugins/official/__init__.py,sha256=rPg5vdk1cEANVstMPzxcWmImtsOpdSR40JSml7h1uUk,426
|
|
110
|
-
better_notion/plugins/official/agents.py,sha256=
|
|
110
|
+
better_notion/plugins/official/agents.py,sha256=HDCAQOq7za00_YZXLftU5cBaeK3VSgutFWkXwwvtRxs,26636
|
|
111
111
|
better_notion/plugins/official/agents_cli.py,sha256=8l6e1zJCAT4DdAO-QfdjK_vrrrik3pmrojwakE32ZNY,53048
|
|
112
112
|
better_notion/plugins/official/productivity.py,sha256=_-whP4pYA4HufE1aUFbIdhrjU-O9njI7xUO_Id2M1J8,8726
|
|
113
113
|
better_notion/plugins/official/agents_sdk/__init__.py,sha256=luQBzZLsJ7fC5U0jFu8dfzMviiXj2SBZXcTohM53wkQ,725
|
|
@@ -123,11 +123,11 @@ better_notion/utils/agents/auth.py,sha256=_SBcqBjXmX8CJMCPpRWM-UuaDg7-OOtMWbhnYE
|
|
|
123
123
|
better_notion/utils/agents/dependency_resolver.py,sha256=PfHHDIQztGih4LwylMb0_MyhDFbOYPjvUxcxY52mSEs,12033
|
|
124
124
|
better_notion/utils/agents/project_context.py,sha256=aJlzy5H2rL4sAfW2jHL_3K2VkBJ4ihUhCRVolkpuO78,7477
|
|
125
125
|
better_notion/utils/agents/rbac.py,sha256=8ZA8Y7wbOiVZDbpjpH7iC35SZrZ0jl4fcJ3xWCm3SsE,11820
|
|
126
|
-
better_notion/utils/agents/schemas.py,sha256=
|
|
126
|
+
better_notion/utils/agents/schemas.py,sha256=eHfGhY90FAPXA3E8qE6gP75dgNzn-9z5Ju1FMwBKnQQ,22120
|
|
127
127
|
better_notion/utils/agents/state_machine.py,sha256=xUBEeDTbU1Xq-rsRo2sbr6AUYpYrV9DTHOtZT2cWES8,6699
|
|
128
|
-
better_notion/utils/agents/workspace.py,sha256=
|
|
129
|
-
better_notion-1.5.
|
|
130
|
-
better_notion-1.5.
|
|
131
|
-
better_notion-1.5.
|
|
132
|
-
better_notion-1.5.
|
|
133
|
-
better_notion-1.5.
|
|
128
|
+
better_notion/utils/agents/workspace.py,sha256=FYarHj8eD2OeUG0KMPelqpBavm4RnYBoW2PVuwYkKI4,13614
|
|
129
|
+
better_notion-1.5.2.dist-info/METADATA,sha256=9aN87PKPI9zNpR7TRBVCMERbB-b-dfaYxNsoZRi2HkQ,11096
|
|
130
|
+
better_notion-1.5.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
131
|
+
better_notion-1.5.2.dist-info/entry_points.txt,sha256=D0bUcP7Z00Zyjxw7r2p29T95UrwioDO0aGDoHe9I6fo,55
|
|
132
|
+
better_notion-1.5.2.dist-info/licenses/LICENSE,sha256=BAdN3JpgMY_y_fWqZSCFSvSbC2mTHP-BKDAzF5FXQAI,1069
|
|
133
|
+
better_notion-1.5.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|