@oomol-lab/open-connector 1.9.2 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/assets/open-connector/catalog/apps/allratestoday.json +174 -0
- package/assets/open-connector/catalog/apps/slackbot.json +20 -1
- package/assets/open-connector/catalog/apps-index.json +1 -1
- package/package.json +1 -1
- package/src/connection-error.d.ts +7 -0
- package/src/connection-error.js +10 -0
- package/src/connection-service.d.ts +2 -50
- package/src/connection-service.js +6 -130
- package/src/connection-store.d.ts +41 -0
- package/src/connection-store.js +1 -0
- package/src/core/guarded-fetch.d.ts +3 -0
- package/src/core/guarded-fetch.js +8 -1
- package/src/core/provider-network-policy.d.ts +15 -0
- package/src/core/provider-network-policy.js +11 -0
- package/src/core/request.d.ts +18 -14
- package/src/core/request.js +11 -35
- package/src/credential-resolver.d.ts +24 -0
- package/src/credential-resolver.js +131 -0
- package/src/mcp.js +1 -1
- package/src/oauth/oauth-client-config-service.d.ts +1 -1
- package/src/oauth/oauth-client-config-service.js +14 -2
- package/src/oauth/oauth-credential-refresh-service.js +1 -1
- package/src/oauth/oauth-flow-service.d.ts +9 -1
- package/src/oauth/oauth-flow-service.js +11 -1
- package/src/providers/abuseipdb/executors.js +3 -4
- package/src/providers/action-contracts.generated.d.ts +1 -0
- package/src/providers/addressfinder/executors.js +2 -3
- package/src/providers/aeroleads/executors.js +3 -3
- package/src/providers/affinity/runtime.js +6 -7
- package/src/providers/aftership/executors.js +2 -2
- package/src/providers/agent_mail/runtime.js +2 -2
- package/src/providers/agentql/runtime.js +2 -2
- package/src/providers/agenty/runtime.js +5 -6
- package/src/providers/agiled/runtime.d.ts +0 -1
- package/src/providers/agiled/runtime.js +2 -3
- package/src/providers/agility/runtime.js +2 -3
- package/src/providers/ahrefs/runtime.js +3 -3
- package/src/providers/aifinmarket/runtime.js +6 -7
- package/src/providers/airtable/executors.js +3 -3
- package/src/providers/alchemy/runtime.js +2 -2
- package/src/providers/algolia/runtime.js +3 -3
- package/src/providers/aliyun_oss/executors.js +7 -7
- package/src/providers/allratestoday/executors.d.ts +3 -0
- package/src/providers/allratestoday/executors.js +18 -0
- package/src/providers/allratestoday/runtime.d.ts +17 -0
- package/src/providers/allratestoday/runtime.js +104 -0
- package/src/providers/alpaca/runtime.js +2 -3
- package/src/providers/alpha_vantage/runtime.js +2 -2
- package/src/providers/alt_text_ai/runtime.js +2 -2
- package/src/providers/altiria/executors.js +3 -3
- package/src/providers/amap/runtime.js +3 -3
- package/src/providers/ambee/runtime.js +2 -2
- package/src/providers/ambivo/executors.js +3 -3
- package/src/providers/amilia/runtime.js +1 -1
- package/src/providers/amplemarket/runtime.js +2 -2
- package/src/providers/amplitude/runtime.js +3 -3
- package/src/providers/anysearch/runtime.js +4 -4
- package/src/providers/apaleo/runtime.js +2 -2
- package/src/providers/api_sports/executors.js +3 -4
- package/src/providers/apiverve/executors.js +2 -3
- package/src/providers/apollo/executors.js +2 -3
- package/src/providers/appcircle/runtime.js +5 -5
- package/src/providers/appdrag/executors.js +2 -3
- package/src/providers/arcgis_online/executors.js +2 -2
- package/src/providers/auth0_management/runtime.js +2 -3
- package/src/providers/autoblogger/executors.js +3 -3
- package/src/providers/baidu_maps/runtime.js +3 -3
- package/src/providers/baidu_netdisk/runtime-mcp.js +3 -4
- package/src/providers/bark/executors.js +5 -5
- package/src/providers/bitrise/runtime.js +3 -3
- package/src/providers/bouncer/executors.js +3 -4
- package/src/providers/browse_ai/runtime.js +3 -4
- package/src/providers/browserstack/executors.js +6 -7
- package/src/providers/buildkite/runtime.js +3 -3
- package/src/providers/bunnycdn/runtime.js +3 -3
- package/src/providers/businessmap/runtime.js +6 -7
- package/src/providers/buttondown/runtime.js +2 -2
- package/src/providers/byteforms/runtime.js +2 -2
- package/src/providers/calendly/runtime.js +2 -2
- package/src/providers/captainbi/runtime.js +6 -6
- package/src/providers/castingwords/runtime.js +1 -1
- package/src/providers/chatpdf/runtime.js +4 -4
- package/src/providers/check/executors.js +3 -4
- package/src/providers/checkly/executors.js +3 -4
- package/src/providers/chengxin/runtime.js +3 -3
- package/src/providers/cincopa/executors.js +3 -4
- package/src/providers/circle/executors.js +3 -4
- package/src/providers/clearout/executors.js +1 -2
- package/src/providers/clickhelp/runtime.js +5 -5
- package/src/providers/clickhouse/runtime.js +4 -4
- package/src/providers/clinicalkey/runtime.js +3 -3
- package/src/providers/clinicaltrials_gov/runtime.js +4 -5
- package/src/providers/clockify/runtime.js +4 -4
- package/src/providers/close/runtime.js +3 -3
- package/src/providers/cloudconvert/runtime.js +8 -9
- package/src/providers/cloudflare_dns/runtime.js +2 -2
- package/src/providers/cloudflare_email_routing/runtime.js +2 -2
- package/src/providers/cloudflare_r2/runtime.js +5 -5
- package/src/providers/cloudflare_worker/runtime.js +10 -10
- package/src/providers/cloudinary/runtime.js +4 -4
- package/src/providers/cloudlayer/runtime.js +5 -5
- package/src/providers/codacy/runtime.js +2 -2
- package/src/providers/codemagic/runtime.js +2 -2
- package/src/providers/confluence/executors.js +4 -4
- package/src/providers/confluence/runtime.d.ts +0 -1
- package/src/providers/confluence/runtime.js +6 -7
- package/src/providers/contactout/runtime.js +5 -5
- package/src/providers/contentful/runtime.js +2 -2
- package/src/providers/contentstack_content_delivery/runtime.js +1 -1
- package/src/providers/cronly/runtime.js +2 -2
- package/src/providers/crossref/runtime.js +3 -3
- package/src/providers/cutt_ly/runtime.js +3 -3
- package/src/providers/cyberimpact/runtime.js +3 -3
- package/src/providers/dachser/executors.js +2 -2
- package/src/providers/dailybot/runtime.js +1 -1
- package/src/providers/databox/runtime.js +2 -2
- package/src/providers/databricks/runtime.js +2 -2
- package/src/providers/datacite/runtime.js +1 -1
- package/src/providers/datadog/executors.js +3 -4
- package/src/providers/datascope/runtime.js +2 -2
- package/src/providers/daytona/executors.js +3 -3
- package/src/providers/deepgram/runtime.js +2 -2
- package/src/providers/deepl/runtime.js +4 -4
- package/src/providers/detrack/executors.js +5 -5
- package/src/providers/deutschlandgpt/runtime.js +2 -2
- package/src/providers/dialmycalls/runtime.js +4 -4
- package/src/providers/diffbot/executors.js +4 -4
- package/src/providers/digistore24/executors.js +3 -3
- package/src/providers/dingtalk_bot/executors.js +1 -1
- package/src/providers/discourse/executors.d.ts +0 -1
- package/src/providers/discourse/executors.js +6 -7
- package/src/providers/docugenerate/runtime.js +3 -3
- package/src/providers/doppler/runtime.shared.js +3 -3
- package/src/providers/doppler_marketing_automation/runtime.js +4 -4
- package/src/providers/dovetail/runtime.js +2 -2
- package/src/providers/dropcontact/runtime.js +3 -3
- package/src/providers/dub/executors.js +6 -6
- package/src/providers/dumplingai/runtime.js +2 -2
- package/src/providers/elevenlabs/executors.js +4 -4
- package/src/providers/elevenreader/runtime.js +1 -1
- package/src/providers/emailoctopus/runtime.js +4 -4
- package/src/providers/embase/runtime.js +3 -3
- package/src/providers/emelia/executors.js +2 -2
- package/src/providers/enigma/executors.js +3 -3
- package/src/providers/eodhd_apis/executors.js +2 -2
- package/src/providers/eventzilla/runtime.js +3 -4
- package/src/providers/evervault/runtime.js +1 -1
- package/src/providers/excalidraw_mcp/runtime.js +3 -4
- package/src/providers/excel/runtime.js +6 -6
- package/src/providers/expofp/runtime.js +2 -2
- package/src/providers/faktoora/runtime.js +5 -5
- package/src/providers/fast_note_sync/runtime.js +2 -2
- package/src/providers/feathery/executors.js +2 -3
- package/src/providers/feishu_app_bot/executors.js +2 -3
- package/src/providers/feishu_custom_bot/executors.js +2 -3
- package/src/providers/ffhub/executors.js +2 -3
- package/src/providers/fidel_api/executors.js +2 -3
- package/src/providers/files_com/executors.js +2 -3
- package/src/providers/fireberry/runtime.d.ts +0 -1
- package/src/providers/fireberry/runtime.js +3 -4
- package/src/providers/firehydrant/executors.js +2 -3
- package/src/providers/float/executors.js +2 -3
- package/src/providers/flomo/executors.js +5 -6
- package/src/providers/flowiseai/executors.js +2 -3
- package/src/providers/fluxguard/executors.js +2 -3
- package/src/providers/folk/executors.js +2 -3
- package/src/providers/football_data/executors.js +2 -3
- package/src/providers/forem/executors.js +2 -3
- package/src/providers/formbricks/executors.js +2 -3
- package/src/providers/formsite/executors.js +3 -4
- package/src/providers/formspree/executors.js +2 -2
- package/src/providers/freshdesk/executors.js +3 -4
- package/src/providers/freshservice/executors.js +3 -4
- package/src/providers/freshteam/runtime.js +3 -4
- package/src/providers/full_contact/executors.js +3 -3
- package/src/providers/fusion-api/runtime.js +2 -3
- package/src/providers/gagelist/executors.js +3 -3
- package/src/providers/gainsight_nxt/executors.js +2 -2
- package/src/providers/gamma/executors.js +4 -3
- package/src/providers/gangtise/runtime.js +3 -4
- package/src/providers/gatherup/runtime.js +1 -1
- package/src/providers/geckoboard/executors.js +2 -3
- package/src/providers/gemini/runtime.d.ts +0 -1
- package/src/providers/gemini/runtime.js +5 -6
- package/src/providers/genpage/runtime.js +2 -2
- package/src/providers/geokeo/executors.js +4 -4
- package/src/providers/getnote/runtime.js +2 -3
- package/src/providers/github/runtime-shared.js +2 -2
- package/src/providers/glyphic/runtime.js +3 -4
- package/src/providers/gmail/executors.js +125 -27
- package/src/providers/gong/runtime.js +6 -7
- package/src/providers/googlecalendar/runtime-shared.js +3 -4
- package/src/providers/googledrive/runtime-request.js +2 -3
- package/src/providers/googlesheets/runtime-shared.js +3 -4
- package/src/providers/gorgias/runtime.js +4 -4
- package/src/providers/gotify/executors.js +7 -8
- package/src/providers/greenhouse/executors.js +3 -3
- package/src/providers/gumloop/executors.js +2 -3
- package/src/providers/gumroad/executors.js +2 -3
- package/src/providers/habitica/executors.js +2 -3
- package/src/providers/hackerrank_work/executors.js +2 -3
- package/src/providers/harvest/executors.js +3 -4
- package/src/providers/haveibeenpwned/executors.js +2 -3
- package/src/providers/headout/executors.js +3 -4
- package/src/providers/healthchecks_io/executors.js +2 -3
- package/src/providers/helium10/runtime.js +4 -5
- package/src/providers/helpdesk/runtime.js +4 -4
- package/src/providers/home_assistant/runtime-ws.js +9 -10
- package/src/providers/hotjar/executors.js +4 -4
- package/src/providers/httpsms/runtime.js +3 -4
- package/src/providers/hub_planner/executors.js +3 -3
- package/src/providers/hubspot/runtime.js +3 -4
- package/src/providers/humaans/runtime.js +3 -3
- package/src/providers/hunter/runtime.js +3 -3
- package/src/providers/icypeas/executors.js +3 -4
- package/src/providers/ima/runtime.js +7 -7
- package/src/providers/infolobby/runtime.js +6 -6
- package/src/providers/instabot/runtime.js +6 -6
- package/src/providers/instatus/runtime.js +4 -4
- package/src/providers/intuiface/executors.js +3 -3
- package/src/providers/iplocate/runtime.js +4 -5
- package/src/providers/ipregistry/executors.js +2 -2
- package/src/providers/jiminny/runtime.js +4 -4
- package/src/providers/jin10/executors.js +4 -5
- package/src/providers/jira/executors.js +4 -4
- package/src/providers/kaleido/runtime.js +2 -2
- package/src/providers/kandji/runtime.js +2 -2
- package/src/providers/keygen/executors.js +4 -4
- package/src/providers/keyword/runtime.js +2 -2
- package/src/providers/kie_ai/executors.js +1 -1
- package/src/providers/kintone/runtime.js +1 -1
- package/src/providers/kit/runtime.js +2 -2
- package/src/providers/klangio/runtime.js +4 -4
- package/src/providers/klaviyo/executors.js +1 -1
- package/src/providers/klazify/executors.js +3 -3
- package/src/providers/klipfolio/runtime.js +3 -3
- package/src/providers/knack/executors.js +1 -1
- package/src/providers/kommo/runtime.js +2 -2
- package/src/providers/kontent_ai/executors.js +3 -4
- package/src/providers/l2s/executors.js +3 -4
- package/src/providers/latchshot/executors.js +2 -2
- package/src/providers/leadboxer/runtime.js +4 -4
- package/src/providers/leadiq/runtime.js +4 -4
- package/src/providers/linguapop/runtime.js +1 -1
- package/src/providers/lingvanex_translation_api/runtime.js +5 -6
- package/src/providers/lingxing_mcp/runtime.js +3 -4
- package/src/providers/linkup/runtime.js +5 -6
- package/src/providers/liveagent/executors.js +6 -6
- package/src/providers/loops/executors.js +2 -2
- package/src/providers/loyjoy/runtime.js +2 -2
- package/src/providers/loyverse/executors.js +4 -4
- package/src/providers/lusha/runtime.js +3 -3
- package/src/providers/mailbluster/runtime.js +3 -4
- package/src/providers/mailcoach/runtime.js +4 -4
- package/src/providers/mailgenius/executors.js +3 -4
- package/src/providers/mailjet/runtime.js +3 -3
- package/src/providers/mails_so/runtime.js +1 -1
- package/src/providers/mailsoftly/runtime.js +5 -5
- package/src/providers/mailtrap/runtime.js +4 -5
- package/src/providers/manus/runtime.js +3 -3
- package/src/providers/mautic/runtime.js +3 -3
- package/src/providers/megaventory/runtime.js +3 -3
- package/src/providers/memberstack/runtime.js +2 -2
- package/src/providers/mendeley/executors.js +2 -3
- package/src/providers/mindbody/runtime.js +3 -3
- package/src/providers/minerstat/executors.js +3 -3
- package/src/providers/mintlify/runtime.js +3 -3
- package/src/providers/missive/executors.js +3 -5
- package/src/providers/mixpanel/executors.js +3 -3
- package/src/providers/mobile_text_alerts/runtime.js +3 -3
- package/src/providers/mocean/executors.js +3 -3
- package/src/providers/moco/executors.js +5 -5
- package/src/providers/moesif/runtime.js +4 -4
- package/src/providers/monday/runtime-common.js +3 -3
- package/src/providers/monica_crm/runtime.js +4 -4
- package/src/providers/moorcheh/runtime.js +3 -3
- package/src/providers/more_trees/runtime.d.ts +0 -1
- package/src/providers/more_trees/runtime.js +7 -8
- package/src/providers/moxie/runtime.js +2 -2
- package/src/providers/msg91/runtime.js +4 -4
- package/src/providers/mx/runtime.js +1 -1
- package/src/providers/needle/runtime.js +3 -4
- package/src/providers/netlify/runtime.js +2 -3
- package/src/providers/niftyimages/executors.js +2 -2
- package/src/providers/northbeam/runtime.js +1 -1
- package/src/providers/nozbe_teams/executors.js +4 -4
- package/src/providers/npm/runtime.js +4 -4
- package/src/providers/nusii_proposals/runtime.js +2 -2
- package/src/providers/ocr_web_service/executors.js +4 -4
- package/src/providers/octopus_deploy/executors.js +3 -3
- package/src/providers/oksign/runtime.js +3 -4
- package/src/providers/one_drive/executors.js +6 -6
- package/src/providers/one_password_events/runtime.js +1 -1
- package/src/providers/onfleet/runtime.js +3 -3
- package/src/providers/onlyoffice_docspace/runtime.js +4 -4
- package/src/providers/oomnitza/runtime.js +3 -4
- package/src/providers/otter_ai/executors.js +2 -2
- package/src/providers/oura/runtime.js +1 -1
- package/src/providers/paddle/executors.js +3 -3
- package/src/providers/pagerduty/runtime.js +2 -2
- package/src/providers/paradym/runtime.js +4 -4
- package/src/providers/parallel/runtime.js +3 -3
- package/src/providers/partner_stack_partner/runtime.js +1 -1
- package/src/providers/payrexx/runtime.js +5 -6
- package/src/providers/permit_io/runtime.js +2 -2
- package/src/providers/pinboard/executors.js +5 -6
- package/src/providers/pinpoint/runtime.js +2 -2
- package/src/providers/placid/runtime.js +3 -3
- package/src/providers/plain/runtime.js +5 -5
- package/src/providers/planetscale/runtime.js +2 -2
- package/src/providers/planhat/executors.js +6 -6
- package/src/providers/plausible_analytics/runtime.js +3 -3
- package/src/providers/posthog/runtime.js +3 -3
- package/src/providers/predis_ai/executors.js +3 -3
- package/src/providers/printavo/runtime.js +2 -2
- package/src/providers/prospeo/runtime.js +2 -3
- package/src/providers/provider-runtime.d.ts +13 -1
- package/src/providers/provider-runtime.js +25 -10
- package/src/providers/push_by_techulus/executors.js +3 -4
- package/src/providers/pushover/runtime.js +4 -5
- package/src/providers/pushsafer/runtime.js +4 -5
- package/src/providers/pylon/runtime.js +2 -2
- package/src/providers/qase/runtime.js +3 -3
- package/src/providers/qdrant/runtime.js +1 -1
- package/src/providers/qichacha/runtime.js +2 -2
- package/src/providers/qingflow/runtime.js +2 -2
- package/src/providers/quickchart/runtime.js +2 -2
- package/src/providers/quintadb/runtime.js +2 -2
- package/src/providers/quo/runtime.js +2 -2
- package/src/providers/rawg/runtime.js +4 -4
- package/src/providers/razorpay/runtime.js +4 -5
- package/src/providers/readme/runtime.js +6 -6
- package/src/providers/referralhero/runtime.js +3 -3
- package/src/providers/registry.generated.js +1 -0
- package/src/providers/render/executors.js +3 -3
- package/src/providers/respond_io/executors.js +3 -3
- package/src/providers/reversecontact/runtime.js +3 -3
- package/src/providers/ritekit/executors.js +2 -2
- package/src/providers/riveter/executors.js +2 -3
- package/src/providers/rocket_chat/executors.js +3 -4
- package/src/providers/rocket_reach/executors.js +3 -4
- package/src/providers/saucelabs/runtime.js +4 -4
- package/src/providers/scopus/runtime.js +3 -3
- package/src/providers/scrape_do/executors.js +2 -2
- package/src/providers/scraperapi/runtime.js +4 -4
- package/src/providers/scrapfly/executors.js +2 -2
- package/src/providers/scrapingant/executors.js +6 -7
- package/src/providers/scrapingbee/executors.js +3 -3
- package/src/providers/scrapingdog/executors.js +1 -1
- package/src/providers/screenshot_fyi/executors.js +3 -4
- package/src/providers/screenshotbase/runtime.js +3 -3
- package/src/providers/search_api/runtime.js +2 -2
- package/src/providers/securitytrails/executors.js +2 -2
- package/src/providers/semantic_scholar/executors.js +2 -2
- package/src/providers/sendbird/executors.js +2 -2
- package/src/providers/sendfox/executors.js +3 -3
- package/src/providers/sendgrid/executors.js +5 -5
- package/src/providers/sendmator/runtime.js +3 -4
- package/src/providers/seqera/runtime.js +3 -4
- package/src/providers/serveravatar/executors.js +3 -3
- package/src/providers/sheetdb/runtime.js +2 -2
- package/src/providers/short_menu/runtime.js +3 -3
- package/src/providers/shortcut/runtime.js +3 -3
- package/src/providers/shortpixel/runtime.js +2 -2
- package/src/providers/shotstack/runtime.js +4 -4
- package/src/providers/signpath/runtime.js +2 -2
- package/src/providers/signwell/runtime.js +5 -6
- package/src/providers/similarweb_digitalrank_api/runtime.js +3 -3
- package/src/providers/simla/runtime.js +5 -5
- package/src/providers/simplybook_me/executors.js +6 -6
- package/src/providers/sitespeakai/runtime.js +3 -3
- package/src/providers/slickdeals/runtime.js +2 -3
- package/src/providers/smartsuite/runtime.js +3 -3
- package/src/providers/sonarcloud/runtime.js +5 -5
- package/src/providers/sorftime/runtime.js +8 -8
- package/src/providers/spider/runtime.js +2 -2
- package/src/providers/splunk_http_event_collector/runtime.js +7 -8
- package/src/providers/sportsdata/runtime.js +4 -4
- package/src/providers/spyfu/runtime.js +4 -5
- package/src/providers/square/runtime.js +4 -4
- package/src/providers/stannp/runtime.js +2 -2
- package/src/providers/stripe/executors.js +2 -2
- package/src/providers/supermemory/runtime.js +3 -3
- package/src/providers/survey_monkey/runtime.js +3 -3
- package/src/providers/taiga/runtime.js +4 -4
- package/src/providers/talenox/executors.js +4 -4
- package/src/providers/tally/runtime.js +3 -3
- package/src/providers/tavily/runtime.js +3 -4
- package/src/providers/teamcamp/executors.js +2 -2
- package/src/providers/teamtailor/executors.js +2 -2
- package/src/providers/telegram/executors.js +6 -7
- package/src/providers/teltel/executors.js +2 -2
- package/src/providers/templated/executors.js +3 -3
- package/src/providers/tencent_docs/runtime.js +4 -4
- package/src/providers/tencent_maps/runtime.js +3 -3
- package/src/providers/textcortex/runtime.js +3 -3
- package/src/providers/the_cat_api/runtime.js +3 -3
- package/src/providers/the_colony/runtime.js +3 -3
- package/src/providers/the_odds_api/runtime.js +3 -4
- package/src/providers/the_official_board/runtime.js +4 -4
- package/src/providers/thehive/runtime.js +1 -1
- package/src/providers/tikhub/endpoint-catalog.js +2 -3
- package/src/providers/tiktok_business/runtime.js +2 -2
- package/src/providers/timecamp/runtime.js +2 -2
- package/src/providers/timelink/runtime.js +2 -2
- package/src/providers/totp/runtime.js +4 -5
- package/src/providers/trawlingweb/runtime.js +2 -2
- package/src/providers/trilium/runtime.js +2 -2
- package/src/providers/triple_whale/runtime.js +3 -3
- package/src/providers/truvera/runtime.js +2 -2
- package/src/providers/tuskr/runtime.js +2 -2
- package/src/providers/typebot/runtime.js +2 -2
- package/src/providers/typeform/runtime.js +2 -2
- package/src/providers/uptimerobot/executors.js +3 -4
- package/src/providers/v2ex/runtime.js +8 -9
- package/src/providers/valyu/runtime.js +3 -3
- package/src/providers/vapi/runtime.js +4 -4
- package/src/providers/vectorshift/runtime.js +3 -3
- package/src/providers/venafitlsprotectcloud/runtime.js +2 -3
- package/src/providers/venafitlsprotectdatacenter/runtime.js +2 -3
- package/src/providers/vida/runtime.js +4 -4
- package/src/providers/vonage/runtime.js +3 -3
- package/src/providers/walmart_marketplace/runtime.js +5 -5
- package/src/providers/weatherapi/executors.js +3 -4
- package/src/providers/web_of_science/runtime.js +4 -4
- package/src/providers/web_of_science_expanded/runtime.js +9 -9
- package/src/providers/webex/runtime.js +3 -3
- package/src/providers/webinarjam/runtime.js +4 -4
- package/src/providers/webscraping_ai/runtime.js +3 -3
- package/src/providers/webvizio/runtime.js +3 -4
- package/src/providers/wecom_bot/smart-runtime.js +4 -5
- package/src/providers/wecom_mcp/runtime.js +3 -4
- package/src/providers/wejam_ai/runtime.js +3 -3
- package/src/providers/wolfram_alpha_api/runtime.js +3 -3
- package/src/providers/woocommerce/runtime.js +1 -1
- package/src/providers/woodpecker_co/executors.js +3 -4
- package/src/providers/woot/runtime.js +6 -6
- package/src/providers/workable/runtime.js +3 -3
- package/src/providers/workday/runtime.js +4 -4
- package/src/providers/workiom/runtime.js +2 -2
- package/src/providers/workiz/runtime.js +2 -2
- package/src/providers/workpath/executors.js +3 -4
- package/src/providers/worksnaps/executors.js +2 -2
- package/src/providers/y_gy/runtime.js +2 -2
- package/src/providers/zenscrape/runtime.js +3 -3
- package/src/providers/zep/runtime.js +4 -4
- package/src/providers/zeplin/runtime.js +2 -2
- package/src/providers/zhihu/executors.js +6 -6
- package/src/providers/zylvie/runtime.js +4 -4
- package/src/saas/saas-cleanup-service.d.ts +2 -0
- package/src/saas/saas-cleanup-service.js +2 -1
- package/src/saas/saas-execution-service.d.ts +1 -1
- package/src/server/actions/action-runner.js +1 -1
- package/src/server/api/auth.js +3 -0
- package/src/server/api/connection-routes.js +1 -1
- package/src/server/api/console-catalog-routes.js +1 -1
- package/src/server/api/console-oauth-routes.d.ts +3 -1
- package/src/server/api/console-oauth-routes.js +22 -9
- package/src/server/api/oauth-completion-page.d.ts +57 -0
- package/src/server/api/oauth-completion-page.js +135 -10
- package/src/server/api/openapi.d.ts +5 -0
- package/src/server/api/openapi.js +62 -2
- package/src/server/api/runtime-api.d.ts +2 -1
- package/src/server/api/runtime-app-routes.js +1 -1
- package/src/server/api/runtime-execution-routes.js +2 -1
- package/src/server/connect-app.d.ts +4 -0
- package/src/server/connect-app.js +14 -1
- package/src/server/connect-server.d.ts +6 -0
- package/src/server/connect-server.js +114 -4
- package/src/server/connector-runtime.d.ts +6 -8
- package/src/server/connector-runtime.js +8 -28
- package/src/server/proxy/proxy-runner.js +1 -1
- package/src/server/slack-event-verification.d.ts +37 -0
- package/src/server/slack-event-verification.js +91 -0
- package/src/server/storage/connection-request-store.d.ts +1 -1
- package/src/server/storage/connection-store.d.ts +1 -1
- package/src/server/storage/postgres/runtime-store.d.ts +1 -1
- package/src/server/storage/runtime-database.d.ts +1 -1
- package/src/server/storage/saas-project-store.d.ts +1 -1
- package/src/triggers/maintenance.d.ts +2 -0
- package/src/triggers/maintenance.js +2 -1
- package/src/triggers/sources/slack-signature.d.ts +10 -0
- package/src/triggers/sources/slack-signature.js +13 -0
- package/src/triggers/sources/slack.js +9 -11
- package/src/triggers/trigger-runner.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { defineApiKeyProviderExecutors, defineProviderProxy, providerUserAgent, ProviderRequestError, requiredInputString, } from "../provider-runtime.js";
|
|
2
|
+
import { defineApiKeyProviderExecutors, defineProviderProxy, providerUserAgent, ProviderRequestError, requiredInputString, providerInputError, } from "../provider-runtime.js";
|
|
3
3
|
const service = "teamcamp";
|
|
4
4
|
const teamcampApiBaseUrl = "https://api.teamcamp.app/v1.0";
|
|
5
5
|
export const teamcampActionHandlers = {
|
|
@@ -187,7 +187,7 @@ function createTeamcampError(response, payload, _phase, notFoundAsInvalidInput =
|
|
|
187
187
|
response.status === 401 ||
|
|
188
188
|
response.status === 403 ||
|
|
189
189
|
(response.status === 404 && notFoundAsInvalidInput)) {
|
|
190
|
-
return
|
|
190
|
+
return providerInputError(message);
|
|
191
191
|
}
|
|
192
192
|
return new ProviderRequestError(response.status || 500, message);
|
|
193
193
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { createProviderTimeout, defineProviderExecutors, defineProviderProxy, isAbortLikeError, providerUserAgent, ProviderRequestError, requireApiKeyCredential, requiredInputString, requiredResponseRecord, setSearchParams, } from "../provider-runtime.js";
|
|
2
|
+
import { createProviderTimeout, defineProviderExecutors, defineProviderProxy, isAbortLikeError, providerUserAgent, ProviderRequestError, requireApiKeyCredential, requiredInputString, requiredResponseRecord, setSearchParams, providerInputError, } from "../provider-runtime.js";
|
|
3
3
|
const service = "teamtailor";
|
|
4
4
|
const teamtailorEuApiBaseUrl = "https://api.teamtailor.com";
|
|
5
5
|
const teamtailorNaApiBaseUrl = "https://api.na.teamtailor.com";
|
|
@@ -219,7 +219,7 @@ function mapTeamtailorError(response, payload, phase, notFoundAsInvalidInput) {
|
|
|
219
219
|
return new ProviderRequestError(phase === "validate" ? 400 : response.status, message);
|
|
220
220
|
}
|
|
221
221
|
if (response.status === 404 && notFoundAsInvalidInput) {
|
|
222
|
-
return
|
|
222
|
+
return providerInputError(message);
|
|
223
223
|
}
|
|
224
224
|
if (response.status === 429) {
|
|
225
225
|
return new ProviderRequestError(429, message);
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { optionalBoolean, optionalNumber, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
2
|
import { assertPublicHttpUrl } from "../../core/request.js";
|
|
3
|
-
import { defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, ProviderRequestError, requireApiKeyCredential, } from "../provider-runtime.js";
|
|
3
|
+
import { defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, ProviderRequestError, requireApiKeyCredential, providerInputError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
4
4
|
import { telegramUpdate } from "./trigger-on-update.js";
|
|
5
5
|
const service = "telegram";
|
|
6
6
|
const telegramApiBaseUrl = "https://api.telegram.org";
|
|
7
|
-
const telegramDefaultRequestTimeoutMs = 30_000;
|
|
8
7
|
export const telegramActionHandlers = {
|
|
9
8
|
async get_me(_input, context) {
|
|
10
9
|
return normalizeTelegramUser(await telegramRequest({
|
|
@@ -702,7 +701,7 @@ async function telegramRequest(input) {
|
|
|
702
701
|
const timeoutHandle = setTimeout(() => {
|
|
703
702
|
timedOut = true;
|
|
704
703
|
controller.abort();
|
|
705
|
-
},
|
|
704
|
+
}, defaultProviderRequestTimeoutMs);
|
|
706
705
|
const abortFromContext = () => controller.abort();
|
|
707
706
|
input.context.signal?.addEventListener("abort", abortFromContext, { once: true });
|
|
708
707
|
let response;
|
|
@@ -716,7 +715,7 @@ async function telegramRequest(input) {
|
|
|
716
715
|
}
|
|
717
716
|
catch (error) {
|
|
718
717
|
if (timedOut && isAbortLikeError(error)) {
|
|
719
|
-
throw new ProviderRequestError(502, `telegram ${input.method} request timed out after ${Math.ceil(
|
|
718
|
+
throw new ProviderRequestError(502, `telegram ${input.method} request timed out after ${Math.ceil(defaultProviderRequestTimeoutMs / 1000)} seconds`);
|
|
720
719
|
}
|
|
721
720
|
const message = error instanceof Error && error.message.trim() !== "" ? error.message : "request failed";
|
|
722
721
|
throw new ProviderRequestError(502, `telegram ${input.method} request failed: ${message}`);
|
|
@@ -766,10 +765,10 @@ function buildTelegramError(input) {
|
|
|
766
765
|
return new ProviderRequestError(429, message);
|
|
767
766
|
}
|
|
768
767
|
if (input.phase === "validate" && status === 401) {
|
|
769
|
-
return
|
|
768
|
+
return providerInputError(description);
|
|
770
769
|
}
|
|
771
770
|
if (status === 400 || status === 404 || status === 409) {
|
|
772
|
-
return
|
|
771
|
+
return providerInputError(description);
|
|
773
772
|
}
|
|
774
773
|
return new ProviderRequestError(status || 500, description);
|
|
775
774
|
}
|
|
@@ -1134,7 +1133,7 @@ function validateTelegramUrl(value, fieldName) {
|
|
|
1134
1133
|
}
|
|
1135
1134
|
return assertPublicHttpUrl(text, {
|
|
1136
1135
|
fieldName,
|
|
1137
|
-
createError:
|
|
1136
|
+
createError: providerInputError,
|
|
1138
1137
|
}).toString();
|
|
1139
1138
|
}
|
|
1140
1139
|
function validateEditMessageTarget(input) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalNumber, optionalRecord, optionalString, optionalStringOrNull, } from "../../core/cast.js";
|
|
2
|
-
import { defineApiKeyProviderExecutors, defineProviderProxy, ProviderRequestError, requiredInputString, } from "../provider-runtime.js";
|
|
2
|
+
import { defineApiKeyProviderExecutors, defineProviderProxy, ProviderRequestError, requiredInputString, providerInputError, } from "../provider-runtime.js";
|
|
3
3
|
const service = "teltel";
|
|
4
4
|
const teltelApiBaseUrl = "https://api.teltel.io/v2";
|
|
5
5
|
export const teltelActionHandlers = {
|
|
@@ -149,7 +149,7 @@ function createTeltelError(response, payload, phase) {
|
|
|
149
149
|
return new ProviderRequestError(429, message);
|
|
150
150
|
}
|
|
151
151
|
if (phase === "validate" && (response.status === 401 || response.status === 403)) {
|
|
152
|
-
return
|
|
152
|
+
return providerInputError(message);
|
|
153
153
|
}
|
|
154
154
|
return new ProviderRequestError(response.status || 500, message);
|
|
155
155
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalBoolean, optionalInteger, optionalNumber, optionalRecord, optionalString, requiredString, } from "../../core/cast.js";
|
|
2
|
-
import { defineApiKeyProviderExecutors, defineProviderProxy, providerUserAgent, ProviderRequestError, requiredInputString, requiredResponseRecord, } from "../provider-runtime.js";
|
|
2
|
+
import { defineApiKeyProviderExecutors, defineProviderProxy, providerUserAgent, ProviderRequestError, requiredInputString, requiredResponseRecord, providerInputError, } from "../provider-runtime.js";
|
|
3
3
|
const service = "templated";
|
|
4
4
|
const templatedApiBaseUrl = "https://api.templated.io/v1";
|
|
5
5
|
export const templatedActionHandlers = {
|
|
@@ -212,10 +212,10 @@ function createTemplatedError(response, payload, phase, notFoundAsInvalidInput =
|
|
|
212
212
|
return new ProviderRequestError(429, message);
|
|
213
213
|
}
|
|
214
214
|
if (phase === "validate" && response.status === 401) {
|
|
215
|
-
return
|
|
215
|
+
return providerInputError(message);
|
|
216
216
|
}
|
|
217
217
|
if (notFoundAsInvalidInput && response.status === 404) {
|
|
218
|
-
return
|
|
218
|
+
return providerInputError(message);
|
|
219
219
|
}
|
|
220
220
|
return new ProviderRequestError(response.status || 500, message);
|
|
221
221
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalBooleanOrNull, optionalInteger, optionalRecord, optionalString, } from "../../core/cast.js";
|
|
2
|
-
import { ProviderRequestError } from "../provider-runtime.js";
|
|
2
|
+
import { ProviderRequestError, providerInputError, providerResponseError } from "../provider-runtime.js";
|
|
3
3
|
const tencentDocsUserInfoUrl = "https://docs.qq.com/oauth/v2/userinfo";
|
|
4
4
|
export const tencentDocsApiBaseUrl = "https://docs.qq.com";
|
|
5
5
|
export const tencentDocsActionHandlers = {
|
|
@@ -405,7 +405,7 @@ function mapTencentDocsBusinessError(ret, message, status) {
|
|
|
405
405
|
}
|
|
406
406
|
function mapTencentDocsHttpError(status, message) {
|
|
407
407
|
if (status === 400) {
|
|
408
|
-
return
|
|
408
|
+
return providerInputError(message);
|
|
409
409
|
}
|
|
410
410
|
if (status === 401 || status === 403) {
|
|
411
411
|
return new ProviderRequestError(status, message);
|
|
@@ -536,7 +536,7 @@ function normalizeNullableInteger(value) {
|
|
|
536
536
|
function requireString(value, message) {
|
|
537
537
|
const stringValue = optionalString(value);
|
|
538
538
|
if (!stringValue) {
|
|
539
|
-
throw
|
|
539
|
+
throw providerResponseError(message);
|
|
540
540
|
}
|
|
541
541
|
return stringValue;
|
|
542
542
|
}
|
|
@@ -549,7 +549,7 @@ function requireActionInputString(value, fieldName) {
|
|
|
549
549
|
}
|
|
550
550
|
function requireRecord(value, message) {
|
|
551
551
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
552
|
-
throw
|
|
552
|
+
throw providerResponseError(message);
|
|
553
553
|
}
|
|
554
554
|
return value;
|
|
555
555
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalBoolean } from "../../core/cast.js";
|
|
2
|
-
import { providerUserAgent, ProviderRequestError } from "../provider-runtime.js";
|
|
2
|
+
import { providerUserAgent, ProviderRequestError, providerInputError } from "../provider-runtime.js";
|
|
3
3
|
const tencentMapsApiBaseUrl = "https://apis.map.qq.com";
|
|
4
4
|
const tencentMapsValidationPath = "/ws/district/v1/list";
|
|
5
5
|
const tencentMapsAuthStatuses = new Set([110, 111, 112, 113, 190, 199]);
|
|
@@ -402,11 +402,11 @@ function normalizeTencentMapsError(response, payload, phase) {
|
|
|
402
402
|
return new ProviderRequestError(429, message);
|
|
403
403
|
}
|
|
404
404
|
if (tencentMapsInputStatuses.has(status)) {
|
|
405
|
-
return
|
|
405
|
+
return providerInputError(message);
|
|
406
406
|
}
|
|
407
407
|
if (tencentMapsAuthStatuses.has(status)) {
|
|
408
408
|
if (phase === "validate") {
|
|
409
|
-
return
|
|
409
|
+
return providerInputError(message);
|
|
410
410
|
}
|
|
411
411
|
return new ProviderRequestError(401, message);
|
|
412
412
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalInteger, optionalRecord, optionalString, requiredRecord } from "../../core/cast.js";
|
|
2
|
-
import { providerUserAgent, ProviderRequestError } from "../provider-runtime.js";
|
|
2
|
+
import { providerUserAgent, ProviderRequestError, providerInputError } from "../provider-runtime.js";
|
|
3
3
|
export const textcortexApiBaseUrl = "https://api.textcortex.com/v1";
|
|
4
4
|
const textcortexApiOrigin = "https://api.textcortex.com";
|
|
5
5
|
export async function validateTextcortexCredential(context) {
|
|
@@ -159,10 +159,10 @@ function createTextcortexError(response, payload, phase) {
|
|
|
159
159
|
return new ProviderRequestError(429, message);
|
|
160
160
|
}
|
|
161
161
|
if (phase === "validate" && (response.status === 401 || response.status === 403)) {
|
|
162
|
-
return
|
|
162
|
+
return providerInputError(message);
|
|
163
163
|
}
|
|
164
164
|
if (response.status === 400 || response.status === 422) {
|
|
165
|
-
return
|
|
165
|
+
return providerInputError(message);
|
|
166
166
|
}
|
|
167
167
|
return new ProviderRequestError(response.status || 502, message);
|
|
168
168
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalBoolean, optionalInteger, optionalNumber, optionalRecord, optionalString, } from "../../core/cast.js";
|
|
2
|
-
import { createProviderTimeout, isAbortLikeError, providerUserAgent, ProviderRequestError, } from "../provider-runtime.js";
|
|
2
|
+
import { createProviderTimeout, isAbortLikeError, providerUserAgent, ProviderRequestError, providerInputError, providerResponseError, } from "../provider-runtime.js";
|
|
3
3
|
export const theCatApiBaseUrl = "https://api.thecatapi.com/v1/";
|
|
4
4
|
const theCatApiValidationPath = "/breeds";
|
|
5
5
|
export const theCatApiActionHandlers = {
|
|
@@ -176,7 +176,7 @@ async function readTheCatApiPayload(response) {
|
|
|
176
176
|
function createTheCatApiError(response, payload, phase) {
|
|
177
177
|
const message = extractTheCatApiErrorMessage(payload) ?? response.statusText ?? "The Cat API request failed";
|
|
178
178
|
if (phase === "validate" && (response.status === 401 || response.status === 403)) {
|
|
179
|
-
return
|
|
179
|
+
return providerInputError(message);
|
|
180
180
|
}
|
|
181
181
|
return new ProviderRequestError(response.status || 502, message);
|
|
182
182
|
}
|
|
@@ -189,7 +189,7 @@ function extractTheCatApiErrorMessage(payload) {
|
|
|
189
189
|
}
|
|
190
190
|
function parseArrayPayload(payload, message) {
|
|
191
191
|
if (!Array.isArray(payload)) {
|
|
192
|
-
throw
|
|
192
|
+
throw providerResponseError(message);
|
|
193
193
|
}
|
|
194
194
|
return payload;
|
|
195
195
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalNumber, optionalRecord, optionalString, requiredString } from "../../core/cast.js";
|
|
2
|
-
import { createProviderTimeout, providerUserAgent, ProviderRequestError } from "../provider-runtime.js";
|
|
2
|
+
import { createProviderTimeout, providerUserAgent, ProviderRequestError, providerInputError, } from "../provider-runtime.js";
|
|
3
3
|
export const theColonyApiBaseUrl = "https://thecolony.cc/api/v1";
|
|
4
4
|
const theColonyTokenPath = "/auth/token";
|
|
5
5
|
const theColonyValidationPath = "/users/me";
|
|
@@ -291,7 +291,7 @@ function mapTheColonyError(status, payload, phase) {
|
|
|
291
291
|
return new ProviderRequestError(429, message);
|
|
292
292
|
}
|
|
293
293
|
if (phase === "validate" && (status === 401 || status === 403)) {
|
|
294
|
-
return
|
|
294
|
+
return providerInputError(message);
|
|
295
295
|
}
|
|
296
296
|
if (phase === "execute" && (status === 401 || status === 403)) {
|
|
297
297
|
return new ProviderRequestError(401, message);
|
|
@@ -367,5 +367,5 @@ function readObjectPayload(payload, label) {
|
|
|
367
367
|
return record;
|
|
368
368
|
}
|
|
369
369
|
function readRequiredString(input, fieldName) {
|
|
370
|
-
return requiredString(input[fieldName], fieldName,
|
|
370
|
+
return requiredString(input[fieldName], fieldName, providerInputError);
|
|
371
371
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { booleanString, compactObject, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { createProviderTimeout, isAbortLikeError, ProviderRequestError } from "../provider-runtime.js";
|
|
2
|
+
import { createProviderTimeout, isAbortLikeError, ProviderRequestError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
export const theOddsApiBaseUrl = "https://api.the-odds-api.com/v4/";
|
|
4
|
-
const defaultRequestTimeoutMs = 30_000;
|
|
5
4
|
export const theOddsApiActionHandlers = {
|
|
6
5
|
async list_sports(input, context) {
|
|
7
6
|
const response = await theOddsApiRequestJson("sports", context, compactObject({ all: booleanString(input.all) }));
|
|
@@ -101,7 +100,7 @@ export function theOddsApiRequestUrl(path, apiKey, params) {
|
|
|
101
100
|
return url;
|
|
102
101
|
}
|
|
103
102
|
async function theOddsApiRequestJson(path, context, params, phase = "execute") {
|
|
104
|
-
const timeout = createProviderTimeout(context.signal
|
|
103
|
+
const timeout = createProviderTimeout(context.signal);
|
|
105
104
|
let response;
|
|
106
105
|
let payload;
|
|
107
106
|
try {
|
|
@@ -113,7 +112,7 @@ async function theOddsApiRequestJson(path, context, params, phase = "execute") {
|
|
|
113
112
|
}
|
|
114
113
|
catch (error) {
|
|
115
114
|
if (timeout.didTimeout() && isAbortLikeError(error)) {
|
|
116
|
-
throw new ProviderRequestError(502, `The Odds API ${path} request timed out after ${Math.ceil(
|
|
115
|
+
throw new ProviderRequestError(502, `The Odds API ${path} request timed out after ${Math.ceil(defaultProviderRequestTimeoutMs / 1000)} seconds`);
|
|
117
116
|
}
|
|
118
117
|
throw new ProviderRequestError(502, error instanceof Error ? `The Odds API request failed: ${error.message}` : "The Odds API request failed");
|
|
119
118
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { requiredString } from "../../core/cast.js";
|
|
2
|
-
import { ProviderRequestError, providerUserAgent } from "../provider-runtime.js";
|
|
2
|
+
import { ProviderRequestError, providerUserAgent, providerInputError, providerResponseError, } from "../provider-runtime.js";
|
|
3
3
|
const apiBaseUrl = "https://rest.theofficialboard.com/rest/";
|
|
4
4
|
const actionRequestByName = {
|
|
5
5
|
search_companies: {
|
|
@@ -79,15 +79,15 @@ async function readPayload(response) {
|
|
|
79
79
|
}
|
|
80
80
|
function mapError(status, message, phase) {
|
|
81
81
|
if (status === 401 || status === 403) {
|
|
82
|
-
return phase === "validation" ?
|
|
82
|
+
return phase === "validation" ? providerInputError(message) : new ProviderRequestError(401, message);
|
|
83
83
|
}
|
|
84
84
|
if (status === 429) {
|
|
85
85
|
return new ProviderRequestError(429, message);
|
|
86
86
|
}
|
|
87
87
|
if (status >= 400 && status < 500) {
|
|
88
|
-
return
|
|
88
|
+
return providerInputError(message);
|
|
89
89
|
}
|
|
90
|
-
return
|
|
90
|
+
return providerResponseError(message);
|
|
91
91
|
}
|
|
92
92
|
function readErrorMessage(payload) {
|
|
93
93
|
if (typeof payload === "string" && payload.trim()) {
|
|
@@ -154,7 +154,7 @@ function mapError(status, payload, phase, displayName, notFound) {
|
|
|
154
154
|
if (status == 401 || status == 403)
|
|
155
155
|
return new ProviderRequestError(phase == "validate" ? 400 : status, message);
|
|
156
156
|
if (status == 404 && notFound)
|
|
157
|
-
return
|
|
157
|
+
return providerInputError(message);
|
|
158
158
|
if (status == 429)
|
|
159
159
|
return new ProviderRequestError(429, message);
|
|
160
160
|
return new ProviderRequestError(status >= 500 ? 502 : status, message, payload);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
|
-
import { createProviderTimeout, isAbortLikeError, ProviderRequestError } from "../provider-runtime.js";
|
|
2
|
+
import { createProviderTimeout, isAbortLikeError, ProviderRequestError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
import { cancelResponseBody, readBoundedResponseText } from "./bounded-response.js";
|
|
4
4
|
import { parseTikHubOpenApiCatalog } from "./endpoint-document.js";
|
|
5
5
|
import { isEligibleTikHubEndpointCategory } from "./endpoint-policy.js";
|
|
@@ -8,7 +8,6 @@ const openApiTimeoutMs = 15_000;
|
|
|
8
8
|
const openApiMaxBytes = 8 * 1024 * 1024;
|
|
9
9
|
const catalogTtlMs = 60_000;
|
|
10
10
|
const catalogStaleTtlMs = 60 * 60_000;
|
|
11
|
-
const catalogFailureTtlMs = 30_000;
|
|
12
11
|
const discoveryPageMaxBytes = 4 * 1024 * 1024;
|
|
13
12
|
const cursorMaxLength = 1_024;
|
|
14
13
|
class TransientOpenApiError extends ProviderRequestError {
|
|
@@ -93,7 +92,7 @@ async function refreshCatalog(fetcher, cache) {
|
|
|
93
92
|
}
|
|
94
93
|
catch (error) {
|
|
95
94
|
if (error instanceof TransientOpenApiError && cache.snapshot && Date.now() < cache.snapshot.staleUntil) {
|
|
96
|
-
cache.retryAfter = Date.now() +
|
|
95
|
+
cache.retryAfter = Date.now() + defaultProviderRequestTimeoutMs;
|
|
97
96
|
return { snapshot: cache.snapshot, stale: true };
|
|
98
97
|
}
|
|
99
98
|
throw error;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, looseArray, optionalRecord, recordOrEmpty } from "../../core/cast.js";
|
|
2
|
-
import { ProviderRequestError } from "../provider-runtime.js";
|
|
2
|
+
import { ProviderRequestError, providerInputError } from "../provider-runtime.js";
|
|
3
3
|
const tiktokBusinessApiBaseUrl = "https://business-api.tiktok.com";
|
|
4
4
|
const tiktokBusinessUserInfoUrl = `${tiktokBusinessApiBaseUrl}/open_api/v1.3/user/info/`;
|
|
5
5
|
const tiktokBusinessAdvertiserUrl = `${tiktokBusinessApiBaseUrl}/open_api/v1.3/oauth2/advertiser/get/`;
|
|
@@ -341,7 +341,7 @@ function createTikTokBusinessError(status, envelope) {
|
|
|
341
341
|
return new ProviderRequestError(status || 403, `${stripTrailingSentencePunctuation(message)}. ${tiktokBusinessPermissionScopeHint}`);
|
|
342
342
|
}
|
|
343
343
|
if (status === 400 || status === 422 || code === 40001 || code === 40003) {
|
|
344
|
-
return
|
|
344
|
+
return providerInputError(message);
|
|
345
345
|
}
|
|
346
346
|
if (status === 429) {
|
|
347
347
|
return new ProviderRequestError(status || 429, message);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { booleanString, compactObject, optionalRecord, optionalRawString, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { providerUserAgent, ProviderRequestError, runProviderRequest } from "../provider-runtime.js";
|
|
2
|
+
import { providerUserAgent, ProviderRequestError, runProviderRequest, providerInputError, } from "../provider-runtime.js";
|
|
3
3
|
export const timecampApiBaseUrl = "https://app.timecamp.com/third_party/api";
|
|
4
4
|
export const timecampActionHandlers = {
|
|
5
5
|
async get_current_user(_input, context) {
|
|
@@ -240,7 +240,7 @@ function createTimecampError(status, payload, phase) {
|
|
|
240
240
|
return new ProviderRequestError(429, message);
|
|
241
241
|
}
|
|
242
242
|
if (phase === "validate" && (status === 401 || status === 403)) {
|
|
243
|
-
return
|
|
243
|
+
return providerInputError(message);
|
|
244
244
|
}
|
|
245
245
|
if (phase === "execute" && status === 401) {
|
|
246
246
|
return new ProviderRequestError(401, message);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalBoolean, optionalNumber as asOptionalNumber, optionalRecord as asOptionalObject, optionalString as asOptionalString, requiredString, } from "../../core/cast.js";
|
|
2
|
-
import { ProviderRequestError, providerUserAgent, runProviderRequest } from "../provider-runtime.js";
|
|
2
|
+
import { ProviderRequestError, providerUserAgent, runProviderRequest, providerInputError, } from "../provider-runtime.js";
|
|
3
3
|
export const timelinkApiBaseUrl = "https://api.timelink.io/api/v1";
|
|
4
4
|
export const timelinkActionHandlers = {
|
|
5
5
|
async list_clients(input, context) {
|
|
@@ -307,7 +307,7 @@ function createTimelinkError(status, payload, phase) {
|
|
|
307
307
|
return new ProviderRequestError(429, message);
|
|
308
308
|
}
|
|
309
309
|
if (phase === "validate" && (status === 401 || status === 403)) {
|
|
310
|
-
return
|
|
310
|
+
return providerInputError(message);
|
|
311
311
|
}
|
|
312
312
|
if (phase === "execute" && (status === 401 || status === 403)) {
|
|
313
313
|
return new ProviderRequestError(401, message);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { requiredString } from "../../core/cast.js";
|
|
2
|
-
import { ProviderRequestError } from "../provider-runtime.js";
|
|
2
|
+
import { ProviderRequestError, providerInputError } from "../provider-runtime.js";
|
|
3
3
|
const base32Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
|
|
4
4
|
export const totpDigits = 6;
|
|
5
5
|
export const totpPeriodSeconds = 30;
|
|
@@ -7,10 +7,9 @@ export const totpPeriodSeconds = 30;
|
|
|
7
7
|
* Validate and normalize the three fields stored for a TOTP connection.
|
|
8
8
|
*/
|
|
9
9
|
export function readTotpCredential(values) {
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const secret = requiredString(values.secret, "secret", createError);
|
|
10
|
+
const website = requiredString(values.website, "website", providerInputError);
|
|
11
|
+
const username = requiredString(values.username, "username", providerInputError);
|
|
12
|
+
const secret = requiredString(values.secret, "secret", providerInputError);
|
|
14
13
|
const websiteUrl = parseWebsiteUrl(website);
|
|
15
14
|
decodeBase32Secret(secret);
|
|
16
15
|
return { website, username, secret, websiteUrl };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { compactObject, optionalInteger, optionalRecord, optionalString, requiredString } from "../../core/cast.js";
|
|
2
2
|
import { queryParams } from "../../core/request.js";
|
|
3
|
-
import { createProviderTimeout, ProviderRequestError, providerUserAgent, readProviderJsonBody, } from "../provider-runtime.js";
|
|
3
|
+
import { createProviderTimeout, ProviderRequestError, providerUserAgent, readProviderJsonBody, providerInputError, } from "../provider-runtime.js";
|
|
4
4
|
export const trawlingwebApiBaseUrl = "https://api.trawlingweb.com";
|
|
5
5
|
export const trawlingwebActionHandlers = {
|
|
6
6
|
search_news(input, context) {
|
|
@@ -106,6 +106,6 @@ function trawlingwebError(status, payload, phase) {
|
|
|
106
106
|
if (status === 401 || status === 403)
|
|
107
107
|
return new ProviderRequestError(phase === "validate" ? 400 : status, message);
|
|
108
108
|
if (status === 400 || status === 404 || status === 422)
|
|
109
|
-
return
|
|
109
|
+
return providerInputError(message);
|
|
110
110
|
return new ProviderRequestError(status >= 500 ? 502 : status, message);
|
|
111
111
|
}
|
|
@@ -420,13 +420,13 @@ function readErrorMessage(payload) {
|
|
|
420
420
|
}
|
|
421
421
|
function mapTriliumHttpError(status, message, phase) {
|
|
422
422
|
if (phase === "validate" && (status === 401 || status === 403)) {
|
|
423
|
-
return
|
|
423
|
+
return providerInputError(message);
|
|
424
424
|
}
|
|
425
425
|
if (phase === "execute" && status === 401) {
|
|
426
426
|
return new ProviderRequestError(401, message);
|
|
427
427
|
}
|
|
428
428
|
if (status === 400 || status === 403 || status === 404 || status === 409 || status === 422) {
|
|
429
|
-
return
|
|
429
|
+
return providerInputError(message);
|
|
430
430
|
}
|
|
431
431
|
if (status === 429) {
|
|
432
432
|
return new ProviderRequestError(429, message);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, objectArray, optionalBoolean, optionalNumber, optionalRecord, optionalString, } from "../../core/cast.js";
|
|
2
|
-
import { providerUserAgent, ProviderRequestError } from "../provider-runtime.js";
|
|
2
|
+
import { providerUserAgent, ProviderRequestError, providerInputError } from "../provider-runtime.js";
|
|
3
3
|
const tripleWhaleApiBaseUrl = "https://api.triplewhale.com/api/v2/";
|
|
4
4
|
const tripleWhaleValidateApiKeyPath = "/users/api-keys/me";
|
|
5
5
|
export const tripleWhaleActionHandlers = {
|
|
@@ -125,13 +125,13 @@ function createTripleWhaleError(response, payload, phase) {
|
|
|
125
125
|
return new ProviderRequestError(429, message);
|
|
126
126
|
}
|
|
127
127
|
if (phase === "validate" && [400, 401, 403].includes(response.status)) {
|
|
128
|
-
return
|
|
128
|
+
return providerInputError(message);
|
|
129
129
|
}
|
|
130
130
|
if (phase === "execute" && [401, 403].includes(response.status)) {
|
|
131
131
|
return new ProviderRequestError(401, message);
|
|
132
132
|
}
|
|
133
133
|
if (phase === "execute" && [400, 404, 422].includes(response.status)) {
|
|
134
|
-
return
|
|
134
|
+
return providerInputError(message);
|
|
135
135
|
}
|
|
136
136
|
return new ProviderRequestError(response.status || 500, message);
|
|
137
137
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalBoolean, optionalRecord, optionalString, requiredRecord } from "../../core/cast.js";
|
|
2
|
-
import { ProviderRequestError, providerUserAgent } from "../provider-runtime.js";
|
|
2
|
+
import { ProviderRequestError, providerUserAgent, providerInputError } from "../provider-runtime.js";
|
|
3
3
|
const truveraTestnetApiBaseUrl = "https://api-testnet.truvera.io";
|
|
4
4
|
const truveraProductionApiBaseUrl = "https://api.truvera.io";
|
|
5
5
|
const truveraProfilePath = "/data/profile";
|
|
@@ -248,7 +248,7 @@ function createTruveraError(response, payload, phase) {
|
|
|
248
248
|
return new ProviderRequestError(429, message);
|
|
249
249
|
}
|
|
250
250
|
if (phase === "validate" && (response.status === 401 || response.status === 403)) {
|
|
251
|
-
return
|
|
251
|
+
return providerInputError(message);
|
|
252
252
|
}
|
|
253
253
|
if (phase === "execute" && (response.status === 401 || response.status === 403)) {
|
|
254
254
|
return new ProviderRequestError(401, message);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalInteger, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { createProviderTimeout, isAbortLikeError, providerUserAgent, ProviderRequestError, readProviderTextBody, } from "../provider-runtime.js";
|
|
2
|
+
import { createProviderTimeout, isAbortLikeError, providerUserAgent, ProviderRequestError, readProviderTextBody, providerInputError, } from "../provider-runtime.js";
|
|
3
3
|
export const tuskrApiBaseUrl = "https://api.tuskr.live/api";
|
|
4
4
|
const maxResponseBytes = 10 * 1024 * 1024;
|
|
5
5
|
export const tuskrActionHandlers = {
|
|
@@ -192,7 +192,7 @@ function createTuskrError(status, payload, phase) {
|
|
|
192
192
|
optionalString(record?.errorMessage) ??
|
|
193
193
|
`Tuskr request failed with status ${status}`;
|
|
194
194
|
if ((status === 401 || status === 403) && phase === "validate") {
|
|
195
|
-
return
|
|
195
|
+
return providerInputError(message);
|
|
196
196
|
}
|
|
197
197
|
if (status >= 400 && status < 500)
|
|
198
198
|
return new ProviderRequestError(status, message);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { optionalBoolean, optionalInteger, optionalNumber, optionalRecord, optionalString, requiredString, } from "../../core/cast.js";
|
|
2
2
|
import { queryParams } from "../../core/request.js";
|
|
3
|
-
import { createProviderTimeout, ProviderRequestError, providerUserAgent, readProviderJsonBody, } from "../provider-runtime.js";
|
|
3
|
+
import { createProviderTimeout, ProviderRequestError, providerUserAgent, readProviderJsonBody, providerInputError, } from "../provider-runtime.js";
|
|
4
4
|
export const typebotApiBaseUrl = "https://app.typebot.com/api";
|
|
5
5
|
const validationPath = "/v1/workspaces";
|
|
6
6
|
const get = (path, query) => (input, context) => requestTypebot(path(input), query?.(input), context, "execute");
|
|
@@ -80,6 +80,6 @@ function typebotError(response, payload, phase) {
|
|
|
80
80
|
return new ProviderRequestError(phase === "validate" ? 400 : response.status, message);
|
|
81
81
|
}
|
|
82
82
|
if ([400, 404, 422].includes(response.status))
|
|
83
|
-
return
|
|
83
|
+
return providerInputError(message);
|
|
84
84
|
return new ProviderRequestError(response.status >= 500 ? 502 : response.status, message);
|
|
85
85
|
}
|
|
@@ -200,7 +200,7 @@ function mapTypeformError(input) {
|
|
|
200
200
|
}
|
|
201
201
|
if (input.phase === "validate") {
|
|
202
202
|
if (input.status === 401 || input.status === 403) {
|
|
203
|
-
return
|
|
203
|
+
return providerInputError(message);
|
|
204
204
|
}
|
|
205
205
|
return new ProviderRequestError(input.status, message);
|
|
206
206
|
}
|
|
@@ -208,7 +208,7 @@ function mapTypeformError(input) {
|
|
|
208
208
|
return new ProviderRequestError(401, message);
|
|
209
209
|
}
|
|
210
210
|
if (input.status === 400 || (input.status === 404 && input.notFoundAsInvalidInput)) {
|
|
211
|
-
return
|
|
211
|
+
return providerInputError(message);
|
|
212
212
|
}
|
|
213
213
|
return new ProviderRequestError(input.status, message);
|
|
214
214
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { compactObject, optionalInteger, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { createProviderFetch, createProviderProxyUrl, createProviderTimeout, defineApiKeyProviderExecutors, isAbortLikeError, normalizeProviderProxyHeaders, normalizeProviderProxyQuery, ProviderRequestError, providerUserAgent, readProviderProxyErrorMessage, readProviderProxyResponse, requireApiKeyCredential, requiredResponseRecord, toProviderProxyError, } from "../provider-runtime.js";
|
|
2
|
+
import { createProviderFetch, createProviderProxyUrl, createProviderTimeout, defineApiKeyProviderExecutors, isAbortLikeError, normalizeProviderProxyHeaders, normalizeProviderProxyQuery, ProviderRequestError, providerUserAgent, readProviderProxyErrorMessage, readProviderProxyResponse, requireApiKeyCredential, requiredResponseRecord, toProviderProxyError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
const service = "uptimerobot";
|
|
4
4
|
const uptimerobotApiBaseUrl = "https://api.uptimerobot.com/v2";
|
|
5
|
-
const uptimerobotDefaultRequestTimeoutMs = 30_000;
|
|
6
5
|
// Fixed-host proxy egress (uptimerobotApiBaseUrl); DNS-rebinding check is redundant here.
|
|
7
6
|
const uptimerobotProxyFetch = createProviderFetch({ skipDnsValidation: true });
|
|
8
7
|
export const uptimerobotActionHandlers = {
|
|
@@ -147,7 +146,7 @@ async function requestUptimerobotJson(input) {
|
|
|
147
146
|
return body;
|
|
148
147
|
}
|
|
149
148
|
async function uptimerobotFetch(input) {
|
|
150
|
-
const timeout = createProviderTimeout(input.context.signal
|
|
149
|
+
const timeout = createProviderTimeout(input.context.signal);
|
|
151
150
|
const body = new URLSearchParams(input.body);
|
|
152
151
|
body.set("api_key", input.context.apiKey);
|
|
153
152
|
body.set("format", "json");
|
|
@@ -165,7 +164,7 @@ async function uptimerobotFetch(input) {
|
|
|
165
164
|
}
|
|
166
165
|
catch (error) {
|
|
167
166
|
if (timeout.didTimeout() && isAbortLikeError(error)) {
|
|
168
|
-
throw new ProviderRequestError(504, `uptimerobot ${input.endpoint} request timed out after ${Math.ceil(
|
|
167
|
+
throw new ProviderRequestError(504, `uptimerobot ${input.endpoint} request timed out after ${Math.ceil(defaultProviderRequestTimeoutMs / 1000)} seconds`);
|
|
169
168
|
}
|
|
170
169
|
throw new ProviderRequestError(isAbortLikeError(error) ? 504 : 502, error instanceof Error ? `uptimerobot request failed: ${error.message}` : "uptimerobot request failed");
|
|
171
170
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { createProviderTimeout, isAbortLikeError, ProviderRequestError, providerUserAgent, requiredResponseRecord, } from "../provider-runtime.js";
|
|
2
|
+
import { createProviderTimeout, isAbortLikeError, ProviderRequestError, providerUserAgent, requiredResponseRecord, providerInputError, providerResponseError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
export const v2exApiBaseUrl = "https://www.v2ex.com/api/v2";
|
|
4
4
|
export const v2exLegacyApiBaseUrl = "https://www.v2ex.com/api";
|
|
5
|
-
const v2exRequestTimeoutMs = 30_000;
|
|
6
5
|
export const v2exActionHandlers = {
|
|
7
6
|
async list_notifications(input, context) {
|
|
8
7
|
const payload = await requestV2exJson({
|
|
@@ -186,7 +185,7 @@ async function requestV2exLegacyArray(input) {
|
|
|
186
185
|
return payload;
|
|
187
186
|
}
|
|
188
187
|
async function requestV2exLegacyJson(input) {
|
|
189
|
-
const timeout = createProviderTimeout(input.signal
|
|
188
|
+
const timeout = createProviderTimeout(input.signal);
|
|
190
189
|
const url = new URL(`${v2exLegacyApiBaseUrl}${input.path}`);
|
|
191
190
|
let response;
|
|
192
191
|
let payload;
|
|
@@ -200,7 +199,7 @@ async function requestV2exLegacyJson(input) {
|
|
|
200
199
|
}
|
|
201
200
|
catch (error) {
|
|
202
201
|
if (timeout.didTimeout() || isAbortLikeError(error)) {
|
|
203
|
-
throw new ProviderRequestError(504, `V2EX legacy ${input.path} request timed out after ${Math.ceil(
|
|
202
|
+
throw new ProviderRequestError(504, `V2EX legacy ${input.path} request timed out after ${Math.ceil(defaultProviderRequestTimeoutMs / 1000)} seconds`);
|
|
204
203
|
}
|
|
205
204
|
if (error instanceof ProviderRequestError)
|
|
206
205
|
throw error;
|
|
@@ -215,7 +214,7 @@ async function requestV2exLegacyJson(input) {
|
|
|
215
214
|
return payload;
|
|
216
215
|
}
|
|
217
216
|
async function requestV2exJson(input) {
|
|
218
|
-
const timeout = createProviderTimeout(input.signal
|
|
217
|
+
const timeout = createProviderTimeout(input.signal);
|
|
219
218
|
const url = buildV2exUrl(input.path, input.query);
|
|
220
219
|
let response;
|
|
221
220
|
let payload;
|
|
@@ -230,7 +229,7 @@ async function requestV2exJson(input) {
|
|
|
230
229
|
}
|
|
231
230
|
catch (error) {
|
|
232
231
|
if (timeout.didTimeout() || isAbortLikeError(error)) {
|
|
233
|
-
throw new ProviderRequestError(504, `V2EX ${input.path} request timed out after ${Math.ceil(
|
|
232
|
+
throw new ProviderRequestError(504, `V2EX ${input.path} request timed out after ${Math.ceil(defaultProviderRequestTimeoutMs / 1000)} seconds`);
|
|
234
233
|
}
|
|
235
234
|
if (error instanceof ProviderRequestError)
|
|
236
235
|
throw error;
|
|
@@ -339,7 +338,7 @@ function mapV2exError(status, message, phase, options) {
|
|
|
339
338
|
if (status === 429)
|
|
340
339
|
return new ProviderRequestError(429, resolvedMessage);
|
|
341
340
|
if (phase === "validate" && (status === 401 || status === 403))
|
|
342
|
-
return
|
|
341
|
+
return providerInputError(resolvedMessage);
|
|
343
342
|
if (authAware && phase === "execute" && status === 401)
|
|
344
343
|
return new ProviderRequestError(401, resolvedMessage);
|
|
345
344
|
if (phase === "execute" && status === 403)
|
|
@@ -349,6 +348,6 @@ function mapV2exError(status, message, phase, options) {
|
|
|
349
348
|
function mapV2exSuccessError(message, phase) {
|
|
350
349
|
const resolvedMessage = message || "V2EX request failed";
|
|
351
350
|
if (phase === "validate")
|
|
352
|
-
return
|
|
353
|
-
return
|
|
351
|
+
return providerInputError(resolvedMessage);
|
|
352
|
+
return providerResponseError(resolvedMessage);
|
|
354
353
|
}
|