@rnsk/toolkits 0.0.5 → 0.0.7
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 +21 -10
- package/dist/core/index.d.ts +1 -1
- package/dist/core/types.d.ts +43 -1
- package/dist/core/validate.d.ts +1 -1
- package/dist/core/validate.js +14 -2
- package/dist/index.d.ts +9 -1
- package/dist/index.js +17 -1
- package/dist/toolkits/aws/icon.d.ts +5 -0
- package/dist/toolkits/aws/icon.js +41 -0
- package/dist/toolkits/aws/manifest.d.ts +3 -0
- package/dist/toolkits/aws/manifest.js +27 -0
- package/dist/toolkits/aws/tools/client.d.ts +13 -0
- package/dist/toolkits/aws/tools/client.js +25 -0
- package/dist/toolkits/aws/tools/cloudwatch/filter-log-events.d.ts +26 -0
- package/dist/toolkits/aws/tools/cloudwatch/filter-log-events.js +45 -0
- package/dist/toolkits/aws/tools/cloudwatch/get-metric-data.d.ts +35 -0
- package/dist/toolkits/aws/tools/cloudwatch/get-metric-data.js +62 -0
- package/dist/toolkits/aws/tools/cloudwatch/list-alarms.d.ts +29 -0
- package/dist/toolkits/aws/tools/cloudwatch/list-alarms.js +46 -0
- package/dist/toolkits/aws/tools/cloudwatch/list-log-groups.d.ts +25 -0
- package/dist/toolkits/aws/tools/cloudwatch/list-log-groups.js +38 -0
- package/dist/toolkits/aws/tools/ec2/get-instance.d.ts +65 -0
- package/dist/toolkits/aws/tools/ec2/get-instance.js +46 -0
- package/dist/toolkits/aws/tools/ec2/list-instances.d.ts +30 -0
- package/dist/toolkits/aws/tools/ec2/list-instances.js +46 -0
- package/dist/toolkits/aws/tools/ec2/start-instance.d.ts +24 -0
- package/dist/toolkits/aws/tools/ec2/start-instance.js +31 -0
- package/dist/toolkits/aws/tools/ec2/stop-instance.d.ts +24 -0
- package/dist/toolkits/aws/tools/ec2/stop-instance.js +31 -0
- package/dist/toolkits/aws/tools/index.d.ts +273 -0
- package/dist/toolkits/aws/tools/index.js +68 -0
- package/dist/toolkits/docker-hub/icon.d.ts +5 -0
- package/dist/toolkits/docker-hub/icon.js +29 -0
- package/dist/toolkits/docker-hub/manifest.d.ts +3 -0
- package/dist/toolkits/docker-hub/manifest.js +32 -0
- package/dist/toolkits/docker-hub/tools/add-org-member.d.ts +29 -0
- package/dist/toolkits/docker-hub/tools/add-org-member.js +39 -0
- package/dist/toolkits/docker-hub/tools/create-organization.d.ts +6 -0
- package/dist/toolkits/docker-hub/tools/create-organization.js +28 -0
- package/dist/toolkits/docker-hub/tools/create-repository.d.ts +9 -0
- package/dist/toolkits/docker-hub/tools/create-repository.js +37 -0
- package/dist/toolkits/docker-hub/tools/create-webhook.d.ts +48 -0
- package/dist/toolkits/docker-hub/tools/create-webhook.js +51 -0
- package/dist/toolkits/docker-hub/tools/delete-image.d.ts +11 -0
- package/dist/toolkits/docker-hub/tools/delete-image.js +46 -0
- package/dist/toolkits/docker-hub/tools/delete-organization.d.ts +23 -0
- package/dist/toolkits/docker-hub/tools/delete-organization.js +29 -0
- package/dist/toolkits/docker-hub/tools/delete-repository.d.ts +21 -0
- package/dist/toolkits/docker-hub/tools/delete-repository.js +29 -0
- package/dist/toolkits/docker-hub/tools/delete-tag.d.ts +25 -0
- package/dist/toolkits/docker-hub/tools/delete-tag.js +29 -0
- package/dist/toolkits/docker-hub/tools/delete-team.d.ts +24 -0
- package/dist/toolkits/docker-hub/tools/delete-team.js +25 -0
- package/dist/toolkits/docker-hub/tools/delete-webhook.d.ts +25 -0
- package/dist/toolkits/docker-hub/tools/delete-webhook.js +31 -0
- package/dist/toolkits/docker-hub/tools/get-image.d.ts +75 -0
- package/dist/toolkits/docker-hub/tools/get-image.js +51 -0
- package/dist/toolkits/docker-hub/tools/get-repository.d.ts +6 -0
- package/dist/toolkits/docker-hub/tools/get-repository.js +25 -0
- package/dist/toolkits/docker-hub/tools/get-tag.d.ts +7 -0
- package/dist/toolkits/docker-hub/tools/get-tag.js +26 -0
- package/dist/toolkits/docker-hub/tools/get-team.d.ts +6 -0
- package/dist/toolkits/docker-hub/tools/get-team.js +25 -0
- package/dist/toolkits/docker-hub/tools/get-webhook.d.ts +26 -0
- package/dist/toolkits/docker-hub/tools/get-webhook.js +26 -0
- package/dist/toolkits/docker-hub/tools/index.d.ts +437 -0
- package/dist/toolkits/docker-hub/tools/index.js +165 -0
- package/dist/toolkits/docker-hub/tools/list-org-access-tokens.d.ts +7 -0
- package/dist/toolkits/docker-hub/tools/list-org-access-tokens.js +26 -0
- package/dist/toolkits/docker-hub/tools/list-org-members.d.ts +7 -0
- package/dist/toolkits/docker-hub/tools/list-org-members.js +26 -0
- package/dist/toolkits/docker-hub/tools/list-organizations.d.ts +6 -0
- package/dist/toolkits/docker-hub/tools/list-organizations.js +25 -0
- package/dist/toolkits/docker-hub/tools/list-repositories.d.ts +10 -0
- package/dist/toolkits/docker-hub/tools/list-repositories.js +35 -0
- package/dist/toolkits/docker-hub/tools/list-team-members.d.ts +9 -0
- package/dist/toolkits/docker-hub/tools/list-team-members.js +32 -0
- package/dist/toolkits/docker-hub/tools/list-teams.d.ts +7 -0
- package/dist/toolkits/docker-hub/tools/list-teams.js +26 -0
- package/dist/toolkits/docker-hub/tools/list-webhooks.d.ts +8 -0
- package/dist/toolkits/docker-hub/tools/list-webhooks.js +38 -0
- package/dist/toolkits/docker-hub/tools/remove-org-member.d.ts +21 -0
- package/dist/toolkits/docker-hub/tools/remove-org-member.js +25 -0
- package/dist/toolkits/docker-hub/tools/remove-team-member.d.ts +25 -0
- package/dist/toolkits/docker-hub/tools/remove-team-member.js +26 -0
- package/dist/toolkits/docker-hub/tools/utils.d.ts +24 -0
- package/dist/toolkits/docker-hub/tools/utils.js +87 -0
- package/dist/toolkits/gcp/icon.d.ts +5 -0
- package/dist/toolkits/gcp/icon.js +5 -0
- package/dist/toolkits/gcp/manifest.d.ts +3 -0
- package/dist/toolkits/gcp/manifest.js +27 -0
- package/dist/toolkits/gcp/tools/client.d.ts +12 -0
- package/dist/toolkits/gcp/tools/client.js +24 -0
- package/dist/toolkits/gcp/tools/compute/get-instance.d.ts +36 -0
- package/dist/toolkits/gcp/tools/compute/get-instance.js +37 -0
- package/dist/toolkits/gcp/tools/compute/list-instances.d.ts +20 -0
- package/dist/toolkits/gcp/tools/compute/list-instances.js +62 -0
- package/dist/toolkits/gcp/tools/compute/start-instance.d.ts +27 -0
- package/dist/toolkits/gcp/tools/compute/start-instance.js +29 -0
- package/dist/toolkits/gcp/tools/compute/stop-instance.d.ts +27 -0
- package/dist/toolkits/gcp/tools/compute/stop-instance.js +29 -0
- package/dist/toolkits/gcp/tools/index.d.ts +162 -0
- package/dist/toolkits/gcp/tools/index.js +52 -0
- package/dist/toolkits/gcp/tools/monitoring/get-metrics.d.ts +26 -0
- package/dist/toolkits/gcp/tools/monitoring/get-metrics.js +53 -0
- package/dist/toolkits/gcp/tools/monitoring/list-metric-descriptors.d.ts +24 -0
- package/dist/toolkits/gcp/tools/monitoring/list-metric-descriptors.js +40 -0
- package/dist/toolkits/github/tools/Git/create-blob.d.ts +1 -1
- package/dist/toolkits/github/tools/Issues/remove-issue-label.d.ts +1 -1
- package/dist/toolkits/github/tools/Repos/star-repo.d.ts +1 -1
- package/dist/toolkits/github/tools/Users/follow-user.d.ts +1 -1
- package/dist/toolkits/github/tools/index.d.ts +4 -4
- package/dist/toolkits/gmail/manifest.js +82 -2
- package/dist/toolkits/gmail/tools/batch-delete-messages.d.ts +26 -0
- package/dist/toolkits/gmail/tools/batch-delete-messages.js +33 -0
- package/dist/toolkits/gmail/tools/batch-modify-messages.d.ts +34 -0
- package/dist/toolkits/gmail/tools/batch-modify-messages.js +39 -0
- package/dist/toolkits/gmail/tools/create-filter.d.ts +24 -0
- package/dist/toolkits/gmail/tools/create-filter.js +35 -0
- package/dist/toolkits/gmail/tools/create-label.d.ts +27 -0
- package/dist/toolkits/gmail/tools/create-label.js +46 -0
- package/dist/toolkits/gmail/tools/delete-filter.d.ts +23 -0
- package/dist/toolkits/gmail/tools/delete-filter.js +31 -0
- package/dist/toolkits/gmail/tools/delete-label.d.ts +23 -0
- package/dist/toolkits/gmail/tools/delete-label.js +31 -0
- package/dist/toolkits/gmail/tools/delete-message.d.ts +23 -0
- package/dist/toolkits/gmail/tools/delete-message.js +31 -0
- package/dist/toolkits/gmail/tools/delete-thread.d.ts +23 -0
- package/dist/toolkits/gmail/tools/delete-thread.js +31 -0
- package/dist/toolkits/gmail/tools/forward-message.d.ts +37 -0
- package/dist/toolkits/gmail/tools/forward-message.js +112 -0
- package/dist/toolkits/gmail/tools/get-attachment.d.ts +40 -0
- package/dist/toolkits/gmail/tools/get-attachment.js +41 -0
- package/dist/toolkits/gmail/tools/get-auto-forwarding.d.ts +22 -0
- package/dist/toolkits/gmail/tools/get-auto-forwarding.js +30 -0
- package/dist/toolkits/gmail/tools/get-contacts.d.ts +8 -0
- package/dist/toolkits/gmail/tools/get-contacts.js +50 -0
- package/dist/toolkits/gmail/tools/get-filter.d.ts +23 -0
- package/dist/toolkits/gmail/tools/get-filter.js +31 -0
- package/dist/toolkits/gmail/tools/index.d.ts +13 -0
- package/dist/toolkits/gmail/tools/index.js +13 -0
- package/dist/toolkits/gmail/tools/utils.d.ts +23 -0
- package/dist/toolkits/gmail/tools/utils.js +51 -0
- package/dist/toolkits/google-forms/icon.d.ts +5 -0
- package/dist/toolkits/google-forms/icon.js +6 -0
- package/dist/toolkits/google-forms/manifest.d.ts +3 -0
- package/dist/toolkits/google-forms/manifest.js +43 -0
- package/dist/toolkits/google-forms/tools/batch-update-form.d.ts +11 -0
- package/dist/toolkits/google-forms/tools/batch-update-form.js +49 -0
- package/dist/toolkits/google-forms/tools/create-form.d.ts +8 -0
- package/dist/toolkits/google-forms/tools/create-form.js +44 -0
- package/dist/toolkits/google-forms/tools/create-watch.d.ts +8 -0
- package/dist/toolkits/google-forms/tools/create-watch.js +48 -0
- package/dist/toolkits/google-forms/tools/delete-watch.d.ts +21 -0
- package/dist/toolkits/google-forms/tools/delete-watch.js +28 -0
- package/dist/toolkits/google-forms/tools/get-form.d.ts +5 -0
- package/dist/toolkits/google-forms/tools/get-form.js +27 -0
- package/dist/toolkits/google-forms/tools/get-response.d.ts +6 -0
- package/dist/toolkits/google-forms/tools/get-response.js +28 -0
- package/dist/toolkits/google-forms/tools/index.d.ts +130 -0
- package/dist/toolkits/google-forms/tools/index.js +85 -0
- package/dist/toolkits/google-forms/tools/list-responses.d.ts +8 -0
- package/dist/toolkits/google-forms/tools/list-responses.js +44 -0
- package/dist/toolkits/google-forms/tools/list-watches.d.ts +5 -0
- package/dist/toolkits/google-forms/tools/list-watches.js +27 -0
- package/dist/toolkits/google-forms/tools/renew-watch.d.ts +6 -0
- package/dist/toolkits/google-forms/tools/renew-watch.js +28 -0
- package/dist/toolkits/google-forms/tools/set-publish-settings.d.ts +8 -0
- package/dist/toolkits/google-forms/tools/set-publish-settings.js +43 -0
- package/dist/toolkits/google-forms/tools/utils.d.ts +15 -0
- package/dist/toolkits/google-forms/tools/utils.js +33 -0
- package/dist/toolkits/google-meet/icon.d.ts +5 -0
- package/dist/toolkits/google-meet/icon.js +153 -0
- package/dist/toolkits/google-meet/manifest.d.ts +3 -0
- package/dist/toolkits/google-meet/manifest.js +44 -0
- package/dist/toolkits/google-meet/tools/create-meet.d.ts +5 -0
- package/dist/toolkits/google-meet/tools/create-meet.js +33 -0
- package/dist/toolkits/google-meet/tools/end-active-conference.d.ts +26 -0
- package/dist/toolkits/google-meet/tools/end-active-conference.js +37 -0
- package/dist/toolkits/google-meet/tools/get-conference-record-by-name.d.ts +5 -0
- package/dist/toolkits/google-meet/tools/get-conference-record-by-name.js +30 -0
- package/dist/toolkits/google-meet/tools/get-meet.d.ts +5 -0
- package/dist/toolkits/google-meet/tools/get-meet.js +30 -0
- package/dist/toolkits/google-meet/tools/get-participant-session.d.ts +5 -0
- package/dist/toolkits/google-meet/tools/get-participant-session.js +29 -0
- package/dist/toolkits/google-meet/tools/get-recordings-by-conference-record-id.d.ts +7 -0
- package/dist/toolkits/google-meet/tools/get-recordings-by-conference-record-id.js +32 -0
- package/dist/toolkits/google-meet/tools/get-transcript-entry.d.ts +5 -0
- package/dist/toolkits/google-meet/tools/get-transcript-entry.js +29 -0
- package/dist/toolkits/google-meet/tools/get-transcript.d.ts +5 -0
- package/dist/toolkits/google-meet/tools/get-transcript.js +29 -0
- package/dist/toolkits/google-meet/tools/get-transcripts-by-conference-record-id.d.ts +7 -0
- package/dist/toolkits/google-meet/tools/get-transcripts-by-conference-record-id.js +32 -0
- package/dist/toolkits/google-meet/tools/index.d.ts +156 -0
- package/dist/toolkits/google-meet/tools/index.js +125 -0
- package/dist/toolkits/google-meet/tools/list-conference-records.d.ts +7 -0
- package/dist/toolkits/google-meet/tools/list-conference-records.js +31 -0
- package/dist/toolkits/google-meet/tools/list-participant-sessions.d.ts +9 -0
- package/dist/toolkits/google-meet/tools/list-participant-sessions.js +34 -0
- package/dist/toolkits/google-meet/tools/list-participants.d.ts +8 -0
- package/dist/toolkits/google-meet/tools/list-participants.js +35 -0
- package/dist/toolkits/google-meet/tools/list-recordings.d.ts +7 -0
- package/dist/toolkits/google-meet/tools/list-recordings.js +34 -0
- package/dist/toolkits/google-meet/tools/list-transcript-entries.d.ts +8 -0
- package/dist/toolkits/google-meet/tools/list-transcript-entries.js +33 -0
- package/dist/toolkits/google-meet/tools/update-space.d.ts +7 -0
- package/dist/toolkits/google-meet/tools/update-space.js +42 -0
- package/dist/toolkits/google-meet/tools/utils.d.ts +14 -0
- package/dist/toolkits/google-meet/tools/utils.js +39 -0
- package/dist/toolkits/google-search-console/icon.d.ts +5 -0
- package/dist/toolkits/google-search-console/icon.js +6 -0
- package/dist/toolkits/google-search-console/manifest.d.ts +3 -0
- package/dist/toolkits/google-search-console/manifest.js +46 -0
- package/dist/toolkits/google-search-console/tools/add-site.d.ts +29 -0
- package/dist/toolkits/google-search-console/tools/add-site.js +27 -0
- package/dist/toolkits/google-search-console/tools/delete-site.d.ts +26 -0
- package/dist/toolkits/google-search-console/tools/delete-site.js +27 -0
- package/dist/toolkits/google-search-console/tools/get-site.d.ts +5 -0
- package/dist/toolkits/google-search-console/tools/get-site.js +27 -0
- package/dist/toolkits/google-search-console/tools/get-sitemap.d.ts +6 -0
- package/dist/toolkits/google-search-console/tools/get-sitemap.js +28 -0
- package/dist/toolkits/google-search-console/tools/index.d.ts +178 -0
- package/dist/toolkits/google-search-console/tools/index.js +77 -0
- package/dist/toolkits/google-search-console/tools/inspect-url.d.ts +7 -0
- package/dist/toolkits/google-search-console/tools/inspect-url.js +41 -0
- package/dist/toolkits/google-search-console/tools/list-sitemaps.d.ts +6 -0
- package/dist/toolkits/google-search-console/tools/list-sitemaps.js +31 -0
- package/dist/toolkits/google-search-console/tools/list-sites.d.ts +4 -0
- package/dist/toolkits/google-search-console/tools/list-sites.js +26 -0
- package/dist/toolkits/google-search-console/tools/search-analytics-query.d.ts +14 -0
- package/dist/toolkits/google-search-console/tools/search-analytics-query.js +73 -0
- package/dist/toolkits/google-search-console/tools/submit-sitemap.d.ts +33 -0
- package/dist/toolkits/google-search-console/tools/submit-sitemap.js +28 -0
- package/dist/toolkits/google-search-console/tools/utils.d.ts +24 -0
- package/dist/toolkits/google-search-console/tools/utils.js +57 -0
- package/dist/toolkits/google-slides/icon.d.ts +5 -0
- package/dist/toolkits/google-slides/icon.js +6 -0
- package/dist/toolkits/google-slides/manifest.d.ts +3 -0
- package/dist/toolkits/google-slides/manifest.js +46 -0
- package/dist/toolkits/google-slides/tools/create-presentation.d.ts +8 -0
- package/dist/toolkits/google-slides/tools/create-presentation.js +42 -0
- package/dist/toolkits/google-slides/tools/create-slides-markdown.d.ts +56 -0
- package/dist/toolkits/google-slides/tools/create-slides-markdown.js +70 -0
- package/dist/toolkits/google-slides/tools/get-page-thumbnail2.d.ts +8 -0
- package/dist/toolkits/google-slides/tools/get-page-thumbnail2.js +41 -0
- package/dist/toolkits/google-slides/tools/index.d.ts +139 -0
- package/dist/toolkits/google-slides/tools/index.js +69 -0
- package/dist/toolkits/google-slides/tools/markdown.d.ts +6 -0
- package/dist/toolkits/google-slides/tools/markdown.js +222 -0
- package/dist/toolkits/google-slides/tools/presentations-batch-update.d.ts +8 -0
- package/dist/toolkits/google-slides/tools/presentations-batch-update.js +58 -0
- package/dist/toolkits/google-slides/tools/presentations-copy-from-template.d.ts +7 -0
- package/dist/toolkits/google-slides/tools/presentations-copy-from-template.js +42 -0
- package/dist/toolkits/google-slides/tools/presentations-get.d.ts +7 -0
- package/dist/toolkits/google-slides/tools/presentations-get.js +58 -0
- package/dist/toolkits/google-slides/tools/presentations-pages-get-thumbnail.d.ts +8 -0
- package/dist/toolkits/google-slides/tools/presentations-pages-get-thumbnail.js +41 -0
- package/dist/toolkits/google-slides/tools/presentations-pages-get.d.ts +6 -0
- package/dist/toolkits/google-slides/tools/presentations-pages-get.js +28 -0
- package/dist/toolkits/google-slides/tools/utils.d.ts +22 -0
- package/dist/toolkits/google-slides/tools/utils.js +51 -0
- package/dist/toolkits/grafana/icon.d.ts +5 -0
- package/dist/toolkits/grafana/icon.js +6 -0
- package/dist/toolkits/grafana/manifest.d.ts +3 -0
- package/dist/toolkits/grafana/manifest.js +31 -0
- package/dist/toolkits/grafana/tools/create-otlp-v1-logs.d.ts +23 -0
- package/dist/toolkits/grafana/tools/create-otlp-v1-logs.js +41 -0
- package/dist/toolkits/grafana/tools/get-distributor-ha-tracker.d.ts +22 -0
- package/dist/toolkits/grafana/tools/get-distributor-ha-tracker.js +33 -0
- package/dist/toolkits/grafana/tools/get-health.d.ts +4 -0
- package/dist/toolkits/grafana/tools/get-health.js +32 -0
- package/dist/toolkits/grafana/tools/get-index-gateway-ring.d.ts +22 -0
- package/dist/toolkits/grafana/tools/get-index-gateway-ring.js +33 -0
- package/dist/toolkits/grafana/tools/get-overrides-exporter-ring.d.ts +22 -0
- package/dist/toolkits/grafana/tools/get-overrides-exporter-ring.js +33 -0
- package/dist/toolkits/grafana/tools/get-ruler-ring.d.ts +22 -0
- package/dist/toolkits/grafana/tools/get-ruler-ring.js +33 -0
- package/dist/toolkits/grafana/tools/get-status.d.ts +22 -0
- package/dist/toolkits/grafana/tools/get-status.js +35 -0
- package/dist/toolkits/grafana/tools/get-store-gateway-tenants.d.ts +25 -0
- package/dist/toolkits/grafana/tools/get-store-gateway-tenants.js +33 -0
- package/dist/toolkits/grafana/tools/index.d.ts +183 -0
- package/dist/toolkits/grafana/tools/index.js +93 -0
- package/dist/toolkits/grafana/tools/post-acs.d.ts +16 -0
- package/dist/toolkits/grafana/tools/post-acs.js +44 -0
- package/dist/toolkits/grafana/tools/query-public-dashboard.d.ts +29 -0
- package/dist/toolkits/grafana/tools/query-public-dashboard.js +70 -0
- package/dist/toolkits/grafana/tools/retrieve-jwks.d.ts +4 -0
- package/dist/toolkits/grafana/tools/retrieve-jwks.js +32 -0
- package/dist/toolkits/grafana/tools/utils.d.ts +21 -0
- package/dist/toolkits/grafana/tools/utils.js +48 -0
- package/package.json +7 -1
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { addSite } from './add-site.js';
|
|
2
|
+
import { deleteSite } from './delete-site.js';
|
|
3
|
+
import { getSite } from './get-site.js';
|
|
4
|
+
import { getSitemap } from './get-sitemap.js';
|
|
5
|
+
import { inspectUrl } from './inspect-url.js';
|
|
6
|
+
import { listSitemaps } from './list-sitemaps.js';
|
|
7
|
+
import { listSites } from './list-sites.js';
|
|
8
|
+
import { searchAnalyticsQuery } from './search-analytics-query.js';
|
|
9
|
+
import { submitSitemap } from './submit-sitemap.js';
|
|
10
|
+
export { addSite, deleteSite, getSite, getSitemap, inspectUrl, listSitemaps, listSites, searchAnalyticsQuery, submitSitemap, };
|
|
11
|
+
export declare const googleSearchConsoleTools: ({
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
tool: import("ai").Tool<{
|
|
15
|
+
googleSearchConsoleToken: string;
|
|
16
|
+
site_url: string;
|
|
17
|
+
}, {
|
|
18
|
+
error: string;
|
|
19
|
+
details: any;
|
|
20
|
+
statusCode: number;
|
|
21
|
+
success?: undefined;
|
|
22
|
+
site_url?: undefined;
|
|
23
|
+
data?: undefined;
|
|
24
|
+
message?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
success: boolean;
|
|
27
|
+
site_url: string;
|
|
28
|
+
data: any;
|
|
29
|
+
error?: undefined;
|
|
30
|
+
details?: undefined;
|
|
31
|
+
statusCode?: undefined;
|
|
32
|
+
message?: undefined;
|
|
33
|
+
} | {
|
|
34
|
+
error: string;
|
|
35
|
+
message: string;
|
|
36
|
+
details?: undefined;
|
|
37
|
+
statusCode?: undefined;
|
|
38
|
+
success?: undefined;
|
|
39
|
+
site_url?: undefined;
|
|
40
|
+
data?: undefined;
|
|
41
|
+
}>;
|
|
42
|
+
requiredAuth: "googleSearchConsoleToken";
|
|
43
|
+
scope: "write";
|
|
44
|
+
} | {
|
|
45
|
+
name: string;
|
|
46
|
+
description: string;
|
|
47
|
+
tool: import("ai").Tool<{
|
|
48
|
+
googleSearchConsoleToken: string;
|
|
49
|
+
site_url: string;
|
|
50
|
+
}, {
|
|
51
|
+
error: string;
|
|
52
|
+
details: any;
|
|
53
|
+
statusCode: number;
|
|
54
|
+
success?: undefined;
|
|
55
|
+
site_url?: undefined;
|
|
56
|
+
message?: undefined;
|
|
57
|
+
} | {
|
|
58
|
+
success: boolean;
|
|
59
|
+
site_url: string;
|
|
60
|
+
error?: undefined;
|
|
61
|
+
details?: undefined;
|
|
62
|
+
statusCode?: undefined;
|
|
63
|
+
message?: undefined;
|
|
64
|
+
} | {
|
|
65
|
+
error: string;
|
|
66
|
+
message: string;
|
|
67
|
+
details?: undefined;
|
|
68
|
+
statusCode?: undefined;
|
|
69
|
+
success?: undefined;
|
|
70
|
+
site_url?: undefined;
|
|
71
|
+
}>;
|
|
72
|
+
requiredAuth: "googleSearchConsoleToken";
|
|
73
|
+
scope: "delete";
|
|
74
|
+
} | {
|
|
75
|
+
name: string;
|
|
76
|
+
description: string;
|
|
77
|
+
tool: import("ai").Tool<{
|
|
78
|
+
googleSearchConsoleToken: string;
|
|
79
|
+
site_url: string;
|
|
80
|
+
}, any>;
|
|
81
|
+
requiredAuth: "googleSearchConsoleToken";
|
|
82
|
+
scope: "read";
|
|
83
|
+
} | {
|
|
84
|
+
name: string;
|
|
85
|
+
description: string;
|
|
86
|
+
tool: import("ai").Tool<{
|
|
87
|
+
googleSearchConsoleToken: string;
|
|
88
|
+
site_url: string;
|
|
89
|
+
feedpath: string;
|
|
90
|
+
}, any>;
|
|
91
|
+
requiredAuth: "googleSearchConsoleToken";
|
|
92
|
+
scope: "read";
|
|
93
|
+
} | {
|
|
94
|
+
name: string;
|
|
95
|
+
description: string;
|
|
96
|
+
tool: import("ai").Tool<{
|
|
97
|
+
googleSearchConsoleToken: string;
|
|
98
|
+
site_url: string;
|
|
99
|
+
inspection_url: string;
|
|
100
|
+
language_code?: string | undefined;
|
|
101
|
+
}, any>;
|
|
102
|
+
requiredAuth: "googleSearchConsoleToken";
|
|
103
|
+
scope: "read";
|
|
104
|
+
} | {
|
|
105
|
+
name: string;
|
|
106
|
+
description: string;
|
|
107
|
+
tool: import("ai").Tool<{
|
|
108
|
+
googleSearchConsoleToken: string;
|
|
109
|
+
site_url: string;
|
|
110
|
+
sitemap_index?: string | undefined;
|
|
111
|
+
}, any>;
|
|
112
|
+
requiredAuth: "googleSearchConsoleToken";
|
|
113
|
+
scope: "read";
|
|
114
|
+
} | {
|
|
115
|
+
name: string;
|
|
116
|
+
description: string;
|
|
117
|
+
tool: import("ai").Tool<{
|
|
118
|
+
googleSearchConsoleToken: string;
|
|
119
|
+
}, any>;
|
|
120
|
+
requiredAuth: "googleSearchConsoleToken";
|
|
121
|
+
scope: "read";
|
|
122
|
+
} | {
|
|
123
|
+
name: string;
|
|
124
|
+
description: string;
|
|
125
|
+
tool: import("ai").Tool<{
|
|
126
|
+
googleSearchConsoleToken: string;
|
|
127
|
+
site_url: string;
|
|
128
|
+
start_date: string;
|
|
129
|
+
end_date: string;
|
|
130
|
+
dimensions?: string[] | undefined;
|
|
131
|
+
search_type?: "video" | "web" | "image" | "news" | "discover" | "googleNews" | undefined;
|
|
132
|
+
aggregation_type?: "auto" | "byPage" | "byProperty" | undefined;
|
|
133
|
+
row_limit?: number | undefined;
|
|
134
|
+
start_row?: number | undefined;
|
|
135
|
+
data_state?: "all" | "final" | undefined;
|
|
136
|
+
dimension_filter_groups?: Record<string, unknown>[] | undefined;
|
|
137
|
+
}, any>;
|
|
138
|
+
requiredAuth: "googleSearchConsoleToken";
|
|
139
|
+
scope: "read";
|
|
140
|
+
} | {
|
|
141
|
+
name: string;
|
|
142
|
+
description: string;
|
|
143
|
+
tool: import("ai").Tool<{
|
|
144
|
+
googleSearchConsoleToken: string;
|
|
145
|
+
site_url: string;
|
|
146
|
+
feedpath: string;
|
|
147
|
+
}, {
|
|
148
|
+
error: string;
|
|
149
|
+
details: any;
|
|
150
|
+
statusCode: number;
|
|
151
|
+
success?: undefined;
|
|
152
|
+
site_url?: undefined;
|
|
153
|
+
feedpath?: undefined;
|
|
154
|
+
data?: undefined;
|
|
155
|
+
message?: undefined;
|
|
156
|
+
} | {
|
|
157
|
+
success: boolean;
|
|
158
|
+
site_url: string;
|
|
159
|
+
feedpath: string;
|
|
160
|
+
data: any;
|
|
161
|
+
error?: undefined;
|
|
162
|
+
details?: undefined;
|
|
163
|
+
statusCode?: undefined;
|
|
164
|
+
message?: undefined;
|
|
165
|
+
} | {
|
|
166
|
+
error: string;
|
|
167
|
+
message: string;
|
|
168
|
+
details?: undefined;
|
|
169
|
+
statusCode?: undefined;
|
|
170
|
+
success?: undefined;
|
|
171
|
+
site_url?: undefined;
|
|
172
|
+
feedpath?: undefined;
|
|
173
|
+
data?: undefined;
|
|
174
|
+
}>;
|
|
175
|
+
requiredAuth: "googleSearchConsoleToken";
|
|
176
|
+
scope: "write";
|
|
177
|
+
})[];
|
|
178
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { addSite } from './add-site.js';
|
|
3
|
+
import { deleteSite } from './delete-site.js';
|
|
4
|
+
import { getSite } from './get-site.js';
|
|
5
|
+
import { getSitemap } from './get-sitemap.js';
|
|
6
|
+
import { inspectUrl } from './inspect-url.js';
|
|
7
|
+
import { listSitemaps } from './list-sitemaps.js';
|
|
8
|
+
import { listSites } from './list-sites.js';
|
|
9
|
+
import { searchAnalyticsQuery } from './search-analytics-query.js';
|
|
10
|
+
import { submitSitemap } from './submit-sitemap.js';
|
|
11
|
+
export { addSite, deleteSite, getSite, getSitemap, inspectUrl, listSitemaps, listSites, searchAnalyticsQuery, submitSitemap, };
|
|
12
|
+
export const googleSearchConsoleTools = [
|
|
13
|
+
{
|
|
14
|
+
name: 'googleSearchConsoleAddSite',
|
|
15
|
+
description: 'Adds a site to the set of the user\'s sites in Google Search Console. This action registers a new property (site) in Google Search Console for the authenticated user. After adding the site, you will need to verify own...',
|
|
16
|
+
tool: addSite,
|
|
17
|
+
requiredAuth: 'googleSearchConsoleToken',
|
|
18
|
+
scope: 'write',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'googleSearchConsoleDeleteSite',
|
|
22
|
+
description: 'Removes a site from the user\'s Google Search Console sites. This action permanently removes a site property from the authenticated user\'s Search Console account. The site URL must be URL-encoded. Use this when you n...',
|
|
23
|
+
tool: deleteSite,
|
|
24
|
+
requiredAuth: 'googleSearchConsoleToken',
|
|
25
|
+
scope: 'delete',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'googleSearchConsoleGetSite',
|
|
29
|
+
description: 'Retrieves information about a specific Search Console site. Use when you need to get site details including permission level for a specific property.',
|
|
30
|
+
tool: getSite,
|
|
31
|
+
requiredAuth: 'googleSearchConsoleToken',
|
|
32
|
+
scope: 'read',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'googleSearchConsoleGetSitemap',
|
|
36
|
+
description: 'Retrieves sitemap metadata (submitted/indexed counts, errors, warnings, last-submission timestamps) for a specific sitemap in Search Console. Returns metadata only, not raw XML content. Note: numeric fields like `erro...',
|
|
37
|
+
tool: getSitemap,
|
|
38
|
+
requiredAuth: 'googleSearchConsoleToken',
|
|
39
|
+
scope: 'read',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'googleSearchConsoleInspectUrl',
|
|
43
|
+
description: 'Inspects a URL for indexing issues and status in Google Search Console. Results may reflect cached data lagging real changes by several days. High-volume use can trigger 429 quota errors; limit to priority URLs.',
|
|
44
|
+
tool: inspectUrl,
|
|
45
|
+
requiredAuth: 'googleSearchConsoleToken',
|
|
46
|
+
scope: 'read',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'googleSearchConsoleListSitemaps',
|
|
50
|
+
description: 'Lists all sitemaps for a site in Google Search Console. Response fields `errors`, `warnings`, `contents.submitted`, and `contents.indexed` may be returned as strings; cast to integers before numeric operations. Evalua...',
|
|
51
|
+
tool: listSitemaps,
|
|
52
|
+
requiredAuth: 'googleSearchConsoleToken',
|
|
53
|
+
scope: 'read',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'googleSearchConsoleListSites',
|
|
57
|
+
description: 'Lists all verified sites (properties) owned by the authenticated user in Google Search Console. Response contains a siteEntry array — always iterate it, never assume a single object. Each entry includes permissionLeve...',
|
|
58
|
+
tool: listSites,
|
|
59
|
+
requiredAuth: 'googleSearchConsoleToken',
|
|
60
|
+
scope: 'read',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'googleSearchConsoleSearchAnalyticsQuery',
|
|
64
|
+
description: 'Queries Google Search Console for search analytics data including clicks, impressions, CTR, and position metrics. Only returns URLs with at least one impression; missing rows do not confirm non-indexing. Position is a...',
|
|
65
|
+
tool: searchAnalyticsQuery,
|
|
66
|
+
requiredAuth: 'googleSearchConsoleToken',
|
|
67
|
+
scope: 'read',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'googleSearchConsoleSubmitSitemap',
|
|
71
|
+
description: 'Submits a sitemap to Google Search Console for indexing. This action registers or resubmits a sitemap for a verified property in Google Search Console. The sitemap file must be accessible at the specified URL and prop...',
|
|
72
|
+
tool: submitSitemap,
|
|
73
|
+
requiredAuth: 'googleSearchConsoleToken',
|
|
74
|
+
scope: 'write',
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { searchConsoleRequest } from './utils.js';
|
|
5
|
+
export const inspectUrl = tool({
|
|
6
|
+
description: 'Inspect a URL using the Google Search Console URL Inspection API. Returns indexing status and crawl details.',
|
|
7
|
+
inputSchema: z.object({
|
|
8
|
+
googleSearchConsoleToken: z.string().describe('The Google Search Console access token'),
|
|
9
|
+
site_url: z.string().describe('The Search Console property URL that owns the page'),
|
|
10
|
+
inspection_url: z.string().describe('The fully-qualified URL to inspect'),
|
|
11
|
+
language_code: z
|
|
12
|
+
.string()
|
|
13
|
+
.optional()
|
|
14
|
+
.describe('IETF BCP-47 language code for localizing results (e.g. en-US)'),
|
|
15
|
+
}),
|
|
16
|
+
execute: async ({ googleSearchConsoleToken, site_url, inspection_url, language_code }) => {
|
|
17
|
+
try {
|
|
18
|
+
const body = {
|
|
19
|
+
siteUrl: site_url,
|
|
20
|
+
inspectionUrl: inspection_url,
|
|
21
|
+
};
|
|
22
|
+
if (language_code)
|
|
23
|
+
body.languageCode = language_code;
|
|
24
|
+
const result = await searchConsoleRequest(googleSearchConsoleToken, '/urlInspection/index:inspect', {
|
|
25
|
+
method: 'POST',
|
|
26
|
+
body,
|
|
27
|
+
});
|
|
28
|
+
if (!result.ok) {
|
|
29
|
+
return { error: 'Failed to inspect URL', details: result.data, statusCode: result.status };
|
|
30
|
+
}
|
|
31
|
+
return result.data;
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
return {
|
|
35
|
+
error: 'Error inspecting URL',
|
|
36
|
+
message: error instanceof Error ? error.message : 'Unknown error',
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=inspect-url.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { encodeSiteUrl, webmastersRequest } from './utils.js';
|
|
5
|
+
export const listSitemaps = tool({
|
|
6
|
+
description: 'List sitemaps submitted for a site in Google Search Console.',
|
|
7
|
+
inputSchema: z.object({
|
|
8
|
+
googleSearchConsoleToken: z.string().describe('The Google Search Console access token'),
|
|
9
|
+
site_url: z.string().describe('The site URL including protocol'),
|
|
10
|
+
sitemap_index: z
|
|
11
|
+
.string()
|
|
12
|
+
.optional()
|
|
13
|
+
.describe('Optional sitemap index URL to list child sitemaps from'),
|
|
14
|
+
}),
|
|
15
|
+
execute: async ({ googleSearchConsoleToken, site_url, sitemap_index }) => {
|
|
16
|
+
try {
|
|
17
|
+
const result = await webmastersRequest(googleSearchConsoleToken, `/sites/${encodeSiteUrl(site_url)}/sitemaps`, { query: { sitemapIndex: sitemap_index } });
|
|
18
|
+
if (!result.ok) {
|
|
19
|
+
return { error: 'Failed to list sitemaps', details: result.data, statusCode: result.status };
|
|
20
|
+
}
|
|
21
|
+
return result.data;
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
return {
|
|
25
|
+
error: 'Error listing sitemaps',
|
|
26
|
+
message: error instanceof Error ? error.message : 'Unknown error',
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=list-sitemaps.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { webmastersRequest } from './utils.js';
|
|
5
|
+
export const listSites = tool({
|
|
6
|
+
description: 'List all site properties accessible to the authenticated user in Google Search Console.',
|
|
7
|
+
inputSchema: z.object({
|
|
8
|
+
googleSearchConsoleToken: z.string().describe('The Google Search Console access token'),
|
|
9
|
+
}),
|
|
10
|
+
execute: async ({ googleSearchConsoleToken }) => {
|
|
11
|
+
try {
|
|
12
|
+
const result = await webmastersRequest(googleSearchConsoleToken, '/sites');
|
|
13
|
+
if (!result.ok) {
|
|
14
|
+
return { error: 'Failed to list sites', details: result.data, statusCode: result.status };
|
|
15
|
+
}
|
|
16
|
+
return result.data;
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
return {
|
|
20
|
+
error: 'Error listing sites',
|
|
21
|
+
message: error instanceof Error ? error.message : 'Unknown error',
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=list-sites.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const searchAnalyticsQuery: import("ai").Tool<{
|
|
2
|
+
googleSearchConsoleToken: string;
|
|
3
|
+
site_url: string;
|
|
4
|
+
start_date: string;
|
|
5
|
+
end_date: string;
|
|
6
|
+
dimensions?: string[] | undefined;
|
|
7
|
+
search_type?: "video" | "web" | "image" | "news" | "discover" | "googleNews" | undefined;
|
|
8
|
+
aggregation_type?: "auto" | "byPage" | "byProperty" | undefined;
|
|
9
|
+
row_limit?: number | undefined;
|
|
10
|
+
start_row?: number | undefined;
|
|
11
|
+
data_state?: "all" | "final" | undefined;
|
|
12
|
+
dimension_filter_groups?: Record<string, unknown>[] | undefined;
|
|
13
|
+
}, any>;
|
|
14
|
+
//# sourceMappingURL=search-analytics-query.d.ts.map
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { encodeSiteUrl, webmastersRequest } from './utils.js';
|
|
5
|
+
export const searchAnalyticsQuery = tool({
|
|
6
|
+
description: 'Query Google Search Console search analytics data for a site over a date range with optional dimensions and filters.',
|
|
7
|
+
inputSchema: z.object({
|
|
8
|
+
googleSearchConsoleToken: z.string().describe('The Google Search Console access token'),
|
|
9
|
+
site_url: z.string().describe('The site URL including protocol or domain property'),
|
|
10
|
+
start_date: z.string().describe('Start date in YYYY-MM-DD format'),
|
|
11
|
+
end_date: z.string().describe('End date in YYYY-MM-DD format'),
|
|
12
|
+
dimensions: z
|
|
13
|
+
.array(z.string())
|
|
14
|
+
.optional()
|
|
15
|
+
.describe('Dimensions to group by (e.g. query, page, country, device, date)'),
|
|
16
|
+
search_type: z
|
|
17
|
+
.enum(['web', 'image', 'video', 'news', 'discover', 'googleNews'])
|
|
18
|
+
.optional()
|
|
19
|
+
.describe('Search type filter'),
|
|
20
|
+
aggregation_type: z
|
|
21
|
+
.enum(['auto', 'byPage', 'byProperty'])
|
|
22
|
+
.optional()
|
|
23
|
+
.describe('How data is aggregated'),
|
|
24
|
+
row_limit: z.number().min(1).max(25000).optional().describe('Maximum rows to return (1-25000)'),
|
|
25
|
+
start_row: z.number().min(0).optional().describe('First row for pagination'),
|
|
26
|
+
data_state: z.enum(['final', 'all']).optional().describe('Data state to return'),
|
|
27
|
+
dimension_filter_groups: z
|
|
28
|
+
.array(z.record(z.unknown()))
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('Optional dimension filter groups'),
|
|
31
|
+
}),
|
|
32
|
+
execute: async ({ googleSearchConsoleToken, site_url, start_date, end_date, dimensions, search_type, aggregation_type, row_limit, start_row, data_state, dimension_filter_groups, }) => {
|
|
33
|
+
try {
|
|
34
|
+
const body = {
|
|
35
|
+
startDate: start_date,
|
|
36
|
+
endDate: end_date,
|
|
37
|
+
};
|
|
38
|
+
if (dimensions)
|
|
39
|
+
body.dimensions = dimensions;
|
|
40
|
+
if (search_type)
|
|
41
|
+
body.type = search_type;
|
|
42
|
+
if (aggregation_type)
|
|
43
|
+
body.aggregationType = aggregation_type;
|
|
44
|
+
if (row_limit !== undefined)
|
|
45
|
+
body.rowLimit = row_limit;
|
|
46
|
+
if (start_row !== undefined)
|
|
47
|
+
body.startRow = start_row;
|
|
48
|
+
if (data_state)
|
|
49
|
+
body.dataState = data_state;
|
|
50
|
+
if (dimension_filter_groups)
|
|
51
|
+
body.dimensionFilterGroups = dimension_filter_groups;
|
|
52
|
+
const result = await webmastersRequest(googleSearchConsoleToken, `/sites/${encodeSiteUrl(site_url)}/searchAnalytics/query`, {
|
|
53
|
+
method: 'POST',
|
|
54
|
+
body,
|
|
55
|
+
});
|
|
56
|
+
if (!result.ok) {
|
|
57
|
+
return {
|
|
58
|
+
error: 'Failed to query search analytics',
|
|
59
|
+
details: result.data,
|
|
60
|
+
statusCode: result.status,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return result.data;
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
return {
|
|
67
|
+
error: 'Error querying search analytics',
|
|
68
|
+
message: error instanceof Error ? error.message : 'Unknown error',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=search-analytics-query.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const submitSitemap: import("ai").Tool<{
|
|
2
|
+
googleSearchConsoleToken: string;
|
|
3
|
+
site_url: string;
|
|
4
|
+
feedpath: string;
|
|
5
|
+
}, {
|
|
6
|
+
error: string;
|
|
7
|
+
details: any;
|
|
8
|
+
statusCode: number;
|
|
9
|
+
success?: undefined;
|
|
10
|
+
site_url?: undefined;
|
|
11
|
+
feedpath?: undefined;
|
|
12
|
+
data?: undefined;
|
|
13
|
+
message?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
success: boolean;
|
|
16
|
+
site_url: string;
|
|
17
|
+
feedpath: string;
|
|
18
|
+
data: any;
|
|
19
|
+
error?: undefined;
|
|
20
|
+
details?: undefined;
|
|
21
|
+
statusCode?: undefined;
|
|
22
|
+
message?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
error: string;
|
|
25
|
+
message: string;
|
|
26
|
+
details?: undefined;
|
|
27
|
+
statusCode?: undefined;
|
|
28
|
+
success?: undefined;
|
|
29
|
+
site_url?: undefined;
|
|
30
|
+
feedpath?: undefined;
|
|
31
|
+
data?: undefined;
|
|
32
|
+
}>;
|
|
33
|
+
//# sourceMappingURL=submit-sitemap.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { encodeFeedpath, encodeSiteUrl, webmastersRequest } from './utils.js';
|
|
5
|
+
export const submitSitemap = tool({
|
|
6
|
+
description: 'Submit a sitemap URL to Google Search Console for a site property.',
|
|
7
|
+
inputSchema: z.object({
|
|
8
|
+
googleSearchConsoleToken: z.string().describe('The Google Search Console access token'),
|
|
9
|
+
site_url: z.string().describe('The site URL as registered in Search Console'),
|
|
10
|
+
feedpath: z.string().describe('The full URL of the sitemap to submit'),
|
|
11
|
+
}),
|
|
12
|
+
execute: async ({ googleSearchConsoleToken, site_url, feedpath }) => {
|
|
13
|
+
try {
|
|
14
|
+
const result = await webmastersRequest(googleSearchConsoleToken, `/sites/${encodeSiteUrl(site_url)}/sitemaps/${encodeFeedpath(feedpath)}`, { method: 'PUT' });
|
|
15
|
+
if (!result.ok) {
|
|
16
|
+
return { error: 'Failed to submit sitemap', details: result.data, statusCode: result.status };
|
|
17
|
+
}
|
|
18
|
+
return { success: true, site_url, feedpath, data: result.data };
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
return {
|
|
22
|
+
error: 'Error submitting sitemap',
|
|
23
|
+
message: error instanceof Error ? error.message : 'Unknown error',
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=submit-sitemap.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const WEBMASTERS_BASE = "https://www.googleapis.com/webmasters/v3";
|
|
2
|
+
export declare const SEARCH_CONSOLE_BASE = "https://searchconsole.googleapis.com/v1";
|
|
3
|
+
export declare function encodeSiteUrl(siteUrl: string): string;
|
|
4
|
+
export declare function encodeFeedpath(feedpath: string): string;
|
|
5
|
+
export declare function buildQueryString(params: Record<string, unknown>): string;
|
|
6
|
+
export declare function webmastersRequest(googleSearchConsoleToken: string, path: string, options?: {
|
|
7
|
+
method?: string;
|
|
8
|
+
body?: unknown;
|
|
9
|
+
query?: Record<string, unknown>;
|
|
10
|
+
}): Promise<{
|
|
11
|
+
ok: boolean;
|
|
12
|
+
status: number;
|
|
13
|
+
data: any;
|
|
14
|
+
}>;
|
|
15
|
+
export declare function searchConsoleRequest(googleSearchConsoleToken: string, path: string, options?: {
|
|
16
|
+
method?: string;
|
|
17
|
+
body?: unknown;
|
|
18
|
+
query?: Record<string, unknown>;
|
|
19
|
+
}): Promise<{
|
|
20
|
+
ok: boolean;
|
|
21
|
+
status: number;
|
|
22
|
+
data: any;
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
export const WEBMASTERS_BASE = 'https://www.googleapis.com/webmasters/v3';
|
|
3
|
+
export const SEARCH_CONSOLE_BASE = 'https://searchconsole.googleapis.com/v1';
|
|
4
|
+
export function encodeSiteUrl(siteUrl) {
|
|
5
|
+
return encodeURIComponent(siteUrl);
|
|
6
|
+
}
|
|
7
|
+
export function encodeFeedpath(feedpath) {
|
|
8
|
+
return encodeURIComponent(feedpath);
|
|
9
|
+
}
|
|
10
|
+
export function buildQueryString(params) {
|
|
11
|
+
const search = new URLSearchParams();
|
|
12
|
+
for (const [key, value] of Object.entries(params)) {
|
|
13
|
+
if (value !== undefined && value !== null && value !== '') {
|
|
14
|
+
search.set(key, String(value));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const qs = search.toString();
|
|
18
|
+
return qs ? `?${qs}` : '';
|
|
19
|
+
}
|
|
20
|
+
export async function webmastersRequest(googleSearchConsoleToken, path, options) {
|
|
21
|
+
const normalizedPath = path.startsWith('/') ? path : `/${path}`;
|
|
22
|
+
const url = `${WEBMASTERS_BASE}${normalizedPath}${buildQueryString(options?.query ?? {})}`;
|
|
23
|
+
const headers = {
|
|
24
|
+
Authorization: `Bearer ${googleSearchConsoleToken}`,
|
|
25
|
+
Accept: 'application/json',
|
|
26
|
+
};
|
|
27
|
+
const method = options?.method ?? 'GET';
|
|
28
|
+
const fetchOptions = { method, headers };
|
|
29
|
+
if (options?.body !== undefined) {
|
|
30
|
+
headers['Content-Type'] = 'application/json';
|
|
31
|
+
fetchOptions.body = JSON.stringify(options.body);
|
|
32
|
+
}
|
|
33
|
+
const response = await fetch(url, fetchOptions);
|
|
34
|
+
if (response.status === 204) {
|
|
35
|
+
return { ok: response.ok, status: response.status, data: null };
|
|
36
|
+
}
|
|
37
|
+
const data = await response.json().catch(() => null);
|
|
38
|
+
return { ok: response.ok, status: response.status, data };
|
|
39
|
+
}
|
|
40
|
+
export async function searchConsoleRequest(googleSearchConsoleToken, path, options) {
|
|
41
|
+
const normalizedPath = path.startsWith('/') ? path : `/${path}`;
|
|
42
|
+
const url = `${SEARCH_CONSOLE_BASE}${normalizedPath}${buildQueryString(options?.query ?? {})}`;
|
|
43
|
+
const headers = {
|
|
44
|
+
Authorization: `Bearer ${googleSearchConsoleToken}`,
|
|
45
|
+
Accept: 'application/json',
|
|
46
|
+
};
|
|
47
|
+
const method = options?.method ?? 'GET';
|
|
48
|
+
const fetchOptions = { method, headers };
|
|
49
|
+
if (options?.body !== undefined) {
|
|
50
|
+
headers['Content-Type'] = 'application/json';
|
|
51
|
+
fetchOptions.body = JSON.stringify(options.body);
|
|
52
|
+
}
|
|
53
|
+
const response = await fetch(url, fetchOptions);
|
|
54
|
+
const data = await response.json().catch(() => null);
|
|
55
|
+
return { ok: response.ok, status: response.status, data };
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="192" height="192" fill="none" viewBox="0 0 192 192"><path fill="url(#a)" d="M12.591 63.318c-2.493-15.262 7.858-29.655 23.12-32.148l96.724-15.8c15.262-2.492 29.655 7.859 32.148 23.12l14.732 90.189c2.493 15.262-7.858 29.655-23.12 32.148l-96.724 15.8c-15.262 2.493-29.655-7.858-32.148-23.12z"/><path fill="url(#b)" d="M12 61.6c0-8.943 0-13.415 1.405-16.962a20 20 0 0 1 11.233-11.233C28.185 32 32.656 32 41.6 32h108.8c8.943 0 13.415 0 16.962 1.404a20 20 0 0 1 11.234 11.234C180 48.185 180 52.657 180 61.6v68.8c0 8.943 0 13.415-1.404 16.962a20 20 0 0 1-11.234 11.234C163.815 160 159.343 160 150.4 160H41.6c-8.943 0-13.415 0-16.963-1.404a20 20 0 0 1-11.232-11.234C12 143.815 12 139.343 12 130.4z"/><mask id="e" width="168" height="128" x="12" y="32" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#fec700" d="M12 61.6c0-8.943 0-13.415 1.405-16.962a20 20 0 0 1 11.233-11.233C28.185 32 32.656 32 41.6 32h108.8c8.943 0 13.415 0 16.962 1.404a20 20 0 0 1 11.234 11.234C180 48.185 180 52.657 180 61.6v68.8c0 8.943 0 13.415-1.404 16.962a20 20 0 0 1-11.234 11.234C163.815 160 159.343 160 150.4 160H41.6c-8.943 0-13.415 0-16.963-1.404a20 20 0 0 1-11.232-11.234C12 143.815 12 139.343 12 130.4z"/></mask><g filter="url(#c)" mask="url(#e)"><path fill="#ffbe00" d="m33.74 191.516 144.396-21.58L153.304 3.781 8.907 25.361z"/><path fill="url(#f)" d="m33.74 191.516 144.396-21.58L153.304 3.781 8.907 25.361z"/></g><path fill="#fff" fill-rule="evenodd" d="M148 58a6 6 0 0 1 6 6v64a6 6 0 0 1-6 6H44l-.309-.008A6 6 0 0 1 38 128V64a6 6 0 0 1 5.691-5.992L44 58zm-98 64h92V70H50z" clip-rule="evenodd"/><defs><linearGradient id="a" x1="84.07" x2="157.2" y1="23.27" y2="160.82" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="#ffdb0f"/><stop offset=".67" stop-color="#ffbe00"/><stop offset=".91" stop-color="#ffa8e3"/></linearGradient><linearGradient id="b" x1="96" x2="96" y1="32" y2="160" gradientUnits="userSpaceOnUse"><stop stop-color="#ffbe00"/><stop offset="1" stop-color="#fec700"/></linearGradient><linearGradient id="f" x1="108.52" x2="83.96" y1="168.16" y2="25.27" gradientUnits="userSpaceOnUse"><stop offset=".07" stop-color="#fff549"/><stop offset=".78" stop-color="#ffbe00" stop-opacity="0"/></linearGradient><filter id="c" width="193.23" height="211.73" x="-3.09" y="-8.22" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_37552_9023" stdDeviation="6"/></filter></defs></svg>`;
|
|
2
|
+
export const GSLIDES_ICON = {
|
|
3
|
+
kind: 'svg',
|
|
4
|
+
dataUri: `data:image/svg+xml;base64,${Buffer.from(SVG).toString('base64')}`,
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=icon.js.map
|