@atikk-co-jp/notion-mcp-server 0.2.1 → 0.2.3
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/dist/bin/cli.js +0 -0
- package/dist/src/schemas/database.d.ts +60 -60
- package/dist/src/schemas/database.d.ts.map +1 -1
- package/dist/src/schemas/database.js +20 -26
- package/dist/src/tools/append-block-children.d.ts.map +1 -1
- package/dist/src/tools/append-block-children.js +4 -10
- package/dist/src/tools/create-comment.d.ts.map +1 -1
- package/dist/src/tools/create-comment.js +4 -10
- package/dist/src/tools/create-database.d.ts.map +1 -1
- package/dist/src/tools/create-database.js +8 -21
- package/dist/src/tools/create-page.d.ts.map +1 -1
- package/dist/src/tools/create-page.js +6 -15
- package/dist/src/tools/query-database.d.ts.map +1 -1
- package/dist/src/tools/query-database.js +8 -24
- package/dist/src/tools/update-database.d.ts.map +1 -1
- package/dist/src/tools/update-database.js +10 -31
- package/dist/src/tools/update-page.d.ts.map +1 -1
- package/dist/src/tools/update-page.js +6 -18
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
File without changes
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const TitlePropertySchemaSchema: z.ZodObject<{
|
|
3
|
-
title: z.
|
|
3
|
+
title: z.ZodObject<{}, z.core.$strip>;
|
|
4
4
|
}, z.core.$strip>;
|
|
5
5
|
export declare const RichTextPropertySchemaSchema: z.ZodObject<{
|
|
6
|
-
rich_text: z.
|
|
6
|
+
rich_text: z.ZodObject<{}, z.core.$strip>;
|
|
7
7
|
}, z.core.$strip>;
|
|
8
8
|
export declare const NumberPropertySchemaSchema: z.ZodObject<{
|
|
9
|
-
number: z.
|
|
9
|
+
number: z.ZodObject<{
|
|
10
10
|
format: z.ZodOptional<z.ZodEnum<{
|
|
11
11
|
number: "number";
|
|
12
12
|
number_with_commas: "number_with_commas";
|
|
@@ -48,7 +48,7 @@ export declare const NumberPropertySchemaSchema: z.ZodObject<{
|
|
|
48
48
|
uruguayan_peso: "uruguayan_peso";
|
|
49
49
|
singapore_dollar: "singapore_dollar";
|
|
50
50
|
}>>;
|
|
51
|
-
}, z.core.$strip
|
|
51
|
+
}, z.core.$strip>;
|
|
52
52
|
}, z.core.$strip>;
|
|
53
53
|
export declare const SelectOptionSchema: z.ZodObject<{
|
|
54
54
|
name: z.ZodString;
|
|
@@ -66,7 +66,7 @@ export declare const SelectOptionSchema: z.ZodObject<{
|
|
|
66
66
|
}>>;
|
|
67
67
|
}, z.core.$strip>;
|
|
68
68
|
export declare const SelectPropertySchemaSchema: z.ZodObject<{
|
|
69
|
-
select: z.
|
|
69
|
+
select: z.ZodObject<{
|
|
70
70
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
71
71
|
name: z.ZodString;
|
|
72
72
|
color: z.ZodOptional<z.ZodEnum<{
|
|
@@ -82,10 +82,10 @@ export declare const SelectPropertySchemaSchema: z.ZodObject<{
|
|
|
82
82
|
red: "red";
|
|
83
83
|
}>>;
|
|
84
84
|
}, z.core.$strip>>>;
|
|
85
|
-
}, z.core.$strip
|
|
85
|
+
}, z.core.$strip>;
|
|
86
86
|
}, z.core.$strip>;
|
|
87
87
|
export declare const MultiSelectPropertySchemaSchema: z.ZodObject<{
|
|
88
|
-
multi_select: z.
|
|
88
|
+
multi_select: z.ZodObject<{
|
|
89
89
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
90
90
|
name: z.ZodString;
|
|
91
91
|
color: z.ZodOptional<z.ZodEnum<{
|
|
@@ -101,7 +101,7 @@ export declare const MultiSelectPropertySchemaSchema: z.ZodObject<{
|
|
|
101
101
|
red: "red";
|
|
102
102
|
}>>;
|
|
103
103
|
}, z.core.$strip>>>;
|
|
104
|
-
}, z.core.$strip
|
|
104
|
+
}, z.core.$strip>;
|
|
105
105
|
}, z.core.$strip>;
|
|
106
106
|
export declare const StatusOptionSchema: z.ZodObject<{
|
|
107
107
|
name: z.ZodString;
|
|
@@ -137,28 +137,28 @@ export declare const StatusGroupSchema: z.ZodObject<{
|
|
|
137
137
|
option_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
138
138
|
}, z.core.$strip>;
|
|
139
139
|
export declare const StatusPropertySchemaSchema: z.ZodObject<{
|
|
140
|
-
status: z.
|
|
140
|
+
status: z.ZodObject<{}, z.core.$strip>;
|
|
141
141
|
}, z.core.$strip>;
|
|
142
142
|
export declare const DatePropertySchemaSchema: z.ZodObject<{
|
|
143
|
-
date: z.
|
|
143
|
+
date: z.ZodObject<{}, z.core.$strip>;
|
|
144
144
|
}, z.core.$strip>;
|
|
145
145
|
export declare const PeoplePropertySchemaSchema: z.ZodObject<{
|
|
146
|
-
people: z.
|
|
146
|
+
people: z.ZodObject<{}, z.core.$strip>;
|
|
147
147
|
}, z.core.$strip>;
|
|
148
148
|
export declare const FilesPropertySchemaSchema: z.ZodObject<{
|
|
149
|
-
files: z.
|
|
149
|
+
files: z.ZodObject<{}, z.core.$strip>;
|
|
150
150
|
}, z.core.$strip>;
|
|
151
151
|
export declare const CheckboxPropertySchemaSchema: z.ZodObject<{
|
|
152
|
-
checkbox: z.
|
|
152
|
+
checkbox: z.ZodObject<{}, z.core.$strip>;
|
|
153
153
|
}, z.core.$strip>;
|
|
154
154
|
export declare const UrlPropertySchemaSchema: z.ZodObject<{
|
|
155
|
-
url: z.
|
|
155
|
+
url: z.ZodObject<{}, z.core.$strip>;
|
|
156
156
|
}, z.core.$strip>;
|
|
157
157
|
export declare const EmailPropertySchemaSchema: z.ZodObject<{
|
|
158
|
-
email: z.
|
|
158
|
+
email: z.ZodObject<{}, z.core.$strip>;
|
|
159
159
|
}, z.core.$strip>;
|
|
160
160
|
export declare const PhoneNumberPropertySchemaSchema: z.ZodObject<{
|
|
161
|
-
phone_number: z.
|
|
161
|
+
phone_number: z.ZodObject<{}, z.core.$strip>;
|
|
162
162
|
}, z.core.$strip>;
|
|
163
163
|
export declare const FormulaPropertySchemaSchema: z.ZodObject<{
|
|
164
164
|
formula: z.ZodObject<{
|
|
@@ -212,23 +212,23 @@ export declare const RollupPropertySchemaSchema: z.ZodObject<{
|
|
|
212
212
|
}, z.core.$strip>;
|
|
213
213
|
}, z.core.$strip>;
|
|
214
214
|
export declare const CreatedTimePropertySchemaSchema: z.ZodObject<{
|
|
215
|
-
created_time: z.
|
|
215
|
+
created_time: z.ZodObject<{}, z.core.$strip>;
|
|
216
216
|
}, z.core.$strip>;
|
|
217
217
|
export declare const CreatedByPropertySchemaSchema: z.ZodObject<{
|
|
218
|
-
created_by: z.
|
|
218
|
+
created_by: z.ZodObject<{}, z.core.$strip>;
|
|
219
219
|
}, z.core.$strip>;
|
|
220
220
|
export declare const LastEditedTimePropertySchemaSchema: z.ZodObject<{
|
|
221
|
-
last_edited_time: z.
|
|
221
|
+
last_edited_time: z.ZodObject<{}, z.core.$strip>;
|
|
222
222
|
}, z.core.$strip>;
|
|
223
223
|
export declare const LastEditedByPropertySchemaSchema: z.ZodObject<{
|
|
224
|
-
last_edited_by: z.
|
|
224
|
+
last_edited_by: z.ZodObject<{}, z.core.$strip>;
|
|
225
225
|
}, z.core.$strip>;
|
|
226
226
|
export declare const DatabasePropertySchemaSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
227
|
-
title: z.
|
|
227
|
+
title: z.ZodObject<{}, z.core.$strip>;
|
|
228
228
|
}, z.core.$strip>, z.ZodObject<{
|
|
229
|
-
rich_text: z.
|
|
229
|
+
rich_text: z.ZodObject<{}, z.core.$strip>;
|
|
230
230
|
}, z.core.$strip>, z.ZodObject<{
|
|
231
|
-
number: z.
|
|
231
|
+
number: z.ZodObject<{
|
|
232
232
|
format: z.ZodOptional<z.ZodEnum<{
|
|
233
233
|
number: "number";
|
|
234
234
|
number_with_commas: "number_with_commas";
|
|
@@ -270,9 +270,9 @@ export declare const DatabasePropertySchemaSchema: z.ZodUnion<readonly [z.ZodObj
|
|
|
270
270
|
uruguayan_peso: "uruguayan_peso";
|
|
271
271
|
singapore_dollar: "singapore_dollar";
|
|
272
272
|
}>>;
|
|
273
|
-
}, z.core.$strip
|
|
273
|
+
}, z.core.$strip>;
|
|
274
274
|
}, z.core.$strip>, z.ZodObject<{
|
|
275
|
-
select: z.
|
|
275
|
+
select: z.ZodObject<{
|
|
276
276
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
277
277
|
name: z.ZodString;
|
|
278
278
|
color: z.ZodOptional<z.ZodEnum<{
|
|
@@ -288,9 +288,9 @@ export declare const DatabasePropertySchemaSchema: z.ZodUnion<readonly [z.ZodObj
|
|
|
288
288
|
red: "red";
|
|
289
289
|
}>>;
|
|
290
290
|
}, z.core.$strip>>>;
|
|
291
|
-
}, z.core.$strip
|
|
291
|
+
}, z.core.$strip>;
|
|
292
292
|
}, z.core.$strip>, z.ZodObject<{
|
|
293
|
-
multi_select: z.
|
|
293
|
+
multi_select: z.ZodObject<{
|
|
294
294
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
295
295
|
name: z.ZodString;
|
|
296
296
|
color: z.ZodOptional<z.ZodEnum<{
|
|
@@ -306,23 +306,23 @@ export declare const DatabasePropertySchemaSchema: z.ZodUnion<readonly [z.ZodObj
|
|
|
306
306
|
red: "red";
|
|
307
307
|
}>>;
|
|
308
308
|
}, z.core.$strip>>>;
|
|
309
|
-
}, z.core.$strip
|
|
309
|
+
}, z.core.$strip>;
|
|
310
310
|
}, z.core.$strip>, z.ZodObject<{
|
|
311
|
-
status: z.
|
|
311
|
+
status: z.ZodObject<{}, z.core.$strip>;
|
|
312
312
|
}, z.core.$strip>, z.ZodObject<{
|
|
313
|
-
date: z.
|
|
313
|
+
date: z.ZodObject<{}, z.core.$strip>;
|
|
314
314
|
}, z.core.$strip>, z.ZodObject<{
|
|
315
|
-
people: z.
|
|
315
|
+
people: z.ZodObject<{}, z.core.$strip>;
|
|
316
316
|
}, z.core.$strip>, z.ZodObject<{
|
|
317
|
-
files: z.
|
|
317
|
+
files: z.ZodObject<{}, z.core.$strip>;
|
|
318
318
|
}, z.core.$strip>, z.ZodObject<{
|
|
319
|
-
checkbox: z.
|
|
319
|
+
checkbox: z.ZodObject<{}, z.core.$strip>;
|
|
320
320
|
}, z.core.$strip>, z.ZodObject<{
|
|
321
|
-
url: z.
|
|
321
|
+
url: z.ZodObject<{}, z.core.$strip>;
|
|
322
322
|
}, z.core.$strip>, z.ZodObject<{
|
|
323
|
-
email: z.
|
|
323
|
+
email: z.ZodObject<{}, z.core.$strip>;
|
|
324
324
|
}, z.core.$strip>, z.ZodObject<{
|
|
325
|
-
phone_number: z.
|
|
325
|
+
phone_number: z.ZodObject<{}, z.core.$strip>;
|
|
326
326
|
}, z.core.$strip>, z.ZodObject<{
|
|
327
327
|
formula: z.ZodObject<{
|
|
328
328
|
expression: z.ZodString;
|
|
@@ -372,20 +372,20 @@ export declare const DatabasePropertySchemaSchema: z.ZodUnion<readonly [z.ZodObj
|
|
|
372
372
|
}>;
|
|
373
373
|
}, z.core.$strip>;
|
|
374
374
|
}, z.core.$strip>, z.ZodObject<{
|
|
375
|
-
created_time: z.
|
|
375
|
+
created_time: z.ZodObject<{}, z.core.$strip>;
|
|
376
376
|
}, z.core.$strip>, z.ZodObject<{
|
|
377
|
-
created_by: z.
|
|
377
|
+
created_by: z.ZodObject<{}, z.core.$strip>;
|
|
378
378
|
}, z.core.$strip>, z.ZodObject<{
|
|
379
|
-
last_edited_time: z.
|
|
379
|
+
last_edited_time: z.ZodObject<{}, z.core.$strip>;
|
|
380
380
|
}, z.core.$strip>, z.ZodObject<{
|
|
381
|
-
last_edited_by: z.
|
|
381
|
+
last_edited_by: z.ZodObject<{}, z.core.$strip>;
|
|
382
382
|
}, z.core.$strip>]>;
|
|
383
383
|
export declare const DatabasePropertiesSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
384
|
-
title: z.
|
|
384
|
+
title: z.ZodObject<{}, z.core.$strip>;
|
|
385
385
|
}, z.core.$strip>, z.ZodObject<{
|
|
386
|
-
rich_text: z.
|
|
386
|
+
rich_text: z.ZodObject<{}, z.core.$strip>;
|
|
387
387
|
}, z.core.$strip>, z.ZodObject<{
|
|
388
|
-
number: z.
|
|
388
|
+
number: z.ZodObject<{
|
|
389
389
|
format: z.ZodOptional<z.ZodEnum<{
|
|
390
390
|
number: "number";
|
|
391
391
|
number_with_commas: "number_with_commas";
|
|
@@ -427,9 +427,9 @@ export declare const DatabasePropertiesSchema: z.ZodRecord<z.ZodString, z.ZodUni
|
|
|
427
427
|
uruguayan_peso: "uruguayan_peso";
|
|
428
428
|
singapore_dollar: "singapore_dollar";
|
|
429
429
|
}>>;
|
|
430
|
-
}, z.core.$strip
|
|
430
|
+
}, z.core.$strip>;
|
|
431
431
|
}, z.core.$strip>, z.ZodObject<{
|
|
432
|
-
select: z.
|
|
432
|
+
select: z.ZodObject<{
|
|
433
433
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
434
434
|
name: z.ZodString;
|
|
435
435
|
color: z.ZodOptional<z.ZodEnum<{
|
|
@@ -445,9 +445,9 @@ export declare const DatabasePropertiesSchema: z.ZodRecord<z.ZodString, z.ZodUni
|
|
|
445
445
|
red: "red";
|
|
446
446
|
}>>;
|
|
447
447
|
}, z.core.$strip>>>;
|
|
448
|
-
}, z.core.$strip
|
|
448
|
+
}, z.core.$strip>;
|
|
449
449
|
}, z.core.$strip>, z.ZodObject<{
|
|
450
|
-
multi_select: z.
|
|
450
|
+
multi_select: z.ZodObject<{
|
|
451
451
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
452
452
|
name: z.ZodString;
|
|
453
453
|
color: z.ZodOptional<z.ZodEnum<{
|
|
@@ -463,23 +463,23 @@ export declare const DatabasePropertiesSchema: z.ZodRecord<z.ZodString, z.ZodUni
|
|
|
463
463
|
red: "red";
|
|
464
464
|
}>>;
|
|
465
465
|
}, z.core.$strip>>>;
|
|
466
|
-
}, z.core.$strip
|
|
466
|
+
}, z.core.$strip>;
|
|
467
467
|
}, z.core.$strip>, z.ZodObject<{
|
|
468
|
-
status: z.
|
|
468
|
+
status: z.ZodObject<{}, z.core.$strip>;
|
|
469
469
|
}, z.core.$strip>, z.ZodObject<{
|
|
470
|
-
date: z.
|
|
470
|
+
date: z.ZodObject<{}, z.core.$strip>;
|
|
471
471
|
}, z.core.$strip>, z.ZodObject<{
|
|
472
|
-
people: z.
|
|
472
|
+
people: z.ZodObject<{}, z.core.$strip>;
|
|
473
473
|
}, z.core.$strip>, z.ZodObject<{
|
|
474
|
-
files: z.
|
|
474
|
+
files: z.ZodObject<{}, z.core.$strip>;
|
|
475
475
|
}, z.core.$strip>, z.ZodObject<{
|
|
476
|
-
checkbox: z.
|
|
476
|
+
checkbox: z.ZodObject<{}, z.core.$strip>;
|
|
477
477
|
}, z.core.$strip>, z.ZodObject<{
|
|
478
|
-
url: z.
|
|
478
|
+
url: z.ZodObject<{}, z.core.$strip>;
|
|
479
479
|
}, z.core.$strip>, z.ZodObject<{
|
|
480
|
-
email: z.
|
|
480
|
+
email: z.ZodObject<{}, z.core.$strip>;
|
|
481
481
|
}, z.core.$strip>, z.ZodObject<{
|
|
482
|
-
phone_number: z.
|
|
482
|
+
phone_number: z.ZodObject<{}, z.core.$strip>;
|
|
483
483
|
}, z.core.$strip>, z.ZodObject<{
|
|
484
484
|
formula: z.ZodObject<{
|
|
485
485
|
expression: z.ZodString;
|
|
@@ -529,13 +529,13 @@ export declare const DatabasePropertiesSchema: z.ZodRecord<z.ZodString, z.ZodUni
|
|
|
529
529
|
}>;
|
|
530
530
|
}, z.core.$strip>;
|
|
531
531
|
}, z.core.$strip>, z.ZodObject<{
|
|
532
|
-
created_time: z.
|
|
532
|
+
created_time: z.ZodObject<{}, z.core.$strip>;
|
|
533
533
|
}, z.core.$strip>, z.ZodObject<{
|
|
534
|
-
created_by: z.
|
|
534
|
+
created_by: z.ZodObject<{}, z.core.$strip>;
|
|
535
535
|
}, z.core.$strip>, z.ZodObject<{
|
|
536
|
-
last_edited_time: z.
|
|
536
|
+
last_edited_time: z.ZodObject<{}, z.core.$strip>;
|
|
537
537
|
}, z.core.$strip>, z.ZodObject<{
|
|
538
|
-
last_edited_by: z.
|
|
538
|
+
last_edited_by: z.ZodObject<{}, z.core.$strip>;
|
|
539
539
|
}, z.core.$strip>]>>;
|
|
540
540
|
export declare const DatabaseTitleSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
541
541
|
type: z.ZodLiteral<"text">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../src/schemas/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,yBAAyB;;iBAEpC,CAAA;AAGF,eAAO,MAAM,4BAA4B;;iBAEvC,CAAA;AAGF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../src/schemas/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,yBAAyB;;iBAEpC,CAAA;AAGF,eAAO,MAAM,4BAA4B;;iBAEvC,CAAA;AAGF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8CrC,CAAA;AAGF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;iBAgB7B,CAAA;AAGF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;iBAIrC,CAAA;AAGF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;iBAI1C,CAAA;AAGF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;iBAiB7B,CAAA;AAGF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;iBAkB5B,CAAA;AAMF,eAAO,MAAM,0BAA0B;;iBAErC,CAAA;AAGF,eAAO,MAAM,wBAAwB;;iBAEnC,CAAA;AAGF,eAAO,MAAM,0BAA0B;;iBAErC,CAAA;AAGF,eAAO,MAAM,yBAAyB;;iBAEpC,CAAA;AAGF,eAAO,MAAM,4BAA4B;;iBAEvC,CAAA;AAGF,eAAO,MAAM,uBAAuB;;iBAElC,CAAA;AAGF,eAAO,MAAM,yBAAyB;;iBAEpC,CAAA;AAGF,eAAO,MAAM,+BAA+B;;iBAE1C,CAAA;AAGF,eAAO,MAAM,2BAA2B;;;;iBAItC,CAAA;AAGF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;iBAYvC,CAAA;AAGF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+BrC,CAAA;AAGF,eAAO,MAAM,+BAA+B;;iBAE1C,CAAA;AAGF,eAAO,MAAM,6BAA6B;;iBAExC,CAAA;AAGF,eAAO,MAAM,kCAAkC;;iBAE7C,CAAA;AAGF,eAAO,MAAM,gCAAgC;;iBAE3C,CAAA;AAGF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAqBvC,CAAA;AAGF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAqD,CAAA;AAG1F,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAsB,CAAA"}
|
|
@@ -2,16 +2,15 @@ import { z } from 'zod';
|
|
|
2
2
|
import { RichTextArraySchema } from './common.js';
|
|
3
3
|
// Title property schema (every database must have exactly one)
|
|
4
4
|
export const TitlePropertySchemaSchema = z.object({
|
|
5
|
-
title: z.object({})
|
|
5
|
+
title: z.object({}),
|
|
6
6
|
});
|
|
7
7
|
// Rich text property schema
|
|
8
8
|
export const RichTextPropertySchemaSchema = z.object({
|
|
9
|
-
rich_text: z.object({})
|
|
9
|
+
rich_text: z.object({}),
|
|
10
10
|
});
|
|
11
11
|
// Number property schema
|
|
12
12
|
export const NumberPropertySchemaSchema = z.object({
|
|
13
|
-
number: z
|
|
14
|
-
.object({
|
|
13
|
+
number: z.object({
|
|
15
14
|
format: z
|
|
16
15
|
.enum([
|
|
17
16
|
'number',
|
|
@@ -55,8 +54,7 @@ export const NumberPropertySchemaSchema = z.object({
|
|
|
55
54
|
'singapore_dollar',
|
|
56
55
|
])
|
|
57
56
|
.optional(),
|
|
58
|
-
})
|
|
59
|
-
.optional(),
|
|
57
|
+
}),
|
|
60
58
|
});
|
|
61
59
|
// Select option schema
|
|
62
60
|
export const SelectOptionSchema = z.object({
|
|
@@ -78,19 +76,15 @@ export const SelectOptionSchema = z.object({
|
|
|
78
76
|
});
|
|
79
77
|
// Select property schema
|
|
80
78
|
export const SelectPropertySchemaSchema = z.object({
|
|
81
|
-
select: z
|
|
82
|
-
.object({
|
|
79
|
+
select: z.object({
|
|
83
80
|
options: z.array(SelectOptionSchema).optional(),
|
|
84
|
-
})
|
|
85
|
-
.optional(),
|
|
81
|
+
}),
|
|
86
82
|
});
|
|
87
83
|
// Multi-select property schema
|
|
88
84
|
export const MultiSelectPropertySchemaSchema = z.object({
|
|
89
|
-
multi_select: z
|
|
90
|
-
.object({
|
|
85
|
+
multi_select: z.object({
|
|
91
86
|
options: z.array(SelectOptionSchema).optional(),
|
|
92
|
-
})
|
|
93
|
-
.optional(),
|
|
87
|
+
}),
|
|
94
88
|
});
|
|
95
89
|
// Status option schema (with groups)
|
|
96
90
|
export const StatusOptionSchema = z.object({
|
|
@@ -136,35 +130,35 @@ export const StatusGroupSchema = z.object({
|
|
|
136
130
|
// Notion automatically creates default options (Not started, In progress, Done).
|
|
137
131
|
// Options can only be modified after the database is created.
|
|
138
132
|
export const StatusPropertySchemaSchema = z.object({
|
|
139
|
-
status: z.object({})
|
|
133
|
+
status: z.object({}),
|
|
140
134
|
});
|
|
141
135
|
// Date property schema
|
|
142
136
|
export const DatePropertySchemaSchema = z.object({
|
|
143
|
-
date: z.object({})
|
|
137
|
+
date: z.object({}),
|
|
144
138
|
});
|
|
145
139
|
// People property schema
|
|
146
140
|
export const PeoplePropertySchemaSchema = z.object({
|
|
147
|
-
people: z.object({})
|
|
141
|
+
people: z.object({}),
|
|
148
142
|
});
|
|
149
143
|
// Files property schema
|
|
150
144
|
export const FilesPropertySchemaSchema = z.object({
|
|
151
|
-
files: z.object({})
|
|
145
|
+
files: z.object({}),
|
|
152
146
|
});
|
|
153
147
|
// Checkbox property schema
|
|
154
148
|
export const CheckboxPropertySchemaSchema = z.object({
|
|
155
|
-
checkbox: z.object({})
|
|
149
|
+
checkbox: z.object({}),
|
|
156
150
|
});
|
|
157
151
|
// URL property schema
|
|
158
152
|
export const UrlPropertySchemaSchema = z.object({
|
|
159
|
-
url: z.object({})
|
|
153
|
+
url: z.object({}),
|
|
160
154
|
});
|
|
161
155
|
// Email property schema
|
|
162
156
|
export const EmailPropertySchemaSchema = z.object({
|
|
163
|
-
email: z.object({})
|
|
157
|
+
email: z.object({}),
|
|
164
158
|
});
|
|
165
159
|
// Phone number property schema
|
|
166
160
|
export const PhoneNumberPropertySchemaSchema = z.object({
|
|
167
|
-
phone_number: z.object({})
|
|
161
|
+
phone_number: z.object({}),
|
|
168
162
|
});
|
|
169
163
|
// Formula property schema
|
|
170
164
|
export const FormulaPropertySchemaSchema = z.object({
|
|
@@ -221,19 +215,19 @@ export const RollupPropertySchemaSchema = z.object({
|
|
|
221
215
|
});
|
|
222
216
|
// Created time property schema (read-only, auto-generated)
|
|
223
217
|
export const CreatedTimePropertySchemaSchema = z.object({
|
|
224
|
-
created_time: z.object({})
|
|
218
|
+
created_time: z.object({}),
|
|
225
219
|
});
|
|
226
220
|
// Created by property schema (read-only, auto-generated)
|
|
227
221
|
export const CreatedByPropertySchemaSchema = z.object({
|
|
228
|
-
created_by: z.object({})
|
|
222
|
+
created_by: z.object({}),
|
|
229
223
|
});
|
|
230
224
|
// Last edited time property schema (read-only, auto-generated)
|
|
231
225
|
export const LastEditedTimePropertySchemaSchema = z.object({
|
|
232
|
-
last_edited_time: z.object({})
|
|
226
|
+
last_edited_time: z.object({}),
|
|
233
227
|
});
|
|
234
228
|
// Last edited by property schema (read-only, auto-generated)
|
|
235
229
|
export const LastEditedByPropertySchemaSchema = z.object({
|
|
236
|
-
last_edited_by: z.object({})
|
|
230
|
+
last_edited_by: z.object({}),
|
|
237
231
|
});
|
|
238
232
|
// Combined database property schema
|
|
239
233
|
export const DatabasePropertySchemaSchema = z.union([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"append-block-children.d.ts","sourceRoot":"","sources":["../../../src/tools/append-block-children.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"append-block-children.d.ts","sourceRoot":"","sources":["../../../src/tools/append-block-children.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAWvD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAiCzF"}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { BlockChildrenSchema } from '../schemas/block.js';
|
|
3
2
|
import { formatResponse, handleError } from '../utils/index.js';
|
|
3
|
+
// Minimal schema for MCP (full validation by Notion API)
|
|
4
4
|
const inputSchema = {
|
|
5
|
-
block_id: z.string().describe('
|
|
6
|
-
children:
|
|
7
|
-
|
|
8
|
-
'Example: [{ "type": "paragraph", "paragraph": { "rich_text": [{ "text": { "content": "Hello" } }] } }]'),
|
|
9
|
-
after: z
|
|
10
|
-
.string()
|
|
11
|
-
.optional()
|
|
12
|
-
.describe('The ID of a block to insert the new children after. ' +
|
|
13
|
-
'If not provided, children are appended at the end.'),
|
|
5
|
+
block_id: z.string().describe('Block or page ID'),
|
|
6
|
+
children: z.array(z.any()).describe('Block objects to append'),
|
|
7
|
+
after: z.string().optional().describe('Insert after this block ID'),
|
|
14
8
|
};
|
|
15
9
|
export function registerAppendBlockChildren(server, notion) {
|
|
16
10
|
server.registerTool('append-block-children', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-comment.d.ts","sourceRoot":"","sources":["../../../src/tools/create-comment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"create-comment.d.ts","sourceRoot":"","sources":["../../../src/tools/create-comment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAUvD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAqCnF"}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { RichTextArraySchema } from '../schemas/common.js';
|
|
3
2
|
import { formatResponse, handleError } from '../utils/index.js';
|
|
3
|
+
// Minimal schema for MCP (full validation by Notion API)
|
|
4
4
|
const inputSchema = {
|
|
5
|
-
page_id: z.string().describe('
|
|
6
|
-
rich_text:
|
|
7
|
-
|
|
8
|
-
'Example: [{ "type": "text", "text": { "content": "This is a comment" } }]'),
|
|
9
|
-
discussion_id: z
|
|
10
|
-
.string()
|
|
11
|
-
.optional()
|
|
12
|
-
.describe('Optional ID of an existing discussion to add the comment to. ' +
|
|
13
|
-
'If not provided, a new discussion is created.'),
|
|
5
|
+
page_id: z.string().describe('Page ID'),
|
|
6
|
+
rich_text: z.array(z.any()).describe('Comment content as rich text'),
|
|
7
|
+
discussion_id: z.string().optional().describe('Reply to existing discussion'),
|
|
14
8
|
};
|
|
15
9
|
export function registerCreateComment(server, notion) {
|
|
16
10
|
server.registerTool('create-comment', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-database.d.ts","sourceRoot":"","sources":["../../../src/tools/create-database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"create-database.d.ts","sourceRoot":"","sources":["../../../src/tools/create-database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAavD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAgDpF"}
|
|
@@ -1,27 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { CoverSchema, IconSchema, RichTextArraySchema, } from '../schemas/common.js';
|
|
3
|
-
import { DatabasePropertiesSchema } from '../schemas/database.js';
|
|
4
2
|
import { formatResponse, handleError } from '../utils/index.js';
|
|
3
|
+
// Minimal schema for MCP (full validation by Notion API)
|
|
5
4
|
const inputSchema = {
|
|
6
|
-
parent_page_id: z
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
'Each database must have exactly one "title" property. ' +
|
|
13
|
-
'Supported types: title, rich_text, number, select, multi_select, date, people, files, checkbox, url, email, phone_number, formula, relation, rollup, created_time, created_by, last_edited_time, last_edited_by. ' +
|
|
14
|
-
'Example: { "Name": { "title": {} }, "Description": { "rich_text": {} }, "Price": { "number": { "format": "dollar" } }, "Tags": { "multi_select": { "options": [{ "name": "Tag1", "color": "blue" }] } } }'),
|
|
15
|
-
icon: IconSchema.optional().describe('Optional icon for the database. ' +
|
|
16
|
-
'Emoji: { "type": "emoji", "emoji": "📊" }. ' +
|
|
17
|
-
'External: { "type": "external", "external": { "url": "https://..." } }'),
|
|
18
|
-
cover: CoverSchema.optional().describe('Optional cover image for the database. ' +
|
|
19
|
-
'Example: { "type": "external", "external": { "url": "https://..." } }'),
|
|
20
|
-
is_inline: z
|
|
21
|
-
.boolean()
|
|
22
|
-
.optional()
|
|
23
|
-
.describe('Optional. If true, the database will appear as an inline database within the parent page. ' +
|
|
24
|
-
'If false or omitted, it will be a full page database.'),
|
|
5
|
+
parent_page_id: z.string().describe('Parent page ID'),
|
|
6
|
+
title: z.array(z.any()).optional().describe('Database title'),
|
|
7
|
+
properties: z.record(z.string(), z.any()).describe('Property schema (must include one title property)'),
|
|
8
|
+
icon: z.any().optional().describe('Database icon'),
|
|
9
|
+
cover: z.any().optional().describe('Cover image'),
|
|
10
|
+
is_inline: z.boolean().optional().describe('Inline database'),
|
|
25
11
|
};
|
|
26
12
|
export function registerCreateDatabase(server, notion) {
|
|
27
13
|
server.registerTool('create-database', {
|
|
@@ -47,6 +33,7 @@ export function registerCreateDatabase(server, notion) {
|
|
|
47
33
|
if (is_inline !== undefined) {
|
|
48
34
|
params.is_inline = is_inline;
|
|
49
35
|
}
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
37
|
const response = await notion.databases.create(params);
|
|
51
38
|
return formatResponse(response);
|
|
52
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-page.d.ts","sourceRoot":"","sources":["../../../src/tools/create-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"create-page.d.ts","sourceRoot":"","sources":["../../../src/tools/create-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAkBvD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CA0ChF"}
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { BlockChildrenSchema } from '../schemas/block.js';
|
|
3
|
-
import { CoverSchema, IconSchema } from '../schemas/common.js';
|
|
4
|
-
import { PropertiesSchema } from '../schemas/page.js';
|
|
5
2
|
import { formatResponse, handleError } from '../utils/index.js';
|
|
3
|
+
// Minimal schema for MCP (full validation by Notion API)
|
|
6
4
|
const inputSchema = {
|
|
7
|
-
database_id: z.string().describe('
|
|
8
|
-
properties:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
'Supported types: paragraph, heading_1/2/3, bulleted_list_item, numbered_list_item, to_do, toggle, code, quote, callout, divider, bookmark, image, video, embed, table_of_contents. ' +
|
|
13
|
-
'Example: [{ "type": "paragraph", "paragraph": { "rich_text": [{ "text": { "content": "Hello" } }] } }]'),
|
|
14
|
-
icon: IconSchema.optional().describe('Optional icon for the page. ' +
|
|
15
|
-
'Emoji: { "type": "emoji", "emoji": "🚀" }. ' +
|
|
16
|
-
'External: { "type": "external", "external": { "url": "https://..." } }'),
|
|
17
|
-
cover: CoverSchema.optional().describe('Optional cover image for the page. ' +
|
|
18
|
-
'Example: { "type": "external", "external": { "url": "https://..." } }'),
|
|
5
|
+
database_id: z.string().describe('Database ID'),
|
|
6
|
+
properties: z.record(z.string(), z.any()).describe('Notion properties object'),
|
|
7
|
+
children: z.array(z.any()).optional().describe('Block objects array'),
|
|
8
|
+
icon: z.any().optional().describe('Page icon'),
|
|
9
|
+
cover: z.any().optional().describe('Cover image'),
|
|
19
10
|
};
|
|
20
11
|
export function registerCreatePage(server, notion) {
|
|
21
12
|
server.registerTool('create-page', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-database.d.ts","sourceRoot":"","sources":["../../../src/tools/query-database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAGxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"query-database.d.ts","sourceRoot":"","sources":["../../../src/tools/query-database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAGxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AA8BvD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAgDnF"}
|
|
@@ -1,31 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { pagesToSimple } from '../converters/index.js';
|
|
3
|
-
import { FilterSchema, SortsSchema } from '../schemas/filter.js';
|
|
4
3
|
import { formatPaginatedResponse, formatSimplePaginatedResponse, handleError, } from '../utils/index.js';
|
|
4
|
+
// Minimal schema for MCP (full validation by Notion API)
|
|
5
5
|
const inputSchema = {
|
|
6
|
-
database_id: z.string().describe('
|
|
7
|
-
filter:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
'By property: { "property": "Name", "direction": "ascending" }. ' +
|
|
13
|
-
'By timestamp: { "timestamp": "created_time", "direction": "descending" }.'),
|
|
14
|
-
start_cursor: z
|
|
15
|
-
.string()
|
|
16
|
-
.optional()
|
|
17
|
-
.describe('Cursor for pagination. Use the next_cursor from previous response.'),
|
|
18
|
-
page_size: z
|
|
19
|
-
.number()
|
|
20
|
-
.min(1)
|
|
21
|
-
.max(100)
|
|
22
|
-
.optional()
|
|
23
|
-
.describe('Number of results to return (1-100). Default is 100.'),
|
|
24
|
-
format: z
|
|
25
|
-
.enum(['json', 'simple'])
|
|
26
|
-
.optional()
|
|
27
|
-
.default('simple')
|
|
28
|
-
.describe("Output format: 'simple' (default) returns simplified property values with reduced token usage, 'json' returns raw Notion API response"),
|
|
6
|
+
database_id: z.string().describe('Database ID'),
|
|
7
|
+
filter: z.any().optional().describe('Filter conditions'),
|
|
8
|
+
sorts: z.array(z.any()).optional().describe('Sort conditions'),
|
|
9
|
+
start_cursor: z.string().optional().describe('Pagination cursor'),
|
|
10
|
+
page_size: z.number().optional().describe('Results per page (1-100)'),
|
|
11
|
+
format: z.enum(['json', 'simple']).optional().describe('Output format (default: simple)'),
|
|
29
12
|
};
|
|
30
13
|
export function registerQueryDatabase(server, notion) {
|
|
31
14
|
server.registerTool('query-database', {
|
|
@@ -46,6 +29,7 @@ export function registerQueryDatabase(server, notion) {
|
|
|
46
29
|
if (page_size) {
|
|
47
30
|
params.page_size = page_size;
|
|
48
31
|
}
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
33
|
const response = await notion.databases.query(params);
|
|
50
34
|
if (format === 'simple') {
|
|
51
35
|
const simplePages = pagesToSimple(response.results);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-database.d.ts","sourceRoot":"","sources":["../../../src/tools/update-database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"update-database.d.ts","sourceRoot":"","sources":["../../../src/tools/update-database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAevD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CA4DpF"}
|
|
@@ -1,37 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { CoverSchema, IconSchema, RichTextArraySchema, } from '../schemas/common.js';
|
|
3
|
-
import { DatabasePropertiesSchema } from '../schemas/database.js';
|
|
4
2
|
import { formatResponse, handleError } from '../utils/index.js';
|
|
3
|
+
// Minimal schema for MCP (full validation by Notion API)
|
|
5
4
|
const inputSchema = {
|
|
6
|
-
database_id: z.string().describe('
|
|
7
|
-
title:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
'To delete a property, set it to null. ' +
|
|
15
|
-
'Supported types: title, rich_text, number, select, multi_select, date, people, files, checkbox, url, email, phone_number, formula, relation, rollup, created_time, created_by, last_edited_time, last_edited_by. ' +
|
|
16
|
-
'Example: { "NewColumn": { "rich_text": {} }, "Price": { "number": { "format": "euro" } } }'),
|
|
17
|
-
icon: IconSchema.nullable()
|
|
18
|
-
.optional()
|
|
19
|
-
.describe('Optional icon for the database. Set to null to remove the icon. ' +
|
|
20
|
-
'Emoji: { "type": "emoji", "emoji": "📊" }. ' +
|
|
21
|
-
'External: { "type": "external", "external": { "url": "https://..." } }'),
|
|
22
|
-
cover: CoverSchema.nullable()
|
|
23
|
-
.optional()
|
|
24
|
-
.describe('Optional cover image for the database. Set to null to remove the cover. ' +
|
|
25
|
-
'Example: { "type": "external", "external": { "url": "https://..." } }'),
|
|
26
|
-
is_inline: z
|
|
27
|
-
.boolean()
|
|
28
|
-
.optional()
|
|
29
|
-
.describe('Optional. If true, the database will appear as an inline database. ' +
|
|
30
|
-
'If false, it will be a full page database.'),
|
|
31
|
-
archived: z
|
|
32
|
-
.boolean()
|
|
33
|
-
.optional()
|
|
34
|
-
.describe('Optional. Set to true to archive the database, false to unarchive.'),
|
|
5
|
+
database_id: z.string().describe('Database ID'),
|
|
6
|
+
title: z.array(z.any()).optional().describe('New title'),
|
|
7
|
+
description: z.array(z.any()).optional().describe('New description'),
|
|
8
|
+
properties: z.record(z.string(), z.any()).optional().describe('Properties to add/update/delete'),
|
|
9
|
+
icon: z.any().optional().describe('Icon (null to remove)'),
|
|
10
|
+
cover: z.any().optional().describe('Cover (null to remove)'),
|
|
11
|
+
is_inline: z.boolean().optional().describe('Inline database'),
|
|
12
|
+
archived: z.boolean().optional().describe('Archive status'),
|
|
35
13
|
};
|
|
36
14
|
export function registerUpdateDatabase(server, notion) {
|
|
37
15
|
server.registerTool('update-database', {
|
|
@@ -64,6 +42,7 @@ export function registerUpdateDatabase(server, notion) {
|
|
|
64
42
|
if (archived !== undefined) {
|
|
65
43
|
params.archived = archived;
|
|
66
44
|
}
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
67
46
|
const response = await notion.databases.update(params);
|
|
68
47
|
return formatResponse(response);
|
|
69
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-page.d.ts","sourceRoot":"","sources":["../../../src/tools/update-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"update-page.d.ts","sourceRoot":"","sources":["../../../src/tools/update-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAiBvD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CA4ChF"}
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { CoverSchema, IconSchema } from '../schemas/common.js';
|
|
3
|
-
import { PropertiesSchema } from '../schemas/page.js';
|
|
4
2
|
import { formatResponse, handleError } from '../utils/index.js';
|
|
3
|
+
// Minimal schema for MCP (full validation by Notion API)
|
|
5
4
|
const inputSchema = {
|
|
6
|
-
page_id: z.string().describe('
|
|
7
|
-
properties:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
icon: IconSchema.nullable()
|
|
12
|
-
.optional()
|
|
13
|
-
.describe('Icon for the page. ' +
|
|
14
|
-
'Emoji: { "type": "emoji", "emoji": "🚀" }. ' +
|
|
15
|
-
'External: { "type": "external", "external": { "url": "https://..." } }. ' +
|
|
16
|
-
'Set to null to remove.'),
|
|
17
|
-
cover: CoverSchema.nullable()
|
|
18
|
-
.optional()
|
|
19
|
-
.describe('Cover image for the page. ' +
|
|
20
|
-
'Example: { "type": "external", "external": { "url": "https://..." } }. ' +
|
|
21
|
-
'Set to null to remove.'),
|
|
5
|
+
page_id: z.string().describe('Page ID'),
|
|
6
|
+
properties: z.record(z.string(), z.any()).optional().describe('Properties to update'),
|
|
7
|
+
archived: z.boolean().optional().describe('Archive the page'),
|
|
8
|
+
icon: z.any().optional().describe('Page icon (null to remove)'),
|
|
9
|
+
cover: z.any().optional().describe('Cover image (null to remove)'),
|
|
22
10
|
};
|
|
23
11
|
export function registerUpdatePage(server, notion) {
|
|
24
12
|
server.registerTool('update-page', {
|