From f415ffd55805069a628a25f6c048cb18d2f86b99 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Mon, 7 Apr 2025 19:02:33 -0300 Subject: [PATCH 1/3] add notion-to-md package --- components/notion/package.json | 5 +- pnpm-lock.yaml | 241 ++++++++------------------------- 2 files changed, 56 insertions(+), 190 deletions(-) diff --git a/components/notion/package.json b/components/notion/package.json index 78992beacddf1..28e2c1f228fcb 100644 --- a/components/notion/package.json +++ b/components/notion/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/notion", - "version": "0.4.1", + "version": "0.5.0", "description": "Pipedream Notion Components", "main": "notion.app.mjs", "keywords": [ @@ -13,7 +13,8 @@ "@notionhq/client": "^2.2.3", "@pipedream/platform": "^3.0.3", "@tryfabric/martian": "^1.2.4", - "lodash-es": "^4.17.21" + "lodash-es": "^4.17.21", + "notion-to-md": "^4.0.0-alpha.4" }, "publishConfig": { "access": "public" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cef3bf6feb9b1..edcf12a2ab365 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -379,8 +379,7 @@ importers: specifier: ^20.0.0 version: 20.0.0 - components/adyntel: - specifiers: {} + components/adyntel: {} components/aerisweather: dependencies: @@ -426,8 +425,7 @@ importers: components/agentql: {} - components/agentset: - specifiers: {} + components/agentset: {} components/agenty: dependencies: @@ -5774,8 +5772,7 @@ importers: specifier: ^3.0.0 version: 3.0.3 - components/hamsa: - specifiers: {} + components/hamsa: {} components/handwrytten: {} @@ -8638,6 +8635,9 @@ importers: lodash-es: specifier: ^4.17.21 version: 4.17.21 + notion-to-md: + specifier: ^4.0.0-alpha.4 + version: 4.0.0-alpha.4(@notionhq/client@2.2.15) components/nozbe_teams: {} @@ -14901,8 +14901,8 @@ importers: docs-v2: dependencies: '@docsearch/react': - specifier: ^3.6.1 - version: 3.8.0(@algolia/client-search@5.17.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.17.3) + specifier: ^3.8.1 + version: 3.9.0(@algolia/client-search@5.17.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.17.3) '@vercel/analytics': specifier: ^1.3.1 version: 1.4.1(next@14.2.19(@babel/core@8.0.0-alpha.13)(@opentelemetry/api@1.9.0)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(vue@2.7.16) @@ -15197,126 +15197,74 @@ packages: resolution: {integrity: sha512-C+jj5XBTCNs7AFwufOkPLhuqn9bdgSDcqLB6b/Ppi9Fujwt613vWmA1hxeG76RX49vzHZIDJLq6N/v0o2SY1sA==} engines: {node: '>=18'} - '@algolia/autocomplete-core@1.17.7': - resolution: {integrity: sha512-BjiPOW6ks90UKl7TwMv7oNQMnzU+t/wk9mgIDi6b1tXpUek7MW0lbNOUHpvam9pe3lVCf4xPFT+lK7s+e+fs7Q==} + '@algolia/autocomplete-core@1.17.9': + resolution: {integrity: sha512-O7BxrpLDPJWWHv/DLA9DRFWs+iY1uOJZkqUwjS5HSZAGcl0hIVCQ97LTLewiZmZ402JYUrun+8NqFP+hCknlbQ==} - '@algolia/autocomplete-plugin-algolia-insights@1.17.7': - resolution: {integrity: sha512-Jca5Ude6yUOuyzjnz57og7Et3aXjbwCSDf/8onLHSQgw1qW3ALl9mrMWaXb5FmPVkV3EtkD2F/+NkT6VHyPu9A==} + '@algolia/autocomplete-plugin-algolia-insights@1.17.9': + resolution: {integrity: sha512-u1fEHkCbWF92DBeB/KHeMacsjsoI0wFhjZtlCq2ddZbAehshbZST6Hs0Avkc0s+4UyBGbMDnSuXHLuvRWK5iDQ==} peerDependencies: search-insights: '>= 1 < 3' - '@algolia/autocomplete-preset-algolia@1.17.7': - resolution: {integrity: sha512-ggOQ950+nwbWROq2MOCIL71RE0DdQZsceqrg32UqnhDz8FlO9rL8ONHNsI2R1MH0tkgVIDKI/D0sMiUchsFdWA==} + '@algolia/autocomplete-preset-algolia@1.17.9': + resolution: {integrity: sha512-Na1OuceSJeg8j7ZWn5ssMu/Ax3amtOwk76u4h5J4eK2Nx2KB5qt0Z4cOapCsxot9VcEN11ADV5aUSlQF4RhGjQ==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' - '@algolia/autocomplete-shared@1.17.7': - resolution: {integrity: sha512-o/1Vurr42U/qskRSuhBH+VKxMvkkUVTLU6WZQr+L5lGZZLYWyhdzWjW0iGXY7EkwRTjBqvN2EsR81yCTGV/kmg==} + '@algolia/autocomplete-shared@1.17.9': + resolution: {integrity: sha512-iDf05JDQ7I0b7JEA/9IektxN/80a2MZ1ToohfmNS3rfeuQnIKI3IJlIafD0xu4StbtQTghx9T3Maa97ytkXenQ==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' - '@algolia/client-abtesting@5.15.0': - resolution: {integrity: sha512-FaEM40iuiv1mAipYyiptP4EyxkJ8qHfowCpEeusdHUC4C7spATJYArD2rX3AxkVeREkDIgYEOuXcwKUbDCr7Nw==} - engines: {node: '>= 14.0.0'} - '@algolia/client-abtesting@5.17.1': resolution: {integrity: sha512-Os/xkQbDp5A5RdGYq1yS3fF69GoBJH5FIfrkVh+fXxCSe714i1Xdl9XoXhS4xG76DGKm6EFMlUqP024qjps8cg==} engines: {node: '>= 14.0.0'} - '@algolia/client-analytics@5.15.0': - resolution: {integrity: sha512-lho0gTFsQDIdCwyUKTtMuf9nCLwq9jOGlLGIeQGKDxXF7HbiAysFIu5QW/iQr1LzMgDyM9NH7K98KY+BiIFriQ==} - engines: {node: '>= 14.0.0'} - '@algolia/client-analytics@5.17.1': resolution: {integrity: sha512-WKpGC+cUhmdm3wndIlTh8RJXoVabUH+4HrvZHC4hXtvCYojEXYeep8RZstatwSZ7Ocg6Y2u67bLw90NEINuYEw==} engines: {node: '>= 14.0.0'} - '@algolia/client-common@5.15.0': - resolution: {integrity: sha512-IofrVh213VLsDkPoSKMeM9Dshrv28jhDlBDLRcVJQvlL8pzue7PEB1EZ4UoJFYS3NSn7JOcJ/V+olRQzXlJj1w==} - engines: {node: '>= 14.0.0'} - '@algolia/client-common@5.17.1': resolution: {integrity: sha512-5rb5+yPIie6912riAypTSyzbE23a7UM1UpESvD8GEPI4CcWQvA9DBlkRNx9qbq/nJ5pvv8VjZjUxJj7rFkzEAA==} engines: {node: '>= 14.0.0'} - '@algolia/client-insights@5.15.0': - resolution: {integrity: sha512-bDDEQGfFidDi0UQUCbxXOCdphbVAgbVmxvaV75cypBTQkJ+ABx/Npw7LkFGw1FsoVrttlrrQbwjvUB6mLVKs/w==} - engines: {node: '>= 14.0.0'} - '@algolia/client-insights@5.17.1': resolution: {integrity: sha512-nb/tfwBMn209TzFv1DDTprBKt/wl5btHVKoAww9fdEVdoKK02R2KAqxe5tuXLdEzAsS+LevRyOM/YjXuLmPtjQ==} engines: {node: '>= 14.0.0'} - '@algolia/client-personalization@5.15.0': - resolution: {integrity: sha512-LfaZqLUWxdYFq44QrasCDED5bSYOswpQjSiIL7Q5fYlefAAUO95PzBPKCfUhSwhb4rKxigHfDkd81AvEicIEoA==} - engines: {node: '>= 14.0.0'} - '@algolia/client-personalization@5.17.1': resolution: {integrity: sha512-JuNlZe1SdW9KbV0gcgdsiVkFfXt0mmPassdS3cBSGvZGbPB9JsHthD719k5Y6YOY4dGvw1JmC1i9CwCQHAS8hg==} engines: {node: '>= 14.0.0'} - '@algolia/client-query-suggestions@5.15.0': - resolution: {integrity: sha512-wu8GVluiZ5+il8WIRsGKu8VxMK9dAlr225h878GGtpTL6VBvwyJvAyLdZsfFIpY0iN++jiNb31q2C1PlPL+n/A==} - engines: {node: '>= 14.0.0'} - '@algolia/client-query-suggestions@5.17.1': resolution: {integrity: sha512-RBIFIv1QE3IlAikJKWTOpd6pwE4d2dY6t02iXH7r/SLXWn0HzJtsAPPeFg/OKkFvWAXt0H7In2/Mp7a1/Dy2pw==} engines: {node: '>= 14.0.0'} - '@algolia/client-search@5.15.0': - resolution: {integrity: sha512-Z32gEMrRRpEta5UqVQA612sLdoqY3AovvUPClDfMxYrbdDAebmGDVPtSogUba1FZ4pP5dx20D3OV3reogLKsRA==} - engines: {node: '>= 14.0.0'} - '@algolia/client-search@5.17.1': resolution: {integrity: sha512-bd5JBUOP71kPsxwDcvOxqtqXXVo/706NFifZ/O5Rx5GB8ZNVAhg4l7aGoT6jBvEfgmrp2fqPbkdIZ6JnuOpGcw==} engines: {node: '>= 14.0.0'} - '@algolia/ingestion@1.15.0': - resolution: {integrity: sha512-MkqkAxBQxtQ5if/EX2IPqFA7LothghVyvPoRNA/meS2AW2qkHwcxjuiBxv4H6mnAVEPfJlhu9rkdVz9LgCBgJg==} - engines: {node: '>= 14.0.0'} - '@algolia/ingestion@1.17.1': resolution: {integrity: sha512-T18tvePi1rjRYcIKhd82oRukrPWHxG/Iy1qFGaxCplgRm9Im5z96qnYOq75MSKGOUHkFxaBKJOLmtn8xDR+Mcw==} engines: {node: '>= 14.0.0'} - '@algolia/monitoring@1.15.0': - resolution: {integrity: sha512-QPrFnnGLMMdRa8t/4bs7XilPYnoUXDY8PMQJ1sf9ZFwhUysYYhQNX34/enoO0LBjpoOY6rLpha39YQEFbzgKyQ==} - engines: {node: '>= 14.0.0'} - '@algolia/monitoring@1.17.1': resolution: {integrity: sha512-gDtow+AUywTehRP8S1tWKx2IvhcJOxldAoqBxzN3asuQobF7er5n72auBeL++HY4ImEuzMi7PDOA/Iuwxs2IcA==} engines: {node: '>= 14.0.0'} - '@algolia/recommend@5.15.0': - resolution: {integrity: sha512-5eupMwSqMLDObgSMF0XG958zR6GJP3f7jHDQ3/WlzCM9/YIJiWIUoJFGsko9GYsA5xbLDHE/PhWtq4chcCdaGQ==} - engines: {node: '>= 14.0.0'} - '@algolia/recommend@5.17.1': resolution: {integrity: sha512-2992tTHkRe18qmf5SP57N78kN1D3e5t4PO1rt10sJncWtXBZWiNOK6K/UcvWsFbNSGAogFcIcvIMAl5mNp6RWA==} engines: {node: '>= 14.0.0'} - '@algolia/requester-browser-xhr@5.15.0': - resolution: {integrity: sha512-Po/GNib6QKruC3XE+WKP1HwVSfCDaZcXu48kD+gwmtDlqHWKc7Bq9lrS0sNZ456rfCKhXksOmMfUs4wRM/Y96w==} - engines: {node: '>= 14.0.0'} - '@algolia/requester-browser-xhr@5.17.1': resolution: {integrity: sha512-XpKgBfyczVesKgr7DOShNyPPu5kqlboimRRPjdqAw5grSyHhCmb8yoTIKy0TCqBABZeXRPMYT13SMruUVRXvHA==} engines: {node: '>= 14.0.0'} - '@algolia/requester-fetch@5.15.0': - resolution: {integrity: sha512-rOZ+c0P7ajmccAvpeeNrUmEKoliYFL8aOR5qGW5pFq3oj3Iept7Y5mEtEsOBYsRt6qLnaXn4zUKf+N8nvJpcIw==} - engines: {node: '>= 14.0.0'} - '@algolia/requester-fetch@5.17.1': resolution: {integrity: sha512-EhUomH+DZP5vb6DnEjT0GvXaXBSwzZnuU6hPGNU1EYKRXDouRjII/bIWpVjt7ycMgL2D2oQruqDh6rAWUhQwRw==} engines: {node: '>= 14.0.0'} - '@algolia/requester-node-http@5.15.0': - resolution: {integrity: sha512-b1jTpbFf9LnQHEJP5ddDJKE2sAlhYd7EVSOWgzo/27n/SfCoHfqD0VWntnWYD83PnOKvfe8auZ2+xCb0TXotrQ==} - engines: {node: '>= 14.0.0'} - '@algolia/requester-node-http@5.17.1': resolution: {integrity: sha512-PSnENJtl4/wBWXlGyOODbLYm6lSiFqrtww7UpQRCJdsHXlJKF8XAP6AME8NxvbE0Qo/RJUxK0mvyEh9sQcx6bg==} engines: {node: '>= 14.0.0'} @@ -16486,15 +16434,15 @@ packages: resolution: {integrity: sha512-4JINx4Rttha29f50PBsJo48xZXx/He5yaIWJRwVarhYAN947+S84YciHl+AIhQNRPAFkg8+5qFngEGtKxQDWXA==} engines: {node: '>=18.18.0'} - '@docsearch/css@3.8.0': - resolution: {integrity: sha512-pieeipSOW4sQ0+bE5UFC51AOZp9NGxg89wAlZ1BAQFaiRAGK1IKUaPQ0UGZeNctJXyqZ1UvBtOQh2HH+U5GtmA==} + '@docsearch/css@3.9.0': + resolution: {integrity: sha512-cQbnVbq0rrBwNAKegIac/t6a8nWoUAn8frnkLFW6YARaRmAQr5/Eoe6Ln2fqkUCZ40KpdrKbpSAmgrkviOxuWA==} - '@docsearch/react@3.8.0': - resolution: {integrity: sha512-WnFK720+iwTVt94CxY3u+FgX6exb3BfN5kE9xUY6uuAH/9W/UFboBZFLlrw/zxFRHoHZCOXRtOylsXF+6LHI+Q==} + '@docsearch/react@3.9.0': + resolution: {integrity: sha512-mb5FOZYZIkRQ6s/NWnM98k879vu5pscWqTLubLFBO87igYYT4VzVazh4h5o/zCvTIZgEt3PvsCOMOswOUo9yHQ==} peerDependencies: - '@types/react': '>= 16.8.0 < 19.0.0' - react: '>= 16.8.0 < 19.0.0' - react-dom: '>= 16.8.0 < 19.0.0' + '@types/react': '>= 16.8.0 < 20.0.0' + react: '>= 16.8.0 < 20.0.0' + react-dom: '>= 16.8.0 < 20.0.0' search-insights: '>= 1 < 3' peerDependenciesMeta: '@types/react': @@ -20237,10 +20185,6 @@ packages: ajv@8.17.1: resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} - algoliasearch@5.15.0: - resolution: {integrity: sha512-Yf3Swz1s63hjvBVZ/9f2P1Uu48GjmjCN+Esxb6MAONMGtZB1fRX8/S1AhUTtsuTlcGovbYLxpHgc7wEzstDZBw==} - engines: {node: '>= 14.0.0'} - algoliasearch@5.17.1: resolution: {integrity: sha512-3CcbT5yTWJDIcBe9ZHgsPi184SkT1kyZi3GWlQU5EFgvq1V73X2sqHRkPCQMe0RA/uvZbB+1sFeAk73eWygeLg==} engines: {node: '>= 14.0.0'} @@ -25730,6 +25674,12 @@ packages: resolution: {integrity: sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==} engines: {node: '>=14.16'} + notion-to-md@4.0.0-alpha.4: + resolution: {integrity: sha512-MxK71vIj0l8jCDbzTAROp/2pXI8f2bhjJINuUk/uIlGKs2XPJCzYKFu+4ELvSG+DiNvmGWxdr+Dtba47fnULTg==} + engines: {node: '>=12'} + peerDependencies: + '@notionhq/client': ^2.0.0 + npm-normalize-package-bin@1.0.1: resolution: {integrity: sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==} @@ -29125,40 +29075,33 @@ snapshots: transitivePeerDependencies: - supports-color - '@algolia/autocomplete-core@1.17.7(@algolia/client-search@5.17.1)(algoliasearch@5.15.0)(search-insights@2.17.3)': + '@algolia/autocomplete-core@1.17.9(@algolia/client-search@5.17.1)(algoliasearch@5.17.1)(search-insights@2.17.3)': dependencies: - '@algolia/autocomplete-plugin-algolia-insights': 1.17.7(@algolia/client-search@5.17.1)(algoliasearch@5.15.0)(search-insights@2.17.3) - '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.17.1)(algoliasearch@5.15.0) + '@algolia/autocomplete-plugin-algolia-insights': 1.17.9(@algolia/client-search@5.17.1)(algoliasearch@5.17.1)(search-insights@2.17.3) + '@algolia/autocomplete-shared': 1.17.9(@algolia/client-search@5.17.1)(algoliasearch@5.17.1) transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - search-insights - '@algolia/autocomplete-plugin-algolia-insights@1.17.7(@algolia/client-search@5.17.1)(algoliasearch@5.15.0)(search-insights@2.17.3)': + '@algolia/autocomplete-plugin-algolia-insights@1.17.9(@algolia/client-search@5.17.1)(algoliasearch@5.17.1)(search-insights@2.17.3)': dependencies: - '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.17.1)(algoliasearch@5.15.0) + '@algolia/autocomplete-shared': 1.17.9(@algolia/client-search@5.17.1)(algoliasearch@5.17.1) search-insights: 2.17.3 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - '@algolia/autocomplete-preset-algolia@1.17.7(@algolia/client-search@5.17.1)(algoliasearch@5.15.0)': + '@algolia/autocomplete-preset-algolia@1.17.9(@algolia/client-search@5.17.1)(algoliasearch@5.17.1)': dependencies: - '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.17.1)(algoliasearch@5.15.0) + '@algolia/autocomplete-shared': 1.17.9(@algolia/client-search@5.17.1)(algoliasearch@5.17.1) '@algolia/client-search': 5.17.1 - algoliasearch: 5.15.0 + algoliasearch: 5.17.1 - '@algolia/autocomplete-shared@1.17.7(@algolia/client-search@5.17.1)(algoliasearch@5.15.0)': + '@algolia/autocomplete-shared@1.17.9(@algolia/client-search@5.17.1)(algoliasearch@5.17.1)': dependencies: '@algolia/client-search': 5.17.1 - algoliasearch: 5.15.0 - - '@algolia/client-abtesting@5.15.0': - dependencies: - '@algolia/client-common': 5.15.0 - '@algolia/requester-browser-xhr': 5.15.0 - '@algolia/requester-fetch': 5.15.0 - '@algolia/requester-node-http': 5.15.0 + algoliasearch: 5.17.1 '@algolia/client-abtesting@5.17.1': dependencies: @@ -29167,13 +29110,6 @@ snapshots: '@algolia/requester-fetch': 5.17.1 '@algolia/requester-node-http': 5.17.1 - '@algolia/client-analytics@5.15.0': - dependencies: - '@algolia/client-common': 5.15.0 - '@algolia/requester-browser-xhr': 5.15.0 - '@algolia/requester-fetch': 5.15.0 - '@algolia/requester-node-http': 5.15.0 - '@algolia/client-analytics@5.17.1': dependencies: '@algolia/client-common': 5.17.1 @@ -29181,17 +29117,8 @@ snapshots: '@algolia/requester-fetch': 5.17.1 '@algolia/requester-node-http': 5.17.1 - '@algolia/client-common@5.15.0': {} - '@algolia/client-common@5.17.1': {} - '@algolia/client-insights@5.15.0': - dependencies: - '@algolia/client-common': 5.15.0 - '@algolia/requester-browser-xhr': 5.15.0 - '@algolia/requester-fetch': 5.15.0 - '@algolia/requester-node-http': 5.15.0 - '@algolia/client-insights@5.17.1': dependencies: '@algolia/client-common': 5.17.1 @@ -29199,13 +29126,6 @@ snapshots: '@algolia/requester-fetch': 5.17.1 '@algolia/requester-node-http': 5.17.1 - '@algolia/client-personalization@5.15.0': - dependencies: - '@algolia/client-common': 5.15.0 - '@algolia/requester-browser-xhr': 5.15.0 - '@algolia/requester-fetch': 5.15.0 - '@algolia/requester-node-http': 5.15.0 - '@algolia/client-personalization@5.17.1': dependencies: '@algolia/client-common': 5.17.1 @@ -29213,13 +29133,6 @@ snapshots: '@algolia/requester-fetch': 5.17.1 '@algolia/requester-node-http': 5.17.1 - '@algolia/client-query-suggestions@5.15.0': - dependencies: - '@algolia/client-common': 5.15.0 - '@algolia/requester-browser-xhr': 5.15.0 - '@algolia/requester-fetch': 5.15.0 - '@algolia/requester-node-http': 5.15.0 - '@algolia/client-query-suggestions@5.17.1': dependencies: '@algolia/client-common': 5.17.1 @@ -29227,13 +29140,6 @@ snapshots: '@algolia/requester-fetch': 5.17.1 '@algolia/requester-node-http': 5.17.1 - '@algolia/client-search@5.15.0': - dependencies: - '@algolia/client-common': 5.15.0 - '@algolia/requester-browser-xhr': 5.15.0 - '@algolia/requester-fetch': 5.15.0 - '@algolia/requester-node-http': 5.15.0 - '@algolia/client-search@5.17.1': dependencies: '@algolia/client-common': 5.17.1 @@ -29241,13 +29147,6 @@ snapshots: '@algolia/requester-fetch': 5.17.1 '@algolia/requester-node-http': 5.17.1 - '@algolia/ingestion@1.15.0': - dependencies: - '@algolia/client-common': 5.15.0 - '@algolia/requester-browser-xhr': 5.15.0 - '@algolia/requester-fetch': 5.15.0 - '@algolia/requester-node-http': 5.15.0 - '@algolia/ingestion@1.17.1': dependencies: '@algolia/client-common': 5.17.1 @@ -29255,13 +29154,6 @@ snapshots: '@algolia/requester-fetch': 5.17.1 '@algolia/requester-node-http': 5.17.1 - '@algolia/monitoring@1.15.0': - dependencies: - '@algolia/client-common': 5.15.0 - '@algolia/requester-browser-xhr': 5.15.0 - '@algolia/requester-fetch': 5.15.0 - '@algolia/requester-node-http': 5.15.0 - '@algolia/monitoring@1.17.1': dependencies: '@algolia/client-common': 5.17.1 @@ -29269,13 +29161,6 @@ snapshots: '@algolia/requester-fetch': 5.17.1 '@algolia/requester-node-http': 5.17.1 - '@algolia/recommend@5.15.0': - dependencies: - '@algolia/client-common': 5.15.0 - '@algolia/requester-browser-xhr': 5.15.0 - '@algolia/requester-fetch': 5.15.0 - '@algolia/requester-node-http': 5.15.0 - '@algolia/recommend@5.17.1': dependencies: '@algolia/client-common': 5.17.1 @@ -29283,26 +29168,14 @@ snapshots: '@algolia/requester-fetch': 5.17.1 '@algolia/requester-node-http': 5.17.1 - '@algolia/requester-browser-xhr@5.15.0': - dependencies: - '@algolia/client-common': 5.15.0 - '@algolia/requester-browser-xhr@5.17.1': dependencies: '@algolia/client-common': 5.17.1 - '@algolia/requester-fetch@5.15.0': - dependencies: - '@algolia/client-common': 5.15.0 - '@algolia/requester-fetch@5.17.1': dependencies: '@algolia/client-common': 5.17.1 - '@algolia/requester-node-http@5.15.0': - dependencies: - '@algolia/client-common': 5.15.0 - '@algolia/requester-node-http@5.17.1': dependencies: '@algolia/client-common': 5.17.1 @@ -32236,14 +32109,14 @@ snapshots: tar-stream: 3.1.7 which: 4.0.0 - '@docsearch/css@3.8.0': {} + '@docsearch/css@3.9.0': {} - '@docsearch/react@3.8.0(@algolia/client-search@5.17.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.17.3)': + '@docsearch/react@3.9.0(@algolia/client-search@5.17.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.17.3)': dependencies: - '@algolia/autocomplete-core': 1.17.7(@algolia/client-search@5.17.1)(algoliasearch@5.15.0)(search-insights@2.17.3) - '@algolia/autocomplete-preset-algolia': 1.17.7(@algolia/client-search@5.17.1)(algoliasearch@5.15.0) - '@docsearch/css': 3.8.0 - algoliasearch: 5.15.0 + '@algolia/autocomplete-core': 1.17.9(@algolia/client-search@5.17.1)(algoliasearch@5.17.1)(search-insights@2.17.3) + '@algolia/autocomplete-preset-algolia': 1.17.9(@algolia/client-search@5.17.1)(algoliasearch@5.17.1) + '@docsearch/css': 3.9.0 + algoliasearch: 5.17.1 optionalDependencies: '@types/react': 18.3.12 react: 18.3.1 @@ -36845,22 +36718,6 @@ snapshots: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 - algoliasearch@5.15.0: - dependencies: - '@algolia/client-abtesting': 5.15.0 - '@algolia/client-analytics': 5.15.0 - '@algolia/client-common': 5.15.0 - '@algolia/client-insights': 5.15.0 - '@algolia/client-personalization': 5.15.0 - '@algolia/client-query-suggestions': 5.15.0 - '@algolia/client-search': 5.15.0 - '@algolia/ingestion': 1.15.0 - '@algolia/monitoring': 1.15.0 - '@algolia/recommend': 5.15.0 - '@algolia/requester-browser-xhr': 5.15.0 - '@algolia/requester-fetch': 5.15.0 - '@algolia/requester-node-http': 5.15.0 - algoliasearch@5.17.1: dependencies: '@algolia/client-abtesting': 5.17.1 @@ -44096,6 +43953,14 @@ snapshots: normalize-url@8.0.1: {} + notion-to-md@4.0.0-alpha.4(@notionhq/client@2.2.15): + dependencies: + '@notionhq/client': 2.2.15 + mime: 3.0.0 + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + npm-normalize-package-bin@1.0.1: {} npm-package-arg@8.1.5: From b139cb6efaec7c5db8746ded88be28575802f731 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Mon, 7 Apr 2025 19:45:19 -0300 Subject: [PATCH 2/3] Adding markdown page retrieval --- .../actions/retrieve-block/retrieve-block.mjs | 14 +++++++++++++- components/notion/notion.app.mjs | 16 ++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/components/notion/actions/retrieve-block/retrieve-block.mjs b/components/notion/actions/retrieve-block/retrieve-block.mjs index e164cf9f148cd..d314f4bae61ab 100644 --- a/components/notion/actions/retrieve-block/retrieve-block.mjs +++ b/components/notion/actions/retrieve-block/retrieve-block.mjs @@ -4,7 +4,7 @@ export default { key: "notion-retrieve-block", name: "Retrieve Block", description: "Get details of a block, which can be text, lists, media, a page, among others. [See the documentation](https://developers.notion.com/reference/retrieve-a-block)", - version: "0.0.6", + version: "0.1.0", type: "action", props: { notion, @@ -23,8 +23,20 @@ export default { optional: true, default: false, }, + retrieveMarkdown: { + type: "boolean", + label: "Retrieve as Markdown", + description: "Return the page content as markdown instead of block objects.", + optional: true, + }, }, async run({ $ }) { + if (this.retrieveMarkdown) { + const response = await this.notion.getPageAsMarkdown(this.blockId); + $.export("$summary", "Successfully retrieved page as markdown"); + return response; + } + const block = await this.notion.retrieveBlock(this.blockId); if (this.retrieveChildren) { block.children = await this.notion.retrieveBlockChildren(block); diff --git a/components/notion/notion.app.mjs b/components/notion/notion.app.mjs index 33bcf900dc73e..cf29d4474b88e 100644 --- a/components/notion/notion.app.mjs +++ b/components/notion/notion.app.mjs @@ -1,6 +1,8 @@ import notion from "@notionhq/client"; import NOTION_META from "./common/notion-meta-selection.mjs"; import { ConfigurationError } from "@pipedream/platform"; +import { NotionConverter } from "notion-to-md"; +import { DefaultExporter } from "notion-to-md/plugins/exporter"; export default { type: "app", @@ -355,5 +357,19 @@ export default { return response.results; }, + async getPageAsMarkdown(pageId) { + const client = this._getNotionClient(); + + const buffer = {}; + const exporter = new DefaultExporter({ + outputType: "buffer", + buffer, + }); + + const n2m = new NotionConverter(client).withExporter(exporter); + await n2m.convert(pageId); + + return Object.values(buffer)[0]; + }, }, }; From c0a9df2d2c47ab8dd7315abbc1f57abcb2843593 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Mon, 7 Apr 2025 20:25:36 -0300 Subject: [PATCH 3/3] Description and clarity updates --- .../notion/actions/retrieve-block/retrieve-block.mjs | 10 ++++------ .../notion/actions/retrieve-page/retrieve-page.mjs | 9 +++++++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/components/notion/actions/retrieve-block/retrieve-block.mjs b/components/notion/actions/retrieve-block/retrieve-block.mjs index d314f4bae61ab..c5b97a176186e 100644 --- a/components/notion/actions/retrieve-block/retrieve-block.mjs +++ b/components/notion/actions/retrieve-block/retrieve-block.mjs @@ -2,8 +2,8 @@ import notion from "../../notion.app.mjs"; export default { key: "notion-retrieve-block", - name: "Retrieve Block", - description: "Get details of a block, which can be text, lists, media, a page, among others. [See the documentation](https://developers.notion.com/reference/retrieve-a-block)", + name: "Retrieve Page Content", + description: "Get page content as block objects or markdown. Blocks can be text, lists, media, a page, among others. [See the documentation](https://developers.notion.com/reference/retrieve-a-block)", version: "0.1.0", type: "action", props: { @@ -13,13 +13,11 @@ export default { notion, "pageId", ], - label: "Block ID", - description: "Select a block or provide a block ID", }, retrieveChildren: { type: "boolean", - label: "Retrieve Children", - description: "Retrieve all the children (recursively) for the specified block. [See the documentation](https://developers.notion.com/reference/get-block-children) for more information", + label: "Retrieve Content (Child Blocks)", + description: "Retrieve all the children (recursively) for the specified page. [See the documentation](https://developers.notion.com/reference/get-block-children) for more information", optional: true, default: false, }, diff --git a/components/notion/actions/retrieve-page/retrieve-page.mjs b/components/notion/actions/retrieve-page/retrieve-page.mjs index 9b8015919d50e..fff82edfa8f3f 100644 --- a/components/notion/actions/retrieve-page/retrieve-page.mjs +++ b/components/notion/actions/retrieve-page/retrieve-page.mjs @@ -2,12 +2,17 @@ import notion from "../../notion.app.mjs"; export default { key: "notion-retrieve-page", - name: "Retrieve Page", + name: "Retrieve Page Metadata", description: "Get details of a page. [See the documentation](https://developers.notion.com/reference/retrieve-a-page)", - version: "0.0.6", + version: "0.0.7", type: "action", props: { notion, + infoLabel: { + type: "alert", + alertType: "info", + content: "If you need to retrieve page content or block objects, use the **Retrieve Page Content** action instead.", + }, pageId: { propDefinition: [ notion,