@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":"query-data-source.mjs","names":[],"sources":["../../src/actions/query-data-source.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NotionQueryDataSourceInput: z.ZodTypeAny = z.object({\n sorts: z.array(z.union([z.object({\n property: z.string().describe(\"ID of the data source property to sort by\"),\n direction: z.enum([\"ascending\", \"descending\"]).describe(\"Sort direction: ascending or descending\"),\n}).describe(\"Sort by a data source property.\"), z.object({\n direction: z.enum([\"ascending\", \"descending\"]).describe(\"Sort direction: ascending or descending\"),\n timestamp: z.enum([\"created_time\", \"last_edited_time\"]).describe(\"Timestamp field to sort by: 'created_time' or 'last_edited_time'\"),\n}).describe(\"Sort by entry timestamp.\")])).describe(\"List of sort criteria in order of precedence. Use PropertySort for property fields or TimestampSort for creation/edit times.\").optional(),\n filter: z.record(z.string(), z.unknown()).describe(\"Filter object to limit returned entries. Supports single-property filters or compound filters using 'and'/'or'.\").optional(),\n page_size: z.number().int().describe(\"Maximum number of items to return (1-100). Defaults to 100 if omitted.\").optional(),\n start_cursor: z.string().describe(\"Cursor from a prior response's `next_cursor` for fetching the next page.\").optional(),\n data_source_id: z.string().describe(\"UUID of the Notion data source to query (with or without hyphens). URI prefixes like 'collection://' are automatically stripped.\"),\n filter_properties: z.array(z.string()).describe(\"List of property IDs to include in each returned item; maps to the `filter_properties[]` query parameter.\").optional(),\n}).describe(\"Request model for querying a Notion data source.\");\nconst NotionQueryDataSource_NotionHostedFileSchema: 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 reference.\");\nconst NotionQueryDataSource_ExternalFileSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"HTTPS URL to the externally hosted file.\"),\n}).describe(\"External file reference.\");\nconst NotionQueryDataSource_CustomEmojiSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of 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 object.\");\nconst NotionQueryDataSource_PageIconSchema: z.ZodTypeAny = z.object({\n file: NotionQueryDataSource_NotionHostedFileSchema.nullable().optional(),\n type: z.enum([\"emoji\", \"external\", \"file\", \"custom_emoji\"]).describe(\"Type of icon: 'emoji', 'external', 'file', or 'custom_emoji'.\"),\n emoji: z.string().describe(\"Emoji character (only present when type is 'emoji').\").nullable().optional(),\n external: NotionQueryDataSource_ExternalFileSchema.nullable().optional(),\n custom_emoji: NotionQueryDataSource_CustomEmojiSchema.nullable().optional(),\n}).describe(\"Page icon, which can be an emoji, external file, or uploaded file.\");\nconst NotionQueryDataSource_PageCoverSchema: z.ZodTypeAny = z.object({\n file: NotionQueryDataSource_NotionHostedFileSchema.nullable().optional(),\n type: z.enum([\"external\", \"file\"]).describe(\"Type of cover: 'external' or 'file'.\"),\n external: NotionQueryDataSource_ExternalFileSchema.nullable().optional(),\n}).describe(\"Page cover image, which can be an external file or Notion-hosted file.\");\nconst NotionQueryDataSource_PageParentSchema: z.ZodTypeAny = z.object({\n type: z.enum([\"data_source_id\", \"database_id\", \"page_id\", \"workspace\"]).describe(\"Type of parent: 'data_source_id', 'database_id', 'page_id', or 'workspace'.\"),\n page_id: z.string().describe(\"UUID of the parent page (only present when type is 'page_id').\").nullable().optional(),\n workspace: z.boolean().describe(\"Always true when type is 'workspace'.\").nullable().optional(),\n database_id: z.string().describe(\"UUID of the parent database (only present when type is 'database_id').\").nullable().optional(),\n data_source_id: z.string().describe(\"UUID of the parent data source (only present when type is 'data_source_id').\").nullable().optional(),\n}).describe(\"Information about the page's parent.\");\nconst NotionQueryDataSource_BotOwnerWorkspaceSchema: z.ZodTypeAny = z.object({\n type: z.string(),\n workspace: z.boolean(),\n}).describe(\"Bot owner when owned by a workspace.\");\nconst NotionQueryDataSource_BotOwnerUserRefSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"User ID of the bot owner.\"),\n object: z.string().describe(\"Always 'user'.\"),\n}).describe(\"Simplified user reference for bot owner to avoid circular reference.\");\nconst NotionQueryDataSource_BotOwnerUserSchema: z.ZodTypeAny = z.object({\n type: z.string(),\n user: NotionQueryDataSource_BotOwnerUserRefSchema.nullable(),\n}).describe(\"Bot owner when owned by a user.\");\nconst NotionQueryDataSource_WorkspaceLimitsSchema: z.ZodTypeAny = z.object({\n max_file_upload_size_in_bytes: z.number().int().describe(\"Maximum file upload size in bytes.\").nullable().optional(),\n}).describe(\"Workspace limits for bot users.\");\nconst NotionQueryDataSource_BotDetailsSchema: z.ZodTypeAny = z.object({\n owner: z.union([NotionQueryDataSource_BotOwnerWorkspaceSchema, NotionQueryDataSource_BotOwnerUserSchema]).nullable().optional(),\n workspace_id: z.string().describe(\"Bot's workspace ID.\").nullable().optional(),\n workspace_name: z.string().describe(\"Name of the workspace (null if owner is user).\").nullable().optional(),\n workspace_limits: NotionQueryDataSource_WorkspaceLimitsSchema.nullable().optional(),\n}).describe(\"Bot-specific details when user type is 'bot'.\");\nconst NotionQueryDataSource_PersonDetailsSchema: z.ZodTypeAny = z.object({\n email: z.string().describe(\"Email address of the person.\").nullable().optional(),\n}).describe(\"Person-specific details when user type is 'person'.\");\nconst NotionQueryDataSource_PartialUserSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier (UUID) of the user.\"),\n bot: NotionQueryDataSource_BotDetailsSchema.nullable().optional(),\n name: z.string().describe(\"Display name of the user in Notion.\").nullable().optional(),\n type: z.enum([\"person\", \"bot\"]).describe(\"Type of user, either 'person' or 'bot'.\").nullable().optional(),\n object: z.string().describe(\"Always 'user'.\"),\n person: NotionQueryDataSource_PersonDetailsSchema.nullable().optional(),\n avatar_url: z.string().describe(\"URL of the user's avatar image.\").nullable().optional(),\n}).describe(\"Partial user object representing a Notion user.\");\nconst NotionQueryDataSource_PageSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier (UUID) of the page.\"),\n url: z.string().describe(\"The URL of the Notion page.\").nullable().optional(),\n icon: NotionQueryDataSource_PageIconSchema.nullable().optional(),\n cover: NotionQueryDataSource_PageCoverSchema.nullable().optional(),\n object: z.string().describe(\"Always 'page'.\"),\n parent: NotionQueryDataSource_PageParentSchema.nullable().optional(),\n archived: z.boolean().describe(\"Whether the page is archived.\").nullable().optional(),\n in_trash: z.boolean().describe(\"Whether the page has been moved to trash.\").nullable().optional(),\n created_by: NotionQueryDataSource_PartialUserSchema.nullable().optional(),\n properties: z.object({}).describe(\"Property values of the page, determined by the parent data source's schema. Keys are property names; values are PropertyValue objects with id, type, and type-specific fields.\").nullable().optional(),\n public_url: z.string().describe(\"The publicly accessible URL if the page has been published to the web; otherwise null.\").nullable().optional(),\n created_time: z.string().describe(\"ISO 8601 timestamp when the page was created.\").nullable().optional(),\n last_edited_by: NotionQueryDataSource_PartialUserSchema.nullable().optional(),\n last_edited_time: z.string().describe(\"ISO 8601 timestamp when the page was last edited.\").nullable().optional(),\n}).describe(\"Page object contained in the data source.\");\nexport const NotionQueryDataSourceOutput: z.ZodTypeAny = z.object({\n object: z.string().describe(\"Always 'list' for paginated responses.\").nullable().optional(),\n results: z.array(NotionQueryDataSource_PageSchema).describe(\"Array of page objects contained in the data source, filtered and ordered according to the query criteria.\").nullable().optional(),\n has_more: z.boolean().describe(\"Whether there are more results available beyond this response. If true, use next_cursor to retrieve the next page.\").nullable().optional(),\n next_cursor: z.string().describe(\"Cursor value for pagination. Use this value in the next request to retrieve additional results. Null if there are no more results.\").nullable().optional(),\n}).describe(\"Response model for querying a Notion data source.\");\n\nexport const notionQueryDataSource = action(\"NOTION_QUERY_DATA_SOURCE\", {\n slug: \"notion-query-data-source\",\n name: \"Query data source\",\n description: \"Tool to query a Notion data source. Use when you need to retrieve pages or child data sources with filters, sorts, and pagination. Make paginated requests using cursors and optional property filters for efficient data retrieval.\",\n input: NotionQueryDataSourceInput,\n output: NotionQueryDataSourceOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6BAA2C,EAAE,OAAO;CAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO;EACjC,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C;EACzE,WAAW,EAAE,KAAK,CAAC,aAAa,YAAY,CAAC,CAAC,CAAC,SAAS,yCAAyC;CACnG,CAAC,CAAC,CAAC,SAAS,iCAAiC,GAAG,EAAE,OAAO;EACvD,WAAW,EAAE,KAAK,CAAC,aAAa,YAAY,CAAC,CAAC,CAAC,SAAS,yCAAyC;EACjG,WAAW,EAAE,KAAK,CAAC,gBAAgB,kBAAkB,CAAC,CAAC,CAAC,SAAS,kEAAkE;CACrI,CAAC,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,8HAA8H,CAAC,CAAC,SAAS;CAC3L,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS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SAAS;EAC1F,SAAS,EAAE,MAAM,gCAAgC,CAAC,CAAC,SAAS,2GAA2G,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC7L,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS,oHAAoH,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACzK,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7L,CAAC,CAAC,CAAC,SAAS,mDAOF;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"query-data-source.mjs","names":[],"sources":["../../src/actions/query-data-source.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NotionQueryDataSourceInput = z.object({\n sorts: z.array(z.union([z.object({\n property: z.string().describe(\"ID of the data source property to sort by\"),\n direction: z.enum([\"ascending\", \"descending\"]).describe(\"Sort direction: ascending or descending\"),\n}).passthrough().describe(\"Sort by a data source property.\"), z.object({\n direction: z.enum([\"ascending\", \"descending\"]).describe(\"Sort direction: ascending or descending\"),\n timestamp: z.enum([\"created_time\", \"last_edited_time\"]).describe(\"Timestamp field to sort by: 'created_time' or 'last_edited_time'\"),\n}).passthrough().describe(\"Sort by entry timestamp.\")])).describe(\"List of sort criteria in order of precedence. Use PropertySort for property fields or TimestampSort for creation/edit times.\").optional(),\n filter: z.record(z.string(), z.unknown()).describe(\"Filter object to limit returned entries. Supports single-property filters or compound filters using 'and'/'or'.\").optional(),\n page_size: z.number().int().describe(\"Maximum number of items to return (1-100). Defaults to 100 if omitted.\").optional(),\n start_cursor: z.string().describe(\"Cursor from a prior response's `next_cursor` for fetching the next page.\").optional(),\n data_source_id: z.string().describe(\"UUID of the Notion data source to query (with or without hyphens). URI prefixes like 'collection://' are automatically stripped.\"),\n filter_properties: z.array(z.string()).describe(\"List of property IDs to include in each returned item; maps to the `filter_properties[]` query parameter.\").optional(),\n}).describe(\"Request model for querying a Notion data source.\");\nconst NotionQueryDataSource_NotionHostedFileSchema = 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 reference.\");\nconst NotionQueryDataSource_ExternalFileSchema = z.object({\n url: z.string().describe(\"HTTPS URL to the externally hosted file.\").nullable(),\n}).passthrough().describe(\"External file reference.\");\nconst NotionQueryDataSource_CustomEmojiSchema = z.object({\n id: z.string().describe(\"Unique identifier of 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 object.\");\nconst NotionQueryDataSource_PageIconSchema = z.object({\n file: NotionQueryDataSource_NotionHostedFileSchema.nullable().optional(),\n type: z.enum([\"emoji\", \"external\", \"file\", \"custom_emoji\"]).describe(\"Type of icon: 'emoji', 'external', 'file', or 'custom_emoji'.\").nullable(),\n emoji: z.string().describe(\"Emoji character (only present when type is 'emoji').\").nullable().optional(),\n external: NotionQueryDataSource_ExternalFileSchema.nullable().optional(),\n custom_emoji: NotionQueryDataSource_CustomEmojiSchema.nullable().optional(),\n}).passthrough().describe(\"Page icon, which can be an emoji, external file, or uploaded file.\");\nconst NotionQueryDataSource_PageCoverSchema = z.object({\n file: NotionQueryDataSource_NotionHostedFileSchema.nullable().optional(),\n type: z.enum([\"external\", \"file\"]).describe(\"Type of cover: 'external' or 'file'.\").nullable(),\n external: NotionQueryDataSource_ExternalFileSchema.nullable().optional(),\n}).passthrough().describe(\"Page cover image, which can be an external file or Notion-hosted file.\");\nconst NotionQueryDataSource_PageParentSchema = z.object({\n type: z.enum([\"data_source_id\", \"database_id\", \"page_id\", \"workspace\"]).describe(\"Type of parent: 'data_source_id', 'database_id', 'page_id', or 'workspace'.\").nullable(),\n page_id: z.string().describe(\"UUID of the parent page (only present when type is 'page_id').\").nullable().optional(),\n workspace: z.boolean().describe(\"Always true when type is 'workspace'.\").nullable().optional(),\n database_id: z.string().describe(\"UUID of the parent database (only present when type is 'database_id').\").nullable().optional(),\n data_source_id: z.string().describe(\"UUID of the parent data source (only present when type is 'data_source_id').\").nullable().optional(),\n}).passthrough().describe(\"Information about the page's parent.\");\nconst NotionQueryDataSource_BotOwnerWorkspaceSchema = z.object({\n type: z.string().nullable(),\n workspace: z.boolean().nullable(),\n}).passthrough().describe(\"Bot owner when owned by a workspace.\");\nconst NotionQueryDataSource_BotOwnerUserRefSchema = z.object({\n id: z.string().describe(\"User ID of the bot owner.\").nullable(),\n object: z.string().describe(\"Always 'user'.\").nullable(),\n}).passthrough().describe(\"Simplified user reference for bot owner to avoid circular reference.\");\nconst NotionQueryDataSource_BotOwnerUserSchema = z.object({\n type: z.string().nullable(),\n user: NotionQueryDataSource_BotOwnerUserRefSchema.nullable(),\n}).passthrough().describe(\"Bot owner when owned by a user.\");\nconst NotionQueryDataSource_WorkspaceLimitsSchema = z.object({\n max_file_upload_size_in_bytes: z.number().int().describe(\"Maximum file upload size in bytes.\").nullable().optional(),\n}).passthrough().describe(\"Workspace limits for bot users.\");\nconst NotionQueryDataSource_BotDetailsSchema = z.object({\n owner: z.union([NotionQueryDataSource_BotOwnerWorkspaceSchema, NotionQueryDataSource_BotOwnerUserSchema]).nullable().optional(),\n workspace_id: z.string().describe(\"Bot's workspace ID.\").nullable().optional(),\n workspace_name: z.string().describe(\"Name of the workspace (null if owner is user).\").nullable().optional(),\n workspace_limits: NotionQueryDataSource_WorkspaceLimitsSchema.nullable().optional(),\n}).passthrough().describe(\"Bot-specific details when user type is 'bot'.\");\nconst NotionQueryDataSource_PersonDetailsSchema = z.object({\n email: z.string().describe(\"Email address of the person.\").nullable().optional(),\n}).passthrough().describe(\"Person-specific details when user type is 'person'.\");\nconst NotionQueryDataSource_PartialUserSchema = z.object({\n id: z.string().describe(\"Unique identifier (UUID) of the user.\").nullable(),\n bot: NotionQueryDataSource_BotDetailsSchema.nullable().optional(),\n name: z.string().describe(\"Display name of the user in Notion.\").nullable().optional(),\n type: z.enum([\"person\", \"bot\"]).describe(\"Type of user, either 'person' or 'bot'.\").nullable().optional(),\n object: z.string().describe(\"Always 'user'.\").nullable(),\n person: NotionQueryDataSource_PersonDetailsSchema.nullable().optional(),\n avatar_url: z.string().describe(\"URL of the user's avatar image.\").nullable().optional(),\n}).passthrough().describe(\"Partial user object representing a Notion user.\");\nconst NotionQueryDataSource_PageSchema = z.object({\n id: z.string().describe(\"Unique identifier (UUID) of the page.\").nullable(),\n url: z.string().describe(\"The URL of the Notion page.\").nullable().optional(),\n icon: NotionQueryDataSource_PageIconSchema.nullable().optional(),\n cover: NotionQueryDataSource_PageCoverSchema.nullable().optional(),\n object: z.string().describe(\"Always 'page'.\").nullable(),\n parent: NotionQueryDataSource_PageParentSchema.nullable().optional(),\n archived: z.boolean().describe(\"Whether the page is archived.\").nullable().optional(),\n in_trash: z.boolean().describe(\"Whether the page has been moved to trash.\").nullable().optional(),\n created_by: NotionQueryDataSource_PartialUserSchema.nullable().optional(),\n properties: z.record(z.string(), z.unknown()).describe(\"Property values of the page, determined by the parent data source's schema. Keys are property names; values are PropertyValue objects with id, type, and type-specific fields.\").nullable().optional(),\n public_url: z.string().describe(\"The publicly accessible URL if the page has been published to the web; otherwise null.\").nullable().optional(),\n created_time: z.string().describe(\"ISO 8601 timestamp when the page was created.\").nullable().optional(),\n last_edited_by: NotionQueryDataSource_PartialUserSchema.nullable().optional(),\n last_edited_time: z.string().describe(\"ISO 8601 timestamp when the page was last edited.\").nullable().optional(),\n}).passthrough().describe(\"Page object contained in the data source.\");\nexport const NotionQueryDataSourceOutput = z.object({\n object: z.string().describe(\"Always 'list' for paginated responses.\").nullable().optional(),\n results: z.array(NotionQueryDataSource_PageSchema).describe(\"Array of page objects contained in the data source, filtered and ordered according to the query criteria.\").nullable().optional(),\n has_more: z.boolean().describe(\"Whether there are more results available beyond this response. If true, use next_cursor to retrieve the next page.\").nullable().optional(),\n next_cursor: z.string().describe(\"Cursor value for pagination. Use this value in the next request to retrieve additional results. Null if there are no more results.\").nullable().optional(),\n}).passthrough().describe(\"Response model for querying a Notion data source.\");\n\nexport const notionQueryDataSource = action(\"NOTION_QUERY_DATA_SOURCE\", {\n slug: \"notion-query-data-source\",\n name: \"Query data source\",\n description: \"Tool to query a Notion data source. Use when you need to retrieve pages or child data sources with filters, sorts, and pagination. Make paginated requests using cursors and optional property filters for efficient data retrieval.\",\n input: NotionQueryDataSourceInput,\n output: NotionQueryDataSourceOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6BAA6B,EAAE,OAAO;CACjD,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO;EACjC,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C;EACzE,WAAW,EAAE,KAAK,CAAC,aAAa,YAAY,CAAC,CAAC,CAAC,SAAS,yCAAyC;CACnG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,iCAAiC,GAAG,EAAE,OAAO;EACrE,WAAW,EAAE,KAAK,CAAC,aAAa,YAAY,CAAC,CAAC,CAAC,SAAS,yCAAyC;EACjG,WAAW,EAAE,KAAK,CAAC,gBAAgB,kBAAkB,CAAC,CAAC,CAAC,SAAS,kEAAkE;CACrI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,8HAA8H,CAAC,CAAC,SAAS;CACzM,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,iHAAiH,CAAC,CAAC,SAAS;CAC/K,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wEAAwE,CAAC,CAAC,SAAS;CACxH,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;CACvH,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS,kIAAkI;CACtK,mBAAmB,EA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S,CAAC,CAAC,SAAS;CAC5E,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACjH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,2CAA2C;AAQrE,MAAa,wBAAwB,OAAO,4BAA4B;CACtE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAZyC,EAAE,OAAO;EAClD,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC1F,SAAS,EAAE,MAAM,gCAAgC,CAAC,CAAC,SAAS,2GAA2G,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC7L,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS,oHAAoH,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACzK,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7L,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,mDAOhB;AACV,CAAC"}
|
|
@@ -5,10 +5,10 @@ const NotionQueryDatabaseWithFilterInput = zod.z.object({
|
|
|
5
5
|
sorts: zod.z.array(zod.z.union([zod.z.object({
|
|
6
6
|
property: zod.z.string().describe("Name or ID of the database property to sort by. Do NOT use for system timestamps (created_time, last_edited_time) - use TimestampSort instead."),
|
|
7
7
|
direction: zod.z.enum(["ascending", "descending"]).describe("Sort direction: ascending or descending")
|
|
8
|
-
}).describe("Sort by a database property name or ID (NOT for system timestamps)."), zod.z.object({
|
|
8
|
+
}).passthrough().describe("Sort by a database property name or ID (NOT for system timestamps)."), zod.z.object({
|
|
9
9
|
direction: zod.z.enum(["ascending", "descending"]).describe("Sort direction: ascending or descending"),
|
|
10
10
|
timestamp: zod.z.enum(["created_time", "last_edited_time"]).describe("System timestamp field to sort by. Use 'created_time' for page creation time or 'last_edited_time' for last modification time.")
|
|
11
|
-
}).describe("Sort by a system timestamp field (created or last edited time).")])).describe("List of sort criteria in order of precedence. Use PropertySort for database properties (with property field) and TimestampSort for system timestamps (with timestamp='created_time' or 'last_edited_time'). IMPORTANT: To sort by page creation or last edited time, you MUST use the TimestampSort format with timestamp='created_time' or timestamp='last_edited_time', NOT property names like 'Created' or 'Last Edited'. Common timestamp field name variations (Created, creation time, Last Edited, etc.) will be automatically converted to the correct format.").optional(),
|
|
11
|
+
}).passthrough().describe("Sort by a system timestamp field (created or last edited time).")])).describe("List of sort criteria in order of precedence. Use PropertySort for database properties (with property field) and TimestampSort for system timestamps (with timestamp='created_time' or 'last_edited_time'). IMPORTANT: To sort by page creation or last edited time, you MUST use the TimestampSort format with timestamp='created_time' or timestamp='last_edited_time', NOT property names like 'Created' or 'Last Edited'. Common timestamp field name variations (Created, creation time, Last Edited, etc.) will be automatically converted to the correct format.").optional(),
|
|
12
12
|
filter: zod.z.record(zod.z.string(), zod.z.unknown()).describe("PREREQUISITE: Call NOTION_FETCH_DATABASE first to discover property names and types. Filter type keys MUST match the property's actual type in the schema. Each filter object MUST contain exactly ONE filter type key. For multiple conditions, use compound filters: {\"and\": [{\"property\": \"Name\", \"title\": {...}}, {\"property\": \"Description\", \"rich_text\": {...}}]}. 'title' IS A RESERVED PROPERTY NAME: 'title' always refers to the database's built-in primary title column (type 'title', NOT 'select' or 'rich_text'). Even custom properties named 'title' are treated as the built-in title column. FILTER TYPE MUST MATCH SCHEMA TYPE: Property names are NOT reliable indicators of type. A property named 'Status' could be type 'select' in one database but type 'status' in another. 'select' is for dropdowns; 'status' is ONLY for Notion's built-in Status property with workflow groups. SELECT/STATUS/MULTI_SELECT VALUES ARE CASE-SENSITIVE: Option names must match EXACTLY as defined in the database schema, including capitalization and emoji prefixes (e.g., 'Done' not 'done', '✅ Done' not 'Done'). Common mistake: using 'done' when the actual option is 'Done'. Check the database schema for exact option names. Valid filter type keys: title, rich_text, number, checkbox, select, multi_select, status, date, people, files, url, email, phone_number, relation, created_by, created_time, last_edited_by, last_edited_time, formula, unique_id, rollup, verification, timestamp. FORMULA FILTERS: Structure: {'property': '<name>', 'formula': {<result_type>: {<condition>: <value>}}}. Result types: 'string' (rich_text conditions), 'number' (numeric conditions), 'date' (date conditions), 'checkbox' (boolean conditions). The result type MUST match the formula's actual output type. If the formula property value shows type 'boolean', use 'checkbox' in the filter (API naming mismatch). Some complex formulas are unfilterable ('Unable to filter based on a formula of unknown type') - use client-side filtering instead. NOTE: 'text' is NOT valid - use 'rich_text' for text properties or 'title' for title properties. SYSTEM TIMESTAMP FILTERS: Use simplified format: {\"created_time\": {\"on_or_after\": \"2024-01-01\"}} - auto-transformed to correct API format. Filter structure for database properties: {\"property\": \"<property_name>\", \"<filter_type>\": {\"<condition>\": \"<value>\"}}. Common conditions by type: title/rich_text: equals, contains, starts_with, ends_with, is_empty, is_not_empty; select/status: equals, does_not_equal, is_empty, is_not_empty; number: equals, does_not_equal, greater_than, less_than, greater_than_or_equal_to, less_than_or_equal_to, is_empty, is_not_empty; checkbox: equals (true/false); date: equals, before, after, on_or_before, on_or_after, is_empty, is_not_empty, past_week, past_month, past_year, next_week, next_month, next_year; relation: contains, does_not_contain (both require a valid page UUID), is_empty, is_not_empty. ROLLUP FILTERS: Require a nested aggregation type wrapper. Do NOT use flat filters like {\"rollup\": {\"contains\": \"value\"}}. Instead use one of: (1) {\"rollup\": {\"any\": {<condition>}}} - matches if ANY related item satisfies condition; (2) {\"rollup\": {\"every\": {<condition>}}} - matches if ALL related items satisfy condition; (3) {\"rollup\": {\"none\": {<condition>}}} - matches if NO related items satisfy condition; (4) {\"rollup\": {\"number\": {<number_condition>}}} - for number rollup aggregations (count, sum, avg, etc.); (5) {\"rollup\": {\"date\": {<date_condition>}}} - for date rollup aggregations (earliest, latest). Inside rollup.any/every/none, use the filter type matching the underlying property type. Compound filters use 'and' or 'or' arrays: {\"and\": [<filter1>, <filter2>]} or {\"or\": [<filter1>, <filter2>]}.").optional(),
|
|
13
13
|
page_size: zod.z.number().int().describe("Maximum number of items to return (1–100). Defaults to 100 if omitted.").optional(),
|
|
14
14
|
database_id: zod.z.string().describe("The UUID of the Notion database to query (32 character hex string, with hyphens or without). IMPORTANT: This must be a DATABASE ID, not a page ID. Page IDs and database IDs are different things. If you have a page URL/ID, that is NOT the same as the database ID - inline databases within pages have their own separate database IDs distinct from the parent page ID. Use NOTION_SEARCH_NOTION_PAGE or NOTION_FETCH_DATABASE to discover the correct database ID. The database must be shared with your integration."),
|
|
@@ -16,66 +16,66 @@ const NotionQueryDatabaseWithFilterInput = zod.z.object({
|
|
|
16
16
|
composio_execution_message: zod.z.string().describe("Internal message about any automatic conversions made during execution.").optional()
|
|
17
17
|
});
|
|
18
18
|
const NotionQueryDatabaseWithFilter_EmojiIconSchema = zod.z.object({
|
|
19
|
-
type: zod.z.string().describe("Always set to 'emoji'."),
|
|
20
|
-
emoji: zod.z.string().describe("The emoji character.")
|
|
21
|
-
}).describe("Emoji icon.");
|
|
22
|
-
const NotionQueryDatabaseWithFilter_ExternalFileSchema = zod.z.object({ url: zod.z.string().describe("HTTPS URL to the externally hosted file.") }).describe("External file reference.");
|
|
19
|
+
type: zod.z.string().describe("Always set to 'emoji'.").nullable(),
|
|
20
|
+
emoji: zod.z.string().describe("The emoji character.").nullable()
|
|
21
|
+
}).passthrough().describe("Emoji icon.");
|
|
22
|
+
const NotionQueryDatabaseWithFilter_ExternalFileSchema = zod.z.object({ url: zod.z.string().describe("HTTPS URL to the externally hosted file.").nullable() }).passthrough().describe("External file reference.");
|
|
23
23
|
const NotionQueryDatabaseWithFilter_ExternalFileIconSchema = zod.z.object({
|
|
24
|
-
type: zod.z.string().describe("Set to 'external' for externally hosted files."),
|
|
24
|
+
type: zod.z.string().describe("Set to 'external' for externally hosted files.").nullable(),
|
|
25
25
|
external: NotionQueryDatabaseWithFilter_ExternalFileSchema.nullable()
|
|
26
|
-
}).describe("External file icon.");
|
|
26
|
+
}).passthrough().describe("External file icon.");
|
|
27
27
|
const NotionQueryDatabaseWithFilter_NotionFileSchema = zod.z.object({
|
|
28
|
-
url: zod.z.string().describe("Authenticated URL to the file, valid for one hour."),
|
|
29
|
-
expiry_time: zod.z.string().describe("ISO 8601 timestamp when the URL expires.")
|
|
30
|
-
}).describe("Notion-hosted file reference.");
|
|
28
|
+
url: zod.z.string().describe("Authenticated URL to the file, valid for one hour.").nullable(),
|
|
29
|
+
expiry_time: zod.z.string().describe("ISO 8601 timestamp when the URL expires.").nullable()
|
|
30
|
+
}).passthrough().describe("Notion-hosted file reference.");
|
|
31
31
|
const NotionQueryDatabaseWithFilter_NotionFileIconSchema = zod.z.object({
|
|
32
32
|
file: NotionQueryDatabaseWithFilter_NotionFileSchema.nullable(),
|
|
33
|
-
type: zod.z.string().describe("Set to 'file' for Notion-hosted files.")
|
|
34
|
-
}).describe("Notion-hosted file icon.");
|
|
33
|
+
type: zod.z.string().describe("Set to 'file' for Notion-hosted files.").nullable()
|
|
34
|
+
}).passthrough().describe("Notion-hosted file icon.");
|
|
35
35
|
const NotionQueryDatabaseWithFilter_CustomEmojiSchema = zod.z.object({
|
|
36
|
-
id: zod.z.string().describe("Unique identifier for the custom emoji."),
|
|
37
|
-
url: zod.z.string().describe("Public URL where the custom emoji image is hosted."),
|
|
38
|
-
name: zod.z.string().describe("Name of the custom emoji.")
|
|
39
|
-
}).describe("Custom emoji details.");
|
|
36
|
+
id: zod.z.string().describe("Unique identifier for the custom emoji.").nullable(),
|
|
37
|
+
url: zod.z.string().describe("Public URL where the custom emoji image is hosted.").nullable(),
|
|
38
|
+
name: zod.z.string().describe("Name of the custom emoji.").nullable()
|
|
39
|
+
}).passthrough().describe("Custom emoji details.");
|
|
40
40
|
const NotionQueryDatabaseWithFilter_CustomEmojiIconSchema = zod.z.object({
|
|
41
|
-
type: zod.z.string().describe("Set to 'custom_emoji' for custom emojis."),
|
|
41
|
+
type: zod.z.string().describe("Set to 'custom_emoji' for custom emojis.").nullable(),
|
|
42
42
|
custom_emoji: NotionQueryDatabaseWithFilter_CustomEmojiSchema.nullable()
|
|
43
|
-
}).describe("Custom emoji icon.");
|
|
43
|
+
}).passthrough().describe("Custom emoji icon.");
|
|
44
44
|
const NotionQueryDatabaseWithFilter_ExternalCoverSchema = zod.z.object({
|
|
45
|
-
type: zod.z.string().describe("Set to 'external' for externally hosted files."),
|
|
45
|
+
type: zod.z.string().describe("Set to 'external' for externally hosted files.").nullable(),
|
|
46
46
|
external: NotionQueryDatabaseWithFilter_ExternalFileSchema.nullable()
|
|
47
|
-
}).describe("External cover image.");
|
|
47
|
+
}).passthrough().describe("External cover image.");
|
|
48
48
|
const NotionQueryDatabaseWithFilter_NotionFileCoverSchema = zod.z.object({
|
|
49
49
|
file: NotionQueryDatabaseWithFilter_NotionFileSchema.nullable(),
|
|
50
|
-
type: zod.z.string().describe("Set to 'file' for Notion-hosted files.")
|
|
51
|
-
}).describe("Notion-hosted cover image.");
|
|
50
|
+
type: zod.z.string().describe("Set to 'file' for Notion-hosted files.").nullable()
|
|
51
|
+
}).passthrough().describe("Notion-hosted cover image.");
|
|
52
52
|
const NotionQueryDatabaseWithFilter_DatabaseIdParentSchema = zod.z.object({
|
|
53
|
-
type: zod.z.string().describe("Set to 'database_id' for database parents."),
|
|
54
|
-
database_id: zod.z.string().describe("UUIDv4 identifier of the parent database.")
|
|
55
|
-
}).describe("Database parent.");
|
|
53
|
+
type: zod.z.string().describe("Set to 'database_id' for database parents.").nullable(),
|
|
54
|
+
database_id: zod.z.string().describe("UUIDv4 identifier of the parent database.").nullable()
|
|
55
|
+
}).passthrough().describe("Database parent.");
|
|
56
56
|
const NotionQueryDatabaseWithFilter_DataSourceIdParentSchema = zod.z.object({
|
|
57
|
-
type: zod.z.string().describe("Set to 'data_source_id' for data source parents."),
|
|
58
|
-
database_id: zod.z.string().describe("UUIDv4 identifier of the parent database (convenience field)."),
|
|
59
|
-
data_source_id: zod.z.string().describe("UUIDv4 identifier of the parent data source.")
|
|
60
|
-
}).describe("Data source parent.");
|
|
57
|
+
type: zod.z.string().describe("Set to 'data_source_id' for data source parents.").nullable(),
|
|
58
|
+
database_id: zod.z.string().describe("UUIDv4 identifier of the parent database (convenience field).").nullable(),
|
|
59
|
+
data_source_id: zod.z.string().describe("UUIDv4 identifier of the parent data source.").nullable()
|
|
60
|
+
}).passthrough().describe("Data source parent.");
|
|
61
61
|
const NotionQueryDatabaseWithFilter_PageIdParentSchema = zod.z.object({
|
|
62
|
-
type: zod.z.string().describe("Set to 'page_id' for page parents."),
|
|
63
|
-
page_id: zod.z.string().describe("UUIDv4 identifier of the parent page.")
|
|
64
|
-
}).describe("Page parent.");
|
|
62
|
+
type: zod.z.string().describe("Set to 'page_id' for page parents.").nullable(),
|
|
63
|
+
page_id: zod.z.string().describe("UUIDv4 identifier of the parent page.").nullable()
|
|
64
|
+
}).passthrough().describe("Page parent.");
|
|
65
65
|
const NotionQueryDatabaseWithFilter_WorkspaceParentSchema = zod.z.object({
|
|
66
|
-
type: zod.z.string().describe("Set to 'workspace' for workspace parents."),
|
|
67
|
-
workspace: zod.z.boolean().describe("Always set to true for workspace parents.")
|
|
68
|
-
}).describe("Workspace parent.");
|
|
66
|
+
type: zod.z.string().describe("Set to 'workspace' for workspace parents.").nullable(),
|
|
67
|
+
workspace: zod.z.boolean().describe("Always set to true for workspace parents.").nullable()
|
|
68
|
+
}).passthrough().describe("Workspace parent.");
|
|
69
69
|
const NotionQueryDatabaseWithFilter_BlockIdParentSchema = zod.z.object({
|
|
70
|
-
type: zod.z.string().describe("Set to 'block_id' for block parents."),
|
|
71
|
-
block_id: zod.z.string().describe("UUIDv4 identifier of the parent block.")
|
|
72
|
-
}).describe("Block parent.");
|
|
70
|
+
type: zod.z.string().describe("Set to 'block_id' for block parents.").nullable(),
|
|
71
|
+
block_id: zod.z.string().describe("UUIDv4 identifier of the parent block.").nullable()
|
|
72
|
+
}).passthrough().describe("Block parent.");
|
|
73
73
|
const NotionQueryDatabaseWithFilter_PartialUserSchema = zod.z.object({
|
|
74
|
-
id: zod.z.string().describe("Unique identifier for the user (UUID format)."),
|
|
75
|
-
object: zod.z.string().describe("Always set to 'user'.")
|
|
76
|
-
}).describe("Partial user object representing a Notion user.");
|
|
74
|
+
id: zod.z.string().describe("Unique identifier for the user (UUID format).").nullable(),
|
|
75
|
+
object: zod.z.string().describe("Always set to 'user'.").nullable()
|
|
76
|
+
}).passthrough().describe("Partial user object representing a Notion user.");
|
|
77
77
|
const NotionQueryDatabaseWithFilter_PageSchema = zod.z.object({
|
|
78
|
-
id: zod.z.string().describe("Unique identifier of the page (UUIDv4 format)."),
|
|
78
|
+
id: zod.z.string().describe("Unique identifier of the page (UUIDv4 format).").nullable(),
|
|
79
79
|
url: zod.z.string().describe("The Notion URL of the page.").nullable().optional(),
|
|
80
80
|
icon: zod.z.union([
|
|
81
81
|
NotionQueryDatabaseWithFilter_EmojiIconSchema,
|
|
@@ -84,7 +84,7 @@ const NotionQueryDatabaseWithFilter_PageSchema = zod.z.object({
|
|
|
84
84
|
NotionQueryDatabaseWithFilter_CustomEmojiIconSchema
|
|
85
85
|
]).nullable().optional(),
|
|
86
86
|
cover: zod.z.union([NotionQueryDatabaseWithFilter_ExternalCoverSchema, NotionQueryDatabaseWithFilter_NotionFileCoverSchema]).nullable().optional(),
|
|
87
|
-
object: zod.z.string().describe("Always set to 'page'."),
|
|
87
|
+
object: zod.z.string().describe("Always set to 'page'.").nullable(),
|
|
88
88
|
parent: zod.z.union([
|
|
89
89
|
NotionQueryDatabaseWithFilter_DatabaseIdParentSchema,
|
|
90
90
|
NotionQueryDatabaseWithFilter_DataSourceIdParentSchema,
|
|
@@ -95,33 +95,33 @@ const NotionQueryDatabaseWithFilter_PageSchema = zod.z.object({
|
|
|
95
95
|
archived: zod.z.boolean().describe("Whether the page is archived.").nullable().optional(),
|
|
96
96
|
in_trash: zod.z.boolean().describe("Whether the page is in trash.").nullable().optional(),
|
|
97
97
|
created_by: NotionQueryDatabaseWithFilter_PartialUserSchema.nullable().optional(),
|
|
98
|
-
properties: zod.z.
|
|
98
|
+
properties: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Property values of the page, conforming to the parent database's property schema. Keys are property names, values are typed property value objects with 'id', 'type', and type-specific fields.").nullable().optional(),
|
|
99
99
|
public_url: zod.z.string().describe("The public URL of the page if it has been published, otherwise null.").nullable().optional(),
|
|
100
100
|
created_time: zod.z.string().describe("ISO 8601 timestamp of when the page was created.").nullable().optional(),
|
|
101
101
|
last_edited_by: NotionQueryDatabaseWithFilter_PartialUserSchema.nullable().optional(),
|
|
102
102
|
last_edited_time: zod.z.string().describe("ISO 8601 timestamp of when the page was last edited.").nullable().optional()
|
|
103
|
-
}).describe("Notion page object.");
|
|
103
|
+
}).passthrough().describe("Notion page object.");
|
|
104
104
|
const NotionQueryDatabaseWithFilter_RichTextAnnotationsSchema = zod.z.object({
|
|
105
|
-
bold: zod.z.boolean().describe("Whether the text is bold."),
|
|
106
|
-
code: zod.z.boolean().describe("Whether the text is formatted as code."),
|
|
107
|
-
color: zod.z.string().describe("Text color, can be 'default', 'blue', 'green', 'red', or background variants."),
|
|
108
|
-
italic: zod.z.boolean().describe("Whether the text is italic."),
|
|
109
|
-
underline: zod.z.boolean().describe("Whether the text is underlined."),
|
|
110
|
-
strikethrough: zod.z.boolean().describe("Whether the text has strikethrough.")
|
|
111
|
-
}).describe("Styling configuration for rich text.");
|
|
105
|
+
bold: zod.z.boolean().describe("Whether the text is bold.").nullable(),
|
|
106
|
+
code: zod.z.boolean().describe("Whether the text is formatted as code.").nullable(),
|
|
107
|
+
color: zod.z.string().describe("Text color, can be 'default', 'blue', 'green', 'red', or background variants.").nullable(),
|
|
108
|
+
italic: zod.z.boolean().describe("Whether the text is italic.").nullable(),
|
|
109
|
+
underline: zod.z.boolean().describe("Whether the text is underlined.").nullable(),
|
|
110
|
+
strikethrough: zod.z.boolean().describe("Whether the text has strikethrough.").nullable()
|
|
111
|
+
}).passthrough().describe("Styling configuration for rich text.");
|
|
112
112
|
const NotionQueryDatabaseWithFilter_RichTextSchema = zod.z.object({
|
|
113
113
|
href: zod.z.string().describe("URL for links or Notion mentions, null if not a link.").nullable().optional(),
|
|
114
|
-
type: zod.z.string().describe("Type of rich text: 'text', 'mention', or 'equation'."),
|
|
115
|
-
plain_text: zod.z.string().describe("Unformatted text content."),
|
|
114
|
+
type: zod.z.string().describe("Type of rich text: 'text', 'mention', or 'equation'.").nullable(),
|
|
115
|
+
plain_text: zod.z.string().describe("Unformatted text content.").nullable(),
|
|
116
116
|
annotations: NotionQueryDatabaseWithFilter_RichTextAnnotationsSchema.nullable()
|
|
117
|
-
}).describe("Rich text object for Notion text content.");
|
|
117
|
+
}).passthrough().describe("Rich text object for Notion text content.");
|
|
118
118
|
const NotionQueryDatabaseWithFilter_DataSourceSchema = zod.z.object({
|
|
119
|
-
id: zod.z.string().describe("Unique identifier of the data source."),
|
|
120
|
-
name: zod.z.string().describe("Name of the data source.")
|
|
121
|
-
}).describe("Data source in a database.");
|
|
119
|
+
id: zod.z.string().describe("Unique identifier of the data source.").nullable(),
|
|
120
|
+
name: zod.z.string().describe("Name of the data source.").nullable()
|
|
121
|
+
}).passthrough().describe("Data source in a database.");
|
|
122
122
|
const NotionQueryDatabaseWithFilter_DatabaseSchema = zod.z.object({
|
|
123
|
-
id: zod.z.string().describe("Unique identifier of the database (UUID format)."),
|
|
124
|
-
url: zod.z.string().describe("The Notion URL of the database."),
|
|
123
|
+
id: zod.z.string().describe("Unique identifier of the database (UUID format).").nullable(),
|
|
124
|
+
url: zod.z.string().describe("The Notion URL of the database.").nullable(),
|
|
125
125
|
icon: zod.z.union([
|
|
126
126
|
NotionQueryDatabaseWithFilter_EmojiIconSchema,
|
|
127
127
|
NotionQueryDatabaseWithFilter_ExternalFileIconSchema,
|
|
@@ -130,7 +130,7 @@ const NotionQueryDatabaseWithFilter_DatabaseSchema = zod.z.object({
|
|
|
130
130
|
]).nullable().optional(),
|
|
131
131
|
cover: zod.z.union([NotionQueryDatabaseWithFilter_ExternalCoverSchema, NotionQueryDatabaseWithFilter_NotionFileCoverSchema]).nullable().optional(),
|
|
132
132
|
title: zod.z.array(NotionQueryDatabaseWithFilter_RichTextSchema).describe("Database name as displayed in Notion, represented as an array of rich text objects."),
|
|
133
|
-
object: zod.z.string().describe("Always set to 'database'."),
|
|
133
|
+
object: zod.z.string().describe("Always set to 'database'.").nullable(),
|
|
134
134
|
parent: zod.z.union([
|
|
135
135
|
NotionQueryDatabaseWithFilter_DatabaseIdParentSchema,
|
|
136
136
|
NotionQueryDatabaseWithFilter_DataSourceIdParentSchema,
|
|
@@ -138,27 +138,27 @@ const NotionQueryDatabaseWithFilter_DatabaseSchema = zod.z.object({
|
|
|
138
138
|
NotionQueryDatabaseWithFilter_WorkspaceParentSchema,
|
|
139
139
|
NotionQueryDatabaseWithFilter_BlockIdParentSchema
|
|
140
140
|
]),
|
|
141
|
-
archived: zod.z.boolean().describe("Whether the database is archived."),
|
|
142
|
-
in_trash: zod.z.boolean().describe("Whether the database is in trash."),
|
|
143
|
-
is_inline: zod.z.boolean().describe("Whether the database is displayed inline (true) or as a full page (false)."),
|
|
141
|
+
archived: zod.z.boolean().describe("Whether the database is archived.").nullable(),
|
|
142
|
+
in_trash: zod.z.boolean().describe("Whether the database is in trash.").nullable(),
|
|
143
|
+
is_inline: zod.z.boolean().describe("Whether the database is displayed inline (true) or as a full page (false).").nullable(),
|
|
144
144
|
created_by: NotionQueryDatabaseWithFilter_PartialUserSchema.nullable(),
|
|
145
145
|
public_url: zod.z.string().describe("The public URL of the database if it has been published, otherwise null.").nullable().optional(),
|
|
146
146
|
description: zod.z.array(NotionQueryDatabaseWithFilter_RichTextSchema).describe("Database description as an array of rich text objects.").nullable().optional(),
|
|
147
|
-
created_time: zod.z.string().describe("ISO 8601 timestamp of when the database was created."),
|
|
147
|
+
created_time: zod.z.string().describe("ISO 8601 timestamp of when the database was created.").nullable(),
|
|
148
148
|
data_sources: zod.z.array(NotionQueryDatabaseWithFilter_DataSourceSchema).describe("List of child data sources in the database."),
|
|
149
149
|
last_edited_by: NotionQueryDatabaseWithFilter_PartialUserSchema.nullable(),
|
|
150
|
-
last_edited_time: zod.z.string().describe("ISO 8601 timestamp of when the database was last edited.")
|
|
151
|
-
}).describe("Notion database object.");
|
|
152
|
-
const NotionQueryDatabaseWithFilter_PageOrDatabaseMetadataSchema = zod.z.
|
|
150
|
+
last_edited_time: zod.z.string().describe("ISO 8601 timestamp of when the database was last edited.").nullable()
|
|
151
|
+
}).passthrough().describe("Notion database object.");
|
|
152
|
+
const NotionQueryDatabaseWithFilter_PageOrDatabaseMetadataSchema = zod.z.record(zod.z.string(), zod.z.unknown()).describe("Type-specific pagination metadata for page_or_database list responses.\nFor database query responses, this is always an empty object per the Notion API spec.");
|
|
153
153
|
const NotionQueryDatabaseWithFilterOutput = zod.z.object({
|
|
154
|
-
type: zod.z.string().describe("Specifies the type of objects in the results array. Set to 'page_or_database' for database query responses."),
|
|
155
|
-
object: zod.z.string().describe("Always set to 'list' for paginated responses."),
|
|
154
|
+
type: zod.z.string().describe("Specifies the type of objects in the results array. Set to 'page_or_database' for database query responses.").nullable(),
|
|
155
|
+
object: zod.z.string().describe("Always set to 'list' for paginated responses.").nullable(),
|
|
156
156
|
results: zod.z.array(zod.z.union([NotionQueryDatabaseWithFilter_PageSchema, NotionQueryDatabaseWithFilter_DatabaseSchema])).describe("Array of page and/or database objects matching the query criteria."),
|
|
157
|
-
has_more: zod.z.boolean().describe("Whether there are more results available beyond the current page. Returns false when the response includes the end of the list, otherwise true."),
|
|
157
|
+
has_more: zod.z.boolean().describe("Whether there are more results available beyond the current page. Returns false when the response includes the end of the list, otherwise true.").nullable(),
|
|
158
158
|
next_cursor: zod.z.string().describe("Pagination cursor for retrieving the next page of results. Only present when has_more is true. Pass this value as start_cursor in the next request.").nullable().optional(),
|
|
159
159
|
page_or_database: NotionQueryDatabaseWithFilter_PageOrDatabaseMetadataSchema.nullable(),
|
|
160
160
|
composio_execution_message: zod.z.string().describe("Message about any automatic conversions made during request processing.").nullable().optional()
|
|
161
|
-
}).describe("Response from querying a Notion database.");
|
|
161
|
+
}).passthrough().describe("Response from querying a Notion database.");
|
|
162
162
|
const notionQueryDatabaseWithFilter = require_action.action("NOTION_QUERY_DATABASE_WITH_FILTER", {
|
|
163
163
|
slug: "notion-query-database-with-filter",
|
|
164
164
|
name: "Query database with filter",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-database-with-filter.cjs","names":["z","action"],"sources":["../../src/actions/query-database-with-filter.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NotionQueryDatabaseWithFilterInput: z.ZodTypeAny = z.object({\n sorts: z.array(z.union([z.object({\n property: z.string().describe(\"Name or ID of the database property to sort by. Do NOT use for system timestamps (created_time, last_edited_time) - use TimestampSort instead.\"),\n direction: z.enum([\"ascending\", \"descending\"]).describe(\"Sort direction: ascending or descending\"),\n}).describe(\"Sort by a database property name or ID (NOT for system timestamps).\"), z.object({\n direction: z.enum([\"ascending\", \"descending\"]).describe(\"Sort direction: ascending or descending\"),\n timestamp: z.enum([\"created_time\", \"last_edited_time\"]).describe(\"System timestamp field to sort by. Use 'created_time' for page creation time or 'last_edited_time' for last modification time.\"),\n}).describe(\"Sort by a system timestamp field (created or last edited time).\")])).describe(\"List of sort criteria in order of precedence. Use PropertySort for database properties (with property field) and TimestampSort for system timestamps (with timestamp='created_time' or 'last_edited_time'). IMPORTANT: To sort by page creation or last edited time, you MUST use the TimestampSort format with timestamp='created_time' or timestamp='last_edited_time', NOT property names like 'Created' or 'Last Edited'. Common timestamp field name variations (Created, creation time, Last Edited, etc.) will be automatically converted to the correct format.\").optional(),\n filter: z.record(z.string(), z.unknown()).describe(\"PREREQUISITE: Call NOTION_FETCH_DATABASE first to discover property names and types. Filter type keys MUST match the property's actual type in the schema. Each filter object MUST contain exactly ONE filter type key. For multiple conditions, use compound filters: {\\\"and\\\": [{\\\"property\\\": \\\"Name\\\", \\\"title\\\": {...}}, {\\\"property\\\": \\\"Description\\\", \\\"rich_text\\\": {...}}]}. 'title' IS A RESERVED PROPERTY NAME: 'title' always refers to the database's built-in primary title column (type 'title', NOT 'select' or 'rich_text'). Even custom properties named 'title' are treated as the built-in title column. FILTER TYPE MUST MATCH SCHEMA TYPE: Property names are NOT reliable indicators of type. A property named 'Status' could be type 'select' in one database but type 'status' in another. 'select' is for dropdowns; 'status' is ONLY for Notion's built-in Status property with workflow groups. SELECT/STATUS/MULTI_SELECT VALUES ARE CASE-SENSITIVE: Option names must match EXACTLY as defined in the database schema, including capitalization and emoji prefixes (e.g., 'Done' not 'done', '✅ Done' not 'Done'). Common mistake: using 'done' when the actual option is 'Done'. Check the database schema for exact option names. Valid filter type keys: title, rich_text, number, checkbox, select, multi_select, status, date, people, files, url, email, phone_number, relation, created_by, created_time, last_edited_by, last_edited_time, formula, unique_id, rollup, verification, timestamp. FORMULA FILTERS: Structure: {'property': '<name>', 'formula': {<result_type>: {<condition>: <value>}}}. Result types: 'string' (rich_text conditions), 'number' (numeric conditions), 'date' (date conditions), 'checkbox' (boolean conditions). The result type MUST match the formula's actual output type. If the formula property value shows type 'boolean', use 'checkbox' in the filter (API naming mismatch). Some complex formulas are unfilterable ('Unable to filter based on a formula of unknown type') - use client-side filtering instead. NOTE: 'text' is NOT valid - use 'rich_text' for text properties or 'title' for title properties. SYSTEM TIMESTAMP FILTERS: Use simplified format: {\\\"created_time\\\": {\\\"on_or_after\\\": \\\"2024-01-01\\\"}} - auto-transformed to correct API format. Filter structure for database properties: {\\\"property\\\": \\\"<property_name>\\\", \\\"<filter_type>\\\": {\\\"<condition>\\\": \\\"<value>\\\"}}. Common conditions by type: title/rich_text: equals, contains, starts_with, ends_with, is_empty, is_not_empty; select/status: equals, does_not_equal, is_empty, is_not_empty; number: equals, does_not_equal, greater_than, less_than, greater_than_or_equal_to, less_than_or_equal_to, is_empty, is_not_empty; checkbox: equals (true/false); date: equals, before, after, on_or_before, on_or_after, is_empty, is_not_empty, past_week, past_month, past_year, next_week, next_month, next_year; relation: contains, does_not_contain (both require a valid page UUID), is_empty, is_not_empty. ROLLUP FILTERS: Require a nested aggregation type wrapper. Do NOT use flat filters like {\\\"rollup\\\": {\\\"contains\\\": \\\"value\\\"}}. Instead use one of: (1) {\\\"rollup\\\": {\\\"any\\\": {<condition>}}} - matches if ANY related item satisfies condition; (2) {\\\"rollup\\\": {\\\"every\\\": {<condition>}}} - matches if ALL related items satisfy condition; (3) {\\\"rollup\\\": {\\\"none\\\": {<condition>}}} - matches if NO related items satisfy condition; (4) {\\\"rollup\\\": {\\\"number\\\": {<number_condition>}}} - for number rollup aggregations (count, sum, avg, etc.); (5) {\\\"rollup\\\": {\\\"date\\\": {<date_condition>}}} - for date rollup aggregations (earliest, latest). Inside rollup.any/every/none, use the filter type matching the underlying property type. Compound filters use 'and' or 'or' arrays: {\\\"and\\\": [<filter1>, <filter2>]} or {\\\"or\\\": [<filter1>, <filter2>]}.\").optional(),\n page_size: z.number().int().describe(\"Maximum number of items to return (1–100). Defaults to 100 if omitted.\").optional(),\n database_id: z.string().describe(\"The UUID of the Notion database to query (32 character hex string, with hyphens or without). IMPORTANT: This must be a DATABASE ID, not a page ID. Page IDs and database IDs are different things. If you have a page URL/ID, that is NOT the same as the database ID - inline databases within pages have their own separate database IDs distinct from the parent page ID. Use NOTION_SEARCH_NOTION_PAGE or NOTION_FETCH_DATABASE to discover the correct database ID. The database must be shared with your integration.\"),\n start_cursor: z.string().describe(\"Cursor from a prior response's `next_cursor` for fetching the next page. Use the exact cursor value returned by Notion.\").optional(),\n composio_execution_message: z.string().describe(\"Internal message about any automatic conversions made during execution.\").optional(),\n});\nconst NotionQueryDatabaseWithFilter_EmojiIconSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Always set to 'emoji'.\"),\n emoji: z.string().describe(\"The emoji character.\"),\n}).describe(\"Emoji icon.\");\nconst NotionQueryDatabaseWithFilter_ExternalFileSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"HTTPS URL to the externally hosted file.\"),\n}).describe(\"External file reference.\");\nconst NotionQueryDatabaseWithFilter_ExternalFileIconSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Set to 'external' for externally hosted files.\"),\n external: NotionQueryDatabaseWithFilter_ExternalFileSchema.nullable(),\n}).describe(\"External file icon.\");\nconst NotionQueryDatabaseWithFilter_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 reference.\");\nconst NotionQueryDatabaseWithFilter_NotionFileIconSchema: z.ZodTypeAny = z.object({\n file: NotionQueryDatabaseWithFilter_NotionFileSchema.nullable(),\n type: z.string().describe(\"Set to 'file' for Notion-hosted files.\"),\n}).describe(\"Notion-hosted file icon.\");\nconst NotionQueryDatabaseWithFilter_CustomEmojiSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the custom emoji.\"),\n url: z.string().describe(\"Public URL where the custom emoji image is hosted.\"),\n name: z.string().describe(\"Name of the custom emoji.\"),\n}).describe(\"Custom emoji details.\");\nconst NotionQueryDatabaseWithFilter_CustomEmojiIconSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Set to 'custom_emoji' for custom emojis.\"),\n custom_emoji: NotionQueryDatabaseWithFilter_CustomEmojiSchema.nullable(),\n}).describe(\"Custom emoji icon.\");\nconst NotionQueryDatabaseWithFilter_ExternalCoverSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Set to 'external' for externally hosted files.\"),\n external: NotionQueryDatabaseWithFilter_ExternalFileSchema.nullable(),\n}).describe(\"External cover image.\");\nconst NotionQueryDatabaseWithFilter_NotionFileCoverSchema: z.ZodTypeAny = z.object({\n file: NotionQueryDatabaseWithFilter_NotionFileSchema.nullable(),\n type: z.string().describe(\"Set to 'file' for Notion-hosted files.\"),\n}).describe(\"Notion-hosted cover image.\");\nconst NotionQueryDatabaseWithFilter_DatabaseIdParentSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Set to 'database_id' for database parents.\"),\n database_id: z.string().describe(\"UUIDv4 identifier of the parent database.\"),\n}).describe(\"Database parent.\");\nconst NotionQueryDatabaseWithFilter_DataSourceIdParentSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Set to 'data_source_id' for data source parents.\"),\n database_id: z.string().describe(\"UUIDv4 identifier of the parent database (convenience field).\"),\n data_source_id: z.string().describe(\"UUIDv4 identifier of the parent data source.\"),\n}).describe(\"Data source parent.\");\nconst NotionQueryDatabaseWithFilter_PageIdParentSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Set to 'page_id' for page parents.\"),\n page_id: z.string().describe(\"UUIDv4 identifier of the parent page.\"),\n}).describe(\"Page parent.\");\nconst NotionQueryDatabaseWithFilter_WorkspaceParentSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Set to 'workspace' for workspace parents.\"),\n workspace: z.boolean().describe(\"Always set to true for workspace parents.\"),\n}).describe(\"Workspace parent.\");\nconst NotionQueryDatabaseWithFilter_BlockIdParentSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Set to 'block_id' for block parents.\"),\n block_id: z.string().describe(\"UUIDv4 identifier of the parent block.\"),\n}).describe(\"Block parent.\");\nconst NotionQueryDatabaseWithFilter_PartialUserSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the user (UUID format).\"),\n object: z.string().describe(\"Always set to 'user'.\"),\n}).describe(\"Partial user object representing a Notion user.\");\nconst NotionQueryDatabaseWithFilter_PageSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the page (UUIDv4 format).\"),\n url: z.string().describe(\"The Notion URL of the page.\").nullable().optional(),\n icon: z.union([NotionQueryDatabaseWithFilter_EmojiIconSchema, NotionQueryDatabaseWithFilter_ExternalFileIconSchema, NotionQueryDatabaseWithFilter_NotionFileIconSchema, NotionQueryDatabaseWithFilter_CustomEmojiIconSchema]).nullable().optional(),\n cover: z.union([NotionQueryDatabaseWithFilter_ExternalCoverSchema, NotionQueryDatabaseWithFilter_NotionFileCoverSchema]).nullable().optional(),\n object: z.string().describe(\"Always set to 'page'.\"),\n parent: z.union([NotionQueryDatabaseWithFilter_DatabaseIdParentSchema, NotionQueryDatabaseWithFilter_DataSourceIdParentSchema, NotionQueryDatabaseWithFilter_PageIdParentSchema, NotionQueryDatabaseWithFilter_WorkspaceParentSchema, NotionQueryDatabaseWithFilter_BlockIdParentSchema]).nullable().optional(),\n archived: z.boolean().describe(\"Whether the page is archived.\").nullable().optional(),\n in_trash: z.boolean().describe(\"Whether the page is in trash.\").nullable().optional(),\n created_by: NotionQueryDatabaseWithFilter_PartialUserSchema.nullable().optional(),\n properties: z.object({}).describe(\"Property values of the page, conforming to the parent database's property schema. Keys are property names, values are typed property value objects with 'id', 'type', and type-specific fields.\").nullable().optional(),\n public_url: z.string().describe(\"The public URL of the page if it has been published, otherwise null.\").nullable().optional(),\n created_time: z.string().describe(\"ISO 8601 timestamp of when the page was created.\").nullable().optional(),\n last_edited_by: NotionQueryDatabaseWithFilter_PartialUserSchema.nullable().optional(),\n last_edited_time: z.string().describe(\"ISO 8601 timestamp of when the page was last edited.\").nullable().optional(),\n}).describe(\"Notion page object.\");\nconst NotionQueryDatabaseWithFilter_RichTextAnnotationsSchema: 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(\"Text color, can be 'default', 'blue', 'green', 'red', or background variants.\"),\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 configuration for rich text.\");\nconst NotionQueryDatabaseWithFilter_RichTextSchema: z.ZodTypeAny = z.object({\n href: z.string().describe(\"URL for links or Notion mentions, null if not a link.\").nullable().optional(),\n type: z.string().describe(\"Type of rich text: 'text', 'mention', or 'equation'.\"),\n plain_text: z.string().describe(\"Unformatted text content.\"),\n annotations: NotionQueryDatabaseWithFilter_RichTextAnnotationsSchema.nullable(),\n}).describe(\"Rich text object for Notion text content.\");\nconst NotionQueryDatabaseWithFilter_DataSourceSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the data source.\"),\n name: z.string().describe(\"Name of the data source.\"),\n}).describe(\"Data source in a database.\");\nconst NotionQueryDatabaseWithFilter_DatabaseSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the database (UUID format).\"),\n url: z.string().describe(\"The Notion URL of the database.\"),\n icon: z.union([NotionQueryDatabaseWithFilter_EmojiIconSchema, NotionQueryDatabaseWithFilter_ExternalFileIconSchema, NotionQueryDatabaseWithFilter_NotionFileIconSchema, NotionQueryDatabaseWithFilter_CustomEmojiIconSchema]).nullable().optional(),\n cover: z.union([NotionQueryDatabaseWithFilter_ExternalCoverSchema, NotionQueryDatabaseWithFilter_NotionFileCoverSchema]).nullable().optional(),\n title: z.array(NotionQueryDatabaseWithFilter_RichTextSchema).describe(\"Database name as displayed in Notion, represented as an array of rich text objects.\"),\n object: z.string().describe(\"Always set to 'database'.\"),\n parent: z.union([NotionQueryDatabaseWithFilter_DatabaseIdParentSchema, NotionQueryDatabaseWithFilter_DataSourceIdParentSchema, NotionQueryDatabaseWithFilter_PageIdParentSchema, NotionQueryDatabaseWithFilter_WorkspaceParentSchema, NotionQueryDatabaseWithFilter_BlockIdParentSchema]),\n archived: z.boolean().describe(\"Whether the database is archived.\"),\n in_trash: z.boolean().describe(\"Whether the database is in trash.\"),\n is_inline: z.boolean().describe(\"Whether the database is displayed inline (true) or as a full page (false).\"),\n created_by: NotionQueryDatabaseWithFilter_PartialUserSchema.nullable(),\n public_url: z.string().describe(\"The public URL of the database if it has been published, otherwise null.\").nullable().optional(),\n description: z.array(NotionQueryDatabaseWithFilter_RichTextSchema).describe(\"Database description as an array of rich text objects.\").nullable().optional(),\n created_time: z.string().describe(\"ISO 8601 timestamp of when the database was created.\"),\n data_sources: z.array(NotionQueryDatabaseWithFilter_DataSourceSchema).describe(\"List of child data sources in the database.\"),\n last_edited_by: NotionQueryDatabaseWithFilter_PartialUserSchema.nullable(),\n last_edited_time: z.string().describe(\"ISO 8601 timestamp of when the database was last edited.\"),\n}).describe(\"Notion database object.\");\nconst NotionQueryDatabaseWithFilter_PageOrDatabaseMetadataSchema: z.ZodTypeAny = z.object({}).describe(\"Type-specific pagination metadata for page_or_database list responses.\\nFor database query responses, this is always an empty object per the Notion API spec.\");\nexport const NotionQueryDatabaseWithFilterOutput: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Specifies the type of objects in the results array. Set to 'page_or_database' for database query responses.\"),\n object: z.string().describe(\"Always set to 'list' for paginated responses.\"),\n results: z.array(z.union([NotionQueryDatabaseWithFilter_PageSchema, NotionQueryDatabaseWithFilter_DatabaseSchema])).describe(\"Array of page and/or database objects matching the query criteria.\"),\n has_more: z.boolean().describe(\"Whether there are more results available beyond the current page. Returns false when the response includes the end of the list, otherwise true.\"),\n next_cursor: z.string().describe(\"Pagination cursor for retrieving the next page of results. Only present when has_more is true. Pass this value as start_cursor in the next request.\").nullable().optional(),\n page_or_database: NotionQueryDatabaseWithFilter_PageOrDatabaseMetadataSchema.nullable(),\n composio_execution_message: z.string().describe(\"Message about any automatic conversions made during request processing.\").nullable().optional(),\n}).describe(\"Response from querying a Notion database.\");\n\nexport const notionQueryDatabaseWithFilter = action(\"NOTION_QUERY_DATABASE_WITH_FILTER\", {\n slug: \"notion-query-database-with-filter\",\n name: \"Query database with filter\",\n description: \"Tool to query a Notion database with server-side filtering, sorting, and pagination. Use when you need to retrieve a subset of rows by property, date, status, or other conditions.\",\n input: NotionQueryDatabaseWithFilterInput,\n output: NotionQueryDatabaseWithFilterOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAmDA,IAAAA,EAAE,OAAO;CACvE,OAAOA,IAAAA,EAAE,MAAMA,I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A2EA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,+JAA+J;AACtQ,MAAa,sCAAoDA,IAAAA,EAAE,OAAO;CACxE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6GAA6G;CACvI,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;CAC3E,SAASA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,MAAM,CAAC,0CAA0C,4CAA4C,CAAC,CAAC,CAAC,CAAC,SAAS,oEAAoE;CACjM,UAAUA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,iJAAiJ;CAChL,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qJAAqJ,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5M,kBAAkB,2DAA2D,SAAS;CACtF,4BAA4BA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yEAAyE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACjJ,CAAC,CAAC,CAAC,SAAS,2CAA2C;AAEvD,MAAa,gCAAgCC,eAAAA,OAAO,qCAAqC;CACvF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"query-database-with-filter.cjs","names":["z","action"],"sources":["../../src/actions/query-database-with-filter.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const NotionQueryDatabaseWithFilterInput = z.object({\n sorts: z.array(z.union([z.object({\n property: z.string().describe(\"Name or ID of the database property to sort by. Do NOT use for system timestamps (created_time, last_edited_time) - use TimestampSort instead.\"),\n direction: z.enum([\"ascending\", \"descending\"]).describe(\"Sort direction: ascending or descending\"),\n}).passthrough().describe(\"Sort by a database property name or ID (NOT for system timestamps).\"), z.object({\n direction: z.enum([\"ascending\", \"descending\"]).describe(\"Sort direction: ascending or descending\"),\n timestamp: z.enum([\"created_time\", \"last_edited_time\"]).describe(\"System timestamp field to sort by. Use 'created_time' for page creation time or 'last_edited_time' for last modification time.\"),\n}).passthrough().describe(\"Sort by a system timestamp field (created or last edited time).\")])).describe(\"List of sort criteria in order of precedence. Use PropertySort for database properties (with property field) and TimestampSort for system timestamps (with timestamp='created_time' or 'last_edited_time'). IMPORTANT: To sort by page creation or last edited time, you MUST use the TimestampSort format with timestamp='created_time' or timestamp='last_edited_time', NOT property names like 'Created' or 'Last Edited'. Common timestamp field name variations (Created, creation time, Last Edited, etc.) will be automatically converted to the correct format.\").optional(),\n filter: z.record(z.string(), z.unknown()).describe(\"PREREQUISITE: Call NOTION_FETCH_DATABASE first to discover property names and types. Filter type keys MUST match the property's actual type in the schema. Each filter object MUST contain exactly ONE filter type key. For multiple conditions, use compound filters: {\\\"and\\\": [{\\\"property\\\": \\\"Name\\\", \\\"title\\\": {...}}, {\\\"property\\\": \\\"Description\\\", \\\"rich_text\\\": {...}}]}. 'title' IS A RESERVED PROPERTY NAME: 'title' always refers to the database's built-in primary title column (type 'title', NOT 'select' or 'rich_text'). Even custom properties named 'title' are treated as the built-in title column. FILTER TYPE MUST MATCH SCHEMA TYPE: Property names are NOT reliable indicators of type. A property named 'Status' could be type 'select' in one database but type 'status' in another. 'select' is for dropdowns; 'status' is ONLY for Notion's built-in Status property with workflow groups. SELECT/STATUS/MULTI_SELECT VALUES ARE CASE-SENSITIVE: Option names must match EXACTLY as defined in the database schema, including capitalization and emoji prefixes (e.g., 'Done' not 'done', '✅ Done' not 'Done'). Common mistake: using 'done' when the actual option is 'Done'. Check the database schema for exact option names. Valid filter type keys: title, rich_text, number, checkbox, select, multi_select, status, date, people, files, url, email, phone_number, relation, created_by, created_time, last_edited_by, last_edited_time, formula, unique_id, rollup, verification, timestamp. FORMULA FILTERS: Structure: {'property': '<name>', 'formula': {<result_type>: {<condition>: <value>}}}. Result types: 'string' (rich_text conditions), 'number' (numeric conditions), 'date' (date conditions), 'checkbox' (boolean conditions). The result type MUST match the formula's actual output type. If the formula property value shows type 'boolean', use 'checkbox' in the filter (API naming mismatch). Some complex formulas are unfilterable ('Unable to filter based on a formula of unknown type') - use client-side filtering instead. NOTE: 'text' is NOT valid - use 'rich_text' for text properties or 'title' for title properties. SYSTEM TIMESTAMP FILTERS: Use simplified format: {\\\"created_time\\\": {\\\"on_or_after\\\": \\\"2024-01-01\\\"}} - auto-transformed to correct API format. Filter structure for database properties: {\\\"property\\\": \\\"<property_name>\\\", \\\"<filter_type>\\\": {\\\"<condition>\\\": \\\"<value>\\\"}}. Common conditions by type: title/rich_text: equals, contains, starts_with, ends_with, is_empty, is_not_empty; select/status: equals, does_not_equal, is_empty, is_not_empty; number: equals, does_not_equal, greater_than, less_than, greater_than_or_equal_to, less_than_or_equal_to, is_empty, is_not_empty; checkbox: equals (true/false); date: equals, before, after, on_or_before, on_or_after, is_empty, is_not_empty, past_week, past_month, past_year, next_week, next_month, next_year; relation: contains, does_not_contain (both require a valid page UUID), is_empty, is_not_empty. ROLLUP FILTERS: Require a nested aggregation type wrapper. Do NOT use flat filters like {\\\"rollup\\\": {\\\"contains\\\": \\\"value\\\"}}. Instead use one of: (1) {\\\"rollup\\\": {\\\"any\\\": {<condition>}}} - matches if ANY related item satisfies condition; (2) {\\\"rollup\\\": {\\\"every\\\": {<condition>}}} - matches if ALL related items satisfy condition; (3) {\\\"rollup\\\": {\\\"none\\\": {<condition>}}} - matches if NO related items satisfy condition; (4) {\\\"rollup\\\": {\\\"number\\\": {<number_condition>}}} - for number rollup aggregations (count, sum, avg, etc.); (5) {\\\"rollup\\\": {\\\"date\\\": {<date_condition>}}} - for date rollup aggregations (earliest, latest). Inside rollup.any/every/none, use the filter type matching the underlying property type. Compound filters use 'and' or 'or' arrays: {\\\"and\\\": [<filter1>, <filter2>]} or {\\\"or\\\": [<filter1>, <filter2>]}.\").optional(),\n page_size: z.number().int().describe(\"Maximum number of items to return (1–100). Defaults to 100 if omitted.\").optional(),\n database_id: z.string().describe(\"The UUID of the Notion database to query (32 character hex string, with hyphens or without). IMPORTANT: This must be a DATABASE ID, not a page ID. Page IDs and database IDs are different things. If you have a page URL/ID, that is NOT the same as the database ID - inline databases within pages have their own separate database IDs distinct from the parent page ID. Use NOTION_SEARCH_NOTION_PAGE or NOTION_FETCH_DATABASE to discover the correct database ID. The database must be shared with your integration.\"),\n start_cursor: z.string().describe(\"Cursor from a prior response's `next_cursor` for fetching the next page. Use the exact cursor value returned by Notion.\").optional(),\n composio_execution_message: z.string().describe(\"Internal message about any automatic conversions made during execution.\").optional(),\n});\nconst NotionQueryDatabaseWithFilter_EmojiIconSchema = z.object({\n type: z.string().describe(\"Always set to 'emoji'.\").nullable(),\n emoji: z.string().describe(\"The emoji character.\").nullable(),\n}).passthrough().describe(\"Emoji icon.\");\nconst NotionQueryDatabaseWithFilter_ExternalFileSchema = z.object({\n url: z.string().describe(\"HTTPS URL to the externally hosted file.\").nullable(),\n}).passthrough().describe(\"External file reference.\");\nconst NotionQueryDatabaseWithFilter_ExternalFileIconSchema = z.object({\n type: z.string().describe(\"Set to 'external' for externally hosted files.\").nullable(),\n external: NotionQueryDatabaseWithFilter_ExternalFileSchema.nullable(),\n}).passthrough().describe(\"External file icon.\");\nconst NotionQueryDatabaseWithFilter_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 reference.\");\nconst NotionQueryDatabaseWithFilter_NotionFileIconSchema = z.object({\n file: NotionQueryDatabaseWithFilter_NotionFileSchema.nullable(),\n type: z.string().describe(\"Set to 'file' for Notion-hosted files.\").nullable(),\n}).passthrough().describe(\"Notion-hosted file icon.\");\nconst NotionQueryDatabaseWithFilter_CustomEmojiSchema = z.object({\n id: z.string().describe(\"Unique identifier for the custom emoji.\").nullable(),\n url: z.string().describe(\"Public URL where the custom emoji image is hosted.\").nullable(),\n name: z.string().describe(\"Name of the custom emoji.\").nullable(),\n}).passthrough().describe(\"Custom emoji details.\");\nconst NotionQueryDatabaseWithFilter_CustomEmojiIconSchema = z.object({\n type: z.string().describe(\"Set to 'custom_emoji' for custom emojis.\").nullable(),\n custom_emoji: NotionQueryDatabaseWithFilter_CustomEmojiSchema.nullable(),\n}).passthrough().describe(\"Custom emoji icon.\");\nconst NotionQueryDatabaseWithFilter_ExternalCoverSchema = z.object({\n type: z.string().describe(\"Set to 'external' for externally hosted files.\").nullable(),\n external: NotionQueryDatabaseWithFilter_ExternalFileSchema.nullable(),\n}).passthrough().describe(\"External cover image.\");\nconst NotionQueryDatabaseWithFilter_NotionFileCoverSchema = z.object({\n file: NotionQueryDatabaseWithFilter_NotionFileSchema.nullable(),\n type: z.string().describe(\"Set to 'file' for Notion-hosted files.\").nullable(),\n}).passthrough().describe(\"Notion-hosted cover image.\");\nconst NotionQueryDatabaseWithFilter_DatabaseIdParentSchema = z.object({\n type: z.string().describe(\"Set to 'database_id' for database parents.\").nullable(),\n database_id: z.string().describe(\"UUIDv4 identifier of the parent database.\").nullable(),\n}).passthrough().describe(\"Database parent.\");\nconst NotionQueryDatabaseWithFilter_DataSourceIdParentSchema = z.object({\n type: z.string().describe(\"Set to 'data_source_id' for data source parents.\").nullable(),\n database_id: z.string().describe(\"UUIDv4 identifier of the parent database (convenience field).\").nullable(),\n data_source_id: z.string().describe(\"UUIDv4 identifier of the parent data source.\").nullable(),\n}).passthrough().describe(\"Data source parent.\");\nconst NotionQueryDatabaseWithFilter_PageIdParentSchema = z.object({\n type: z.string().describe(\"Set to 'page_id' for page parents.\").nullable(),\n page_id: z.string().describe(\"UUIDv4 identifier of the parent page.\").nullable(),\n}).passthrough().describe(\"Page parent.\");\nconst NotionQueryDatabaseWithFilter_WorkspaceParentSchema = z.object({\n type: z.string().describe(\"Set to 'workspace' for workspace parents.\").nullable(),\n workspace: z.boolean().describe(\"Always set to true for workspace parents.\").nullable(),\n}).passthrough().describe(\"Workspace parent.\");\nconst NotionQueryDatabaseWithFilter_BlockIdParentSchema = z.object({\n type: z.string().describe(\"Set to 'block_id' for block parents.\").nullable(),\n block_id: z.string().describe(\"UUIDv4 identifier of the parent block.\").nullable(),\n}).passthrough().describe(\"Block parent.\");\nconst NotionQueryDatabaseWithFilter_PartialUserSchema = z.object({\n id: z.string().describe(\"Unique identifier for the user (UUID format).\").nullable(),\n object: z.string().describe(\"Always set to 'user'.\").nullable(),\n}).passthrough().describe(\"Partial user object representing a Notion user.\");\nconst NotionQueryDatabaseWithFilter_PageSchema = z.object({\n id: z.string().describe(\"Unique identifier of the page (UUIDv4 format).\").nullable(),\n url: z.string().describe(\"The Notion URL of the page.\").nullable().optional(),\n icon: z.union([NotionQueryDatabaseWithFilter_EmojiIconSchema, NotionQueryDatabaseWithFilter_ExternalFileIconSchema, NotionQueryDatabaseWithFilter_NotionFileIconSchema, NotionQueryDatabaseWithFilter_CustomEmojiIconSchema]).nullable().optional(),\n cover: z.union([NotionQueryDatabaseWithFilter_ExternalCoverSchema, NotionQueryDatabaseWithFilter_NotionFileCoverSchema]).nullable().optional(),\n object: z.string().describe(\"Always set to 'page'.\").nullable(),\n parent: z.union([NotionQueryDatabaseWithFilter_DatabaseIdParentSchema, NotionQueryDatabaseWithFilter_DataSourceIdParentSchema, NotionQueryDatabaseWithFilter_PageIdParentSchema, NotionQueryDatabaseWithFilter_WorkspaceParentSchema, NotionQueryDatabaseWithFilter_BlockIdParentSchema]).nullable().optional(),\n archived: z.boolean().describe(\"Whether the page is archived.\").nullable().optional(),\n in_trash: z.boolean().describe(\"Whether the page is in trash.\").nullable().optional(),\n created_by: NotionQueryDatabaseWithFilter_PartialUserSchema.nullable().optional(),\n properties: z.record(z.string(), z.unknown()).describe(\"Property values of the page, conforming to the parent database's property schema. Keys are property names, values are typed property value objects with 'id', 'type', and type-specific fields.\").nullable().optional(),\n public_url: z.string().describe(\"The public URL of the page if it has been published, otherwise null.\").nullable().optional(),\n created_time: z.string().describe(\"ISO 8601 timestamp of when the page was created.\").nullable().optional(),\n last_edited_by: NotionQueryDatabaseWithFilter_PartialUserSchema.nullable().optional(),\n last_edited_time: z.string().describe(\"ISO 8601 timestamp of when the page was last edited.\").nullable().optional(),\n}).passthrough().describe(\"Notion page object.\");\nconst NotionQueryDatabaseWithFilter_RichTextAnnotationsSchema = 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(\"Text color, can be 'default', 'blue', 'green', 'red', or background variants.\").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 configuration for rich text.\");\nconst NotionQueryDatabaseWithFilter_RichTextSchema = z.object({\n href: z.string().describe(\"URL for links or Notion mentions, null if not a link.\").nullable().optional(),\n type: z.string().describe(\"Type of rich text: 'text', 'mention', or 'equation'.\").nullable(),\n plain_text: z.string().describe(\"Unformatted text content.\").nullable(),\n annotations: NotionQueryDatabaseWithFilter_RichTextAnnotationsSchema.nullable(),\n}).passthrough().describe(\"Rich text object for Notion text content.\");\nconst NotionQueryDatabaseWithFilter_DataSourceSchema = z.object({\n id: z.string().describe(\"Unique identifier of the data source.\").nullable(),\n name: z.string().describe(\"Name of the data source.\").nullable(),\n}).passthrough().describe(\"Data source in a database.\");\nconst NotionQueryDatabaseWithFilter_DatabaseSchema = z.object({\n id: z.string().describe(\"Unique identifier of the database (UUID format).\").nullable(),\n url: z.string().describe(\"The Notion URL of the database.\").nullable(),\n icon: z.union([NotionQueryDatabaseWithFilter_EmojiIconSchema, NotionQueryDatabaseWithFilter_ExternalFileIconSchema, NotionQueryDatabaseWithFilter_NotionFileIconSchema, NotionQueryDatabaseWithFilter_CustomEmojiIconSchema]).nullable().optional(),\n cover: z.union([NotionQueryDatabaseWithFilter_ExternalCoverSchema, NotionQueryDatabaseWithFilter_NotionFileCoverSchema]).nullable().optional(),\n title: z.array(NotionQueryDatabaseWithFilter_RichTextSchema).describe(\"Database name as displayed in Notion, represented as an array of rich text objects.\"),\n object: z.string().describe(\"Always set to 'database'.\").nullable(),\n parent: z.union([NotionQueryDatabaseWithFilter_DatabaseIdParentSchema, NotionQueryDatabaseWithFilter_DataSourceIdParentSchema, NotionQueryDatabaseWithFilter_PageIdParentSchema, NotionQueryDatabaseWithFilter_WorkspaceParentSchema, NotionQueryDatabaseWithFilter_BlockIdParentSchema]),\n archived: z.boolean().describe(\"Whether the database is archived.\").nullable(),\n in_trash: z.boolean().describe(\"Whether the database is in trash.\").nullable(),\n is_inline: z.boolean().describe(\"Whether the database is displayed inline (true) or as a full page (false).\").nullable(),\n created_by: NotionQueryDatabaseWithFilter_PartialUserSchema.nullable(),\n public_url: z.string().describe(\"The public URL of the database if it has been published, otherwise null.\").nullable().optional(),\n description: z.array(NotionQueryDatabaseWithFilter_RichTextSchema).describe(\"Database description as an array of rich text objects.\").nullable().optional(),\n created_time: z.string().describe(\"ISO 8601 timestamp of when the database was created.\").nullable(),\n data_sources: z.array(NotionQueryDatabaseWithFilter_DataSourceSchema).describe(\"List of child data sources in the database.\"),\n last_edited_by: NotionQueryDatabaseWithFilter_PartialUserSchema.nullable(),\n last_edited_time: z.string().describe(\"ISO 8601 timestamp of when the database was last edited.\").nullable(),\n}).passthrough().describe(\"Notion database object.\");\nconst NotionQueryDatabaseWithFilter_PageOrDatabaseMetadataSchema = z.record(z.string(), z.unknown()).describe(\"Type-specific pagination metadata for page_or_database list responses.\\nFor database query responses, this is always an empty object per the Notion API spec.\");\nexport const NotionQueryDatabaseWithFilterOutput = z.object({\n type: z.string().describe(\"Specifies the type of objects in the results array. Set to 'page_or_database' for database query responses.\").nullable(),\n object: z.string().describe(\"Always set to 'list' for paginated responses.\").nullable(),\n results: z.array(z.union([NotionQueryDatabaseWithFilter_PageSchema, NotionQueryDatabaseWithFilter_DatabaseSchema])).describe(\"Array of page and/or database objects matching the query criteria.\"),\n has_more: z.boolean().describe(\"Whether there are more results available beyond the current page. Returns false when the response includes the end of the list, otherwise true.\").nullable(),\n next_cursor: z.string().describe(\"Pagination cursor for retrieving the next page of results. Only present when has_more is true. Pass this value as start_cursor in the next request.\").nullable().optional(),\n page_or_database: NotionQueryDatabaseWithFilter_PageOrDatabaseMetadataSchema.nullable(),\n composio_execution_message: z.string().describe(\"Message about any automatic conversions made during request processing.\").nullable().optional(),\n}).passthrough().describe(\"Response from querying a Notion database.\");\n\nexport const notionQueryDatabaseWithFilter = action(\"NOTION_QUERY_DATABASE_WITH_FILTER\", {\n slug: \"notion-query-database-with-filter\",\n name: \"Query database with filter\",\n description: \"Tool to query a Notion database with server-side filtering, sorting, and pagination. Use when you need to retrieve a subset of rows by property, date, status, or other conditions.\",\n input: NotionQueryDatabaseWithFilterInput,\n output: NotionQueryDatabaseWithFilterOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAqCA,IAAAA,EAAE,OAAO;CACzD,OAAOA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,OAAO;EACjC,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gJAAgJ;EAC9K,WAAWA,IAAAA,EAAE,KAAK,CAAC,aAAa,YAAY,CAAC,CAAC,CAAC,SAAS,yCAAyC;CACnG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,qEAAqE,GAAGA,IAAAA,EAAE,OAAO;EACzG,WAAWA,IAAAA,EAAE,KAAK,CAAC,aAAa,YAAY,CAAC,CAAC,CAAC,SAAS,yCAAyC;EACjG,WAAWA,IAAAA,EAAE,KAAK,CAAC,gBAAgB,kBAAkB,CAAC,CAAC,CAAC,SAAS,gIAAgI;CACnM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,yiBAAyiB,CAAC,CAAC,SAAS;CAC3pB,QAAQA,IAAAA,EAAE,OAAOA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