@rnsk/toolkits 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/scope.d.ts +4 -0
- package/dist/core/scope.js +12 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +15 -2
- package/dist/runtime/meta-tools.js +2 -0
- package/dist/toolkits/github/icon.d.ts +5 -0
- package/dist/toolkits/github/icon.js +15 -0
- package/dist/toolkits/github/manifest.d.ts +3 -0
- package/dist/toolkits/github/manifest.js +36 -0
- package/dist/toolkits/github/tools/Actions/delete-artifact.d.ts +13 -0
- package/dist/toolkits/github/tools/Actions/delete-artifact.js +31 -0
- package/dist/toolkits/github/tools/Actions/get-artifact.d.ts +31 -0
- package/dist/toolkits/github/tools/Actions/get-artifact.js +39 -0
- package/dist/toolkits/github/tools/Actions/get-workflow-job.d.ts +36 -0
- package/dist/toolkits/github/tools/Actions/get-workflow-job.js +48 -0
- package/dist/toolkits/github/tools/Actions/list-artifacts.d.ts +23 -0
- package/dist/toolkits/github/tools/Actions/list-artifacts.js +43 -0
- package/dist/toolkits/github/tools/Actions/list-workflow-jobs.d.ts +27 -0
- package/dist/toolkits/github/tools/Actions/list-workflow-jobs.js +49 -0
- package/dist/toolkits/github/tools/Actions/list-workflow-run-artifacts.d.ts +24 -0
- package/dist/toolkits/github/tools/Actions/list-workflow-run-artifacts.js +45 -0
- package/dist/toolkits/github/tools/Activity/list-notifications.d.ts +24 -0
- package/dist/toolkits/github/tools/Activity/list-notifications.js +45 -0
- package/dist/toolkits/github/tools/Activity/list-public-events.d.ts +18 -0
- package/dist/toolkits/github/tools/Activity/list-public-events.js +37 -0
- package/dist/toolkits/github/tools/Activity/list-repo-events.d.ts +19 -0
- package/dist/toolkits/github/tools/Activity/list-repo-events.js +40 -0
- package/dist/toolkits/github/tools/Activity/list-user-events.d.ts +17 -0
- package/dist/toolkits/github/tools/Activity/list-user-events.js +37 -0
- package/dist/toolkits/github/tools/Activity/mark-notifications-read.d.ts +11 -0
- package/dist/toolkits/github/tools/Activity/mark-notifications-read.js +27 -0
- package/dist/toolkits/github/tools/Apps/get-authenticated-app.d.ts +24 -0
- package/dist/toolkits/github/tools/Apps/get-authenticated-app.js +36 -0
- package/dist/toolkits/github/tools/Apps/get-installation.d.ts +76 -0
- package/dist/toolkits/github/tools/Apps/get-installation.js +36 -0
- package/dist/toolkits/github/tools/Apps/list-installations.d.ts +19 -0
- package/dist/toolkits/github/tools/Apps/list-installations.js +38 -0
- package/dist/toolkits/github/tools/Checks/create-check-run.d.ts +24 -0
- package/dist/toolkits/github/tools/Checks/create-check-run.js +43 -0
- package/dist/toolkits/github/tools/Checks/create-check-suite.d.ts +21 -0
- package/dist/toolkits/github/tools/Checks/create-check-suite.js +37 -0
- package/dist/toolkits/github/tools/Checks/get-check-run.d.ts +25 -0
- package/dist/toolkits/github/tools/Checks/get-check-run.js +39 -0
- package/dist/toolkits/github/tools/Checks/get-check-suite.d.ts +25 -0
- package/dist/toolkits/github/tools/Checks/get-check-suite.js +39 -0
- package/dist/toolkits/github/tools/Checks/list-check-runs.d.ts +27 -0
- package/dist/toolkits/github/tools/Checks/list-check-runs.js +50 -0
- package/dist/toolkits/github/tools/Checks/update-check-run.d.ts +23 -0
- package/dist/toolkits/github/tools/Checks/update-check-run.js +41 -0
- package/dist/toolkits/github/tools/CodeScanning/get-alert.d.ts +25 -0
- package/dist/toolkits/github/tools/CodeScanning/get-alert.js +41 -0
- package/dist/toolkits/github/tools/CodeScanning/list-alerts.d.ts +23 -0
- package/dist/toolkits/github/tools/CodeScanning/list-alerts.js +50 -0
- package/dist/toolkits/github/tools/CodeScanning/update-alert.d.ts +19 -0
- package/dist/toolkits/github/tools/CodeScanning/update-alert.js +39 -0
- package/dist/toolkits/github/tools/Collaborators/add-collaborator.d.ts +14 -0
- package/dist/toolkits/github/tools/Collaborators/add-collaborator.js +33 -0
- package/dist/toolkits/github/tools/Collaborators/check-collaborator.d.ts +13 -0
- package/dist/toolkits/github/tools/Collaborators/check-collaborator.js +34 -0
- package/dist/toolkits/github/tools/Collaborators/list-collaborators.d.ts +25 -0
- package/dist/toolkits/github/tools/Collaborators/list-collaborators.js +41 -0
- package/dist/toolkits/github/tools/Collaborators/remove-collaborator.d.ts +13 -0
- package/dist/toolkits/github/tools/Collaborators/remove-collaborator.js +31 -0
- package/dist/toolkits/github/tools/Commits/compare-commits.d.ts +30 -0
- package/dist/toolkits/github/tools/Commits/compare-commits.js +37 -0
- package/dist/toolkits/github/tools/Commits/get-commit.d.ts +46 -0
- package/dist/toolkits/github/tools/Commits/get-commit.js +35 -0
- package/dist/toolkits/github/tools/Commits/list-branches-for-head-commit.d.ts +20 -0
- package/dist/toolkits/github/tools/Commits/list-branches-for-head-commit.js +31 -0
- package/dist/toolkits/github/tools/Commits/list-commits.d.ts +21 -0
- package/dist/toolkits/github/tools/Commits/list-commits.js +43 -0
- package/dist/toolkits/github/tools/Commits/list-pull-requests-associated-with-commit.d.ts +81 -0
- package/dist/toolkits/github/tools/Commits/list-pull-requests-associated-with-commit.js +35 -0
- package/dist/toolkits/github/tools/Dependabot/get-alert.d.ts +53 -0
- package/dist/toolkits/github/tools/Dependabot/get-alert.js +37 -0
- package/dist/toolkits/github/tools/Dependabot/list-alerts.d.ts +23 -0
- package/dist/toolkits/github/tools/Dependabot/list-alerts.js +46 -0
- package/dist/toolkits/github/tools/Dependabot/update-alert.d.ts +19 -0
- package/dist/toolkits/github/tools/Dependabot/update-alert.js +39 -0
- package/dist/toolkits/github/tools/DeployKeys/create-deploy-key.d.ts +23 -0
- package/dist/toolkits/github/tools/DeployKeys/create-deploy-key.js +43 -0
- package/dist/toolkits/github/tools/DeployKeys/delete-deploy-key.d.ts +13 -0
- package/dist/toolkits/github/tools/DeployKeys/delete-deploy-key.js +31 -0
- package/dist/toolkits/github/tools/DeployKeys/get-deploy-key.d.ts +21 -0
- package/dist/toolkits/github/tools/DeployKeys/get-deploy-key.js +39 -0
- package/dist/toolkits/github/tools/DeployKeys/list-deploy-keys.d.ts +21 -0
- package/dist/toolkits/github/tools/DeployKeys/list-deploy-keys.js +44 -0
- package/dist/toolkits/github/tools/Deployments/create-deployment.d.ts +33 -0
- package/dist/toolkits/github/tools/Deployments/create-deployment.js +51 -0
- package/dist/toolkits/github/tools/Deployments/delete-deployment.d.ts +13 -0
- package/dist/toolkits/github/tools/Deployments/delete-deployment.js +31 -0
- package/dist/toolkits/github/tools/Deployments/get-deployment.d.ts +27 -0
- package/dist/toolkits/github/tools/Deployments/get-deployment.js +42 -0
- package/dist/toolkits/github/tools/Deployments/list-deployments.d.ts +27 -0
- package/dist/toolkits/github/tools/Deployments/list-deployments.js +52 -0
- package/dist/toolkits/github/tools/Environments/create-or-update-environment.d.ts +32 -0
- package/dist/toolkits/github/tools/Environments/create-or-update-environment.js +50 -0
- package/dist/toolkits/github/tools/Environments/delete-environment.d.ts +13 -0
- package/dist/toolkits/github/tools/Environments/delete-environment.js +31 -0
- package/dist/toolkits/github/tools/Environments/get-environment.d.ts +48 -0
- package/dist/toolkits/github/tools/Environments/get-environment.js +42 -0
- package/dist/toolkits/github/tools/Environments/list-environments.d.ts +23 -0
- package/dist/toolkits/github/tools/Environments/list-environments.js +45 -0
- package/dist/toolkits/github/tools/Files/create-or-update-file.d.ts +21 -0
- package/dist/toolkits/github/tools/Files/create-or-update-file.js +44 -0
- package/dist/toolkits/github/tools/Files/delete-file.d.ts +18 -0
- package/dist/toolkits/github/tools/Files/delete-file.js +40 -0
- package/dist/toolkits/github/tools/Files/get-file-content.d.ts +32 -0
- package/dist/toolkits/github/tools/Files/get-file-content.js +51 -0
- package/dist/toolkits/github/tools/Gists/create-gist.d.ts +19 -0
- package/dist/toolkits/github/tools/Gists/create-gist.js +37 -0
- package/dist/toolkits/github/tools/Gists/get-gist.d.ts +23 -0
- package/dist/toolkits/github/tools/Gists/get-gist.js +43 -0
- package/dist/toolkits/github/tools/Gists/list-gists.d.ts +19 -0
- package/dist/toolkits/github/tools/Gists/list-gists.js +38 -0
- package/dist/toolkits/github/tools/Git/create-blob.d.ts +16 -0
- package/dist/toolkits/github/tools/Git/create-blob.js +38 -0
- package/dist/toolkits/github/tools/Git/create-git-commit.d.ts +47 -0
- package/dist/toolkits/github/tools/Git/create-git-commit.js +51 -0
- package/dist/toolkits/github/tools/Git/create-ref.d.ts +24 -0
- package/dist/toolkits/github/tools/Git/create-ref.js +40 -0
- package/dist/toolkits/github/tools/Git/create-tree.d.ts +31 -0
- package/dist/toolkits/github/tools/Git/create-tree.js +52 -0
- package/dist/toolkits/github/tools/Git/delete-ref.d.ts +13 -0
- package/dist/toolkits/github/tools/Git/delete-ref.js +31 -0
- package/dist/toolkits/github/tools/Git/get-blob.d.ts +21 -0
- package/dist/toolkits/github/tools/Git/get-blob.js +39 -0
- package/dist/toolkits/github/tools/Git/get-git-commit.d.ts +40 -0
- package/dist/toolkits/github/tools/Git/get-git-commit.js +41 -0
- package/dist/toolkits/github/tools/Git/get-ref.d.ts +18 -0
- package/dist/toolkits/github/tools/Git/get-ref.js +42 -0
- package/dist/toolkits/github/tools/Git/get-tree.d.ts +27 -0
- package/dist/toolkits/github/tools/Git/get-tree.js +47 -0
- package/dist/toolkits/github/tools/Git/update-ref.d.ts +25 -0
- package/dist/toolkits/github/tools/Git/update-ref.js +42 -0
- package/dist/toolkits/github/tools/Issues/add-issue-assignees.d.ts +14 -0
- package/dist/toolkits/github/tools/Issues/add-issue-assignees.js +35 -0
- package/dist/toolkits/github/tools/Issues/add-issue-comment.d.ts +20 -0
- package/dist/toolkits/github/tools/Issues/add-issue-comment.js +38 -0
- package/dist/toolkits/github/tools/Issues/add-issue-labels.d.ts +14 -0
- package/dist/toolkits/github/tools/Issues/add-issue-labels.js +35 -0
- package/dist/toolkits/github/tools/Issues/create-issue.d.ts +22 -0
- package/dist/toolkits/github/tools/Issues/create-issue.js +34 -0
- package/dist/toolkits/github/tools/Issues/get-issue.d.ts +29 -0
- package/dist/toolkits/github/tools/Issues/get-issue.js +36 -0
- package/dist/toolkits/github/tools/Issues/list-authenticated-user-issues.d.ts +21 -0
- package/dist/toolkits/github/tools/Issues/list-authenticated-user-issues.js +34 -0
- package/dist/toolkits/github/tools/Issues/list-issue-comments.d.ts +19 -0
- package/dist/toolkits/github/tools/Issues/list-issue-comments.js +40 -0
- package/dist/toolkits/github/tools/Issues/list-org-issues.d.ts +22 -0
- package/dist/toolkits/github/tools/Issues/list-org-issues.js +38 -0
- package/dist/toolkits/github/tools/Issues/list-repo-issues.d.ts +28 -0
- package/dist/toolkits/github/tools/Issues/list-repo-issues.js +42 -0
- package/dist/toolkits/github/tools/Issues/list-user-account-issues.d.ts +21 -0
- package/dist/toolkits/github/tools/Issues/list-user-account-issues.js +36 -0
- package/dist/toolkits/github/tools/Issues/lock-issue.d.ts +15 -0
- package/dist/toolkits/github/tools/Issues/lock-issue.js +44 -0
- package/dist/toolkits/github/tools/Issues/remove-issue-label.d.ts +14 -0
- package/dist/toolkits/github/tools/Issues/remove-issue-label.js +33 -0
- package/dist/toolkits/github/tools/Issues/unlock-issue.d.ts +13 -0
- package/dist/toolkits/github/tools/Issues/unlock-issue.js +31 -0
- package/dist/toolkits/github/tools/Issues/update-issue.d.ts +22 -0
- package/dist/toolkits/github/tools/Issues/update-issue.js +42 -0
- package/dist/toolkits/github/tools/Licenses/get-license.d.ts +33 -0
- package/dist/toolkits/github/tools/Licenses/get-license.js +42 -0
- package/dist/toolkits/github/tools/Licenses/get-repo-license.d.ts +47 -0
- package/dist/toolkits/github/tools/Licenses/get-repo-license.js +45 -0
- package/dist/toolkits/github/tools/Licenses/list-licenses.d.ts +12 -0
- package/dist/toolkits/github/tools/Licenses/list-licenses.js +32 -0
- package/dist/toolkits/github/tools/Markdown/render-markdown.d.ts +13 -0
- package/dist/toolkits/github/tools/Markdown/render-markdown.js +31 -0
- package/dist/toolkits/github/tools/Organizations/get-org-membership.d.ts +58 -0
- package/dist/toolkits/github/tools/Organizations/get-org-membership.js +38 -0
- package/dist/toolkits/github/tools/Organizations/get-organization.d.ts +65 -0
- package/dist/toolkits/github/tools/Organizations/get-organization.js +58 -0
- package/dist/toolkits/github/tools/Organizations/list-org-members.d.ts +18 -0
- package/dist/toolkits/github/tools/Organizations/list-org-members.js +44 -0
- package/dist/toolkits/github/tools/Organizations/list-org-repositories.d.ts +50 -0
- package/dist/toolkits/github/tools/Organizations/list-org-repositories.js +69 -0
- package/dist/toolkits/github/tools/Organizations/list-organizations.d.ts +13 -0
- package/dist/toolkits/github/tools/Organizations/list-organizations.js +36 -0
- package/dist/toolkits/github/tools/Organizations/list-user-organizations.d.ts +20 -0
- package/dist/toolkits/github/tools/Organizations/list-user-organizations.js +43 -0
- package/dist/toolkits/github/tools/Organizations/update-organization.d.ts +33 -0
- package/dist/toolkits/github/tools/Organizations/update-organization.js +50 -0
- package/dist/toolkits/github/tools/PRs/check-pull-request-merged.d.ts +13 -0
- package/dist/toolkits/github/tools/PRs/check-pull-request-merged.js +34 -0
- package/dist/toolkits/github/tools/PRs/create-pull-request-review.d.ts +19 -0
- package/dist/toolkits/github/tools/PRs/create-pull-request-review.js +39 -0
- package/dist/toolkits/github/tools/PRs/create-pull-request.d.ts +23 -0
- package/dist/toolkits/github/tools/PRs/create-pull-request.js +44 -0
- package/dist/toolkits/github/tools/PRs/get-pull-request.d.ts +41 -0
- package/dist/toolkits/github/tools/PRs/get-pull-request.js +47 -0
- package/dist/toolkits/github/tools/PRs/list-pull-request-commits.d.ts +15 -0
- package/dist/toolkits/github/tools/PRs/list-pull-request-commits.js +37 -0
- package/dist/toolkits/github/tools/PRs/list-pull-request-files.d.ts +22 -0
- package/dist/toolkits/github/tools/PRs/list-pull-request-files.js +42 -0
- package/dist/toolkits/github/tools/PRs/list-pull-requests.d.ts +24 -0
- package/dist/toolkits/github/tools/PRs/list-pull-requests.js +44 -0
- package/dist/toolkits/github/tools/PRs/merge-pull-request.d.ts +20 -0
- package/dist/toolkits/github/tools/PRs/merge-pull-request.js +41 -0
- package/dist/toolkits/github/tools/PRs/update-pull-request-branch.d.ts +16 -0
- package/dist/toolkits/github/tools/PRs/update-pull-request-branch.js +36 -0
- package/dist/toolkits/github/tools/PRs/update-pull-request.d.ts +26 -0
- package/dist/toolkits/github/tools/PRs/update-pull-request.js +47 -0
- package/dist/toolkits/github/tools/Projects/create-org-project.d.ts +27 -0
- package/dist/toolkits/github/tools/Projects/create-org-project.js +43 -0
- package/dist/toolkits/github/tools/Projects/delete-project.d.ts +11 -0
- package/dist/toolkits/github/tools/Projects/delete-project.js +27 -0
- package/dist/toolkits/github/tools/Projects/get-project.d.ts +31 -0
- package/dist/toolkits/github/tools/Projects/get-project.js +42 -0
- package/dist/toolkits/github/tools/Projects/list-org-projects.d.ts +20 -0
- package/dist/toolkits/github/tools/Projects/list-org-projects.js +45 -0
- package/dist/toolkits/github/tools/Projects/list-project-columns.d.ts +16 -0
- package/dist/toolkits/github/tools/Projects/list-project-columns.js +40 -0
- package/dist/toolkits/github/tools/Projects/list-repo-projects.d.ts +21 -0
- package/dist/toolkits/github/tools/Projects/list-repo-projects.js +47 -0
- package/dist/toolkits/github/tools/Projects/update-project.d.ts +22 -0
- package/dist/toolkits/github/tools/Projects/update-project.js +41 -0
- package/dist/toolkits/github/tools/RateLimit/get-rate-limit.d.ts +19 -0
- package/dist/toolkits/github/tools/RateLimit/get-rate-limit.js +26 -0
- package/dist/toolkits/github/tools/Reactions/create-commit-comment-reaction.d.ts +20 -0
- package/dist/toolkits/github/tools/Reactions/create-commit-comment-reaction.js +40 -0
- package/dist/toolkits/github/tools/Reactions/create-issue-reaction.d.ts +20 -0
- package/dist/toolkits/github/tools/Reactions/create-issue-reaction.js +40 -0
- package/dist/toolkits/github/tools/Reactions/delete-reaction.d.ts +11 -0
- package/dist/toolkits/github/tools/Reactions/delete-reaction.js +27 -0
- package/dist/toolkits/github/tools/Reactions/list-commit-comment-reactions.d.ts +17 -0
- package/dist/toolkits/github/tools/Reactions/list-commit-comment-reactions.js +44 -0
- package/dist/toolkits/github/tools/Reactions/list-issue-reactions.d.ts +17 -0
- package/dist/toolkits/github/tools/Reactions/list-issue-reactions.js +44 -0
- package/dist/toolkits/github/tools/Reactions/list-pr-comment-reactions.d.ts +17 -0
- package/dist/toolkits/github/tools/Reactions/list-pr-comment-reactions.js +44 -0
- package/dist/toolkits/github/tools/Releases/create-release.d.ts +27 -0
- package/dist/toolkits/github/tools/Releases/create-release.js +45 -0
- package/dist/toolkits/github/tools/Releases/delete-release.d.ts +13 -0
- package/dist/toolkits/github/tools/Releases/delete-release.js +31 -0
- package/dist/toolkits/github/tools/Releases/generate-release-notes.d.ts +18 -0
- package/dist/toolkits/github/tools/Releases/generate-release-notes.js +39 -0
- package/dist/toolkits/github/tools/Releases/get-latest-release.d.ts +22 -0
- package/dist/toolkits/github/tools/Releases/get-latest-release.js +38 -0
- package/dist/toolkits/github/tools/Releases/get-release.d.ts +37 -0
- package/dist/toolkits/github/tools/Releases/get-release.js +50 -0
- package/dist/toolkits/github/tools/Releases/list-releases.d.ts +22 -0
- package/dist/toolkits/github/tools/Releases/list-releases.js +47 -0
- package/dist/toolkits/github/tools/Releases/update-release.d.ts +27 -0
- package/dist/toolkits/github/tools/Releases/update-release.js +46 -0
- package/dist/toolkits/github/tools/Repos/create-repo.d.ts +32 -0
- package/dist/toolkits/github/tools/Repos/create-repo.js +57 -0
- package/dist/toolkits/github/tools/Repos/fork-repo.d.ts +17 -0
- package/dist/toolkits/github/tools/Repos/fork-repo.js +35 -0
- package/dist/toolkits/github/tools/Repos/get-repo-contributors.d.ts +20 -0
- package/dist/toolkits/github/tools/Repos/get-repo-contributors.js +39 -0
- package/dist/toolkits/github/tools/Repos/get-repo-languages.d.ts +14 -0
- package/dist/toolkits/github/tools/Repos/get-repo-languages.js +29 -0
- package/dist/toolkits/github/tools/Repos/get-repo.d.ts +36 -0
- package/dist/toolkits/github/tools/Repos/get-repo.js +43 -0
- package/dist/toolkits/github/tools/Repos/list-branches.d.ts +17 -0
- package/dist/toolkits/github/tools/Repos/list-branches.js +37 -0
- package/dist/toolkits/github/tools/Repos/list-repos.d.ts +22 -0
- package/dist/toolkits/github/tools/Repos/list-repos.js +36 -0
- package/dist/toolkits/github/tools/Repos/star-repo.d.ts +13 -0
- package/dist/toolkits/github/tools/Repos/star-repo.js +39 -0
- package/dist/toolkits/github/tools/Repos/watch-repo.d.ts +18 -0
- package/dist/toolkits/github/tools/Repos/watch-repo.js +37 -0
- package/dist/toolkits/github/tools/Search/search-code.d.ts +14 -0
- package/dist/toolkits/github/tools/Search/search-code.js +33 -0
- package/dist/toolkits/github/tools/Search/search-commits.d.ts +14 -0
- package/dist/toolkits/github/tools/Search/search-commits.js +33 -0
- package/dist/toolkits/github/tools/Search/search-issues.d.ts +23 -0
- package/dist/toolkits/github/tools/Search/search-issues.js +43 -0
- package/dist/toolkits/github/tools/Search/search-labels.d.ts +15 -0
- package/dist/toolkits/github/tools/Search/search-labels.js +35 -0
- package/dist/toolkits/github/tools/Search/search-repos.d.ts +22 -0
- package/dist/toolkits/github/tools/Search/search-repos.js +47 -0
- package/dist/toolkits/github/tools/Search/search-topics.d.ts +12 -0
- package/dist/toolkits/github/tools/Search/search-topics.js +29 -0
- package/dist/toolkits/github/tools/Search/search-users.d.ts +21 -0
- package/dist/toolkits/github/tools/Search/search-users.js +41 -0
- package/dist/toolkits/github/tools/SecretScanning/get-alert.d.ts +33 -0
- package/dist/toolkits/github/tools/SecretScanning/get-alert.js +45 -0
- package/dist/toolkits/github/tools/SecretScanning/list-alerts.d.ts +25 -0
- package/dist/toolkits/github/tools/SecretScanning/list-alerts.js +53 -0
- package/dist/toolkits/github/tools/SecretScanning/update-alert.d.ts +19 -0
- package/dist/toolkits/github/tools/SecretScanning/update-alert.js +41 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/create-repository-advisory.d.ts +34 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/create-repository-advisory.js +52 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/get-repository-advisory.d.ts +27 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/get-repository-advisory.js +42 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/list-global-advisories.d.ts +14 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/list-global-advisories.js +37 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/list-repository-advisories.d.ts +22 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/list-repository-advisories.js +47 -0
- package/dist/toolkits/github/tools/Stars/check-repo-starred.d.ts +12 -0
- package/dist/toolkits/github/tools/Stars/check-repo-starred.js +32 -0
- package/dist/toolkits/github/tools/Stars/list-stargazers.d.ts +15 -0
- package/dist/toolkits/github/tools/Stars/list-stargazers.js +40 -0
- package/dist/toolkits/github/tools/Stars/list-starred-repos.d.ts +15 -0
- package/dist/toolkits/github/tools/Stars/list-starred-repos.js +38 -0
- package/dist/toolkits/github/tools/Stars/star-repo.d.ts +12 -0
- package/dist/toolkits/github/tools/Stars/star-repo.js +29 -0
- package/dist/toolkits/github/tools/Stars/unstar-repo.d.ts +12 -0
- package/dist/toolkits/github/tools/Stars/unstar-repo.js +29 -0
- package/dist/toolkits/github/tools/Statuses/create-commit-status.d.ts +25 -0
- package/dist/toolkits/github/tools/Statuses/create-commit-status.js +44 -0
- package/dist/toolkits/github/tools/Statuses/get-combined-status.d.ts +26 -0
- package/dist/toolkits/github/tools/Statuses/get-combined-status.js +44 -0
- package/dist/toolkits/github/tools/Statuses/list-commit-statuses.d.ts +18 -0
- package/dist/toolkits/github/tools/Statuses/list-commit-statuses.js +44 -0
- package/dist/toolkits/github/tools/Teams/add-team-repo.d.ts +15 -0
- package/dist/toolkits/github/tools/Teams/add-team-repo.js +35 -0
- package/dist/toolkits/github/tools/Teams/create-team.d.ts +32 -0
- package/dist/toolkits/github/tools/Teams/create-team.js +46 -0
- package/dist/toolkits/github/tools/Teams/delete-team.d.ts +12 -0
- package/dist/toolkits/github/tools/Teams/delete-team.js +29 -0
- package/dist/toolkits/github/tools/Teams/get-team.d.ts +28 -0
- package/dist/toolkits/github/tools/Teams/get-team.js +41 -0
- package/dist/toolkits/github/tools/Teams/list-team-members.d.ts +16 -0
- package/dist/toolkits/github/tools/Teams/list-team-members.js +42 -0
- package/dist/toolkits/github/tools/Teams/list-team-repos.d.ts +22 -0
- package/dist/toolkits/github/tools/Teams/list-team-repos.js +41 -0
- package/dist/toolkits/github/tools/Teams/list-teams.d.ts +18 -0
- package/dist/toolkits/github/tools/Teams/list-teams.js +42 -0
- package/dist/toolkits/github/tools/Teams/remove-team-repo.d.ts +14 -0
- package/dist/toolkits/github/tools/Teams/remove-team-repo.js +33 -0
- package/dist/toolkits/github/tools/Teams/update-team.d.ts +27 -0
- package/dist/toolkits/github/tools/Teams/update-team.js +44 -0
- package/dist/toolkits/github/tools/Users/follow-user.d.ts +12 -0
- package/dist/toolkits/github/tools/Users/follow-user.js +36 -0
- package/dist/toolkits/github/tools/Users/get-github-user.d.ts +64 -0
- package/dist/toolkits/github/tools/Users/get-github-user.js +48 -0
- package/dist/toolkits/github/tools/Users/get-user-by-id.d.ts +53 -0
- package/dist/toolkits/github/tools/Users/get-user-by-id.js +27 -0
- package/dist/toolkits/github/tools/Users/get-user-context.d.ts +14 -0
- package/dist/toolkits/github/tools/Users/get-user-context.js +32 -0
- package/dist/toolkits/github/tools/Users/get-user.d.ts +53 -0
- package/dist/toolkits/github/tools/Users/get-user.js +27 -0
- package/dist/toolkits/github/tools/Users/list-users.d.ts +31 -0
- package/dist/toolkits/github/tools/Users/list-users.js +29 -0
- package/dist/toolkits/github/tools/Users/update-authenticated-user.d.ts +62 -0
- package/dist/toolkits/github/tools/Users/update-authenticated-user.js +39 -0
- package/dist/toolkits/github/tools/Webhooks/create-repo-webhook.d.ts +34 -0
- package/dist/toolkits/github/tools/Webhooks/create-repo-webhook.js +47 -0
- package/dist/toolkits/github/tools/Webhooks/delete-repo-webhook.d.ts +13 -0
- package/dist/toolkits/github/tools/Webhooks/delete-repo-webhook.js +31 -0
- package/dist/toolkits/github/tools/Webhooks/get-repo-webhook.d.ts +30 -0
- package/dist/toolkits/github/tools/Webhooks/get-repo-webhook.js +41 -0
- package/dist/toolkits/github/tools/Webhooks/list-repo-webhooks.d.ts +31 -0
- package/dist/toolkits/github/tools/Webhooks/list-repo-webhooks.js +47 -0
- package/dist/toolkits/github/tools/Webhooks/update-repo-webhook.d.ts +36 -0
- package/dist/toolkits/github/tools/Webhooks/update-repo-webhook.js +50 -0
- package/dist/toolkits/github/tools/Workflows/get-workflow-run.d.ts +31 -0
- package/dist/toolkits/github/tools/Workflows/get-workflow-run.js +42 -0
- package/dist/toolkits/github/tools/Workflows/list-workflow-runs.d.ts +25 -0
- package/dist/toolkits/github/tools/Workflows/list-workflow-runs.js +59 -0
- package/dist/toolkits/github/tools/Workflows/list-workflows.d.ts +21 -0
- package/dist/toolkits/github/tools/Workflows/list-workflows.js +40 -0
- package/dist/toolkits/github/tools/Workflows/trigger-workflow.d.ts +15 -0
- package/dist/toolkits/github/tools/Workflows/trigger-workflow.js +35 -0
- package/dist/toolkits/github/tools/index.d.ts +176 -0
- package/dist/toolkits/github/tools/index.js +646 -0
- package/dist/toolkits/gmail/icon.js +25 -1
- package/dist/toolkits/google-calendar/icon.d.ts +5 -0
- package/dist/toolkits/google-calendar/icon.js +6 -0
- package/dist/toolkits/google-calendar/manifest.d.ts +3 -0
- package/dist/toolkits/google-calendar/manifest.js +45 -0
- package/dist/toolkits/google-calendar/tools/create-event.d.ts +27 -0
- package/dist/toolkits/google-calendar/tools/create-event.js +54 -0
- package/dist/toolkits/google-calendar/tools/index.d.ts +7 -0
- package/dist/toolkits/google-calendar/tools/index.js +18 -0
- package/dist/toolkits/google-calendar/tools/list-events.d.ts +24 -0
- package/dist/toolkits/google-calendar/tools/list-events.js +46 -0
- package/dist/toolkits/google-sheets/icon.d.ts +5 -0
- package/dist/toolkits/google-sheets/icon.js +13 -0
- package/dist/toolkits/google-sheets/manifest.d.ts +3 -0
- package/dist/toolkits/google-sheets/manifest.js +45 -0
- package/dist/toolkits/google-sheets/tools/get-spreadsheet.d.ts +5 -0
- package/dist/toolkits/google-sheets/tools/get-spreadsheet.js +33 -0
- package/dist/toolkits/google-sheets/tools/get-values.d.ts +6 -0
- package/dist/toolkits/google-sheets/tools/get-values.js +34 -0
- package/dist/toolkits/google-sheets/tools/index.d.ts +11 -0
- package/dist/toolkits/google-sheets/tools/index.js +26 -0
- package/dist/toolkits/google-sheets/tools/list-spreadsheets.d.ts +21 -0
- package/dist/toolkits/google-sheets/tools/list-spreadsheets.js +43 -0
- package/dist/toolkits/linear/icon.js +24 -1
- package/dist/toolkits/mathematics/icon.js +1 -1
- package/dist/toolkits/notion/icon.d.ts +5 -0
- package/dist/toolkits/notion/icon.js +10 -0
- package/dist/toolkits/notion/manifest.d.ts +3 -0
- package/dist/toolkits/notion/manifest.js +37 -0
- package/dist/toolkits/notion/tools/append-block-children.d.ts +6 -0
- package/dist/toolkits/notion/tools/append-block-children.js +30 -0
- package/dist/toolkits/notion/tools/create-page.d.ts +12 -0
- package/dist/toolkits/notion/tools/create-page.js +40 -0
- package/dist/toolkits/notion/tools/get-database.d.ts +5 -0
- package/dist/toolkits/notion/tools/get-database.js +25 -0
- package/dist/toolkits/notion/tools/get-page.d.ts +15 -0
- package/dist/toolkits/notion/tools/get-page.js +42 -0
- package/dist/toolkits/notion/tools/index.d.ts +16 -0
- package/dist/toolkits/notion/tools/index.js +61 -0
- package/dist/toolkits/notion/tools/list-databases.d.ts +5 -0
- package/dist/toolkits/notion/tools/list-databases.js +33 -0
- package/dist/toolkits/notion/tools/query-database.d.ts +8 -0
- package/dist/toolkits/notion/tools/query-database.js +34 -0
- package/dist/toolkits/notion/tools/search.d.ts +14 -0
- package/dist/toolkits/notion/tools/search.js +41 -0
- package/dist/toolkits/notion/tools/update-page.d.ts +9 -0
- package/dist/toolkits/notion/tools/update-page.js +36 -0
- package/dist/toolkits/web-search/icon.js +3 -1
- package/package.json +4 -2
- package/dist/core/categories.d.ts.map +0 -1
- package/dist/core/categories.js.map +0 -1
- package/dist/core/define.d.ts.map +0 -1
- package/dist/core/define.js.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js.map +0 -1
- package/dist/core/validate.d.ts.map +0 -1
- package/dist/core/validate.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/runtime/credentials.d.ts.map +0 -1
- package/dist/runtime/credentials.js.map +0 -1
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/meta-tools.d.ts.map +0 -1
- package/dist/runtime/meta-tools.js.map +0 -1
- package/dist/runtime/registry.d.ts.map +0 -1
- package/dist/runtime/registry.js.map +0 -1
- package/dist/runtime/schema-helpers.d.ts.map +0 -1
- package/dist/runtime/schema-helpers.js.map +0 -1
- package/dist/toolkits/gmail/icon.d.ts.map +0 -1
- package/dist/toolkits/gmail/icon.js.map +0 -1
- package/dist/toolkits/gmail/manifest.d.ts.map +0 -1
- package/dist/toolkits/gmail/manifest.js.map +0 -1
- package/dist/toolkits/gmail/tools/get-message.d.ts.map +0 -1
- package/dist/toolkits/gmail/tools/get-message.js.map +0 -1
- package/dist/toolkits/gmail/tools/list-messages.d.ts.map +0 -1
- package/dist/toolkits/gmail/tools/list-messages.js.map +0 -1
- package/dist/toolkits/gmail/tools/send-message.d.ts.map +0 -1
- package/dist/toolkits/gmail/tools/send-message.js.map +0 -1
- package/dist/toolkits/linear/icon.d.ts.map +0 -1
- package/dist/toolkits/linear/icon.js.map +0 -1
- package/dist/toolkits/linear/manifest.d.ts.map +0 -1
- package/dist/toolkits/linear/manifest.js.map +0 -1
- package/dist/toolkits/linear/tools/create-issue.d.ts.map +0 -1
- package/dist/toolkits/linear/tools/create-issue.js.map +0 -1
- package/dist/toolkits/linear/tools/list-teams.d.ts.map +0 -1
- package/dist/toolkits/linear/tools/list-teams.js.map +0 -1
- package/dist/toolkits/linear/tools/search-issues.d.ts.map +0 -1
- package/dist/toolkits/linear/tools/search-issues.js.map +0 -1
- package/dist/toolkits/mathematics/icon.d.ts.map +0 -1
- package/dist/toolkits/mathematics/icon.js.map +0 -1
- package/dist/toolkits/mathematics/manifest.d.ts.map +0 -1
- package/dist/toolkits/mathematics/manifest.js.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-combinatorics.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-combinatorics.js.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-matrix-determinant.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-matrix-determinant.js.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-percentage.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-percentage.js.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-product.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-product.js.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-quadratic-roots.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-quadratic-roots.js.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-statistics.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-statistics.js.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-sum.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-sum.js.map +0 -1
- package/dist/toolkits/mathematics/tools/get-random-number.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/get-random-number.js.map +0 -1
- package/dist/toolkits/mathematics/tools/solve-linear-equations.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/solve-linear-equations.js.map +0 -1
- package/dist/toolkits/web-search/icon.d.ts.map +0 -1
- package/dist/toolkits/web-search/icon.js.map +0 -1
- package/dist/toolkits/web-search/manifest.d.ts.map +0 -1
- package/dist/toolkits/web-search/manifest.js.map +0 -1
- package/dist/toolkits/web-search/tools/firecrawl-client.d.ts.map +0 -1
- package/dist/toolkits/web-search/tools/firecrawl-client.js.map +0 -1
- package/dist/toolkits/web-search/tools/web-scrape.d.ts.map +0 -1
- package/dist/toolkits/web-search/tools/web-scrape.js.map +0 -1
- package/dist/toolkits/web-search/tools/web-search.d.ts.map +0 -1
- package/dist/toolkits/web-search/tools/web-search.js.map +0 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineToolkit, defineTool } from '../../core/define.js';
|
|
2
|
+
import { inferToolScope } from '../../core/scope.js';
|
|
3
|
+
import { GSHEETS_ICON } from './icon.js';
|
|
4
|
+
import { googleSheetsTools } from './tools/index.js';
|
|
5
|
+
export default defineToolkit({
|
|
6
|
+
id: 'google-sheets',
|
|
7
|
+
displayName: 'Google Sheets',
|
|
8
|
+
shortDescription: 'Spreadsheets, ranges, and values.',
|
|
9
|
+
category: 'Document & File Management',
|
|
10
|
+
icon: GSHEETS_ICON,
|
|
11
|
+
auth: {
|
|
12
|
+
type: 'oauth2',
|
|
13
|
+
tokenField: 'googleSheetsToken',
|
|
14
|
+
provider: {
|
|
15
|
+
slug: 'google-sheets',
|
|
16
|
+
env: {
|
|
17
|
+
clientId: 'GOOGLE_CLIENT_ID',
|
|
18
|
+
clientSecret: 'GOOGLE_CLIENT_SECRET',
|
|
19
|
+
clientIdFallback: 'GMAIL_CLIENT_ID',
|
|
20
|
+
clientSecretFallback: 'GMAIL_CLIENT_SECRET',
|
|
21
|
+
},
|
|
22
|
+
authorizeUrl: 'https://accounts.google.com/o/oauth2/v2/auth',
|
|
23
|
+
tokenUrl: 'https://oauth2.googleapis.com/token',
|
|
24
|
+
scopes: [
|
|
25
|
+
'https://www.googleapis.com/auth/spreadsheets',
|
|
26
|
+
'https://www.googleapis.com/auth/drive.metadata.readonly',
|
|
27
|
+
],
|
|
28
|
+
exchangeStyle: 'form',
|
|
29
|
+
extraAuthParams: { access_type: 'offline', prompt: 'consent' },
|
|
30
|
+
connectDescription: 'Connect Google Sheets to read and write spreadsheet data.',
|
|
31
|
+
callbackPath: '/api/auth/google-sheets/callback',
|
|
32
|
+
stateCookie: 'google_sheets_oauth_state',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
allowedHosts: ['sheets.googleapis.com', 'www.googleapis.com'],
|
|
36
|
+
tools: googleSheetsTools.map((entry) => defineTool({
|
|
37
|
+
name: entry.name,
|
|
38
|
+
description: entry.description,
|
|
39
|
+
tool: entry.tool,
|
|
40
|
+
requiredAuth: entry.requiredAuth,
|
|
41
|
+
scope: inferToolScope(entry.name),
|
|
42
|
+
})),
|
|
43
|
+
meta: { since: '0.0.2' },
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export const getSpreadsheet = tool({
|
|
5
|
+
description: 'Get details and metadata of a specific Google Sheets spreadsheet by ID.',
|
|
6
|
+
inputSchema: z.object({
|
|
7
|
+
googleSheetsToken: z.string().describe('The Google Sheets access token'),
|
|
8
|
+
spreadsheetId: z.string().describe('The ID of the spreadsheet to retrieve'),
|
|
9
|
+
}),
|
|
10
|
+
execute: async ({ googleSheetsToken, spreadsheetId }) => {
|
|
11
|
+
try {
|
|
12
|
+
const url = `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheetId}`;
|
|
13
|
+
const response = await fetch(url, {
|
|
14
|
+
headers: {
|
|
15
|
+
Authorization: `Bearer ${googleSheetsToken}`,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
if (!response.ok) {
|
|
19
|
+
const error = await response.json();
|
|
20
|
+
return { error: 'Failed to get spreadsheet', details: error };
|
|
21
|
+
}
|
|
22
|
+
const data = await response.json();
|
|
23
|
+
return data;
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
return {
|
|
27
|
+
error: 'Error getting spreadsheet',
|
|
28
|
+
message: error instanceof Error ? error.message : 'Unknown error',
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=get-spreadsheet.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export const getValues = tool({
|
|
5
|
+
description: 'Get values from a specific range in a Google Sheets spreadsheet.',
|
|
6
|
+
inputSchema: z.object({
|
|
7
|
+
googleSheetsToken: z.string().describe('The Google Sheets access token'),
|
|
8
|
+
spreadsheetId: z.string().describe('The ID of the spreadsheet'),
|
|
9
|
+
range: z.string().describe('The A1 notation of the values to retrieve (e.g., "Sheet1!A1:B10")'),
|
|
10
|
+
}),
|
|
11
|
+
execute: async ({ googleSheetsToken, spreadsheetId, range }) => {
|
|
12
|
+
try {
|
|
13
|
+
const url = `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheetId}/values/${encodeURIComponent(range)}`;
|
|
14
|
+
const response = await fetch(url, {
|
|
15
|
+
headers: {
|
|
16
|
+
Authorization: `Bearer ${googleSheetsToken}`,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
if (!response.ok) {
|
|
20
|
+
const error = await response.json();
|
|
21
|
+
return { error: 'Failed to get values', details: error };
|
|
22
|
+
}
|
|
23
|
+
const data = await response.json();
|
|
24
|
+
return data;
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
return {
|
|
28
|
+
error: 'Error getting values',
|
|
29
|
+
message: error instanceof Error ? error.message : 'Unknown error',
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=get-values.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { listSpreadsheets } from './list-spreadsheets';
|
|
2
|
+
import { getSpreadsheet } from './get-spreadsheet';
|
|
3
|
+
import { getValues } from './get-values';
|
|
4
|
+
export { listSpreadsheets, getSpreadsheet, getValues };
|
|
5
|
+
export declare const googleSheetsTools: {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
tool: any;
|
|
9
|
+
requiredAuth: "googleSheetsToken";
|
|
10
|
+
}[];
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { listSpreadsheets } from './list-spreadsheets';
|
|
3
|
+
import { getSpreadsheet } from './get-spreadsheet';
|
|
4
|
+
import { getValues } from './get-values';
|
|
5
|
+
export { listSpreadsheets, getSpreadsheet, getValues };
|
|
6
|
+
export const googleSheetsTools = [
|
|
7
|
+
{
|
|
8
|
+
name: 'googleSheetsListSpreadsheets',
|
|
9
|
+
description: 'List or search for Google Sheets spreadsheets in the user\'s Drive.',
|
|
10
|
+
tool: listSpreadsheets,
|
|
11
|
+
requiredAuth: 'googleSheetsToken',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'googleSheetsGetSpreadsheet',
|
|
15
|
+
description: 'Get details and metadata of a specific Google Sheets spreadsheet by ID.',
|
|
16
|
+
tool: getSpreadsheet,
|
|
17
|
+
requiredAuth: 'googleSheetsToken',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'googleSheetsGetValues',
|
|
21
|
+
description: 'Get values from a specific range in a Google Sheets spreadsheet.',
|
|
22
|
+
tool: getValues,
|
|
23
|
+
requiredAuth: 'googleSheetsToken',
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const listSpreadsheets: import("ai").Tool<{
|
|
2
|
+
googleSheetsToken: string;
|
|
3
|
+
pageSize: number;
|
|
4
|
+
q?: string | undefined;
|
|
5
|
+
}, {
|
|
6
|
+
error: string;
|
|
7
|
+
details: any;
|
|
8
|
+
spreadsheets?: undefined;
|
|
9
|
+
message?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
spreadsheets: any;
|
|
12
|
+
error?: undefined;
|
|
13
|
+
details?: undefined;
|
|
14
|
+
message?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
error: string;
|
|
17
|
+
message: string;
|
|
18
|
+
details?: undefined;
|
|
19
|
+
spreadsheets?: undefined;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=list-spreadsheets.d.ts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export const listSpreadsheets = tool({
|
|
5
|
+
description: 'List or search for Google Sheets spreadsheets in the user\'s Drive.',
|
|
6
|
+
inputSchema: z.object({
|
|
7
|
+
googleSheetsToken: z.string().describe('The Google Sheets access token'),
|
|
8
|
+
q: z.string().optional().describe('Search query for spreadsheets'),
|
|
9
|
+
pageSize: z.number().optional().default(10).describe('Maximum number of spreadsheets to return'),
|
|
10
|
+
}),
|
|
11
|
+
execute: async ({ googleSheetsToken, q, pageSize }) => {
|
|
12
|
+
try {
|
|
13
|
+
const url = new URL('https://www.googleapis.com/drive/v3/files');
|
|
14
|
+
let query = "mimeType='application/vnd.google-apps.spreadsheet'";
|
|
15
|
+
if (q) {
|
|
16
|
+
query += ` and name contains '${q}'`;
|
|
17
|
+
}
|
|
18
|
+
url.searchParams.append('q', query);
|
|
19
|
+
url.searchParams.append('pageSize', pageSize.toString());
|
|
20
|
+
url.searchParams.append('fields', 'files(id, name, modifiedTime)');
|
|
21
|
+
const response = await fetch(url.toString(), {
|
|
22
|
+
headers: {
|
|
23
|
+
Authorization: `Bearer ${googleSheetsToken}`,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
if (!response.ok) {
|
|
27
|
+
const error = await response.json();
|
|
28
|
+
return { error: 'Failed to list spreadsheets', details: error };
|
|
29
|
+
}
|
|
30
|
+
const data = await response.json();
|
|
31
|
+
return {
|
|
32
|
+
spreadsheets: data.files || [],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
return {
|
|
37
|
+
error: 'Error listing spreadsheets',
|
|
38
|
+
message: error instanceof Error ? error.message : 'Unknown error',
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=list-spreadsheets.js.map
|
|
@@ -1,4 +1,27 @@
|
|
|
1
|
-
const SVG = `<svg
|
|
1
|
+
const SVG = `<svg
|
|
2
|
+
width="24"
|
|
3
|
+
height="24"
|
|
4
|
+
viewBox="0 0 24 24"
|
|
5
|
+
fill="none"
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
>
|
|
8
|
+
<path
|
|
9
|
+
d="M3.03509 12.9431C3.24245 14.9227 4.10472 16.8468 5.62188 18.364C7.13904 19.8811 9.0631 20.7434 11.0428 20.9508L3.03509 12.9431Z"
|
|
10
|
+
fill="#000000"
|
|
11
|
+
/>
|
|
12
|
+
<path
|
|
13
|
+
d="M3 11.4938L12.4921 20.9858C13.2976 20.9407 14.0981 20.7879 14.8704 20.5273L3.4585 9.11548C3.19793 9.88771 3.0451 10.6883 3 11.4938Z"
|
|
14
|
+
fill="#000000"
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
d="M3.86722 8.10999L15.8758 20.1186C16.4988 19.8201 17.0946 19.4458 17.6493 18.9956L4.99021 6.33659C4.54006 6.89125 4.16573 7.487 3.86722 8.10999Z"
|
|
18
|
+
fill="#000000"
|
|
19
|
+
/>
|
|
20
|
+
<path
|
|
21
|
+
d="M5.66301 5.59517C9.18091 2.12137 14.8488 2.135 18.3498 5.63604C21.8508 9.13708 21.8645 14.8049 18.3907 18.3228L5.66301 5.59517Z"
|
|
22
|
+
fill="#000000"
|
|
23
|
+
/>
|
|
24
|
+
</svg>`;
|
|
2
25
|
export const LINEAR_ICON = {
|
|
3
26
|
kind: 'svg',
|
|
4
27
|
dataUri: `data:image/svg+xml;base64,${Buffer.from(SVG).toString('base64')}`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const SVG = `<svg xmlns="http://www.w3.org/2000/svg"
|
|
1
|
+
const SVG = `<svg xmlns="http://www.w3.org/2000/svg" shapeRendering="geometricPrecision" textRendering="geometricPrecision" imageRendering="optimizeQuality" fillRule="evenodd" clipRule="evenodd" viewBox="0 0 512 494.37"><path fillRule="nonzero" d="m0 150.27 18.66 1.39C38 129.78 45.6 65.06 159.61 77.72 155.47 355.03 33.86 384.28 41.46 441.17c2.76 32.24 28.33 52.05 55.96 53.2 87.3-2.99 83.38-120.68 110.56-417.34H320.6c-5.98 104.57-22.34 209.13-24.18 311.63 1.38 68.17 42.84 104.56 97.43 105.02 89.82 3 118.15-101.8 118.15-146.48h-19.35c-1.84 36.85-19.57 63.34-57.35 64.95-102.95 1.38-46.29-181.03-45.6-333.74l122.3.7-.69-78.08C2.98-1.44 67.5-11.4 0 150.27z"/></svg>`;
|
|
2
2
|
export const MATHEMATICS_ICON = {
|
|
3
3
|
kind: 'svg',
|
|
4
4
|
dataUri: `data:image/svg+xml;base64,${Buffer.from(SVG).toString('base64')}`,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const SVG = `<svg width="800px" height="800px" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fillRule="evenodd" clipRule="evenodd" d="M5.716 29.2178L2.27664 24.9331C1.44913 23.9023 1 22.6346 1 21.3299V5.81499C1 3.86064 2.56359 2.23897 4.58071 2.10125L20.5321 1.01218C21.691 0.933062 22.8428 1.24109 23.7948 1.8847L29.3992 5.67391C30.4025 6.35219 31 7.46099 31 8.64426V26.2832C31 28.1958 29.4626 29.7793 27.4876 29.9009L9.78333 30.9907C8.20733 31.0877 6.68399 30.4237 5.716 29.2178Z" fill="white"/>
|
|
3
|
+
<path d="M11.2481 13.5787V13.3756C11.2481 12.8607 11.6605 12.4337 12.192 12.3982L16.0633 12.1397L21.417 20.0235V13.1041L20.039 12.9204V12.824C20.039 12.303 20.4608 11.8732 20.9991 11.8456L24.5216 11.6652V12.1721C24.5216 12.41 24.3446 12.6136 24.1021 12.6546L23.2544 12.798V24.0037L22.1906 24.3695C21.3018 24.6752 20.3124 24.348 19.8036 23.5803L14.6061 15.7372V23.223L16.2058 23.5291L16.1836 23.6775C16.1137 24.1423 15.7124 24.4939 15.227 24.5155L11.2481 24.6926C11.1955 24.1927 11.5701 23.7456 12.0869 23.6913L12.6103 23.6363V13.6552L11.2481 13.5787Z" fill="#000000"/>
|
|
4
|
+
<path fillRule="evenodd" clipRule="evenodd" d="M20.6749 2.96678L4.72347 4.05585C3.76799 4.12109 3.02734 4.88925 3.02734 5.81499V21.3299C3.02734 22.1997 3.32676 23.0448 3.87843 23.7321L7.3178 28.0167C7.87388 28.7094 8.74899 29.0909 9.65435 29.0352L27.3586 27.9454C28.266 27.8895 28.9724 27.1619 28.9724 26.2832V8.64426C28.9724 8.10059 28.6979 7.59115 28.2369 7.27951L22.6325 3.49029C22.0613 3.10413 21.3702 2.91931 20.6749 2.96678ZM5.51447 6.057C5.29261 5.89274 5.3982 5.55055 5.6769 5.53056L20.7822 4.44711C21.2635 4.41259 21.7417 4.54512 22.1309 4.82088L25.1617 6.96813C25.2767 7.04965 25.2228 7.22563 25.0803 7.23338L9.08387 8.10336C8.59977 8.12969 8.12193 7.98747 7.73701 7.7025L5.51447 6.057ZM8.33357 10.8307C8.33357 10.311 8.75341 9.88177 9.29027 9.85253L26.203 8.93145C26.7263 8.90296 27.1667 9.30534 27.1667 9.81182V25.0853C27.1667 25.604 26.7484 26.0328 26.2126 26.0633L9.40688 27.0195C8.8246 27.0527 8.33357 26.6052 8.33357 26.0415V10.8307Z" fill="#000000"/>
|
|
5
|
+
</svg>`;
|
|
6
|
+
export const NOTION_ICON = {
|
|
7
|
+
kind: 'svg',
|
|
8
|
+
dataUri: `data:image/svg+xml;base64,${Buffer.from(SVG).toString('base64')}`,
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineToolkit, defineTool } from '../../core/define.js';
|
|
2
|
+
import { inferToolScope } from '../../core/scope.js';
|
|
3
|
+
import { NOTION_ICON } from './icon.js';
|
|
4
|
+
import { notionTools } from './tools/index.js';
|
|
5
|
+
export default defineToolkit({
|
|
6
|
+
id: 'notion',
|
|
7
|
+
displayName: 'Notion',
|
|
8
|
+
shortDescription: 'Search, databases, pages, and blocks.',
|
|
9
|
+
category: 'Collaboration & Communication',
|
|
10
|
+
icon: NOTION_ICON,
|
|
11
|
+
auth: {
|
|
12
|
+
type: 'oauth2',
|
|
13
|
+
tokenField: 'notionToken',
|
|
14
|
+
provider: {
|
|
15
|
+
slug: 'notion',
|
|
16
|
+
env: { clientId: 'NOTION_CLIENT_ID', clientSecret: 'NOTION_CLIENT_SECRET' },
|
|
17
|
+
authorizeUrl: 'https://api.notion.com/v1/oauth/authorize',
|
|
18
|
+
tokenUrl: 'https://api.notion.com/v1/oauth/token',
|
|
19
|
+
scopes: [],
|
|
20
|
+
exchangeStyle: 'basic',
|
|
21
|
+
extraAuthParams: { owner: 'user' },
|
|
22
|
+
connectDescription: 'Integrate Notion to sync workspaces, databases, and pages.',
|
|
23
|
+
callbackPath: '/api/auth/notion/callback',
|
|
24
|
+
stateCookie: 'notion_oauth_state',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
allowedHosts: ['api.notion.com'],
|
|
28
|
+
tools: notionTools.map((entry) => defineTool({
|
|
29
|
+
name: entry.name,
|
|
30
|
+
description: entry.description,
|
|
31
|
+
tool: entry.tool,
|
|
32
|
+
requiredAuth: entry.requiredAuth,
|
|
33
|
+
scope: inferToolScope(entry.name),
|
|
34
|
+
})),
|
|
35
|
+
meta: { since: '0.0.2' },
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export const notionAppendBlockChildren = tool({
|
|
5
|
+
description: 'Append content blocks as children of a parent block or page.',
|
|
6
|
+
inputSchema: z.object({
|
|
7
|
+
block_id: z.string().describe('The ID of the parent block (or page) to append children to'),
|
|
8
|
+
children: z.array(z.any()).describe('The content blocks to append'),
|
|
9
|
+
notionToken: z.string().optional().describe('Token provided by the system; do not provide'),
|
|
10
|
+
}),
|
|
11
|
+
execute: async ({ block_id, children, notionToken }) => {
|
|
12
|
+
const response = await fetch(`https://api.notion.com/v1/blocks/${block_id}/children`, {
|
|
13
|
+
method: 'PATCH',
|
|
14
|
+
headers: {
|
|
15
|
+
'Authorization': `Bearer ${notionToken}`,
|
|
16
|
+
'Content-Type': 'application/json',
|
|
17
|
+
'Notion-Version': '2022-06-28',
|
|
18
|
+
},
|
|
19
|
+
body: JSON.stringify({
|
|
20
|
+
children,
|
|
21
|
+
}),
|
|
22
|
+
});
|
|
23
|
+
if (!response.ok) {
|
|
24
|
+
const error = await response.json();
|
|
25
|
+
return { error: 'Notion append block children failed', details: error };
|
|
26
|
+
}
|
|
27
|
+
return await response.json();
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=append-block-children.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const notionCreatePage: import("ai").Tool<{
|
|
2
|
+
parent: {
|
|
3
|
+
database_id?: string | undefined;
|
|
4
|
+
page_id?: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
notionToken?: string | undefined;
|
|
7
|
+
properties?: any;
|
|
8
|
+
children?: any[] | undefined;
|
|
9
|
+
icon?: any;
|
|
10
|
+
cover?: any;
|
|
11
|
+
}, any>;
|
|
12
|
+
//# sourceMappingURL=create-page.d.ts.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export const notionCreatePage = tool({
|
|
5
|
+
description: 'Create a new page in Notion. Can be created in a database or as a child of another page.',
|
|
6
|
+
inputSchema: z.object({
|
|
7
|
+
parent: z.object({
|
|
8
|
+
database_id: z.string().optional(),
|
|
9
|
+
page_id: z.string().optional(),
|
|
10
|
+
}).describe('The parent object (database_id or page_id)'),
|
|
11
|
+
properties: z.any().describe('The properties of the page (complex object based on database schema or page title)'),
|
|
12
|
+
children: z.array(z.any()).optional().describe('Content blocks for the page'),
|
|
13
|
+
icon: z.any().optional().describe('Icon for the page'),
|
|
14
|
+
cover: z.any().optional().describe('Cover for the page'),
|
|
15
|
+
notionToken: z.string().optional().describe('Token provided by the system; do not provide'),
|
|
16
|
+
}),
|
|
17
|
+
execute: async ({ parent, properties, children, icon, cover, notionToken }) => {
|
|
18
|
+
const response = await fetch('https://api.notion.com/v1/pages', {
|
|
19
|
+
method: 'POST',
|
|
20
|
+
headers: {
|
|
21
|
+
'Authorization': `Bearer ${notionToken}`,
|
|
22
|
+
'Content-Type': 'application/json',
|
|
23
|
+
'Notion-Version': '2022-06-28',
|
|
24
|
+
},
|
|
25
|
+
body: JSON.stringify({
|
|
26
|
+
parent,
|
|
27
|
+
properties,
|
|
28
|
+
children,
|
|
29
|
+
icon,
|
|
30
|
+
cover,
|
|
31
|
+
}),
|
|
32
|
+
});
|
|
33
|
+
if (!response.ok) {
|
|
34
|
+
const error = await response.json();
|
|
35
|
+
return { error: 'Notion create page failed', details: error };
|
|
36
|
+
}
|
|
37
|
+
return await response.json();
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=create-page.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export const notionGetDatabase = tool({
|
|
5
|
+
description: 'Retrieve the definition of a specific Notion database, including its properties/schema.',
|
|
6
|
+
inputSchema: z.object({
|
|
7
|
+
database_id: z.string().describe('The ID of the database to retrieve'),
|
|
8
|
+
notionToken: z.string().optional().describe('Token provided by the system; do not provide'),
|
|
9
|
+
}),
|
|
10
|
+
execute: async ({ database_id, notionToken }) => {
|
|
11
|
+
const response = await fetch(`https://api.notion.com/v1/databases/${database_id}`, {
|
|
12
|
+
method: 'GET',
|
|
13
|
+
headers: {
|
|
14
|
+
'Authorization': `Bearer ${notionToken}`,
|
|
15
|
+
'Notion-Version': '2022-06-28',
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
if (!response.ok) {
|
|
19
|
+
const error = await response.json();
|
|
20
|
+
return { error: 'Notion get database failed', details: error };
|
|
21
|
+
}
|
|
22
|
+
return await response.json();
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=get-database.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const notionGetPage: import("ai").Tool<{
|
|
2
|
+
page_id: string;
|
|
3
|
+
notionToken?: string | undefined;
|
|
4
|
+
}, {
|
|
5
|
+
error: string;
|
|
6
|
+
details: any;
|
|
7
|
+
page?: undefined;
|
|
8
|
+
content?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
page: any;
|
|
11
|
+
content: any;
|
|
12
|
+
error?: undefined;
|
|
13
|
+
details?: undefined;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=get-page.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export const notionGetPage = tool({
|
|
5
|
+
description: 'Get detailed information about a specific Notion page, including properties and its content (blocks).',
|
|
6
|
+
inputSchema: z.object({
|
|
7
|
+
page_id: z.string().describe('The ID of the page to retrieve'),
|
|
8
|
+
notionToken: z.string().optional().describe('Token provided by the system; do not provide'),
|
|
9
|
+
}),
|
|
10
|
+
execute: async ({ page_id, notionToken }) => {
|
|
11
|
+
// 1. Get page properties
|
|
12
|
+
const pageResponse = await fetch(`https://api.notion.com/v1/pages/${page_id}`, {
|
|
13
|
+
method: 'GET',
|
|
14
|
+
headers: {
|
|
15
|
+
'Authorization': `Bearer ${notionToken}`,
|
|
16
|
+
'Notion-Version': '2022-06-28',
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
if (!pageResponse.ok) {
|
|
20
|
+
const error = await pageResponse.json();
|
|
21
|
+
return { error: 'Failed to retrieve page properties', details: error };
|
|
22
|
+
}
|
|
23
|
+
const pageData = await pageResponse.json();
|
|
24
|
+
// 2. Get page content (blocks)
|
|
25
|
+
const blocksResponse = await fetch(`https://api.notion.com/v1/blocks/${page_id}/children`, {
|
|
26
|
+
method: 'GET',
|
|
27
|
+
headers: {
|
|
28
|
+
'Authorization': `Bearer ${notionToken}`,
|
|
29
|
+
'Notion-Version': '2022-06-28',
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
let blocks = null;
|
|
33
|
+
if (blocksResponse.ok) {
|
|
34
|
+
blocks = await blocksResponse.json();
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
page: pageData,
|
|
38
|
+
content: blocks,
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=get-page.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { notionSearch } from './search';
|
|
2
|
+
import { notionListDatabases } from './list-databases';
|
|
3
|
+
import { notionQueryDatabase } from './query-database';
|
|
4
|
+
import { notionGetPage } from './get-page';
|
|
5
|
+
import { notionCreatePage } from './create-page';
|
|
6
|
+
import { notionUpdatePage } from './update-page';
|
|
7
|
+
import { notionAppendBlockChildren } from './append-block-children';
|
|
8
|
+
import { notionGetDatabase } from './get-database';
|
|
9
|
+
export { notionSearch, notionListDatabases, notionQueryDatabase, notionGetPage, notionCreatePage, notionUpdatePage, notionAppendBlockChildren, notionGetDatabase, };
|
|
10
|
+
export declare const notionTools: {
|
|
11
|
+
name: string;
|
|
12
|
+
description: any;
|
|
13
|
+
tool: any;
|
|
14
|
+
requiredAuth: "notionToken";
|
|
15
|
+
}[];
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { notionSearch } from './search';
|
|
3
|
+
import { notionListDatabases } from './list-databases';
|
|
4
|
+
import { notionQueryDatabase } from './query-database';
|
|
5
|
+
import { notionGetPage } from './get-page';
|
|
6
|
+
import { notionCreatePage } from './create-page';
|
|
7
|
+
import { notionUpdatePage } from './update-page';
|
|
8
|
+
import { notionAppendBlockChildren } from './append-block-children';
|
|
9
|
+
import { notionGetDatabase } from './get-database';
|
|
10
|
+
export { notionSearch, notionListDatabases, notionQueryDatabase, notionGetPage, notionCreatePage, notionUpdatePage, notionAppendBlockChildren, notionGetDatabase, };
|
|
11
|
+
export const notionTools = [
|
|
12
|
+
{
|
|
13
|
+
name: 'notionSearch',
|
|
14
|
+
description: notionSearch.description,
|
|
15
|
+
tool: notionSearch,
|
|
16
|
+
requiredAuth: 'notionToken',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'notionListDatabases',
|
|
20
|
+
description: notionListDatabases.description,
|
|
21
|
+
tool: notionListDatabases,
|
|
22
|
+
requiredAuth: 'notionToken',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'notionQueryDatabase',
|
|
26
|
+
description: notionQueryDatabase.description,
|
|
27
|
+
tool: notionQueryDatabase,
|
|
28
|
+
requiredAuth: 'notionToken',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'notionGetPage',
|
|
32
|
+
description: notionGetPage.description,
|
|
33
|
+
tool: notionGetPage,
|
|
34
|
+
requiredAuth: 'notionToken',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'notionCreatePage',
|
|
38
|
+
description: notionCreatePage.description,
|
|
39
|
+
tool: notionCreatePage,
|
|
40
|
+
requiredAuth: 'notionToken',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'notionUpdatePage',
|
|
44
|
+
description: notionUpdatePage.description,
|
|
45
|
+
tool: notionUpdatePage,
|
|
46
|
+
requiredAuth: 'notionToken',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'notionAppendBlockChildren',
|
|
50
|
+
description: notionAppendBlockChildren.description,
|
|
51
|
+
tool: notionAppendBlockChildren,
|
|
52
|
+
requiredAuth: 'notionToken',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'notionGetDatabase',
|
|
56
|
+
description: notionGetDatabase.description,
|
|
57
|
+
tool: notionGetDatabase,
|
|
58
|
+
requiredAuth: 'notionToken',
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export const notionListDatabases = tool({
|
|
5
|
+
description: 'List all databases the integration has access to. Note: This uses the search API filtered to databases.',
|
|
6
|
+
inputSchema: z.object({
|
|
7
|
+
page_size: z.number().optional().default(100).describe('Number of results to return'),
|
|
8
|
+
notionToken: z.string().optional().describe('Token provided by the system; do not provide'),
|
|
9
|
+
}),
|
|
10
|
+
execute: async ({ page_size, notionToken }) => {
|
|
11
|
+
const response = await fetch('https://api.notion.com/v1/search', {
|
|
12
|
+
method: 'POST',
|
|
13
|
+
headers: {
|
|
14
|
+
'Authorization': `Bearer ${notionToken}`,
|
|
15
|
+
'Content-Type': 'application/json',
|
|
16
|
+
'Notion-Version': '2022-06-28',
|
|
17
|
+
},
|
|
18
|
+
body: JSON.stringify({
|
|
19
|
+
filter: {
|
|
20
|
+
property: 'object',
|
|
21
|
+
value: 'database',
|
|
22
|
+
},
|
|
23
|
+
page_size,
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
26
|
+
if (!response.ok) {
|
|
27
|
+
const error = await response.json();
|
|
28
|
+
return { error: 'Notion list databases failed', details: error };
|
|
29
|
+
}
|
|
30
|
+
return await response.json();
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=list-databases.js.map
|