@keystrokehq/notion 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/action.cjs.map +1 -1
- package/dist/action.mjs.map +1 -1
- package/dist/actions/add-multiple-page-content.cjs +8 -8
- package/dist/actions/add-multiple-page-content.cjs.map +1 -1
- package/dist/actions/add-multiple-page-content.d.cts +88 -3
- package/dist/actions/add-multiple-page-content.d.cts.map +1 -1
- package/dist/actions/add-multiple-page-content.d.mts +88 -3
- package/dist/actions/add-multiple-page-content.d.mts.map +1 -1
- package/dist/actions/add-multiple-page-content.mjs +8 -8
- package/dist/actions/add-multiple-page-content.mjs.map +1 -1
- package/dist/actions/append-code-blocks.cjs +44 -44
- package/dist/actions/append-code-blocks.cjs.map +1 -1
- package/dist/actions/append-code-blocks.d.cts +849 -3
- package/dist/actions/append-code-blocks.d.cts.map +1 -1
- package/dist/actions/append-code-blocks.d.mts +849 -3
- package/dist/actions/append-code-blocks.d.mts.map +1 -1
- package/dist/actions/append-code-blocks.mjs +44 -44
- package/dist/actions/append-code-blocks.mjs.map +1 -1
- package/dist/actions/append-layout-blocks.cjs +44 -44
- package/dist/actions/append-layout-blocks.cjs.map +1 -1
- package/dist/actions/append-layout-blocks.d.cts +642 -3
- package/dist/actions/append-layout-blocks.d.cts.map +1 -1
- package/dist/actions/append-layout-blocks.d.mts +642 -3
- package/dist/actions/append-layout-blocks.d.mts.map +1 -1
- package/dist/actions/append-layout-blocks.mjs +44 -44
- package/dist/actions/append-layout-blocks.mjs.map +1 -1
- package/dist/actions/append-media-blocks.cjs +44 -44
- package/dist/actions/append-media-blocks.cjs.map +1 -1
- package/dist/actions/append-media-blocks.d.cts +996 -3
- package/dist/actions/append-media-blocks.d.cts.map +1 -1
- package/dist/actions/append-media-blocks.d.mts +996 -3
- package/dist/actions/append-media-blocks.d.mts.map +1 -1
- package/dist/actions/append-media-blocks.mjs +44 -44
- package/dist/actions/append-media-blocks.mjs.map +1 -1
- package/dist/actions/append-table-blocks.cjs +44 -44
- package/dist/actions/append-table-blocks.cjs.map +1 -1
- package/dist/actions/append-table-blocks.d.cts +624 -3
- package/dist/actions/append-table-blocks.d.cts.map +1 -1
- package/dist/actions/append-table-blocks.d.mts +624 -3
- package/dist/actions/append-table-blocks.d.mts.map +1 -1
- package/dist/actions/append-table-blocks.mjs +44 -44
- package/dist/actions/append-table-blocks.mjs.map +1 -1
- package/dist/actions/append-task-blocks.cjs +44 -44
- package/dist/actions/append-task-blocks.cjs.map +1 -1
- package/dist/actions/append-task-blocks.d.cts +826 -3
- package/dist/actions/append-task-blocks.d.cts.map +1 -1
- package/dist/actions/append-task-blocks.d.mts +826 -3
- package/dist/actions/append-task-blocks.d.mts.map +1 -1
- package/dist/actions/append-task-blocks.mjs +44 -44
- package/dist/actions/append-task-blocks.mjs.map +1 -1
- package/dist/actions/append-text-blocks.cjs +44 -44
- package/dist/actions/append-text-blocks.cjs.map +1 -1
- package/dist/actions/append-text-blocks.d.cts +1080 -3
- package/dist/actions/append-text-blocks.d.cts.map +1 -1
- package/dist/actions/append-text-blocks.d.mts +1080 -3
- package/dist/actions/append-text-blocks.d.mts.map +1 -1
- package/dist/actions/append-text-blocks.mjs +44 -44
- package/dist/actions/append-text-blocks.mjs.map +1 -1
- package/dist/actions/archive-notion-page.cjs +27 -27
- 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 +27 -27
- 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 +31 -31
- package/dist/actions/create-database.cjs.map +1 -1
- package/dist/actions/create-database.d.cts +139 -3
- package/dist/actions/create-database.d.cts.map +1 -1
- package/dist/actions/create-database.d.mts +139 -3
- package/dist/actions/create-database.d.mts.map +1 -1
- package/dist/actions/create-database.mjs +31 -31
- package/dist/actions/create-database.mjs.map +1 -1
- package/dist/actions/create-file-upload.cjs +8 -8
- 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 +8 -8
- package/dist/actions/create-file-upload.mjs.map +1 -1
- package/dist/actions/create-notion-page.cjs +29 -29
- 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 +29 -29
- package/dist/actions/create-notion-page.mjs.map +1 -1
- package/dist/actions/delete-block.cjs +53 -53
- 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 +53 -53
- package/dist/actions/delete-block.mjs.map +1 -1
- package/dist/actions/duplicate-page.cjs +31 -31
- 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 +31 -31
- package/dist/actions/duplicate-page.mjs.map +1 -1
- package/dist/actions/fetch-all-block-contents.cjs +45 -45
- 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 +45 -45
- package/dist/actions/fetch-all-block-contents.mjs.map +1 -1
- package/dist/actions/fetch-block-contents.cjs +57 -57
- 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 +57 -57
- package/dist/actions/fetch-block-contents.mjs.map +1 -1
- package/dist/actions/fetch-block-metadata.cjs +51 -51
- 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 +51 -51
- package/dist/actions/fetch-block-metadata.mjs.map +1 -1
- package/dist/actions/fetch-comments.cjs +37 -37
- 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 +37 -37
- package/dist/actions/fetch-comments.mjs.map +1 -1
- package/dist/actions/fetch-data.cjs +51 -51
- 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 +51 -51
- package/dist/actions/fetch-data.mjs.map +1 -1
- package/dist/actions/fetch-database.cjs +27 -27
- 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 +27 -27
- package/dist/actions/fetch-database.mjs.map +1 -1
- package/dist/actions/fetch-row.cjs +35 -35
- 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 +35 -35
- package/dist/actions/fetch-row.mjs.map +1 -1
- package/dist/actions/get-about-user.cjs +7 -7
- 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 +7 -7
- package/dist/actions/get-about-user.mjs.map +1 -1
- package/dist/actions/get-page-markdown.cjs +4 -4
- 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 +4 -4
- 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 +30 -30
- package/dist/actions/insert-row-database.cjs.map +1 -1
- package/dist/actions/insert-row-database.d.cts +163 -3
- package/dist/actions/insert-row-database.d.cts.map +1 -1
- package/dist/actions/insert-row-database.d.mts +163 -3
- package/dist/actions/insert-row-database.d.mts.map +1 -1
- package/dist/actions/insert-row-database.mjs +30 -30
- package/dist/actions/insert-row-database.mjs.map +1 -1
- package/dist/actions/insert-row-from-nl.cjs +1 -1
- 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 +1 -1
- package/dist/actions/insert-row-from-nl.mjs.map +1 -1
- package/dist/actions/list-data-source-templates.cjs +4 -4
- 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 +4 -4
- package/dist/actions/list-data-source-templates.mjs.map +1 -1
- package/dist/actions/list-file-uploads.cjs +7 -7
- 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 +7 -7
- package/dist/actions/list-file-uploads.mjs.map +1 -1
- package/dist/actions/list-users.cjs +6 -6
- 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 +6 -6
- package/dist/actions/list-users.mjs.map +1 -1
- package/dist/actions/move-page.cjs +27 -27
- package/dist/actions/move-page.cjs.map +1 -1
- package/dist/actions/move-page.d.cts +90 -3
- package/dist/actions/move-page.d.cts.map +1 -1
- package/dist/actions/move-page.d.mts +90 -3
- package/dist/actions/move-page.d.mts.map +1 -1
- package/dist/actions/move-page.mjs +27 -27
- package/dist/actions/move-page.mjs.map +1 -1
- package/dist/actions/query-data-source.cjs +18 -18
- package/dist/actions/query-data-source.cjs.map +1 -1
- package/dist/actions/query-data-source.d.cts +159 -3
- package/dist/actions/query-data-source.d.cts.map +1 -1
- package/dist/actions/query-data-source.d.mts +159 -3
- package/dist/actions/query-data-source.d.mts.map +1 -1
- package/dist/actions/query-data-source.mjs +18 -18
- package/dist/actions/query-data-source.mjs.map +1 -1
- package/dist/actions/query-database-with-filter.cjs +49 -49
- package/dist/actions/query-database-with-filter.cjs.map +1 -1
- package/dist/actions/query-database-with-filter.d.cts +214 -3
- package/dist/actions/query-database-with-filter.d.cts.map +1 -1
- package/dist/actions/query-database-with-filter.d.mts +214 -3
- package/dist/actions/query-database-with-filter.d.mts.map +1 -1
- package/dist/actions/query-database-with-filter.mjs +49 -49
- package/dist/actions/query-database-with-filter.mjs.map +1 -1
- package/dist/actions/query-database.cjs +38 -38
- package/dist/actions/query-database.cjs.map +1 -1
- package/dist/actions/query-database.d.cts +208 -3
- package/dist/actions/query-database.d.cts.map +1 -1
- package/dist/actions/query-database.d.mts +208 -3
- package/dist/actions/query-database.d.mts.map +1 -1
- package/dist/actions/query-database.mjs +38 -38
- package/dist/actions/query-database.mjs.map +1 -1
- package/dist/actions/replace-page-content.cjs +3 -3
- package/dist/actions/replace-page-content.cjs.map +1 -1
- package/dist/actions/replace-page-content.d.cts +1706 -3
- package/dist/actions/replace-page-content.d.cts.map +1 -1
- package/dist/actions/replace-page-content.d.mts +1706 -3
- package/dist/actions/replace-page-content.d.mts.map +1 -1
- package/dist/actions/replace-page-content.mjs +3 -3
- 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 +19 -19
- 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 +19 -19
- package/dist/actions/retrieve-database-property.mjs.map +1 -1
- package/dist/actions/retrieve-file-upload.cjs +5 -5
- 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 +5 -5
- package/dist/actions/retrieve-file-upload.mjs.map +1 -1
- package/dist/actions/retrieve-page.cjs +34 -34
- 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 +34 -34
- package/dist/actions/retrieve-page.mjs.map +1 -1
- package/dist/actions/search-notion-page.cjs +54 -54
- 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 +54 -54
- package/dist/actions/search-notion-page.mjs.map +1 -1
- package/dist/actions/send-file-upload.cjs +7 -7
- 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 +7 -7
- package/dist/actions/send-file-upload.mjs.map +1 -1
- package/dist/actions/update-block.cjs +55 -55
- 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 +55 -55
- package/dist/actions/update-block.mjs.map +1 -1
- package/dist/actions/update-page.cjs +32 -32
- 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 +32 -32
- package/dist/actions/update-page.mjs.map +1 -1
- package/dist/actions/update-row-database.cjs +31 -31
- package/dist/actions/update-row-database.cjs.map +1 -1
- package/dist/actions/update-row-database.d.cts +126 -3
- package/dist/actions/update-row-database.d.cts.map +1 -1
- package/dist/actions/update-row-database.d.mts +126 -3
- package/dist/actions/update-row-database.d.mts.map +1 -1
- package/dist/actions/update-row-database.mjs +31 -31
- package/dist/actions/update-row-database.mjs.map +1 -1
- package/dist/actions/update-schema-database.cjs +51 -51
- package/dist/actions/update-schema-database.cjs.map +1 -1
- package/dist/actions/update-schema-database.d.cts +314 -3
- package/dist/actions/update-schema-database.d.cts.map +1 -1
- package/dist/actions/update-schema-database.d.mts +314 -3
- package/dist/actions/update-schema-database.d.mts.map +1 -1
- package/dist/actions/update-schema-database.mjs +51 -51
- package/dist/actions/update-schema-database.mjs.map +1 -1
- package/dist/actions/upsert-row-database.cjs +4 -4
- package/dist/actions/upsert-row-database.cjs.map +1 -1
- package/dist/actions/upsert-row-database.d.cts +218 -3
- package/dist/actions/upsert-row-database.d.cts.map +1 -1
- package/dist/actions/upsert-row-database.d.mts +218 -3
- package/dist/actions/upsert-row-database.d.mts.map +1 -1
- package/dist/actions/upsert-row-database.mjs +4 -4
- 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
|
@@ -35,60 +35,60 @@ const NotionCreateDatabaseInput = z.object({
|
|
|
35
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()
|
|
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.")
|
|
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
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.");
|
|
41
|
+
const NotionCreateDatabase__ExternalFileSchema = z.object({ url: z.string().describe("URL of the externally hosted file.").nullable() }).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.")
|
|
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
46
|
}).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
53
|
}).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
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.");
|
|
59
|
+
const NotionCreateDatabase__LinkSchema = z.object({ url: z.string().describe("URL of the link.").nullable() }).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.")
|
|
62
|
+
content: z.string().describe("The text content.").nullable()
|
|
63
63
|
}).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.")
|
|
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
71
|
}).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
78
|
}).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
84
|
}).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\".")
|
|
86
|
+
id: z.string().describe("Unique identifier for the user (UUID format).").nullable(),
|
|
87
|
+
object: z.string().describe("Always \"user\".").nullable()
|
|
88
88
|
}).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.")
|
|
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
92
|
}).describe("Minimal data source object embedded in Database responses.");
|
|
93
93
|
const notionCreateDatabase = action("NOTION_CREATE_DATABASE", {
|
|
94
94
|
slug: "notion-create-database",
|
|
@@ -96,26 +96,26 @@ const notionCreateDatabase = action("NOTION_CREATE_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
110
|
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."),
|
|
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.")
|
|
118
|
+
last_edited_time: z.string().describe("ISO 8601 timestamp when the database was last edited.").nullable()
|
|
119
119
|
}).describe("Response body returned by POST /v1/databases. Matches Notion Database object.")
|
|
120
120
|
});
|
|
121
121
|
//#endregion
|
|
@@ -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;GAA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,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS,uCAAuC;EACtE,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS,4FAA4F;EAC5H,YAAY,wCAAwC,SAAS,CAAC,CAAC,SAAS;EACxE,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,2NAA2N;EAC7P,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,yEAAyE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC/H,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,yEAAyE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC/H,aAAa,EAAE,MAAM,oCAAoC,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC7J,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD;EACrF,cAAc,EAAE,MAAM,yCAAyC,CAAC,CAAC,SAAS,gIAAgI,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAChO,gBAAgB,wCAAwC,SAAS,CAAC,CAAC,SAAS;EAC5E,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACrH,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})).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}).describe(\"Notion-hosted file.\");\nconst NotionCreateDatabase__ExternalFileSchema = z.object({\n url: z.string().describe(\"URL of the externally hosted file.\").nullable(),\n}).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}).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}).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}).describe(\"Database cover image (file object).\");\nconst NotionCreateDatabase__LinkSchema = z.object({\n url: z.string().describe(\"URL of the link.\").nullable(),\n}).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}).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}).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}).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}).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}).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}).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.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.\").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}).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,MA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yC,CAAC,CAAC,SAAS,gIAAgI,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAChO,gBAAgB,wCAAwC,SAAS,CAAC,CAAC,SAAS;EAC5E,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACrH,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CAC1G,CAAC,CAAC,CAAC,SAAS,+EAOF;AACV,CAAC"}
|
|
@@ -13,24 +13,24 @@ const NotionCreateFileUploadInput = zod.z.object({
|
|
|
13
13
|
number_of_parts: zod.z.number().int().describe("Total parts for a multi-part upload; required when mode='multi_part'.").optional()
|
|
14
14
|
});
|
|
15
15
|
const NotionCreateFileUploadOutput = zod.z.object({
|
|
16
|
-
id: zod.z.string().describe("Unique identifier (UUID) for the file upload. Required for subsequent upload and attachment operations."),
|
|
17
|
-
object: zod.z.string().describe("Always set to 'file_upload'. Identifies the object type."),
|
|
16
|
+
id: zod.z.string().describe("Unique identifier (UUID) for the file upload. Required for subsequent upload and attachment operations.").nullable(),
|
|
17
|
+
object: zod.z.string().describe("Always set to 'file_upload'. Identifies the object type.").nullable(),
|
|
18
18
|
status: zod.z.enum([
|
|
19
19
|
"pending",
|
|
20
20
|
"uploaded",
|
|
21
21
|
"expired",
|
|
22
22
|
"failed"
|
|
23
|
-
]).describe("Current status of the file upload. Initially set to 'pending' after creation. Can be 'pending', 'uploaded', 'expired', or 'failed'."),
|
|
24
|
-
archived: zod.z.boolean().describe("Indicates whether the file upload has been archived. Set to false initially."),
|
|
23
|
+
]).describe("Current status of the file upload. Initially set to 'pending' after creation. Can be 'pending', 'uploaded', 'expired', or 'failed'.").nullable(),
|
|
24
|
+
archived: zod.z.boolean().describe("Indicates whether the file upload has been archived. Set to false initially.").nullable(),
|
|
25
25
|
filename: zod.z.string().describe("Name of the uploaded file, provided during the Create a file upload step. Initially null until the file is actually uploaded. Maximum length is 900 bytes including extension.").nullable().optional(),
|
|
26
26
|
request_id: zod.z.string().describe("Request identifier for tracking the file upload operation.").nullable().optional(),
|
|
27
|
-
upload_url: zod.z.string().describe("The endpoint URL where binary file contents should be transmitted in the next step. Only present for pending uploads with status 'pending'."),
|
|
28
|
-
expiry_time: zod.z.string().describe("ISO 8601 timestamp when the file upload will expire. The file must be attached within one hour or it will transition to an archived state."),
|
|
27
|
+
upload_url: zod.z.string().describe("The endpoint URL where binary file contents should be transmitted in the next step. Only present for pending uploads with status 'pending'.").nullable(),
|
|
28
|
+
expiry_time: zod.z.string().describe("ISO 8601 timestamp when the file upload will expire. The file must be attached within one hour or it will transition to an archived state.").nullable(),
|
|
29
29
|
complete_url: zod.z.string().describe("URL for completing a multi-part file upload. Only present for pending multi-part uploads (mode=multi_part).").nullable().optional(),
|
|
30
30
|
content_type: zod.z.string().describe("The MIME content type of the uploaded file. Initially null until the file is actually uploaded.").nullable().optional(),
|
|
31
|
-
created_time: zod.z.string().describe("ISO 8601 timestamp when the file upload was created."),
|
|
31
|
+
created_time: zod.z.string().describe("ISO 8601 timestamp when the file upload was created.").nullable(),
|
|
32
32
|
content_length: zod.z.string().describe("The total size of the file in bytes. Initially null until the file is actually uploaded.").nullable().optional(),
|
|
33
|
-
last_edited_time: zod.z.string().describe("ISO 8601 timestamp when the file upload was last modified.")
|
|
33
|
+
last_edited_time: zod.z.string().describe("ISO 8601 timestamp when the file upload was last modified.").nullable()
|
|
34
34
|
});
|
|
35
35
|
const notionCreateFileUpload = require_action.action("NOTION_CREATE_FILE_UPLOAD", {
|
|
36
36
|
slug: "notion-create-file-upload",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-file-upload.cjs","names":["z","action"],"sources":["../../src/actions/create-file-upload.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NotionCreateFileUploadInput
|
|
1
|
+
{"version":3,"file":"create-file-upload.cjs","names":["z","action"],"sources":["../../src/actions/create-file-upload.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NotionCreateFileUploadInput = z.object({\n mode: z.enum([\"single_part\", \"multi_part\", \"external_url\"]).describe(\"Upload mode: 'single_part' for direct upload (default, up to 20 MB), 'multi_part' for chunked uploads (requires paid Notion workspace), or 'external_url' to import from a public URL. Note: Free workspaces are limited to 5 MB files and cannot use multi_part mode.\").optional(),\n filename: z.string().describe(\"Human-readable file name with extension. Required for external_url; for multi_part, supply to infer extension or pair with content_type; optional for single-part. Supported extensions: Audio (.aac, .adts, .mid, .midi, .mp3, .mpga, .m4a, .m4b, .mp4, .oga, .ogg, .wav, .wma); Document (.pdf, .txt, .json, .doc, .dot, .docx, .dotx, .xls, .xlt, .xla, .xlsx, .xltx, .ppt, .pot, .pps, .ppa, .pptx, .potx); Image (.gif, .heic, .jpeg, .jpg, .png, .svg, .tif, .tiff, .webp, .ico); Video (.amv, .asf, .wmv, .avi, .f4v, .flv, .gifv, .m4v, .mp4, .mkv, .webm, .mov, .qt, .mpeg).\").optional(),\n content_type: z.string().describe(\"MIME type of the file. Required in multi_part if filename lacks extension; optional for single-part.\").optional(),\n external_url: z.string().describe(\"Public HTTPS URL to import. Required when mode='external_url'. Must expose Content-Type and Content-Length.\").optional(),\n number_of_parts: z.number().int().describe(\"Total parts for a multi-part upload; required when mode='multi_part'.\").optional(),\n});\nexport const NotionCreateFileUploadOutput = z.object({\n id: z.string().describe(\"Unique identifier (UUID) for the file upload. Required for subsequent upload and attachment operations.\").nullable(),\n object: z.string().describe(\"Always set to 'file_upload'. Identifies the object type.\").nullable(),\n status: z.enum([\"pending\", \"uploaded\", \"expired\", \"failed\"]).describe(\"Current status of the file upload. Initially set to 'pending' after creation. Can be 'pending', 'uploaded', 'expired', or 'failed'.\").nullable(),\n archived: z.boolean().describe(\"Indicates whether the file upload has been archived. Set to false initially.\").nullable(),\n filename: z.string().describe(\"Name of the uploaded file, provided during the Create a file upload step. Initially null until the file is actually uploaded. Maximum length is 900 bytes including extension.\").nullable().optional(),\n request_id: z.string().describe(\"Request identifier for tracking the file upload operation.\").nullable().optional(),\n upload_url: z.string().describe(\"The endpoint URL where binary file contents should be transmitted in the next step. Only present for pending uploads with status 'pending'.\").nullable(),\n expiry_time: z.string().describe(\"ISO 8601 timestamp when the file upload will expire. The file must be attached within one hour or it will transition to an archived state.\").nullable(),\n complete_url: z.string().describe(\"URL for completing a multi-part file upload. Only present for pending multi-part uploads (mode=multi_part).\").nullable().optional(),\n content_type: z.string().describe(\"The MIME content type of the uploaded file. Initially null until the file is actually uploaded.\").nullable().optional(),\n created_time: z.string().describe(\"ISO 8601 timestamp when the file upload was created.\").nullable(),\n content_length: z.string().describe(\"The total size of the file in bytes. Initially null until the file is actually uploaded.\").nullable().optional(),\n last_edited_time: z.string().describe(\"ISO 8601 timestamp when the file upload was last modified.\").nullable(),\n});\n\nexport const notionCreateFileUpload = action(\"NOTION_CREATE_FILE_UPLOAD\", {\n slug: \"notion-create-file-upload\",\n name: \"Create Notion file upload\",\n description: \"Tool to create a Notion FileUpload object and retrieve an upload URL. Use when you need to automate attaching local or external files directly into Notion without external hosting.\",\n input: NotionCreateFileUploadInput,\n output: NotionCreateFileUploadOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,MAAMA,IAAAA,EAAE,KAAK;EAAC;EAAe;EAAc;CAAc,CAAC,CAAC,CAAC,SAAS,wQAAwQ,CAAC,CAAC,SAAS;CACxV,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,ujBAAujB,CAAC,CAAC,SAAS;CAChmB,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sGAAsG,CAAC,CAAC,SAAS;CACnJ,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6GAA6G,CAAC,CAAC,SAAS;CAC1J,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,u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ED,MAAa,yBAAyBC,eAAAA,OAAO,6BAA6B;CACxE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,9 +1,44 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/create-file-upload.d.ts
|
|
4
|
-
declare const NotionCreateFileUploadInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const NotionCreateFileUploadInput: z.ZodObject<{
|
|
5
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
single_part: "single_part";
|
|
7
|
+
multi_part: "multi_part";
|
|
8
|
+
external_url: "external_url";
|
|
9
|
+
}>>;
|
|
10
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
11
|
+
content_type: z.ZodOptional<z.ZodString>;
|
|
12
|
+
external_url: z.ZodOptional<z.ZodString>;
|
|
13
|
+
number_of_parts: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
declare const NotionCreateFileUploadOutput: z.ZodObject<{
|
|
16
|
+
id: z.ZodNullable<z.ZodString>;
|
|
17
|
+
object: z.ZodNullable<z.ZodString>;
|
|
18
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
19
|
+
pending: "pending";
|
|
20
|
+
uploaded: "uploaded";
|
|
21
|
+
expired: "expired";
|
|
22
|
+
failed: "failed";
|
|
23
|
+
}>>;
|
|
24
|
+
archived: z.ZodNullable<z.ZodBoolean>;
|
|
25
|
+
filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
+
upload_url: z.ZodNullable<z.ZodString>;
|
|
28
|
+
expiry_time: z.ZodNullable<z.ZodString>;
|
|
29
|
+
complete_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
30
|
+
content_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
|
+
created_time: z.ZodNullable<z.ZodString>;
|
|
32
|
+
content_length: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
last_edited_time: z.ZodNullable<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
declare const notionCreateFileUpload: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
36
|
+
mode?: "single_part" | "multi_part" | "external_url" | undefined;
|
|
37
|
+
filename?: string | undefined;
|
|
38
|
+
content_type?: string | undefined;
|
|
39
|
+
external_url?: string | undefined;
|
|
40
|
+
number_of_parts?: number | undefined;
|
|
41
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
42
|
//#endregion
|
|
8
43
|
export { notionCreateFileUpload };
|
|
9
44
|
//# sourceMappingURL=create-file-upload.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-file-upload.d.cts","names":[],"sources":["../../src/actions/create-file-upload.ts"],"mappings":";;;cAIa,2BAAA,
|
|
1
|
+
{"version":3,"file":"create-file-upload.d.cts","names":[],"sources":["../../src/actions/create-file-upload.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;cAO3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAgB5B,sBAAA,gCAAsB,wBAAA"}
|
|
@@ -1,9 +1,44 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/create-file-upload.d.ts
|
|
4
|
-
declare const NotionCreateFileUploadInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const NotionCreateFileUploadInput: z.ZodObject<{
|
|
5
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
single_part: "single_part";
|
|
7
|
+
multi_part: "multi_part";
|
|
8
|
+
external_url: "external_url";
|
|
9
|
+
}>>;
|
|
10
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
11
|
+
content_type: z.ZodOptional<z.ZodString>;
|
|
12
|
+
external_url: z.ZodOptional<z.ZodString>;
|
|
13
|
+
number_of_parts: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
declare const NotionCreateFileUploadOutput: z.ZodObject<{
|
|
16
|
+
id: z.ZodNullable<z.ZodString>;
|
|
17
|
+
object: z.ZodNullable<z.ZodString>;
|
|
18
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
19
|
+
pending: "pending";
|
|
20
|
+
uploaded: "uploaded";
|
|
21
|
+
expired: "expired";
|
|
22
|
+
failed: "failed";
|
|
23
|
+
}>>;
|
|
24
|
+
archived: z.ZodNullable<z.ZodBoolean>;
|
|
25
|
+
filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
+
upload_url: z.ZodNullable<z.ZodString>;
|
|
28
|
+
expiry_time: z.ZodNullable<z.ZodString>;
|
|
29
|
+
complete_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
30
|
+
content_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
|
+
created_time: z.ZodNullable<z.ZodString>;
|
|
32
|
+
content_length: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
last_edited_time: z.ZodNullable<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
declare const notionCreateFileUpload: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
36
|
+
mode?: "single_part" | "multi_part" | "external_url" | undefined;
|
|
37
|
+
filename?: string | undefined;
|
|
38
|
+
content_type?: string | undefined;
|
|
39
|
+
external_url?: string | undefined;
|
|
40
|
+
number_of_parts?: number | undefined;
|
|
41
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
42
|
//#endregion
|
|
8
43
|
export { notionCreateFileUpload };
|
|
9
44
|
//# sourceMappingURL=create-file-upload.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-file-upload.d.mts","names":[],"sources":["../../src/actions/create-file-upload.ts"],"mappings":";;;cAIa,2BAAA,
|
|
1
|
+
{"version":3,"file":"create-file-upload.d.mts","names":[],"sources":["../../src/actions/create-file-upload.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;cAO3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAgB5B,sBAAA,gCAAsB,wBAAA"}
|
|
@@ -16,24 +16,24 @@ const notionCreateFileUpload = action("NOTION_CREATE_FILE_UPLOAD", {
|
|
|
16
16
|
number_of_parts: z.number().int().describe("Total parts for a multi-part upload; required when mode='multi_part'.").optional()
|
|
17
17
|
}),
|
|
18
18
|
output: z.object({
|
|
19
|
-
id: z.string().describe("Unique identifier (UUID) for the file upload. Required for subsequent upload and attachment operations."),
|
|
20
|
-
object: z.string().describe("Always set to 'file_upload'. Identifies the object type."),
|
|
19
|
+
id: z.string().describe("Unique identifier (UUID) for the file upload. Required for subsequent upload and attachment operations.").nullable(),
|
|
20
|
+
object: z.string().describe("Always set to 'file_upload'. Identifies the object type.").nullable(),
|
|
21
21
|
status: z.enum([
|
|
22
22
|
"pending",
|
|
23
23
|
"uploaded",
|
|
24
24
|
"expired",
|
|
25
25
|
"failed"
|
|
26
|
-
]).describe("Current status of the file upload. Initially set to 'pending' after creation. Can be 'pending', 'uploaded', 'expired', or 'failed'."),
|
|
27
|
-
archived: z.boolean().describe("Indicates whether the file upload has been archived. Set to false initially."),
|
|
26
|
+
]).describe("Current status of the file upload. Initially set to 'pending' after creation. Can be 'pending', 'uploaded', 'expired', or 'failed'.").nullable(),
|
|
27
|
+
archived: z.boolean().describe("Indicates whether the file upload has been archived. Set to false initially.").nullable(),
|
|
28
28
|
filename: z.string().describe("Name of the uploaded file, provided during the Create a file upload step. Initially null until the file is actually uploaded. Maximum length is 900 bytes including extension.").nullable().optional(),
|
|
29
29
|
request_id: z.string().describe("Request identifier for tracking the file upload operation.").nullable().optional(),
|
|
30
|
-
upload_url: z.string().describe("The endpoint URL where binary file contents should be transmitted in the next step. Only present for pending uploads with status 'pending'."),
|
|
31
|
-
expiry_time: z.string().describe("ISO 8601 timestamp when the file upload will expire. The file must be attached within one hour or it will transition to an archived state."),
|
|
30
|
+
upload_url: z.string().describe("The endpoint URL where binary file contents should be transmitted in the next step. Only present for pending uploads with status 'pending'.").nullable(),
|
|
31
|
+
expiry_time: z.string().describe("ISO 8601 timestamp when the file upload will expire. The file must be attached within one hour or it will transition to an archived state.").nullable(),
|
|
32
32
|
complete_url: z.string().describe("URL for completing a multi-part file upload. Only present for pending multi-part uploads (mode=multi_part).").nullable().optional(),
|
|
33
33
|
content_type: z.string().describe("The MIME content type of the uploaded file. Initially null until the file is actually uploaded.").nullable().optional(),
|
|
34
|
-
created_time: z.string().describe("ISO 8601 timestamp when the file upload was created."),
|
|
34
|
+
created_time: z.string().describe("ISO 8601 timestamp when the file upload was created.").nullable(),
|
|
35
35
|
content_length: z.string().describe("The total size of the file in bytes. Initially null until the file is actually uploaded.").nullable().optional(),
|
|
36
|
-
last_edited_time: z.string().describe("ISO 8601 timestamp when the file upload was last modified.")
|
|
36
|
+
last_edited_time: z.string().describe("ISO 8601 timestamp when the file upload was last modified.").nullable()
|
|
37
37
|
})
|
|
38
38
|
});
|
|
39
39
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-file-upload.mjs","names":[],"sources":["../../src/actions/create-file-upload.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NotionCreateFileUploadInput
|
|
1
|
+
{"version":3,"file":"create-file-upload.mjs","names":[],"sources":["../../src/actions/create-file-upload.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NotionCreateFileUploadInput = z.object({\n mode: z.enum([\"single_part\", \"multi_part\", \"external_url\"]).describe(\"Upload mode: 'single_part' for direct upload (default, up to 20 MB), 'multi_part' for chunked uploads (requires paid Notion workspace), or 'external_url' to import from a public URL. Note: Free workspaces are limited to 5 MB files and cannot use multi_part mode.\").optional(),\n filename: z.string().describe(\"Human-readable file name with extension. Required for external_url; for multi_part, supply to infer extension or pair with content_type; optional for single-part. Supported extensions: Audio (.aac, .adts, .mid, .midi, .mp3, .mpga, .m4a, .m4b, .mp4, .oga, .ogg, .wav, .wma); Document (.pdf, .txt, .json, .doc, .dot, .docx, .dotx, .xls, .xlt, .xla, .xlsx, .xltx, .ppt, .pot, .pps, .ppa, .pptx, .potx); Image (.gif, .heic, .jpeg, .jpg, .png, .svg, .tif, .tiff, .webp, .ico); Video (.amv, .asf, .wmv, .avi, .f4v, .flv, .gifv, .m4v, .mp4, .mkv, .webm, .mov, .qt, .mpeg).\").optional(),\n content_type: z.string().describe(\"MIME type of the file. Required in multi_part if filename lacks extension; optional for single-part.\").optional(),\n external_url: z.string().describe(\"Public HTTPS URL to import. Required when mode='external_url'. Must expose Content-Type and Content-Length.\").optional(),\n number_of_parts: z.number().int().describe(\"Total parts for a multi-part upload; required when mode='multi_part'.\").optional(),\n});\nexport const NotionCreateFileUploadOutput = z.object({\n id: z.string().describe(\"Unique identifier (UUID) for the file upload. Required for subsequent upload and attachment operations.\").nullable(),\n object: z.string().describe(\"Always set to 'file_upload'. Identifies the object type.\").nullable(),\n status: z.enum([\"pending\", \"uploaded\", \"expired\", \"failed\"]).describe(\"Current status of the file upload. Initially set to 'pending' after creation. Can be 'pending', 'uploaded', 'expired', or 'failed'.\").nullable(),\n archived: z.boolean().describe(\"Indicates whether the file upload has been archived. Set to false initially.\").nullable(),\n filename: z.string().describe(\"Name of the uploaded file, provided during the Create a file upload step. Initially null until the file is actually uploaded. Maximum length is 900 bytes including extension.\").nullable().optional(),\n request_id: z.string().describe(\"Request identifier for tracking the file upload operation.\").nullable().optional(),\n upload_url: z.string().describe(\"The endpoint URL where binary file contents should be transmitted in the next step. Only present for pending uploads with status 'pending'.\").nullable(),\n expiry_time: z.string().describe(\"ISO 8601 timestamp when the file upload will expire. The file must be attached within one hour or it will transition to an archived state.\").nullable(),\n complete_url: z.string().describe(\"URL for completing a multi-part file upload. Only present for pending multi-part uploads (mode=multi_part).\").nullable().optional(),\n content_type: z.string().describe(\"The MIME content type of the uploaded file. Initially null until the file is actually uploaded.\").nullable().optional(),\n created_time: z.string().describe(\"ISO 8601 timestamp when the file upload was created.\").nullable(),\n content_length: z.string().describe(\"The total size of the file in bytes. Initially null until the file is actually uploaded.\").nullable().optional(),\n last_edited_time: z.string().describe(\"ISO 8601 timestamp when the file upload was last modified.\").nullable(),\n});\n\nexport const notionCreateFileUpload = action(\"NOTION_CREATE_FILE_UPLOAD\", {\n slug: \"notion-create-file-upload\",\n name: \"Create Notion file upload\",\n description: \"Tool to create a Notion FileUpload object and retrieve an upload URL. Use when you need to automate attaching local or external files directly into Notion without external hosting.\",\n input: NotionCreateFileUploadInput,\n output: NotionCreateFileUploadOutput,\n});\n"],"mappings":";;AA2BA,MAAa,yBAAyB,OAAO,6BAA6B;CACxE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OA3ByC,EAAE,OAAO;EAClD,MAAM,EAAE,KAAK;GAAC;GAAe;GAAc;EAAc,CAAC,CAAC,CAAC,SAAS,wQAAwQ,CAAC,CAAC,SAAS;EACxV,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,ujBAAujB,CAAC,CAAC,SAAS;EAChmB,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,sGAAsG,CAAC,CAAC,SAAS;EACnJ,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,6GAA6G,CAAC,CAAC,SAAS;EAC1J,iBAAiB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uEAAuE,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format (8-4-4-4-12 hex characters like '59833787-2cf9-4fdf-8782-e53db20768a5') or dashless format (32 hex characters like '598337872cf94fdf8782e53db20768a5') of an existing Notion page or database. 2) The exact title of an existing page/database (less reliable - UUID strongly preferred). IMPORTANT: Always use search_pages or list_databases actions FIRST to obtain valid parent IDs. Common errors: Using malformed UUIDs, non-existent IDs, or IDs from different workspaces. Note: Root-level pages cannot be created - you must specify a parent. Also accepts 'parent_page_id' as an alias.")
|
|
10
10
|
});
|
|
11
11
|
const NotionCreateNotionPage_NotionHostedFileSchema = zod.z.object({
|
|
12
|
-
url: zod.z.string().describe("Authenticated URL to access the file (valid for 1 hour)."),
|
|
13
|
-
expiry_time: zod.z.string().describe("ISO 8601 datetime when the URL expires.")
|
|
12
|
+
url: zod.z.string().describe("Authenticated URL to access the file (valid for 1 hour).").nullable(),
|
|
13
|
+
expiry_time: zod.z.string().describe("ISO 8601 datetime when the URL expires.").nullable()
|
|
14
14
|
}).describe("Notion-hosted file object.");
|
|
15
|
-
const NotionCreateNotionPage_ExternalFileSchema = zod.z.object({ url: zod.z.string().describe("External URL of the file.") }).describe("External file object.");
|
|
16
|
-
const NotionCreateNotionPage_FileUploadSchema = zod.z.object({ id: zod.z.string().describe("UUID of the completed file upload.") }).describe("API-uploaded file object.");
|
|
15
|
+
const NotionCreateNotionPage_ExternalFileSchema = zod.z.object({ url: zod.z.string().describe("External URL of the file.").nullable() }).describe("External file object.");
|
|
16
|
+
const NotionCreateNotionPage_FileUploadSchema = zod.z.object({ id: zod.z.string().describe("UUID of the completed file upload.").nullable() }).describe("API-uploaded file object.");
|
|
17
17
|
const NotionCreateNotionPage_CustomEmojiSchema = zod.z.object({
|
|
18
|
-
id: zod.z.string().describe("Unique identifier for the custom emoji."),
|
|
19
|
-
url: zod.z.string().describe("URL of the custom emoji image."),
|
|
20
|
-
name: zod.z.string().describe("Display name of the custom emoji.")
|
|
18
|
+
id: zod.z.string().describe("Unique identifier for the custom emoji.").nullable(),
|
|
19
|
+
url: zod.z.string().describe("URL of the custom emoji image.").nullable(),
|
|
20
|
+
name: zod.z.string().describe("Display name of the custom emoji.").nullable()
|
|
21
21
|
}).describe("Custom emoji object.");
|
|
22
22
|
const NotionCreateNotionPage_IconSchema = zod.z.object({
|
|
23
23
|
file: NotionCreateNotionPage_NotionHostedFileSchema.nullable().optional(),
|
|
24
|
-
type: zod.z.string().describe("Type of icon: 'emoji', 'custom_emoji', 'external', 'file', or 'file_upload'."),
|
|
24
|
+
type: zod.z.string().describe("Type of icon: 'emoji', 'custom_emoji', 'external', 'file', or 'file_upload'.").nullable(),
|
|
25
25
|
emoji: zod.z.string().describe("Emoji character when type is 'emoji'.").nullable().optional(),
|
|
26
26
|
external: NotionCreateNotionPage_ExternalFileSchema.nullable().optional(),
|
|
27
27
|
file_upload: NotionCreateNotionPage_FileUploadSchema.nullable().optional(),
|
|
@@ -29,41 +29,41 @@ const NotionCreateNotionPage_IconSchema = zod.z.object({
|
|
|
29
29
|
}).describe("Page icon, can be an emoji or file object.");
|
|
30
30
|
const NotionCreateNotionPage_CoverSchema = zod.z.object({
|
|
31
31
|
file: NotionCreateNotionPage_NotionHostedFileSchema.nullable().optional(),
|
|
32
|
-
type: zod.z.string().describe("Type of cover: 'external', 'file', or 'file_upload'."),
|
|
32
|
+
type: zod.z.string().describe("Type of cover: 'external', 'file', or 'file_upload'.").nullable(),
|
|
33
33
|
external: NotionCreateNotionPage_ExternalFileSchema.nullable().optional(),
|
|
34
34
|
file_upload: NotionCreateNotionPage_FileUploadSchema.nullable().optional()
|
|
35
35
|
}).describe("Page cover image as a file object.");
|
|
36
36
|
const NotionCreateNotionPage_DatabaseParentSchema = zod.z.object({
|
|
37
|
-
type: zod.z.string().describe("Type of parent."),
|
|
38
|
-
database_id: zod.z.string().describe("UUID of the parent database.")
|
|
37
|
+
type: zod.z.string().describe("Type of parent.").nullable(),
|
|
38
|
+
database_id: zod.z.string().describe("UUID of the parent database.").nullable()
|
|
39
39
|
}).describe("Parent is a database.");
|
|
40
40
|
const NotionCreateNotionPage_DataSourceParentSchema = zod.z.object({
|
|
41
|
-
type: zod.z.string().describe("Type of parent."),
|
|
42
|
-
database_id: zod.z.string().describe("UUID of the parent database."),
|
|
43
|
-
data_source_id: zod.z.string().describe("UUID of the parent data source.")
|
|
41
|
+
type: zod.z.string().describe("Type of parent.").nullable(),
|
|
42
|
+
database_id: zod.z.string().describe("UUID of the parent database.").nullable(),
|
|
43
|
+
data_source_id: zod.z.string().describe("UUID of the parent data source.").nullable()
|
|
44
44
|
}).describe("Parent is a data source.");
|
|
45
45
|
const NotionCreateNotionPage_PageParentSchema = zod.z.object({
|
|
46
|
-
type: zod.z.string().describe("Type of parent."),
|
|
47
|
-
page_id: zod.z.string().describe("UUID of the parent page.")
|
|
46
|
+
type: zod.z.string().describe("Type of parent.").nullable(),
|
|
47
|
+
page_id: zod.z.string().describe("UUID of the parent page.").nullable()
|
|
48
48
|
}).describe("Parent is a page.");
|
|
49
49
|
const NotionCreateNotionPage_WorkspaceParentSchema = zod.z.object({
|
|
50
|
-
type: zod.z.string().describe("Type of parent."),
|
|
51
|
-
workspace: zod.z.boolean().describe("Always true, indicating a top-level page.")
|
|
50
|
+
type: zod.z.string().describe("Type of parent.").nullable(),
|
|
51
|
+
workspace: zod.z.boolean().describe("Always true, indicating a top-level page.").nullable()
|
|
52
52
|
}).describe("Parent is workspace (top-level page).");
|
|
53
53
|
const NotionCreateNotionPage_BlockParentSchema = zod.z.object({
|
|
54
|
-
type: zod.z.string().describe("Type of parent."),
|
|
55
|
-
block_id: zod.z.string().describe("UUID of the parent block.")
|
|
54
|
+
type: zod.z.string().describe("Type of parent.").nullable(),
|
|
55
|
+
block_id: zod.z.string().describe("UUID of the parent block.").nullable()
|
|
56
56
|
}).describe("Parent is a block.");
|
|
57
57
|
const NotionCreateNotionPage_UserSchema = zod.z.object({
|
|
58
|
-
id: zod.z.string().describe("Unique identifier for the user."),
|
|
59
|
-
object: zod.z.string().describe("Always 'user'.")
|
|
58
|
+
id: zod.z.string().describe("Unique identifier for the user.").nullable(),
|
|
59
|
+
object: zod.z.string().describe("Always 'user'.").nullable()
|
|
60
60
|
}).describe("User object representing who created or edited the page.");
|
|
61
61
|
const NotionCreateNotionPageOutput = zod.z.object({
|
|
62
|
-
id: zod.z.string().describe("Unique identifier for the page in UUIDv4 format."),
|
|
63
|
-
url: zod.z.string().describe("The URL of the Notion page."),
|
|
62
|
+
id: zod.z.string().describe("Unique identifier for the page in UUIDv4 format.").nullable(),
|
|
63
|
+
url: zod.z.string().describe("The URL of the Notion page.").nullable(),
|
|
64
64
|
icon: NotionCreateNotionPage_IconSchema.nullable().optional(),
|
|
65
65
|
cover: NotionCreateNotionPage_CoverSchema.nullable().optional(),
|
|
66
|
-
object: zod.z.string().describe("Always 'page'."),
|
|
66
|
+
object: zod.z.string().describe("Always 'page'.").nullable(),
|
|
67
67
|
parent: zod.z.union([
|
|
68
68
|
NotionCreateNotionPage_DatabaseParentSchema,
|
|
69
69
|
NotionCreateNotionPage_DataSourceParentSchema,
|
|
@@ -71,15 +71,15 @@ const NotionCreateNotionPageOutput = zod.z.object({
|
|
|
71
71
|
NotionCreateNotionPage_WorkspaceParentSchema,
|
|
72
72
|
NotionCreateNotionPage_BlockParentSchema
|
|
73
73
|
]),
|
|
74
|
-
archived: zod.z.boolean().describe("Whether the page is archived."),
|
|
75
|
-
in_trash: zod.z.boolean().describe("Whether the page is in the trash."),
|
|
74
|
+
archived: zod.z.boolean().describe("Whether the page is archived.").nullable(),
|
|
75
|
+
in_trash: zod.z.boolean().describe("Whether the page is in the trash.").nullable(),
|
|
76
76
|
is_locked: zod.z.boolean().describe("Whether the page is locked for editing.").nullable().optional(),
|
|
77
77
|
created_by: NotionCreateNotionPage_UserSchema.nullable(),
|
|
78
78
|
properties: zod.z.object({}).describe("Property values of the page. Keys are property names, values are property value objects with id, type, and type-specific data."),
|
|
79
79
|
public_url: zod.z.string().describe("The publicly accessible URL if the page has been published to the web, otherwise null.").nullable().optional(),
|
|
80
|
-
created_time: zod.z.string().describe("Date and time when this page was created, formatted as an ISO 8601 datetime string."),
|
|
80
|
+
created_time: zod.z.string().describe("Date and time when this page was created, formatted as an ISO 8601 datetime string.").nullable(),
|
|
81
81
|
last_edited_by: NotionCreateNotionPage_UserSchema.nullable(),
|
|
82
|
-
last_edited_time: zod.z.string().describe("Date and time when this page was last edited, formatted as an ISO 8601 datetime string.")
|
|
82
|
+
last_edited_time: zod.z.string().describe("Date and time when this page was last edited, formatted as an ISO 8601 datetime string.").nullable()
|
|
83
83
|
}).describe("Response from creating a Notion page.");
|
|
84
84
|
const notionCreateNotionPage = require_action.action("NOTION_CREATE_NOTION_PAGE", {
|
|
85
85
|
slug: "notion-create-notion-page",
|