@oomol-lab/open-connector 1.9.1 → 1.9.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/assets/open-connector/catalog/apps/aisa.json +1946 -56
- package/assets/open-connector/catalog/apps/akta.json +1181 -0
- package/assets/open-connector/catalog/apps/asana.json +110 -0
- package/assets/open-connector/catalog/apps/calendly.json +103 -0
- package/assets/open-connector/catalog/apps/clickup.json +104 -0
- package/assets/open-connector/catalog/apps/cloro.json +9289 -0
- package/assets/open-connector/catalog/apps/contextdev.json +20670 -0
- package/assets/open-connector/catalog/apps/deepseek.json +177 -0
- package/assets/open-connector/catalog/apps/defillama.json +23747 -0
- package/assets/open-connector/catalog/apps/fireflies.json +103 -0
- package/assets/open-connector/catalog/apps/fundable.json +7926 -0
- package/assets/open-connector/catalog/apps/intercom.json +110 -0
- package/assets/open-connector/catalog/apps/jira.json +110 -0
- package/assets/open-connector/catalog/apps/keenable.json +235 -0
- package/assets/open-connector/catalog/apps/kolsprite_mcp.json +1227 -0
- package/assets/open-connector/catalog/apps/litescrape.json +52514 -0
- package/assets/open-connector/catalog/apps/magichour.json +5926 -0
- package/assets/open-connector/catalog/apps/minimax.json +24 -14
- package/assets/open-connector/catalog/apps/notion.json +731 -76
- package/assets/open-connector/catalog/apps/octen.json +5248 -0
- package/assets/open-connector/catalog/apps/openrouter.json +10 -0
- package/assets/open-connector/catalog/apps/orbit.json +3574 -0
- package/assets/open-connector/catalog/apps/pandadoc.json +68 -0
- package/assets/open-connector/catalog/apps/pipedrive.json +86 -0
- package/assets/open-connector/catalog/apps/ploid.json +9802 -0
- package/assets/open-connector/catalog/apps/resend.json +100 -0
- package/assets/open-connector/catalog/apps/salesforce.json +2487 -119
- package/assets/open-connector/catalog/apps/saperly.json +7056 -0
- package/assets/open-connector/catalog/apps/search1api.json +2382 -0
- package/assets/open-connector/catalog/apps/sentry.json +129 -0
- package/assets/open-connector/catalog/apps/slackbot.json +230 -1
- package/assets/open-connector/catalog/apps/surf.json +11378 -0
- package/assets/open-connector/catalog/apps/tally.json +113 -0
- package/assets/open-connector/catalog/apps/tinyfish.json +6154 -0
- package/assets/open-connector/catalog/apps/typeform.json +90 -1
- package/assets/open-connector/catalog/apps/vaquill.json +5944 -0
- package/assets/open-connector/catalog/apps/vercel.json +110 -0
- package/assets/open-connector/catalog/apps/weixin_store.json +1256 -7
- package/assets/open-connector/catalog/apps/zoom.json +112 -0
- package/assets/open-connector/catalog/apps-index.json +1 -1
- package/package.json +1 -1
- package/src/core/json-schema.d.ts +11 -3
- package/src/core/json-schema.js +13 -3
- package/src/providers/action-contracts.generated.d.ts +23 -6
- package/src/providers/aisa/executors.js +238 -6
- package/src/providers/aisa/firecrawl-actions.d.ts +9 -0
- package/src/providers/aisa/firecrawl-actions.js +115 -0
- package/src/providers/akta/actions.d.ts +9 -0
- package/src/providers/akta/actions.js +420 -0
- package/src/providers/akta/executors.d.ts +4 -0
- package/src/providers/akta/executors.js +103 -0
- package/src/providers/asana/executors.d.ts +2 -0
- package/src/providers/asana/executors.js +2 -0
- package/src/providers/asana/trigger-on-task-event.d.ts +2 -0
- package/src/providers/asana/trigger-on-task-event.definition.d.ts +4 -0
- package/src/providers/asana/trigger-on-task-event.definition.js +42 -0
- package/src/providers/asana/trigger-on-task-event.js +160 -0
- package/src/providers/calendly/executors.d.ts +2 -0
- package/src/providers/calendly/executors.js +2 -0
- package/src/providers/calendly/trigger-on-booking-event.d.ts +2 -0
- package/src/providers/calendly/trigger-on-booking-event.definition.d.ts +5 -0
- package/src/providers/calendly/trigger-on-booking-event.definition.js +42 -0
- package/src/providers/calendly/trigger-on-booking-event.js +144 -0
- package/src/providers/clickup/executors.d.ts +2 -0
- package/src/providers/clickup/executors.js +2 -0
- package/src/providers/clickup/trigger-on-task-event.d.ts +2 -0
- package/src/providers/clickup/trigger-on-task-event.definition.d.ts +4 -0
- package/src/providers/clickup/trigger-on-task-event.definition.js +41 -0
- package/src/providers/clickup/trigger-on-task-event.js +94 -0
- package/src/providers/cloro/actions.d.ts +12 -0
- package/src/providers/cloro/actions.js +155 -0
- package/src/providers/cloro/executors.d.ts +4 -0
- package/src/providers/cloro/executors.js +67 -0
- package/src/providers/cloro/inputs.d.ts +10 -0
- package/src/providers/cloro/inputs.js +680 -0
- package/src/providers/contextdev/actions.d.ts +14 -0
- package/src/providers/contextdev/actions.js +647 -0
- package/src/providers/contextdev/executors.d.ts +4 -0
- package/src/providers/contextdev/executors.js +109 -0
- package/src/providers/contextdev/files.d.ts +3 -0
- package/src/providers/contextdev/files.js +49 -0
- package/src/providers/contextdev/input-schemas.d.ts +49 -0
- package/src/providers/contextdev/input-schemas.js +3082 -0
- package/src/providers/contextdev/output-schemas.d.ts +49 -0
- package/src/providers/contextdev/output-schemas.js +1599 -0
- package/src/providers/deepseek/executors.d.ts +0 -5
- package/src/providers/deepseek/executors.js +38 -25
- package/src/providers/defillama/actions.d.ts +24 -0
- package/src/providers/defillama/actions.js +24 -0
- package/src/providers/defillama/dimensions-definitions.d.ts +2 -0
- package/src/providers/defillama/dimensions-definitions.js +1387 -0
- package/src/providers/defillama/ecosystem-definitions.d.ts +2 -0
- package/src/providers/defillama/ecosystem-definitions.js +758 -0
- package/src/providers/defillama/equities-definitions.d.ts +2 -0
- package/src/providers/defillama/equities-definitions.js +733 -0
- package/src/providers/defillama/executors.d.ts +4 -0
- package/src/providers/defillama/executors.js +196 -0
- package/src/providers/defillama/markets-definitions.d.ts +2 -0
- package/src/providers/defillama/markets-definitions.js +624 -0
- package/src/providers/defillama/shared-schemas.d.ts +71 -0
- package/src/providers/defillama/shared-schemas.js +157 -0
- package/src/providers/defillama/tvl-definitions.d.ts +2 -0
- package/src/providers/defillama/tvl-definitions.js +546 -0
- package/src/providers/defillama/yields-definitions.d.ts +2 -0
- package/src/providers/defillama/yields-definitions.js +766 -0
- package/src/providers/feishu_app_bot/trigger-on-event.js +2 -0
- package/src/providers/fireflies/executors.d.ts +2 -0
- package/src/providers/fireflies/executors.js +2 -0
- package/src/providers/fireflies/trigger-on-meeting-ready.d.ts +2 -0
- package/src/providers/fireflies/trigger-on-meeting-ready.definition.d.ts +4 -0
- package/src/providers/fireflies/trigger-on-meeting-ready.definition.js +44 -0
- package/src/providers/fireflies/trigger-on-meeting-ready.js +60 -0
- package/src/providers/fundable/actions.d.ts +8 -0
- package/src/providers/fundable/actions.js +1515 -0
- package/src/providers/fundable/executors.d.ts +4 -0
- package/src/providers/fundable/executors.js +74 -0
- package/src/providers/gmail/message.d.ts +1 -6
- package/src/providers/gmail/message.js +1 -1
- package/src/providers/intercom/executors.d.ts +2 -0
- package/src/providers/intercom/executors.js +2 -0
- package/src/providers/intercom/trigger-on-conversation-event.d.ts +2 -0
- package/src/providers/intercom/trigger-on-conversation-event.definition.d.ts +4 -0
- package/src/providers/intercom/trigger-on-conversation-event.definition.js +42 -0
- package/src/providers/intercom/trigger-on-conversation-event.js +23 -0
- package/src/providers/jira/executors.d.ts +2 -0
- package/src/providers/jira/executors.js +2 -0
- package/src/providers/jira/trigger-on-issue-event.d.ts +2 -0
- package/src/providers/jira/trigger-on-issue-event.definition.d.ts +4 -0
- package/src/providers/jira/trigger-on-issue-event.definition.js +44 -0
- package/src/providers/jira/trigger-on-issue-event.js +116 -0
- package/src/providers/jira/trigger-resource.d.ts +4 -0
- package/src/providers/jira/trigger-resource.js +141 -0
- package/src/providers/keenable/executors.d.ts +4 -0
- package/src/providers/keenable/executors.js +20 -0
- package/src/providers/keenable/runtime.d.ts +26 -0
- package/src/providers/keenable/runtime.js +89 -0
- package/src/providers/kolsprite_mcp/actions.d.ts +2 -0
- package/src/providers/kolsprite_mcp/actions.js +519 -0
- package/src/providers/kolsprite_mcp/executors.d.ts +4 -0
- package/src/providers/kolsprite_mcp/executors.js +89 -0
- package/src/providers/litescrape/actions.d.ts +12 -0
- package/src/providers/litescrape/actions.js +124 -0
- package/src/providers/litescrape/airbnb-schemas.d.ts +2 -0
- package/src/providers/litescrape/airbnb-schemas.js +72 -0
- package/src/providers/litescrape/aliexpress-schemas.d.ts +2 -0
- package/src/providers/litescrape/aliexpress-schemas.js +52 -0
- package/src/providers/litescrape/amazon-schemas.d.ts +2 -0
- package/src/providers/litescrape/amazon-schemas.js +358 -0
- package/src/providers/litescrape/apartments-schemas.d.ts +2 -0
- package/src/providers/litescrape/apartments-schemas.js +45 -0
- package/src/providers/litescrape/apple-schemas.d.ts +2 -0
- package/src/providers/litescrape/apple-schemas.js +215 -0
- package/src/providers/litescrape/ashby-schemas.d.ts +2 -0
- package/src/providers/litescrape/ashby-schemas.js +82 -0
- package/src/providers/litescrape/baidu-schemas.d.ts +2 -0
- package/src/providers/litescrape/baidu-schemas.js +31 -0
- package/src/providers/litescrape/bestbuy-schemas.d.ts +2 -0
- package/src/providers/litescrape/bestbuy-schemas.js +56 -0
- package/src/providers/litescrape/bing-schemas.d.ts +2 -0
- package/src/providers/litescrape/bing-schemas.js +315 -0
- package/src/providers/litescrape/brave-schemas.d.ts +2 -0
- package/src/providers/litescrape/brave-schemas.js +101 -0
- package/src/providers/litescrape/copilot-schemas.d.ts +2 -0
- package/src/providers/litescrape/copilot-schemas.js +590 -0
- package/src/providers/litescrape/duckduckgo-schemas.d.ts +2 -0
- package/src/providers/litescrape/duckduckgo-schemas.js +64 -0
- package/src/providers/litescrape/ebay-schemas.d.ts +2 -0
- package/src/providers/litescrape/ebay-schemas.js +300 -0
- package/src/providers/litescrape/etsy-schemas.d.ts +2 -0
- package/src/providers/litescrape/etsy-schemas.js +52 -0
- package/src/providers/litescrape/eventbrite-schemas.d.ts +2 -0
- package/src/providers/litescrape/eventbrite-schemas.js +43 -0
- package/src/providers/litescrape/executors.d.ts +4 -0
- package/src/providers/litescrape/executors.js +138 -0
- package/src/providers/litescrape/facebook-schemas.d.ts +2 -0
- package/src/providers/litescrape/facebook-schemas.js +283 -0
- package/src/providers/litescrape/glassdoor-schemas.d.ts +2 -0
- package/src/providers/litescrape/glassdoor-schemas.js +147 -0
- package/src/providers/litescrape/google-schemas.d.ts +2 -0
- package/src/providers/litescrape/google-schemas.js +1686 -0
- package/src/providers/litescrape/homedepot-schemas.d.ts +2 -0
- package/src/providers/litescrape/homedepot-schemas.js +58 -0
- package/src/providers/litescrape/homes-schemas.d.ts +2 -0
- package/src/providers/litescrape/homes-schemas.js +45 -0
- package/src/providers/litescrape/ikea-schemas.d.ts +2 -0
- package/src/providers/litescrape/ikea-schemas.js +56 -0
- package/src/providers/litescrape/indeed-schemas.d.ts +2 -0
- package/src/providers/litescrape/indeed-schemas.js +141 -0
- package/src/providers/litescrape/instagram-schemas.d.ts +2 -0
- package/src/providers/litescrape/instagram-schemas.js +234 -0
- package/src/providers/litescrape/kroger-schemas.d.ts +2 -0
- package/src/providers/litescrape/kroger-schemas.js +62 -0
- package/src/providers/litescrape/levels-schemas.d.ts +2 -0
- package/src/providers/litescrape/levels-schemas.js +153 -0
- package/src/providers/litescrape/naver-schemas.d.ts +2 -0
- package/src/providers/litescrape/naver-schemas.js +107 -0
- package/src/providers/litescrape/realtor-schemas.d.ts +2 -0
- package/src/providers/litescrape/realtor-schemas.js +47 -0
- package/src/providers/litescrape/redfin-schemas.d.ts +2 -0
- package/src/providers/litescrape/redfin-schemas.js +112 -0
- package/src/providers/litescrape/shared.d.ts +9 -0
- package/src/providers/litescrape/shared.js +1 -0
- package/src/providers/litescrape/sprouts-schemas.d.ts +2 -0
- package/src/providers/litescrape/sprouts-schemas.js +72 -0
- package/src/providers/litescrape/target-schemas.d.ts +2 -0
- package/src/providers/litescrape/target-schemas.js +56 -0
- package/src/providers/litescrape/tiktok-schemas.d.ts +2 -0
- package/src/providers/litescrape/tiktok-schemas.js +625 -0
- package/src/providers/litescrape/tools.d.ts +2 -0
- package/src/providers/litescrape/tools.js +88 -0
- package/src/providers/litescrape/tripadvisor-schemas.d.ts +2 -0
- package/src/providers/litescrape/tripadvisor-schemas.js +119 -0
- package/src/providers/litescrape/walmart-schemas.d.ts +2 -0
- package/src/providers/litescrape/walmart-schemas.js +52 -0
- package/src/providers/litescrape/wayfair-schemas.d.ts +2 -0
- package/src/providers/litescrape/wayfair-schemas.js +52 -0
- package/src/providers/litescrape/web-schemas.d.ts +2 -0
- package/src/providers/litescrape/web-schemas.js +463 -0
- package/src/providers/litescrape/wholefoods-schemas.d.ts +2 -0
- package/src/providers/litescrape/wholefoods-schemas.js +56 -0
- package/src/providers/litescrape/x-schemas.d.ts +2 -0
- package/src/providers/litescrape/x-schemas.js +128 -0
- package/src/providers/litescrape/yahoo-schemas.d.ts +2 -0
- package/src/providers/litescrape/yahoo-schemas.js +234 -0
- package/src/providers/litescrape/yandex-schemas.d.ts +2 -0
- package/src/providers/litescrape/yandex-schemas.js +179 -0
- package/src/providers/litescrape/yelp-schemas.d.ts +2 -0
- package/src/providers/litescrape/yelp-schemas.js +130 -0
- package/src/providers/litescrape/youtube-schemas.d.ts +2 -0
- package/src/providers/litescrape/youtube-schemas.js +128 -0
- package/src/providers/litescrape/zillow-schemas.d.ts +2 -0
- package/src/providers/litescrape/zillow-schemas.js +128 -0
- package/src/providers/litescrape/ziprecruiter-schemas.d.ts +2 -0
- package/src/providers/litescrape/ziprecruiter-schemas.js +96 -0
- package/src/providers/magichour/actions.d.ts +22 -0
- package/src/providers/magichour/actions.js +308 -0
- package/src/providers/magichour/audio-schemas.d.ts +2 -0
- package/src/providers/magichour/audio-schemas.js +54 -0
- package/src/providers/magichour/executors.d.ts +4 -0
- package/src/providers/magichour/executors.js +115 -0
- package/src/providers/magichour/image-schemas.d.ts +2 -0
- package/src/providers/magichour/image-schemas.js +443 -0
- package/src/providers/magichour/project-schemas.d.ts +8 -0
- package/src/providers/magichour/project-schemas.js +65 -0
- package/src/providers/magichour/shared-schemas.d.ts +8 -0
- package/src/providers/magichour/shared-schemas.js +18 -0
- package/src/providers/magichour/utility-schemas.d.ts +11 -0
- package/src/providers/magichour/utility-schemas.js +150 -0
- package/src/providers/magichour/video-schemas.d.ts +2 -0
- package/src/providers/magichour/video-schemas.js +629 -0
- package/src/providers/magichour/voices.d.ts +1 -0
- package/src/providers/magichour/voices.js +1268 -0
- package/src/providers/minimax/executors.js +19 -4
- package/src/providers/minimax/text-models.d.ts +2 -0
- package/src/providers/minimax/text-models.js +34 -0
- package/src/providers/moneyforward_mcp/manifest.d.ts +0 -2
- package/src/providers/moneyforward_mcp/manifest.js +1 -1
- package/src/providers/notion/executors.js +36 -3
- package/src/providers/octen/actions.d.ts +6 -0
- package/src/providers/octen/actions.js +919 -0
- package/src/providers/octen/executors.d.ts +4 -0
- package/src/providers/octen/executors.js +125 -0
- package/src/providers/octen/inputs.d.ts +2 -0
- package/src/providers/octen/inputs.js +2434 -0
- package/src/providers/octen/research.d.ts +1 -0
- package/src/providers/octen/research.js +86 -0
- package/src/providers/openrouter/executors.js +7 -4
- package/src/providers/orbit/actions.d.ts +2 -0
- package/src/providers/orbit/actions.js +3030 -0
- package/src/providers/orbit/executors.d.ts +4 -0
- package/src/providers/orbit/executors.js +106 -0
- package/src/providers/orbit/routes.d.ts +9 -0
- package/src/providers/orbit/routes.js +170 -0
- package/src/providers/pandadoc/executors.d.ts +2 -0
- package/src/providers/pandadoc/executors.js +2 -0
- package/src/providers/pandadoc/trigger-on-document-event.d.ts +2 -0
- package/src/providers/pandadoc/trigger-on-document-event.definition.d.ts +4 -0
- package/src/providers/pandadoc/trigger-on-document-event.definition.js +33 -0
- package/src/providers/pandadoc/trigger-on-document-event.js +96 -0
- package/src/providers/pipedrive/executors.d.ts +2 -0
- package/src/providers/pipedrive/executors.js +2 -0
- package/src/providers/pipedrive/trigger-on-crm-event.d.ts +2 -0
- package/src/providers/pipedrive/trigger-on-crm-event.definition.d.ts +4 -0
- package/src/providers/pipedrive/trigger-on-crm-event.definition.js +30 -0
- package/src/providers/pipedrive/trigger-on-crm-event.js +101 -0
- package/src/providers/ploid/actions.d.ts +16 -0
- package/src/providers/ploid/actions.js +23 -0
- package/src/providers/ploid/endpoints.json +8440 -0
- package/src/providers/ploid/executors.d.ts +4 -0
- package/src/providers/ploid/executors.js +119 -0
- package/src/providers/provider-runtime.d.ts +13 -0
- package/src/providers/provider-runtime.js +37 -4
- package/src/providers/registry.generated.js +17 -0
- package/src/providers/resend/executors.d.ts +2 -0
- package/src/providers/resend/executors.js +2 -0
- package/src/providers/resend/trigger-on-email-event.d.ts +2 -0
- package/src/providers/resend/trigger-on-email-event.definition.d.ts +4 -0
- package/src/providers/resend/trigger-on-email-event.definition.js +37 -0
- package/src/providers/resend/trigger-on-email-event.js +125 -0
- package/src/providers/salesforce/chatter-routes.d.ts +107 -0
- package/src/providers/salesforce/chatter-routes.js +140 -0
- package/src/providers/salesforce/context.d.ts +2 -2
- package/src/providers/salesforce/context.js +7 -4
- package/src/providers/salesforce/executors.js +10 -0
- package/src/providers/salesforce/runtime-approvals.d.ts +2 -0
- package/src/providers/salesforce/runtime-approvals.js +52 -0
- package/src/providers/salesforce/runtime-base.js +14 -3
- package/src/providers/salesforce/runtime-chatter.d.ts +2 -0
- package/src/providers/salesforce/runtime-chatter.js +78 -0
- package/src/providers/salesforce/runtime-knowledge.d.ts +2 -0
- package/src/providers/salesforce/runtime-knowledge.js +34 -0
- package/src/providers/salesforce/runtime-leads.d.ts +2 -0
- package/src/providers/salesforce/runtime-leads.js +117 -0
- package/src/providers/salesforce/runtime-platform.d.ts +2 -0
- package/src/providers/salesforce/runtime-platform.js +67 -0
- package/src/providers/saperly/actions.d.ts +17 -0
- package/src/providers/saperly/actions.js +869 -0
- package/src/providers/saperly/executors.d.ts +4 -0
- package/src/providers/saperly/executors.js +113 -0
- package/src/providers/saperly/schemas.d.ts +33 -0
- package/src/providers/saperly/schemas.js +601 -0
- package/src/providers/search1api/actions.d.ts +2 -0
- package/src/providers/search1api/actions.js +39 -0
- package/src/providers/search1api/executors.d.ts +4 -0
- package/src/providers/search1api/executors.js +72 -0
- package/src/providers/search1api/runtime.d.ts +3 -0
- package/src/providers/search1api/runtime.js +44 -0
- package/src/providers/search1api/schemas.d.ts +3 -0
- package/src/providers/search1api/schemas.js +1834 -0
- package/src/providers/sentry/executors.d.ts +2 -0
- package/src/providers/sentry/executors.js +2 -0
- package/src/providers/sentry/trigger-on-issue-alert.d.ts +2 -0
- package/src/providers/sentry/trigger-on-issue-alert.definition.d.ts +4 -0
- package/src/providers/sentry/trigger-on-issue-alert.definition.js +64 -0
- package/src/providers/sentry/trigger-on-issue-alert.js +80 -0
- package/src/providers/sf_express/runtime.d.ts +0 -16
- package/src/providers/sf_express/runtime.js +2 -2
- package/src/providers/slack/runtime.d.ts +6 -1
- package/src/providers/slack/runtime.js +21 -0
- package/src/providers/slackbot/actions.js +17 -1
- package/src/providers/slackbot/executors.d.ts +2 -0
- package/src/providers/slackbot/executors.js +5 -1
- package/src/providers/slackbot/trigger-on-event.d.ts +2 -0
- package/src/providers/slackbot/trigger-on-event.definition.d.ts +4 -0
- package/src/providers/slackbot/trigger-on-event.definition.js +57 -0
- package/src/providers/slackbot/trigger-on-event.js +23 -0
- package/src/providers/surf/actions.d.ts +21 -0
- package/src/providers/surf/actions.js +26 -0
- package/src/providers/surf/discovery-definitions.d.ts +2 -0
- package/src/providers/surf/discovery-definitions.js +871 -0
- package/src/providers/surf/equity-definitions.d.ts +2 -0
- package/src/providers/surf/equity-definitions.js +322 -0
- package/src/providers/surf/executors.d.ts +4 -0
- package/src/providers/surf/executors.js +131 -0
- package/src/providers/surf/market-definitions.d.ts +2 -0
- package/src/providers/surf/market-definitions.js +885 -0
- package/src/providers/surf/onchain-definitions.d.ts +2 -0
- package/src/providers/surf/onchain-definitions.js +901 -0
- package/src/providers/surf/prediction-definitions.d.ts +2 -0
- package/src/providers/surf/prediction-definitions.js +683 -0
- package/src/providers/surf/shared-schemas.d.ts +18 -0
- package/src/providers/surf/shared-schemas.js +37 -0
- package/src/providers/tally/executors.d.ts +2 -0
- package/src/providers/tally/executors.js +2 -0
- package/src/providers/tally/trigger-on-form-response.d.ts +2 -0
- package/src/providers/tally/trigger-on-form-response.definition.d.ts +4 -0
- package/src/providers/tally/trigger-on-form-response.definition.js +54 -0
- package/src/providers/tally/trigger-on-form-response.js +166 -0
- package/src/providers/tinyfish/actions.d.ts +6 -0
- package/src/providers/tinyfish/actions.js +19 -0
- package/src/providers/tinyfish/agent-actions.d.ts +2 -0
- package/src/providers/tinyfish/agent-actions.js +268 -0
- package/src/providers/tinyfish/data-actions.d.ts +2 -0
- package/src/providers/tinyfish/data-actions.js +186 -0
- package/src/providers/tinyfish/data-schemas.d.ts +7 -0
- package/src/providers/tinyfish/data-schemas.js +103 -0
- package/src/providers/tinyfish/endpoints.d.ts +14 -0
- package/src/providers/tinyfish/endpoints.js +1 -0
- package/src/providers/tinyfish/executors.d.ts +4 -0
- package/src/providers/tinyfish/executors.js +133 -0
- package/src/providers/tinyfish/management-actions.d.ts +2 -0
- package/src/providers/tinyfish/management-actions.js +524 -0
- package/src/providers/tinyfish/monitor-schemas.d.ts +5 -0
- package/src/providers/tinyfish/monitor-schemas.js +65 -0
- package/src/providers/tinyfish/research-schemas.d.ts +6 -0
- package/src/providers/tinyfish/research-schemas.js +71 -0
- package/src/providers/trello/executors.js +5 -2
- package/src/providers/typeform/executors.d.ts +2 -0
- package/src/providers/typeform/executors.js +2 -0
- package/src/providers/typeform/trigger-on-form-response.d.ts +2 -0
- package/src/providers/typeform/trigger-on-form-response.definition.d.ts +4 -0
- package/src/providers/typeform/trigger-on-form-response.definition.js +40 -0
- package/src/providers/typeform/trigger-on-form-response.js +68 -0
- package/src/providers/vaquill/actions.d.ts +13 -0
- package/src/providers/vaquill/actions.js +529 -0
- package/src/providers/vaquill/executors.d.ts +4 -0
- package/src/providers/vaquill/executors.js +141 -0
- package/src/providers/vaquill/schemas.d.ts +67 -0
- package/src/providers/vaquill/schemas.js +4953 -0
- package/src/providers/vercel/executors.d.ts +2 -0
- package/src/providers/vercel/executors.js +2 -0
- package/src/providers/vercel/trigger-on-deployment-event.d.ts +2 -0
- package/src/providers/vercel/trigger-on-deployment-event.definition.d.ts +5 -0
- package/src/providers/vercel/trigger-on-deployment-event.definition.js +41 -0
- package/src/providers/vercel/trigger-on-deployment-event.js +102 -0
- package/src/providers/weixin_bot/runtime.d.ts +0 -1
- package/src/providers/weixin_bot/runtime.js +1 -1
- package/src/providers/weixin_store/access-token.d.ts +3 -3
- package/src/providers/weixin_store/access-token.js +15 -7
- package/src/providers/weixin_store/executors.js +214 -1
- package/src/providers/zoom/executors.d.ts +2 -0
- package/src/providers/zoom/executors.js +2 -0
- package/src/providers/zoom/trigger-on-recording-ready.d.ts +2 -0
- package/src/providers/zoom/trigger-on-recording-ready.definition.d.ts +4 -0
- package/src/providers/zoom/trigger-on-recording-ready.definition.js +44 -0
- package/src/providers/zoom/trigger-on-recording-ready.js +39 -0
- package/src/server/api/action-example.js +12 -1
- package/src/server/api/pattern-example.js +35 -1
- package/src/server/api/trigger-routes.js +1 -1
- package/src/server/connect-app.js +1 -0
- package/src/triggers/common/integration.d.ts +15 -3
- package/src/triggers/common/integration.js +5 -0
- package/src/triggers/common/proxy.d.ts +7 -0
- package/src/triggers/managed-webhook.d.ts +13 -0
- package/src/triggers/managed-webhook.js +48 -0
- package/src/triggers/request.d.ts +5 -1
- package/src/triggers/request.js +2 -0
- package/src/triggers/resources.d.ts +8 -2
- package/src/triggers/resources.js +31 -0
- package/src/triggers/signature.d.ts +3 -3
- package/src/triggers/signature.js +4 -6
- package/src/triggers/sources/configuration-schema.d.ts +5 -0
- package/src/triggers/sources/configuration-schema.js +118 -0
- package/src/triggers/sources/configuration.d.ts +115 -0
- package/src/triggers/sources/configuration.js +1 -0
- package/src/triggers/sources/definition.d.ts +61 -0
- package/src/triggers/sources/definition.js +3 -0
- package/src/triggers/sources/feishu-demands.d.ts +6 -0
- package/src/triggers/sources/feishu-demands.js +24 -0
- package/src/triggers/sources/feishu-events.d.ts +19 -0
- package/src/triggers/sources/feishu-events.js +108 -0
- package/src/triggers/sources/feishu.d.ts +3 -0
- package/src/triggers/sources/feishu.js +85 -0
- package/src/triggers/sources/fireflies.d.ts +3 -0
- package/src/triggers/sources/fireflies.js +100 -0
- package/src/triggers/sources/intercom.d.ts +3 -0
- package/src/triggers/sources/intercom.js +86 -0
- package/src/triggers/sources/jira.d.ts +3 -0
- package/src/triggers/sources/jira.js +120 -0
- package/src/triggers/sources/operation.d.ts +42 -0
- package/src/triggers/sources/operation.js +146 -0
- package/src/triggers/sources/sentry.d.ts +3 -0
- package/src/triggers/sources/sentry.js +125 -0
- package/src/triggers/sources/signature.d.ts +1 -0
- package/src/triggers/sources/signature.js +10 -0
- package/src/triggers/sources/slack.d.ts +3 -0
- package/src/triggers/sources/slack.js +127 -0
- package/src/triggers/sources/zoom.d.ts +3 -0
- package/src/triggers/sources/zoom.js +113 -0
- package/src/triggers/trigger-runner.d.ts +2 -0
- package/src/triggers/trigger-runner.js +52 -16
|
@@ -0,0 +1,3082 @@
|
|
|
1
|
+
import { s } from "../../core/json-schema.js";
|
|
2
|
+
function parseRules(depth) {
|
|
3
|
+
const outputs = [
|
|
4
|
+
s.stringEnum("Output kind.", ["text", "html"]),
|
|
5
|
+
s.string("Attribute selector.", { pattern: "^@.*$" }),
|
|
6
|
+
];
|
|
7
|
+
if (depth < 5)
|
|
8
|
+
outputs.push(parseRules(depth + 1));
|
|
9
|
+
return s.object("Named CSS extraction rules, including nested rules.", {}, {
|
|
10
|
+
additionalProperties: s.anyOf("CSS selector or extraction rule.", [
|
|
11
|
+
s.string("CSS selector, optionally followed by an attribute.", {
|
|
12
|
+
minLength: 1,
|
|
13
|
+
maxLength: 2048,
|
|
14
|
+
}),
|
|
15
|
+
s.object("Extraction rule.", {
|
|
16
|
+
selector: s.string("CSS selector to match within the current page or parent rule.", {
|
|
17
|
+
minLength: 1,
|
|
18
|
+
maxLength: 2048,
|
|
19
|
+
}),
|
|
20
|
+
type: s.stringEnum("Return the first match with `item` or all matches with `list`.", ["item", "list"]),
|
|
21
|
+
output: s.anyOf("Return text, HTML, an attribute such as `@href`, or nested field rules. Defaults to text.", outputs),
|
|
22
|
+
}, { required: ["selector"] }),
|
|
23
|
+
]),
|
|
24
|
+
maxProperties: 100,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
const scrapeParseRulesSchema = parseRules(1);
|
|
28
|
+
const requestTagsSchema = s.array("Labels for filtering usage in the dashboard.", s.string("RequestTags item value.", { minLength: 1, maxLength: 50 }), { maxItems: 20 });
|
|
29
|
+
const scrapeFormatsSchema = s.object("ScrapeFormats value.", {
|
|
30
|
+
html: s.boolean("Rendered HTML."),
|
|
31
|
+
markdown: s.boolean("Page content as Markdown."),
|
|
32
|
+
screenshot: s.boolean("A screenshot of the page."),
|
|
33
|
+
images: s.boolean("Images found on the page."),
|
|
34
|
+
bytes: s.boolean("The original HTTP response body."),
|
|
35
|
+
parse: s.boolean("Fields extracted with custom rules or a prebuilt parser, returned as `parsed`."),
|
|
36
|
+
highlights: s.boolean("Markdown excerpts relevant to `highlightsParams.query`."),
|
|
37
|
+
json: s.boolean("An object matching `jsonParams.schema`, extracted from the page."),
|
|
38
|
+
product: s.boolean("Product details such as name, price, and availability."),
|
|
39
|
+
}, {
|
|
40
|
+
required: [],
|
|
41
|
+
not: {
|
|
42
|
+
allOf: [
|
|
43
|
+
{ not: { required: ["html"], properties: { html: { const: true } } } },
|
|
44
|
+
{ not: { required: ["markdown"], properties: { markdown: { const: true } } } },
|
|
45
|
+
{ not: { required: ["screenshot"], properties: { screenshot: { const: true } } } },
|
|
46
|
+
{ not: { required: ["images"], properties: { images: { const: true } } } },
|
|
47
|
+
{ not: { required: ["bytes"], properties: { bytes: { const: true } } } },
|
|
48
|
+
{ not: { required: ["parse"], properties: { parse: { const: true } } } },
|
|
49
|
+
{ not: { required: ["highlights"], properties: { highlights: { const: true } } } },
|
|
50
|
+
{ not: { required: ["json"], properties: { json: { const: true } } } },
|
|
51
|
+
{ not: { required: ["product"], properties: { product: { const: true } } } },
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
const scrapeMarkdownParamsSchema = s.object("ScrapeMarkdownParams value.", {
|
|
56
|
+
includeLinks: s.boolean("Keep link URLs in the Markdown (`html-conversion` only)."),
|
|
57
|
+
includeImages: s.boolean("Include images in the Markdown (`html-conversion` only)."),
|
|
58
|
+
inlineImages: s.stringEnum("How base64 images appear when `includeImages` is set (`html-conversion` only).", [
|
|
59
|
+
"placeholder",
|
|
60
|
+
"preserve",
|
|
61
|
+
]),
|
|
62
|
+
sourcePreference: s.array("Markdown sources in order of preference: `html-conversion` converts the page HTML, `markdown-direct` uses Markdown the site publishes.", s.stringEnum("sourcePreference item value.", ["html-conversion", "markdown-direct"]), { minItems: 1, uniqueItems: true }),
|
|
63
|
+
}, {
|
|
64
|
+
required: [],
|
|
65
|
+
allOf: [
|
|
66
|
+
{
|
|
67
|
+
if: { required: ["inlineImages"] },
|
|
68
|
+
then: { required: ["includeImages"], properties: { includeImages: { const: true } } },
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
if: {
|
|
72
|
+
required: ["sourcePreference"],
|
|
73
|
+
properties: { sourcePreference: { items: { not: { enum: ["html-conversion"] } } } },
|
|
74
|
+
},
|
|
75
|
+
then: {
|
|
76
|
+
properties: {
|
|
77
|
+
includeLinks: { not: {} },
|
|
78
|
+
includeImages: { not: {} },
|
|
79
|
+
inlineImages: { not: {} },
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
});
|
|
85
|
+
const scrapeScreenshotParamsSchema = s.object("ScrapeScreenshotParams value.", {
|
|
86
|
+
area: s.oneOf([
|
|
87
|
+
s.stringEnum("Page", ["viewport", "fullPage"]),
|
|
88
|
+
s.object("Element", {
|
|
89
|
+
selector: s.string("CSS selector matching exactly one visible element.", {
|
|
90
|
+
pattern: "\\S",
|
|
91
|
+
maxLength: 2048,
|
|
92
|
+
}),
|
|
93
|
+
}, { required: ["selector"] }),
|
|
94
|
+
s.object("Pixels from the document origin.", {
|
|
95
|
+
x: s.integer("Left edge of the capture, in pixels from the document origin.", {
|
|
96
|
+
minimum: 0,
|
|
97
|
+
maximum: 100000,
|
|
98
|
+
}),
|
|
99
|
+
y: s.integer("Top edge of the capture, in pixels from the document origin.", {
|
|
100
|
+
minimum: 0,
|
|
101
|
+
maximum: 100000,
|
|
102
|
+
}),
|
|
103
|
+
width: s.integer("Width of the capture in pixels.", { minimum: 1, maximum: 7680 }),
|
|
104
|
+
height: s.integer("Height of the capture in pixels.", { minimum: 1, maximum: 100000 }),
|
|
105
|
+
}, { required: ["x", "y", "width", "height"] }),
|
|
106
|
+
], {
|
|
107
|
+
description: "What to capture: `viewport`, `fullPage`, one element, or a rectangle. Max 40 megapixels.",
|
|
108
|
+
}),
|
|
109
|
+
format: s.stringEnum("Image format for the screenshot.", ["png", "jpeg", "webp"]),
|
|
110
|
+
}, { required: [] });
|
|
111
|
+
const scrapeImageParamsSchema = s.object("ScrapeImageParams value.", {
|
|
112
|
+
enrich: s.array("Extra data per image: `dimensions`, `classification`, or a hosted `file` URL.", s.stringEnum("enrich item value.", ["dimensions", "classification", "file"]), { minItems: 1, maxItems: 3, uniqueItems: true }),
|
|
113
|
+
dedupe: s.stringEnum("Set `visual` to drop visual duplicates, keeping the largest copy.", ["none", "visual"]),
|
|
114
|
+
}, { required: [] });
|
|
115
|
+
const scrapeParseParamsSchema = s.oneOf([
|
|
116
|
+
s.object("Custom parser", {
|
|
117
|
+
type: s.literal("custom", {
|
|
118
|
+
description: "Extract fields using custom CSS rules. This is the default when type is omitted.",
|
|
119
|
+
}),
|
|
120
|
+
rules: scrapeParseRulesSchema,
|
|
121
|
+
}, { required: ["rules"] }),
|
|
122
|
+
s.object("Prebuilt parser", {
|
|
123
|
+
type: s.literal("prebuilt", {
|
|
124
|
+
description: "Use a prebuilt parser instead of custom rules.",
|
|
125
|
+
}),
|
|
126
|
+
parser: s.stringEnum("The prebuilt parser to use. See https://docs.context.dev/scrape/prebuilt-parsers for supported sources, request options, and output schemas.", [
|
|
127
|
+
"google-maps",
|
|
128
|
+
"google-maps-reviews",
|
|
129
|
+
"google-play",
|
|
130
|
+
"google-play-reviews",
|
|
131
|
+
"app-store",
|
|
132
|
+
"app-store-reviews",
|
|
133
|
+
"g2-reviews",
|
|
134
|
+
"instagram-profile",
|
|
135
|
+
"instagram-post",
|
|
136
|
+
"instagram-feed",
|
|
137
|
+
"tiktok-profile",
|
|
138
|
+
"tiktok-video",
|
|
139
|
+
"tiktok-feed",
|
|
140
|
+
"tiktok-comments",
|
|
141
|
+
"tiktok-followers",
|
|
142
|
+
"tiktok-following",
|
|
143
|
+
"tiktok-user-search",
|
|
144
|
+
"emails",
|
|
145
|
+
"phone-numbers",
|
|
146
|
+
"links",
|
|
147
|
+
]),
|
|
148
|
+
sort: s.stringEnum("google-maps-reviews only. Order of data.reviews. newest, relevant, highest, and lowest follow Google; oldest returns the earliest reviews first, which Google itself does not offer.", ["newest", "oldest", "relevant", "highest", "lowest"]),
|
|
149
|
+
limit: s.integer("google-maps-reviews only. Maximum number of reviews to return. Defaults to 100; maximum 1000.", { minimum: 1, maximum: 1000 }),
|
|
150
|
+
}, { required: ["type", "parser"] }),
|
|
151
|
+
], {
|
|
152
|
+
description: "ScrapeParseParams value.",
|
|
153
|
+
});
|
|
154
|
+
const scrapeHighlightsParamsSchema = s.object("ScrapeHighlightsParams value.", {
|
|
155
|
+
query: s.string("The question or topic to find passages for.", {
|
|
156
|
+
minLength: 1,
|
|
157
|
+
maxLength: 2000,
|
|
158
|
+
}),
|
|
159
|
+
maxCharacters: s.integer("Maximum combined length of returned passages.", {
|
|
160
|
+
minimum: 100,
|
|
161
|
+
maximum: 20000,
|
|
162
|
+
}),
|
|
163
|
+
}, { required: ["query"] });
|
|
164
|
+
const scrapeJsonParamsSchema = s.object("ScrapeJsonParams value.", {
|
|
165
|
+
schema: s.object("JSON Schema (not an example object) for a top-level object, up to 50 KB. Use optional or nullable fields for missing facts.", {}, { required: [], additionalProperties: true }),
|
|
166
|
+
instructions: s.string("Extra guidance, such as which facts to prefer or how to read a field.", {
|
|
167
|
+
maxLength: 2000,
|
|
168
|
+
}),
|
|
169
|
+
}, { required: ["schema"] });
|
|
170
|
+
const scrapeProductParamsSchema = s.object("ScrapeProductParams value.", {
|
|
171
|
+
dedupeImages: s.boolean("Drop visually duplicate product images, keeping the largest copy."),
|
|
172
|
+
}, { required: [] });
|
|
173
|
+
const scrapeProfileSchema = s.oneOf([
|
|
174
|
+
s.object("Existing Profile", {
|
|
175
|
+
type: s.literal("existing", {
|
|
176
|
+
description: "Reuse a saved browser profile.",
|
|
177
|
+
}),
|
|
178
|
+
profileId: s.string("The ID returned in profile.id by an earlier scrape.", {
|
|
179
|
+
pattern: "^prof_[a-f0-9]{32}$",
|
|
180
|
+
}),
|
|
181
|
+
}, { required: ["type", "profileId"] }),
|
|
182
|
+
s.object("New Profile", {
|
|
183
|
+
type: s.literal("new", {
|
|
184
|
+
description: "Sign in and create a browser profile.",
|
|
185
|
+
}),
|
|
186
|
+
identifier: s.string("Username or email for the target website.", {
|
|
187
|
+
minLength: 1,
|
|
188
|
+
maxLength: 1024,
|
|
189
|
+
}),
|
|
190
|
+
password: s.string("Password used to sign in. It is never stored in the profile.", {
|
|
191
|
+
minLength: 1,
|
|
192
|
+
maxLength: 4096,
|
|
193
|
+
}),
|
|
194
|
+
description: s.string("Optional label shown when listing profiles with `GET /org/browser/profiles`.", {
|
|
195
|
+
minLength: 1,
|
|
196
|
+
maxLength: 500,
|
|
197
|
+
}),
|
|
198
|
+
}, { required: ["type", "identifier", "password"] }),
|
|
199
|
+
], {
|
|
200
|
+
description: "ScrapeProfile value.",
|
|
201
|
+
});
|
|
202
|
+
const scrapeActionSchema = s.oneOf([
|
|
203
|
+
s.object("Instruction", {
|
|
204
|
+
type: s.stringEnum("Use `perform` for a plain-language browser instruction.", ["perform"]),
|
|
205
|
+
action: s.string("One browser instruction, such as clicking a button or entering text.", {
|
|
206
|
+
minLength: 1,
|
|
207
|
+
maxLength: 500,
|
|
208
|
+
}),
|
|
209
|
+
}, { required: ["type", "action"] }),
|
|
210
|
+
s.object("Scroll", {
|
|
211
|
+
type: s.stringEnum("Use `scroll` to move through the page or a container.", ["scroll"]),
|
|
212
|
+
direction: s.stringEnum("Direction to scroll.", ["down", "up", "left", "right"]),
|
|
213
|
+
amount: s.oneOf([
|
|
214
|
+
s.integer("amount value.", { minimum: 1, maximum: 100000 }),
|
|
215
|
+
s.stringEnum("amount value.", ["viewport", "max"]),
|
|
216
|
+
], {
|
|
217
|
+
description: "Distance per scroll: pixels, one `viewport`, or `max` to reach the end.",
|
|
218
|
+
}),
|
|
219
|
+
selector: s.string("Scroll this container. Omit to scroll the page.", {
|
|
220
|
+
pattern: "\\S",
|
|
221
|
+
maxLength: 2000,
|
|
222
|
+
}),
|
|
223
|
+
maxScrolls: s.integer("Maximum number of scroll steps for this action.", {
|
|
224
|
+
minimum: 1,
|
|
225
|
+
maximum: 50,
|
|
226
|
+
}),
|
|
227
|
+
}, { required: ["type"] }),
|
|
228
|
+
s.object("Wait", {
|
|
229
|
+
type: s.stringEnum("Use `wait` to pause for a fixed duration.", ["wait"]),
|
|
230
|
+
milliseconds: s.integer("Time to pause in milliseconds before the next action.", {
|
|
231
|
+
minimum: 0,
|
|
232
|
+
maximum: 30000,
|
|
233
|
+
}),
|
|
234
|
+
}, { required: ["type", "milliseconds"] }),
|
|
235
|
+
s.object("Wait for element", {
|
|
236
|
+
type: s.stringEnum("Use `waitFor` to wait for a matching element.", ["waitFor"]),
|
|
237
|
+
selector: s.string("CSS selector to wait for before continuing.", {
|
|
238
|
+
pattern: "\\S",
|
|
239
|
+
maxLength: 2048,
|
|
240
|
+
}),
|
|
241
|
+
}, { required: ["type", "selector"] }),
|
|
242
|
+
], {
|
|
243
|
+
description: "Browser action",
|
|
244
|
+
});
|
|
245
|
+
const scrapePdfOptionsSchema = s.object("ScrapePdfOptions value.", {
|
|
246
|
+
startPage: s.integer("First page to parse, starting at 1.", { minimum: 1 }),
|
|
247
|
+
endPage: s.integer("Last page to parse. Must be at least `startPage`.", { minimum: 1 }),
|
|
248
|
+
ocr: s.stringEnum("Set `auto` to read scanned pages with OCR.", ["off", "auto"]),
|
|
249
|
+
}, { required: [] });
|
|
250
|
+
const scrapeSharedParamsSchema = s.object("ScrapeSharedParams value.", {
|
|
251
|
+
profile: s.describe(scrapeProfileSchema, "Create or reuse an authenticated browser profile. Requires a paid plan and an HTTPS target. Profiles persist session state, bypass shared caches, and cannot be combined with ZDR, custom headers, raw bytes, Google Maps, app store, Instagram, or G2 parsers. The emails, phone-numbers, and links parsers support profiles."),
|
|
252
|
+
country: s.string("Proxy country as a two-letter code, such as `US`. Case-insensitive.", {
|
|
253
|
+
pattern: "^[A-Za-z]{2}$",
|
|
254
|
+
}),
|
|
255
|
+
headers: s.object("HTTP headers to send to the target site. Requests with headers skip the cache.", {}, {
|
|
256
|
+
required: [],
|
|
257
|
+
additionalProperties: s.string("headers entry value.", {
|
|
258
|
+
maxLength: 8192,
|
|
259
|
+
pattern: "^[^\\r\\n]*$",
|
|
260
|
+
}),
|
|
261
|
+
propertyNames: {
|
|
262
|
+
pattern: "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$",
|
|
263
|
+
not: {
|
|
264
|
+
pattern: "^(?:[Hh][Oo][Ss][Tt]|[Cc][Oo][Nn][Tt][Ee][Nn][Tt]-[Ll][Ee][Nn][Gg][Tt][Hh]|[Cc][Oo][Nn][Nn][Ee][Cc][Tt][Ii][Oo][Nn]|[Kk][Ee][Ee][Pp]-[Aa][Ll][Ii][Vv][Ee]|[Pp][Rr][Oo][Xx][Yy]-[Aa][Uu][Tt][Hh][Ee][Nn][Tt][Ii][Cc][Aa][Tt][Ee]|[Pp][Rr][Oo][Xx][Yy]-[Aa][Uu][Tt][Hh][Oo][Rr][Ii][Zz][Aa][Tt][Ii][Oo][Nn]|[Pp][Rr][Oo][Xx][Yy]-[Cc][Oo][Nn][Nn][Ee][Cc][Tt][Ii][Oo][Nn]|[Tt][Ee]|[Tt][Rr][Aa][Ii][Ll][Ee][Rr]|[Tt][Rr][Aa][Nn][Ss][Ff][Ee][Rr]-[Ee][Nn][Cc][Oo][Dd][Ii][Nn][Gg]|[Uu][Pp][Gg][Rr][Aa][Dd][Ee]|[Ee][Xx][Pp][Ee][Cc][Tt])$",
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
}),
|
|
268
|
+
viewport: s.object("Browser size in pixels. Omit for 1920 × 1080. When provided, missing dimensions default to 1440 × 900.", {
|
|
269
|
+
width: s.integer("Browser viewport width in pixels.", { minimum: 240, maximum: 7680 }),
|
|
270
|
+
height: s.integer("Browser viewport height in pixels.", { minimum: 240, maximum: 4320 }),
|
|
271
|
+
}, { required: [] }),
|
|
272
|
+
theme: s.stringEnum("Emulate a light or dark color scheme.", ["light", "dark"]),
|
|
273
|
+
dismissCookies: s.boolean("Accept cookie banners before actions and capture."),
|
|
274
|
+
dismissPopups: s.boolean("Close other popups before actions and capture."),
|
|
275
|
+
actions: s.array("Browser steps run in order before capture. Requires a paid plan. Skips the cache.", scrapeActionSchema, { minItems: 1, maxItems: 5 }),
|
|
276
|
+
waitFor: s.oneOf([
|
|
277
|
+
s.integer("Milliseconds", { minimum: 0, maximum: 30000 }),
|
|
278
|
+
s.string("CSS selector", { pattern: "\\S", maxLength: 2048 }),
|
|
279
|
+
], {
|
|
280
|
+
description: "Milliseconds, or a CSS selector to wait for, after actions. Defaults to 500 (2000 with frames or XML).",
|
|
281
|
+
}),
|
|
282
|
+
settleAnimations: s.boolean("Wait for CSS animations to finish before capture. Defaults to `true` when `screenshot` is requested."),
|
|
283
|
+
mainContentOnly: s.boolean("Keep only the main content. Doesn't affect `screenshot`, `bytes`, or `product`."),
|
|
284
|
+
includeSelectors: s.array("Keep only elements matching these CSS selectors.", s.string("includeSelectors item value.", { pattern: "\\S", maxLength: 2048 }), { minItems: 1, maxItems: 50, uniqueItems: true }),
|
|
285
|
+
excludeSelectors: s.array("Remove elements matching these CSS selectors. Overrides `includeSelectors`.", s.string("excludeSelectors item value.", { pattern: "\\S", maxLength: 2048 }), { minItems: 1, maxItems: 50, uniqueItems: true }),
|
|
286
|
+
includeFrames: s.boolean("Include iframe content in HTML and text outputs. Screenshots always show visible frames."),
|
|
287
|
+
parsers: s.object("Document parsing options.", {
|
|
288
|
+
pdf: s.describe(scrapePdfOptionsSchema, "PDF page range and OCR."),
|
|
289
|
+
}, { required: [] }),
|
|
290
|
+
}, { required: [] });
|
|
291
|
+
const scrapeTimeoutSchema = s.object("Request deadline and what to return when it passes.", {
|
|
292
|
+
milliseconds: s.integer("Deadline in milliseconds.", { minimum: 1, maximum: 300000 }),
|
|
293
|
+
behavior: s.stringEnum('"fail" returns 408 at the deadline. "return-partial" returns available results; inspect the response’s partial flag. "return-partial" requires at least 5000 ms.', ["fail", "return-partial"]),
|
|
294
|
+
}, { required: ["milliseconds"] });
|
|
295
|
+
const newsSearchByNaturalLanguageSchema = s.object("Search all news with a plain-language query. Returns up to 100 matches, ordered by relevance.", {
|
|
296
|
+
type: s.stringEnum("Use `natural_language` to search all news with a plain-language query.", ["natural_language"]),
|
|
297
|
+
query: s.string('What to search for, in plain language, such as "chip export restrictions to China".', {
|
|
298
|
+
minLength: 2,
|
|
299
|
+
maxLength: 1000,
|
|
300
|
+
}),
|
|
301
|
+
}, { required: ["type", "query"] });
|
|
302
|
+
const newsSearchEntityByNameSchema = s.object("Identify the company by name.", {
|
|
303
|
+
type: s.stringEnum("Use `name` to identify the company by name.", ["name"]),
|
|
304
|
+
name: s.string("Company name.", { minLength: 2, maxLength: 200 }),
|
|
305
|
+
}, { required: ["type", "name"] });
|
|
306
|
+
const newsSearchEntityByDomainSchema = s.object("Identify the company by website domain.", {
|
|
307
|
+
type: s.stringEnum("Use `domain` to identify the company by website domain.", ["domain"]),
|
|
308
|
+
domain: s.string("Company website domain, such as apple.com.", {
|
|
309
|
+
minLength: 1,
|
|
310
|
+
maxLength: 253,
|
|
311
|
+
}),
|
|
312
|
+
}, { required: ["type", "domain"] });
|
|
313
|
+
const newsSearchEntityByTickerSchema = s.object("Identify the company by stock ticker, optionally scoped to an exchange.", {
|
|
314
|
+
type: s.stringEnum("Use `ticker` to identify a publicly traded company.", ["ticker"]),
|
|
315
|
+
ticker: s.string("Public-company ticker.", {
|
|
316
|
+
minLength: 1,
|
|
317
|
+
maxLength: 20,
|
|
318
|
+
pattern: "^[A-Za-z0-9.-]+$",
|
|
319
|
+
}),
|
|
320
|
+
exchange: s.stringEnum("Stock exchange the ticker trades on, used to disambiguate tickers listed on multiple exchanges.", [
|
|
321
|
+
"AMEX",
|
|
322
|
+
"AMS",
|
|
323
|
+
"AQS",
|
|
324
|
+
"ASX",
|
|
325
|
+
"ATH",
|
|
326
|
+
"BER",
|
|
327
|
+
"BME",
|
|
328
|
+
"BRU",
|
|
329
|
+
"BSE",
|
|
330
|
+
"BUD",
|
|
331
|
+
"BUE",
|
|
332
|
+
"BVC",
|
|
333
|
+
"CBOE",
|
|
334
|
+
"CNQ",
|
|
335
|
+
"CPH",
|
|
336
|
+
"DFM",
|
|
337
|
+
"DOH",
|
|
338
|
+
"DUB",
|
|
339
|
+
"DUS",
|
|
340
|
+
"DXE",
|
|
341
|
+
"EGX",
|
|
342
|
+
"FSX",
|
|
343
|
+
"HAM",
|
|
344
|
+
"HEL",
|
|
345
|
+
"HKSE",
|
|
346
|
+
"HOSE",
|
|
347
|
+
"ICE",
|
|
348
|
+
"IOB",
|
|
349
|
+
"IST",
|
|
350
|
+
"JKT",
|
|
351
|
+
"JNB",
|
|
352
|
+
"JPX",
|
|
353
|
+
"KLS",
|
|
354
|
+
"KOE",
|
|
355
|
+
"KSC",
|
|
356
|
+
"KUW",
|
|
357
|
+
"LIS",
|
|
358
|
+
"LSE",
|
|
359
|
+
"MCX",
|
|
360
|
+
"MEX",
|
|
361
|
+
"MIL",
|
|
362
|
+
"MUN",
|
|
363
|
+
"NASDAQ",
|
|
364
|
+
"NEO",
|
|
365
|
+
"NSE",
|
|
366
|
+
"NYSE",
|
|
367
|
+
"NZE",
|
|
368
|
+
"OSL",
|
|
369
|
+
"OTC",
|
|
370
|
+
"PAR",
|
|
371
|
+
"PNK",
|
|
372
|
+
"PRA",
|
|
373
|
+
"RIS",
|
|
374
|
+
"SAO",
|
|
375
|
+
"SAU",
|
|
376
|
+
"SES",
|
|
377
|
+
"SET",
|
|
378
|
+
"SGO",
|
|
379
|
+
"SHH",
|
|
380
|
+
"SHZ",
|
|
381
|
+
"SIX",
|
|
382
|
+
"STO",
|
|
383
|
+
"STU",
|
|
384
|
+
"TAI",
|
|
385
|
+
"TAL",
|
|
386
|
+
"TLV",
|
|
387
|
+
"TSX",
|
|
388
|
+
"TSXV",
|
|
389
|
+
"TWO",
|
|
390
|
+
"VIE",
|
|
391
|
+
"WSE",
|
|
392
|
+
"XETRA",
|
|
393
|
+
]),
|
|
394
|
+
}, { required: ["type", "ticker"] });
|
|
395
|
+
const newsSearchEntityByIsinSchema = s.object("Identify the company by International Securities Identification Number.", {
|
|
396
|
+
type: s.stringEnum("Use `isin` to identify the company by its securities identifier.", ["isin"]),
|
|
397
|
+
isin: s.string("International Securities Identification Number.", {
|
|
398
|
+
pattern: "^[A-Za-z]{2}[A-Za-z0-9]{9}[0-9]$",
|
|
399
|
+
}),
|
|
400
|
+
}, { required: ["type", "isin"] });
|
|
401
|
+
const newsSearchByEntitySchema = s.object("Find news about a specific company.", {
|
|
402
|
+
type: s.stringEnum("Use `entity` to find news about a specific company.", ["entity"]),
|
|
403
|
+
entity: s.oneOf([
|
|
404
|
+
newsSearchEntityByNameSchema,
|
|
405
|
+
newsSearchEntityByDomainSchema,
|
|
406
|
+
newsSearchEntityByTickerSchema,
|
|
407
|
+
newsSearchEntityByIsinSchema,
|
|
408
|
+
], {
|
|
409
|
+
description: "The company to search news for, identified by name, domain, ticker, or ISIN.",
|
|
410
|
+
}),
|
|
411
|
+
}, { required: ["type", "entity"] });
|
|
412
|
+
const partialTimeoutSchema = s.object("Request deadline and what to return when it passes.", {
|
|
413
|
+
milliseconds: s.integer("Deadline in milliseconds.", { minimum: 1000, maximum: 300000 }),
|
|
414
|
+
behavior: s.stringEnum('"fail" returns 408 at the deadline. "return-partial" returns available results; inspect the response’s partial flag.', ["fail", "return-partial"]),
|
|
415
|
+
}, { required: ["milliseconds"] });
|
|
416
|
+
const lenientPartialTimeoutSchema = s.object("Request deadline and what to return when it passes.", {
|
|
417
|
+
milliseconds: s.integer("Deadline in milliseconds.", { minimum: 1, maximum: 300000 }),
|
|
418
|
+
behavior: s.stringEnum('"fail" returns 408 at the deadline. "return-partial" returns available results; inspect the response’s partial flag.', ["fail", "return-partial"]),
|
|
419
|
+
}, { required: ["milliseconds"] });
|
|
420
|
+
const browserCountryCodeSchema = s.stringEnum("Fetch from this country (ISO 3166-1 alpha-2).", [
|
|
421
|
+
"ad",
|
|
422
|
+
"ae",
|
|
423
|
+
"af",
|
|
424
|
+
"ag",
|
|
425
|
+
"ai",
|
|
426
|
+
"al",
|
|
427
|
+
"am",
|
|
428
|
+
"ao",
|
|
429
|
+
"ar",
|
|
430
|
+
"at",
|
|
431
|
+
"au",
|
|
432
|
+
"aw",
|
|
433
|
+
"az",
|
|
434
|
+
"ba",
|
|
435
|
+
"bb",
|
|
436
|
+
"bd",
|
|
437
|
+
"be",
|
|
438
|
+
"bf",
|
|
439
|
+
"bg",
|
|
440
|
+
"bh",
|
|
441
|
+
"bi",
|
|
442
|
+
"bj",
|
|
443
|
+
"bm",
|
|
444
|
+
"bn",
|
|
445
|
+
"bo",
|
|
446
|
+
"bq",
|
|
447
|
+
"br",
|
|
448
|
+
"bs",
|
|
449
|
+
"bw",
|
|
450
|
+
"by",
|
|
451
|
+
"bz",
|
|
452
|
+
"ca",
|
|
453
|
+
"cd",
|
|
454
|
+
"cf",
|
|
455
|
+
"cg",
|
|
456
|
+
"ch",
|
|
457
|
+
"ci",
|
|
458
|
+
"cl",
|
|
459
|
+
"cm",
|
|
460
|
+
"cn",
|
|
461
|
+
"co",
|
|
462
|
+
"cr",
|
|
463
|
+
"cv",
|
|
464
|
+
"cw",
|
|
465
|
+
"cy",
|
|
466
|
+
"cz",
|
|
467
|
+
"de",
|
|
468
|
+
"dj",
|
|
469
|
+
"dk",
|
|
470
|
+
"dm",
|
|
471
|
+
"do",
|
|
472
|
+
"dz",
|
|
473
|
+
"ec",
|
|
474
|
+
"ee",
|
|
475
|
+
"eg",
|
|
476
|
+
"es",
|
|
477
|
+
"et",
|
|
478
|
+
"fi",
|
|
479
|
+
"fj",
|
|
480
|
+
"fr",
|
|
481
|
+
"ga",
|
|
482
|
+
"gb",
|
|
483
|
+
"gd",
|
|
484
|
+
"ge",
|
|
485
|
+
"gf",
|
|
486
|
+
"gg",
|
|
487
|
+
"gh",
|
|
488
|
+
"gm",
|
|
489
|
+
"gn",
|
|
490
|
+
"gp",
|
|
491
|
+
"gq",
|
|
492
|
+
"gr",
|
|
493
|
+
"gt",
|
|
494
|
+
"gu",
|
|
495
|
+
"gw",
|
|
496
|
+
"gy",
|
|
497
|
+
"hk",
|
|
498
|
+
"hn",
|
|
499
|
+
"hr",
|
|
500
|
+
"ht",
|
|
501
|
+
"hu",
|
|
502
|
+
"id",
|
|
503
|
+
"ie",
|
|
504
|
+
"il",
|
|
505
|
+
"im",
|
|
506
|
+
"in",
|
|
507
|
+
"iq",
|
|
508
|
+
"ir",
|
|
509
|
+
"is",
|
|
510
|
+
"it",
|
|
511
|
+
"je",
|
|
512
|
+
"jm",
|
|
513
|
+
"jo",
|
|
514
|
+
"jp",
|
|
515
|
+
"ke",
|
|
516
|
+
"kg",
|
|
517
|
+
"kh",
|
|
518
|
+
"kn",
|
|
519
|
+
"kr",
|
|
520
|
+
"kw",
|
|
521
|
+
"ky",
|
|
522
|
+
"kz",
|
|
523
|
+
"la",
|
|
524
|
+
"lb",
|
|
525
|
+
"lc",
|
|
526
|
+
"lk",
|
|
527
|
+
"lr",
|
|
528
|
+
"ls",
|
|
529
|
+
"lt",
|
|
530
|
+
"lu",
|
|
531
|
+
"lv",
|
|
532
|
+
"ly",
|
|
533
|
+
"ma",
|
|
534
|
+
"mc",
|
|
535
|
+
"md",
|
|
536
|
+
"me",
|
|
537
|
+
"mf",
|
|
538
|
+
"mg",
|
|
539
|
+
"mk",
|
|
540
|
+
"ml",
|
|
541
|
+
"mm",
|
|
542
|
+
"mn",
|
|
543
|
+
"mo",
|
|
544
|
+
"mq",
|
|
545
|
+
"mr",
|
|
546
|
+
"mt",
|
|
547
|
+
"mu",
|
|
548
|
+
"mv",
|
|
549
|
+
"mw",
|
|
550
|
+
"mx",
|
|
551
|
+
"my",
|
|
552
|
+
"mz",
|
|
553
|
+
"na",
|
|
554
|
+
"nc",
|
|
555
|
+
"ne",
|
|
556
|
+
"ng",
|
|
557
|
+
"ni",
|
|
558
|
+
"nl",
|
|
559
|
+
"no",
|
|
560
|
+
"np",
|
|
561
|
+
"nz",
|
|
562
|
+
"om",
|
|
563
|
+
"pa",
|
|
564
|
+
"pe",
|
|
565
|
+
"pf",
|
|
566
|
+
"pg",
|
|
567
|
+
"ph",
|
|
568
|
+
"pk",
|
|
569
|
+
"pl",
|
|
570
|
+
"pr",
|
|
571
|
+
"ps",
|
|
572
|
+
"pt",
|
|
573
|
+
"py",
|
|
574
|
+
"qa",
|
|
575
|
+
"re",
|
|
576
|
+
"ro",
|
|
577
|
+
"rs",
|
|
578
|
+
"ru",
|
|
579
|
+
"rw",
|
|
580
|
+
"sa",
|
|
581
|
+
"sc",
|
|
582
|
+
"sd",
|
|
583
|
+
"se",
|
|
584
|
+
"sg",
|
|
585
|
+
"si",
|
|
586
|
+
"sk",
|
|
587
|
+
"sl",
|
|
588
|
+
"sm",
|
|
589
|
+
"sn",
|
|
590
|
+
"so",
|
|
591
|
+
"sr",
|
|
592
|
+
"ss",
|
|
593
|
+
"st",
|
|
594
|
+
"sv",
|
|
595
|
+
"sx",
|
|
596
|
+
"sy",
|
|
597
|
+
"sz",
|
|
598
|
+
"tc",
|
|
599
|
+
"td",
|
|
600
|
+
"tg",
|
|
601
|
+
"th",
|
|
602
|
+
"tj",
|
|
603
|
+
"tl",
|
|
604
|
+
"tm",
|
|
605
|
+
"tn",
|
|
606
|
+
"tr",
|
|
607
|
+
"tt",
|
|
608
|
+
"tw",
|
|
609
|
+
"tz",
|
|
610
|
+
"ua",
|
|
611
|
+
"ug",
|
|
612
|
+
"us",
|
|
613
|
+
"uy",
|
|
614
|
+
"uz",
|
|
615
|
+
"vc",
|
|
616
|
+
"ve",
|
|
617
|
+
"vg",
|
|
618
|
+
"vi",
|
|
619
|
+
"vn",
|
|
620
|
+
"ye",
|
|
621
|
+
"yt",
|
|
622
|
+
"za",
|
|
623
|
+
"zm",
|
|
624
|
+
"zw",
|
|
625
|
+
]);
|
|
626
|
+
const webScrapeWaitActionSchema = s.object("Pause for a fixed number of milliseconds before continuing to the next action.", {
|
|
627
|
+
do: s.stringEnum("Use `wait` to pause for a fixed duration.", ["wait"]),
|
|
628
|
+
timeMs: s.integer("Time to pause in milliseconds before the next action.", {
|
|
629
|
+
minimum: 0,
|
|
630
|
+
maximum: 30000,
|
|
631
|
+
}),
|
|
632
|
+
}, { required: ["do", "timeMs"] });
|
|
633
|
+
const webScrapePerformActionSchema = s.object("Resolve and perform one natural-language browser action.", {
|
|
634
|
+
do: s.stringEnum("Use `perform` for a plain-language browser instruction.", ["perform"]),
|
|
635
|
+
action: s.string("One browser instruction, such as clicking a button or entering text.", {
|
|
636
|
+
minLength: 1,
|
|
637
|
+
maxLength: 500,
|
|
638
|
+
}),
|
|
639
|
+
}, { required: ["do", "action"] });
|
|
640
|
+
const webScrapeScrollActionSchema = s.object("Scroll the page or a selected scrollable container, waiting adaptively for content and dimensions to settle after each iteration.", {
|
|
641
|
+
do: s.stringEnum("Use `scroll` to move through the page or a container.", ["scroll"]),
|
|
642
|
+
direction: s.stringEnum("Direction to scroll. Defaults to down.", ["up", "down", "left", "right"]),
|
|
643
|
+
amount: s.anyOf("Pixels per scroll, one visible viewport, or the current scroll boundary. Defaults to viewport.", [
|
|
644
|
+
s.integer("amount value.", { minimum: 1, maximum: 100000 }),
|
|
645
|
+
s.stringEnum("amount value.", ["viewport", "max"]),
|
|
646
|
+
]),
|
|
647
|
+
container: s.string("CSS selector for the first matching scroll container. Defaults to the page.", {
|
|
648
|
+
minLength: 1,
|
|
649
|
+
maxLength: 2000,
|
|
650
|
+
}),
|
|
651
|
+
maxScrolls: s.integer("Maximum scroll iterations. Stops early when scrolling and scrollable extent stop changing. Defaults to 1.", { minimum: 1, maximum: 50 }),
|
|
652
|
+
}, { required: ["do"] });
|
|
653
|
+
const webScrapeActionSchema = s.oneOf([webScrapeWaitActionSchema, webScrapePerformActionSchema, webScrapeScrollActionSchema], {
|
|
654
|
+
description: "Browser action discriminated by `do`. Each variant exposes only its applicable fields.",
|
|
655
|
+
});
|
|
656
|
+
const supportedLanguageSchema = s.stringEnum("Language, e.g. `english`.", [
|
|
657
|
+
"afrikaans",
|
|
658
|
+
"albanian",
|
|
659
|
+
"amharic",
|
|
660
|
+
"arabic",
|
|
661
|
+
"armenian",
|
|
662
|
+
"assamese",
|
|
663
|
+
"aymara",
|
|
664
|
+
"azeri",
|
|
665
|
+
"basque",
|
|
666
|
+
"belarusian",
|
|
667
|
+
"bengali",
|
|
668
|
+
"bosnian",
|
|
669
|
+
"bulgarian",
|
|
670
|
+
"burmese",
|
|
671
|
+
"cantonese",
|
|
672
|
+
"catalan",
|
|
673
|
+
"cebuano",
|
|
674
|
+
"chinese",
|
|
675
|
+
"corsican",
|
|
676
|
+
"croatian",
|
|
677
|
+
"czech",
|
|
678
|
+
"danish",
|
|
679
|
+
"dutch",
|
|
680
|
+
"english",
|
|
681
|
+
"esperanto",
|
|
682
|
+
"estonian",
|
|
683
|
+
"farsi",
|
|
684
|
+
"fijian",
|
|
685
|
+
"finnish",
|
|
686
|
+
"french",
|
|
687
|
+
"galician",
|
|
688
|
+
"georgian",
|
|
689
|
+
"german",
|
|
690
|
+
"greek",
|
|
691
|
+
"guarani",
|
|
692
|
+
"gujarati",
|
|
693
|
+
"haitian-creole",
|
|
694
|
+
"hausa",
|
|
695
|
+
"hawaiian",
|
|
696
|
+
"hebrew",
|
|
697
|
+
"hindi",
|
|
698
|
+
"hmong",
|
|
699
|
+
"hungarian",
|
|
700
|
+
"icelandic",
|
|
701
|
+
"igbo",
|
|
702
|
+
"indonesian",
|
|
703
|
+
"irish",
|
|
704
|
+
"italian",
|
|
705
|
+
"japanese",
|
|
706
|
+
"javanese",
|
|
707
|
+
"kannada",
|
|
708
|
+
"kazakh",
|
|
709
|
+
"khmer",
|
|
710
|
+
"kinyarwanda",
|
|
711
|
+
"korean",
|
|
712
|
+
"kurdish",
|
|
713
|
+
"kyrgyz",
|
|
714
|
+
"lao",
|
|
715
|
+
"latin",
|
|
716
|
+
"latvian",
|
|
717
|
+
"lingala",
|
|
718
|
+
"lithuanian",
|
|
719
|
+
"luxembourgish",
|
|
720
|
+
"macedonian",
|
|
721
|
+
"malagasy",
|
|
722
|
+
"malay",
|
|
723
|
+
"malayalam",
|
|
724
|
+
"maltese",
|
|
725
|
+
"maori",
|
|
726
|
+
"marathi",
|
|
727
|
+
"mongolian",
|
|
728
|
+
"nepali",
|
|
729
|
+
"norwegian",
|
|
730
|
+
"odia",
|
|
731
|
+
"oromo",
|
|
732
|
+
"pashto",
|
|
733
|
+
"pidgin",
|
|
734
|
+
"polish",
|
|
735
|
+
"portuguese",
|
|
736
|
+
"punjabi",
|
|
737
|
+
"quechua",
|
|
738
|
+
"romanian",
|
|
739
|
+
"russian",
|
|
740
|
+
"samoan",
|
|
741
|
+
"scottish-gaelic",
|
|
742
|
+
"serbian",
|
|
743
|
+
"sesotho",
|
|
744
|
+
"shona",
|
|
745
|
+
"sindhi",
|
|
746
|
+
"sinhala",
|
|
747
|
+
"slovak",
|
|
748
|
+
"slovene",
|
|
749
|
+
"somali",
|
|
750
|
+
"spanish",
|
|
751
|
+
"sundanese",
|
|
752
|
+
"swahili",
|
|
753
|
+
"swedish",
|
|
754
|
+
"tagalog",
|
|
755
|
+
"tajik",
|
|
756
|
+
"tamil",
|
|
757
|
+
"tatar",
|
|
758
|
+
"telugu",
|
|
759
|
+
"thai",
|
|
760
|
+
"tibetan",
|
|
761
|
+
"tigrinya",
|
|
762
|
+
"tongan",
|
|
763
|
+
"tswana",
|
|
764
|
+
"turkish",
|
|
765
|
+
"turkmen",
|
|
766
|
+
"ukrainian",
|
|
767
|
+
"urdu",
|
|
768
|
+
"uyghur",
|
|
769
|
+
"uzbek",
|
|
770
|
+
"vietnamese",
|
|
771
|
+
"welsh",
|
|
772
|
+
"wolof",
|
|
773
|
+
"xhosa",
|
|
774
|
+
"yiddish",
|
|
775
|
+
"yoruba",
|
|
776
|
+
"zulu",
|
|
777
|
+
]);
|
|
778
|
+
const brandRetrieveByDomainRequestSchema = s.object("Retrieve brand data by domain. Cannot be combined with name, email, or ticker.", {
|
|
779
|
+
force_language: {
|
|
780
|
+
allOf: [supportedLanguageSchema, s.nullable(s.string("force language value."))],
|
|
781
|
+
description: "force language value.",
|
|
782
|
+
},
|
|
783
|
+
maxSpeed: s.boolean("Optional parameter to optimize the API call for maximum speed. When set to true, the API will skip time-consuming operations for faster response at the cost of less comprehensive data."),
|
|
784
|
+
maxAgeMs: s.integer("Maximum age of cached brand data in ms. Defaults to 3 months; clamped to 0–1 year. `0` refreshes."),
|
|
785
|
+
timeoutOpts: partialTimeoutSchema,
|
|
786
|
+
type: s.stringEnum("Discriminator for domain-based brand retrieval.", ["by_domain"]),
|
|
787
|
+
domain: s.string("Domain name to retrieve brand data for (e.g., 'stripe.com').", {
|
|
788
|
+
minLength: 3,
|
|
789
|
+
}),
|
|
790
|
+
tags: requestTagsSchema,
|
|
791
|
+
}, { required: ["type", "domain"] });
|
|
792
|
+
const countryGLSchema = s.stringEnum("Two-letter ISO 3166-1 alpha-2 country code (GL parameter) used to localize search.", [
|
|
793
|
+
"af",
|
|
794
|
+
"al",
|
|
795
|
+
"dz",
|
|
796
|
+
"as",
|
|
797
|
+
"ad",
|
|
798
|
+
"ao",
|
|
799
|
+
"ai",
|
|
800
|
+
"aq",
|
|
801
|
+
"ag",
|
|
802
|
+
"ar",
|
|
803
|
+
"am",
|
|
804
|
+
"aw",
|
|
805
|
+
"au",
|
|
806
|
+
"at",
|
|
807
|
+
"az",
|
|
808
|
+
"bs",
|
|
809
|
+
"bh",
|
|
810
|
+
"bd",
|
|
811
|
+
"bb",
|
|
812
|
+
"by",
|
|
813
|
+
"be",
|
|
814
|
+
"bz",
|
|
815
|
+
"bj",
|
|
816
|
+
"bm",
|
|
817
|
+
"bt",
|
|
818
|
+
"bo",
|
|
819
|
+
"ba",
|
|
820
|
+
"bw",
|
|
821
|
+
"bv",
|
|
822
|
+
"br",
|
|
823
|
+
"io",
|
|
824
|
+
"bn",
|
|
825
|
+
"bg",
|
|
826
|
+
"bf",
|
|
827
|
+
"bi",
|
|
828
|
+
"kh",
|
|
829
|
+
"cm",
|
|
830
|
+
"ca",
|
|
831
|
+
"cv",
|
|
832
|
+
"ky",
|
|
833
|
+
"cf",
|
|
834
|
+
"td",
|
|
835
|
+
"cl",
|
|
836
|
+
"cn",
|
|
837
|
+
"cx",
|
|
838
|
+
"cc",
|
|
839
|
+
"co",
|
|
840
|
+
"km",
|
|
841
|
+
"cg",
|
|
842
|
+
"cd",
|
|
843
|
+
"ck",
|
|
844
|
+
"cr",
|
|
845
|
+
"ci",
|
|
846
|
+
"hr",
|
|
847
|
+
"cu",
|
|
848
|
+
"cy",
|
|
849
|
+
"cz",
|
|
850
|
+
"dk",
|
|
851
|
+
"dj",
|
|
852
|
+
"dm",
|
|
853
|
+
"do",
|
|
854
|
+
"ec",
|
|
855
|
+
"eg",
|
|
856
|
+
"sv",
|
|
857
|
+
"gq",
|
|
858
|
+
"er",
|
|
859
|
+
"ee",
|
|
860
|
+
"et",
|
|
861
|
+
"fk",
|
|
862
|
+
"fo",
|
|
863
|
+
"fj",
|
|
864
|
+
"fi",
|
|
865
|
+
"fr",
|
|
866
|
+
"gf",
|
|
867
|
+
"pf",
|
|
868
|
+
"tf",
|
|
869
|
+
"ga",
|
|
870
|
+
"gm",
|
|
871
|
+
"ge",
|
|
872
|
+
"de",
|
|
873
|
+
"gh",
|
|
874
|
+
"gi",
|
|
875
|
+
"gr",
|
|
876
|
+
"gl",
|
|
877
|
+
"gd",
|
|
878
|
+
"gp",
|
|
879
|
+
"gu",
|
|
880
|
+
"gt",
|
|
881
|
+
"gn",
|
|
882
|
+
"gw",
|
|
883
|
+
"gy",
|
|
884
|
+
"ht",
|
|
885
|
+
"hm",
|
|
886
|
+
"va",
|
|
887
|
+
"hn",
|
|
888
|
+
"hk",
|
|
889
|
+
"hu",
|
|
890
|
+
"is",
|
|
891
|
+
"in",
|
|
892
|
+
"id",
|
|
893
|
+
"ir",
|
|
894
|
+
"iq",
|
|
895
|
+
"ie",
|
|
896
|
+
"il",
|
|
897
|
+
"it",
|
|
898
|
+
"jm",
|
|
899
|
+
"jp",
|
|
900
|
+
"jo",
|
|
901
|
+
"kz",
|
|
902
|
+
"ke",
|
|
903
|
+
"ki",
|
|
904
|
+
"kp",
|
|
905
|
+
"kr",
|
|
906
|
+
"kw",
|
|
907
|
+
"kg",
|
|
908
|
+
"la",
|
|
909
|
+
"lv",
|
|
910
|
+
"lb",
|
|
911
|
+
"ls",
|
|
912
|
+
"lr",
|
|
913
|
+
"ly",
|
|
914
|
+
"li",
|
|
915
|
+
"lt",
|
|
916
|
+
"lu",
|
|
917
|
+
"mo",
|
|
918
|
+
"mk",
|
|
919
|
+
"mg",
|
|
920
|
+
"mw",
|
|
921
|
+
"my",
|
|
922
|
+
"mv",
|
|
923
|
+
"ml",
|
|
924
|
+
"mt",
|
|
925
|
+
"mh",
|
|
926
|
+
"mq",
|
|
927
|
+
"mr",
|
|
928
|
+
"mu",
|
|
929
|
+
"yt",
|
|
930
|
+
"mx",
|
|
931
|
+
"fm",
|
|
932
|
+
"md",
|
|
933
|
+
"mc",
|
|
934
|
+
"mn",
|
|
935
|
+
"ms",
|
|
936
|
+
"ma",
|
|
937
|
+
"mz",
|
|
938
|
+
"mm",
|
|
939
|
+
"na",
|
|
940
|
+
"nr",
|
|
941
|
+
"np",
|
|
942
|
+
"nl",
|
|
943
|
+
"an",
|
|
944
|
+
"nc",
|
|
945
|
+
"nz",
|
|
946
|
+
"ni",
|
|
947
|
+
"ne",
|
|
948
|
+
"ng",
|
|
949
|
+
"nu",
|
|
950
|
+
"nf",
|
|
951
|
+
"mp",
|
|
952
|
+
"no",
|
|
953
|
+
"om",
|
|
954
|
+
"pk",
|
|
955
|
+
"pw",
|
|
956
|
+
"ps",
|
|
957
|
+
"pa",
|
|
958
|
+
"pg",
|
|
959
|
+
"py",
|
|
960
|
+
"pe",
|
|
961
|
+
"ph",
|
|
962
|
+
"pn",
|
|
963
|
+
"pl",
|
|
964
|
+
"pt",
|
|
965
|
+
"pr",
|
|
966
|
+
"qa",
|
|
967
|
+
"re",
|
|
968
|
+
"ro",
|
|
969
|
+
"ru",
|
|
970
|
+
"rw",
|
|
971
|
+
"sh",
|
|
972
|
+
"kn",
|
|
973
|
+
"lc",
|
|
974
|
+
"pm",
|
|
975
|
+
"vc",
|
|
976
|
+
"ws",
|
|
977
|
+
"sm",
|
|
978
|
+
"st",
|
|
979
|
+
"sa",
|
|
980
|
+
"sn",
|
|
981
|
+
"rs",
|
|
982
|
+
"sc",
|
|
983
|
+
"sl",
|
|
984
|
+
"sg",
|
|
985
|
+
"sk",
|
|
986
|
+
"si",
|
|
987
|
+
"sb",
|
|
988
|
+
"so",
|
|
989
|
+
"za",
|
|
990
|
+
"gs",
|
|
991
|
+
"es",
|
|
992
|
+
"lk",
|
|
993
|
+
"sd",
|
|
994
|
+
"sr",
|
|
995
|
+
"sj",
|
|
996
|
+
"sz",
|
|
997
|
+
"se",
|
|
998
|
+
"ch",
|
|
999
|
+
"sy",
|
|
1000
|
+
"tw",
|
|
1001
|
+
"tj",
|
|
1002
|
+
"tz",
|
|
1003
|
+
"th",
|
|
1004
|
+
"tl",
|
|
1005
|
+
"tg",
|
|
1006
|
+
"tk",
|
|
1007
|
+
"to",
|
|
1008
|
+
"tt",
|
|
1009
|
+
"tn",
|
|
1010
|
+
"tr",
|
|
1011
|
+
"tm",
|
|
1012
|
+
"tc",
|
|
1013
|
+
"tv",
|
|
1014
|
+
"ug",
|
|
1015
|
+
"ua",
|
|
1016
|
+
"ae",
|
|
1017
|
+
"gb",
|
|
1018
|
+
"us",
|
|
1019
|
+
"um",
|
|
1020
|
+
"uy",
|
|
1021
|
+
"uz",
|
|
1022
|
+
"vu",
|
|
1023
|
+
"ve",
|
|
1024
|
+
"vn",
|
|
1025
|
+
"vg",
|
|
1026
|
+
"vi",
|
|
1027
|
+
"wf",
|
|
1028
|
+
"eh",
|
|
1029
|
+
"ye",
|
|
1030
|
+
"zm",
|
|
1031
|
+
"zw",
|
|
1032
|
+
]);
|
|
1033
|
+
const brandRetrieveByNameRequestSchema = s.object("Retrieve brand data by company name. Cannot be combined with domain, email, or ticker.", {
|
|
1034
|
+
force_language: {
|
|
1035
|
+
allOf: [supportedLanguageSchema, s.nullable(s.string("force language value."))],
|
|
1036
|
+
description: "force language value.",
|
|
1037
|
+
},
|
|
1038
|
+
maxSpeed: s.boolean("Optional parameter to optimize the API call for maximum speed. When set to true, the API will skip time-consuming operations for faster response at the cost of less comprehensive data."),
|
|
1039
|
+
maxAgeMs: s.integer("Maximum age of cached brand data in ms. Defaults to 3 months; clamped to 0–1 year. `0` refreshes."),
|
|
1040
|
+
timeoutOpts: partialTimeoutSchema,
|
|
1041
|
+
type: s.stringEnum("Discriminator for name-based brand retrieval.", ["by_name"]),
|
|
1042
|
+
name: s.string("Company name to retrieve brand data for (e.g., 'Apple Inc').", {
|
|
1043
|
+
minLength: 3,
|
|
1044
|
+
maxLength: 30,
|
|
1045
|
+
}),
|
|
1046
|
+
country_gl: {
|
|
1047
|
+
allOf: [
|
|
1048
|
+
countryGLSchema,
|
|
1049
|
+
s.unknown("Optional country code hint (GL parameter) to specify the country when looking up by company name."),
|
|
1050
|
+
],
|
|
1051
|
+
description: "country gl value.",
|
|
1052
|
+
},
|
|
1053
|
+
tags: requestTagsSchema,
|
|
1054
|
+
}, { required: ["type", "name"] });
|
|
1055
|
+
const brandRetrieveByEmailRequestSchema = s.object("Retrieve brand data by email address. The domain is extracted from the email. Free and disposable email providers are rejected with 422. Cannot be combined with domain, name, or ticker.", {
|
|
1056
|
+
force_language: {
|
|
1057
|
+
allOf: [supportedLanguageSchema, s.nullable(s.string("force language value."))],
|
|
1058
|
+
description: "force language value.",
|
|
1059
|
+
},
|
|
1060
|
+
maxSpeed: s.boolean("Optional parameter to optimize the API call for maximum speed. When set to true, the API will skip time-consuming operations for faster response at the cost of less comprehensive data."),
|
|
1061
|
+
maxAgeMs: s.integer("Maximum age of cached brand data in ms. Defaults to 3 months; clamped to 0–1 year. `0` refreshes."),
|
|
1062
|
+
timeoutOpts: partialTimeoutSchema,
|
|
1063
|
+
type: s.stringEnum("Discriminator for email-based brand retrieval.", ["by_email"]),
|
|
1064
|
+
email: s.string("Email address to retrieve brand data for (e.g., 'jane@stripe.com').", {
|
|
1065
|
+
minLength: 1,
|
|
1066
|
+
format: "email",
|
|
1067
|
+
}),
|
|
1068
|
+
tags: requestTagsSchema,
|
|
1069
|
+
}, { required: ["type", "email"] });
|
|
1070
|
+
const stockExchangeSchema = s.stringEnum("Stock exchange code.", [
|
|
1071
|
+
"AMEX",
|
|
1072
|
+
"AMS",
|
|
1073
|
+
"AQS",
|
|
1074
|
+
"ASX",
|
|
1075
|
+
"ATH",
|
|
1076
|
+
"BER",
|
|
1077
|
+
"BME",
|
|
1078
|
+
"BRU",
|
|
1079
|
+
"BSE",
|
|
1080
|
+
"BUD",
|
|
1081
|
+
"BUE",
|
|
1082
|
+
"BVC",
|
|
1083
|
+
"CBOE",
|
|
1084
|
+
"CNQ",
|
|
1085
|
+
"CPH",
|
|
1086
|
+
"DFM",
|
|
1087
|
+
"DOH",
|
|
1088
|
+
"DUB",
|
|
1089
|
+
"DUS",
|
|
1090
|
+
"DXE",
|
|
1091
|
+
"EGX",
|
|
1092
|
+
"FSX",
|
|
1093
|
+
"HAM",
|
|
1094
|
+
"HEL",
|
|
1095
|
+
"HKSE",
|
|
1096
|
+
"HOSE",
|
|
1097
|
+
"ICE",
|
|
1098
|
+
"IOB",
|
|
1099
|
+
"IST",
|
|
1100
|
+
"JKT",
|
|
1101
|
+
"JNB",
|
|
1102
|
+
"JPX",
|
|
1103
|
+
"KLS",
|
|
1104
|
+
"KOE",
|
|
1105
|
+
"KSC",
|
|
1106
|
+
"KUW",
|
|
1107
|
+
"LIS",
|
|
1108
|
+
"LSE",
|
|
1109
|
+
"MCX",
|
|
1110
|
+
"MEX",
|
|
1111
|
+
"MIL",
|
|
1112
|
+
"MUN",
|
|
1113
|
+
"NASDAQ",
|
|
1114
|
+
"NEO",
|
|
1115
|
+
"NSE",
|
|
1116
|
+
"NYSE",
|
|
1117
|
+
"NZE",
|
|
1118
|
+
"OSL",
|
|
1119
|
+
"OTC",
|
|
1120
|
+
"PAR",
|
|
1121
|
+
"PNK",
|
|
1122
|
+
"PRA",
|
|
1123
|
+
"RIS",
|
|
1124
|
+
"SAO",
|
|
1125
|
+
"SAU",
|
|
1126
|
+
"SES",
|
|
1127
|
+
"SET",
|
|
1128
|
+
"SGO",
|
|
1129
|
+
"SHH",
|
|
1130
|
+
"SHZ",
|
|
1131
|
+
"SIX",
|
|
1132
|
+
"STO",
|
|
1133
|
+
"STU",
|
|
1134
|
+
"TAI",
|
|
1135
|
+
"TAL",
|
|
1136
|
+
"TLV",
|
|
1137
|
+
"TSX",
|
|
1138
|
+
"TSXV",
|
|
1139
|
+
"TWO",
|
|
1140
|
+
"VIE",
|
|
1141
|
+
"WSE",
|
|
1142
|
+
"XETRA",
|
|
1143
|
+
]);
|
|
1144
|
+
const brandRetrieveByTickerRequestSchema = s.object("Retrieve brand data by stock ticker. Cannot be combined with domain, name, or email.", {
|
|
1145
|
+
force_language: {
|
|
1146
|
+
allOf: [supportedLanguageSchema, s.nullable(s.string("force language value."))],
|
|
1147
|
+
description: "force language value.",
|
|
1148
|
+
},
|
|
1149
|
+
maxSpeed: s.boolean("Optional parameter to optimize the API call for maximum speed. When set to true, the API will skip time-consuming operations for faster response at the cost of less comprehensive data."),
|
|
1150
|
+
maxAgeMs: s.integer("Maximum age of cached brand data in ms. Defaults to 3 months; clamped to 0–1 year. `0` refreshes."),
|
|
1151
|
+
timeoutOpts: partialTimeoutSchema,
|
|
1152
|
+
type: s.stringEnum("Discriminator for ticker-based brand retrieval.", ["by_ticker"]),
|
|
1153
|
+
ticker: s.string("Stock ticker symbol to retrieve brand data for (e.g., 'AAPL').", {
|
|
1154
|
+
minLength: 1,
|
|
1155
|
+
maxLength: 15,
|
|
1156
|
+
pattern: "^[A-Za-z0-9.]+$",
|
|
1157
|
+
}),
|
|
1158
|
+
ticker_exchange: {
|
|
1159
|
+
allOf: [
|
|
1160
|
+
stockExchangeSchema,
|
|
1161
|
+
s.unknown("Optional stock exchange for the ticker. Defaults to NASDAQ if not specified."),
|
|
1162
|
+
],
|
|
1163
|
+
description: "ticker exchange value.",
|
|
1164
|
+
},
|
|
1165
|
+
tags: requestTagsSchema,
|
|
1166
|
+
}, { required: ["type", "ticker"] });
|
|
1167
|
+
const brandRetrieveByDirectUrlRequestSchema = s.object("Retrieve brand data from this exact URL. Cross-site enrichment and other lookup identifiers are excluded.", {
|
|
1168
|
+
type: s.stringEnum("Discriminator for direct-URL-based brand retrieval.", ["by_direct_url"]),
|
|
1169
|
+
direct_url: s.string("Full http(s) URL to fetch brand data from (e.g., 'https://stripe.com/enterprise'). Only this URL is fetched — not the entire internet.", { format: "uri" }),
|
|
1170
|
+
timeoutOpts: partialTimeoutSchema,
|
|
1171
|
+
tags: requestTagsSchema,
|
|
1172
|
+
}, { required: ["type", "direct_url"] });
|
|
1173
|
+
const brandRetrieveFromTransactionRequestSchema = s.object("Identify brand data from a transaction descriptor. Cannot be combined with domain, name, email, or ticker.", {
|
|
1174
|
+
type: s.stringEnum("Discriminator for transaction-based brand retrieval.", ["by_transaction"]),
|
|
1175
|
+
transaction_info: s.string("Transaction information to identify the brand.", {
|
|
1176
|
+
minLength: 3,
|
|
1177
|
+
maxLength: 500,
|
|
1178
|
+
}),
|
|
1179
|
+
force_language: {
|
|
1180
|
+
allOf: [supportedLanguageSchema, s.nullable(s.string("force language value."))],
|
|
1181
|
+
description: "force language value.",
|
|
1182
|
+
},
|
|
1183
|
+
maxSpeed: s.boolean("Optional parameter to optimize the API call for maximum speed. When set to true, the API will skip time-consuming operations for faster response at the cost of less comprehensive data."),
|
|
1184
|
+
timeoutOpts: partialTimeoutSchema,
|
|
1185
|
+
country_gl: {
|
|
1186
|
+
allOf: [
|
|
1187
|
+
countryGLSchema,
|
|
1188
|
+
s.unknown("Optional country code hint (GL parameter) to specify the country when identifying a transaction."),
|
|
1189
|
+
],
|
|
1190
|
+
description: "country gl value.",
|
|
1191
|
+
},
|
|
1192
|
+
city: s.string("Optional city name to prioritize when searching for the brand."),
|
|
1193
|
+
mcc: s.anyOf("Optional Merchant Category Code (MCC) to help identify the business category or industry.", [
|
|
1194
|
+
s.string("mcc value."),
|
|
1195
|
+
s.number("mcc value."),
|
|
1196
|
+
]),
|
|
1197
|
+
phone: s.anyOf("Optional phone number from the transaction to help verify brand match.", [
|
|
1198
|
+
s.string("phone value."),
|
|
1199
|
+
s.number("phone value."),
|
|
1200
|
+
]),
|
|
1201
|
+
high_confidence_only: s.boolean("When set to true, the API performs additional verification to ensure the identified brand matches the transaction with high confidence."),
|
|
1202
|
+
tags: requestTagsSchema,
|
|
1203
|
+
}, { required: ["type", "transaction_info"] });
|
|
1204
|
+
const utilityPrefetchDomainIdentifierSchema = s.object("Prefetch by domain.", {
|
|
1205
|
+
domain: s.string("Domain, e.g. `stripe.com`.", { minLength: 3 }),
|
|
1206
|
+
}, { required: ["domain"] });
|
|
1207
|
+
const utilityPrefetchEmailIdentifierSchema = s.object("Prefetch by email. The domain will be extracted and validated.", {
|
|
1208
|
+
email: s.string("Email address to prefetch data for. The domain will be extracted from the email. Free email providers (gmail.com, yahoo.com, etc.) and disposable email addresses are not allowed.", { minLength: 1, format: "email" }),
|
|
1209
|
+
}, { required: ["email"] });
|
|
1210
|
+
const utilityPrefetchIdentifierSchema = s.oneOf([utilityPrefetchDomainIdentifierSchema, utilityPrefetchEmailIdentifierSchema], {
|
|
1211
|
+
description: "Identifier of the target to prefetch. Provide exactly one of domain or email.",
|
|
1212
|
+
});
|
|
1213
|
+
const timeoutSchema = s.object("Request deadline and what to return when it passes.", {
|
|
1214
|
+
milliseconds: s.integer("Deadline in milliseconds.", { minimum: 1000, maximum: 300000 }),
|
|
1215
|
+
behavior: s.stringEnum('Only "fail" is supported: return 408 at the deadline.', ["fail"]),
|
|
1216
|
+
}, { required: ["milliseconds"] });
|
|
1217
|
+
const monitorsModeSchema = s.stringEnum("Always `web`. Optional.", ["web"]);
|
|
1218
|
+
const monitorsPageTargetSchema = s.object("Watch a single web page. Exact detection reports visible-text diffs; semantic detection judges confirmed stable diffs against `instructions`.", {
|
|
1219
|
+
type: s.stringEnum("Use `page` to watch one web page.", ["page"]),
|
|
1220
|
+
url: s.string("Public HTTP(S) page URL to monitor.", { format: "uri" }),
|
|
1221
|
+
instructions: s.string("Plain-language goal describing which page changes matter. When provided without change_detection, semantic detection is inferred.", { minLength: 1, maxLength: 2000 }),
|
|
1222
|
+
normalize_whitespace: s.boolean("Normalize whitespace before comparing or analyzing text."),
|
|
1223
|
+
include_selectors: s.array("Monitor these CSS-selected regions. Empty or omitted uses main content. Changes create a new baseline.", s.string("include selectors item value.", { minLength: 1, maxLength: 2048 }), { maxItems: 50 }),
|
|
1224
|
+
exclude_selectors: s.array("Remove matching regions after inclusions. Changes create a new baseline.", s.string("exclude selectors item value.", { minLength: 1, maxLength: 2048 }), { maxItems: 50 }),
|
|
1225
|
+
actions: s.nullable(s.array("Optional browser actions executed in array order after the page loads, before content is captured, on every run. Requires a paid plan. Maximum: 5 actions. Changes create a new baseline.", webScrapeActionSchema, { maxItems: 5 })),
|
|
1226
|
+
}, { required: ["type", "url"] });
|
|
1227
|
+
const monitorsSitemapTargetSchema = s.object("Watch a site’s URL inventory for confirmed additions and removals.", {
|
|
1228
|
+
type: s.stringEnum("Use `sitemap` to watch a site for added or removed URLs.", ["sitemap"]),
|
|
1229
|
+
url: s.string("Sitemap URL to monitor.", { format: "uri" }),
|
|
1230
|
+
include: s.array("URL path patterns to include (max 50).", s.string("include item value.", { minLength: 1, maxLength: 200 }), { maxItems: 50 }),
|
|
1231
|
+
exclude: s.array("URL path patterns to exclude (max 50).", s.string("exclude item value.", { minLength: 1, maxLength: 200 }), { maxItems: 50 }),
|
|
1232
|
+
max_urls: s.integer("Maximum number of sitemap URLs to track (capped at 10,000).", {
|
|
1233
|
+
minimum: 1,
|
|
1234
|
+
maximum: 10000,
|
|
1235
|
+
}),
|
|
1236
|
+
}, { required: ["type", "url"] });
|
|
1237
|
+
const monitorsExtractTargetSchema = s.object("Extract target", {
|
|
1238
|
+
type: s.stringEnum("Use `extract` to watch structured data across selected pages.", ["extract"]),
|
|
1239
|
+
url: s.string("Root URL to extract structured data from.", { format: "uri" }),
|
|
1240
|
+
schema: s.object("JSON Schema for page selection and the baseline snapshot. Changes return diffs and evidence.", {}, { required: [], additionalProperties: s.unknown("schema entry value.") }),
|
|
1241
|
+
instructions: s.string("Natural-language instructions guiding which pages and facts to track and which changes to report.", { minLength: 1, maxLength: 2000 }),
|
|
1242
|
+
max_pages: s.integer("Maximum number of pages to track.", { minimum: 1, maximum: 50 }),
|
|
1243
|
+
max_depth: s.integer("Optional maximum link depth from the starting URL (0 = only the starting page).", {
|
|
1244
|
+
minimum: 0,
|
|
1245
|
+
maximum: 10,
|
|
1246
|
+
}),
|
|
1247
|
+
follow_subdomains: s.boolean("Allow page discovery on subdomains of the target site."),
|
|
1248
|
+
}, { required: ["type", "url", "instructions"] });
|
|
1249
|
+
const monitorsTargetSchema = s.oneOf([
|
|
1250
|
+
monitorsPageTargetSchema,
|
|
1251
|
+
monitorsSitemapTargetSchema,
|
|
1252
|
+
{
|
|
1253
|
+
allOf: [
|
|
1254
|
+
monitorsExtractTargetSchema,
|
|
1255
|
+
s.unknown("Track relevant pages selected by `schema` and `instructions`; refresh the page set periodically."),
|
|
1256
|
+
],
|
|
1257
|
+
description: "MonitorsTarget value.",
|
|
1258
|
+
},
|
|
1259
|
+
], {
|
|
1260
|
+
description: "What to watch: a page, a sitemap, or data extracted from a site.",
|
|
1261
|
+
});
|
|
1262
|
+
const monitorsExactChangeDetectionSchema = s.object("Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.", {
|
|
1263
|
+
type: s.stringEnum("Use `exact` to compare visible text or sitemap URLs.", ["exact"]),
|
|
1264
|
+
}, { required: ["type"] });
|
|
1265
|
+
const monitorsSemanticChangeDetectionSchema = s.object("Detect meaningful content changes using the target’s instructions and optional schema.", {
|
|
1266
|
+
type: s.stringEnum("Use `semantic` to judge changes against the target instructions.", ["semantic"]),
|
|
1267
|
+
confidence_threshold: s.number("Minimum confidence required to report a meaningful change, from 0 to 1.", {
|
|
1268
|
+
minimum: 0,
|
|
1269
|
+
maximum: 1,
|
|
1270
|
+
}),
|
|
1271
|
+
}, { required: ["type"] });
|
|
1272
|
+
const monitorsChangeDetectionSchema = s.oneOf([monitorsExactChangeDetectionSchema, monitorsSemanticChangeDetectionSchema], {
|
|
1273
|
+
description: "How changes are judged. Defaults to `semantic` for extract targets and page targets with `instructions`, otherwise `exact`.",
|
|
1274
|
+
});
|
|
1275
|
+
const monitorsScheduleUnitSchema = s.stringEnum("Time unit used with `frequency` to set the run interval.", [
|
|
1276
|
+
"minutes",
|
|
1277
|
+
"hours",
|
|
1278
|
+
"days",
|
|
1279
|
+
]);
|
|
1280
|
+
const monitorsIntervalScheduleSchema = s.object("Run the monitor on a fixed interval defined by a frequency and a unit, e.g. every 6 hours or every 2 days. The total interval (frequency × unit) must be between 10 minutes and 1 year.", {
|
|
1281
|
+
type: s.stringEnum("Use `interval` to run on a repeating schedule.", ["interval"]),
|
|
1282
|
+
frequency: s.integer("Number of units between runs. The resulting interval (frequency × unit) must be at least 10 minutes and at most 1 year (e.g. minimum 10 when unit is minutes; maximum 365 when unit is days).", { minimum: 1, maximum: 525600 }),
|
|
1283
|
+
unit: monitorsScheduleUnitSchema,
|
|
1284
|
+
}, { required: ["type", "frequency", "unit"] });
|
|
1285
|
+
const monitorsScheduleSchema = s.oneOf([monitorsIntervalScheduleSchema], {
|
|
1286
|
+
description: "How often the monitor runs. Defaults to once a day.",
|
|
1287
|
+
});
|
|
1288
|
+
const webhookRetrySchema = s.object("Webhook retry settings. Use {} for the default schedule.", {
|
|
1289
|
+
delays_seconds: s.array("Retry delays in seconds, totaling at most 72 hours. Use [] to disable automatic retries.", s.integer("delays seconds item value.", { minimum: 1, maximum: 86400 }), { maxItems: 10 }),
|
|
1290
|
+
}, { required: [] });
|
|
1291
|
+
const monitorsWebhookConfigSchema = s.object("MonitorsWebhookConfig value.", {
|
|
1292
|
+
url: s.string("Public HTTP(S) URL that receives events. Slack and GovSlack URLs get formatted messages.", {
|
|
1293
|
+
format: "uri",
|
|
1294
|
+
}),
|
|
1295
|
+
events: s.array("Events to deliver. Defaults to `change.detected`; `run.completed` also includes unchanged runs.", s.stringEnum("events item value.", ["change.detected", "run.completed"]), { minItems: 1, maxItems: 2, uniqueItems: true }),
|
|
1296
|
+
retry: webhookRetrySchema,
|
|
1297
|
+
}, { required: ["url"] });
|
|
1298
|
+
const monitorsNullableWebhookConfigSchema = s.anyOf("Webhook destination and delivery settings. Null means no webhook is configured.", [
|
|
1299
|
+
{
|
|
1300
|
+
allOf: [monitorsWebhookConfigSchema],
|
|
1301
|
+
description: "MonitorsNullableWebhookConfig value.",
|
|
1302
|
+
},
|
|
1303
|
+
s.literal(null, {
|
|
1304
|
+
description: "MonitorsNullableWebhookConfig value.",
|
|
1305
|
+
}),
|
|
1306
|
+
]);
|
|
1307
|
+
const monitorsRunStatusSchema = s.stringEnum("Lifecycle status of a run. `skipped` runs never executed — see `skip_reason` (insufficient credits, monitor paused, or superseded by a concurrent run).", ["queued", "running", "completed", "failed", "skipped"]);
|
|
1308
|
+
const batchUnifiedScrapeDataSchema = s.object("Use the same formats and parameters as POST /web/scrape, replacing url with urls. Options apply to every page.", {
|
|
1309
|
+
urls: s.array("Pages to scrape. Maximum 100000.", s.object("A page to scrape, with optional data for matching results.", {
|
|
1310
|
+
url: s.string("Page URL to scrape.", { minLength: 1 }),
|
|
1311
|
+
itemId: s.string("Your ID for this page, returned with its result. The same URL can use different IDs.", {
|
|
1312
|
+
minLength: 1,
|
|
1313
|
+
maxLength: 200,
|
|
1314
|
+
}),
|
|
1315
|
+
meta: s.object("Custom JSON returned unchanged with this page result.", {}, { required: [], additionalProperties: s.unknown("meta entry value.") }),
|
|
1316
|
+
}, { required: ["url"] }), { minItems: 1, maxItems: 100000 }),
|
|
1317
|
+
formats: s.describe(scrapeFormatsSchema, "Outputs to return. Set at least one to `true`."),
|
|
1318
|
+
markdownParams: s.describe(scrapeMarkdownParamsSchema, "Markdown options. Requires `formats.markdown`."),
|
|
1319
|
+
screenshotParams: s.describe(scrapeScreenshotParamsSchema, "Screenshot options. Requires formats.screenshot: true."),
|
|
1320
|
+
imageParams: s.describe(scrapeImageParamsSchema, "Image options. Requires formats.images: true."),
|
|
1321
|
+
parseParams: s.describe(scrapeParseParamsSchema, "Requires `formats.parse: true`; required when it is set."),
|
|
1322
|
+
highlightsParams: s.describe(scrapeHighlightsParamsSchema, "Requires `formats.highlights: true`; required when it is set."),
|
|
1323
|
+
jsonParams: s.describe(scrapeJsonParamsSchema, "Requires `formats.json: true`; required when it is set."),
|
|
1324
|
+
productParams: s.describe(scrapeProductParamsSchema, "Product options. Requires formats.product: true."),
|
|
1325
|
+
sharedParams: s.describe(scrapeSharedParamsSchema, "Browser and content settings shared by all outputs."),
|
|
1326
|
+
maxAgeMs: s.integer("Maximum age of a cached output, in milliseconds. `0` fetches fresh. Defaults to 3 days (259200000 ms). Maximum: 1 year (31536000000 ms).", { minimum: 0, maximum: 31536000000 }),
|
|
1327
|
+
zdr: s.stringEnum("Batches persist their results. Only disabled is supported; enabled returns ZDR_NOT_SUPPORTED.", [
|
|
1328
|
+
"disabled",
|
|
1329
|
+
]),
|
|
1330
|
+
timeoutOpts: s.describe(scrapeTimeoutSchema, "Deadline for each page, using the same behavior and defaults as POST /web/scrape."),
|
|
1331
|
+
tags: s.describe(requestTagsSchema, "Labels for tracking request usage. Not retained when zdr is enabled."),
|
|
1332
|
+
}, { required: ["urls", "formats"] });
|
|
1333
|
+
const batchUnifiedCrawlDataSchema = s.object("Use the same formats and parameters as POST /web/scrape, replacing url with source. Options apply to every page.", {
|
|
1334
|
+
source: s.oneOf([
|
|
1335
|
+
s.object("Discover pages by following links from one URL.", {
|
|
1336
|
+
type: s.stringEnum("Start from one page.", ["start_url"]),
|
|
1337
|
+
url: s.string("Page where crawling begins. A URL without a scheme is read as https://.", {
|
|
1338
|
+
minLength: 1,
|
|
1339
|
+
}),
|
|
1340
|
+
controls: s.object("Limits and filters for page discovery.", {
|
|
1341
|
+
maxUrls: s.integer("Maximum pages to fetch. Unused reserved credits are refunded. Maximum 100000.", {
|
|
1342
|
+
minimum: 1,
|
|
1343
|
+
maximum: 100000,
|
|
1344
|
+
}),
|
|
1345
|
+
maxDepth: s.integer("Maximum link depth. Source pages are depth 0. No limit when omitted.", {
|
|
1346
|
+
minimum: 0,
|
|
1347
|
+
maximum: 50,
|
|
1348
|
+
}),
|
|
1349
|
+
followSubdomains: s.boolean("Follow links to subdomains."),
|
|
1350
|
+
regex: s.string("Regex pattern for URLs to include. The `start_url` itself is always included.", {
|
|
1351
|
+
maxLength: 256,
|
|
1352
|
+
}),
|
|
1353
|
+
excludeRegex: s.string("Regex pattern for URLs to exclude, even when they match `regex`. The `start_url` itself is always included.", { maxLength: 256 }),
|
|
1354
|
+
languages: s.anyOf("Only follow pages in these languages, or `same_as_start_url`; all languages when omitted.", [
|
|
1355
|
+
s.stringEnum("languages value.", ["same_as_start_url"]),
|
|
1356
|
+
s.array("languages value.", s.stringEnum("languages item value.", [
|
|
1357
|
+
"am",
|
|
1358
|
+
"ar",
|
|
1359
|
+
"az",
|
|
1360
|
+
"be",
|
|
1361
|
+
"bg",
|
|
1362
|
+
"bn",
|
|
1363
|
+
"ca",
|
|
1364
|
+
"ceb",
|
|
1365
|
+
"cs",
|
|
1366
|
+
"cy",
|
|
1367
|
+
"da",
|
|
1368
|
+
"de",
|
|
1369
|
+
"el",
|
|
1370
|
+
"en",
|
|
1371
|
+
"es",
|
|
1372
|
+
"et",
|
|
1373
|
+
"eu",
|
|
1374
|
+
"fa",
|
|
1375
|
+
"fi",
|
|
1376
|
+
"fr",
|
|
1377
|
+
"gu",
|
|
1378
|
+
"ha",
|
|
1379
|
+
"haw",
|
|
1380
|
+
"he",
|
|
1381
|
+
"hi",
|
|
1382
|
+
"hr",
|
|
1383
|
+
"hu",
|
|
1384
|
+
"hy",
|
|
1385
|
+
"id",
|
|
1386
|
+
"is",
|
|
1387
|
+
"it",
|
|
1388
|
+
"ja",
|
|
1389
|
+
"ka",
|
|
1390
|
+
"kk",
|
|
1391
|
+
"kn",
|
|
1392
|
+
"ko",
|
|
1393
|
+
"ku",
|
|
1394
|
+
"ky",
|
|
1395
|
+
"lo",
|
|
1396
|
+
"lt",
|
|
1397
|
+
"lv",
|
|
1398
|
+
"mk",
|
|
1399
|
+
"ml",
|
|
1400
|
+
"mn",
|
|
1401
|
+
"mr",
|
|
1402
|
+
"ms",
|
|
1403
|
+
"ne",
|
|
1404
|
+
"nl",
|
|
1405
|
+
"no",
|
|
1406
|
+
"or",
|
|
1407
|
+
"pa",
|
|
1408
|
+
"pl",
|
|
1409
|
+
"ps",
|
|
1410
|
+
"pt",
|
|
1411
|
+
"ro",
|
|
1412
|
+
"ru",
|
|
1413
|
+
"sk",
|
|
1414
|
+
"sl",
|
|
1415
|
+
"so",
|
|
1416
|
+
"sq",
|
|
1417
|
+
"sr",
|
|
1418
|
+
"sv",
|
|
1419
|
+
"sw",
|
|
1420
|
+
"ta",
|
|
1421
|
+
"te",
|
|
1422
|
+
"th",
|
|
1423
|
+
"tl",
|
|
1424
|
+
"tr",
|
|
1425
|
+
"uk",
|
|
1426
|
+
"ur",
|
|
1427
|
+
"uz",
|
|
1428
|
+
"vi",
|
|
1429
|
+
"yo",
|
|
1430
|
+
"zh",
|
|
1431
|
+
]), { minItems: 1 }),
|
|
1432
|
+
]),
|
|
1433
|
+
}, { required: [] }),
|
|
1434
|
+
}, { required: ["type", "url"] }),
|
|
1435
|
+
s.object("Scrape the pages listed in a domain's sitemap. Links on those pages are not followed.", {
|
|
1436
|
+
type: s.stringEnum("Scrape the URLs in the domain's sitemap.", ["sitemap"]),
|
|
1437
|
+
domain: s.string("Domain whose sitemap lists the pages to scrape. A full URL is reduced to its domain.", {
|
|
1438
|
+
minLength: 3,
|
|
1439
|
+
}),
|
|
1440
|
+
controls: s.object("Limits and filters for the sitemap URLs. A sitemap batch scrapes exactly those URLs and never follows links off them, so there is no crawl depth here.", {
|
|
1441
|
+
maxUrls: s.integer("Maximum pages to fetch. Unused reserved credits are refunded. Maximum 100000.", {
|
|
1442
|
+
minimum: 1,
|
|
1443
|
+
maximum: 100000,
|
|
1444
|
+
}),
|
|
1445
|
+
regex: s.string("Regex pattern; only sitemap URLs matching it are scraped.", {
|
|
1446
|
+
maxLength: 256,
|
|
1447
|
+
}),
|
|
1448
|
+
excludeRegex: s.string("Regex pattern; sitemap URLs matching it are not scraped, even when they match `regex`.", { maxLength: 256 }),
|
|
1449
|
+
}, { required: [] }),
|
|
1450
|
+
}, { required: ["type", "domain"] }),
|
|
1451
|
+
], {
|
|
1452
|
+
description: "How to find pages to crawl.",
|
|
1453
|
+
}),
|
|
1454
|
+
formats: s.describe(scrapeFormatsSchema, "Outputs to return. Set at least one to `true`."),
|
|
1455
|
+
markdownParams: s.describe(scrapeMarkdownParamsSchema, "Markdown options. Requires `formats.markdown`."),
|
|
1456
|
+
screenshotParams: s.describe(scrapeScreenshotParamsSchema, "Screenshot options. Requires formats.screenshot: true."),
|
|
1457
|
+
imageParams: s.describe(scrapeImageParamsSchema, "Image options. Requires formats.images: true."),
|
|
1458
|
+
parseParams: s.describe(scrapeParseParamsSchema, "Requires `formats.parse: true`; required when it is set."),
|
|
1459
|
+
highlightsParams: s.describe(scrapeHighlightsParamsSchema, "Requires `formats.highlights: true`; required when it is set."),
|
|
1460
|
+
jsonParams: s.describe(scrapeJsonParamsSchema, "Requires `formats.json: true`; required when it is set."),
|
|
1461
|
+
productParams: s.describe(scrapeProductParamsSchema, "Product options. Requires formats.product: true."),
|
|
1462
|
+
sharedParams: s.describe(scrapeSharedParamsSchema, "Browser and content settings shared by all outputs."),
|
|
1463
|
+
maxAgeMs: s.integer("Maximum age of a cached output, in milliseconds. `0` fetches fresh. Defaults to 3 days (259200000 ms). Maximum: 1 year (31536000000 ms).", { minimum: 0, maximum: 31536000000 }),
|
|
1464
|
+
zdr: s.stringEnum("Batches persist their results. Only disabled is supported; enabled returns ZDR_NOT_SUPPORTED.", [
|
|
1465
|
+
"disabled",
|
|
1466
|
+
]),
|
|
1467
|
+
timeoutOpts: s.describe(scrapeTimeoutSchema, "Deadline for each page, using the same behavior and defaults as POST /web/scrape."),
|
|
1468
|
+
tags: s.describe(requestTagsSchema, "Labels for tracking request usage. Not retained when zdr is enabled."),
|
|
1469
|
+
}, { required: ["source", "formats"] });
|
|
1470
|
+
const companySearchFiltersSchema = s.object("Additional constraints every result must match.", {
|
|
1471
|
+
countries: s.array("Headquarters countries as two-letter codes, such as US or GB.", s.string("countries item value.", { pattern: "^[A-Z]{2}$" }), {}),
|
|
1472
|
+
employees_min: s.integer("Minimum headcount; includes overlapping employee ranges.", {
|
|
1473
|
+
minimum: 0,
|
|
1474
|
+
}),
|
|
1475
|
+
employees_max: s.integer("Maximum headcount; includes overlapping employee ranges.", {
|
|
1476
|
+
minimum: 0,
|
|
1477
|
+
}),
|
|
1478
|
+
}, { required: [] });
|
|
1479
|
+
export const submit_feedbackInputSchema = s.object("Submit agent feedback input.", {
|
|
1480
|
+
request_id: s.string("The request_id of the API call the feedback is about, from its response body or X-Request-Id header.", { format: "uuid" }),
|
|
1481
|
+
category: s.stringEnum("Kind of issue.", [
|
|
1482
|
+
"bug",
|
|
1483
|
+
"docs_mismatch",
|
|
1484
|
+
"friction",
|
|
1485
|
+
"feature_gap",
|
|
1486
|
+
"quality_degradation",
|
|
1487
|
+
"other",
|
|
1488
|
+
]),
|
|
1489
|
+
note: s.string("What went wrong and what you expected instead.", {
|
|
1490
|
+
minLength: 1,
|
|
1491
|
+
maxLength: 4000,
|
|
1492
|
+
}),
|
|
1493
|
+
url: s.string("The page the feedback is about, such as one page of a crawl or a docs page.", {
|
|
1494
|
+
maxLength: 2048,
|
|
1495
|
+
format: "uri",
|
|
1496
|
+
}),
|
|
1497
|
+
tags: requestTagsSchema,
|
|
1498
|
+
}, { required: ["category", "note"] });
|
|
1499
|
+
export const list_logsInputSchema = s.object("List request logs input.", {
|
|
1500
|
+
from: s.string("Only include requests at or after this ISO 8601 timestamp. Defaults to 24 hours before `to`.", {
|
|
1501
|
+
format: "date-time",
|
|
1502
|
+
}),
|
|
1503
|
+
to: s.string("Only include requests at or before this ISO 8601 timestamp. Defaults to now.", {
|
|
1504
|
+
format: "date-time",
|
|
1505
|
+
}),
|
|
1506
|
+
path: s.string("Filter by endpoint path, with or without the /v1 prefix.", {
|
|
1507
|
+
minLength: 1,
|
|
1508
|
+
maxLength: 200,
|
|
1509
|
+
pattern: "^\\/",
|
|
1510
|
+
}),
|
|
1511
|
+
key_id: s.string("Filter by the API key that made the request.", {
|
|
1512
|
+
minLength: 1,
|
|
1513
|
+
maxLength: 200,
|
|
1514
|
+
}),
|
|
1515
|
+
status_code: s.integer("Filter by exact HTTP status code.", { minimum: 100, maximum: 599 }),
|
|
1516
|
+
error_code: s.string("Filter by the `error_code` returned in the response.", {
|
|
1517
|
+
pattern: "^[A-Z][A-Z0-9_]{1,63}$",
|
|
1518
|
+
}),
|
|
1519
|
+
errors_only: s.boolean("Only include requests that returned a 4xx or 5xx status."),
|
|
1520
|
+
tags: s.string("Comma-separated request tags. Matches requests carrying any of them. Up to 20 tags, each 1-50 characters."),
|
|
1521
|
+
search: s.string("Case-insensitive substring match against the request query and body, e.g. a domain.", {
|
|
1522
|
+
minLength: 1,
|
|
1523
|
+
maxLength: 200,
|
|
1524
|
+
}),
|
|
1525
|
+
page: s.integer("Page number, starting at 1.", { minimum: 1, maximum: 1000 }),
|
|
1526
|
+
limit: s.integer("Number of log entries per page.", { minimum: 1, maximum: 100 }),
|
|
1527
|
+
}, { required: [] });
|
|
1528
|
+
export const get_logInputSchema = s.object("Retrieve a request log input.", {
|
|
1529
|
+
request_id: s.string("The request ID of the logged API call.", { format: "uuid" }),
|
|
1530
|
+
}, { required: ["request_id"] });
|
|
1531
|
+
export const list_profilesInputSchema = s.object("List browser profiles input.", {
|
|
1532
|
+
limit: s.integer("Number of profiles per page.", { minimum: 1, maximum: 100 }),
|
|
1533
|
+
cursor: s.string("The `next_cursor` from the previous page.", {
|
|
1534
|
+
pattern: "^prof_[a-f0-9]{32}$",
|
|
1535
|
+
}),
|
|
1536
|
+
}, { required: [] });
|
|
1537
|
+
export const get_usageInputSchema = s.object("Retrieve credit usage input.", {}, { required: [], additionalProperties: true });
|
|
1538
|
+
export const get_usage_historyInputSchema = s.object("Retrieve usage history input.", {
|
|
1539
|
+
from: s.string("Start of the range, as an ISO 8601 timestamp. Defaults to 24 hours before `to` for `hour`, 30 days for `day`, and 366 days for `month`.", { format: "date-time" }),
|
|
1540
|
+
to: s.string("End of the range, as an ISO 8601 timestamp. Defaults to now.", {
|
|
1541
|
+
format: "date-time",
|
|
1542
|
+
}),
|
|
1543
|
+
interval: s.stringEnum("Bucket size. `hour` covers up to 7 days; `day` and `month` cover up to 366 days. Buckets start on UTC boundaries.", ["hour", "day", "month"]),
|
|
1544
|
+
group_by: s.stringEnum("Split each bucket by endpoint path, API key, or HTTP status code.", [
|
|
1545
|
+
"path",
|
|
1546
|
+
"key_id",
|
|
1547
|
+
"status_code",
|
|
1548
|
+
]),
|
|
1549
|
+
}, { required: [] });
|
|
1550
|
+
export const list_webhook_deliveriesInputSchema = s.oneOf([
|
|
1551
|
+
s.object("By Batch", {
|
|
1552
|
+
type: s.stringEnum("Delivery source.", ["batch"]),
|
|
1553
|
+
batch_id: s.string("Filter by batch ID.", {
|
|
1554
|
+
minLength: 1,
|
|
1555
|
+
maxLength: 200,
|
|
1556
|
+
pattern: "^[\\w-]+$",
|
|
1557
|
+
}),
|
|
1558
|
+
status: s.stringEnum("Filter by delivery status.", [
|
|
1559
|
+
"pending",
|
|
1560
|
+
"delivering",
|
|
1561
|
+
"retrying",
|
|
1562
|
+
"delivered",
|
|
1563
|
+
"failed",
|
|
1564
|
+
"cancelled",
|
|
1565
|
+
]),
|
|
1566
|
+
created_after: s.string("Only include events created after this ISO 8601 timestamp.", {
|
|
1567
|
+
format: "date-time",
|
|
1568
|
+
}),
|
|
1569
|
+
limit: s.integer("Number of deliveries to return.", { minimum: 1, maximum: 100 }),
|
|
1570
|
+
cursor: s.string("The next_cursor from the previous response.", {
|
|
1571
|
+
pattern: "^whd_[a-f0-9]{32}$",
|
|
1572
|
+
}),
|
|
1573
|
+
tags: requestTagsSchema,
|
|
1574
|
+
}, { required: ["type"] }),
|
|
1575
|
+
s.object("By Monitor", {
|
|
1576
|
+
type: s.stringEnum("Delivery source.", ["monitor"]),
|
|
1577
|
+
monitor_id: s.string("Filter by monitor ID.", {
|
|
1578
|
+
minLength: 1,
|
|
1579
|
+
maxLength: 200,
|
|
1580
|
+
pattern: "^[\\w-]+$",
|
|
1581
|
+
}),
|
|
1582
|
+
run_id: s.string("Filter by monitor run ID.", {
|
|
1583
|
+
minLength: 1,
|
|
1584
|
+
maxLength: 200,
|
|
1585
|
+
pattern: "^[\\w-]+$",
|
|
1586
|
+
}),
|
|
1587
|
+
status: s.stringEnum("Filter by delivery status.", [
|
|
1588
|
+
"pending",
|
|
1589
|
+
"delivering",
|
|
1590
|
+
"retrying",
|
|
1591
|
+
"delivered",
|
|
1592
|
+
"failed",
|
|
1593
|
+
"cancelled",
|
|
1594
|
+
]),
|
|
1595
|
+
created_after: s.string("Only include events created after this ISO 8601 timestamp.", {
|
|
1596
|
+
format: "date-time",
|
|
1597
|
+
}),
|
|
1598
|
+
limit: s.integer("Number of deliveries to return.", { minimum: 1, maximum: 100 }),
|
|
1599
|
+
cursor: s.string("The next_cursor from the previous response.", {
|
|
1600
|
+
pattern: "^whd_[a-f0-9]{32}$",
|
|
1601
|
+
}),
|
|
1602
|
+
tags: requestTagsSchema,
|
|
1603
|
+
}, { required: ["type"] }),
|
|
1604
|
+
], {
|
|
1605
|
+
description: "List webhook deliveries input.",
|
|
1606
|
+
});
|
|
1607
|
+
export const get_webhook_deliveryInputSchema = s.object("Retrieve a webhook delivery input.", {
|
|
1608
|
+
delivery_id: s.string("Delivery ID.", { pattern: "^whd_[a-f0-9]{32}$" }),
|
|
1609
|
+
tags: s.describe(requestTagsSchema, "Comma-separated labels for filtering usage, e.g. `production,team-alpha`."),
|
|
1610
|
+
}, { required: ["delivery_id"] });
|
|
1611
|
+
export const list_webhook_delivery_attemptsInputSchema = s.object("List webhook delivery attempts input.", {
|
|
1612
|
+
delivery_id: s.string("Delivery ID.", { pattern: "^whd_[a-f0-9]{32}$" }),
|
|
1613
|
+
limit: s.integer("Number of attempts to return.", { minimum: 1, maximum: 100 }),
|
|
1614
|
+
cursor: s.string("The next_cursor from the previous response.", {
|
|
1615
|
+
pattern: "^wha_[a-f0-9]{32}$",
|
|
1616
|
+
}),
|
|
1617
|
+
tags: s.describe(requestTagsSchema, "Comma-separated labels for filtering usage, e.g. `production,team-alpha`."),
|
|
1618
|
+
}, { required: ["delivery_id"] });
|
|
1619
|
+
export const retry_webhook_deliveryInputSchema = s.object("Retry a webhook delivery input.", {
|
|
1620
|
+
force: s.boolean("Resend even if the delivery already succeeded. Defaults to false."),
|
|
1621
|
+
tags: requestTagsSchema,
|
|
1622
|
+
delivery_id: s.string("Delivery ID.", { pattern: "^whd_[a-f0-9]{32}$" }),
|
|
1623
|
+
idempotencyKey: s.string("Unique key to prevent duplicate retry requests.", { maxLength: 200 }),
|
|
1624
|
+
}, { required: ["delivery_id"] });
|
|
1625
|
+
export const scrape_webInputSchema = s.object("Scrape Anything input.", {
|
|
1626
|
+
url: s.string("Public HTTP or HTTPS URL to scrape.", { format: "uri", pattern: "^https?://" }),
|
|
1627
|
+
formats: s.describe(scrapeFormatsSchema, "Outputs to return. Set at least one to `true`."),
|
|
1628
|
+
markdownParams: s.describe(scrapeMarkdownParamsSchema, "Markdown options. Requires `formats.markdown`."),
|
|
1629
|
+
screenshotParams: s.describe(scrapeScreenshotParamsSchema, "Screenshot options. Requires formats.screenshot: true."),
|
|
1630
|
+
imageParams: s.describe(scrapeImageParamsSchema, "Image options. Requires formats.images: true."),
|
|
1631
|
+
parseParams: s.describe(scrapeParseParamsSchema, "Requires `formats.parse: true`; required when it is set."),
|
|
1632
|
+
highlightsParams: s.describe(scrapeHighlightsParamsSchema, "Requires `formats.highlights: true`; required when it is set."),
|
|
1633
|
+
jsonParams: s.describe(scrapeJsonParamsSchema, "Requires `formats.json: true`; required when it is set."),
|
|
1634
|
+
productParams: s.describe(scrapeProductParamsSchema, "Product options. Requires formats.product: true."),
|
|
1635
|
+
sharedParams: s.describe(scrapeSharedParamsSchema, "Browser and content settings shared by all outputs."),
|
|
1636
|
+
maxAgeMs: s.integer("Maximum age of a cached output, in milliseconds. `0` fetches fresh. Defaults to 3 days (259200000 ms). Maximum: 1 year (31536000000 ms).", { minimum: 0, maximum: 31536000000 }),
|
|
1637
|
+
zdr: s.stringEnum("`enabled` turns on zero data retention. Your organization must have ZDR enabled.", [
|
|
1638
|
+
"enabled",
|
|
1639
|
+
"disabled",
|
|
1640
|
+
]),
|
|
1641
|
+
timeoutOpts: s.describe(scrapeTimeoutSchema, "Deadline for the whole request. Defaults to 90000 ms with `fail`. Fixed waits must end before it."),
|
|
1642
|
+
tags: s.describe(requestTagsSchema, "Labels for tracking request usage. Not retained when zdr is enabled."),
|
|
1643
|
+
}, {
|
|
1644
|
+
required: ["url", "formats"],
|
|
1645
|
+
allOf: [
|
|
1646
|
+
{
|
|
1647
|
+
if: { required: ["markdownParams"] },
|
|
1648
|
+
then: {
|
|
1649
|
+
properties: {
|
|
1650
|
+
formats: { required: ["markdown"], properties: { markdown: { const: true } } },
|
|
1651
|
+
},
|
|
1652
|
+
},
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
if: { required: ["screenshotParams"] },
|
|
1656
|
+
then: {
|
|
1657
|
+
properties: {
|
|
1658
|
+
formats: { required: ["screenshot"], properties: { screenshot: { const: true } } },
|
|
1659
|
+
},
|
|
1660
|
+
},
|
|
1661
|
+
},
|
|
1662
|
+
{
|
|
1663
|
+
if: { required: ["imageParams"] },
|
|
1664
|
+
then: {
|
|
1665
|
+
properties: {
|
|
1666
|
+
formats: { required: ["images"], properties: { images: { const: true } } },
|
|
1667
|
+
},
|
|
1668
|
+
},
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
if: { required: ["parseParams"] },
|
|
1672
|
+
then: {
|
|
1673
|
+
properties: { formats: { required: ["parse"], properties: { parse: { const: true } } } },
|
|
1674
|
+
},
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
if: {
|
|
1678
|
+
properties: { formats: { required: ["parse"], properties: { parse: { const: true } } } },
|
|
1679
|
+
},
|
|
1680
|
+
then: { required: ["parseParams"] },
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
if: { required: ["highlightsParams"] },
|
|
1684
|
+
then: {
|
|
1685
|
+
properties: {
|
|
1686
|
+
formats: { required: ["highlights"], properties: { highlights: { const: true } } },
|
|
1687
|
+
},
|
|
1688
|
+
},
|
|
1689
|
+
},
|
|
1690
|
+
{
|
|
1691
|
+
if: {
|
|
1692
|
+
properties: {
|
|
1693
|
+
formats: { required: ["highlights"], properties: { highlights: { const: true } } },
|
|
1694
|
+
},
|
|
1695
|
+
},
|
|
1696
|
+
then: { required: ["highlightsParams"] },
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
if: { required: ["jsonParams"] },
|
|
1700
|
+
then: {
|
|
1701
|
+
properties: { formats: { required: ["json"], properties: { json: { const: true } } } },
|
|
1702
|
+
},
|
|
1703
|
+
},
|
|
1704
|
+
{
|
|
1705
|
+
if: {
|
|
1706
|
+
properties: { formats: { required: ["json"], properties: { json: { const: true } } } },
|
|
1707
|
+
},
|
|
1708
|
+
then: { required: ["jsonParams"] },
|
|
1709
|
+
},
|
|
1710
|
+
{
|
|
1711
|
+
if: { required: ["productParams"] },
|
|
1712
|
+
then: {
|
|
1713
|
+
properties: {
|
|
1714
|
+
formats: { required: ["product"], properties: { product: { const: true } } },
|
|
1715
|
+
},
|
|
1716
|
+
},
|
|
1717
|
+
},
|
|
1718
|
+
],
|
|
1719
|
+
});
|
|
1720
|
+
export const search_newsInputSchema = s.object("Search news input.", {
|
|
1721
|
+
searchBy: s.oneOf([newsSearchByNaturalLanguageSchema, newsSearchByEntitySchema], {
|
|
1722
|
+
description: "What to search for: a specific company, or a natural-language query across all news.",
|
|
1723
|
+
}),
|
|
1724
|
+
filterBy: s.object("Optional result filters. Use at most one of sourceDomain, sourceCountry, articleLanguage, or articleType. A date range may accompany that category; date.from must not exceed date.to.", {
|
|
1725
|
+
sourceDomain: s.array("Publisher domains to include. Up to 3.", s.string("sourceDomain item value.", { minLength: 1, maxLength: 253 }), { minItems: 1, maxItems: 3 }),
|
|
1726
|
+
sourceCountry: s.array("Publisher countries to include, as lowercase ISO 3166-1 alpha-2 codes. Up to 3.", s.stringEnum("sourceCountry item value.", [
|
|
1727
|
+
"ae",
|
|
1728
|
+
"ar",
|
|
1729
|
+
"au",
|
|
1730
|
+
"ca",
|
|
1731
|
+
"cg",
|
|
1732
|
+
"ch",
|
|
1733
|
+
"cl",
|
|
1734
|
+
"cz",
|
|
1735
|
+
"de",
|
|
1736
|
+
"fi",
|
|
1737
|
+
"fr",
|
|
1738
|
+
"gb",
|
|
1739
|
+
"hk",
|
|
1740
|
+
"il",
|
|
1741
|
+
"in",
|
|
1742
|
+
"jp",
|
|
1743
|
+
"kr",
|
|
1744
|
+
"mx",
|
|
1745
|
+
"ng",
|
|
1746
|
+
"nl",
|
|
1747
|
+
"pk",
|
|
1748
|
+
"qa",
|
|
1749
|
+
"sa",
|
|
1750
|
+
"se",
|
|
1751
|
+
"sg",
|
|
1752
|
+
"us",
|
|
1753
|
+
"za",
|
|
1754
|
+
]), { minItems: 1, maxItems: 3 }),
|
|
1755
|
+
articleLanguage: s.array("Article languages to include. Up to 3.", s.stringEnum("articleLanguage item value.", [
|
|
1756
|
+
"am",
|
|
1757
|
+
"ar",
|
|
1758
|
+
"az",
|
|
1759
|
+
"be",
|
|
1760
|
+
"bg",
|
|
1761
|
+
"bn",
|
|
1762
|
+
"ca",
|
|
1763
|
+
"ceb",
|
|
1764
|
+
"cs",
|
|
1765
|
+
"cy",
|
|
1766
|
+
"da",
|
|
1767
|
+
"de",
|
|
1768
|
+
"el",
|
|
1769
|
+
"en",
|
|
1770
|
+
"es",
|
|
1771
|
+
"et",
|
|
1772
|
+
"eu",
|
|
1773
|
+
"fa",
|
|
1774
|
+
"fi",
|
|
1775
|
+
"fr",
|
|
1776
|
+
"gu",
|
|
1777
|
+
"ha",
|
|
1778
|
+
"haw",
|
|
1779
|
+
"he",
|
|
1780
|
+
"hi",
|
|
1781
|
+
"hr",
|
|
1782
|
+
"hu",
|
|
1783
|
+
"hy",
|
|
1784
|
+
"id",
|
|
1785
|
+
"is",
|
|
1786
|
+
"it",
|
|
1787
|
+
"ja",
|
|
1788
|
+
"ka",
|
|
1789
|
+
"kk",
|
|
1790
|
+
"kn",
|
|
1791
|
+
"ko",
|
|
1792
|
+
"ku",
|
|
1793
|
+
"ky",
|
|
1794
|
+
"lo",
|
|
1795
|
+
"lt",
|
|
1796
|
+
"lv",
|
|
1797
|
+
"mk",
|
|
1798
|
+
"ml",
|
|
1799
|
+
"mn",
|
|
1800
|
+
"mr",
|
|
1801
|
+
"ms",
|
|
1802
|
+
"ne",
|
|
1803
|
+
"nl",
|
|
1804
|
+
"no",
|
|
1805
|
+
"or",
|
|
1806
|
+
"pa",
|
|
1807
|
+
"pl",
|
|
1808
|
+
"ps",
|
|
1809
|
+
"pt",
|
|
1810
|
+
"ro",
|
|
1811
|
+
"ru",
|
|
1812
|
+
"sk",
|
|
1813
|
+
"sl",
|
|
1814
|
+
"so",
|
|
1815
|
+
"sq",
|
|
1816
|
+
"sr",
|
|
1817
|
+
"sv",
|
|
1818
|
+
"sw",
|
|
1819
|
+
"ta",
|
|
1820
|
+
"te",
|
|
1821
|
+
"th",
|
|
1822
|
+
"tl",
|
|
1823
|
+
"tr",
|
|
1824
|
+
"uk",
|
|
1825
|
+
"ur",
|
|
1826
|
+
"uz",
|
|
1827
|
+
"vi",
|
|
1828
|
+
"yo",
|
|
1829
|
+
"zh",
|
|
1830
|
+
]), { minItems: 1, maxItems: 3 }),
|
|
1831
|
+
articleType: s.array("Article types to include. Up to 3.", s.stringEnum("articleType item value.", ["editorial", "press_release", "regulatory_filing", "advisory"]), { minItems: 1, maxItems: 3 }),
|
|
1832
|
+
date: s.object("Published-at window in epoch milliseconds. from must be before or equal to to.", {
|
|
1833
|
+
from: s.integer("Inclusive start of the published-at window, in epoch milliseconds."),
|
|
1834
|
+
to: s.integer("Inclusive end of the published-at window, in epoch milliseconds."),
|
|
1835
|
+
}, { required: [] }),
|
|
1836
|
+
}, {
|
|
1837
|
+
required: [],
|
|
1838
|
+
allOf: [
|
|
1839
|
+
{ not: { required: ["sourceDomain", "sourceCountry"] } },
|
|
1840
|
+
{ not: { required: ["sourceDomain", "articleLanguage"] } },
|
|
1841
|
+
{ not: { required: ["sourceDomain", "articleType"] } },
|
|
1842
|
+
{ not: { required: ["sourceCountry", "articleLanguage"] } },
|
|
1843
|
+
{ not: { required: ["sourceCountry", "articleType"] } },
|
|
1844
|
+
{ not: { required: ["articleLanguage", "articleType"] } },
|
|
1845
|
+
],
|
|
1846
|
+
}),
|
|
1847
|
+
sortBy: s.object("Result ordering. Defaults to newest for entity searches. Natural-language searches are always ordered by relevance.", {
|
|
1848
|
+
type: s.stringEnum("Result ordering.", ["relevance", "newest"]),
|
|
1849
|
+
}, { required: ["type"] }),
|
|
1850
|
+
limit: s.integer("Maximum results to return. Defaults to 10.", { minimum: 1, maximum: 100 }),
|
|
1851
|
+
cursor: s.nullable(s.string("Opaque next_cursor from the previous response, or null for the first page.", {
|
|
1852
|
+
maxLength: 300,
|
|
1853
|
+
})),
|
|
1854
|
+
tags: requestTagsSchema,
|
|
1855
|
+
}, { required: ["searchBy"] });
|
|
1856
|
+
export const answer_researchInputSchema = s.object("Answer a research task input.", {
|
|
1857
|
+
mode: s.stringEnum("`fast` prioritizes speed, with extra verification for people and companies; `ultra` supports deeper research (default).", ["fast", "ultra"]),
|
|
1858
|
+
task: s.string("Research task. The agent selects company/profile lookups, web searches, or page reads. Include domains or URLs to focus the research.", { minLength: 1, maxLength: 2000 }),
|
|
1859
|
+
json_format: s.object("Example answer object, not JSON Schema. Up to 8 levels, 500 values, and 16000 characters; unknowns may be null.", {}, { required: [], additionalProperties: s.unknown("json format entry value.") }),
|
|
1860
|
+
timeoutOpts: partialTimeoutSchema,
|
|
1861
|
+
tags: requestTagsSchema,
|
|
1862
|
+
zdr: s.stringEnum("`enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR.", ["enabled", "disabled"]),
|
|
1863
|
+
}, { required: ["task"] });
|
|
1864
|
+
export const parse_fileInputSchema = s.object("Parse a file input.", {
|
|
1865
|
+
extension: s.stringEnum("Optional file extension hint, such as pdf, docx, xlsx, pptx, html, json, csv, md, py, rtf, jpg, png, or txt.", [
|
|
1866
|
+
"txt",
|
|
1867
|
+
"text",
|
|
1868
|
+
"md",
|
|
1869
|
+
"markdown",
|
|
1870
|
+
"html",
|
|
1871
|
+
"htm",
|
|
1872
|
+
"xhtml",
|
|
1873
|
+
"xml",
|
|
1874
|
+
"rss",
|
|
1875
|
+
"atom",
|
|
1876
|
+
"csv",
|
|
1877
|
+
"tsv",
|
|
1878
|
+
"yaml",
|
|
1879
|
+
"yml",
|
|
1880
|
+
"py",
|
|
1881
|
+
"java",
|
|
1882
|
+
"js",
|
|
1883
|
+
"jsx",
|
|
1884
|
+
"mjs",
|
|
1885
|
+
"cjs",
|
|
1886
|
+
"json",
|
|
1887
|
+
"jsonl",
|
|
1888
|
+
"ndjson",
|
|
1889
|
+
"php",
|
|
1890
|
+
"sh",
|
|
1891
|
+
"bash",
|
|
1892
|
+
"zsh",
|
|
1893
|
+
"fish",
|
|
1894
|
+
"rb",
|
|
1895
|
+
"ts",
|
|
1896
|
+
"tsx",
|
|
1897
|
+
"rtf",
|
|
1898
|
+
"srt",
|
|
1899
|
+
"css",
|
|
1900
|
+
"scss",
|
|
1901
|
+
"less",
|
|
1902
|
+
"styl",
|
|
1903
|
+
"sass",
|
|
1904
|
+
"svg",
|
|
1905
|
+
"pdf",
|
|
1906
|
+
"docx",
|
|
1907
|
+
"doc",
|
|
1908
|
+
"xlsx",
|
|
1909
|
+
"xlsm",
|
|
1910
|
+
"xlsb",
|
|
1911
|
+
"xltx",
|
|
1912
|
+
"xltm",
|
|
1913
|
+
"xls",
|
|
1914
|
+
"pptx",
|
|
1915
|
+
"pptm",
|
|
1916
|
+
"ppsx",
|
|
1917
|
+
"ppsm",
|
|
1918
|
+
"potx",
|
|
1919
|
+
"potm",
|
|
1920
|
+
"ppt",
|
|
1921
|
+
"pps",
|
|
1922
|
+
"pot",
|
|
1923
|
+
"jpg",
|
|
1924
|
+
"jpeg",
|
|
1925
|
+
"jpe",
|
|
1926
|
+
"png",
|
|
1927
|
+
"gif",
|
|
1928
|
+
"bmp",
|
|
1929
|
+
"tiff",
|
|
1930
|
+
"tif",
|
|
1931
|
+
"webp",
|
|
1932
|
+
"ppm",
|
|
1933
|
+
"pbm",
|
|
1934
|
+
"pgm",
|
|
1935
|
+
"pnm",
|
|
1936
|
+
]),
|
|
1937
|
+
includeLinks: s.boolean("Preserve hyperlinks in Markdown output"),
|
|
1938
|
+
includeImages: s.boolean("Include image references in Markdown output"),
|
|
1939
|
+
shortenBase64Images: s.boolean("Shorten base64-encoded image data in the Markdown output"),
|
|
1940
|
+
useMainContentOnly: s.boolean("Extract only the main content from HTML-like inputs"),
|
|
1941
|
+
ocr: s.boolean("Read text from images and scanned PDF pages. PDF page ranges still apply."),
|
|
1942
|
+
pdf: s.object('PDF page-range options as a JSON object, e.g. {"start": 2, "end": 5}.', {
|
|
1943
|
+
start: s.integer("First 1-based PDF page to parse.", { minimum: 1 }),
|
|
1944
|
+
end: s.integer("Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must be >= start.", {
|
|
1945
|
+
minimum: 1,
|
|
1946
|
+
}),
|
|
1947
|
+
}, { required: [] }),
|
|
1948
|
+
client: s.string("Optional client identifier used for usage attribution.", {
|
|
1949
|
+
minLength: 1,
|
|
1950
|
+
maxLength: 100,
|
|
1951
|
+
}),
|
|
1952
|
+
zdr: s.stringEnum("`enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR.", ["enabled", "disabled"]),
|
|
1953
|
+
tags: s.describe(requestTagsSchema, "Comma-separated labels for filtering usage, e.g. `production,team-alpha`."),
|
|
1954
|
+
fileUrl: s.string("Public HTTP(S) URL of the file to download and parse, up to 50 MiB.", {
|
|
1955
|
+
format: "uri",
|
|
1956
|
+
}),
|
|
1957
|
+
}, { required: ["fileUrl"] });
|
|
1958
|
+
export const map_urlsInputSchema = s.object("Map URLs input.", {
|
|
1959
|
+
domain: s.string("Domain to map, e.g. `stripe.com`.", { minLength: 3 }),
|
|
1960
|
+
includeSubdomains: s.boolean("Include URLs on subdomains."),
|
|
1961
|
+
maxLinks: s.integer("Maximum number of URLs to return.", { minimum: 1, maximum: 100000 }),
|
|
1962
|
+
sitemapUrl: s.string("Fetch this sitemap instead of discovering sitemaps. Must belong to the domain or a subdomain.", { format: "uri" }),
|
|
1963
|
+
urlRegex: s.string("Regex pattern. Only URLs matching this pattern are returned and counted against maxLinks.", {
|
|
1964
|
+
maxLength: 256,
|
|
1965
|
+
}),
|
|
1966
|
+
excludeUrlRegex: s.string("Regex pattern. URLs matching this pattern are not returned, even when they match urlRegex.", { maxLength: 256 }),
|
|
1967
|
+
search: s.string("Filter URLs by a topic or phrase, most relevant first.", {
|
|
1968
|
+
minLength: 2,
|
|
1969
|
+
maxLength: 200,
|
|
1970
|
+
}),
|
|
1971
|
+
headers: s.object("HTTP headers for the target origin. Non-empty headers bypass caching.", {}, {
|
|
1972
|
+
required: [],
|
|
1973
|
+
additionalProperties: s.string("headers entry value.", {
|
|
1974
|
+
maxLength: 8192,
|
|
1975
|
+
pattern: "^[^\\r\\n]*$",
|
|
1976
|
+
}),
|
|
1977
|
+
}),
|
|
1978
|
+
timeoutOpts: s.describe(lenientPartialTimeoutSchema, "Request deadline and what to return when it passes."),
|
|
1979
|
+
zdr: s.stringEnum("`enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR.", ["enabled", "disabled"]),
|
|
1980
|
+
tags: s.describe(requestTagsSchema, "Comma-separated labels for filtering usage, e.g. `production,team-alpha`."),
|
|
1981
|
+
}, { required: ["domain"] });
|
|
1982
|
+
export const crawl_websiteInputSchema = s.object("Crawl a website input.", {
|
|
1983
|
+
url: s.string("Start URL, including `http://` or `https://`.", { minLength: 1, format: "uri" }),
|
|
1984
|
+
maxPages: s.integer("Maximum pages to crawl.", { minimum: 1, maximum: 500 }),
|
|
1985
|
+
maxDepth: s.integer("Maximum link depth from the starting URL (0 = only the starting page)", {
|
|
1986
|
+
minimum: 0,
|
|
1987
|
+
}),
|
|
1988
|
+
urlRegex: s.string("Regex pattern. Only URLs matching this pattern will be followed and scraped. An automatic prefix scope in the form ^<starting URL> follows a redirect of the starting page.", { maxLength: 256 }),
|
|
1989
|
+
excludeUrlRegex: s.string("Regex pattern. URLs matching this pattern are never followed or scraped, even when they match urlRegex. The starting URL is always scraped.", { maxLength: 256 }),
|
|
1990
|
+
includeLinks: s.boolean("Preserve hyperlinks in the Markdown output (`html-conversion` only)."),
|
|
1991
|
+
includeImages: s.boolean("Include image references in the Markdown output (`html-conversion` only)."),
|
|
1992
|
+
shortenBase64Images: s.boolean("Truncate base64-encoded image data in the Markdown output (`html-conversion` only)."),
|
|
1993
|
+
useMainContentOnly: s.boolean("Extract only the main content, stripping headers, footers, sidebars, and navigation"),
|
|
1994
|
+
sourcePreference: s.array("Markdown sources in order of preference: `html-conversion` converts the page HTML, `markdown-direct` uses Markdown the site publishes.", s.stringEnum("sourcePreference item value.", ["html-conversion", "markdown-direct"]), { minItems: 1 }),
|
|
1995
|
+
followSubdomains: s.boolean("When true, follow links on subdomains of the starting URL's domain (e.g. docs.example.com when starting from example.com). www and apex are always treated as equivalent."),
|
|
1996
|
+
pdf: s.object("PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.", {
|
|
1997
|
+
shouldParse: s.boolean("When true, PDF pages are fetched and parsed. When false, PDF pages are skipped entirely (not included in results and not counted as failures)."),
|
|
1998
|
+
start: s.integer("First 1-based PDF page to parse.", { minimum: 1 }),
|
|
1999
|
+
end: s.integer("Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must be >= start.", {
|
|
2000
|
+
minimum: 1,
|
|
2001
|
+
}),
|
|
2002
|
+
ocr: s.boolean("Read scanned PDF pages with OCR; preserve pages that already have text."),
|
|
2003
|
+
}, { required: [] }),
|
|
2004
|
+
includeFrames: s.boolean("When true, the contents of iframes are rendered to Markdown for each crawled page."),
|
|
2005
|
+
includeSelectors: s.nullable(s.array("Keep matching HTML subtrees before converting each page to Markdown.", s.string("includeSelectors item value.", { minLength: 1, maxLength: 2048 }), { maxItems: 50 })),
|
|
2006
|
+
excludeSelectors: s.nullable(s.array("Remove matching elements after inclusions. Exclusions take precedence.", s.string("excludeSelectors item value.", { minLength: 1, maxLength: 2048 }), { maxItems: 50 })),
|
|
2007
|
+
maxAgeMs: s.nullable(s.integer("Maximum cache age in milliseconds. Defaults to 1 day; `0` fetches fresh.", {
|
|
2008
|
+
minimum: 0,
|
|
2009
|
+
maximum: 2592000000,
|
|
2010
|
+
})),
|
|
2011
|
+
waitForMs: s.nullable(s.integer("Browser wait time in milliseconds after initial page load for each crawled page. Defaults to 3500 (3.5 seconds). Min: 0. Max: 30000 (30 seconds).", { minimum: 0, maximum: 30000 })),
|
|
2012
|
+
settleAnimations: s.boolean("Wait briefly for CSS animations and transitions to settle before reading each page."),
|
|
2013
|
+
stopAfterMs: s.integer("Soft crawl deadline in milliseconds. Returns pages collected before the next deadline check.", { minimum: 10000, maximum: 110000 }),
|
|
2014
|
+
timeoutOpts: partialTimeoutSchema,
|
|
2015
|
+
country: browserCountryCodeSchema,
|
|
2016
|
+
zdr: s.stringEnum("`enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR.", ["enabled", "disabled"]),
|
|
2017
|
+
tags: requestTagsSchema,
|
|
2018
|
+
}, { required: ["url"] });
|
|
2019
|
+
export const extract_dataInputSchema = s.object("Extract structured data input.", {
|
|
2020
|
+
url: s.string("The starting website URL to crawl and extract from. Must include http:// or https://.", {
|
|
2021
|
+
minLength: 1,
|
|
2022
|
+
format: "uri",
|
|
2023
|
+
}),
|
|
2024
|
+
schema: s.object("JSON Schema (not an example object) for the returned object. Image fields include relevant page image references.", {}, { required: [], additionalProperties: s.unknown("schema entry value.") }),
|
|
2025
|
+
instructions: s.string("Optional extraction guidance, such as which facts to prioritize or how to interpret fields in the schema.", { maxLength: 2000 }),
|
|
2026
|
+
factCheck: s.boolean("Require facts stated on the page. Unsupported fields become null or empty."),
|
|
2027
|
+
followSubdomains: s.boolean("When true, follow links on subdomains of the starting URL's domain."),
|
|
2028
|
+
maxPages: s.integer("Maximum number of pages to analyze for extraction. Hard cap: 50. Defaults to 5.", {
|
|
2029
|
+
minimum: 1,
|
|
2030
|
+
maximum: 50,
|
|
2031
|
+
}),
|
|
2032
|
+
maxDepth: s.integer("Optional maximum link depth from the starting URL (0 = only the starting page). If omitted, there is no crawl depth limit.", { minimum: 0 }),
|
|
2033
|
+
pdf: s.object("PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.", {
|
|
2034
|
+
shouldParse: s.boolean("When true, PDF pages are fetched and parsed. When false, PDF pages are skipped."),
|
|
2035
|
+
start: s.integer("First 1-based PDF page to parse.", { minimum: 1 }),
|
|
2036
|
+
end: s.integer("Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must be >= start.", {
|
|
2037
|
+
minimum: 1,
|
|
2038
|
+
}),
|
|
2039
|
+
}, { required: [] }),
|
|
2040
|
+
includeFrames: s.boolean("When true, iframe contents are included in Markdown before extraction."),
|
|
2041
|
+
maxAgeMs: s.nullable(s.integer("Return cached scrape results if a prior scrape for the same parameters is younger than this many milliseconds. Defaults to 7 days (604800000 ms).", { minimum: 0, maximum: 2592000000 })),
|
|
2042
|
+
waitForMs: s.nullable(s.integer("Optional browser wait time in milliseconds after initial page load for each crawled page.", {
|
|
2043
|
+
minimum: 0,
|
|
2044
|
+
maximum: 30000,
|
|
2045
|
+
})),
|
|
2046
|
+
settleAnimations: s.boolean("Wait briefly for CSS animations and transitions to settle before reading each page."),
|
|
2047
|
+
actions: s.nullable(s.array("Browser steps before page discovery. Requires a paid plan; defaults the crawl budget to 110000 ms.", webScrapeActionSchema, { maxItems: 5 })),
|
|
2048
|
+
stopAfterMs: s.integer("Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000 (110s). Defaults to 80000 (80s), or 110000 (110s) when browser actions are provided.", { minimum: 10000, maximum: 110000 }),
|
|
2049
|
+
timeoutOpts: partialTimeoutSchema,
|
|
2050
|
+
zdr: s.stringEnum("`enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR.", ["enabled", "disabled"]),
|
|
2051
|
+
tags: requestTagsSchema,
|
|
2052
|
+
}, { required: ["url", "schema"] });
|
|
2053
|
+
export const search_webInputSchema = s.object("Search the web input.", {
|
|
2054
|
+
query: s.string("Search query. Accepts natural language as well as Google-style search operators such as `site:`, `-site:`, `inurl:`, `intitle:`, quoted phrases, and `OR`.", { minLength: 1, maxLength: 500 }),
|
|
2055
|
+
numResults: s.integer("Number of results to request and return (1–100). Defaults to 10.", {
|
|
2056
|
+
minimum: 1,
|
|
2057
|
+
maximum: 100,
|
|
2058
|
+
}),
|
|
2059
|
+
includeDomains: s.array('Allowlist — only return results from these domains. Up to 100 domains. Example: ["arxiv.org", "github.com"].', s.string("includeDomains item value.", { minLength: 3 }), { maxItems: 100 }),
|
|
2060
|
+
excludeDomains: s.array('Blocklist — drop results from these domains. Up to 100 domains. Example: ["pinterest.com", "reddit.com"].', s.string("excludeDomains item value.", { minLength: 3 }), { maxItems: 100 }),
|
|
2061
|
+
freshness: s.stringEnum("Restrict results to content published within this window.", [
|
|
2062
|
+
"last_24_hours",
|
|
2063
|
+
"last_week",
|
|
2064
|
+
"last_month",
|
|
2065
|
+
"last_year",
|
|
2066
|
+
]),
|
|
2067
|
+
country: s.stringEnum('Two-letter ISO 3166-1 alpha-2 country code to localize results to a specific country (maps to Google\'s `gl` parameter). Example: "us", "gb", "de".', [
|
|
2068
|
+
"af",
|
|
2069
|
+
"al",
|
|
2070
|
+
"dz",
|
|
2071
|
+
"as",
|
|
2072
|
+
"ad",
|
|
2073
|
+
"ao",
|
|
2074
|
+
"ai",
|
|
2075
|
+
"aq",
|
|
2076
|
+
"ag",
|
|
2077
|
+
"ar",
|
|
2078
|
+
"am",
|
|
2079
|
+
"aw",
|
|
2080
|
+
"au",
|
|
2081
|
+
"at",
|
|
2082
|
+
"az",
|
|
2083
|
+
"bs",
|
|
2084
|
+
"bh",
|
|
2085
|
+
"bd",
|
|
2086
|
+
"bb",
|
|
2087
|
+
"by",
|
|
2088
|
+
"be",
|
|
2089
|
+
"bz",
|
|
2090
|
+
"bj",
|
|
2091
|
+
"bm",
|
|
2092
|
+
"bt",
|
|
2093
|
+
"bo",
|
|
2094
|
+
"ba",
|
|
2095
|
+
"bw",
|
|
2096
|
+
"bv",
|
|
2097
|
+
"br",
|
|
2098
|
+
"io",
|
|
2099
|
+
"bn",
|
|
2100
|
+
"bg",
|
|
2101
|
+
"bf",
|
|
2102
|
+
"bi",
|
|
2103
|
+
"kh",
|
|
2104
|
+
"cm",
|
|
2105
|
+
"ca",
|
|
2106
|
+
"cv",
|
|
2107
|
+
"ky",
|
|
2108
|
+
"cf",
|
|
2109
|
+
"td",
|
|
2110
|
+
"cl",
|
|
2111
|
+
"cn",
|
|
2112
|
+
"cx",
|
|
2113
|
+
"cc",
|
|
2114
|
+
"co",
|
|
2115
|
+
"km",
|
|
2116
|
+
"cg",
|
|
2117
|
+
"cd",
|
|
2118
|
+
"ck",
|
|
2119
|
+
"cr",
|
|
2120
|
+
"ci",
|
|
2121
|
+
"hr",
|
|
2122
|
+
"cu",
|
|
2123
|
+
"cy",
|
|
2124
|
+
"cz",
|
|
2125
|
+
"dk",
|
|
2126
|
+
"dj",
|
|
2127
|
+
"dm",
|
|
2128
|
+
"do",
|
|
2129
|
+
"ec",
|
|
2130
|
+
"eg",
|
|
2131
|
+
"sv",
|
|
2132
|
+
"gq",
|
|
2133
|
+
"er",
|
|
2134
|
+
"ee",
|
|
2135
|
+
"et",
|
|
2136
|
+
"fk",
|
|
2137
|
+
"fo",
|
|
2138
|
+
"fj",
|
|
2139
|
+
"fi",
|
|
2140
|
+
"fr",
|
|
2141
|
+
"gf",
|
|
2142
|
+
"pf",
|
|
2143
|
+
"tf",
|
|
2144
|
+
"ga",
|
|
2145
|
+
"gm",
|
|
2146
|
+
"ge",
|
|
2147
|
+
"de",
|
|
2148
|
+
"gh",
|
|
2149
|
+
"gi",
|
|
2150
|
+
"gr",
|
|
2151
|
+
"gl",
|
|
2152
|
+
"gd",
|
|
2153
|
+
"gp",
|
|
2154
|
+
"gu",
|
|
2155
|
+
"gt",
|
|
2156
|
+
"gn",
|
|
2157
|
+
"gw",
|
|
2158
|
+
"gy",
|
|
2159
|
+
"ht",
|
|
2160
|
+
"hm",
|
|
2161
|
+
"va",
|
|
2162
|
+
"hn",
|
|
2163
|
+
"hk",
|
|
2164
|
+
"hu",
|
|
2165
|
+
"is",
|
|
2166
|
+
"in",
|
|
2167
|
+
"id",
|
|
2168
|
+
"ir",
|
|
2169
|
+
"iq",
|
|
2170
|
+
"ie",
|
|
2171
|
+
"il",
|
|
2172
|
+
"it",
|
|
2173
|
+
"jm",
|
|
2174
|
+
"jp",
|
|
2175
|
+
"jo",
|
|
2176
|
+
"kz",
|
|
2177
|
+
"ke",
|
|
2178
|
+
"ki",
|
|
2179
|
+
"kp",
|
|
2180
|
+
"kr",
|
|
2181
|
+
"kw",
|
|
2182
|
+
"kg",
|
|
2183
|
+
"la",
|
|
2184
|
+
"lv",
|
|
2185
|
+
"lb",
|
|
2186
|
+
"ls",
|
|
2187
|
+
"lr",
|
|
2188
|
+
"ly",
|
|
2189
|
+
"li",
|
|
2190
|
+
"lt",
|
|
2191
|
+
"lu",
|
|
2192
|
+
"mo",
|
|
2193
|
+
"mk",
|
|
2194
|
+
"mg",
|
|
2195
|
+
"mw",
|
|
2196
|
+
"my",
|
|
2197
|
+
"mv",
|
|
2198
|
+
"ml",
|
|
2199
|
+
"mt",
|
|
2200
|
+
"mh",
|
|
2201
|
+
"mq",
|
|
2202
|
+
"mr",
|
|
2203
|
+
"mu",
|
|
2204
|
+
"yt",
|
|
2205
|
+
"mx",
|
|
2206
|
+
"fm",
|
|
2207
|
+
"md",
|
|
2208
|
+
"mc",
|
|
2209
|
+
"mn",
|
|
2210
|
+
"ms",
|
|
2211
|
+
"ma",
|
|
2212
|
+
"mz",
|
|
2213
|
+
"mm",
|
|
2214
|
+
"na",
|
|
2215
|
+
"nr",
|
|
2216
|
+
"np",
|
|
2217
|
+
"nl",
|
|
2218
|
+
"an",
|
|
2219
|
+
"nc",
|
|
2220
|
+
"nz",
|
|
2221
|
+
"ni",
|
|
2222
|
+
"ne",
|
|
2223
|
+
"ng",
|
|
2224
|
+
"nu",
|
|
2225
|
+
"nf",
|
|
2226
|
+
"mp",
|
|
2227
|
+
"no",
|
|
2228
|
+
"om",
|
|
2229
|
+
"pk",
|
|
2230
|
+
"pw",
|
|
2231
|
+
"ps",
|
|
2232
|
+
"pa",
|
|
2233
|
+
"pg",
|
|
2234
|
+
"py",
|
|
2235
|
+
"pe",
|
|
2236
|
+
"ph",
|
|
2237
|
+
"pn",
|
|
2238
|
+
"pl",
|
|
2239
|
+
"pt",
|
|
2240
|
+
"pr",
|
|
2241
|
+
"qa",
|
|
2242
|
+
"re",
|
|
2243
|
+
"ro",
|
|
2244
|
+
"ru",
|
|
2245
|
+
"rw",
|
|
2246
|
+
"sh",
|
|
2247
|
+
"kn",
|
|
2248
|
+
"lc",
|
|
2249
|
+
"pm",
|
|
2250
|
+
"vc",
|
|
2251
|
+
"ws",
|
|
2252
|
+
"sm",
|
|
2253
|
+
"st",
|
|
2254
|
+
"sa",
|
|
2255
|
+
"sn",
|
|
2256
|
+
"rs",
|
|
2257
|
+
"sc",
|
|
2258
|
+
"sl",
|
|
2259
|
+
"sg",
|
|
2260
|
+
"sk",
|
|
2261
|
+
"si",
|
|
2262
|
+
"sb",
|
|
2263
|
+
"so",
|
|
2264
|
+
"za",
|
|
2265
|
+
"gs",
|
|
2266
|
+
"es",
|
|
2267
|
+
"lk",
|
|
2268
|
+
"sd",
|
|
2269
|
+
"sr",
|
|
2270
|
+
"sj",
|
|
2271
|
+
"sz",
|
|
2272
|
+
"se",
|
|
2273
|
+
"ch",
|
|
2274
|
+
"sy",
|
|
2275
|
+
"tw",
|
|
2276
|
+
"tj",
|
|
2277
|
+
"tz",
|
|
2278
|
+
"th",
|
|
2279
|
+
"tl",
|
|
2280
|
+
"tg",
|
|
2281
|
+
"tk",
|
|
2282
|
+
"to",
|
|
2283
|
+
"tt",
|
|
2284
|
+
"tn",
|
|
2285
|
+
"tr",
|
|
2286
|
+
"tm",
|
|
2287
|
+
"tc",
|
|
2288
|
+
"tv",
|
|
2289
|
+
"ug",
|
|
2290
|
+
"ua",
|
|
2291
|
+
"ae",
|
|
2292
|
+
"gb",
|
|
2293
|
+
"us",
|
|
2294
|
+
"um",
|
|
2295
|
+
"uy",
|
|
2296
|
+
"uz",
|
|
2297
|
+
"vu",
|
|
2298
|
+
"ve",
|
|
2299
|
+
"vn",
|
|
2300
|
+
"vg",
|
|
2301
|
+
"vi",
|
|
2302
|
+
"wf",
|
|
2303
|
+
"eh",
|
|
2304
|
+
"ye",
|
|
2305
|
+
"zm",
|
|
2306
|
+
"zw",
|
|
2307
|
+
]),
|
|
2308
|
+
languages: s.anyOf('Languages to return results in, as BCP 47 language codes such as `en` or `de`, or "all" for any language. Defaults to "all". Example: ["en", "de"].', [
|
|
2309
|
+
s.stringEnum("languages value.", ["all"]),
|
|
2310
|
+
s.array("languages value.", s.stringEnum("languages item value.", [
|
|
2311
|
+
"am",
|
|
2312
|
+
"ar",
|
|
2313
|
+
"az",
|
|
2314
|
+
"be",
|
|
2315
|
+
"bg",
|
|
2316
|
+
"bn",
|
|
2317
|
+
"ca",
|
|
2318
|
+
"ceb",
|
|
2319
|
+
"cs",
|
|
2320
|
+
"cy",
|
|
2321
|
+
"da",
|
|
2322
|
+
"de",
|
|
2323
|
+
"el",
|
|
2324
|
+
"en",
|
|
2325
|
+
"es",
|
|
2326
|
+
"et",
|
|
2327
|
+
"eu",
|
|
2328
|
+
"fa",
|
|
2329
|
+
"fi",
|
|
2330
|
+
"fr",
|
|
2331
|
+
"gu",
|
|
2332
|
+
"ha",
|
|
2333
|
+
"haw",
|
|
2334
|
+
"he",
|
|
2335
|
+
"hi",
|
|
2336
|
+
"hr",
|
|
2337
|
+
"hu",
|
|
2338
|
+
"hy",
|
|
2339
|
+
"id",
|
|
2340
|
+
"is",
|
|
2341
|
+
"it",
|
|
2342
|
+
"ja",
|
|
2343
|
+
"ka",
|
|
2344
|
+
"kk",
|
|
2345
|
+
"kn",
|
|
2346
|
+
"ko",
|
|
2347
|
+
"ku",
|
|
2348
|
+
"ky",
|
|
2349
|
+
"lo",
|
|
2350
|
+
"lt",
|
|
2351
|
+
"lv",
|
|
2352
|
+
"mk",
|
|
2353
|
+
"ml",
|
|
2354
|
+
"mn",
|
|
2355
|
+
"mr",
|
|
2356
|
+
"ms",
|
|
2357
|
+
"ne",
|
|
2358
|
+
"nl",
|
|
2359
|
+
"no",
|
|
2360
|
+
"or",
|
|
2361
|
+
"pa",
|
|
2362
|
+
"pl",
|
|
2363
|
+
"ps",
|
|
2364
|
+
"pt",
|
|
2365
|
+
"ro",
|
|
2366
|
+
"ru",
|
|
2367
|
+
"sk",
|
|
2368
|
+
"sl",
|
|
2369
|
+
"so",
|
|
2370
|
+
"sq",
|
|
2371
|
+
"sr",
|
|
2372
|
+
"sv",
|
|
2373
|
+
"sw",
|
|
2374
|
+
"ta",
|
|
2375
|
+
"te",
|
|
2376
|
+
"th",
|
|
2377
|
+
"tl",
|
|
2378
|
+
"tr",
|
|
2379
|
+
"uk",
|
|
2380
|
+
"ur",
|
|
2381
|
+
"uz",
|
|
2382
|
+
"vi",
|
|
2383
|
+
"yo",
|
|
2384
|
+
"zh",
|
|
2385
|
+
]), { minItems: 1 }),
|
|
2386
|
+
]),
|
|
2387
|
+
queryFanout: s.boolean("Currently has no effect."),
|
|
2388
|
+
markdownOptions: s.nullable(s.object("Inline Markdown scraping for each result. Set `enabled: true` to activate.", {
|
|
2389
|
+
enabled: s.boolean("Scrape each result to Markdown. Adds 1 credit per result with Markdown."),
|
|
2390
|
+
includeLinks: s.boolean("Keep hyperlinks in the Markdown."),
|
|
2391
|
+
includeImages: s.boolean("Emit image references in the Markdown."),
|
|
2392
|
+
shortenBase64Images: s.boolean("Truncate inline base64 image payloads to keep responses small."),
|
|
2393
|
+
useMainContentOnly: s.boolean("Strip nav, header, footer, and sidebar — keep only the primary article content."),
|
|
2394
|
+
pdf: s.object("PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.", {
|
|
2395
|
+
shouldParse: s.boolean("Parse PDF URLs. When false, PDF results are skipped with WEBSITE_ACCESS_ERROR."),
|
|
2396
|
+
start: s.integer("First 1-based PDF page to parse.", { minimum: 1 }),
|
|
2397
|
+
end: s.integer("Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must be >= start.", { minimum: 1 }),
|
|
2398
|
+
}, { required: [] }),
|
|
2399
|
+
includeFrames: s.boolean("Render iframe contents into the Markdown."),
|
|
2400
|
+
maxAgeMs: s.nullable(s.integer("Maximum cache age in milliseconds for result page content. Defaults to 180 days (15552000000 ms) when Markdown is requested, or 365 days (31536000000 ms) when only highlights are requested. Explicit values override either default. Maximum: 365 days. Set to 0 to force a fresh scrape.", { minimum: 0, maximum: 31536000000 })),
|
|
2401
|
+
waitForMs: s.nullable(s.integer("Extra wait after page load before rendering, in ms (0–30000). Useful for JS-heavy pages.", {
|
|
2402
|
+
minimum: 0,
|
|
2403
|
+
maximum: 30000,
|
|
2404
|
+
})),
|
|
2405
|
+
timeoutOpts: scrapeTimeoutSchema,
|
|
2406
|
+
}, { required: [] })),
|
|
2407
|
+
highlightsOptions: s.nullable(s.object("Passages from each result page that are relevant to the query. Pages are read with the `markdownOptions` settings.", {
|
|
2408
|
+
enabled: s.boolean("Return relevant passages for each result. Adds 1 credit per 10 results."),
|
|
2409
|
+
maxCharacters: s.integer("Maximum combined length of passages per result.", {
|
|
2410
|
+
minimum: 100,
|
|
2411
|
+
maximum: 20000,
|
|
2412
|
+
}),
|
|
2413
|
+
}, { required: [] })),
|
|
2414
|
+
descriptionMaxCharacters: s.nullable(s.integer("Maximum length of each result's `description`, in characters.", { minimum: 0 })),
|
|
2415
|
+
timeoutOpts: partialTimeoutSchema,
|
|
2416
|
+
zdr: s.stringEnum("`enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR.", ["enabled", "disabled"]),
|
|
2417
|
+
tags: requestTagsSchema,
|
|
2418
|
+
}, { required: ["query"] });
|
|
2419
|
+
export const enrich_personInputSchema = s.object("Enrich a person input.", {
|
|
2420
|
+
social_urls: s.array("Public profile URLs for the person. A person-profile URL can identify the person without a name.", s.string("social urls item value.", { format: "uri" }), { minItems: 1, maxItems: 20 }),
|
|
2421
|
+
name: s.object("Person name. Without an email or person-profile URL, provide both first and last name plus company, education, or location.", {
|
|
2422
|
+
first: s.string("First or given name.", { minLength: 1, maxLength: 100 }),
|
|
2423
|
+
last: s.string("Last or family name.", { minLength: 1, maxLength: 100 }),
|
|
2424
|
+
}, { required: [] }),
|
|
2425
|
+
email: s.string("Email address of the person to find.", { maxLength: 320, format: "email" }),
|
|
2426
|
+
company: s.object("Company context to help identify the person. Provide a name or domain.", {
|
|
2427
|
+
name: s.string("Name of a company associated with the person.", {
|
|
2428
|
+
minLength: 1,
|
|
2429
|
+
maxLength: 200,
|
|
2430
|
+
}),
|
|
2431
|
+
domain: s.string("Website domain of a company associated with the person.", {
|
|
2432
|
+
minLength: 1,
|
|
2433
|
+
maxLength: 253,
|
|
2434
|
+
}),
|
|
2435
|
+
}, { required: [] }),
|
|
2436
|
+
education: s.array("Education history to help distinguish people with similar names.", s.object("education item value.", {
|
|
2437
|
+
institution: s.object("School or university, identified by name or domain.", {
|
|
2438
|
+
name: s.string("Name of the school or university.", { minLength: 1, maxLength: 200 }),
|
|
2439
|
+
domain: s.string("Website domain of the school or university.", {
|
|
2440
|
+
minLength: 1,
|
|
2441
|
+
maxLength: 253,
|
|
2442
|
+
}),
|
|
2443
|
+
}, { required: [] }),
|
|
2444
|
+
degree: s.string("Degree or qualification earned.", { minLength: 1, maxLength: 200 }),
|
|
2445
|
+
field_of_study: s.string("Subject or major studied.", { minLength: 1, maxLength: 200 }),
|
|
2446
|
+
graduation_year: s.integer("Four-digit graduation year.", {
|
|
2447
|
+
minimum: 1900,
|
|
2448
|
+
maximum: 2200,
|
|
2449
|
+
}),
|
|
2450
|
+
}, { required: [] }), { minItems: 1, maxItems: 10 }),
|
|
2451
|
+
location: s.object("Location context to help identify the person. Provide a city, region, or country.", {
|
|
2452
|
+
city: s.string("City associated with the person.", { minLength: 1, maxLength: 200 }),
|
|
2453
|
+
region: s.string("State, province, or region associated with the person.", {
|
|
2454
|
+
minLength: 1,
|
|
2455
|
+
maxLength: 200,
|
|
2456
|
+
}),
|
|
2457
|
+
country: s.string("Country associated with the person.", { minLength: 1, maxLength: 200 }),
|
|
2458
|
+
}, { required: [] }),
|
|
2459
|
+
timeoutOpts: partialTimeoutSchema,
|
|
2460
|
+
zdr: s.stringEnum("`enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR.", ["enabled", "disabled"]),
|
|
2461
|
+
tags: requestTagsSchema,
|
|
2462
|
+
}, { required: [] });
|
|
2463
|
+
export const retrieve_brandInputSchema = s.oneOf([
|
|
2464
|
+
brandRetrieveByDomainRequestSchema,
|
|
2465
|
+
brandRetrieveByNameRequestSchema,
|
|
2466
|
+
brandRetrieveByEmailRequestSchema,
|
|
2467
|
+
brandRetrieveByTickerRequestSchema,
|
|
2468
|
+
brandRetrieveByDirectUrlRequestSchema,
|
|
2469
|
+
brandRetrieveFromTransactionRequestSchema,
|
|
2470
|
+
], {
|
|
2471
|
+
description: "Retrieve a brand input.",
|
|
2472
|
+
});
|
|
2473
|
+
export const search_brandsInputSchema = s.object("Auto-complete Brand input.", {
|
|
2474
|
+
query: s.string("Search term, matched against the fields selected by queryBy (e.g. 'stripe', 'stripe.com', 'stri').", { minLength: 1, maxLength: 100 }),
|
|
2475
|
+
country: s.stringEnum("Only return brands in this country, as an uppercase ISO 3166-1 alpha-2 code such as US or GB.", [
|
|
2476
|
+
"AD",
|
|
2477
|
+
"AE",
|
|
2478
|
+
"AF",
|
|
2479
|
+
"AG",
|
|
2480
|
+
"AI",
|
|
2481
|
+
"AL",
|
|
2482
|
+
"AM",
|
|
2483
|
+
"AO",
|
|
2484
|
+
"AQ",
|
|
2485
|
+
"AR",
|
|
2486
|
+
"AS",
|
|
2487
|
+
"AT",
|
|
2488
|
+
"AU",
|
|
2489
|
+
"AW",
|
|
2490
|
+
"AX",
|
|
2491
|
+
"AZ",
|
|
2492
|
+
"BA",
|
|
2493
|
+
"BB",
|
|
2494
|
+
"BD",
|
|
2495
|
+
"BE",
|
|
2496
|
+
"BF",
|
|
2497
|
+
"BG",
|
|
2498
|
+
"BH",
|
|
2499
|
+
"BI",
|
|
2500
|
+
"BJ",
|
|
2501
|
+
"BL",
|
|
2502
|
+
"BM",
|
|
2503
|
+
"BN",
|
|
2504
|
+
"BO",
|
|
2505
|
+
"BQ",
|
|
2506
|
+
"BR",
|
|
2507
|
+
"BS",
|
|
2508
|
+
"BT",
|
|
2509
|
+
"BV",
|
|
2510
|
+
"BW",
|
|
2511
|
+
"BY",
|
|
2512
|
+
"BZ",
|
|
2513
|
+
"CA",
|
|
2514
|
+
"CC",
|
|
2515
|
+
"CD",
|
|
2516
|
+
"CF",
|
|
2517
|
+
"CG",
|
|
2518
|
+
"CH",
|
|
2519
|
+
"CI",
|
|
2520
|
+
"CK",
|
|
2521
|
+
"CL",
|
|
2522
|
+
"CM",
|
|
2523
|
+
"CN",
|
|
2524
|
+
"CO",
|
|
2525
|
+
"CR",
|
|
2526
|
+
"CU",
|
|
2527
|
+
"CV",
|
|
2528
|
+
"CW",
|
|
2529
|
+
"CX",
|
|
2530
|
+
"CY",
|
|
2531
|
+
"CZ",
|
|
2532
|
+
"DE",
|
|
2533
|
+
"DJ",
|
|
2534
|
+
"DK",
|
|
2535
|
+
"DM",
|
|
2536
|
+
"DO",
|
|
2537
|
+
"DZ",
|
|
2538
|
+
"EC",
|
|
2539
|
+
"EE",
|
|
2540
|
+
"EG",
|
|
2541
|
+
"EH",
|
|
2542
|
+
"ER",
|
|
2543
|
+
"ES",
|
|
2544
|
+
"ET",
|
|
2545
|
+
"FI",
|
|
2546
|
+
"FJ",
|
|
2547
|
+
"FK",
|
|
2548
|
+
"FM",
|
|
2549
|
+
"FO",
|
|
2550
|
+
"FR",
|
|
2551
|
+
"GA",
|
|
2552
|
+
"GB",
|
|
2553
|
+
"GD",
|
|
2554
|
+
"GE",
|
|
2555
|
+
"GF",
|
|
2556
|
+
"GG",
|
|
2557
|
+
"GH",
|
|
2558
|
+
"GI",
|
|
2559
|
+
"GL",
|
|
2560
|
+
"GM",
|
|
2561
|
+
"GN",
|
|
2562
|
+
"GP",
|
|
2563
|
+
"GQ",
|
|
2564
|
+
"GR",
|
|
2565
|
+
"GS",
|
|
2566
|
+
"GT",
|
|
2567
|
+
"GU",
|
|
2568
|
+
"GW",
|
|
2569
|
+
"GY",
|
|
2570
|
+
"HK",
|
|
2571
|
+
"HM",
|
|
2572
|
+
"HN",
|
|
2573
|
+
"HR",
|
|
2574
|
+
"HT",
|
|
2575
|
+
"HU",
|
|
2576
|
+
"ID",
|
|
2577
|
+
"IE",
|
|
2578
|
+
"IL",
|
|
2579
|
+
"IM",
|
|
2580
|
+
"IN",
|
|
2581
|
+
"IO",
|
|
2582
|
+
"IQ",
|
|
2583
|
+
"IR",
|
|
2584
|
+
"IS",
|
|
2585
|
+
"IT",
|
|
2586
|
+
"JE",
|
|
2587
|
+
"JM",
|
|
2588
|
+
"JO",
|
|
2589
|
+
"JP",
|
|
2590
|
+
"KE",
|
|
2591
|
+
"KG",
|
|
2592
|
+
"KH",
|
|
2593
|
+
"KI",
|
|
2594
|
+
"KM",
|
|
2595
|
+
"KN",
|
|
2596
|
+
"KP",
|
|
2597
|
+
"KR",
|
|
2598
|
+
"KW",
|
|
2599
|
+
"KY",
|
|
2600
|
+
"KZ",
|
|
2601
|
+
"LA",
|
|
2602
|
+
"LB",
|
|
2603
|
+
"LC",
|
|
2604
|
+
"LI",
|
|
2605
|
+
"LK",
|
|
2606
|
+
"LR",
|
|
2607
|
+
"LS",
|
|
2608
|
+
"LT",
|
|
2609
|
+
"LU",
|
|
2610
|
+
"LV",
|
|
2611
|
+
"LY",
|
|
2612
|
+
"MA",
|
|
2613
|
+
"MC",
|
|
2614
|
+
"MD",
|
|
2615
|
+
"ME",
|
|
2616
|
+
"MF",
|
|
2617
|
+
"MG",
|
|
2618
|
+
"MH",
|
|
2619
|
+
"MK",
|
|
2620
|
+
"ML",
|
|
2621
|
+
"MM",
|
|
2622
|
+
"MN",
|
|
2623
|
+
"MO",
|
|
2624
|
+
"MP",
|
|
2625
|
+
"MQ",
|
|
2626
|
+
"MR",
|
|
2627
|
+
"MS",
|
|
2628
|
+
"MT",
|
|
2629
|
+
"MU",
|
|
2630
|
+
"MV",
|
|
2631
|
+
"MW",
|
|
2632
|
+
"MX",
|
|
2633
|
+
"MY",
|
|
2634
|
+
"MZ",
|
|
2635
|
+
"NA",
|
|
2636
|
+
"NC",
|
|
2637
|
+
"NE",
|
|
2638
|
+
"NF",
|
|
2639
|
+
"NG",
|
|
2640
|
+
"NI",
|
|
2641
|
+
"NL",
|
|
2642
|
+
"NO",
|
|
2643
|
+
"NP",
|
|
2644
|
+
"NR",
|
|
2645
|
+
"NU",
|
|
2646
|
+
"NZ",
|
|
2647
|
+
"OM",
|
|
2648
|
+
"PA",
|
|
2649
|
+
"PE",
|
|
2650
|
+
"PF",
|
|
2651
|
+
"PG",
|
|
2652
|
+
"PH",
|
|
2653
|
+
"PK",
|
|
2654
|
+
"PL",
|
|
2655
|
+
"PM",
|
|
2656
|
+
"PN",
|
|
2657
|
+
"PR",
|
|
2658
|
+
"PS",
|
|
2659
|
+
"PT",
|
|
2660
|
+
"PW",
|
|
2661
|
+
"PY",
|
|
2662
|
+
"QA",
|
|
2663
|
+
"RE",
|
|
2664
|
+
"RO",
|
|
2665
|
+
"RS",
|
|
2666
|
+
"RU",
|
|
2667
|
+
"RW",
|
|
2668
|
+
"SA",
|
|
2669
|
+
"SB",
|
|
2670
|
+
"SC",
|
|
2671
|
+
"SD",
|
|
2672
|
+
"SE",
|
|
2673
|
+
"SG",
|
|
2674
|
+
"SH",
|
|
2675
|
+
"SI",
|
|
2676
|
+
"SJ",
|
|
2677
|
+
"SK",
|
|
2678
|
+
"SL",
|
|
2679
|
+
"SM",
|
|
2680
|
+
"SN",
|
|
2681
|
+
"SO",
|
|
2682
|
+
"SR",
|
|
2683
|
+
"SS",
|
|
2684
|
+
"ST",
|
|
2685
|
+
"SV",
|
|
2686
|
+
"SX",
|
|
2687
|
+
"SY",
|
|
2688
|
+
"SZ",
|
|
2689
|
+
"TC",
|
|
2690
|
+
"TD",
|
|
2691
|
+
"TF",
|
|
2692
|
+
"TG",
|
|
2693
|
+
"TH",
|
|
2694
|
+
"TJ",
|
|
2695
|
+
"TK",
|
|
2696
|
+
"TL",
|
|
2697
|
+
"TM",
|
|
2698
|
+
"TN",
|
|
2699
|
+
"TO",
|
|
2700
|
+
"TR",
|
|
2701
|
+
"TT",
|
|
2702
|
+
"TV",
|
|
2703
|
+
"TW",
|
|
2704
|
+
"TZ",
|
|
2705
|
+
"UA",
|
|
2706
|
+
"UG",
|
|
2707
|
+
"UM",
|
|
2708
|
+
"US",
|
|
2709
|
+
"UY",
|
|
2710
|
+
"UZ",
|
|
2711
|
+
"VA",
|
|
2712
|
+
"VC",
|
|
2713
|
+
"VE",
|
|
2714
|
+
"VG",
|
|
2715
|
+
"VI",
|
|
2716
|
+
"VN",
|
|
2717
|
+
"VU",
|
|
2718
|
+
"WF",
|
|
2719
|
+
"WS",
|
|
2720
|
+
"YE",
|
|
2721
|
+
"YT",
|
|
2722
|
+
"ZA",
|
|
2723
|
+
"ZM",
|
|
2724
|
+
"ZW",
|
|
2725
|
+
]),
|
|
2726
|
+
language: s.stringEnum("Only return brands with this primary language, such as english or french.", [
|
|
2727
|
+
"afrikaans",
|
|
2728
|
+
"albanian",
|
|
2729
|
+
"amharic",
|
|
2730
|
+
"arabic",
|
|
2731
|
+
"armenian",
|
|
2732
|
+
"assamese",
|
|
2733
|
+
"aymara",
|
|
2734
|
+
"azeri",
|
|
2735
|
+
"basque",
|
|
2736
|
+
"belarusian",
|
|
2737
|
+
"bengali",
|
|
2738
|
+
"bosnian",
|
|
2739
|
+
"bulgarian",
|
|
2740
|
+
"burmese",
|
|
2741
|
+
"cantonese",
|
|
2742
|
+
"catalan",
|
|
2743
|
+
"cebuano",
|
|
2744
|
+
"chinese",
|
|
2745
|
+
"corsican",
|
|
2746
|
+
"croatian",
|
|
2747
|
+
"czech",
|
|
2748
|
+
"danish",
|
|
2749
|
+
"dutch",
|
|
2750
|
+
"english",
|
|
2751
|
+
"esperanto",
|
|
2752
|
+
"estonian",
|
|
2753
|
+
"farsi",
|
|
2754
|
+
"fijian",
|
|
2755
|
+
"finnish",
|
|
2756
|
+
"french",
|
|
2757
|
+
"galician",
|
|
2758
|
+
"georgian",
|
|
2759
|
+
"german",
|
|
2760
|
+
"greek",
|
|
2761
|
+
"guarani",
|
|
2762
|
+
"gujarati",
|
|
2763
|
+
"haitian-creole",
|
|
2764
|
+
"hausa",
|
|
2765
|
+
"hawaiian",
|
|
2766
|
+
"hebrew",
|
|
2767
|
+
"hindi",
|
|
2768
|
+
"hmong",
|
|
2769
|
+
"hungarian",
|
|
2770
|
+
"icelandic",
|
|
2771
|
+
"igbo",
|
|
2772
|
+
"indonesian",
|
|
2773
|
+
"irish",
|
|
2774
|
+
"italian",
|
|
2775
|
+
"japanese",
|
|
2776
|
+
"javanese",
|
|
2777
|
+
"kannada",
|
|
2778
|
+
"kazakh",
|
|
2779
|
+
"khmer",
|
|
2780
|
+
"kinyarwanda",
|
|
2781
|
+
"korean",
|
|
2782
|
+
"kurdish",
|
|
2783
|
+
"kyrgyz",
|
|
2784
|
+
"lao",
|
|
2785
|
+
"latin",
|
|
2786
|
+
"latvian",
|
|
2787
|
+
"lingala",
|
|
2788
|
+
"lithuanian",
|
|
2789
|
+
"luxembourgish",
|
|
2790
|
+
"macedonian",
|
|
2791
|
+
"malagasy",
|
|
2792
|
+
"malay",
|
|
2793
|
+
"malayalam",
|
|
2794
|
+
"maltese",
|
|
2795
|
+
"maori",
|
|
2796
|
+
"marathi",
|
|
2797
|
+
"mongolian",
|
|
2798
|
+
"nepali",
|
|
2799
|
+
"norwegian",
|
|
2800
|
+
"odia",
|
|
2801
|
+
"oromo",
|
|
2802
|
+
"pashto",
|
|
2803
|
+
"pidgin",
|
|
2804
|
+
"polish",
|
|
2805
|
+
"portuguese",
|
|
2806
|
+
"punjabi",
|
|
2807
|
+
"quechua",
|
|
2808
|
+
"romanian",
|
|
2809
|
+
"russian",
|
|
2810
|
+
"samoan",
|
|
2811
|
+
"scottish-gaelic",
|
|
2812
|
+
"serbian",
|
|
2813
|
+
"sesotho",
|
|
2814
|
+
"shona",
|
|
2815
|
+
"sindhi",
|
|
2816
|
+
"sinhala",
|
|
2817
|
+
"slovak",
|
|
2818
|
+
"slovene",
|
|
2819
|
+
"somali",
|
|
2820
|
+
"spanish",
|
|
2821
|
+
"sundanese",
|
|
2822
|
+
"swahili",
|
|
2823
|
+
"swedish",
|
|
2824
|
+
"tagalog",
|
|
2825
|
+
"tajik",
|
|
2826
|
+
"tamil",
|
|
2827
|
+
"tatar",
|
|
2828
|
+
"telugu",
|
|
2829
|
+
"thai",
|
|
2830
|
+
"tibetan",
|
|
2831
|
+
"tigrinya",
|
|
2832
|
+
"tongan",
|
|
2833
|
+
"tswana",
|
|
2834
|
+
"turkish",
|
|
2835
|
+
"turkmen",
|
|
2836
|
+
"ukrainian",
|
|
2837
|
+
"urdu",
|
|
2838
|
+
"uyghur",
|
|
2839
|
+
"uzbek",
|
|
2840
|
+
"vietnamese",
|
|
2841
|
+
"welsh",
|
|
2842
|
+
"wolof",
|
|
2843
|
+
"xhosa",
|
|
2844
|
+
"yiddish",
|
|
2845
|
+
"yoruba",
|
|
2846
|
+
"zulu",
|
|
2847
|
+
]),
|
|
2848
|
+
autocomplete: s.boolean("Whether the search term matches by prefix, so partial words match as they are typed (e.g. 'stri' matches Stripe). Set to false to match whole words only."),
|
|
2849
|
+
queryBy: s.array("Fields to match the search term against, as a comma-separated list or repeated parameter: 'name', 'domain', or both. Defaults to both.", s.stringEnum("queryBy item value.", ["name", "domain"]), { minItems: 1 }),
|
|
2850
|
+
typoTolerance: s.integer("Maximum number of typos tolerated when matching, from 0 to 2. Defaults to 0 (no typo tolerance).", { minimum: 0, maximum: 2 }),
|
|
2851
|
+
tags: s.describe(requestTagsSchema, "Comma-separated labels for filtering usage, e.g. `production,team-alpha`."),
|
|
2852
|
+
}, { required: ["query"] });
|
|
2853
|
+
export const extract_styleguideInputSchema = s.object("Extract a styleguide input.", {
|
|
2854
|
+
domain: s.string("Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The domain will be automatically normalized and validated. You must provide either 'domain' or 'directUrl', but not both.", { minLength: 3 }),
|
|
2855
|
+
directUrl: s.string("Exact URL to inspect. Provide either `domain` or `directUrl`, not both.", {
|
|
2856
|
+
format: "uri",
|
|
2857
|
+
}),
|
|
2858
|
+
maxAgeMs: s.nullable(s.integer("Maximum age of cached brand data in ms. Defaults to 3 months; clamped to 0–1 year. `0` refreshes.")),
|
|
2859
|
+
timeoutOpts: s.describe(scrapeTimeoutSchema, "Request deadline and what to return when it passes."),
|
|
2860
|
+
colorScheme: s.stringEnum("Optional browser color scheme to emulate for websites that respond to prefers-color-scheme. This value is part of the styleguide cache key.", ["light", "dark"]),
|
|
2861
|
+
zdr: s.stringEnum("`enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR.", ["enabled", "disabled"]),
|
|
2862
|
+
tags: s.describe(requestTagsSchema, "Comma-separated labels for filtering usage, e.g. `production,team-alpha`."),
|
|
2863
|
+
}, { required: [] });
|
|
2864
|
+
export const extract_fontsInputSchema = s.object("Extract fonts input.", {
|
|
2865
|
+
directUrl: s.string("Exact page to inspect. Provide either `domain` or `directUrl`.", {
|
|
2866
|
+
format: "uri",
|
|
2867
|
+
}),
|
|
2868
|
+
domain: s.string("Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domain will be automatically normalized and validated. You must provide either 'domain' or 'directUrl', but not both.", { minLength: 3 }),
|
|
2869
|
+
maxAgeMs: s.nullable(s.integer("Maximum age of cached brand data in ms. Defaults to 3 months; clamped to 0–1 year. `0` refreshes.")),
|
|
2870
|
+
timeoutOpts: s.describe(scrapeTimeoutSchema, "Request deadline and what to return when it passes."),
|
|
2871
|
+
tags: s.describe(requestTagsSchema, "Comma-separated labels for filtering usage, e.g. `production,team-alpha`."),
|
|
2872
|
+
}, { required: [] });
|
|
2873
|
+
export const classify_naicsInputSchema = s.object("Classify NAICS codes input.", {
|
|
2874
|
+
input: s.string("Brand domain or title to retrieve NAICS code for. If a valid domain is provided, it will be used for classification, otherwise, we will search for the brand using the provided title.", { minLength: 4 }),
|
|
2875
|
+
minResults: s.integer("Minimum number of NAICS codes to return. Must be at least 1. Defaults to 1.", {
|
|
2876
|
+
minimum: 1,
|
|
2877
|
+
maximum: 10,
|
|
2878
|
+
}),
|
|
2879
|
+
maxResults: s.integer("Maximum number of NAICS codes to return. Must be between 1 and 10. Defaults to 5.", {
|
|
2880
|
+
minimum: 1,
|
|
2881
|
+
maximum: 10,
|
|
2882
|
+
}),
|
|
2883
|
+
timeoutOpts: s.describe(partialTimeoutSchema, "Request deadline and what to return when it passes."),
|
|
2884
|
+
zdr: s.stringEnum("`enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR.", ["enabled", "disabled"]),
|
|
2885
|
+
tags: s.describe(requestTagsSchema, "Comma-separated labels for filtering usage, e.g. `production,team-alpha`."),
|
|
2886
|
+
}, { required: ["input"] });
|
|
2887
|
+
export const classify_sicInputSchema = s.object("Classify SIC codes input.", {
|
|
2888
|
+
input: s.string("Brand domain or title to retrieve SIC code for. If a valid domain is provided, it will be used for classification, otherwise, we will search for the brand using the provided title.", { minLength: 4 }),
|
|
2889
|
+
type: s.stringEnum("SIC dataset: `original_sic` (1987) or `latest_sec` (current SEC list).", [
|
|
2890
|
+
"original_sic",
|
|
2891
|
+
"latest_sec",
|
|
2892
|
+
]),
|
|
2893
|
+
minResults: s.integer("Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.", {
|
|
2894
|
+
minimum: 1,
|
|
2895
|
+
maximum: 10,
|
|
2896
|
+
}),
|
|
2897
|
+
maxResults: s.integer("Maximum number of SIC codes to return. Must be between 1 and 10. Defaults to 5.", {
|
|
2898
|
+
minimum: 1,
|
|
2899
|
+
maximum: 10,
|
|
2900
|
+
}),
|
|
2901
|
+
timeoutOpts: s.describe(partialTimeoutSchema, "Request deadline and what to return when it passes."),
|
|
2902
|
+
zdr: s.stringEnum("`enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR.", ["enabled", "disabled"]),
|
|
2903
|
+
tags: s.describe(requestTagsSchema, "Comma-separated labels for filtering usage, e.g. `production,team-alpha`."),
|
|
2904
|
+
}, { required: ["input"] });
|
|
2905
|
+
export const prefetch_brandInputSchema = s.object("Prefetch brand data input.", {
|
|
2906
|
+
type: s.stringEnum("Data to prefetch.", ["brand", "styleguide"]),
|
|
2907
|
+
identifier: utilityPrefetchIdentifierSchema,
|
|
2908
|
+
timeoutOpts: timeoutSchema,
|
|
2909
|
+
tags: requestTagsSchema,
|
|
2910
|
+
}, { required: ["type", "identifier"] });
|
|
2911
|
+
export const create_monitorInputSchema = s.object("Create a monitor input.", {
|
|
2912
|
+
mode: monitorsModeSchema,
|
|
2913
|
+
name: s.string("Display name for the monitor.", { minLength: 1, maxLength: 200 }),
|
|
2914
|
+
tags: s.array("Labels for filtering monitors, their changes, and their usage.", s.string("tags item value.", { minLength: 1, maxLength: 50 }), { maxItems: 20, uniqueItems: true }),
|
|
2915
|
+
target: monitorsTargetSchema,
|
|
2916
|
+
change_detection: monitorsChangeDetectionSchema,
|
|
2917
|
+
schedule: monitorsScheduleSchema,
|
|
2918
|
+
webhook: monitorsNullableWebhookConfigSchema,
|
|
2919
|
+
}, { required: ["name", "target"] });
|
|
2920
|
+
export const list_monitorsInputSchema = s.object("List monitors input.", {
|
|
2921
|
+
q: s.string("Free-text search term, matched against the fields named in `search_by`.", {
|
|
2922
|
+
maxLength: 200,
|
|
2923
|
+
}),
|
|
2924
|
+
search_by: s.nullable(s.array("Fields to search with `q`. Defaults to all fields; page and extract targets can have instructions.", s.stringEnum("search by item value.", ["name", "url", "instructions", "tags"]), {})),
|
|
2925
|
+
search_type: s.stringEnum("`prefix` for as-you-type prefix matching (default), `exact` for full-token matching.", [
|
|
2926
|
+
"exact",
|
|
2927
|
+
"prefix",
|
|
2928
|
+
]),
|
|
2929
|
+
status: s.stringEnum("Filter monitors by lifecycle status.", ["active", "paused", "failed"]),
|
|
2930
|
+
target_type: s.stringEnum("Filter by target type.", ["page", "sitemap", "extract"]),
|
|
2931
|
+
change_detection_type: s.stringEnum("Filter by change detection type.", ["exact", "semantic"]),
|
|
2932
|
+
tags: s.nullable(s.array("Comma-separated list of tags to filter by (matches monitors having any of them).", s.string("tags item value.", { minLength: 1, maxLength: 50 }), { maxItems: 20 })),
|
|
2933
|
+
tag: s.string("Filter to items that have this tag."),
|
|
2934
|
+
limit: s.integer("Maximum number of items to return per page (1-100). Defaults to 25.", {
|
|
2935
|
+
minimum: 1,
|
|
2936
|
+
maximum: 100,
|
|
2937
|
+
}),
|
|
2938
|
+
cursor: s.string("Opaque pagination cursor from a previous response."),
|
|
2939
|
+
}, { required: [] });
|
|
2940
|
+
export const get_monitorInputSchema = s.object("Retrieve a monitor input.", {
|
|
2941
|
+
monitor_id: s.string("ID of the monitor."),
|
|
2942
|
+
}, { required: ["monitor_id"] });
|
|
2943
|
+
export const update_monitorInputSchema = s.object("Update a monitor input.", {
|
|
2944
|
+
name: s.string("Display name for the monitor.", { minLength: 1, maxLength: 200 }),
|
|
2945
|
+
tags: s.array("Labels for filtering monitors, their changes, and their usage.", s.string("tags item value.", { minLength: 1, maxLength: 50 }), { maxItems: 20, uniqueItems: true }),
|
|
2946
|
+
status: s.stringEnum("Set `paused` to stop scheduled runs or `active` to resume them.", ["active", "paused"]),
|
|
2947
|
+
target: monitorsTargetSchema,
|
|
2948
|
+
change_detection: monitorsChangeDetectionSchema,
|
|
2949
|
+
schedule: monitorsScheduleSchema,
|
|
2950
|
+
webhook: s.describe(monitorsNullableWebhookConfigSchema, "Set to null to remove the webhook. Changing `url` issues a new secret."),
|
|
2951
|
+
monitor_id: s.string("ID of the monitor."),
|
|
2952
|
+
}, { required: ["monitor_id"] });
|
|
2953
|
+
export const delete_monitorInputSchema = s.object("Delete a monitor input.", {
|
|
2954
|
+
monitor_id: s.string("ID of the monitor."),
|
|
2955
|
+
}, { required: ["monitor_id"] });
|
|
2956
|
+
export const list_monitor_runsInputSchema = s.object("List monitor runs input.", {
|
|
2957
|
+
monitor_id: s.string("ID of the monitor."),
|
|
2958
|
+
status: {
|
|
2959
|
+
allOf: [monitorsRunStatusSchema, s.unknown("Filter runs by lifecycle status.")],
|
|
2960
|
+
description: "Filter runs by lifecycle status.",
|
|
2961
|
+
},
|
|
2962
|
+
limit: s.integer("Maximum number of items to return per page (1-100). Defaults to 25.", {
|
|
2963
|
+
minimum: 1,
|
|
2964
|
+
maximum: 100,
|
|
2965
|
+
}),
|
|
2966
|
+
cursor: s.string("Opaque pagination cursor from a previous response."),
|
|
2967
|
+
}, { required: ["monitor_id"] });
|
|
2968
|
+
export const get_monitor_runInputSchema = s.object("Retrieve a monitor run input.", {
|
|
2969
|
+
monitor_id: s.string("ID of the monitor."),
|
|
2970
|
+
run_id: s.string("ID of the monitor run."),
|
|
2971
|
+
}, { required: ["monitor_id", "run_id"] });
|
|
2972
|
+
export const list_monitor_changesInputSchema = s.object("List monitor changes input.", {
|
|
2973
|
+
monitor_id: s.string("ID of the monitor."),
|
|
2974
|
+
tag: s.string("Filter to items that have this tag."),
|
|
2975
|
+
since: s.string("Only include items at or after this ISO 8601 timestamp.", {
|
|
2976
|
+
format: "date-time",
|
|
2977
|
+
}),
|
|
2978
|
+
until: s.string("Only include items before this ISO 8601 timestamp.", { format: "date-time" }),
|
|
2979
|
+
limit: s.integer("Maximum number of items to return per page (1-100). Defaults to 25.", {
|
|
2980
|
+
minimum: 1,
|
|
2981
|
+
maximum: 100,
|
|
2982
|
+
}),
|
|
2983
|
+
cursor: s.string("Opaque pagination cursor from a previous response."),
|
|
2984
|
+
}, { required: ["monitor_id"] });
|
|
2985
|
+
export const list_account_runsInputSchema = s.object("List runs for all monitors input.", {
|
|
2986
|
+
status: {
|
|
2987
|
+
allOf: [monitorsRunStatusSchema, s.unknown("Filter runs by lifecycle status.")],
|
|
2988
|
+
description: "Filter runs by lifecycle status.",
|
|
2989
|
+
},
|
|
2990
|
+
limit: s.integer("Maximum number of items to return per page (1-100). Defaults to 25.", {
|
|
2991
|
+
minimum: 1,
|
|
2992
|
+
maximum: 100,
|
|
2993
|
+
}),
|
|
2994
|
+
cursor: s.string("Opaque pagination cursor from a previous response."),
|
|
2995
|
+
}, { required: [] });
|
|
2996
|
+
export const list_monitor_credit_usageInputSchema = s.object("Retrieve monitor credit usage input.", {
|
|
2997
|
+
since: s.string("Only include items at or after this ISO 8601 timestamp.", {
|
|
2998
|
+
format: "date-time",
|
|
2999
|
+
}),
|
|
3000
|
+
until: s.string("Only include items before this ISO 8601 timestamp.", { format: "date-time" }),
|
|
3001
|
+
}, { required: [] });
|
|
3002
|
+
export const get_monitor_limitsInputSchema = s.object("Retrieve monitor limits input.", {}, { required: [], additionalProperties: true });
|
|
3003
|
+
export const list_changesInputSchema = s.object("List changes for all monitors input.", {
|
|
3004
|
+
monitor_id: s.string("Filter changes to a single monitor."),
|
|
3005
|
+
target_type: s.stringEnum("Filter by target type.", ["page", "sitemap", "extract"]),
|
|
3006
|
+
change_detection_type: s.stringEnum("Filter by change detection type.", ["exact", "semantic"]),
|
|
3007
|
+
tag: s.string("Filter to items that have this tag."),
|
|
3008
|
+
since: s.string("Only include items at or after this ISO 8601 timestamp.", {
|
|
3009
|
+
format: "date-time",
|
|
3010
|
+
}),
|
|
3011
|
+
until: s.string("Only include items before this ISO 8601 timestamp.", { format: "date-time" }),
|
|
3012
|
+
limit: s.integer("Maximum number of items to return per page (1-100). Defaults to 25.", {
|
|
3013
|
+
minimum: 1,
|
|
3014
|
+
maximum: 100,
|
|
3015
|
+
}),
|
|
3016
|
+
cursor: s.string("Opaque pagination cursor from a previous response."),
|
|
3017
|
+
}, { required: [] });
|
|
3018
|
+
export const get_changeInputSchema = s.object("Retrieve a monitor change input.", {
|
|
3019
|
+
change_id: s.string("ID of the detected change."),
|
|
3020
|
+
}, { required: ["change_id"] });
|
|
3021
|
+
export const run_monitor_nowInputSchema = s.object("Run a monitor now input.", {
|
|
3022
|
+
monitor_id: s.string("ID of the monitor."),
|
|
3023
|
+
}, { required: ["monitor_id"] });
|
|
3024
|
+
export const rotate_monitor_webhook_secretInputSchema = s.object("Rotate a monitor webhook secret input.", {
|
|
3025
|
+
monitor_id: s.string("ID of the monitor."),
|
|
3026
|
+
}, { required: ["monitor_id"] });
|
|
3027
|
+
export const submit_batchInputSchema = s.object("Submit a batch input.", {
|
|
3028
|
+
input: s.oneOf([
|
|
3029
|
+
s.object("Scrape a list of up to 100,000 URLs.", {
|
|
3030
|
+
mode: s.stringEnum("Scrape the pages in `data.urls`.", ["scrape"]),
|
|
3031
|
+
data: batchUnifiedScrapeDataSchema,
|
|
3032
|
+
}, { required: ["mode", "data"] }),
|
|
3033
|
+
s.object("Crawl pages starting from a URL or from a domain's sitemap.", {
|
|
3034
|
+
mode: s.stringEnum("Discover and scrape pages from `data.source`.", ["crawl"]),
|
|
3035
|
+
data: batchUnifiedCrawlDataSchema,
|
|
3036
|
+
}, { required: ["mode", "data"] }),
|
|
3037
|
+
], {
|
|
3038
|
+
description: "Choose a URL list or a site crawl.",
|
|
3039
|
+
}),
|
|
3040
|
+
webhookUrl: s.string("Legacy URL notified when the batch finishes. Preserves one best-effort attempt. Cannot be combined with webhook.", { format: "uri" }),
|
|
3041
|
+
webhook: s.object("Where to send the batch's final-status event. Omit `retry` for one attempt; `{}` uses the default retry schedule.", {
|
|
3042
|
+
url: s.string("Public HTTP(S) URL that receives batch completion, failure, or cancellation events.", {
|
|
3043
|
+
format: "uri",
|
|
3044
|
+
}),
|
|
3045
|
+
retry: webhookRetrySchema,
|
|
3046
|
+
}, { required: ["url"] }),
|
|
3047
|
+
tags: s.array("Tags stored on the batch. Filter the batch list by them later.", s.string("tags item value.", { minLength: 1, maxLength: 50 }), { maxItems: 20 }),
|
|
3048
|
+
idempotencyKey: s.string("Unique key per submission. Retrying with the same key and body returns the original batch; a different body returns `409`.", { maxLength: 200 }),
|
|
3049
|
+
}, { required: ["input"] });
|
|
3050
|
+
export const list_batchesInputSchema = s.object("List batches input.", {
|
|
3051
|
+
shouldIncludeUnified: s.boolean("Include batches submitted with Scrape Anything formats. Defaults to false."),
|
|
3052
|
+
limit: s.integer("Batches per page. Defaults to 25.", { minimum: 1, maximum: 100 }),
|
|
3053
|
+
cursor: s.string("Cursor from the previous page."),
|
|
3054
|
+
status: s.stringEnum("Filter by status.", ["queued", "running", "cancelling", "completed", "cancelled", "failed"]),
|
|
3055
|
+
q: s.string("Free-text search term, matched against the batch id, crawl source (start URL or sitemap domain), and tags.", { maxLength: 200 }),
|
|
3056
|
+
search_type: s.stringEnum("`prefix` for as-you-type prefix matching (default), `exact` for full-token matching.", [
|
|
3057
|
+
"exact",
|
|
3058
|
+
"prefix",
|
|
3059
|
+
]),
|
|
3060
|
+
tags: s.anyOf("Tags to filter by (matches batches having any of them). Pass repeated `tags` params or one comma-separated list, e.g. `tags=docs,competitor`.", [s.string("tags value."), s.array("tags value.", s.string("tags item value."), {})]),
|
|
3061
|
+
}, { required: [] });
|
|
3062
|
+
export const get_batchInputSchema = s.object("Retrieve a batch input.", {
|
|
3063
|
+
batch_id: s.string("Batch ID."),
|
|
3064
|
+
}, { required: ["batch_id"] });
|
|
3065
|
+
export const delete_batchInputSchema = s.object("Delete a batch input.", {
|
|
3066
|
+
batch_id: s.string("Batch ID."),
|
|
3067
|
+
}, { required: ["batch_id"] });
|
|
3068
|
+
export const get_batch_resultsInputSchema = s.object("List batch results input.", {
|
|
3069
|
+
batch_id: s.string("Batch ID."),
|
|
3070
|
+
limit: s.integer("Records per page. Defaults to 25. A page can close early so its payload stays under ~8 MB; rely on next_cursor rather than counting records.", { minimum: 1, maximum: 100 }),
|
|
3071
|
+
cursor: s.string("next_cursor from the previous page.", { pattern: "^\\d+:\\d+$" }),
|
|
3072
|
+
}, { required: ["batch_id"] });
|
|
3073
|
+
export const cancel_batchInputSchema = s.object("Cancel a batch input.", {
|
|
3074
|
+
batch_id: s.string("Batch ID."),
|
|
3075
|
+
}, { required: ["batch_id"] });
|
|
3076
|
+
export const search_companiesInputSchema = s.object("Search companies input.", {
|
|
3077
|
+
query: s.string("Describe the companies to find.", { minLength: 1, maxLength: 500 }),
|
|
3078
|
+
filters: companySearchFiltersSchema,
|
|
3079
|
+
limit: s.integer("Maximum number of results to return (1-100).", { minimum: 1, maximum: 100 }),
|
|
3080
|
+
cursor: s.string("Use next_cursor to fetch the next page.", { maxLength: 64 }),
|
|
3081
|
+
tags: requestTagsSchema,
|
|
3082
|
+
}, { required: ["query"] });
|