@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
|
@@ -4,13 +4,12 @@ import { ProtocolError } from "@modelcontextprotocol/client";
|
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import { optionalString, requiredString } from "../../core/cast.js";
|
|
6
6
|
import { withMcpClient } from "../mcp-client.js";
|
|
7
|
-
import { createProviderProxyUrl, defineProviderExecutors, normalizeProviderProxyHeaders, providerFetch, providerInputError, ProviderRequestError, providerUserAgent, readProviderProxyResponse, toProviderProxyError, } from "../provider-runtime.js";
|
|
7
|
+
import { createProviderProxyUrl, defineProviderExecutors, normalizeProviderProxyHeaders, providerFetch, providerInputError, ProviderRequestError, providerUserAgent, readProviderProxyResponse, toProviderProxyError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
8
8
|
const service = "flomo";
|
|
9
9
|
const flomoWebhookHost = "flomoapp.com";
|
|
10
10
|
const flomoWebhookPathPrefix = "/iwh/";
|
|
11
11
|
const flomoMcpEndpoint = "https://flomoapp.com/mcp";
|
|
12
12
|
const flomoMcpTokenField = "token";
|
|
13
|
-
const flomoRequestTimeoutMs = 30_000;
|
|
14
13
|
export const flomoActionHandlers = {
|
|
15
14
|
create_memo(input, context) {
|
|
16
15
|
if (context.authType === "custom_credential") {
|
|
@@ -165,7 +164,7 @@ async function callRequiredMcpAction(toolName, input, context) {
|
|
|
165
164
|
});
|
|
166
165
|
}
|
|
167
166
|
async function createFlomoMemo(input) {
|
|
168
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
167
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
169
168
|
const signal = input.signal ? AbortSignal.any([input.signal, timeoutSignal]) : timeoutSignal;
|
|
170
169
|
try {
|
|
171
170
|
const response = await input.fetcher(input.webhookUrl, {
|
|
@@ -215,7 +214,7 @@ async function requestFlomoProxy(url, input, headers, signal) {
|
|
|
215
214
|
proxyHeaders.set("content-type", "application/json");
|
|
216
215
|
}
|
|
217
216
|
}
|
|
218
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
217
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
219
218
|
init.signal = signal ? AbortSignal.any([signal, timeoutSignal]) : timeoutSignal;
|
|
220
219
|
try {
|
|
221
220
|
const response = await providerFetch(url, init);
|
|
@@ -284,7 +283,7 @@ function buildCreateMemoMcpArguments(input) {
|
|
|
284
283
|
async function listFlomoMcpTools(input) {
|
|
285
284
|
return withFlomoMcpClient(input, async (client) => {
|
|
286
285
|
const result = await client.listTools({}, {
|
|
287
|
-
timeout:
|
|
286
|
+
timeout: defaultProviderRequestTimeoutMs,
|
|
288
287
|
});
|
|
289
288
|
return result.tools.map((tool) => ({
|
|
290
289
|
name: tool.name,
|
|
@@ -298,7 +297,7 @@ async function callFlomoMcpTool(input) {
|
|
|
298
297
|
name: input.toolName,
|
|
299
298
|
arguments: input.arguments,
|
|
300
299
|
}, {
|
|
301
|
-
timeout:
|
|
300
|
+
timeout: defaultProviderRequestTimeoutMs,
|
|
302
301
|
});
|
|
303
302
|
return normalizeMcpToolResult(input.toolName, result);
|
|
304
303
|
});
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { compactObject, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
2
|
import { assertPublicHttpUrl, isPrivateNetworkAccessAllowed } from "../../core/request.js";
|
|
3
|
-
import { createProviderFetch, defineProviderExecutors, defineProviderProxy, isAbortLikeError, providerUserAgent, ProviderRequestError, requireApiKeyCredential, requiredResponseRecord, } from "../provider-runtime.js";
|
|
3
|
+
import { createProviderFetch, defineProviderExecutors, defineProviderProxy, isAbortLikeError, providerUserAgent, ProviderRequestError, requireApiKeyCredential, requiredResponseRecord, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
4
4
|
const service = "flowiseai";
|
|
5
|
-
const flowiseaiRequestTimeoutMs = 30_000;
|
|
6
5
|
export const flowiseaiActionHandlers = {
|
|
7
6
|
async get_chatflow(_input, context) {
|
|
8
7
|
const chatflow = normalizeChatflow(await requestFlowiseJson({
|
|
@@ -97,7 +96,7 @@ export const credentialValidators = {
|
|
|
97
96
|
},
|
|
98
97
|
};
|
|
99
98
|
async function requestFlowiseJson(input) {
|
|
100
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
99
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
101
100
|
const signal = input.signal ? AbortSignal.any([input.signal, timeoutSignal]) : timeoutSignal;
|
|
102
101
|
try {
|
|
103
102
|
const response = await input.fetcher(buildFlowiseUrl(input.baseUrl, input.path), {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { compactObject, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, ProviderRequestError, providerUserAgent, requiredInputString, } from "../provider-runtime.js";
|
|
2
|
+
import { defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, ProviderRequestError, providerUserAgent, requiredInputString, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
const service = "fluxguard";
|
|
4
4
|
const fluxguardApiBaseUrl = "https://api.fluxguard.com";
|
|
5
|
-
const fluxguardDefaultRequestTimeoutMs = 30_000;
|
|
6
5
|
export const fluxguardActionHandlers = {
|
|
7
6
|
async get_account(_input, context) {
|
|
8
7
|
const payload = await requestFluxguardJson(context, {
|
|
@@ -168,7 +167,7 @@ export const credentialValidators = {
|
|
|
168
167
|
},
|
|
169
168
|
};
|
|
170
169
|
async function requestFluxguardJson(context, input) {
|
|
171
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
170
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
172
171
|
const signal = context.signal ? AbortSignal.any([context.signal, timeoutSignal]) : timeoutSignal;
|
|
173
172
|
try {
|
|
174
173
|
const headers = {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { compactObject, objectArray, optionalBoolean, optionalInteger, optionalRawString, optionalRecord, optionalString, stringArray, } from "../../core/cast.js";
|
|
2
|
-
import { defineApiKeyProviderExecutors, defineProviderProxy, providerUserAgent, ProviderRequestError, } from "../provider-runtime.js";
|
|
2
|
+
import { defineApiKeyProviderExecutors, defineProviderProxy, providerUserAgent, ProviderRequestError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
import { folkCompanyMutableKeys, folkPersonMutableKeys } from "./actions.js";
|
|
4
4
|
const service = "folk";
|
|
5
5
|
const folkApiBaseUrl = "https://api.folk.app";
|
|
6
6
|
const folkCurrentUserPath = "/v1/users/me";
|
|
7
|
-
const folkDefaultRequestTimeoutMs = 30_000;
|
|
8
7
|
export const folkActionHandlers = {
|
|
9
8
|
async get_current_user(_input, context) {
|
|
10
9
|
const payload = await requestFolkJson(context, {
|
|
@@ -207,7 +206,7 @@ export const credentialValidators = {
|
|
|
207
206
|
},
|
|
208
207
|
};
|
|
209
208
|
async function requestFolkJson(context, input) {
|
|
210
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
209
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
211
210
|
const signal = context.signal ? AbortSignal.any([context.signal, timeoutSignal]) : timeoutSignal;
|
|
212
211
|
try {
|
|
213
212
|
const headers = {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { compactObject, optionalInteger, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { defineApiKeyProviderExecutors, defineProviderProxy, providerUserAgent, ProviderRequestError, } from "../provider-runtime.js";
|
|
2
|
+
import { defineApiKeyProviderExecutors, defineProviderProxy, providerUserAgent, ProviderRequestError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
const service = "football_data";
|
|
4
4
|
const footballDataBaseUrl = "https://api.football-data.org/v4";
|
|
5
5
|
const footballDataApiOrigin = "https://api.football-data.org";
|
|
6
|
-
const defaultRequestTimeoutMs = 30_000;
|
|
7
6
|
export const footballDataActionHandlers = {
|
|
8
7
|
async list_competitions(_input, context) {
|
|
9
8
|
const payload = await footballDataRequestJson(context, {
|
|
@@ -164,7 +163,7 @@ async function footballDataRequestJson(context, input) {
|
|
|
164
163
|
url.searchParams.set(key, value);
|
|
165
164
|
}
|
|
166
165
|
}
|
|
167
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
166
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
168
167
|
const signal = context.signal ? AbortSignal.any([context.signal, timeoutSignal]) : timeoutSignal;
|
|
169
168
|
try {
|
|
170
169
|
const response = await context.fetcher(url, {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { compactObject, optionalRawString, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { defineProviderExecutors, defineProviderProxy, isAbortLikeError, ProviderRequestError, providerUserAgent, requireApiKeyCredential, } from "../provider-runtime.js";
|
|
2
|
+
import { defineProviderExecutors, defineProviderProxy, isAbortLikeError, ProviderRequestError, providerUserAgent, requireApiKeyCredential, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
import { foremArticleMutableKeys } from "./actions.js";
|
|
4
4
|
const service = "forem";
|
|
5
5
|
const foremDefaultBaseUrl = "https://dev.to";
|
|
6
6
|
const foremApiPathPrefix = "/api";
|
|
7
|
-
const foremDefaultRequestTimeoutMs = 30_000;
|
|
8
7
|
export const foremActionHandlers = {
|
|
9
8
|
async get_current_user(_input, context) {
|
|
10
9
|
const raw = await requestForemJson(context, {
|
|
@@ -200,7 +199,7 @@ async function requestForemJson(context, input) {
|
|
|
200
199
|
}
|
|
201
200
|
}
|
|
202
201
|
const body = input.body ? JSON.stringify(input.body) : undefined;
|
|
203
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
202
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
204
203
|
const signal = context.signal ? AbortSignal.any([context.signal, timeoutSignal]) : timeoutSignal;
|
|
205
204
|
try {
|
|
206
205
|
const response = await context.fetcher(url, {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { compactObject, optionalInteger, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, ProviderRequestError, providerUserAgent, } from "../provider-runtime.js";
|
|
2
|
+
import { defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, ProviderRequestError, providerUserAgent, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
const service = "formbricks";
|
|
4
4
|
const formbricksApiBaseUrl = "https://app.formbricks.com/api/v2";
|
|
5
5
|
const formbricksValidationPath = "/me";
|
|
6
|
-
const formbricksRequestTimeoutMs = 30_000;
|
|
7
6
|
export const formbricksActionHandlers = {
|
|
8
7
|
async get_me(_input, context) {
|
|
9
8
|
return normalizeMePayload(await requestFormbricksJson(context, {
|
|
@@ -122,7 +121,7 @@ export const credentialValidators = {
|
|
|
122
121
|
},
|
|
123
122
|
};
|
|
124
123
|
async function requestFormbricksJson(context, input) {
|
|
125
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
124
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
126
125
|
const signal = context.signal ? AbortSignal.any([context.signal, timeoutSignal]) : timeoutSignal;
|
|
127
126
|
try {
|
|
128
127
|
const response = await context.fetcher(buildFormbricksUrl(input.path, input.query), {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { compactObject, optionalInteger, optionalNumber, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { defineProviderProxy, defineProviderExecutors, providerUserAgent, ProviderRequestError, requireApiKeyCredential, } from "../provider-runtime.js";
|
|
2
|
+
import { defineProviderProxy, defineProviderExecutors, providerUserAgent, ProviderRequestError, requireApiKeyCredential, providerInputError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
const service = "formsite";
|
|
4
|
-
const formsiteDefaultRequestTimeoutMs = 30_000;
|
|
5
4
|
const formsiteValidationPathSuffix = "/forms";
|
|
6
5
|
export const formsiteActionHandlers = {
|
|
7
6
|
list_forms(input, context) {
|
|
@@ -236,7 +235,7 @@ async function formsiteFetch(context, input) {
|
|
|
236
235
|
if (input.body) {
|
|
237
236
|
headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8");
|
|
238
237
|
}
|
|
239
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
238
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
240
239
|
const signal = context.signal ? AbortSignal.any([context.signal, timeoutSignal]) : timeoutSignal;
|
|
241
240
|
try {
|
|
242
241
|
return await context.fetcher(url, {
|
|
@@ -282,7 +281,7 @@ async function toFormsiteError(response, phase, notFoundAsInvalidInput) {
|
|
|
282
281
|
return new ProviderRequestError(429, message);
|
|
283
282
|
}
|
|
284
283
|
if (response.status === 400 || response.status === 422 || (notFoundAsInvalidInput && response.status === 404)) {
|
|
285
|
-
return
|
|
284
|
+
return providerInputError(message);
|
|
286
285
|
}
|
|
287
286
|
return new ProviderRequestError(response.status >= 500 ? 502 : response.status || 502, message);
|
|
288
287
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalBoolean, optionalInteger, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { defineProviderExecutors, defineProviderProxy, isAbortLikeError, providerUserAgent, ProviderRequestError, requireApiKeyCredential, } from "../provider-runtime.js";
|
|
2
|
+
import { defineProviderExecutors, defineProviderProxy, isAbortLikeError, providerUserAgent, ProviderRequestError, requireApiKeyCredential, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
const service = "formspree";
|
|
4
4
|
const formspreeApiBaseUrl = "https://formspree.io/api/0/";
|
|
5
5
|
export const formspreeActionHandlers = {
|
|
@@ -84,7 +84,7 @@ async function requestJson(path, context, phase) {
|
|
|
84
84
|
}
|
|
85
85
|
async function formspreeFetch(path, input) {
|
|
86
86
|
const url = new URL(path, formspreeApiBaseUrl);
|
|
87
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
87
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
88
88
|
const signal = input.signal ? AbortSignal.any([input.signal, timeoutSignal]) : timeoutSignal;
|
|
89
89
|
const headers = new Headers({
|
|
90
90
|
accept: "application/json",
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Buffer } from "node:buffer";
|
|
2
2
|
import { compactObject, optionalInteger, optionalRecord, optionalString } from "../../core/cast.js";
|
|
3
|
-
import { defineProviderProxy, defineProviderExecutors, isAbortLikeError, providerUserAgent, ProviderRequestError, requireApiKeyCredential, } from "../provider-runtime.js";
|
|
3
|
+
import { defineProviderProxy, defineProviderExecutors, isAbortLikeError, providerUserAgent, ProviderRequestError, requireApiKeyCredential, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
4
4
|
const service = "freshdesk";
|
|
5
5
|
const freshdeskValidationPath = "/api/v2/account";
|
|
6
6
|
const defaultFreshdeskPageSize = 30;
|
|
7
|
-
const freshdeskDefaultRequestTimeoutMs = 30_000;
|
|
8
7
|
export const freshdeskActionHandlers = {
|
|
9
8
|
async get_account(_input, context) {
|
|
10
9
|
return {
|
|
@@ -164,7 +163,7 @@ function resolveFreshdeskBaseUrl(values, metadata) {
|
|
|
164
163
|
return buildFreshdeskBaseUrl(normalizeFreshdeskDomain(domain));
|
|
165
164
|
}
|
|
166
165
|
async function requestFreshdeskJson(input) {
|
|
167
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
166
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
168
167
|
const signal = input.signal ? AbortSignal.any([input.signal, timeoutSignal]) : timeoutSignal;
|
|
169
168
|
let response;
|
|
170
169
|
let payload;
|
|
@@ -185,7 +184,7 @@ async function requestFreshdeskJson(input) {
|
|
|
185
184
|
throw error;
|
|
186
185
|
}
|
|
187
186
|
if (timeoutSignal.aborted && !input.signal?.aborted && isAbortLikeError(error)) {
|
|
188
|
-
throw new ProviderRequestError(504, `Freshdesk request timed out after ${Math.max(1, Math.ceil(
|
|
187
|
+
throw new ProviderRequestError(504, `Freshdesk request timed out after ${Math.max(1, Math.ceil(defaultProviderRequestTimeoutMs / 1000))} seconds`);
|
|
189
188
|
}
|
|
190
189
|
throw new ProviderRequestError(502, error instanceof Error ? `Freshdesk request failed: ${error.message}` : "Freshdesk request failed", error);
|
|
191
190
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Buffer } from "node:buffer";
|
|
2
2
|
import { compactObject, optionalInteger, optionalRecord, optionalString } from "../../core/cast.js";
|
|
3
|
-
import { defineProviderProxy, defineProviderExecutors, isAbortLikeError, providerUserAgent, ProviderRequestError, requireApiKeyCredential, } from "../provider-runtime.js";
|
|
3
|
+
import { defineProviderProxy, defineProviderExecutors, isAbortLikeError, providerUserAgent, ProviderRequestError, requireApiKeyCredential, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
4
4
|
const service = "freshservice";
|
|
5
5
|
const freshserviceValidationPath = "/api/v2/tickets";
|
|
6
|
-
const freshserviceDefaultRequestTimeoutMs = 30_000;
|
|
7
6
|
const freshserviceDefaultPageSize = 30;
|
|
8
7
|
export const freshserviceActionHandlers = {
|
|
9
8
|
async list_tickets(input, context) {
|
|
@@ -193,7 +192,7 @@ function validateCreateTicketInput(input) {
|
|
|
193
192
|
}
|
|
194
193
|
}
|
|
195
194
|
async function requestFreshserviceJson(context, input) {
|
|
196
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
195
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
197
196
|
const signal = context.signal ? AbortSignal.any([context.signal, timeoutSignal]) : timeoutSignal;
|
|
198
197
|
let response;
|
|
199
198
|
let payload;
|
|
@@ -211,7 +210,7 @@ async function requestFreshserviceJson(context, input) {
|
|
|
211
210
|
throw error;
|
|
212
211
|
}
|
|
213
212
|
if (timeoutSignal.aborted && !context.signal?.aborted && isAbortLikeError(error)) {
|
|
214
|
-
throw new ProviderRequestError(504, `Freshservice request timed out after ${Math.max(1, Math.ceil(
|
|
213
|
+
throw new ProviderRequestError(504, `Freshservice request timed out after ${Math.max(1, Math.ceil(defaultProviderRequestTimeoutMs / 1000))} seconds`);
|
|
215
214
|
}
|
|
216
215
|
throw new ProviderRequestError(502, error instanceof Error ? `Freshservice request failed: ${error.message}` : "Freshservice request failed", error);
|
|
217
216
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { compactObject, optionalBoolean, optionalInteger, optionalRecord, optionalString, positiveInteger, } from "../../core/cast.js";
|
|
2
|
-
import { createProviderTimeout, isAbortLikeError, providerUserAgent, ProviderRequestError, } from "../provider-runtime.js";
|
|
2
|
+
import { createProviderTimeout, isAbortLikeError, providerUserAgent, ProviderRequestError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
const freshteamValidationPath = "/api/employees";
|
|
4
|
-
const freshteamDefaultRequestTimeoutMs = 30_000;
|
|
5
4
|
const defaultFreshteamPage = 1;
|
|
6
5
|
export const freshteamActionHandlers = {
|
|
7
6
|
async list_employees(input, context) {
|
|
@@ -205,7 +204,7 @@ function compactQuery(input) {
|
|
|
205
204
|
return query;
|
|
206
205
|
}
|
|
207
206
|
async function requestFreshteamJson(input) {
|
|
208
|
-
const timeout = createProviderTimeout(input.signal
|
|
207
|
+
const timeout = createProviderTimeout(input.signal);
|
|
209
208
|
try {
|
|
210
209
|
const response = await input.fetcher(buildFreshteamUrl(input.baseUrl, input.path, input.query), {
|
|
211
210
|
method: "GET",
|
|
@@ -230,7 +229,7 @@ async function requestFreshteamJson(input) {
|
|
|
230
229
|
throw error;
|
|
231
230
|
}
|
|
232
231
|
throw new ProviderRequestError(timeout.didTimeout() || isAbortLikeError(error) ? 504 : 502, timeout.didTimeout()
|
|
233
|
-
? `Freshteam request timed out after ${Math.max(1, Math.ceil(
|
|
232
|
+
? `Freshteam request timed out after ${Math.max(1, Math.ceil(defaultProviderRequestTimeoutMs / 1000))} seconds`
|
|
234
233
|
: error instanceof Error
|
|
235
234
|
? `Freshteam request failed: ${error.message}`
|
|
236
235
|
: "Freshteam request failed", error);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalBoolean, optionalInteger, optionalNumber, optionalRecord, optionalString, } from "../../core/cast.js";
|
|
2
|
-
import { defineProviderExecutors, defineProviderProxy, providerUserAgent, ProviderRequestError, readProviderTextBody, requireApiKeyCredential, runProviderRequest, } from "../provider-runtime.js";
|
|
2
|
+
import { defineProviderExecutors, defineProviderProxy, providerUserAgent, ProviderRequestError, readProviderTextBody, requireApiKeyCredential, runProviderRequest, providerInputError, } from "../provider-runtime.js";
|
|
3
3
|
const fullContactApiBaseUrl = "https://api.fullcontact.com/v3";
|
|
4
4
|
const fullContactMaxResponseBytes = 10 * 1024 * 1024;
|
|
5
5
|
export const fullContactActionHandlers = {
|
|
@@ -161,13 +161,13 @@ function createFullContactError(status, payload, mode) {
|
|
|
161
161
|
return new ProviderRequestError(429, message);
|
|
162
162
|
}
|
|
163
163
|
if (mode === "validate" && (status === 401 || status === 403)) {
|
|
164
|
-
return
|
|
164
|
+
return providerInputError(message);
|
|
165
165
|
}
|
|
166
166
|
if (mode === "execute" && (status === 401 || status === 403)) {
|
|
167
167
|
return new ProviderRequestError(401, message);
|
|
168
168
|
}
|
|
169
169
|
if ([400, 404, 422].includes(status)) {
|
|
170
|
-
return
|
|
170
|
+
return providerInputError(message);
|
|
171
171
|
}
|
|
172
172
|
return new ProviderRequestError(status >= 500 ? 502 : status || 502, message);
|
|
173
173
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
2
|
import { compactJson, encodePathSegment } from "../../core/request.js";
|
|
3
|
-
import { createProviderTimeout, isAbortLikeError, mapProviderActionHandlers, ProviderRequestError, providerUserAgent, } from "../provider-runtime.js";
|
|
3
|
+
import { createProviderTimeout, isAbortLikeError, mapProviderActionHandlers, ProviderRequestError, providerUserAgent, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
4
4
|
import { fusionApiOperations } from "./operations.js";
|
|
5
5
|
export const fusionApiDefaultBaseUrl = "https://fusion-api.oomol.com";
|
|
6
|
-
const fusionApiDefaultRequestTimeoutMs = 30_000;
|
|
7
6
|
const fusionApiLongRunningRequestTimeoutMs = 300_000;
|
|
8
7
|
const fusionApiLongRunningPaths = new Set(["/v1/deepseek-ocr/action/recognize", "/v1/jina-reader/action/read"]);
|
|
9
8
|
const fusionApiValidationPath = "/openapi/qwen-image?hideTaskStateAPI=true";
|
|
@@ -52,7 +51,7 @@ async function fusionApiRequest(context, request) {
|
|
|
52
51
|
}
|
|
53
52
|
const requestTimeoutMs = fusionApiLongRunningPaths.has(request.path)
|
|
54
53
|
? fusionApiLongRunningRequestTimeoutMs
|
|
55
|
-
:
|
|
54
|
+
: defaultProviderRequestTimeoutMs;
|
|
56
55
|
const timeout = createProviderTimeout(context.signal, requestTimeoutMs);
|
|
57
56
|
let response;
|
|
58
57
|
try {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { optionalInteger, optionalRawString, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { createProviderFetch, createProviderProxyUrl, providerUserAgent, createProviderTimeout, defineProviderExecutors, normalizeProviderProxyHeaders, ProviderRequestError, readProviderProxyErrorMessage, readProviderProxyResponse, readProviderTextBody, requireCustomCredential, toProviderProxyError, } from "../provider-runtime.js";
|
|
2
|
+
import { createProviderFetch, createProviderProxyUrl, providerUserAgent, createProviderTimeout, defineProviderExecutors, normalizeProviderProxyHeaders, ProviderRequestError, readProviderProxyErrorMessage, readProviderProxyResponse, readProviderTextBody, requireCustomCredential, toProviderProxyError, providerInputError, providerResponseError, } from "../provider-runtime.js";
|
|
3
3
|
const service = "gagelist";
|
|
4
4
|
const gagelistApiBaseUrl = "https://gagelist.net/GageList/api";
|
|
5
5
|
const gagelistTokenUrl = "https://gagelist.net/api/token";
|
|
@@ -452,7 +452,7 @@ function listQuery(input) {
|
|
|
452
452
|
function requireObject(value, message) {
|
|
453
453
|
const object = optionalRecord(value);
|
|
454
454
|
if (!object) {
|
|
455
|
-
throw
|
|
455
|
+
throw providerResponseError(message);
|
|
456
456
|
}
|
|
457
457
|
return object;
|
|
458
458
|
}
|
|
@@ -480,7 +480,7 @@ function createGagelistError(status, payload, phase, operation) {
|
|
|
480
480
|
optionalRawString(body?.message) ??
|
|
481
481
|
`GageList ${operation} failed with HTTP ${status}`;
|
|
482
482
|
if (phase == "validate" && (status == 400 || status == 401 || status == 403)) {
|
|
483
|
-
return
|
|
483
|
+
return providerInputError(message);
|
|
484
484
|
}
|
|
485
485
|
if (status == 401 || status == 403) {
|
|
486
486
|
return new ProviderRequestError(status, message);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { compactObject, optionalInteger, optionalRecord, optionalString, rawStringOrNull } from "../../core/cast.js";
|
|
2
2
|
import { assertPublicHttpUrl } from "../../core/request.js";
|
|
3
|
-
import { createProviderTimeout, defineProviderExecutors, defineProviderProxy, isAbortLikeError, providerInputError, providerUserAgent, ProviderRequestError, readProviderTextBody, requireApiKeyCredential, } from "../provider-runtime.js";
|
|
3
|
+
import { createProviderTimeout, defineProviderExecutors, defineProviderProxy, isAbortLikeError, providerInputError, providerUserAgent, ProviderRequestError, readProviderTextBody, requireApiKeyCredential, providerResponseError, } from "../provider-runtime.js";
|
|
4
4
|
const gainsightNxtMaxResponseBytes = 10 * 1024 * 1024;
|
|
5
5
|
const companyPath = "/v1/data/objects/Company";
|
|
6
6
|
const companyQueryPath = "/v1/data/objects/query/Company";
|
|
@@ -171,7 +171,7 @@ function createGainsightError(status, payload, phase) {
|
|
|
171
171
|
if (status >= 400 && status < 500) {
|
|
172
172
|
return new ProviderRequestError(status || 400, message);
|
|
173
173
|
}
|
|
174
|
-
return
|
|
174
|
+
return providerResponseError(message);
|
|
175
175
|
}
|
|
176
176
|
function readGainsightErrorMessage(payload) {
|
|
177
177
|
if (typeof payload === "string" && payload.trim()) {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { compactObject, optionalInteger, optionalNumber, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
2
|
import { compactJson } from "../../core/request.js";
|
|
3
|
-
import { defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, ProviderRequestError, providerUserAgent, requiredInputString, } from "../provider-runtime.js";
|
|
3
|
+
import { defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, ProviderRequestError, providerUserAgent, requiredInputString, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
4
4
|
const service = "gamma";
|
|
5
5
|
const gammaApiBaseUrl = "https://public-api.gamma.app";
|
|
6
6
|
const gammaApiVersionPath = "/v1.0";
|
|
7
|
-
const gammaDefaultRequestTimeoutMs = 30_000;
|
|
8
7
|
export const gammaActionHandlers = {
|
|
9
8
|
create_generation(input, context) {
|
|
10
9
|
return createGeneration(input, context);
|
|
@@ -215,7 +214,9 @@ function isTerminalGenerationStatus(status) {
|
|
|
215
214
|
return status === "completed" || status === "failed";
|
|
216
215
|
}
|
|
217
216
|
async function gammaRequest(input) {
|
|
218
|
-
const requestTimeoutMs = input.timeoutMs == null
|
|
217
|
+
const requestTimeoutMs = input.timeoutMs == null
|
|
218
|
+
? defaultProviderRequestTimeoutMs
|
|
219
|
+
: Math.min(defaultProviderRequestTimeoutMs, input.timeoutMs);
|
|
219
220
|
const timeoutSignal = AbortSignal.timeout(requestTimeoutMs);
|
|
220
221
|
const signal = input.context.signal ? AbortSignal.any([input.context.signal, timeoutSignal]) : timeoutSignal;
|
|
221
222
|
const url = new URL(`${gammaApiVersionPath}${input.path}`, gammaApiBaseUrl);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { compactObject, optionalInteger, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { ProviderRequestError, providerUserAgent } from "../provider-runtime.js";
|
|
2
|
+
import { ProviderRequestError, providerUserAgent, providerInputError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
export const gangtiseApiBaseUrl = "https://openapi.gangtise.com";
|
|
4
4
|
const gangtiseCredentialUrl = "https://open-platform.gangtise.com/";
|
|
5
|
-
const gangtiseRequestTimeoutMs = 30_000;
|
|
6
5
|
const loginPath = "/application/auth/oauth/open/loginV2";
|
|
7
6
|
const securitiesSearchPath = "/application/open-reference/securities/search";
|
|
8
7
|
const realtimeQuotePath = "/application/open-quote/quote/realtime";
|
|
@@ -846,7 +845,7 @@ function normalizeMatrix(value, outputFields) {
|
|
|
846
845
|
});
|
|
847
846
|
}
|
|
848
847
|
async function postGangtiseJson(input) {
|
|
849
|
-
const timeout = createTimeoutSignal({ timeoutMs:
|
|
848
|
+
const timeout = createTimeoutSignal({ timeoutMs: defaultProviderRequestTimeoutMs });
|
|
850
849
|
let response;
|
|
851
850
|
let payload;
|
|
852
851
|
try {
|
|
@@ -908,7 +907,7 @@ function createGangtiseError(response, payload, phase) {
|
|
|
908
907
|
return new ProviderRequestError(phase === "validate" ? 400 : 401, message);
|
|
909
908
|
}
|
|
910
909
|
if (response.status === 400 || response.status === 422) {
|
|
911
|
-
return
|
|
910
|
+
return providerInputError(message);
|
|
912
911
|
}
|
|
913
912
|
return new ProviderRequestError(response.status >= 500 ? 502 : response.status || 502, message);
|
|
914
913
|
}
|
|
@@ -115,7 +115,7 @@ async function readGatherupPayload(response) {
|
|
|
115
115
|
function createGatherupError(status, payload, phase) {
|
|
116
116
|
const message = extractGatherupErrorMessage(payload) ?? `GatherUp request failed with status ${status}`;
|
|
117
117
|
if (phase === "validate" && (status === 401 || status === 403)) {
|
|
118
|
-
return
|
|
118
|
+
return providerInputError(message);
|
|
119
119
|
}
|
|
120
120
|
if (phase === "execute" && (status === 401 || status === 403)) {
|
|
121
121
|
return new ProviderRequestError(status, message);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
2
|
import { compactJson, jsonObject } from "../../core/request.js";
|
|
3
|
-
import { defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, providerUserAgent, ProviderRequestError, } from "../provider-runtime.js";
|
|
3
|
+
import { defineApiKeyProviderExecutors, defineProviderProxy, isAbortLikeError, providerUserAgent, ProviderRequestError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
4
4
|
const service = "geckoboard";
|
|
5
5
|
const geckoboardApiBaseUrl = "https://api.geckoboard.com";
|
|
6
|
-
const geckoboardDefaultRequestTimeoutMs = 30_000;
|
|
7
6
|
export const geckoboardActionHandlers = {
|
|
8
7
|
async find_or_create_dataset(input, context) {
|
|
9
8
|
const datasetId = readInputString(input.datasetId, "datasetId");
|
|
@@ -97,7 +96,7 @@ export const credentialValidators = {
|
|
|
97
96
|
},
|
|
98
97
|
};
|
|
99
98
|
async function requestGeckoboardJson(input) {
|
|
100
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
99
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
101
100
|
const signal = input.context.signal ? AbortSignal.any([input.context.signal, timeoutSignal]) : timeoutSignal;
|
|
102
101
|
let response;
|
|
103
102
|
let payload;
|
|
@@ -8,7 +8,6 @@ export declare const geminiDefaultVideoModel = "veo-3.0-generate-001";
|
|
|
8
8
|
export declare const geminiDefaultVideoPollIntervalMs = 10000;
|
|
9
9
|
export declare const geminiDefaultVideoMaxWaitMs: number;
|
|
10
10
|
export declare const geminiDefaultRequestTimeoutMs = 10000;
|
|
11
|
-
export declare const geminiDefaultLongRunningRequestTimeoutMs = 30000;
|
|
12
11
|
type GeminiErrorMode = "validate" | "execute";
|
|
13
12
|
interface GeminiModelSummary {
|
|
14
13
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { compactObject, optionalInteger, optionalNumber, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
2
|
import { jsonObject, readBoundedResponseBytes } from "../../core/request.js";
|
|
3
|
-
import { isAbortLikeError, providerUserAgent, ProviderRequestError } from "../provider-runtime.js";
|
|
3
|
+
import { isAbortLikeError, providerUserAgent, ProviderRequestError, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
4
4
|
export const geminiApiBaseUrl = "https://generativelanguage.googleapis.com/v1beta";
|
|
5
5
|
export const geminiDefaultTextModel = "gemini-2.5-flash";
|
|
6
6
|
export const geminiDefaultEmbeddingModel = "text-embedding-004";
|
|
@@ -10,7 +10,6 @@ export const geminiDefaultVideoModel = "veo-3.0-generate-001";
|
|
|
10
10
|
export const geminiDefaultVideoPollIntervalMs = 10_000;
|
|
11
11
|
export const geminiDefaultVideoMaxWaitMs = 12 * 60_000;
|
|
12
12
|
export const geminiDefaultRequestTimeoutMs = 10_000;
|
|
13
|
-
export const geminiDefaultLongRunningRequestTimeoutMs = 30_000;
|
|
14
13
|
export function geminiHeaders(apiKey) {
|
|
15
14
|
return {
|
|
16
15
|
"content-type": "application/json",
|
|
@@ -176,7 +175,7 @@ export async function generateGeminiImage(input, context) {
|
|
|
176
175
|
safetySettings: asSafetySettings(input.safety_settings),
|
|
177
176
|
systemInstruction: buildGeminiSystemInstruction(input.system_instruction),
|
|
178
177
|
})),
|
|
179
|
-
}, context, "generate_image", resolveGeminiTimeoutMs(input.timeout,
|
|
178
|
+
}, context, "generate_image", resolveGeminiTimeoutMs(input.timeout, defaultProviderRequestTimeoutMs));
|
|
180
179
|
await assertGeminiResponse(response, "execute", "generate_image");
|
|
181
180
|
const payload = await readGeminiJson(response, "generate_image");
|
|
182
181
|
const inlineImage = extractInlineDataPart(payload, "image/");
|
|
@@ -215,7 +214,7 @@ export async function generateGeminiVideos(input, context) {
|
|
|
215
214
|
seed: optionalInteger(input.seed),
|
|
216
215
|
}),
|
|
217
216
|
})),
|
|
218
|
-
}, context, "generate_videos",
|
|
217
|
+
}, context, "generate_videos", defaultProviderRequestTimeoutMs);
|
|
219
218
|
await assertGeminiResponse(response, "execute", "generate_videos");
|
|
220
219
|
const payload = await readGeminiJson(response, "generate_videos");
|
|
221
220
|
const operationName = optionalString(payload.name);
|
|
@@ -282,7 +281,7 @@ async function fetchGeminiVideoOperation(input, context) {
|
|
|
282
281
|
const operationName = buildOperationResource(optionalString(input.operation_name) ?? "", resolveGeminiModel(input.model, geminiDefaultVideoModel));
|
|
283
282
|
const response = await fetchGemini(`${geminiApiBaseUrl}/${operationName}`, {
|
|
284
283
|
headers: geminiHeaders(context.apiKey),
|
|
285
|
-
}, context, "get_videos_operation",
|
|
284
|
+
}, context, "get_videos_operation", defaultProviderRequestTimeoutMs);
|
|
286
285
|
await assertGeminiResponse(response, "execute", "get_videos_operation");
|
|
287
286
|
return readGeminiJson(response, "get_videos_operation");
|
|
288
287
|
}
|
|
@@ -432,7 +431,7 @@ async function downloadMediaBytes(url, context) {
|
|
|
432
431
|
}
|
|
433
432
|
const response = await fetchGemini(url, {
|
|
434
433
|
headers,
|
|
435
|
-
}, context, "media download",
|
|
434
|
+
}, context, "media download", defaultProviderRequestTimeoutMs);
|
|
436
435
|
if (!response.ok) {
|
|
437
436
|
const message = (await response.text().catch(() => "")) || `gemini media download failed with ${response.status}`;
|
|
438
437
|
throw new ProviderRequestError(502, message, { status: response.status });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { optionalRecord, optionalString } 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 genpageApiBaseUrl = "https://backend.genpage.ai";
|
|
4
4
|
function listHandler(path, outputKey) {
|
|
5
5
|
return async (input, context) => ({
|
|
@@ -87,7 +87,7 @@ function createError(status, payload, phase) {
|
|
|
87
87
|
if (status === 429)
|
|
88
88
|
return new ProviderRequestError(429, message);
|
|
89
89
|
if (phase === "validate" && 400 <= status && status < 500)
|
|
90
|
-
return
|
|
90
|
+
return providerInputError(message);
|
|
91
91
|
return new ProviderRequestError(status || 500, message);
|
|
92
92
|
}
|
|
93
93
|
function requireArray(value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalRecord, optionalString } from "../../core/cast.js";
|
|
2
|
-
import { defineApiKeyProviderExecutors, defineProviderProxy, ProviderRequestError } from "../provider-runtime.js";
|
|
2
|
+
import { defineApiKeyProviderExecutors, defineProviderProxy, ProviderRequestError, providerInputError, providerResponseError, } from "../provider-runtime.js";
|
|
3
3
|
const service = "geokeo";
|
|
4
4
|
const geokeoApiBaseUrl = "https://geokeo.com";
|
|
5
5
|
const geokeoValidationQuery = "ZZQXV NO MATCH PLACE 19700101";
|
|
@@ -104,12 +104,12 @@ function createGeokeoStatusError(status) {
|
|
|
104
104
|
return new ProviderRequestError(429, status);
|
|
105
105
|
}
|
|
106
106
|
if (status === "INVALID_REQUEST") {
|
|
107
|
-
return
|
|
107
|
+
return providerInputError(status);
|
|
108
108
|
}
|
|
109
109
|
if (status === "ACCESS_DENIED") {
|
|
110
|
-
return
|
|
110
|
+
return providerInputError(status);
|
|
111
111
|
}
|
|
112
|
-
return
|
|
112
|
+
return providerResponseError(status);
|
|
113
113
|
}
|
|
114
114
|
function readGeokeoStatus(payload) {
|
|
115
115
|
return optionalString(payload?.status);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { nullableString, optionalNumber, optionalBoolean, optionalRecord, optionalString, requiredRecord, } from "../../core/cast.js";
|
|
2
|
-
import { isAbortLikeError, providerFetch, ProviderRequestError, providerUserAgent } from "../provider-runtime.js";
|
|
2
|
+
import { isAbortLikeError, providerFetch, ProviderRequestError, providerUserAgent, defaultProviderRequestTimeoutMs, } from "../provider-runtime.js";
|
|
3
3
|
export const getnoteBaseUrl = "https://openapi.biji.com";
|
|
4
|
-
const getnoteRequestTimeoutMs = 30_000;
|
|
5
4
|
export async function validateGetnoteCredential(input, fetcher = providerFetch, signal) {
|
|
6
5
|
const apiKey = readGetnoteApiKey(input.apiKey);
|
|
7
6
|
const clientId = readGetnoteClientId(input);
|
|
@@ -396,7 +395,7 @@ async function getnoteRequest(context, request) {
|
|
|
396
395
|
url.searchParams.set(key, String(value));
|
|
397
396
|
}
|
|
398
397
|
}
|
|
399
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
398
|
+
const timeoutSignal = AbortSignal.timeout(defaultProviderRequestTimeoutMs);
|
|
400
399
|
const signal = context.signal ? AbortSignal.any([context.signal, timeoutSignal]) : timeoutSignal;
|
|
401
400
|
let response;
|
|
402
401
|
try {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compactObject, optionalInteger, optionalString, optionalRawString } from "../../core/cast.js";
|
|
2
|
-
import { ProviderRequestError } from "../provider-runtime.js";
|
|
2
|
+
import { ProviderRequestError, providerInputError } from "../provider-runtime.js";
|
|
3
3
|
export { compactObject };
|
|
4
4
|
export const githubApiBaseUrl = "https://api.github.com";
|
|
5
5
|
export const githubApiVersion = "2022-11-28";
|
|
@@ -135,7 +135,7 @@ export function normalizeGitHubError(response, payload, fallbackMessage) {
|
|
|
135
135
|
return new ProviderRequestError(404, message);
|
|
136
136
|
}
|
|
137
137
|
if (response.status === 400 || response.status === 422) {
|
|
138
|
-
return
|
|
138
|
+
return providerInputError(message);
|
|
139
139
|
}
|
|
140
140
|
return new ProviderRequestError(500, message, response.status);
|
|
141
141
|
}
|