notion-mcp-server 1.0.0 → 2.4.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/README.md +383 -192
- package/build/config/index.js +3 -1
- package/build/dispatch/concurrency.js +15 -0
- package/build/dispatch/idempotency.js +38 -0
- package/build/dispatch/index.js +175 -0
- package/build/dispatch/rate-limit.js +56 -0
- package/build/dispatch/retry.js +97 -0
- package/build/index.js +1 -1
- package/build/markdown/parse.js +265 -0
- package/build/operations/blocks.js +331 -0
- package/build/operations/comments.js +191 -0
- package/build/operations/data-sources.js +85 -0
- package/build/operations/databases.js +345 -0
- package/build/operations/files.js +239 -0
- package/build/operations/index.js +19 -0
- package/build/operations/pages.js +486 -0
- package/build/operations/registry.js +16 -0
- package/build/operations/users.js +101 -0
- package/build/prompts/index.js +105 -0
- package/build/schema/blocks.js +19 -77
- package/build/schema/database.js +27 -86
- package/build/schema/emit.js +68 -0
- package/build/schema/file.js +1 -1
- package/build/schema/filter-dsl.js +333 -0
- package/build/schema/icon.js +1 -1
- package/build/schema/page-properties.js +17 -3
- package/build/schema/page.js +12 -88
- package/build/schema/refs.js +16 -0
- package/build/schema/rich-text.js +1 -1
- package/build/server/index.js +15 -2
- package/build/services/auth.js +19 -0
- package/build/services/notion.js +14 -17
- package/build/tools/index.js +119 -51
- package/build/utils/error.js +125 -86
- package/build/utils/handler.js +11 -0
- package/build/utils/learning-error.js +40 -0
- package/build/utils/notion-types.js +16 -0
- package/build/utils/paginate.js +35 -0
- package/build/utils/schema-slice.js +156 -0
- package/build/utils/slim.js +269 -0
- package/package.json +13 -7
- package/build/resources/imageList.js +0 -62
- package/build/resources/index.js +0 -1
- package/build/resources/predictionList.js +0 -43
- package/build/resources/svgList.js +0 -69
- package/build/schema/comments.js +0 -34
- package/build/schema/notion.js +0 -57
- package/build/schema/richText.js +0 -757
- package/build/schema/tools.js +0 -17
- package/build/schema/users.js +0 -13
- package/build/services/replicate.js +0 -23
- package/build/tools/appendBlockChildren.js +0 -25
- package/build/tools/batchAppendBlockChildren.js +0 -33
- package/build/tools/batchDeleteBlocks.js +0 -32
- package/build/tools/batchMixedOperations.js +0 -58
- package/build/tools/batchUpdateBlocks.js +0 -33
- package/build/tools/comments.js +0 -62
- package/build/tools/createDatabase.js +0 -18
- package/build/tools/createPage.js +0 -18
- package/build/tools/createPrediction.js +0 -28
- package/build/tools/deleteBlock.js +0 -24
- package/build/tools/formatRichText.js +0 -83
- package/build/tools/generateImage.js +0 -48
- package/build/tools/generateImageVariants.js +0 -105
- package/build/tools/generateMultipleImages.js +0 -60
- package/build/tools/generateSVG.js +0 -43
- package/build/tools/getPrediction.js +0 -22
- package/build/tools/predictionList.js +0 -30
- package/build/tools/queryDatabase.js +0 -22
- package/build/tools/retrieveBlock.js +0 -24
- package/build/tools/retrieveBlockChildren.js +0 -32
- package/build/tools/searchPage.js +0 -24
- package/build/tools/updateBlock.js +0 -25
- package/build/tools/updateDatabase.js +0 -18
- package/build/tools/updatePage.js +0 -40
- package/build/tools/updatePageProperties.js +0 -21
- package/build/tools/users.js +0 -62
- package/build/types/blocks.js +0 -11
- package/build/types/comments.js +0 -6
- package/build/types/database.js +0 -5
- package/build/types/notion.js +0 -1
- package/build/types/page.js +0 -7
- package/build/types/richText.js +0 -1
- package/build/types/tools.js +0 -1
- package/build/types/users.js +0 -5
- package/build/utils/blob.js +0 -5
- package/build/utils/image.js +0 -34
- package/build/utils/index.js +0 -1
- package/build/utils/richText.js +0 -174
- package/build/validation/blocks.js +0 -568
- package/build/validation/notion.js +0 -51
- package/build/validation/page.js +0 -262
- package/build/validation/richText.js +0 -744
- package/build/validation/tools.js +0 -16
- /package/build/{types/index.js → operations/types.js} +0 -0
package/build/schema/notion.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
// import { z } from "zod";
|
|
2
|
-
// import { richTextSchema } from "./richText.js";
|
|
3
|
-
export {};
|
|
4
|
-
// export const parentSchema = z
|
|
5
|
-
// .object({
|
|
6
|
-
// type: z.enum(["page_id", "database_id"]),
|
|
7
|
-
// page_id: z.string().optional(),
|
|
8
|
-
// database_id: z.string().optional(),
|
|
9
|
-
// })
|
|
10
|
-
// .refine(
|
|
11
|
-
// (data) => {
|
|
12
|
-
// if (data.type === "page_id" && !data.page_id) return false;
|
|
13
|
-
// if (data.type === "database_id" && !data.database_id) return false;
|
|
14
|
-
// return true;
|
|
15
|
-
// },
|
|
16
|
-
// {
|
|
17
|
-
// message:
|
|
18
|
-
// "page_id must be provided when type is page_id, database_id must be provided when type is database_id",
|
|
19
|
-
// }
|
|
20
|
-
// );
|
|
21
|
-
// export const pageParentPropertiesSchema = z.object({
|
|
22
|
-
// title: z.object({
|
|
23
|
-
// title: richTextSchema,
|
|
24
|
-
// }),
|
|
25
|
-
// });
|
|
26
|
-
// export const databaseParentPropertiesSchema = z.record(
|
|
27
|
-
// z.string(),
|
|
28
|
-
// z.union([
|
|
29
|
-
// z.object({ title: richTextSchema }),
|
|
30
|
-
// z.object({ rich_text: richTextSchema }),
|
|
31
|
-
// z.object({ number: z.number().optional().nullable() }),
|
|
32
|
-
// z.object({ select: z.object({ name: z.string() }).optional().nullable() }),
|
|
33
|
-
// z.object({
|
|
34
|
-
// multi_select: z.array(z.object({ name: z.string() })).optional(),
|
|
35
|
-
// }),
|
|
36
|
-
// z.object({
|
|
37
|
-
// date: z
|
|
38
|
-
// .object({
|
|
39
|
-
// start: z.string(),
|
|
40
|
-
// end: z.string().optional(),
|
|
41
|
-
// time_zone: z.string().optional(),
|
|
42
|
-
// })
|
|
43
|
-
// .optional()
|
|
44
|
-
// .nullable(),
|
|
45
|
-
// }),
|
|
46
|
-
// z.object({ checkbox: z.boolean().optional() }),
|
|
47
|
-
// z.object({ url: z.string().url().optional().nullable() }),
|
|
48
|
-
// z.object({ email: z.string().email().optional().nullable() }),
|
|
49
|
-
// z.object({ phone_number: z.string().optional().nullable() }),
|
|
50
|
-
// ])
|
|
51
|
-
// );
|
|
52
|
-
// export const blockSchema = z
|
|
53
|
-
// .object({
|
|
54
|
-
// object: z.literal("block"),
|
|
55
|
-
// type: z.string(),
|
|
56
|
-
// })
|
|
57
|
-
// .and(z.record(z.string(), z.any()));
|