@keystrokehq/notion 0.1.0 → 0.1.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/README.md +1 -1
- package/dist/action.cjs.map +1 -1
- package/dist/action.mjs.map +1 -1
- package/dist/actions/add-multiple-page-content.cjs +13 -13
- package/dist/actions/add-multiple-page-content.cjs.map +1 -1
- package/dist/actions/add-multiple-page-content.d.cts +90 -3
- package/dist/actions/add-multiple-page-content.d.cts.map +1 -1
- package/dist/actions/add-multiple-page-content.d.mts +90 -3
- package/dist/actions/add-multiple-page-content.d.mts.map +1 -1
- package/dist/actions/add-multiple-page-content.mjs +13 -13
- package/dist/actions/add-multiple-page-content.mjs.map +1 -1
- package/dist/actions/append-code-blocks.cjs +100 -100
- package/dist/actions/append-code-blocks.cjs.map +1 -1
- package/dist/actions/append-code-blocks.d.cts +867 -3
- package/dist/actions/append-code-blocks.d.cts.map +1 -1
- package/dist/actions/append-code-blocks.d.mts +867 -3
- package/dist/actions/append-code-blocks.d.mts.map +1 -1
- package/dist/actions/append-code-blocks.mjs +100 -100
- package/dist/actions/append-code-blocks.mjs.map +1 -1
- package/dist/actions/append-layout-blocks.cjs +91 -91
- package/dist/actions/append-layout-blocks.cjs.map +1 -1
- package/dist/actions/append-layout-blocks.d.cts +652 -3
- package/dist/actions/append-layout-blocks.d.cts.map +1 -1
- package/dist/actions/append-layout-blocks.d.mts +652 -3
- package/dist/actions/append-layout-blocks.d.mts.map +1 -1
- package/dist/actions/append-layout-blocks.mjs +91 -91
- package/dist/actions/append-layout-blocks.mjs.map +1 -1
- package/dist/actions/append-media-blocks.cjs +125 -125
- package/dist/actions/append-media-blocks.cjs.map +1 -1
- package/dist/actions/append-media-blocks.d.cts +1039 -3
- package/dist/actions/append-media-blocks.d.cts.map +1 -1
- package/dist/actions/append-media-blocks.d.mts +1039 -3
- package/dist/actions/append-media-blocks.d.mts.map +1 -1
- package/dist/actions/append-media-blocks.mjs +125 -125
- package/dist/actions/append-media-blocks.mjs.map +1 -1
- package/dist/actions/append-table-blocks.cjs +87 -87
- package/dist/actions/append-table-blocks.cjs.map +1 -1
- package/dist/actions/append-table-blocks.d.cts +630 -3
- package/dist/actions/append-table-blocks.d.cts.map +1 -1
- package/dist/actions/append-table-blocks.d.mts +630 -3
- package/dist/actions/append-table-blocks.d.mts.map +1 -1
- package/dist/actions/append-table-blocks.mjs +87 -87
- package/dist/actions/append-table-blocks.mjs.map +1 -1
- package/dist/actions/append-task-blocks.cjs +101 -101
- package/dist/actions/append-task-blocks.cjs.map +1 -1
- package/dist/actions/append-task-blocks.d.cts +845 -3
- package/dist/actions/append-task-blocks.d.cts.map +1 -1
- package/dist/actions/append-task-blocks.d.mts +845 -3
- package/dist/actions/append-task-blocks.d.mts.map +1 -1
- package/dist/actions/append-task-blocks.mjs +101 -101
- package/dist/actions/append-task-blocks.mjs.map +1 -1
- package/dist/actions/append-text-blocks.cjs +118 -118
- package/dist/actions/append-text-blocks.cjs.map +1 -1
- package/dist/actions/append-text-blocks.d.cts +1116 -3
- package/dist/actions/append-text-blocks.d.cts.map +1 -1
- package/dist/actions/append-text-blocks.d.mts +1116 -3
- package/dist/actions/append-text-blocks.d.mts.map +1 -1
- package/dist/actions/append-text-blocks.mjs +118 -118
- package/dist/actions/append-text-blocks.mjs.map +1 -1
- package/dist/actions/archive-notion-page.cjs +43 -43
- package/dist/actions/archive-notion-page.cjs.map +1 -1
- package/dist/actions/archive-notion-page.d.cts +78 -3
- package/dist/actions/archive-notion-page.d.cts.map +1 -1
- package/dist/actions/archive-notion-page.d.mts +78 -3
- package/dist/actions/archive-notion-page.d.mts.map +1 -1
- package/dist/actions/archive-notion-page.mjs +43 -43
- package/dist/actions/archive-notion-page.mjs.map +1 -1
- package/dist/actions/create-comment.cjs.map +1 -1
- package/dist/actions/create-comment.d.cts +46 -3
- package/dist/actions/create-comment.d.cts.map +1 -1
- package/dist/actions/create-comment.d.mts +46 -3
- package/dist/actions/create-comment.d.mts.map +1 -1
- package/dist/actions/create-comment.mjs.map +1 -1
- package/dist/actions/create-database.cjs +44 -44
- package/dist/actions/create-database.cjs.map +1 -1
- package/dist/actions/create-database.d.cts +140 -3
- package/dist/actions/create-database.d.cts.map +1 -1
- package/dist/actions/create-database.d.mts +140 -3
- package/dist/actions/create-database.d.mts.map +1 -1
- package/dist/actions/create-database.mjs +44 -44
- package/dist/actions/create-database.mjs.map +1 -1
- package/dist/actions/create-file-upload.cjs +9 -9
- package/dist/actions/create-file-upload.cjs.map +1 -1
- package/dist/actions/create-file-upload.d.cts +38 -3
- package/dist/actions/create-file-upload.d.cts.map +1 -1
- package/dist/actions/create-file-upload.d.mts +38 -3
- package/dist/actions/create-file-upload.d.mts.map +1 -1
- package/dist/actions/create-file-upload.mjs +9 -9
- package/dist/actions/create-file-upload.mjs.map +1 -1
- package/dist/actions/create-notion-page.cjs +41 -41
- package/dist/actions/create-notion-page.cjs.map +1 -1
- package/dist/actions/create-notion-page.d.cts +83 -3
- package/dist/actions/create-notion-page.d.cts.map +1 -1
- package/dist/actions/create-notion-page.d.mts +83 -3
- package/dist/actions/create-notion-page.d.mts.map +1 -1
- package/dist/actions/create-notion-page.mjs +41 -41
- package/dist/actions/create-notion-page.mjs.map +1 -1
- package/dist/actions/delete-block.cjs +84 -84
- package/dist/actions/delete-block.cjs.map +1 -1
- package/dist/actions/delete-block.d.cts +2181 -3
- package/dist/actions/delete-block.d.cts.map +1 -1
- package/dist/actions/delete-block.d.mts +2181 -3
- package/dist/actions/delete-block.d.mts.map +1 -1
- package/dist/actions/delete-block.mjs +84 -84
- package/dist/actions/delete-block.mjs.map +1 -1
- package/dist/actions/duplicate-page.cjs +49 -49
- package/dist/actions/duplicate-page.cjs.map +1 -1
- package/dist/actions/duplicate-page.d.cts +90 -3
- package/dist/actions/duplicate-page.d.cts.map +1 -1
- package/dist/actions/duplicate-page.d.mts +90 -3
- package/dist/actions/duplicate-page.d.mts.map +1 -1
- package/dist/actions/duplicate-page.mjs +49 -49
- package/dist/actions/duplicate-page.mjs.map +1 -1
- package/dist/actions/fetch-all-block-contents.cjs +91 -91
- package/dist/actions/fetch-all-block-contents.cjs.map +1 -1
- package/dist/actions/fetch-all-block-contents.d.cts +38 -3
- package/dist/actions/fetch-all-block-contents.d.cts.map +1 -1
- package/dist/actions/fetch-all-block-contents.d.mts +38 -3
- package/dist/actions/fetch-all-block-contents.d.mts.map +1 -1
- package/dist/actions/fetch-all-block-contents.mjs +91 -91
- package/dist/actions/fetch-all-block-contents.mjs.map +1 -1
- package/dist/actions/fetch-block-contents.cjs +97 -97
- package/dist/actions/fetch-block-contents.cjs.map +1 -1
- package/dist/actions/fetch-block-contents.d.cts +687 -3
- package/dist/actions/fetch-block-contents.d.cts.map +1 -1
- package/dist/actions/fetch-block-contents.d.mts +687 -3
- package/dist/actions/fetch-block-contents.d.mts.map +1 -1
- package/dist/actions/fetch-block-contents.mjs +97 -97
- package/dist/actions/fetch-block-contents.mjs.map +1 -1
- package/dist/actions/fetch-block-metadata.cjs +81 -81
- package/dist/actions/fetch-block-metadata.cjs.map +1 -1
- package/dist/actions/fetch-block-metadata.d.cts +2103 -3
- package/dist/actions/fetch-block-metadata.d.cts.map +1 -1
- package/dist/actions/fetch-block-metadata.d.mts +2103 -3
- package/dist/actions/fetch-block-metadata.d.mts.map +1 -1
- package/dist/actions/fetch-block-metadata.mjs +81 -81
- package/dist/actions/fetch-block-metadata.mjs.map +1 -1
- package/dist/actions/fetch-comments.cjs +55 -55
- package/dist/actions/fetch-comments.cjs.map +1 -1
- package/dist/actions/fetch-comments.d.cts +148 -3
- package/dist/actions/fetch-comments.d.cts.map +1 -1
- package/dist/actions/fetch-comments.d.mts +148 -3
- package/dist/actions/fetch-comments.d.mts.map +1 -1
- package/dist/actions/fetch-comments.mjs +55 -55
- package/dist/actions/fetch-comments.mjs.map +1 -1
- package/dist/actions/fetch-data.cjs +76 -76
- package/dist/actions/fetch-data.cjs.map +1 -1
- package/dist/actions/fetch-data.d.cts +594 -3
- package/dist/actions/fetch-data.d.cts.map +1 -1
- package/dist/actions/fetch-data.d.mts +594 -3
- package/dist/actions/fetch-data.d.mts.map +1 -1
- package/dist/actions/fetch-data.mjs +76 -76
- package/dist/actions/fetch-data.mjs.map +1 -1
- package/dist/actions/fetch-database.cjs +38 -38
- package/dist/actions/fetch-database.cjs.map +1 -1
- package/dist/actions/fetch-database.d.cts +89 -3
- package/dist/actions/fetch-database.d.cts.map +1 -1
- package/dist/actions/fetch-database.d.mts +89 -3
- package/dist/actions/fetch-database.d.mts.map +1 -1
- package/dist/actions/fetch-database.mjs +38 -38
- package/dist/actions/fetch-database.mjs.map +1 -1
- package/dist/actions/fetch-row.cjs +56 -56
- package/dist/actions/fetch-row.cjs.map +1 -1
- package/dist/actions/fetch-row.d.cts +151 -3
- package/dist/actions/fetch-row.d.cts.map +1 -1
- package/dist/actions/fetch-row.d.mts +151 -3
- package/dist/actions/fetch-row.d.mts.map +1 -1
- package/dist/actions/fetch-row.mjs +56 -56
- package/dist/actions/fetch-row.mjs.map +1 -1
- package/dist/actions/get-about-user.cjs +13 -13
- package/dist/actions/get-about-user.cjs.map +1 -1
- package/dist/actions/get-about-user.d.cts +44 -3
- package/dist/actions/get-about-user.d.cts.map +1 -1
- package/dist/actions/get-about-user.d.mts +44 -3
- package/dist/actions/get-about-user.d.mts.map +1 -1
- package/dist/actions/get-about-user.mjs +13 -13
- package/dist/actions/get-about-user.mjs.map +1 -1
- package/dist/actions/get-page-markdown.cjs +5 -5
- package/dist/actions/get-page-markdown.cjs.map +1 -1
- package/dist/actions/get-page-markdown.d.cts +15 -3
- package/dist/actions/get-page-markdown.d.cts.map +1 -1
- package/dist/actions/get-page-markdown.d.mts +15 -3
- package/dist/actions/get-page-markdown.d.mts.map +1 -1
- package/dist/actions/get-page-markdown.mjs +5 -5
- package/dist/actions/get-page-markdown.mjs.map +1 -1
- package/dist/actions/get-page-property-action.cjs.map +1 -1
- package/dist/actions/get-page-property-action.d.cts +13 -3
- package/dist/actions/get-page-property-action.d.cts.map +1 -1
- package/dist/actions/get-page-property-action.d.mts +13 -3
- package/dist/actions/get-page-property-action.d.mts.map +1 -1
- package/dist/actions/get-page-property-action.mjs.map +1 -1
- package/dist/actions/insert-row-database.cjs +50 -50
- package/dist/actions/insert-row-database.cjs.map +1 -1
- package/dist/actions/insert-row-database.d.cts +165 -3
- package/dist/actions/insert-row-database.d.cts.map +1 -1
- package/dist/actions/insert-row-database.d.mts +165 -3
- package/dist/actions/insert-row-database.d.mts.map +1 -1
- package/dist/actions/insert-row-database.mjs +50 -50
- package/dist/actions/insert-row-database.mjs.map +1 -1
- package/dist/actions/insert-row-from-nl.cjs +2 -2
- package/dist/actions/insert-row-from-nl.cjs.map +1 -1
- package/dist/actions/insert-row-from-nl.d.cts +19 -3
- package/dist/actions/insert-row-from-nl.d.cts.map +1 -1
- package/dist/actions/insert-row-from-nl.d.mts +19 -3
- package/dist/actions/insert-row-from-nl.d.mts.map +1 -1
- package/dist/actions/insert-row-from-nl.mjs +2 -2
- package/dist/actions/insert-row-from-nl.mjs.map +1 -1
- package/dist/actions/list-data-source-templates.cjs +6 -6
- package/dist/actions/list-data-source-templates.cjs.map +1 -1
- package/dist/actions/list-data-source-templates.d.cts +19 -3
- package/dist/actions/list-data-source-templates.d.cts.map +1 -1
- package/dist/actions/list-data-source-templates.d.mts +19 -3
- package/dist/actions/list-data-source-templates.d.mts.map +1 -1
- package/dist/actions/list-data-source-templates.mjs +6 -6
- package/dist/actions/list-data-source-templates.mjs.map +1 -1
- package/dist/actions/list-file-uploads.cjs +9 -9
- package/dist/actions/list-file-uploads.cjs.map +1 -1
- package/dist/actions/list-file-uploads.d.cts +32 -3
- package/dist/actions/list-file-uploads.d.cts.map +1 -1
- package/dist/actions/list-file-uploads.d.mts +32 -3
- package/dist/actions/list-file-uploads.d.mts.map +1 -1
- package/dist/actions/list-file-uploads.mjs +9 -9
- package/dist/actions/list-file-uploads.mjs.map +1 -1
- package/dist/actions/list-users.cjs +14 -14
- package/dist/actions/list-users.cjs.map +1 -1
- package/dist/actions/list-users.d.cts +58 -3
- package/dist/actions/list-users.d.cts.map +1 -1
- package/dist/actions/list-users.d.mts +58 -3
- package/dist/actions/list-users.d.mts.map +1 -1
- package/dist/actions/list-users.mjs +14 -14
- package/dist/actions/list-users.mjs.map +1 -1
- package/dist/actions/move-page.cjs +44 -44
- package/dist/actions/move-page.cjs.map +1 -1
- package/dist/actions/move-page.d.cts +92 -3
- package/dist/actions/move-page.d.cts.map +1 -1
- package/dist/actions/move-page.d.mts +92 -3
- package/dist/actions/move-page.d.mts.map +1 -1
- package/dist/actions/move-page.mjs +44 -44
- package/dist/actions/move-page.mjs.map +1 -1
- package/dist/actions/query-data-source.cjs +35 -35
- package/dist/actions/query-data-source.cjs.map +1 -1
- package/dist/actions/query-data-source.d.cts +161 -3
- package/dist/actions/query-data-source.d.cts.map +1 -1
- package/dist/actions/query-data-source.d.mts +161 -3
- package/dist/actions/query-data-source.d.mts.map +1 -1
- package/dist/actions/query-data-source.mjs +35 -35
- package/dist/actions/query-data-source.mjs.map +1 -1
- package/dist/actions/query-database-with-filter.cjs +73 -73
- package/dist/actions/query-database-with-filter.cjs.map +1 -1
- package/dist/actions/query-database-with-filter.d.cts +216 -3
- package/dist/actions/query-database-with-filter.d.cts.map +1 -1
- package/dist/actions/query-database-with-filter.d.mts +216 -3
- package/dist/actions/query-database-with-filter.d.mts.map +1 -1
- package/dist/actions/query-database-with-filter.mjs +73 -73
- package/dist/actions/query-database-with-filter.mjs.map +1 -1
- package/dist/actions/query-database.cjs +61 -61
- package/dist/actions/query-database.cjs.map +1 -1
- package/dist/actions/query-database.d.cts +209 -3
- package/dist/actions/query-database.d.cts.map +1 -1
- package/dist/actions/query-database.d.mts +209 -3
- package/dist/actions/query-database.d.mts.map +1 -1
- package/dist/actions/query-database.mjs +61 -61
- package/dist/actions/query-database.mjs.map +1 -1
- package/dist/actions/replace-page-content.cjs +133 -133
- package/dist/actions/replace-page-content.cjs.map +1 -1
- package/dist/actions/replace-page-content.d.cts +1836 -3
- package/dist/actions/replace-page-content.d.cts.map +1 -1
- package/dist/actions/replace-page-content.d.mts +1836 -3
- package/dist/actions/replace-page-content.d.mts.map +1 -1
- package/dist/actions/replace-page-content.mjs +133 -133
- package/dist/actions/replace-page-content.mjs.map +1 -1
- package/dist/actions/retrieve-comment.cjs.map +1 -1
- package/dist/actions/retrieve-comment.d.cts +7 -3
- package/dist/actions/retrieve-comment.d.cts.map +1 -1
- package/dist/actions/retrieve-comment.d.mts +7 -3
- package/dist/actions/retrieve-comment.d.mts.map +1 -1
- package/dist/actions/retrieve-comment.mjs.map +1 -1
- package/dist/actions/retrieve-database-property.cjs +42 -42
- package/dist/actions/retrieve-database-property.cjs.map +1 -1
- package/dist/actions/retrieve-database-property.d.cts +78 -3
- package/dist/actions/retrieve-database-property.d.cts.map +1 -1
- package/dist/actions/retrieve-database-property.d.mts +78 -3
- package/dist/actions/retrieve-database-property.d.mts.map +1 -1
- package/dist/actions/retrieve-database-property.mjs +42 -42
- package/dist/actions/retrieve-database-property.mjs.map +1 -1
- package/dist/actions/retrieve-file-upload.cjs +6 -6
- package/dist/actions/retrieve-file-upload.cjs.map +1 -1
- package/dist/actions/retrieve-file-upload.d.cts +25 -3
- package/dist/actions/retrieve-file-upload.d.cts.map +1 -1
- package/dist/actions/retrieve-file-upload.d.mts +25 -3
- package/dist/actions/retrieve-file-upload.d.mts.map +1 -1
- package/dist/actions/retrieve-file-upload.mjs +6 -6
- package/dist/actions/retrieve-file-upload.mjs.map +1 -1
- package/dist/actions/retrieve-page.cjs +55 -55
- package/dist/actions/retrieve-page.cjs.map +1 -1
- package/dist/actions/retrieve-page.d.cts +139 -3
- package/dist/actions/retrieve-page.d.cts.map +1 -1
- package/dist/actions/retrieve-page.d.mts +139 -3
- package/dist/actions/retrieve-page.d.mts.map +1 -1
- package/dist/actions/retrieve-page.mjs +55 -55
- package/dist/actions/retrieve-page.mjs.map +1 -1
- package/dist/actions/search-notion-page.cjs +82 -82
- package/dist/actions/search-notion-page.cjs.map +1 -1
- package/dist/actions/search-notion-page.d.cts +751 -3
- package/dist/actions/search-notion-page.d.cts.map +1 -1
- package/dist/actions/search-notion-page.d.mts +751 -3
- package/dist/actions/search-notion-page.d.mts.map +1 -1
- package/dist/actions/search-notion-page.mjs +82 -82
- package/dist/actions/search-notion-page.mjs.map +1 -1
- package/dist/actions/send-file-upload.cjs +8 -8
- package/dist/actions/send-file-upload.cjs.map +1 -1
- package/dist/actions/send-file-upload.d.cts +33 -3
- package/dist/actions/send-file-upload.d.cts.map +1 -1
- package/dist/actions/send-file-upload.d.mts +33 -3
- package/dist/actions/send-file-upload.d.mts.map +1 -1
- package/dist/actions/send-file-upload.mjs +8 -8
- package/dist/actions/send-file-upload.mjs.map +1 -1
- package/dist/actions/update-block.cjs +94 -94
- package/dist/actions/update-block.cjs.map +1 -1
- package/dist/actions/update-block.d.cts +564 -3
- package/dist/actions/update-block.d.cts.map +1 -1
- package/dist/actions/update-block.d.mts +564 -3
- package/dist/actions/update-block.d.mts.map +1 -1
- package/dist/actions/update-block.mjs +94 -94
- package/dist/actions/update-block.mjs.map +1 -1
- package/dist/actions/update-page.cjs +46 -46
- package/dist/actions/update-page.cjs.map +1 -1
- package/dist/actions/update-page.d.cts +103 -3
- package/dist/actions/update-page.d.cts.map +1 -1
- package/dist/actions/update-page.d.mts +103 -3
- package/dist/actions/update-page.d.mts.map +1 -1
- package/dist/actions/update-page.mjs +46 -46
- package/dist/actions/update-page.mjs.map +1 -1
- package/dist/actions/update-row-database.cjs +50 -50
- package/dist/actions/update-row-database.cjs.map +1 -1
- package/dist/actions/update-row-database.d.cts +127 -3
- package/dist/actions/update-row-database.d.cts.map +1 -1
- package/dist/actions/update-row-database.d.mts +127 -3
- package/dist/actions/update-row-database.d.mts.map +1 -1
- package/dist/actions/update-row-database.mjs +50 -50
- package/dist/actions/update-row-database.mjs.map +1 -1
- package/dist/actions/update-schema-database.cjs +59 -59
- package/dist/actions/update-schema-database.cjs.map +1 -1
- package/dist/actions/update-schema-database.d.cts +315 -3
- package/dist/actions/update-schema-database.d.cts.map +1 -1
- package/dist/actions/update-schema-database.d.mts +315 -3
- package/dist/actions/update-schema-database.d.mts.map +1 -1
- package/dist/actions/update-schema-database.mjs +59 -59
- package/dist/actions/update-schema-database.mjs.map +1 -1
- package/dist/actions/upsert-row-database.cjs +32 -32
- package/dist/actions/upsert-row-database.cjs.map +1 -1
- package/dist/actions/upsert-row-database.d.cts +242 -3
- package/dist/actions/upsert-row-database.d.cts.map +1 -1
- package/dist/actions/upsert-row-database.d.mts +242 -3
- package/dist/actions/upsert-row-database.d.mts.map +1 -1
- package/dist/actions/upsert-row-database.mjs +32 -32
- package/dist/actions/upsert-row-database.mjs.map +1 -1
- package/dist/execute.cjs +1 -1
- package/dist/execute.cjs.map +1 -1
- package/dist/execute.mjs +1 -1
- package/dist/execute.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-database.cjs","names":["z","action"],"sources":["../../src/actions/create-database.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NotionCreateDatabaseInput: z.ZodTypeAny = z.object({\n title: z.string().describe(\"The desired title for the new database. This text will be automatically converted into Notion's rich text format when the database is created.\"),\n parent_id: z.string().describe(\"**CRITICAL: MUST BE A PAGE ID, NOT A DATABASE ID.** Databases can only be created as children of pages, not as children of other databases. Using a database ID will result in an API error: 'Can't create databases parented by a database.' HOW TO IDENTIFY PAGE vs DATABASE: Use NOTION_SEARCH_NOTION_PAGE with filter_value='page' to find pages (object='page') - only these IDs can be used here. Database IDs (object='database') are NOT valid as parent_id for this action. FORMAT: Valid 32-character UUID with hyphens (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or without hyphens (32 alphanumeric characters). Additional text after the UUID (e.g., 'uuid: Page Title') is automatically cleaned. The page must be shared with your integration, otherwise you'll receive a 404 error.\"),\n properties: z.array(z.object({\n name: z.string().describe(\"Name of the property\"),\n type: z.enum([\"title\", \"rich_text\", \"number\", \"select\", \"multi_select\", \"date\", \"people\", \"files\", \"checkbox\", \"url\", \"email\", \"phone_number\", \"formula\", \"relation\", \"rollup\", \"status\", \"created_time\", \"created_by\", \"last_edited_time\", \"last_edited_by\", \"place\", \"unique_id\"]).describe(\"The type of the property, which determines the kind of data it will store. Valid types are defined by the PropertyType enum.\"),\n database_id: z.string().describe(\"UUID of the database to relate to. Required when type is 'relation'. Must be a valid UUID format (32 hex characters, with or without hyphens). Placeholder values like 'PLACEHOLDER_PROJECT' are not allowed.\").optional(),\n relation_type: z.string().default(\"single_property\").describe(\"Relationship type, either 'single_property' or 'dual_property'.\").optional(),\n})).describe(\"Optional list defining the schema (columns) for the new database. Each item is an object with 'name' and 'type'. If not provided, Notion creates a default database with a single 'Name' column of type 'title'. When provided, the list must include at least one property of type 'title'. Common supported property types include: 'title', 'rich_text', 'number', 'select', 'multi_select', 'status', 'date', 'people', 'files', 'checkbox', 'url', 'email', 'phone_number'. Other types like 'formula', 'relation', 'rollup', 'created_time', 'created_by', 'last_edited_time', 'last_edited_by' might also be supported. IMPORTANT: For 'relation' type properties, you MUST also provide the 'database_id' field with the UUID of the related database. The related database must be shared with your integration.\").optional(),\n});\nconst NotionCreateDatabase__NotionFileSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"Authenticated URL to the file (valid for one hour).\"),\n expiry_time: z.string().describe(\"ISO 8601 timestamp when the URL expires.\"),\n}).describe(\"Notion-hosted file.\");\nconst NotionCreateDatabase__ExternalFileSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL of the externally hosted file.\"),\n}).describe(\"External file URL.\");\nconst NotionCreateDatabase__CustomEmojiSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the custom emoji.\"),\n url: z.string().describe(\"HTTPS URL to the custom emoji image.\"),\n name: z.string().describe(\"Display name of the custom emoji.\"),\n}).describe(\"Custom emoji details.\");\nconst NotionCreateDatabase__IconSchema: z.ZodTypeAny = z.object({\n file: NotionCreateDatabase__NotionFileSchema.nullable().optional(),\n type: z.string().describe(\"Icon type: 'emoji', 'custom_emoji', 'external', or 'file'.\"),\n emoji: z.string().describe(\"Emoji character (present when type is 'emoji').\").nullable().optional(),\n external: NotionCreateDatabase__ExternalFileSchema.nullable().optional(),\n custom_emoji: NotionCreateDatabase__CustomEmojiSchema.nullable().optional(),\n}).describe(\"Database icon (emoji or file object).\");\nconst NotionCreateDatabase__CoverSchema: z.ZodTypeAny = z.object({\n file: NotionCreateDatabase__NotionFileSchema.nullable().optional(),\n type: z.string().describe(\"Cover type: 'external' or 'file'.\"),\n external: NotionCreateDatabase__ExternalFileSchema.nullable().optional(),\n}).describe(\"Database cover image (file object).\");\nconst NotionCreateDatabase__LinkSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL of the link.\"),\n}).describe(\"Link object for rich text.\");\nconst NotionCreateDatabase__TextContentSchema: z.ZodTypeAny = z.object({\n link: NotionCreateDatabase__LinkSchema.nullable().optional(),\n content: z.string().describe(\"The text content.\"),\n}).describe(\"Text content object for rich text.\");\nconst NotionCreateDatabase__AnnotationsSchema: z.ZodTypeAny = z.object({\n bold: z.boolean().describe(\"Whether the text is bold.\"),\n code: z.boolean().describe(\"Whether the text is formatted as code.\"),\n color: z.string().describe(\"Color of the text (e.g., 'default', 'blue', 'red', etc.).\"),\n italic: z.boolean().describe(\"Whether the text is italic.\"),\n underline: z.boolean().describe(\"Whether the text is underlined.\"),\n strikethrough: z.boolean().describe(\"Whether the text has strikethrough.\"),\n}).describe(\"Styling information for rich text.\");\nconst NotionCreateDatabase__RichTextSchema: z.ZodTypeAny = z.object({\n href: z.string().describe(\"URL for links or null if no link.\").nullable().optional(),\n text: NotionCreateDatabase__TextContentSchema.nullable().optional(),\n type: z.string().describe(\"Type of rich text object: 'text', 'mention', or 'equation'.\"),\n plain_text: z.string().describe(\"Plain text representation without formatting.\"),\n annotations: NotionCreateDatabase__AnnotationsSchema.nullable(),\n}).describe(\"Rich text object representing formatted text.\");\nconst NotionCreateDatabase__ParentSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Parent type: 'page_id', 'workspace', or 'block_id'.\"),\n page_id: z.string().describe(\"UUID of the parent page (present when type is 'page_id').\").nullable().optional(),\n block_id: z.string().describe(\"UUID of the parent block (present when type is 'block_id').\").nullable().optional(),\n workspace: z.boolean().describe(\"Always true when type is 'workspace'.\").nullable().optional(),\n}).describe(\"Parent location of the database (page, workspace, or block).\");\nconst NotionCreateDatabase__PartialUserSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the user (UUID format).\"),\n object: z.string().describe(\"Always \\\"user\\\".\"),\n}).describe(\"Partial Notion user object for created_by/last_edited_by contexts.\");\nconst NotionCreateDatabase__DataSourceRefSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the data source (UUID format).\"),\n name: z.string().describe(\"Name of the data source.\"),\n}).describe(\"Minimal data source object embedded in Database responses.\");\nexport const NotionCreateDatabaseOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the database (UUID format).\"),\n url: z.string().describe(\"The URL of the database in Notion.\"),\n icon: NotionCreateDatabase__IconSchema.nullable().optional(),\n cover: NotionCreateDatabase__CoverSchema.nullable().optional(),\n title: z.array(NotionCreateDatabase__RichTextSchema).describe(\"Array of rich text objects representing the database title/name as it appears in Notion.\"),\n object: z.string().describe(\"Always \\\"database\\\".\"),\n parent: NotionCreateDatabase__ParentSchema.nullable(),\n archived: z.boolean().describe(\"Whether the database is archived.\"),\n in_trash: z.boolean().describe(\"Whether the database is in the trash.\"),\n is_inline: z.boolean().describe(\"Whether the database appears inline on the page (true) or as a full page database (false).\"),\n created_by: NotionCreateDatabase__PartialUserSchema.nullable().optional(),\n properties: z.object({}).describe(\"Schema definition of database properties/columns. Each property is keyed by its name and contains type-specific configuration including id, name, description, type, and a type-specific object with additional settings.\"),\n public_url: z.string().describe(\"Public web URL if the database is published to the web, otherwise null.\").nullable().optional(),\n request_id: z.string().describe(\"Unique identifier for the API request (used for debugging and support).\").nullable().optional(),\n description: z.array(NotionCreateDatabase__RichTextSchema).describe(\"Array of rich text objects representing the database description.\").nullable().optional(),\n created_time: z.string().describe(\"ISO 8601 timestamp when the database was created.\"),\n data_sources: z.array(NotionCreateDatabase__DataSourceRefSchema).describe(\"List of child data sources in the database (available in API version 2025-09-03+). Each database has one or more data sources.\").nullable().optional(),\n last_edited_by: NotionCreateDatabase__PartialUserSchema.nullable().optional(),\n developer_survey: z.string().describe(\"URL to a feedback survey (may appear in API responses).\").nullable().optional(),\n last_edited_time: z.string().describe(\"ISO 8601 timestamp when the database was last edited.\"),\n}).describe(\"Response body returned by POST /v1/databases. Matches Notion Database object.\");\n\nexport const notionCreateDatabase = action(\"NOTION_CREATE_DATABASE\", {\n slug: \"notion-create-database\",\n name: \"Create Notion Database\",\n description: \"Creates a new Notion database as a subpage under a specified parent page with a defined properties schema. IMPORTANT NOTES: - The parent page MUST be shared with your integration, otherwise you'll get a 404 error - If you encounter conflict errors (409), retry the request as Notion may experience temporary save conflicts - For relation properties, you MUST provide the database_id of the related database - Parent ID must be a valid UUID format (with or without hyphens), not a template variable Use this action exclusively for creating new databases.\",\n input: NotionCreateDatabaseInput,\n output: NotionCreateDatabaseOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA0CA,IAAAA,EAAE,OAAO;CAC9D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gJAAgJ;CAC3K,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,owBAAowB;CACnyB,YAAYA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC7B,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB;EAChD,MAAMA,IAAAA,EAAE,KAAK;GAAC;GAAS;GAAa;GAAU;GAAU;GAAgB;GAAQ;GAAU;GAAS;GAAY;GAAO;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S,+EAA+E;AAE3F,MAAa,uBAAuBC,eAAAA,OAAO,0BAA0B;CACnE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"create-database.cjs","names":["z","action"],"sources":["../../src/actions/create-database.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NotionCreateDatabaseInput = z.object({\n title: z.string().describe(\"The desired title for the new database. This text will be automatically converted into Notion's rich text format when the database is created.\"),\n parent_id: z.string().describe(\"**CRITICAL: MUST BE A PAGE ID, NOT A DATABASE ID.** Databases can only be created as children of pages, not as children of other databases. Using a database ID will result in an API error: 'Can't create databases parented by a database.' HOW TO IDENTIFY PAGE vs DATABASE: Use NOTION_SEARCH_NOTION_PAGE with filter_value='page' to find pages (object='page') - only these IDs can be used here. Database IDs (object='database') are NOT valid as parent_id for this action. FORMAT: Valid 32-character UUID with hyphens (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or without hyphens (32 alphanumeric characters). Additional text after the UUID (e.g., 'uuid: Page Title') is automatically cleaned. The page must be shared with your integration, otherwise you'll receive a 404 error.\"),\n properties: z.array(z.object({\n name: z.string().describe(\"Name of the property\"),\n type: z.enum([\"title\", \"rich_text\", \"number\", \"select\", \"multi_select\", \"date\", \"people\", \"files\", \"checkbox\", \"url\", \"email\", \"phone_number\", \"formula\", \"relation\", \"rollup\", \"status\", \"created_time\", \"created_by\", \"last_edited_time\", \"last_edited_by\", \"place\", \"unique_id\"]).describe(\"The type of the property, which determines the kind of data it will store. Valid types are defined by the PropertyType enum.\"),\n database_id: z.string().describe(\"UUID of the database to relate to. Required when type is 'relation'. Must be a valid UUID format (32 hex characters, with or without hyphens). Placeholder values like 'PLACEHOLDER_PROJECT' are not allowed.\").optional(),\n relation_type: z.string().default(\"single_property\").describe(\"Relationship type, either 'single_property' or 'dual_property'.\").optional(),\n}).passthrough()).describe(\"Optional list defining the schema (columns) for the new database. Each item is an object with 'name' and 'type'. If not provided, Notion creates a default database with a single 'Name' column of type 'title'. When provided, the list must include at least one property of type 'title'. Common supported property types include: 'title', 'rich_text', 'number', 'select', 'multi_select', 'status', 'date', 'people', 'files', 'checkbox', 'url', 'email', 'phone_number'. Other types like 'formula', 'relation', 'rollup', 'created_time', 'created_by', 'last_edited_time', 'last_edited_by' might also be supported. IMPORTANT: For 'relation' type properties, you MUST also provide the 'database_id' field with the UUID of the related database. The related database must be shared with your integration.\").optional(),\n});\nconst NotionCreateDatabase__NotionFileSchema = z.object({\n url: z.string().describe(\"Authenticated URL to the file (valid for one hour).\").nullable(),\n expiry_time: z.string().describe(\"ISO 8601 timestamp when the URL expires.\").nullable(),\n}).passthrough().describe(\"Notion-hosted file.\");\nconst NotionCreateDatabase__ExternalFileSchema = z.object({\n url: z.string().describe(\"URL of the externally hosted file.\").nullable(),\n}).passthrough().describe(\"External file URL.\");\nconst NotionCreateDatabase__CustomEmojiSchema = z.object({\n id: z.string().describe(\"Unique identifier for the custom emoji.\").nullable(),\n url: z.string().describe(\"HTTPS URL to the custom emoji image.\").nullable(),\n name: z.string().describe(\"Display name of the custom emoji.\").nullable(),\n}).passthrough().describe(\"Custom emoji details.\");\nconst NotionCreateDatabase__IconSchema = z.object({\n file: NotionCreateDatabase__NotionFileSchema.nullable().optional(),\n type: z.string().describe(\"Icon type: 'emoji', 'custom_emoji', 'external', or 'file'.\").nullable(),\n emoji: z.string().describe(\"Emoji character (present when type is 'emoji').\").nullable().optional(),\n external: NotionCreateDatabase__ExternalFileSchema.nullable().optional(),\n custom_emoji: NotionCreateDatabase__CustomEmojiSchema.nullable().optional(),\n}).passthrough().describe(\"Database icon (emoji or file object).\");\nconst NotionCreateDatabase__CoverSchema = z.object({\n file: NotionCreateDatabase__NotionFileSchema.nullable().optional(),\n type: z.string().describe(\"Cover type: 'external' or 'file'.\").nullable(),\n external: NotionCreateDatabase__ExternalFileSchema.nullable().optional(),\n}).passthrough().describe(\"Database cover image (file object).\");\nconst NotionCreateDatabase__LinkSchema = z.object({\n url: z.string().describe(\"URL of the link.\").nullable(),\n}).passthrough().describe(\"Link object for rich text.\");\nconst NotionCreateDatabase__TextContentSchema = z.object({\n link: NotionCreateDatabase__LinkSchema.nullable().optional(),\n content: z.string().describe(\"The text content.\").nullable(),\n}).passthrough().describe(\"Text content object for rich text.\");\nconst NotionCreateDatabase__AnnotationsSchema = z.object({\n bold: z.boolean().describe(\"Whether the text is bold.\").nullable(),\n code: z.boolean().describe(\"Whether the text is formatted as code.\").nullable(),\n color: z.string().describe(\"Color of the text (e.g., 'default', 'blue', 'red', etc.).\").nullable(),\n italic: z.boolean().describe(\"Whether the text is italic.\").nullable(),\n underline: z.boolean().describe(\"Whether the text is underlined.\").nullable(),\n strikethrough: z.boolean().describe(\"Whether the text has strikethrough.\").nullable(),\n}).passthrough().describe(\"Styling information for rich text.\");\nconst NotionCreateDatabase__RichTextSchema = z.object({\n href: z.string().describe(\"URL for links or null if no link.\").nullable().optional(),\n text: NotionCreateDatabase__TextContentSchema.nullable().optional(),\n type: z.string().describe(\"Type of rich text object: 'text', 'mention', or 'equation'.\").nullable(),\n plain_text: z.string().describe(\"Plain text representation without formatting.\").nullable(),\n annotations: NotionCreateDatabase__AnnotationsSchema.nullable(),\n}).passthrough().describe(\"Rich text object representing formatted text.\");\nconst NotionCreateDatabase__ParentSchema = z.object({\n type: z.string().describe(\"Parent type: 'page_id', 'workspace', or 'block_id'.\").nullable(),\n page_id: z.string().describe(\"UUID of the parent page (present when type is 'page_id').\").nullable().optional(),\n block_id: z.string().describe(\"UUID of the parent block (present when type is 'block_id').\").nullable().optional(),\n workspace: z.boolean().describe(\"Always true when type is 'workspace'.\").nullable().optional(),\n}).passthrough().describe(\"Parent location of the database (page, workspace, or block).\");\nconst NotionCreateDatabase__PartialUserSchema = z.object({\n id: z.string().describe(\"Unique identifier for the user (UUID format).\").nullable(),\n object: z.string().describe(\"Always \\\"user\\\".\").nullable(),\n}).passthrough().describe(\"Partial Notion user object for created_by/last_edited_by contexts.\");\nconst NotionCreateDatabase__DataSourceRefSchema = z.object({\n id: z.string().describe(\"Unique identifier for the data source (UUID format).\").nullable(),\n name: z.string().describe(\"Name of the data source.\").nullable(),\n}).passthrough().describe(\"Minimal data source object embedded in Database responses.\");\nexport const NotionCreateDatabaseOutput = z.object({\n id: z.string().describe(\"Unique identifier for the database (UUID format).\").nullable(),\n url: z.string().describe(\"The URL of the database in Notion.\").nullable(),\n icon: NotionCreateDatabase__IconSchema.nullable().optional(),\n cover: NotionCreateDatabase__CoverSchema.nullable().optional(),\n title: z.array(NotionCreateDatabase__RichTextSchema).describe(\"Array of rich text objects representing the database title/name as it appears in Notion.\"),\n object: z.string().describe(\"Always \\\"database\\\".\").nullable(),\n parent: NotionCreateDatabase__ParentSchema.nullable(),\n archived: z.boolean().describe(\"Whether the database is archived.\").nullable(),\n in_trash: z.boolean().describe(\"Whether the database is in the trash.\").nullable(),\n is_inline: z.boolean().describe(\"Whether the database appears inline on the page (true) or as a full page database (false).\").nullable(),\n created_by: NotionCreateDatabase__PartialUserSchema.nullable().optional(),\n properties: z.record(z.string(), z.unknown()).describe(\"Schema definition of database properties/columns. Each property is keyed by its name and contains type-specific configuration including id, name, description, type, and a type-specific object with additional settings.\"),\n public_url: z.string().describe(\"Public web URL if the database is published to the web, otherwise null.\").nullable().optional(),\n request_id: z.string().describe(\"Unique identifier for the API request (used for debugging and support).\").nullable().optional(),\n description: z.array(NotionCreateDatabase__RichTextSchema).describe(\"Array of rich text objects representing the database description.\").nullable().optional(),\n created_time: z.string().describe(\"ISO 8601 timestamp when the database was created.\").nullable(),\n data_sources: z.array(NotionCreateDatabase__DataSourceRefSchema).describe(\"List of child data sources in the database (available in API version 2025-09-03+). Each database has one or more data sources.\").nullable().optional(),\n last_edited_by: NotionCreateDatabase__PartialUserSchema.nullable().optional(),\n developer_survey: z.string().describe(\"URL to a feedback survey (may appear in API responses).\").nullable().optional(),\n last_edited_time: z.string().describe(\"ISO 8601 timestamp when the database was last edited.\").nullable(),\n}).passthrough().describe(\"Response body returned by POST /v1/databases. Matches Notion Database object.\");\n\nexport const notionCreateDatabase = action(\"NOTION_CREATE_DATABASE\", {\n slug: \"notion-create-database\",\n name: \"Create Notion Database\",\n description: \"Creates a new Notion database as a subpage under a specified parent page with a defined properties schema. IMPORTANT NOTES: - The parent page MUST be shared with your integration, otherwise you'll get a 404 error - If you encounter conflict errors (409), retry the request as Notion may experience temporary save conflicts - For relation properties, you MUST provide the database_id of the related database - Parent ID must be a valid UUID format (with or without hyphens), not a template variable Use this action exclusively for creating new databases.\",\n input: NotionCreateDatabaseInput,\n output: NotionCreateDatabaseOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA4BA,IAAAA,EAAE,OAAO;CAChD,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gJAAgJ;CAC3K,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,owBAAowB;CACnyB,YAAYA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC7B,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB;EAChD,MAAMA,IAAAA,EAAE,KAAK;GAAC;GAAS;GAAa;GAAU;GAAU;GAAgB;GAAQ;GAAU;GAAS;GAAY;GAAO;GAAS;GAAgB;GAAW;GAAY;GAAU;GAAU;GAAgB;GAAc;GAAoB;GAAkB;GAAS;EAAW,CAAC,CAAC,CAAC,SAAS,8HAA8H;EAC5Z,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+MAA+M,CAAC,CAAC,SAAS;EAC3P,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,QAAQ,iBAAiB,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC5I,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,2xBAA2xB,CAAC,CAAC,SAAS;AACj0B,CAAC;AACD,MAAM,yCAAyCA,IAAAA,E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E,OAAO,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;CAChG,cAAcA,IAAAA,EAAE,MAAM,yCAAyC,CAAC,CAAC,SAAS,gIAAgI,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChO,gBAAgB,wCAAwC,SAAS,CAAC,CAAC,SAAS;CAC5E,kBAAkBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrH,kBAAkBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;AAC1G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+EAA+E;AAEzG,MAAa,uBAAuBC,eAAAA,OAAO,0BAA0B;CACnE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,9 +1,146 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/create-database.d.ts
|
|
4
|
-
declare const NotionCreateDatabaseInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const NotionCreateDatabaseInput: z.ZodObject<{
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
parent_id: z.ZodString;
|
|
7
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8
|
+
name: z.ZodString;
|
|
9
|
+
type: z.ZodEnum<{
|
|
10
|
+
number: "number";
|
|
11
|
+
date: "date";
|
|
12
|
+
url: "url";
|
|
13
|
+
title: "title";
|
|
14
|
+
created_by: "created_by";
|
|
15
|
+
created_time: "created_time";
|
|
16
|
+
last_edited_by: "last_edited_by";
|
|
17
|
+
last_edited_time: "last_edited_time";
|
|
18
|
+
rich_text: "rich_text";
|
|
19
|
+
select: "select";
|
|
20
|
+
multi_select: "multi_select";
|
|
21
|
+
people: "people";
|
|
22
|
+
files: "files";
|
|
23
|
+
checkbox: "checkbox";
|
|
24
|
+
email: "email";
|
|
25
|
+
phone_number: "phone_number";
|
|
26
|
+
formula: "formula";
|
|
27
|
+
relation: "relation";
|
|
28
|
+
rollup: "rollup";
|
|
29
|
+
status: "status";
|
|
30
|
+
place: "place";
|
|
31
|
+
unique_id: "unique_id";
|
|
32
|
+
}>;
|
|
33
|
+
database_id: z.ZodOptional<z.ZodString>;
|
|
34
|
+
relation_type: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
35
|
+
}, z.core.$loose>>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
declare const NotionCreateDatabaseOutput: z.ZodObject<{
|
|
38
|
+
id: z.ZodNullable<z.ZodString>;
|
|
39
|
+
url: z.ZodNullable<z.ZodString>;
|
|
40
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
41
|
+
file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
42
|
+
url: z.ZodNullable<z.ZodString>;
|
|
43
|
+
expiry_time: z.ZodNullable<z.ZodString>;
|
|
44
|
+
}, z.core.$loose>>>;
|
|
45
|
+
type: z.ZodNullable<z.ZodString>;
|
|
46
|
+
emoji: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
47
|
+
external: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
48
|
+
url: z.ZodNullable<z.ZodString>;
|
|
49
|
+
}, z.core.$loose>>>;
|
|
50
|
+
custom_emoji: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
51
|
+
id: z.ZodNullable<z.ZodString>;
|
|
52
|
+
url: z.ZodNullable<z.ZodString>;
|
|
53
|
+
name: z.ZodNullable<z.ZodString>;
|
|
54
|
+
}, z.core.$loose>>>;
|
|
55
|
+
}, z.core.$loose>>>;
|
|
56
|
+
cover: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
57
|
+
file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
58
|
+
url: z.ZodNullable<z.ZodString>;
|
|
59
|
+
expiry_time: z.ZodNullable<z.ZodString>;
|
|
60
|
+
}, z.core.$loose>>>;
|
|
61
|
+
type: z.ZodNullable<z.ZodString>;
|
|
62
|
+
external: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
63
|
+
url: z.ZodNullable<z.ZodString>;
|
|
64
|
+
}, z.core.$loose>>>;
|
|
65
|
+
}, z.core.$loose>>>;
|
|
66
|
+
title: z.ZodArray<z.ZodObject<{
|
|
67
|
+
href: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
69
|
+
link: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
70
|
+
url: z.ZodNullable<z.ZodString>;
|
|
71
|
+
}, z.core.$loose>>>;
|
|
72
|
+
content: z.ZodNullable<z.ZodString>;
|
|
73
|
+
}, z.core.$loose>>>;
|
|
74
|
+
type: z.ZodNullable<z.ZodString>;
|
|
75
|
+
plain_text: z.ZodNullable<z.ZodString>;
|
|
76
|
+
annotations: z.ZodNullable<z.ZodObject<{
|
|
77
|
+
bold: z.ZodNullable<z.ZodBoolean>;
|
|
78
|
+
code: z.ZodNullable<z.ZodBoolean>;
|
|
79
|
+
color: z.ZodNullable<z.ZodString>;
|
|
80
|
+
italic: z.ZodNullable<z.ZodBoolean>;
|
|
81
|
+
underline: z.ZodNullable<z.ZodBoolean>;
|
|
82
|
+
strikethrough: z.ZodNullable<z.ZodBoolean>;
|
|
83
|
+
}, z.core.$loose>>;
|
|
84
|
+
}, z.core.$loose>>;
|
|
85
|
+
object: z.ZodNullable<z.ZodString>;
|
|
86
|
+
parent: z.ZodNullable<z.ZodObject<{
|
|
87
|
+
type: z.ZodNullable<z.ZodString>;
|
|
88
|
+
page_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
89
|
+
block_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
+
workspace: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
91
|
+
}, z.core.$loose>>;
|
|
92
|
+
archived: z.ZodNullable<z.ZodBoolean>;
|
|
93
|
+
in_trash: z.ZodNullable<z.ZodBoolean>;
|
|
94
|
+
is_inline: z.ZodNullable<z.ZodBoolean>;
|
|
95
|
+
created_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
96
|
+
id: z.ZodNullable<z.ZodString>;
|
|
97
|
+
object: z.ZodNullable<z.ZodString>;
|
|
98
|
+
}, z.core.$loose>>>;
|
|
99
|
+
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
100
|
+
public_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
|
+
request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
102
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
103
|
+
href: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
104
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
105
|
+
link: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
106
|
+
url: z.ZodNullable<z.ZodString>;
|
|
107
|
+
}, z.core.$loose>>>;
|
|
108
|
+
content: z.ZodNullable<z.ZodString>;
|
|
109
|
+
}, z.core.$loose>>>;
|
|
110
|
+
type: z.ZodNullable<z.ZodString>;
|
|
111
|
+
plain_text: z.ZodNullable<z.ZodString>;
|
|
112
|
+
annotations: z.ZodNullable<z.ZodObject<{
|
|
113
|
+
bold: z.ZodNullable<z.ZodBoolean>;
|
|
114
|
+
code: z.ZodNullable<z.ZodBoolean>;
|
|
115
|
+
color: z.ZodNullable<z.ZodString>;
|
|
116
|
+
italic: z.ZodNullable<z.ZodBoolean>;
|
|
117
|
+
underline: z.ZodNullable<z.ZodBoolean>;
|
|
118
|
+
strikethrough: z.ZodNullable<z.ZodBoolean>;
|
|
119
|
+
}, z.core.$loose>>;
|
|
120
|
+
}, z.core.$loose>>>>;
|
|
121
|
+
created_time: z.ZodNullable<z.ZodString>;
|
|
122
|
+
data_sources: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
123
|
+
id: z.ZodNullable<z.ZodString>;
|
|
124
|
+
name: z.ZodNullable<z.ZodString>;
|
|
125
|
+
}, z.core.$loose>>>>;
|
|
126
|
+
last_edited_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
127
|
+
id: z.ZodNullable<z.ZodString>;
|
|
128
|
+
object: z.ZodNullable<z.ZodString>;
|
|
129
|
+
}, z.core.$loose>>>;
|
|
130
|
+
developer_survey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
131
|
+
last_edited_time: z.ZodNullable<z.ZodString>;
|
|
132
|
+
}, z.core.$loose>;
|
|
133
|
+
declare const notionCreateDatabase: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
134
|
+
title: string;
|
|
135
|
+
parent_id: string;
|
|
136
|
+
properties?: {
|
|
137
|
+
[x: string]: unknown;
|
|
138
|
+
name: string;
|
|
139
|
+
type: "number" | "date" | "url" | "title" | "created_by" | "created_time" | "last_edited_by" | "last_edited_time" | "rich_text" | "select" | "multi_select" | "people" | "files" | "checkbox" | "email" | "phone_number" | "formula" | "relation" | "rollup" | "status" | "place" | "unique_id";
|
|
140
|
+
database_id?: string | undefined;
|
|
141
|
+
relation_type?: string | undefined;
|
|
142
|
+
}[] | undefined;
|
|
143
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
144
|
//#endregion
|
|
8
145
|
export { notionCreateDatabase };
|
|
9
146
|
//# sourceMappingURL=create-database.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-database.d.cts","names":[],"sources":["../../src/actions/create-database.ts"],"mappings":";;;cAIa,yBAAA,
|
|
1
|
+
{"version":3,"file":"create-database.d.cts","names":[],"sources":["../../src/actions/create-database.ts"],"mappings":";;;cAIa,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsEzB,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuB1B,oBAAA,gCAAoB,wBAAA"}
|
|
@@ -1,9 +1,146 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/create-database.d.ts
|
|
4
|
-
declare const NotionCreateDatabaseInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const NotionCreateDatabaseInput: z.ZodObject<{
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
parent_id: z.ZodString;
|
|
7
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8
|
+
name: z.ZodString;
|
|
9
|
+
type: z.ZodEnum<{
|
|
10
|
+
number: "number";
|
|
11
|
+
date: "date";
|
|
12
|
+
url: "url";
|
|
13
|
+
title: "title";
|
|
14
|
+
created_by: "created_by";
|
|
15
|
+
created_time: "created_time";
|
|
16
|
+
last_edited_by: "last_edited_by";
|
|
17
|
+
last_edited_time: "last_edited_time";
|
|
18
|
+
rich_text: "rich_text";
|
|
19
|
+
select: "select";
|
|
20
|
+
multi_select: "multi_select";
|
|
21
|
+
people: "people";
|
|
22
|
+
files: "files";
|
|
23
|
+
checkbox: "checkbox";
|
|
24
|
+
email: "email";
|
|
25
|
+
phone_number: "phone_number";
|
|
26
|
+
formula: "formula";
|
|
27
|
+
relation: "relation";
|
|
28
|
+
rollup: "rollup";
|
|
29
|
+
status: "status";
|
|
30
|
+
place: "place";
|
|
31
|
+
unique_id: "unique_id";
|
|
32
|
+
}>;
|
|
33
|
+
database_id: z.ZodOptional<z.ZodString>;
|
|
34
|
+
relation_type: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
35
|
+
}, z.core.$loose>>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
declare const NotionCreateDatabaseOutput: z.ZodObject<{
|
|
38
|
+
id: z.ZodNullable<z.ZodString>;
|
|
39
|
+
url: z.ZodNullable<z.ZodString>;
|
|
40
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
41
|
+
file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
42
|
+
url: z.ZodNullable<z.ZodString>;
|
|
43
|
+
expiry_time: z.ZodNullable<z.ZodString>;
|
|
44
|
+
}, z.core.$loose>>>;
|
|
45
|
+
type: z.ZodNullable<z.ZodString>;
|
|
46
|
+
emoji: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
47
|
+
external: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
48
|
+
url: z.ZodNullable<z.ZodString>;
|
|
49
|
+
}, z.core.$loose>>>;
|
|
50
|
+
custom_emoji: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
51
|
+
id: z.ZodNullable<z.ZodString>;
|
|
52
|
+
url: z.ZodNullable<z.ZodString>;
|
|
53
|
+
name: z.ZodNullable<z.ZodString>;
|
|
54
|
+
}, z.core.$loose>>>;
|
|
55
|
+
}, z.core.$loose>>>;
|
|
56
|
+
cover: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
57
|
+
file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
58
|
+
url: z.ZodNullable<z.ZodString>;
|
|
59
|
+
expiry_time: z.ZodNullable<z.ZodString>;
|
|
60
|
+
}, z.core.$loose>>>;
|
|
61
|
+
type: z.ZodNullable<z.ZodString>;
|
|
62
|
+
external: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
63
|
+
url: z.ZodNullable<z.ZodString>;
|
|
64
|
+
}, z.core.$loose>>>;
|
|
65
|
+
}, z.core.$loose>>>;
|
|
66
|
+
title: z.ZodArray<z.ZodObject<{
|
|
67
|
+
href: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
69
|
+
link: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
70
|
+
url: z.ZodNullable<z.ZodString>;
|
|
71
|
+
}, z.core.$loose>>>;
|
|
72
|
+
content: z.ZodNullable<z.ZodString>;
|
|
73
|
+
}, z.core.$loose>>>;
|
|
74
|
+
type: z.ZodNullable<z.ZodString>;
|
|
75
|
+
plain_text: z.ZodNullable<z.ZodString>;
|
|
76
|
+
annotations: z.ZodNullable<z.ZodObject<{
|
|
77
|
+
bold: z.ZodNullable<z.ZodBoolean>;
|
|
78
|
+
code: z.ZodNullable<z.ZodBoolean>;
|
|
79
|
+
color: z.ZodNullable<z.ZodString>;
|
|
80
|
+
italic: z.ZodNullable<z.ZodBoolean>;
|
|
81
|
+
underline: z.ZodNullable<z.ZodBoolean>;
|
|
82
|
+
strikethrough: z.ZodNullable<z.ZodBoolean>;
|
|
83
|
+
}, z.core.$loose>>;
|
|
84
|
+
}, z.core.$loose>>;
|
|
85
|
+
object: z.ZodNullable<z.ZodString>;
|
|
86
|
+
parent: z.ZodNullable<z.ZodObject<{
|
|
87
|
+
type: z.ZodNullable<z.ZodString>;
|
|
88
|
+
page_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
89
|
+
block_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
+
workspace: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
91
|
+
}, z.core.$loose>>;
|
|
92
|
+
archived: z.ZodNullable<z.ZodBoolean>;
|
|
93
|
+
in_trash: z.ZodNullable<z.ZodBoolean>;
|
|
94
|
+
is_inline: z.ZodNullable<z.ZodBoolean>;
|
|
95
|
+
created_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
96
|
+
id: z.ZodNullable<z.ZodString>;
|
|
97
|
+
object: z.ZodNullable<z.ZodString>;
|
|
98
|
+
}, z.core.$loose>>>;
|
|
99
|
+
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
100
|
+
public_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
|
+
request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
102
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
103
|
+
href: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
104
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
105
|
+
link: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
106
|
+
url: z.ZodNullable<z.ZodString>;
|
|
107
|
+
}, z.core.$loose>>>;
|
|
108
|
+
content: z.ZodNullable<z.ZodString>;
|
|
109
|
+
}, z.core.$loose>>>;
|
|
110
|
+
type: z.ZodNullable<z.ZodString>;
|
|
111
|
+
plain_text: z.ZodNullable<z.ZodString>;
|
|
112
|
+
annotations: z.ZodNullable<z.ZodObject<{
|
|
113
|
+
bold: z.ZodNullable<z.ZodBoolean>;
|
|
114
|
+
code: z.ZodNullable<z.ZodBoolean>;
|
|
115
|
+
color: z.ZodNullable<z.ZodString>;
|
|
116
|
+
italic: z.ZodNullable<z.ZodBoolean>;
|
|
117
|
+
underline: z.ZodNullable<z.ZodBoolean>;
|
|
118
|
+
strikethrough: z.ZodNullable<z.ZodBoolean>;
|
|
119
|
+
}, z.core.$loose>>;
|
|
120
|
+
}, z.core.$loose>>>>;
|
|
121
|
+
created_time: z.ZodNullable<z.ZodString>;
|
|
122
|
+
data_sources: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
123
|
+
id: z.ZodNullable<z.ZodString>;
|
|
124
|
+
name: z.ZodNullable<z.ZodString>;
|
|
125
|
+
}, z.core.$loose>>>>;
|
|
126
|
+
last_edited_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
127
|
+
id: z.ZodNullable<z.ZodString>;
|
|
128
|
+
object: z.ZodNullable<z.ZodString>;
|
|
129
|
+
}, z.core.$loose>>>;
|
|
130
|
+
developer_survey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
131
|
+
last_edited_time: z.ZodNullable<z.ZodString>;
|
|
132
|
+
}, z.core.$loose>;
|
|
133
|
+
declare const notionCreateDatabase: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
134
|
+
title: string;
|
|
135
|
+
parent_id: string;
|
|
136
|
+
properties?: {
|
|
137
|
+
[x: string]: unknown;
|
|
138
|
+
name: string;
|
|
139
|
+
type: "number" | "date" | "url" | "title" | "created_by" | "created_time" | "last_edited_by" | "last_edited_time" | "rich_text" | "select" | "multi_select" | "people" | "files" | "checkbox" | "email" | "phone_number" | "formula" | "relation" | "rollup" | "status" | "place" | "unique_id";
|
|
140
|
+
database_id?: string | undefined;
|
|
141
|
+
relation_type?: string | undefined;
|
|
142
|
+
}[] | undefined;
|
|
143
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
144
|
//#endregion
|
|
8
145
|
export { notionCreateDatabase };
|
|
9
146
|
//# sourceMappingURL=create-database.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-database.d.mts","names":[],"sources":["../../src/actions/create-database.ts"],"mappings":";;;cAIa,yBAAA,
|
|
1
|
+
{"version":3,"file":"create-database.d.mts","names":[],"sources":["../../src/actions/create-database.ts"],"mappings":";;;cAIa,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsEzB,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuB1B,oBAAA,gCAAoB,wBAAA"}
|
|
@@ -32,91 +32,91 @@ const NotionCreateDatabaseInput = z.object({
|
|
|
32
32
|
]).describe("The type of the property, which determines the kind of data it will store. Valid types are defined by the PropertyType enum."),
|
|
33
33
|
database_id: z.string().describe("UUID of the database to relate to. Required when type is 'relation'. Must be a valid UUID format (32 hex characters, with or without hyphens). Placeholder values like 'PLACEHOLDER_PROJECT' are not allowed.").optional(),
|
|
34
34
|
relation_type: z.string().default("single_property").describe("Relationship type, either 'single_property' or 'dual_property'.").optional()
|
|
35
|
-
})).describe("Optional list defining the schema (columns) for the new database. Each item is an object with 'name' and 'type'. If not provided, Notion creates a default database with a single 'Name' column of type 'title'. When provided, the list must include at least one property of type 'title'. Common supported property types include: 'title', 'rich_text', 'number', 'select', 'multi_select', 'status', 'date', 'people', 'files', 'checkbox', 'url', 'email', 'phone_number'. Other types like 'formula', 'relation', 'rollup', 'created_time', 'created_by', 'last_edited_time', 'last_edited_by' might also be supported. IMPORTANT: For 'relation' type properties, you MUST also provide the 'database_id' field with the UUID of the related database. The related database must be shared with your integration.").optional()
|
|
35
|
+
}).passthrough()).describe("Optional list defining the schema (columns) for the new database. Each item is an object with 'name' and 'type'. If not provided, Notion creates a default database with a single 'Name' column of type 'title'. When provided, the list must include at least one property of type 'title'. Common supported property types include: 'title', 'rich_text', 'number', 'select', 'multi_select', 'status', 'date', 'people', 'files', 'checkbox', 'url', 'email', 'phone_number'. Other types like 'formula', 'relation', 'rollup', 'created_time', 'created_by', 'last_edited_time', 'last_edited_by' might also be supported. IMPORTANT: For 'relation' type properties, you MUST also provide the 'database_id' field with the UUID of the related database. The related database must be shared with your integration.").optional()
|
|
36
36
|
});
|
|
37
37
|
const NotionCreateDatabase__NotionFileSchema = z.object({
|
|
38
|
-
url: z.string().describe("Authenticated URL to the file (valid for one hour)."),
|
|
39
|
-
expiry_time: z.string().describe("ISO 8601 timestamp when the URL expires.")
|
|
40
|
-
}).describe("Notion-hosted file.");
|
|
41
|
-
const NotionCreateDatabase__ExternalFileSchema = z.object({ url: z.string().describe("URL of the externally hosted file.") }).describe("External file URL.");
|
|
38
|
+
url: z.string().describe("Authenticated URL to the file (valid for one hour).").nullable(),
|
|
39
|
+
expiry_time: z.string().describe("ISO 8601 timestamp when the URL expires.").nullable()
|
|
40
|
+
}).passthrough().describe("Notion-hosted file.");
|
|
41
|
+
const NotionCreateDatabase__ExternalFileSchema = z.object({ url: z.string().describe("URL of the externally hosted file.").nullable() }).passthrough().describe("External file URL.");
|
|
42
42
|
const NotionCreateDatabase__CustomEmojiSchema = z.object({
|
|
43
|
-
id: z.string().describe("Unique identifier for the custom emoji."),
|
|
44
|
-
url: z.string().describe("HTTPS URL to the custom emoji image."),
|
|
45
|
-
name: z.string().describe("Display name of the custom emoji.")
|
|
46
|
-
}).describe("Custom emoji details.");
|
|
43
|
+
id: z.string().describe("Unique identifier for the custom emoji.").nullable(),
|
|
44
|
+
url: z.string().describe("HTTPS URL to the custom emoji image.").nullable(),
|
|
45
|
+
name: z.string().describe("Display name of the custom emoji.").nullable()
|
|
46
|
+
}).passthrough().describe("Custom emoji details.");
|
|
47
47
|
const NotionCreateDatabase__IconSchema = z.object({
|
|
48
48
|
file: NotionCreateDatabase__NotionFileSchema.nullable().optional(),
|
|
49
|
-
type: z.string().describe("Icon type: 'emoji', 'custom_emoji', 'external', or 'file'."),
|
|
49
|
+
type: z.string().describe("Icon type: 'emoji', 'custom_emoji', 'external', or 'file'.").nullable(),
|
|
50
50
|
emoji: z.string().describe("Emoji character (present when type is 'emoji').").nullable().optional(),
|
|
51
51
|
external: NotionCreateDatabase__ExternalFileSchema.nullable().optional(),
|
|
52
52
|
custom_emoji: NotionCreateDatabase__CustomEmojiSchema.nullable().optional()
|
|
53
|
-
}).describe("Database icon (emoji or file object).");
|
|
53
|
+
}).passthrough().describe("Database icon (emoji or file object).");
|
|
54
54
|
const NotionCreateDatabase__CoverSchema = z.object({
|
|
55
55
|
file: NotionCreateDatabase__NotionFileSchema.nullable().optional(),
|
|
56
|
-
type: z.string().describe("Cover type: 'external' or 'file'."),
|
|
56
|
+
type: z.string().describe("Cover type: 'external' or 'file'.").nullable(),
|
|
57
57
|
external: NotionCreateDatabase__ExternalFileSchema.nullable().optional()
|
|
58
|
-
}).describe("Database cover image (file object).");
|
|
59
|
-
const NotionCreateDatabase__LinkSchema = z.object({ url: z.string().describe("URL of the link.") }).describe("Link object for rich text.");
|
|
58
|
+
}).passthrough().describe("Database cover image (file object).");
|
|
59
|
+
const NotionCreateDatabase__LinkSchema = z.object({ url: z.string().describe("URL of the link.").nullable() }).passthrough().describe("Link object for rich text.");
|
|
60
60
|
const NotionCreateDatabase__TextContentSchema = z.object({
|
|
61
61
|
link: NotionCreateDatabase__LinkSchema.nullable().optional(),
|
|
62
|
-
content: z.string().describe("The text content.")
|
|
63
|
-
}).describe("Text content object for rich text.");
|
|
62
|
+
content: z.string().describe("The text content.").nullable()
|
|
63
|
+
}).passthrough().describe("Text content object for rich text.");
|
|
64
64
|
const NotionCreateDatabase__AnnotationsSchema = z.object({
|
|
65
|
-
bold: z.boolean().describe("Whether the text is bold."),
|
|
66
|
-
code: z.boolean().describe("Whether the text is formatted as code."),
|
|
67
|
-
color: z.string().describe("Color of the text (e.g., 'default', 'blue', 'red', etc.)."),
|
|
68
|
-
italic: z.boolean().describe("Whether the text is italic."),
|
|
69
|
-
underline: z.boolean().describe("Whether the text is underlined."),
|
|
70
|
-
strikethrough: z.boolean().describe("Whether the text has strikethrough.")
|
|
71
|
-
}).describe("Styling information for rich text.");
|
|
65
|
+
bold: z.boolean().describe("Whether the text is bold.").nullable(),
|
|
66
|
+
code: z.boolean().describe("Whether the text is formatted as code.").nullable(),
|
|
67
|
+
color: z.string().describe("Color of the text (e.g., 'default', 'blue', 'red', etc.).").nullable(),
|
|
68
|
+
italic: z.boolean().describe("Whether the text is italic.").nullable(),
|
|
69
|
+
underline: z.boolean().describe("Whether the text is underlined.").nullable(),
|
|
70
|
+
strikethrough: z.boolean().describe("Whether the text has strikethrough.").nullable()
|
|
71
|
+
}).passthrough().describe("Styling information for rich text.");
|
|
72
72
|
const NotionCreateDatabase__RichTextSchema = z.object({
|
|
73
73
|
href: z.string().describe("URL for links or null if no link.").nullable().optional(),
|
|
74
74
|
text: NotionCreateDatabase__TextContentSchema.nullable().optional(),
|
|
75
|
-
type: z.string().describe("Type of rich text object: 'text', 'mention', or 'equation'."),
|
|
76
|
-
plain_text: z.string().describe("Plain text representation without formatting."),
|
|
75
|
+
type: z.string().describe("Type of rich text object: 'text', 'mention', or 'equation'.").nullable(),
|
|
76
|
+
plain_text: z.string().describe("Plain text representation without formatting.").nullable(),
|
|
77
77
|
annotations: NotionCreateDatabase__AnnotationsSchema.nullable()
|
|
78
|
-
}).describe("Rich text object representing formatted text.");
|
|
78
|
+
}).passthrough().describe("Rich text object representing formatted text.");
|
|
79
79
|
const NotionCreateDatabase__ParentSchema = z.object({
|
|
80
|
-
type: z.string().describe("Parent type: 'page_id', 'workspace', or 'block_id'."),
|
|
80
|
+
type: z.string().describe("Parent type: 'page_id', 'workspace', or 'block_id'.").nullable(),
|
|
81
81
|
page_id: z.string().describe("UUID of the parent page (present when type is 'page_id').").nullable().optional(),
|
|
82
82
|
block_id: z.string().describe("UUID of the parent block (present when type is 'block_id').").nullable().optional(),
|
|
83
83
|
workspace: z.boolean().describe("Always true when type is 'workspace'.").nullable().optional()
|
|
84
|
-
}).describe("Parent location of the database (page, workspace, or block).");
|
|
84
|
+
}).passthrough().describe("Parent location of the database (page, workspace, or block).");
|
|
85
85
|
const NotionCreateDatabase__PartialUserSchema = z.object({
|
|
86
|
-
id: z.string().describe("Unique identifier for the user (UUID format)."),
|
|
87
|
-
object: z.string().describe("Always \"user\".")
|
|
88
|
-
}).describe("Partial Notion user object for created_by/last_edited_by contexts.");
|
|
86
|
+
id: z.string().describe("Unique identifier for the user (UUID format).").nullable(),
|
|
87
|
+
object: z.string().describe("Always \"user\".").nullable()
|
|
88
|
+
}).passthrough().describe("Partial Notion user object for created_by/last_edited_by contexts.");
|
|
89
89
|
const NotionCreateDatabase__DataSourceRefSchema = z.object({
|
|
90
|
-
id: z.string().describe("Unique identifier for the data source (UUID format)."),
|
|
91
|
-
name: z.string().describe("Name of the data source.")
|
|
92
|
-
}).describe("Minimal data source object embedded in Database responses.");
|
|
90
|
+
id: z.string().describe("Unique identifier for the data source (UUID format).").nullable(),
|
|
91
|
+
name: z.string().describe("Name of the data source.").nullable()
|
|
92
|
+
}).passthrough().describe("Minimal data source object embedded in Database responses.");
|
|
93
93
|
const notionCreateDatabase = action("NOTION_CREATE_DATABASE", {
|
|
94
94
|
slug: "notion-create-database",
|
|
95
95
|
name: "Create Notion Database",
|
|
96
96
|
description: "Creates a new Notion database as a subpage under a specified parent page with a defined properties schema. IMPORTANT NOTES: - The parent page MUST be shared with your integration, otherwise you'll get a 404 error - If you encounter conflict errors (409), retry the request as Notion may experience temporary save conflicts - For relation properties, you MUST provide the database_id of the related database - Parent ID must be a valid UUID format (with or without hyphens), not a template variable Use this action exclusively for creating new databases.",
|
|
97
97
|
input: NotionCreateDatabaseInput,
|
|
98
98
|
output: z.object({
|
|
99
|
-
id: z.string().describe("Unique identifier for the database (UUID format)."),
|
|
100
|
-
url: z.string().describe("The URL of the database in Notion."),
|
|
99
|
+
id: z.string().describe("Unique identifier for the database (UUID format).").nullable(),
|
|
100
|
+
url: z.string().describe("The URL of the database in Notion.").nullable(),
|
|
101
101
|
icon: NotionCreateDatabase__IconSchema.nullable().optional(),
|
|
102
102
|
cover: NotionCreateDatabase__CoverSchema.nullable().optional(),
|
|
103
103
|
title: z.array(NotionCreateDatabase__RichTextSchema).describe("Array of rich text objects representing the database title/name as it appears in Notion."),
|
|
104
|
-
object: z.string().describe("Always \"database\"."),
|
|
104
|
+
object: z.string().describe("Always \"database\".").nullable(),
|
|
105
105
|
parent: NotionCreateDatabase__ParentSchema.nullable(),
|
|
106
|
-
archived: z.boolean().describe("Whether the database is archived."),
|
|
107
|
-
in_trash: z.boolean().describe("Whether the database is in the trash."),
|
|
108
|
-
is_inline: z.boolean().describe("Whether the database appears inline on the page (true) or as a full page database (false)."),
|
|
106
|
+
archived: z.boolean().describe("Whether the database is archived.").nullable(),
|
|
107
|
+
in_trash: z.boolean().describe("Whether the database is in the trash.").nullable(),
|
|
108
|
+
is_inline: z.boolean().describe("Whether the database appears inline on the page (true) or as a full page database (false).").nullable(),
|
|
109
109
|
created_by: NotionCreateDatabase__PartialUserSchema.nullable().optional(),
|
|
110
|
-
properties: z.
|
|
110
|
+
properties: z.record(z.string(), z.unknown()).describe("Schema definition of database properties/columns. Each property is keyed by its name and contains type-specific configuration including id, name, description, type, and a type-specific object with additional settings."),
|
|
111
111
|
public_url: z.string().describe("Public web URL if the database is published to the web, otherwise null.").nullable().optional(),
|
|
112
112
|
request_id: z.string().describe("Unique identifier for the API request (used for debugging and support).").nullable().optional(),
|
|
113
113
|
description: z.array(NotionCreateDatabase__RichTextSchema).describe("Array of rich text objects representing the database description.").nullable().optional(),
|
|
114
|
-
created_time: z.string().describe("ISO 8601 timestamp when the database was created."),
|
|
114
|
+
created_time: z.string().describe("ISO 8601 timestamp when the database was created.").nullable(),
|
|
115
115
|
data_sources: z.array(NotionCreateDatabase__DataSourceRefSchema).describe("List of child data sources in the database (available in API version 2025-09-03+). Each database has one or more data sources.").nullable().optional(),
|
|
116
116
|
last_edited_by: NotionCreateDatabase__PartialUserSchema.nullable().optional(),
|
|
117
117
|
developer_survey: z.string().describe("URL to a feedback survey (may appear in API responses).").nullable().optional(),
|
|
118
|
-
last_edited_time: z.string().describe("ISO 8601 timestamp when the database was last edited.")
|
|
119
|
-
}).describe("Response body returned by POST /v1/databases. Matches Notion Database object.")
|
|
118
|
+
last_edited_time: z.string().describe("ISO 8601 timestamp when the database was last edited.").nullable()
|
|
119
|
+
}).passthrough().describe("Response body returned by POST /v1/databases. Matches Notion Database object.")
|
|
120
120
|
});
|
|
121
121
|
//#endregion
|
|
122
122
|
export { notionCreateDatabase };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-database.mjs","names":[],"sources":["../../src/actions/create-database.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NotionCreateDatabaseInput: z.ZodTypeAny = z.object({\n title: z.string().describe(\"The desired title for the new database. This text will be automatically converted into Notion's rich text format when the database is created.\"),\n parent_id: z.string().describe(\"**CRITICAL: MUST BE A PAGE ID, NOT A DATABASE ID.** Databases can only be created as children of pages, not as children of other databases. Using a database ID will result in an API error: 'Can't create databases parented by a database.' HOW TO IDENTIFY PAGE vs DATABASE: Use NOTION_SEARCH_NOTION_PAGE with filter_value='page' to find pages (object='page') - only these IDs can be used here. Database IDs (object='database') are NOT valid as parent_id for this action. FORMAT: Valid 32-character UUID with hyphens (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or without hyphens (32 alphanumeric characters). Additional text after the UUID (e.g., 'uuid: Page Title') is automatically cleaned. The page must be shared with your integration, otherwise you'll receive a 404 error.\"),\n properties: z.array(z.object({\n name: z.string().describe(\"Name of the property\"),\n type: z.enum([\"title\", \"rich_text\", \"number\", \"select\", \"multi_select\", \"date\", \"people\", \"files\", \"checkbox\", \"url\", \"email\", \"phone_number\", \"formula\", \"relation\", \"rollup\", \"status\", \"created_time\", \"created_by\", \"last_edited_time\", \"last_edited_by\", \"place\", \"unique_id\"]).describe(\"The type of the property, which determines the kind of data it will store. Valid types are defined by the PropertyType enum.\"),\n database_id: z.string().describe(\"UUID of the database to relate to. Required when type is 'relation'. Must be a valid UUID format (32 hex characters, with or without hyphens). Placeholder values like 'PLACEHOLDER_PROJECT' are not allowed.\").optional(),\n relation_type: z.string().default(\"single_property\").describe(\"Relationship type, either 'single_property' or 'dual_property'.\").optional(),\n})).describe(\"Optional list defining the schema (columns) for the new database. Each item is an object with 'name' and 'type'. If not provided, Notion creates a default database with a single 'Name' column of type 'title'. When provided, the list must include at least one property of type 'title'. Common supported property types include: 'title', 'rich_text', 'number', 'select', 'multi_select', 'status', 'date', 'people', 'files', 'checkbox', 'url', 'email', 'phone_number'. Other types like 'formula', 'relation', 'rollup', 'created_time', 'created_by', 'last_edited_time', 'last_edited_by' might also be supported. IMPORTANT: For 'relation' type properties, you MUST also provide the 'database_id' field with the UUID of the related database. The related database must be shared with your integration.\").optional(),\n});\nconst NotionCreateDatabase__NotionFileSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"Authenticated URL to the file (valid for one hour).\"),\n expiry_time: z.string().describe(\"ISO 8601 timestamp when the URL expires.\"),\n}).describe(\"Notion-hosted file.\");\nconst NotionCreateDatabase__ExternalFileSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL of the externally hosted file.\"),\n}).describe(\"External file URL.\");\nconst NotionCreateDatabase__CustomEmojiSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the custom emoji.\"),\n url: z.string().describe(\"HTTPS URL to the custom emoji image.\"),\n name: z.string().describe(\"Display name of the custom emoji.\"),\n}).describe(\"Custom emoji details.\");\nconst NotionCreateDatabase__IconSchema: z.ZodTypeAny = z.object({\n file: NotionCreateDatabase__NotionFileSchema.nullable().optional(),\n type: z.string().describe(\"Icon type: 'emoji', 'custom_emoji', 'external', or 'file'.\"),\n emoji: z.string().describe(\"Emoji character (present when type is 'emoji').\").nullable().optional(),\n external: NotionCreateDatabase__ExternalFileSchema.nullable().optional(),\n custom_emoji: NotionCreateDatabase__CustomEmojiSchema.nullable().optional(),\n}).describe(\"Database icon (emoji or file object).\");\nconst NotionCreateDatabase__CoverSchema: z.ZodTypeAny = z.object({\n file: NotionCreateDatabase__NotionFileSchema.nullable().optional(),\n type: z.string().describe(\"Cover type: 'external' or 'file'.\"),\n external: NotionCreateDatabase__ExternalFileSchema.nullable().optional(),\n}).describe(\"Database cover image (file object).\");\nconst NotionCreateDatabase__LinkSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL of the link.\"),\n}).describe(\"Link object for rich text.\");\nconst NotionCreateDatabase__TextContentSchema: z.ZodTypeAny = z.object({\n link: NotionCreateDatabase__LinkSchema.nullable().optional(),\n content: z.string().describe(\"The text content.\"),\n}).describe(\"Text content object for rich text.\");\nconst NotionCreateDatabase__AnnotationsSchema: z.ZodTypeAny = z.object({\n bold: z.boolean().describe(\"Whether the text is bold.\"),\n code: z.boolean().describe(\"Whether the text is formatted as code.\"),\n color: z.string().describe(\"Color of the text (e.g., 'default', 'blue', 'red', etc.).\"),\n italic: z.boolean().describe(\"Whether the text is italic.\"),\n underline: z.boolean().describe(\"Whether the text is underlined.\"),\n strikethrough: z.boolean().describe(\"Whether the text has strikethrough.\"),\n}).describe(\"Styling information for rich text.\");\nconst NotionCreateDatabase__RichTextSchema: z.ZodTypeAny = z.object({\n href: z.string().describe(\"URL for links or null if no link.\").nullable().optional(),\n text: NotionCreateDatabase__TextContentSchema.nullable().optional(),\n type: z.string().describe(\"Type of rich text object: 'text', 'mention', or 'equation'.\"),\n plain_text: z.string().describe(\"Plain text representation without formatting.\"),\n annotations: NotionCreateDatabase__AnnotationsSchema.nullable(),\n}).describe(\"Rich text object representing formatted text.\");\nconst NotionCreateDatabase__ParentSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Parent type: 'page_id', 'workspace', or 'block_id'.\"),\n page_id: z.string().describe(\"UUID of the parent page (present when type is 'page_id').\").nullable().optional(),\n block_id: z.string().describe(\"UUID of the parent block (present when type is 'block_id').\").nullable().optional(),\n workspace: z.boolean().describe(\"Always true when type is 'workspace'.\").nullable().optional(),\n}).describe(\"Parent location of the database (page, workspace, or block).\");\nconst NotionCreateDatabase__PartialUserSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the user (UUID format).\"),\n object: z.string().describe(\"Always \\\"user\\\".\"),\n}).describe(\"Partial Notion user object for created_by/last_edited_by contexts.\");\nconst NotionCreateDatabase__DataSourceRefSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the data source (UUID format).\"),\n name: z.string().describe(\"Name of the data source.\"),\n}).describe(\"Minimal data source object embedded in Database responses.\");\nexport const NotionCreateDatabaseOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the database (UUID format).\"),\n url: z.string().describe(\"The URL of the database in Notion.\"),\n icon: NotionCreateDatabase__IconSchema.nullable().optional(),\n cover: NotionCreateDatabase__CoverSchema.nullable().optional(),\n title: z.array(NotionCreateDatabase__RichTextSchema).describe(\"Array of rich text objects representing the database title/name as it appears in Notion.\"),\n object: z.string().describe(\"Always \\\"database\\\".\"),\n parent: NotionCreateDatabase__ParentSchema.nullable(),\n archived: z.boolean().describe(\"Whether the database is archived.\"),\n in_trash: z.boolean().describe(\"Whether the database is in the trash.\"),\n is_inline: z.boolean().describe(\"Whether the database appears inline on the page (true) or as a full page database (false).\"),\n created_by: NotionCreateDatabase__PartialUserSchema.nullable().optional(),\n properties: z.object({}).describe(\"Schema definition of database properties/columns. Each property is keyed by its name and contains type-specific configuration including id, name, description, type, and a type-specific object with additional settings.\"),\n public_url: z.string().describe(\"Public web URL if the database is published to the web, otherwise null.\").nullable().optional(),\n request_id: z.string().describe(\"Unique identifier for the API request (used for debugging and support).\").nullable().optional(),\n description: z.array(NotionCreateDatabase__RichTextSchema).describe(\"Array of rich text objects representing the database description.\").nullable().optional(),\n created_time: z.string().describe(\"ISO 8601 timestamp when the database was created.\"),\n data_sources: z.array(NotionCreateDatabase__DataSourceRefSchema).describe(\"List of child data sources in the database (available in API version 2025-09-03+). Each database has one or more data sources.\").nullable().optional(),\n last_edited_by: NotionCreateDatabase__PartialUserSchema.nullable().optional(),\n developer_survey: z.string().describe(\"URL to a feedback survey (may appear in API responses).\").nullable().optional(),\n last_edited_time: z.string().describe(\"ISO 8601 timestamp when the database was last edited.\"),\n}).describe(\"Response body returned by POST /v1/databases. Matches Notion Database object.\");\n\nexport const notionCreateDatabase = action(\"NOTION_CREATE_DATABASE\", {\n slug: \"notion-create-database\",\n name: \"Create Notion Database\",\n description: \"Creates a new Notion database as a subpage under a specified parent page with a defined properties schema. IMPORTANT NOTES: - The parent page MUST be shared with your integration, otherwise you'll get a 404 error - If you encounter conflict errors (409), retry the request as Notion may experience temporary save conflicts - For relation properties, you MUST provide the database_id of the related database - Parent ID must be a valid UUID format (with or without hyphens), not a template variable Use this action exclusively for creating new databases.\",\n input: NotionCreateDatabaseInput,\n output: NotionCreateDatabaseOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA0C,EAAE,OAAO;CAC9D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,gJAAgJ;CAC3K,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,owBAAowB;CACnyB,YAAY,EAAE,MAAM,EAAE,OAAO;EAC7B,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB;EAChD,MAAM,EAAE,KAAK;GAAC;GAAS;GAAa;GAAU;GAAU;GAAgB;GAAQ;GAAU;GAAS;GAAY;GAAO;GAAS;GAAgB;GAAW;GAAY;GAAU;GAAU;GAAgB;GAAc;GAAoB;GAAkB;GAAS;EAAW,CAAC,CAAC,CAAC,SAAS,8HAA8H;EAC5Z,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,+MAA+M,CAAC,CAAC,SAAS;EAC3P,eAAe,EAAE,OAAO,CAAC,CAAC,QAAQ,iBAAiB,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC5I,CAAC,CAAC,CAAC,CAAC,SAAS,2xBAA2xB,CAAC,CAAC,SAAS;AACnzB,CAAC;AACD,MAAM,yCAAuD,EAAE,OAAO;CACpE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD;CAC9E,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;AAC7E,CAAC,CAAC,CAAC,SAAS,qBAAqB;AACjC,MAAM,2CAAyD,EAAE,OAAO,EACtE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,EAC/D,CAAC,CAAC,CAAC,SAAS,oBAAoB;AAChC,MAAM,0CAAwD,EAAE,OAAO;CACrE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;CACjE,KAAK,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kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD;CAC/F,CAAC,CAAC,CAAC,SAAS,+EAOF;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"create-database.mjs","names":[],"sources":["../../src/actions/create-database.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NotionCreateDatabaseInput = z.object({\n title: z.string().describe(\"The desired title for the new database. This text will be automatically converted into Notion's rich text format when the database is created.\"),\n parent_id: z.string().describe(\"**CRITICAL: MUST BE A PAGE ID, NOT A DATABASE ID.** Databases can only be created as children of pages, not as children of other databases. Using a database ID will result in an API error: 'Can't create databases parented by a database.' HOW TO IDENTIFY PAGE vs DATABASE: Use NOTION_SEARCH_NOTION_PAGE with filter_value='page' to find pages (object='page') - only these IDs can be used here. Database IDs (object='database') are NOT valid as parent_id for this action. FORMAT: Valid 32-character UUID with hyphens (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or without hyphens (32 alphanumeric characters). Additional text after the UUID (e.g., 'uuid: Page Title') is automatically cleaned. The page must be shared with your integration, otherwise you'll receive a 404 error.\"),\n properties: z.array(z.object({\n name: z.string().describe(\"Name of the property\"),\n type: z.enum([\"title\", \"rich_text\", \"number\", \"select\", \"multi_select\", \"date\", \"people\", \"files\", \"checkbox\", \"url\", \"email\", \"phone_number\", \"formula\", \"relation\", \"rollup\", \"status\", \"created_time\", \"created_by\", \"last_edited_time\", \"last_edited_by\", \"place\", \"unique_id\"]).describe(\"The type of the property, which determines the kind of data it will store. Valid types are defined by the PropertyType enum.\"),\n database_id: z.string().describe(\"UUID of the database to relate to. Required when type is 'relation'. Must be a valid UUID format (32 hex characters, with or without hyphens). Placeholder values like 'PLACEHOLDER_PROJECT' are not allowed.\").optional(),\n relation_type: z.string().default(\"single_property\").describe(\"Relationship type, either 'single_property' or 'dual_property'.\").optional(),\n}).passthrough()).describe(\"Optional list defining the schema (columns) for the new database. Each item is an object with 'name' and 'type'. If not provided, Notion creates a default database with a single 'Name' column of type 'title'. When provided, the list must include at least one property of type 'title'. Common supported property types include: 'title', 'rich_text', 'number', 'select', 'multi_select', 'status', 'date', 'people', 'files', 'checkbox', 'url', 'email', 'phone_number'. Other types like 'formula', 'relation', 'rollup', 'created_time', 'created_by', 'last_edited_time', 'last_edited_by' might also be supported. IMPORTANT: For 'relation' type properties, you MUST also provide the 'database_id' field with the UUID of the related database. The related database must be shared with your integration.\").optional(),\n});\nconst NotionCreateDatabase__NotionFileSchema = z.object({\n url: z.string().describe(\"Authenticated URL to the file (valid for one hour).\").nullable(),\n expiry_time: z.string().describe(\"ISO 8601 timestamp when the URL expires.\").nullable(),\n}).passthrough().describe(\"Notion-hosted file.\");\nconst NotionCreateDatabase__ExternalFileSchema = z.object({\n url: z.string().describe(\"URL of the externally hosted file.\").nullable(),\n}).passthrough().describe(\"External file URL.\");\nconst NotionCreateDatabase__CustomEmojiSchema = z.object({\n id: z.string().describe(\"Unique identifier for the custom emoji.\").nullable(),\n url: z.string().describe(\"HTTPS URL to the custom emoji image.\").nullable(),\n name: z.string().describe(\"Display name of the custom emoji.\").nullable(),\n}).passthrough().describe(\"Custom emoji details.\");\nconst NotionCreateDatabase__IconSchema = z.object({\n file: NotionCreateDatabase__NotionFileSchema.nullable().optional(),\n type: z.string().describe(\"Icon type: 'emoji', 'custom_emoji', 'external', or 'file'.\").nullable(),\n emoji: z.string().describe(\"Emoji character (present when type is 'emoji').\").nullable().optional(),\n external: NotionCreateDatabase__ExternalFileSchema.nullable().optional(),\n custom_emoji: NotionCreateDatabase__CustomEmojiSchema.nullable().optional(),\n}).passthrough().describe(\"Database icon (emoji or file object).\");\nconst NotionCreateDatabase__CoverSchema = z.object({\n file: NotionCreateDatabase__NotionFileSchema.nullable().optional(),\n type: z.string().describe(\"Cover type: 'external' or 'file'.\").nullable(),\n external: NotionCreateDatabase__ExternalFileSchema.nullable().optional(),\n}).passthrough().describe(\"Database cover image (file object).\");\nconst NotionCreateDatabase__LinkSchema = z.object({\n url: z.string().describe(\"URL of the link.\").nullable(),\n}).passthrough().describe(\"Link object for rich text.\");\nconst NotionCreateDatabase__TextContentSchema = z.object({\n link: NotionCreateDatabase__LinkSchema.nullable().optional(),\n content: z.string().describe(\"The text content.\").nullable(),\n}).passthrough().describe(\"Text content object for rich text.\");\nconst NotionCreateDatabase__AnnotationsSchema = z.object({\n bold: z.boolean().describe(\"Whether the text is bold.\").nullable(),\n code: z.boolean().describe(\"Whether the text is formatted as code.\").nullable(),\n color: z.string().describe(\"Color of the text (e.g., 'default', 'blue', 'red', etc.).\").nullable(),\n italic: z.boolean().describe(\"Whether the text is italic.\").nullable(),\n underline: z.boolean().describe(\"Whether the text is underlined.\").nullable(),\n strikethrough: z.boolean().describe(\"Whether the text has strikethrough.\").nullable(),\n}).passthrough().describe(\"Styling information for rich text.\");\nconst NotionCreateDatabase__RichTextSchema = z.object({\n href: z.string().describe(\"URL for links or null if no link.\").nullable().optional(),\n text: NotionCreateDatabase__TextContentSchema.nullable().optional(),\n type: z.string().describe(\"Type of rich text object: 'text', 'mention', or 'equation'.\").nullable(),\n plain_text: z.string().describe(\"Plain text representation without formatting.\").nullable(),\n annotations: NotionCreateDatabase__AnnotationsSchema.nullable(),\n}).passthrough().describe(\"Rich text object representing formatted text.\");\nconst NotionCreateDatabase__ParentSchema = z.object({\n type: z.string().describe(\"Parent type: 'page_id', 'workspace', or 'block_id'.\").nullable(),\n page_id: z.string().describe(\"UUID of the parent page (present when type is 'page_id').\").nullable().optional(),\n block_id: z.string().describe(\"UUID of the parent block (present when type is 'block_id').\").nullable().optional(),\n workspace: z.boolean().describe(\"Always true when type is 'workspace'.\").nullable().optional(),\n}).passthrough().describe(\"Parent location of the database (page, workspace, or block).\");\nconst NotionCreateDatabase__PartialUserSchema = z.object({\n id: z.string().describe(\"Unique identifier for the user (UUID format).\").nullable(),\n object: z.string().describe(\"Always \\\"user\\\".\").nullable(),\n}).passthrough().describe(\"Partial Notion user object for created_by/last_edited_by contexts.\");\nconst NotionCreateDatabase__DataSourceRefSchema = z.object({\n id: z.string().describe(\"Unique identifier for the data source (UUID format).\").nullable(),\n name: z.string().describe(\"Name of the data source.\").nullable(),\n}).passthrough().describe(\"Minimal data source object embedded in Database responses.\");\nexport const NotionCreateDatabaseOutput = z.object({\n id: z.string().describe(\"Unique identifier for the database (UUID format).\").nullable(),\n url: z.string().describe(\"The URL of the database in Notion.\").nullable(),\n icon: NotionCreateDatabase__IconSchema.nullable().optional(),\n cover: NotionCreateDatabase__CoverSchema.nullable().optional(),\n title: z.array(NotionCreateDatabase__RichTextSchema).describe(\"Array of rich text objects representing the database title/name as it appears in Notion.\"),\n object: z.string().describe(\"Always \\\"database\\\".\").nullable(),\n parent: NotionCreateDatabase__ParentSchema.nullable(),\n archived: z.boolean().describe(\"Whether the database is archived.\").nullable(),\n in_trash: z.boolean().describe(\"Whether the database is in the trash.\").nullable(),\n is_inline: z.boolean().describe(\"Whether the database appears inline on the page (true) or as a full page database (false).\").nullable(),\n created_by: NotionCreateDatabase__PartialUserSchema.nullable().optional(),\n properties: z.record(z.string(), z.unknown()).describe(\"Schema definition of database properties/columns. Each property is keyed by its name and contains type-specific configuration including id, name, description, type, and a type-specific object with additional settings.\"),\n public_url: z.string().describe(\"Public web URL if the database is published to the web, otherwise null.\").nullable().optional(),\n request_id: z.string().describe(\"Unique identifier for the API request (used for debugging and support).\").nullable().optional(),\n description: z.array(NotionCreateDatabase__RichTextSchema).describe(\"Array of rich text objects representing the database description.\").nullable().optional(),\n created_time: z.string().describe(\"ISO 8601 timestamp when the database was created.\").nullable(),\n data_sources: z.array(NotionCreateDatabase__DataSourceRefSchema).describe(\"List of child data sources in the database (available in API version 2025-09-03+). Each database has one or more data sources.\").nullable().optional(),\n last_edited_by: NotionCreateDatabase__PartialUserSchema.nullable().optional(),\n developer_survey: z.string().describe(\"URL to a feedback survey (may appear in API responses).\").nullable().optional(),\n last_edited_time: z.string().describe(\"ISO 8601 timestamp when the database was last edited.\").nullable(),\n}).passthrough().describe(\"Response body returned by POST /v1/databases. Matches Notion Database object.\");\n\nexport const notionCreateDatabase = action(\"NOTION_CREATE_DATABASE\", {\n slug: \"notion-create-database\",\n name: \"Create Notion Database\",\n description: \"Creates a new Notion database as a subpage under a specified parent page with a defined properties schema. IMPORTANT NOTES: - The parent page MUST be shared with your integration, otherwise you'll get a 404 error - If you encounter conflict errors (409), retry the request as Notion may experience temporary save conflicts - For relation properties, you MUST provide the database_id of the related database - Parent ID must be a valid UUID format (with or without hyphens), not a template variable Use this action exclusively for creating new databases.\",\n input: NotionCreateDatabaseInput,\n output: NotionCreateDatabaseOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA4B,EAAE,OAAO;CAChD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,gJAAgJ;CAC3K,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,owBAAowB;CACnyB,YAAY,EAAE,MAAM,EAAE,OAAO;EAC7B,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB;EAChD,MAAM,EAAE,KAAK;GAAC;GAAS;GAAa;GAAU;GAAU;GAAgB;GAAQ;GAAU;GAAS;GAAY;GAAO;GAAS;GAAgB;GAAW;GAAY;GAAU;GAAU;GAAgB;GAAc;GAAoB;GAAkB;GAAS;EAAW,CAAC,CAAC,CAAC,SAAS,8HAA8H;EAC5Z,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,+MAA+M,CAAC,CAAC,SAAS;EAC3P,eAAe,EAAE,OAAO,CAAC,CAAC,QAAQ,iBAAiB,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC5I,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,2xBAA2xB,CAAC,CAAC,SAAS;AACj0B,CAAC;AACD,MAAM,yCAAyC,EAAE,OAAO;CACtD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CACzF,aAAa,EAAE,OAAO,CAAC,CAAC,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