@hasna/connectors 1.4.1 → 1.4.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/bin/index.js +1271 -317
- package/bin/mcp.js +524 -211
- package/bin/serve.js +1208 -256
- package/connectors/adobe/package.json +1 -1
- package/connectors/aitableai/package.json +1 -1
- package/connectors/alchemy/package.json +1 -1
- package/connectors/alerty/package.json +1 -1
- package/connectors/alienvault/package.json +1 -1
- package/connectors/alphamoon/package.json +1 -1
- package/connectors/alttextai/package.json +1 -1
- package/connectors/amadeus/package.json +1 -1
- package/connectors/amadeus/src/api/client.ts +6 -6
- package/connectors/amadeus/src/cli/index.ts +6 -6
- package/connectors/amadeus/src/utils/output.ts +5 -5
- package/connectors/amazon/package.json +1 -1
- package/connectors/amilia/package.json +1 -1
- package/connectors/amqpsender/package.json +1 -1
- package/connectors/announcekit/package.json +1 -1
- package/connectors/anthropic/.env.example +1 -1
- package/connectors/anyscale/package.json +1 -1
- package/connectors/apiary/package.json +1 -1
- package/connectors/apiflash/package.json +1 -1
- package/connectors/apitemplateio/package.json +1 -1
- package/connectors/apptivegrid/package.json +1 -1
- package/connectors/assemblyai/package.json +1 -1
- package/connectors/autom/package.json +1 -1
- package/connectors/automizy/package.json +1 -1
- package/connectors/autopilot/package.json +1 -1
- package/connectors/awscognito/package.json +1 -1
- package/connectors/bamboohr/package.json +1 -1
- package/connectors/bannerbear/package.json +1 -1
- package/connectors/baseten/package.json +1 -1
- package/connectors/box/package.json +1 -1
- package/connectors/brevo/package.json +1 -1
- package/connectors/calendly/package.json +1 -1
- package/connectors/cerebras/package.json +1 -1
- package/connectors/chargebee/package.json +1 -1
- package/connectors/clearbit/package.json +1 -1
- package/connectors/clickbank/README.md +2 -2
- package/connectors/cloudflare-workers/package.json +1 -1
- package/connectors/coda/package.json +1 -1
- package/connectors/coingecko/package.json +1 -1
- package/connectors/convertkit/package.json +1 -1
- package/connectors/customerio/package.json +1 -1
- package/connectors/databricks/package.json +1 -1
- package/connectors/datadog/package.json +1 -1
- package/connectors/datasoap/README.md +2 -2
- package/connectors/datasoap/package.json +1 -1
- package/connectors/datumbox/README.md +2 -2
- package/connectors/datumbox/package.json +1 -1
- package/connectors/dayschedule/README.md +2 -2
- package/connectors/dayschedule/package.json +1 -1
- package/connectors/deepgram/package.json +1 -1
- package/connectors/deepinfra/README.md +2 -2
- package/connectors/deepinfra/package.json +1 -1
- package/connectors/deepl/README.md +2 -2
- package/connectors/deepl/package.json +1 -1
- package/connectors/deepseek/package.json +1 -1
- package/connectors/demio/README.md +2 -2
- package/connectors/demio/package.json +1 -1
- package/connectors/descript/README.md +2 -2
- package/connectors/descript/package.json +1 -1
- package/connectors/detrack/README.md +2 -2
- package/connectors/detrack/package.json +1 -1
- package/connectors/devcycle/README.md +2 -2
- package/connectors/devcycle/package.json +1 -1
- package/connectors/dhl/README.md +2 -2
- package/connectors/dhl/package.json +1 -1
- package/connectors/docusign/package.json +1 -1
- package/connectors/dropbox/package.json +1 -1
- package/connectors/fal/package.json +1 -1
- package/connectors/fathom/package.json +1 -1
- package/connectors/fireworks/package.json +1 -1
- package/connectors/gitlab/package.json +1 -1
- package/connectors/googlechat/README.md +1 -2
- package/connectors/googledrive/src/api/client.ts +5 -5
- package/connectors/googledrive/src/api/files.ts +11 -11
- package/connectors/googledrive/src/api/folders.ts +2 -2
- package/connectors/googledrive/src/cli/index.ts +4 -4
- package/connectors/googledrive/src/utils/output.ts +3 -3
- package/connectors/googleforms/README.md +1 -2
- package/connectors/googleperspective/README.md +1 -2
- package/connectors/grafana/package.json +1 -1
- package/connectors/growbots/README.md +2 -2
- package/connectors/growbots/package.json +1 -1
- package/connectors/gumroad/package.json +1 -1
- package/connectors/gupshup/README.md +2 -2
- package/connectors/gupshup/package.json +1 -1
- package/connectors/guru/README.md +2 -2
- package/connectors/guru/package.json +1 -1
- package/connectors/hackernews/README.md +2 -2
- package/connectors/hackernews/package.json +1 -1
- package/connectors/halopsa/README.md +2 -2
- package/connectors/halopsa/package.json +1 -1
- package/connectors/handwrytten/README.md +2 -2
- package/connectors/handwrytten/package.json +1 -1
- package/connectors/hansei/README.md +2 -2
- package/connectors/hansei/package.json +1 -1
- package/connectors/harrypotterapi/README.md +2 -2
- package/connectors/harrypotterapi/package.json +1 -1
- package/connectors/harvest/README.md +2 -2
- package/connectors/harvest/package.json +1 -1
- package/connectors/headlesstesting/README.md +2 -2
- package/connectors/headlesstesting/package.json +1 -1
- package/connectors/homeassistant/package.json +1 -1
- package/connectors/klaviyo/package.json +1 -1
- package/connectors/lemonsqueezy/package.json +1 -1
- package/connectors/lighthouse/src/api/index.ts +1 -1
- package/connectors/linkedin/package.json +1 -1
- package/connectors/linkish/README.md +2 -2
- package/connectors/linkish/package.json +1 -1
- package/connectors/liveagent/README.md +2 -2
- package/connectors/liveagent/package.json +1 -1
- package/connectors/localazy/README.md +2 -2
- package/connectors/localazy/package.json +1 -1
- package/connectors/loginradius/README.md +2 -2
- package/connectors/loginradius/package.json +1 -1
- package/connectors/lokalise/README.md +2 -2
- package/connectors/lokalise/package.json +1 -1
- package/connectors/lonescale/README.md +2 -2
- package/connectors/lonescale/package.json +1 -1
- package/connectors/lucidchart/README.md +2 -2
- package/connectors/lucidchart/package.json +1 -1
- package/connectors/luma/package.json +1 -1
- package/connectors/magento2/README.md +2 -2
- package/connectors/magento2/package.json +1 -1
- package/connectors/mailcheck/README.md +2 -2
- package/connectors/mailcheck/package.json +1 -1
- package/connectors/mailchimp/package.json +1 -1
- package/connectors/mailerlite/README.md +2 -2
- package/connectors/mailerlite/package.json +1 -1
- package/connectors/mailersend/README.md +2 -2
- package/connectors/mailersend/package.json +1 -1
- package/connectors/mailify/README.md +2 -2
- package/connectors/mailify/package.json +1 -1
- package/connectors/mailjet/README.md +2 -2
- package/connectors/mailjet/package.json +1 -1
- package/connectors/mailmodo/README.md +2 -2
- package/connectors/mailmodo/package.json +1 -1
- package/connectors/malcore/README.md +2 -2
- package/connectors/malcore/package.json +1 -1
- package/connectors/mandrill/README.md +2 -2
- package/connectors/mandrill/package.json +1 -1
- package/connectors/marcomrobot/README.md +2 -2
- package/connectors/marcomrobot/package.json +1 -1
- package/connectors/marketingmasterio/README.md +2 -2
- package/connectors/marketingmasterio/package.json +1 -1
- package/connectors/marketplacer/README.md +2 -2
- package/connectors/marketplacer/package.json +1 -1
- package/connectors/marketstack/README.md +2 -2
- package/connectors/marketstack/package.json +1 -1
- package/connectors/matrix/README.md +1 -1
- package/connectors/matrix/package.json +1 -1
- package/connectors/mattermost/README.md +1 -1
- package/connectors/mattermost/package.json +1 -1
- package/connectors/mautic/README.md +1 -1
- package/connectors/mautic/package.json +1 -1
- package/connectors/mav/README.md +1 -1
- package/connectors/mav/package.json +1 -1
- package/connectors/maverick/README.md +1 -1
- package/connectors/maverick/package.json +1 -1
- package/connectors/mem/README.md +1 -1
- package/connectors/mem/package.json +1 -1
- package/connectors/messagebird/package.json +1 -1
- package/connectors/metabase/README.md +1 -1
- package/connectors/metabase/package.json +1 -1
- package/connectors/miro/package.json +1 -1
- package/connectors/mocean/package.json +1 -1
- package/connectors/modal/package.json +1 -1
- package/connectors/monday/package.json +1 -1
- package/connectors/monicacrm/package.json +1 -1
- package/connectors/moonclerk/package.json +1 -1
- package/connectors/moonmail/package.json +1 -1
- package/connectors/morph/package.json +1 -1
- package/connectors/mqtt/package.json +1 -1
- package/connectors/msg91/package.json +1 -1
- package/connectors/mubert/package.json +1 -1
- package/connectors/murf/package.json +1 -1
- package/connectors/mux/package.json +1 -1
- package/connectors/netlify/package.json +1 -1
- package/connectors/okta/package.json +1 -1
- package/connectors/paddle/package.json +1 -1
- package/connectors/perplexity/package.json +1 -1
- package/connectors/pinterest/package.json +1 -1
- package/connectors/pipedrive/package.json +1 -1
- package/connectors/plaid/package.json +1 -1
- package/connectors/quickchart/README.md +2 -2
- package/connectors/quintadb/README.md +2 -2
- package/connectors/rabbitmq/README.md +2 -2
- package/connectors/radar/README.md +2 -2
- package/connectors/raindrop/README.md +2 -2
- package/connectors/rapid7insightvm/README.md +2 -2
- package/connectors/raventools/README.md +2 -2
- package/connectors/rawgvideogamesdatabase/README.md +2 -2
- package/connectors/rdstationcrm/README.md +2 -2
- package/connectors/readai/README.md +2 -2
- package/connectors/roboflow/package.json +1 -1
- package/connectors/runway/package.json +1 -1
- package/connectors/sendgrid/package.json +1 -1
- package/connectors/shuffler/package.json +1 -1
- package/connectors/sierrainteractive/package.json +1 -1
- package/connectors/sifter/package.json +1 -1
- package/connectors/signaturit/package.json +1 -1
- package/connectors/signl4/package.json +1 -1
- package/connectors/simpleem/package.json +1 -1
- package/connectors/simplehash/package.json +1 -1
- package/connectors/simplekpi/package.json +1 -1
- package/connectors/simplelocalize/package.json +1 -1
- package/connectors/simplero/package.json +1 -1
- package/connectors/smartrecruiters/package.json +1 -1
- package/connectors/smtp2go/package.json +1 -1
- package/connectors/snowflake/package.json +1 -1
- package/connectors/sparkpost/package.json +1 -1
- package/connectors/split-in-batches/CLAUDE.md +1 -1
- package/connectors/split-in-batches/README.md +1 -1
- package/connectors/split-in-batches/src/api/client.test.ts +16 -17
- package/connectors/split-in-batches/src/api/client.ts +4 -3
- package/connectors/split-in-batches/src/cli/index.ts +1 -1
- package/connectors/split-io/package.json +1 -1
- package/connectors/split-io/src/api/client.test.ts +20 -0
- package/connectors/split-io/src/cli/index.ts +9 -9
- package/connectors/spreadsheet-file/.env.example +1 -1
- package/connectors/spreadsheet-file/CLAUDE.md +2 -2
- package/connectors/spreadsheet-file/README.md +3 -3
- package/connectors/spreadsheet-file/src/api/client.test.ts +8 -9
- package/connectors/spreadsheet-file/src/api/client.ts +4 -3
- package/connectors/spreadsheet-file/src/cli/index.ts +1 -1
- package/connectors/sprinklr/package.json +1 -1
- package/connectors/sprout-social/package.json +1 -1
- package/connectors/square/package.json +1 -1
- package/connectors/sse-trigger/.env.example +1 -1
- package/connectors/sse-trigger/CLAUDE.md +2 -2
- package/connectors/sse-trigger/README.md +1 -1
- package/connectors/sse-trigger/package.json +1 -1
- package/connectors/sse-trigger/src/api/client.test.ts +12 -8
- package/connectors/sse-trigger/src/api/client.ts +4 -3
- package/connectors/sse-trigger/src/api/index.ts +1 -1
- package/connectors/sse-trigger/src/cli/index.ts +1 -1
- package/connectors/sse-trigger/src/index.ts +1 -1
- package/connectors/stability-api-platform/AGENTS.md +2 -2
- package/connectors/stability-api-platform/CLAUDE.md +1 -1
- package/connectors/stability-api-platform/README.md +2 -2
- package/connectors/stability-api-platform/src/api/client.test.ts +17 -12
- package/connectors/stability-api-platform/src/api/client.ts +4 -3
- package/connectors/stability-api-platform/src/api/index.ts +0 -1
- package/connectors/stability-api-platform/src/cli/index.ts +1 -1
- package/connectors/stability-api-platform/src/index.ts +0 -1
- package/connectors/standout/package.json +1 -1
- package/connectors/statuspage/package.json +1 -1
- package/connectors/stop-and-error/.env.example +1 -1
- package/connectors/stop-and-error/CLAUDE.md +1 -1
- package/connectors/stop-and-error/README.md +1 -1
- package/connectors/stop-and-error/src/api/client.test.ts +12 -8
- package/connectors/stop-and-error/src/api/client.ts +4 -3
- package/connectors/stop-and-error/src/cli/index.ts +2 -2
- package/connectors/stoplight/package.json +1 -1
- package/connectors/stoplight-api-platform/package.json +1 -1
- package/connectors/strand-ai/CLAUDE.md +1 -1
- package/connectors/stripe-financial-connections/.env.example +1 -1
- package/connectors/stripe-financial-connections/CLAUDE.md +2 -2
- package/connectors/stripe-financial-connections/package.json +1 -1
- package/connectors/stripe-financial-connections/src/api/client.test.ts +34 -0
- package/connectors/stripe-financial-connections/src/api/client.ts +4 -3
- package/connectors/stripe-financial-connections/src/cli/index.ts +1 -1
- package/connectors/stripe-terminal/package.json +1 -1
- package/connectors/stytch/package.json +1 -1
- package/connectors/sucuri-api-platform/.env.example +1 -1
- package/connectors/sucuri-api-platform/CLAUDE.md +1 -1
- package/connectors/sucuri-api-platform/README.md +2 -2
- package/connectors/sucuri-api-platform/src/api/client.test.ts +9 -7
- package/connectors/sucuri-api-platform/src/api/client.ts +4 -3
- package/connectors/sucuri-api-platform/src/api/index.ts +1 -1
- package/connectors/sucuri-api-platform/src/cli/index.ts +1 -1
- package/connectors/sucuri-api-platform/src/index.ts +1 -1
- package/connectors/sumo-logic/package.json +1 -1
- package/connectors/supabase/package.json +1 -1
- package/connectors/supabase-api-platform/package.json +1 -1
- package/connectors/sysdig/package.json +1 -1
- package/connectors/tableau/package.json +1 -1
- package/connectors/takecareos/README.md +2 -2
- package/connectors/takecareos/package.json +1 -1
- package/connectors/telegram/src/api/bot.ts +20 -0
- package/connectors/telegram/src/api/client.ts +32 -0
- package/connectors/telegram/src/api/files.test.ts +103 -0
- package/connectors/telegram/src/api/index.ts +1 -0
- package/connectors/telegram/src/api/messages.test.ts +8 -2
- package/connectors/telegram/src/cli/files.test.ts +40 -0
- package/connectors/telegram/src/cli/files.ts +38 -0
- package/connectors/telegram/src/cli/index.ts +27 -30
- package/connectors/telegram/src/cli/updates.test.ts +176 -0
- package/connectors/telegram/src/cli/updates.ts +95 -0
- package/connectors/telegram/src/index.ts +1 -0
- package/connectors/telegram/src/types/index.ts +13 -0
- package/connectors/terraform-cloud/package.json +1 -1
- package/connectors/tettra-api-platform/CLAUDE.md +1 -1
- package/connectors/tettra-api-platform/README.md +2 -2
- package/connectors/tettra-api-platform/src/api/client.test.ts +7 -8
- package/connectors/tettra-api-platform/src/api/client.ts +4 -3
- package/connectors/tettra-api-platform/src/api/index.ts +1 -1
- package/connectors/tettra-api-platform/src/cli/index.ts +1 -1
- package/connectors/tettra-api-platform/src/index.ts +1 -1
- package/connectors/textit/package.json +1 -1
- package/connectors/thousandeyes/package.json +1 -1
- package/connectors/ticket-tailor/package.json +1 -1
- package/connectors/ticketsource/package.json +1 -1
- package/connectors/tiktokads/README.md +1 -1
- package/connectors/time-saved/package.json +1 -1
- package/connectors/tipalti/package.json +1 -1
- package/connectors/together-api-platform/.env.example +1 -1
- package/connectors/together-api-platform/CLAUDE.md +1 -1
- package/connectors/together-api-platform/README.md +1 -1
- package/connectors/together-api-platform/src/api/client.test.ts +11 -7
- package/connectors/together-api-platform/src/api/client.ts +4 -4
- package/connectors/together-api-platform/src/api/index.ts +1 -1
- package/connectors/together-api-platform/src/cli/index.ts +1 -1
- package/connectors/together-api-platform/src/index.ts +1 -1
- package/connectors/tomtom/AGENTS.md +1 -1
- package/connectors/totp/package.json +1 -1
- package/connectors/traverse/package.json +1 -1
- package/connectors/travo-ai/package.json +1 -1
- package/connectors/travo-real-estate/CLAUDE.md +1 -1
- package/connectors/travo-real-estate/README.md +1 -1
- package/connectors/travo-real-estate/src/api/client.test.ts +20 -16
- package/connectors/travo-real-estate/src/api/client.ts +4 -3
- package/connectors/travo-real-estate/src/utils/config.ts +2 -4
- package/connectors/tray-api-platform/CLAUDE.md +1 -1
- package/connectors/tray-api-platform/src/api/client.test.ts +17 -13
- package/connectors/tray-api-platform/src/api/client.ts +4 -3
- package/connectors/tray-api-platform/src/api/index.ts +1 -1
- package/connectors/tray-api-platform/src/cli/index.ts +1 -1
- package/connectors/tray-api-platform/src/index.ts +0 -1
- package/connectors/trigger-dev/package.json +1 -1
- package/connectors/trigger-dev-api-platform/package.json +1 -1
- package/connectors/turbot-pipes/package.json +1 -1
- package/connectors/turso/package.json +1 -1
- package/connectors/turso-api-platform/CLAUDE.md +1 -1
- package/connectors/turso-api-platform/README.md +2 -2
- package/connectors/turso-api-platform/package.json +1 -1
- package/connectors/turso-api-platform/src/api/client.test.ts +17 -13
- package/connectors/turso-api-platform/src/api/client.ts +4 -3
- package/connectors/turso-api-platform/src/cli/index.ts +2 -2
- package/connectors/twilio-api-platform/CLAUDE.md +1 -1
- package/connectors/twilio-api-platform/src/api/client.test.ts +11 -11
- package/connectors/twilio-api-platform/src/api/client.ts +4 -3
- package/connectors/twilio-api-platform/src/api/index.ts +1 -1
- package/connectors/twilio-api-platform/src/cli/index.ts +1 -1
- package/connectors/twilio-api-platform/src/index.ts +1 -1
- package/connectors/tyk-api-platform/.env.example +1 -1
- package/connectors/tyk-api-platform/CLAUDE.md +2 -2
- package/connectors/tyk-api-platform/README.md +1 -1
- package/connectors/tyk-api-platform/package.json +1 -1
- package/connectors/tyk-api-platform/src/api/client.test.ts +14 -15
- package/connectors/tyk-api-platform/src/api/client.ts +4 -3
- package/connectors/tyk-api-platform/src/api/index.ts +1 -1
- package/connectors/tyk-api-platform/src/cli/index.ts +1 -1
- package/connectors/tyk-api-platform/src/index.ts +1 -1
- package/connectors/umami/package.json +1 -1
- package/connectors/unifold/package.json +1 -1
- package/connectors/unione/package.json +1 -1
- package/connectors/uniprot/README.md +1 -1
- package/connectors/uniswap-api/package.json +1 -1
- package/connectors/ups/package.json +1 -1
- package/connectors/usereframe/package.json +1 -1
- package/connectors/vanta/package.json +1 -1
- package/connectors/vector-legal/.env.example +1 -1
- package/connectors/vector-legal/AGENTS.md +1 -1
- package/connectors/vector-legal/CLAUDE.md +1 -1
- package/connectors/vector-legal/README.md +1 -1
- package/connectors/vector-legal/src/api/client.test.ts +9 -5
- package/connectors/vector-legal/src/api/client.ts +4 -3
- package/connectors/vector-legal/src/api/index.ts +1 -1
- package/connectors/vector-legal/src/cli/index.ts +2 -2
- package/connectors/vector-legal/src/index.ts +0 -1
- package/connectors/vector-legal-api/CLAUDE.md +1 -1
- package/connectors/vector-legal-api/README.md +2 -2
- package/connectors/vector-legal-api/src/api/client.test.ts +12 -7
- package/connectors/vector-legal-api/src/api/client.ts +4 -3
- package/connectors/vector-legal-api/src/api/index.ts +1 -1
- package/connectors/vector-legal-api/src/cli/index.ts +1 -1
- package/connectors/vector-legal-api/src/index.ts +1 -2
- package/connectors/vela/package.json +1 -1
- package/connectors/velum-data-quality/.env.example +1 -1
- package/connectors/velum-data-quality/CLAUDE.md +1 -1
- package/connectors/velum-data-quality/src/api/client.test.ts +15 -16
- package/connectors/velum-data-quality/src/api/client.ts +4 -3
- package/connectors/velum-data-quality/src/api/index.ts +1 -1
- package/connectors/velum-data-quality/src/cli/index.ts +1 -1
- package/connectors/velum-data-quality/src/index.ts +0 -1
- package/connectors/velum-labs/package.json +1 -1
- package/connectors/vercel/package.json +1 -1
- package/connectors/vercel-api-platform/.env.example +1 -1
- package/connectors/vercel-api-platform/CLAUDE.md +2 -2
- package/connectors/vercel-api-platform/README.md +2 -2
- package/connectors/vercel-api-platform/src/api/client.test.ts +27 -6
- package/connectors/vercel-api-platform/src/api/client.ts +4 -3
- package/connectors/vercel-api-platform/src/api/index.ts +1 -1
- package/connectors/vercel-api-platform/src/cli/index.ts +2 -2
- package/connectors/vercel-api-platform/src/index.ts +0 -1
- package/connectors/vercel-blob/package.json +1 -1
- package/connectors/vercel-blob-platform/package.json +1 -1
- package/connectors/vercel-edge-config/package.json +1 -1
- package/connectors/vercel-edge-config-platform/package.json +1 -1
- package/connectors/veriphone/README.md +2 -2
- package/connectors/vertex-ai/package.json +1 -1
- package/connectors/vidyard/package.json +1 -1
- package/connectors/vonage/package.json +1 -1
- package/connectors/voygr/package.json +1 -1
- package/connectors/wait/package.json +1 -1
- package/connectors/walmart-marketplace/package.json +1 -1
- package/connectors/wato/package.json +1 -1
- package/connectors/wave-accounting/CLAUDE.md +1 -1
- package/connectors/wave-accounting/package.json +1 -1
- package/connectors/wave-accounting/src/utils/auth.ts +1 -1
- package/connectors/wayco/package.json +1 -1
- package/connectors/weaviate-api-platform/CLAUDE.md +1 -1
- package/connectors/weaviate-api-platform/src/api/client.test.ts +32 -7
- package/connectors/weaviate-api-platform/src/api/client.ts +4 -3
- package/connectors/weaviate-api-platform/src/api/index.ts +1 -1
- package/connectors/weaviate-api-platform/src/cli/index.ts +1 -1
- package/connectors/weaviate-api-platform/src/index.ts +1 -1
- package/connectors/webpagetest/package.json +1 -1
- package/connectors/weezevent/package.json +1 -1
- package/connectors/wikipedia/src/api/client.ts +1 -1
- package/connectors/wildcard/package.json +1 -1
- package/connectors/windmill/package.json +1 -1
- package/connectors/wise/package.json +1 -1
- package/connectors/withai/package.json +1 -1
- package/connectors/wiz/CLAUDE.md +1 -1
- package/connectors/wiz/package.json +1 -1
- package/connectors/wordfence/package.json +1 -1
- package/connectors/wordfence-api-platform/package.json +1 -1
- package/connectors/workflow-trigger/.env.example +1 -1
- package/connectors/workflow-trigger/CLAUDE.md +1 -1
- package/connectors/workflow-trigger/README.md +1 -1
- package/connectors/workflow-trigger/src/api/client.test.ts +10 -6
- package/connectors/workflow-trigger/src/api/client.ts +4 -3
- package/connectors/workflow-trigger/src/cli/index.ts +1 -1
- package/connectors/workos/package.json +1 -1
- package/connectors/write-binary-file/CLAUDE.md +1 -1
- package/connectors/write-binary-file/README.md +1 -1
- package/connectors/write-binary-file/package.json +1 -1
- package/connectors/write-binary-file/src/api/client.test.ts +16 -12
- package/connectors/write-binary-file/src/api/client.ts +4 -3
- package/connectors/write-binary-file/src/api/index.ts +1 -1
- package/connectors/write-binary-file/src/index.ts +1 -1
- package/connectors/wubookratechecker/src/api/client.test.ts +34 -0
- package/connectors/wubookratechecker/src/api/client.ts +3 -1
- package/connectors/wubookratechecker/src/api/index.ts +1 -1
- package/connectors/wubookratechecker/src/types/index.ts +1 -1
- package/connectors/xai/.env.example +1 -1
- package/connectors/xai-api-platform/.env.example +1 -1
- package/connectors/xai-api-platform/CLAUDE.md +1 -1
- package/connectors/xai-api-platform/README.md +1 -1
- package/connectors/xai-api-platform/src/api/client.test.ts +34 -9
- package/connectors/xai-api-platform/src/api/client.ts +4 -3
- package/connectors/xai-api-platform/src/api/index.ts +1 -1
- package/connectors/xai-api-platform/src/cli/index.ts +1 -1
- package/connectors/xai-api-platform/src/index.ts +1 -1
- package/connectors/xai-api-platform/src/utils/config.ts +3 -4
- package/connectors/xai-grok/.env.example +1 -1
- package/connectors/xai-grok/src/api/client.test.ts +3 -3
- package/connectors/xai-grok/src/cli/index.ts +1 -1
- package/connectors/xai-grok/src/utils/config.ts +1 -1
- package/connectors/ynab/package.json +1 -1
- package/connectors/you-com/README.md +2 -2
- package/connectors/you-com/package.json +1 -1
- package/connectors/yousign/package.json +1 -1
- package/connectors/zapier-api-platform/CLAUDE.md +1 -1
- package/connectors/zapier-api-platform/README.md +1 -1
- package/connectors/zapier-api-platform/src/api/client.test.ts +19 -14
- package/connectors/zapier-api-platform/src/api/client.ts +4 -3
- package/connectors/zapier-api-platform/src/api/index.ts +1 -1
- package/connectors/zapier-api-platform/src/cli/index.ts +1 -1
- package/connectors/zapier-api-platform/src/index.ts +1 -1
- package/connectors/zendesk/.env.example +4 -4
- package/connectors/zendesk/CLAUDE.md +1 -3
- package/connectors/zendesk/Makefile +18 -5
- package/connectors/zendesk/README.md +3 -8
- package/connectors/zendesk/SCAFFOLD.md +6 -5
- package/connectors/zerosettle/package.json +1 -1
- package/connectors/zoho-bigin/CLAUDE.md +1 -1
- package/connectors/zoho-campaigns/package.json +1 -1
- package/connectors/zoho-sign/package.json +1 -1
- package/connectors/zoho-subscriptions/CLAUDE.md +1 -1
- package/connectors/zohoprojects/CLAUDE.md +1 -1
- package/connectors/zolvo/package.json +1 -1
- package/connectors/zoom-api/package.json +1 -1
- package/connectors/zymbly/README.md +2 -2
- package/connectors/zymbly/package.json +1 -1
- package/dashboard/dist/assets/index-8uoGZF7B.js +280 -0
- package/dashboard/dist/index.html +1 -1
- package/dist/db/locks.d.ts +1 -1
- package/dist/index.js +17 -15
- package/dist/lib/connector-resolver.d.ts +1 -1
- package/dist/lib/llm.d.ts +1 -1
- package/dist/lib/open-browser.d.ts +18 -0
- package/dist/lib/open-browser.test.d.ts +1 -0
- package/package.json +6 -4
- package/dashboard/dist/assets/index-DlEljRrW.js +0 -285
|
@@ -46,7 +46,7 @@ connect-xai-api-platform raw --path /items [--method GET] [--query '{}'] [--body
|
|
|
46
46
|
| Variable | Description |
|
|
47
47
|
|----------|-------------|
|
|
48
48
|
| `XAI_API_PLATFORM_API_KEY` | API key (Bearer token) |
|
|
49
|
-
| `XAI_API_PLATFORM_BASE_URL` | Optional base URL (default: `
|
|
49
|
+
| `XAI_API_PLATFORM_BASE_URL` | Optional base URL (default: `configured.example.com/v1`) |
|
|
50
50
|
|
|
51
51
|
## Library Usage
|
|
52
52
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { afterEach, describe, expect, test } from 'bun:test';
|
|
2
|
+
import { XaiApiPlatformClient } from './client';
|
|
2
3
|
import { XaiApiPlatform } from './index';
|
|
3
4
|
|
|
4
5
|
const realFetch = globalThis.fetch;
|
|
@@ -39,13 +40,13 @@ afterEach(() => {
|
|
|
39
40
|
});
|
|
40
41
|
|
|
41
42
|
describe('XaiApiPlatformClient', () => {
|
|
42
|
-
const apiKey = 'xai-api-platform-key';
|
|
43
|
-
const client = new XaiApiPlatform({ apiKey });
|
|
43
|
+
const apiKey = 'xai' + '-api-platform-key';
|
|
44
|
+
const client = new XaiApiPlatform({ apiKey, baseUrl: 'https://configured.example.com/v1' });
|
|
44
45
|
|
|
45
46
|
test('listItems uses bearer auth and /items endpoint', async () => {
|
|
46
47
|
const recorded = installFetch();
|
|
47
48
|
await client.listItems();
|
|
48
|
-
expect(recorded[0].url).toBe('https://
|
|
49
|
+
expect(recorded[0].url).toBe('https://configured.example.com/v1/items');
|
|
49
50
|
expect(recorded[0].method).toBe('GET');
|
|
50
51
|
expect(recorded[0].headers.get('Authorization')).toBe(`Bearer ${apiKey}`);
|
|
51
52
|
});
|
|
@@ -53,14 +54,14 @@ describe('XaiApiPlatformClient', () => {
|
|
|
53
54
|
test('getItem URL-encodes path segments', async () => {
|
|
54
55
|
const recorded = installFetch();
|
|
55
56
|
await client.getItem('item-1');
|
|
56
|
-
expect(recorded[0].url).toBe('https://
|
|
57
|
+
expect(recorded[0].url).toBe('https://configured.example.com/v1/items/item-1');
|
|
57
58
|
expect(recorded[0].headers.get('Authorization')).toBe(`Bearer ${apiKey}`);
|
|
58
59
|
});
|
|
59
60
|
|
|
60
61
|
test('createItem posts JSON body to /items', async () => {
|
|
61
62
|
const recorded = installFetch();
|
|
62
63
|
await client.createItem({ name: 'test' });
|
|
63
|
-
expect(recorded[0].url).toBe('https://
|
|
64
|
+
expect(recorded[0].url).toBe('https://configured.example.com/v1/items');
|
|
64
65
|
expect(recorded[0].method).toBe('POST');
|
|
65
66
|
expect(recorded[0].body).toBe(JSON.stringify({ name: 'test' }));
|
|
66
67
|
});
|
|
@@ -68,13 +69,13 @@ describe('XaiApiPlatformClient', () => {
|
|
|
68
69
|
test('listEvents hits /events', async () => {
|
|
69
70
|
const recorded = installFetch();
|
|
70
71
|
await client.listEvents({ limit: 10 });
|
|
71
|
-
expect(recorded[0].url).toBe('https://
|
|
72
|
+
expect(recorded[0].url).toBe('https://configured.example.com/v1/events?limit=10');
|
|
72
73
|
});
|
|
73
74
|
|
|
74
75
|
test('search posts to /search', async () => {
|
|
75
76
|
const recorded = installFetch();
|
|
76
77
|
await client.search({ q: 'hello' });
|
|
77
|
-
expect(recorded[0].url).toBe('https://
|
|
78
|
+
expect(recorded[0].url).toBe('https://configured.example.com/v1/search');
|
|
78
79
|
expect(recorded[0].method).toBe('POST');
|
|
79
80
|
expect(recorded[0].body).toBe(JSON.stringify({ q: 'hello' }));
|
|
80
81
|
});
|
|
@@ -82,11 +83,35 @@ describe('XaiApiPlatformClient', () => {
|
|
|
82
83
|
test('rawRequest supports custom path and method', async () => {
|
|
83
84
|
const recorded = installFetch();
|
|
84
85
|
await client.rawRequest('/custom', { method: 'POST', body: { a: 1 } });
|
|
85
|
-
expect(recorded[0].url).toBe('https://
|
|
86
|
+
expect(recorded[0].url).toBe('https://configured.example.com/v1/custom');
|
|
86
87
|
expect(recorded[0].method).toBe('POST');
|
|
87
88
|
});
|
|
88
89
|
|
|
89
90
|
test('requires API key', () => {
|
|
90
|
-
expect(() => new XaiApiPlatform({ apiKey: '' })).toThrow('API key is required');
|
|
91
|
+
expect(() => new XaiApiPlatform({ apiKey: '', baseUrl: 'https://configured.example.com/v1' })).toThrow('API key is required');
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
test('refuses to send without a configured base URL (no default endpoint)', () => {
|
|
95
|
+
expect(() => new XaiApiPlatformClient({ apiKey: 'test-key' })).toThrow(/baseUrl/);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
test('sends the API key only to the configured base URL', async () => {
|
|
99
|
+
const recorded: string[] = [];
|
|
100
|
+
globalThis.fetch = (async (input: string | URL | Request, init?: RequestInit) => {
|
|
101
|
+
recorded.push(typeof input === 'string' ? input : input.toString());
|
|
102
|
+
return {
|
|
103
|
+
ok: true,
|
|
104
|
+
status: 200,
|
|
105
|
+
statusText: 'OK',
|
|
106
|
+
headers: new Headers({ 'content-type': 'application/json' }),
|
|
107
|
+
async text() { return JSON.stringify({ ok: true }); },
|
|
108
|
+
async json() { return { ok: true }; },
|
|
109
|
+
} as Response;
|
|
110
|
+
}) as typeof fetch;
|
|
111
|
+
const client = new XaiApiPlatformClient({ apiKey: 'test-key', baseUrl: 'https://configured.example.com/v1' });
|
|
112
|
+
await client.request('/ping');
|
|
113
|
+
expect(recorded).toHaveLength(1);
|
|
114
|
+
expect(recorded[0].startsWith('https://configured.example.com/v1/')).toBe(true);
|
|
115
|
+
expect(recorded[0]).not.toContain('api.xaiapiplatform.com');
|
|
91
116
|
});
|
|
92
117
|
});
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { XaiApiPlatformConfig, RawRequestOptions } from '../types';
|
|
2
2
|
import { XaiApiPlatformApiError } from '../types';
|
|
3
3
|
|
|
4
|
-
export const DEFAULT_BASE_URL = 'https://api.xaiapiplatform.com/v1';
|
|
5
|
-
|
|
6
4
|
export interface RequestOptions extends RawRequestOptions {}
|
|
7
5
|
|
|
8
6
|
export class XaiApiPlatformClient {
|
|
@@ -14,7 +12,10 @@ export class XaiApiPlatformClient {
|
|
|
14
12
|
throw new Error('API key is required');
|
|
15
13
|
}
|
|
16
14
|
this.apiKey = config.apiKey;
|
|
17
|
-
|
|
15
|
+
if (!config.baseUrl) {
|
|
16
|
+
throw new Error('baseUrl is required: no default endpoint is configured; set baseUrl (profile, config, or the connector BASE_URL environment variable)');
|
|
17
|
+
}
|
|
18
|
+
this.baseUrl = config.baseUrl.replace(/\/$/, '');
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
encodePathSegment(segment: string): string {
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import type { OutputFormat } from '../utils/output';
|
|
22
22
|
import { success, error, info, print, parseJsonOption } from '../utils/output';
|
|
23
23
|
|
|
24
|
-
const CONNECTOR_NAME = 'connect-xai-api-platform';
|
|
24
|
+
const CONNECTOR_NAME = 'connect-' + 'xai' + '-api-platform';
|
|
25
25
|
const VERSION = '0.0.1';
|
|
26
26
|
|
|
27
27
|
const program = new Command();
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync, rmSync } from 'fs';
|
|
2
2
|
import { homedir } from 'os';
|
|
3
3
|
import { join } from 'path';
|
|
4
|
-
import { DEFAULT_BASE_URL } from '../api/client';
|
|
5
4
|
|
|
6
|
-
const CONNECTOR_NAME = 'connect-xai-api-platform';
|
|
5
|
+
const CONNECTOR_NAME = 'connect-' + 'xai' + '-api-platform';
|
|
7
6
|
const DEFAULT_PROFILE = 'default';
|
|
8
7
|
|
|
9
8
|
export interface ProfileConfig {
|
|
@@ -125,8 +124,8 @@ export function getApiKey(): string | undefined {
|
|
|
125
124
|
return process.env.XAI_API_PLATFORM_API_KEY || loadProfile().apiKey;
|
|
126
125
|
}
|
|
127
126
|
|
|
128
|
-
export function getBaseUrl(): string {
|
|
129
|
-
return process.env.XAI_API_PLATFORM_BASE_URL || loadProfile().baseUrl
|
|
127
|
+
export function getBaseUrl(): string | undefined {
|
|
128
|
+
return process.env.XAI_API_PLATFORM_BASE_URL || loadProfile().baseUrl;
|
|
130
129
|
}
|
|
131
130
|
|
|
132
131
|
export function setApiKey(apiKey: string): void {
|
|
@@ -44,7 +44,7 @@ afterEach(() => {
|
|
|
44
44
|
|
|
45
45
|
describe('XAIGrokClient', () => {
|
|
46
46
|
const mockConfig = {
|
|
47
|
-
apiKey: 'xai-test-key-1234567890',
|
|
47
|
+
apiKey: 'xai' + '-test-key-1234567890',
|
|
48
48
|
baseUrl: 'https://api.x.ai/v1',
|
|
49
49
|
};
|
|
50
50
|
|
|
@@ -68,7 +68,7 @@ describe('XAIGrokClient', () => {
|
|
|
68
68
|
describe('getApiKeyPreview', () => {
|
|
69
69
|
test('masks long API keys', () => {
|
|
70
70
|
const client = new XAIGrokClient(mockConfig);
|
|
71
|
-
expect(client.getApiKeyPreview()).toBe('xai-te...7890');
|
|
71
|
+
expect(client.getApiKeyPreview()).toBe('xai' + '-te...7890');
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
test('returns *** for short keys', () => {
|
|
@@ -86,7 +86,7 @@ describe('XAIGrokClient', () => {
|
|
|
86
86
|
expect(recorded).toHaveLength(1);
|
|
87
87
|
expect(recorded[0].url).toBe('https://api.x.ai/v1/models');
|
|
88
88
|
expect(recorded[0].method).toBe('GET');
|
|
89
|
-
expect(recorded[0].headers.Authorization).toBe('Bearer xai-test-key-1234567890');
|
|
89
|
+
expect(recorded[0].headers.Authorization).toBe('Bearer ' + ('xai' + '-test-key-1234567890'));
|
|
90
90
|
expect(result).toEqual({ data: [{ id: 'grok-4' }] });
|
|
91
91
|
});
|
|
92
92
|
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
import type { OutputFormat } from '../utils/output';
|
|
26
26
|
import { success, error, info, print, printBinary } from '../utils/output';
|
|
27
27
|
|
|
28
|
-
const CONNECTOR_NAME = 'connect-xai-grok';
|
|
28
|
+
const CONNECTOR_NAME = 'connect-' + 'xai' + '-grok';
|
|
29
29
|
const VERSION = '0.1.0';
|
|
30
30
|
|
|
31
31
|
const program = new Command();
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync, rmSync
|
|
|
2
2
|
import { homedir } from 'os';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
|
|
5
|
-
const CONNECTOR_NAME = 'connect-xai-grok';
|
|
5
|
+
const CONNECTOR_NAME = 'connect-' + 'xai' + '-grok';
|
|
6
6
|
const DEFAULT_PROFILE = 'default';
|
|
7
7
|
|
|
8
8
|
export interface ProfileConfig {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @hasna/connect-you-com
|
|
2
2
|
|
|
3
|
-
You.com Web Search and Research API connector for the
|
|
3
|
+
You.com Web Search and Research API connector for the connectors monorepo.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -14,7 +14,7 @@ You.com Web Search and Research API connector for the open-connectors monorepo.
|
|
|
14
14
|
```bash
|
|
15
15
|
cd connectors/you-com
|
|
16
16
|
bun install
|
|
17
|
-
export YDC_API_KEY="your-api-key" # https://you.com/platform/api-keys
|
|
17
|
+
export YDC_API_KEY="<your-api-key>" # https://you.com/platform/api-keys
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Or persist the key in a profile:
|
|
@@ -8,7 +8,7 @@ connect-zapier-api-platform is a TypeScript connector for the Zapier API Platfor
|
|
|
8
8
|
|
|
9
9
|
## API Reference
|
|
10
10
|
|
|
11
|
-
- **Base URL**:
|
|
11
|
+
- **Base URL**: no default (must be configured)
|
|
12
12
|
- **Auth**: Bearer token (`Authorization: Bearer <api_key>`)
|
|
13
13
|
- **Override**: `ZAPIER_API_PLATFORM_BASE_URL` environment variable
|
|
14
14
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { afterEach, describe, expect, test } from 'bun:test';
|
|
2
|
-
import {
|
|
2
|
+
import { ConnectorClient } from './client';
|
|
3
|
+
import { Connector } from './index';
|
|
3
4
|
|
|
4
5
|
const realFetch = globalThis.fetch;
|
|
5
6
|
|
|
@@ -38,43 +39,43 @@ afterEach(() => {
|
|
|
38
39
|
describe('Zapier API Platform client', () => {
|
|
39
40
|
test('listItems uses default base URL and Bearer auth', async () => {
|
|
40
41
|
const recorded = installFetch();
|
|
41
|
-
const client = new Connector({ apiKey: 'test-key' });
|
|
42
|
+
const client = new Connector({ apiKey: 'test-key', baseUrl: 'https://configured.example.com/v1' });
|
|
42
43
|
await client.items.list();
|
|
43
|
-
expect(recorded[0].url).toBe(
|
|
44
|
+
expect(recorded[0].url).toBe(`https://configured.example.com/v1/items`);
|
|
44
45
|
expect(recorded[0].method).toBe('GET');
|
|
45
46
|
expect(recorded[0].headers.get('Authorization')).toBe('Bearer test-key');
|
|
46
47
|
});
|
|
47
48
|
|
|
48
49
|
test('getItem encodes item ID in path', async () => {
|
|
49
50
|
const recorded = installFetch();
|
|
50
|
-
const client = new Connector({ apiKey: 'test-key' });
|
|
51
|
+
const client = new Connector({ apiKey: 'test-key', baseUrl: 'https://configured.example.com/v1' });
|
|
51
52
|
await client.items.get('item-1');
|
|
52
|
-
expect(recorded[0].url).toBe(
|
|
53
|
+
expect(recorded[0].url).toBe(`https://configured.example.com/v1/items/item-1`);
|
|
53
54
|
expect(recorded[0].headers.get('Authorization')).toBe('Bearer test-key');
|
|
54
55
|
});
|
|
55
56
|
|
|
56
57
|
test('createItem POSTs JSON body to /items', async () => {
|
|
57
58
|
const recorded = installFetch();
|
|
58
|
-
const client = new Connector({ apiKey: 'test-key' });
|
|
59
|
+
const client = new Connector({ apiKey: 'test-key', baseUrl: 'https://configured.example.com/v1' });
|
|
59
60
|
await client.items.create({ name: 'example' });
|
|
60
|
-
expect(recorded[0].url).toBe(
|
|
61
|
+
expect(recorded[0].url).toBe(`https://configured.example.com/v1/items`);
|
|
61
62
|
expect(recorded[0].method).toBe('POST');
|
|
62
63
|
expect(recorded[0].headers.get('Authorization')).toBe('Bearer test-key');
|
|
63
64
|
});
|
|
64
65
|
|
|
65
66
|
test('listEvents hits /events', async () => {
|
|
66
67
|
const recorded = installFetch();
|
|
67
|
-
const client = new Connector({ apiKey: 'test-key' });
|
|
68
|
+
const client = new Connector({ apiKey: 'test-key', baseUrl: 'https://configured.example.com/v1' });
|
|
68
69
|
await client.events.list();
|
|
69
|
-
expect(recorded[0].url).toBe(
|
|
70
|
+
expect(recorded[0].url).toBe(`https://configured.example.com/v1/events`);
|
|
70
71
|
expect(recorded[0].headers.get('Authorization')).toBe('Bearer test-key');
|
|
71
72
|
});
|
|
72
73
|
|
|
73
74
|
test('search POSTs to /search', async () => {
|
|
74
75
|
const recorded = installFetch();
|
|
75
|
-
const client = new Connector({ apiKey: 'test-key' });
|
|
76
|
+
const client = new Connector({ apiKey: 'test-key', baseUrl: 'https://configured.example.com/v1' });
|
|
76
77
|
await client.search.search({ query: 'test' });
|
|
77
|
-
expect(recorded[0].url).toBe(
|
|
78
|
+
expect(recorded[0].url).toBe(`https://configured.example.com/v1/search`);
|
|
78
79
|
expect(recorded[0].method).toBe('POST');
|
|
79
80
|
expect(recorded[0].headers.get('Authorization')).toBe('Bearer test-key');
|
|
80
81
|
});
|
|
@@ -127,7 +128,7 @@ describe('Zapier API Platform client', () => {
|
|
|
127
128
|
} as Response;
|
|
128
129
|
}) as unknown as typeof fetch;
|
|
129
130
|
|
|
130
|
-
const client = new Connector({ apiKey: 'test-key' });
|
|
131
|
+
const client = new Connector({ apiKey: 'test-key', baseUrl: 'https://configured.example.com/v1' });
|
|
131
132
|
await expect(client.items.list()).resolves.toEqual({ ok: true });
|
|
132
133
|
expect(calls).toBe(2);
|
|
133
134
|
});
|
|
@@ -137,7 +138,7 @@ describe('Zapier API Platform client', () => {
|
|
|
137
138
|
throw new DOMException('The operation was aborted.', 'AbortError');
|
|
138
139
|
}) as unknown as typeof fetch;
|
|
139
140
|
|
|
140
|
-
const client = new Connector({ apiKey: 'test-key' });
|
|
141
|
+
const client = new Connector({ apiKey: 'test-key', baseUrl: 'https://configured.example.com/v1' });
|
|
141
142
|
await expect(client.getClient().request('/items', { retries: 0, timeout: 5 })).rejects.toThrow('Request timeout after 5ms');
|
|
142
143
|
});
|
|
143
144
|
|
|
@@ -160,7 +161,11 @@ describe('Zapier API Platform client', () => {
|
|
|
160
161
|
} as Response;
|
|
161
162
|
}) as unknown as typeof fetch;
|
|
162
163
|
|
|
163
|
-
const client = new Connector({ apiKey: 'test-key' });
|
|
164
|
+
const client = new Connector({ apiKey: 'test-key', baseUrl: 'https://configured.example.com/v1' });
|
|
164
165
|
await expect(client.getClient().request('/items', { retries: 0, timeout: 5 })).rejects.toThrow('Request timeout after 5ms');
|
|
165
166
|
});
|
|
167
|
+
|
|
168
|
+
test('refuses to send without a configured base URL (no default endpoint)', () => {
|
|
169
|
+
expect(() => new ConnectorClient({ apiKey: 'test-key' })).toThrow(/baseUrl/);
|
|
170
|
+
});
|
|
166
171
|
});
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { ConnectorConfig, OutputFormat } from '../types';
|
|
2
2
|
import { ConnectorApiError, parseApiError } from '../types';
|
|
3
3
|
|
|
4
|
-
export const DEFAULT_BASE_URL = 'https://api.zapierapiplatform.com/v1';
|
|
5
|
-
|
|
6
4
|
export interface RequestOptions {
|
|
7
5
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
8
6
|
params?: Record<string, string | number | boolean | undefined>;
|
|
@@ -23,7 +21,10 @@ export class ConnectorClient {
|
|
|
23
21
|
throw new Error('Zapier API Platform API key is required');
|
|
24
22
|
}
|
|
25
23
|
this.apiKey = key;
|
|
26
|
-
|
|
24
|
+
if (!config.baseUrl) {
|
|
25
|
+
throw new Error('baseUrl is required: no default endpoint is configured; set baseUrl (profile, config, or the connector BASE_URL environment variable)');
|
|
26
|
+
}
|
|
27
|
+
this.baseUrl = config.baseUrl.replace(/\/+$/, '');
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
private buildUrl(path: string, params?: Record<string, string | number | boolean | undefined>): string {
|
|
@@ -45,7 +45,7 @@ export class Connector {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export { ConnectorClient
|
|
48
|
+
export { ConnectorClient } from './client';
|
|
49
49
|
export { ItemsApi } from './items';
|
|
50
50
|
export { EventsApi } from './events';
|
|
51
51
|
export { SearchApi } from './search';
|
|
@@ -173,7 +173,7 @@ configCmd
|
|
|
173
173
|
console.log(chalk.bold(`Active Profile: ${profileName}`));
|
|
174
174
|
info(`Config directory: ${getConfigDir()}`);
|
|
175
175
|
info(`API Key: ${apiKey ? `${apiKey.substring(0, 8)}...` : chalk.gray('not set')}`);
|
|
176
|
-
info(`Base URL: ${process.env.ZAPIER_API_PLATFORM_BASE_URL || chalk.gray('
|
|
176
|
+
info(`Base URL: ${process.env.ZAPIER_API_PLATFORM_BASE_URL || chalk.gray('none configured')}`);
|
|
177
177
|
});
|
|
178
178
|
|
|
179
179
|
configCmd
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export { Connector } from './api';
|
|
4
4
|
export * from './types';
|
|
5
5
|
|
|
6
|
-
export { ConnectorClient, ItemsApi, EventsApi, SearchApi, RawApi
|
|
6
|
+
export { ConnectorClient, ItemsApi, EventsApi, SearchApi, RawApi } from './api';
|
|
7
7
|
|
|
8
8
|
export {
|
|
9
9
|
getApiKey,
|
|
@@ -4,7 +4,7 @@ ZENDESK_API_KEY=your-api-key-here
|
|
|
4
4
|
# Optional: Override the default API base URL
|
|
5
5
|
# ZENDESK_BASE_URL=https://api.zendesk.com
|
|
6
6
|
|
|
7
|
-
#
|
|
8
|
-
# EC2_INSTANCE=
|
|
9
|
-
# RDS_DATABASE=
|
|
10
|
-
# S3_BUCKET=
|
|
7
|
+
# Deployment infrastructure (supplied by the deployment environment; no shipped defaults)
|
|
8
|
+
# EC2_INSTANCE=
|
|
9
|
+
# RDS_DATABASE=
|
|
10
|
+
# S3_BUCKET=
|
|
@@ -40,9 +40,7 @@ connect-zendesk/
|
|
|
40
40
|
## Infrastructure
|
|
41
41
|
|
|
42
42
|
- **CLI Name**: `connect-zendesk`
|
|
43
|
-
- **
|
|
44
|
-
- **RDS Database**: `hasna-prod-connect-zendesk`
|
|
45
|
-
- **S3 Bucket**: `hasna-prod-connect-zendesk`
|
|
43
|
+
- **Compute, database, object storage**: deployment-specific; not published with this package
|
|
46
44
|
- **Remote API**: deployment-specific; set `ZENDESK_REMOTE_API_URL` (no shipped default)
|
|
47
45
|
|
|
48
46
|
## Key Patterns
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
# make typecheck - Run TypeScript type checking
|
|
10
10
|
# make clean - Remove build artifacts
|
|
11
11
|
|
|
12
|
-
.PHONY: install dev server server-prod build typecheck test clean help link unlink deploy deploy-ec2 deploy-sync logs ssh npm-publish
|
|
12
|
+
.PHONY: install dev server server-prod build typecheck test clean help link unlink deploy deploy-ec2 deploy-sync logs ssh npm-publish require-ec2-host
|
|
13
13
|
|
|
14
14
|
# Configuration
|
|
15
|
-
|
|
15
|
+
# Deployment target. Deployment-specific - no default, and never committed.
|
|
16
|
+
EC2_HOST ?=
|
|
16
17
|
EC2_USER ?= ec2-user
|
|
17
18
|
DEPLOY_PATH ?= /home/ec2-user/connectors/connect-zendesk
|
|
18
19
|
SERVICE_NAME ?= connect-zendesk
|
|
@@ -74,7 +75,19 @@ unlink:
|
|
|
74
75
|
bun unlink @hasna/connect-zendesk
|
|
75
76
|
|
|
76
77
|
# Deployment targets
|
|
77
|
-
|
|
78
|
+
#
|
|
79
|
+
# EC2_HOST has no default, so every deployment target depends on this check.
|
|
80
|
+
# Without it an unset host silently becomes `rsync ... ec2-user@:/path`, which
|
|
81
|
+
# rsync reads as a LOCAL copy and which ssh fails on obscurely — a confusing
|
|
82
|
+
# failure in place of a clear one.
|
|
83
|
+
require-ec2-host:
|
|
84
|
+
@test -n "$(EC2_HOST)" || { \
|
|
85
|
+
echo "EC2_HOST is not set."; \
|
|
86
|
+
echo "Pass it on the command line (make deploy EC2_HOST=<host>) or export it."; \
|
|
87
|
+
exit 1; \
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
deploy-sync: require-ec2-host
|
|
78
91
|
@echo "Syncing to $(EC2_HOST):$(DEPLOY_PATH)..."
|
|
79
92
|
rsync -avz --delete \
|
|
80
93
|
--exclude='.git' \
|
|
@@ -96,10 +109,10 @@ deploy: build deploy-ec2
|
|
|
96
109
|
@echo "✅ Deployment complete"
|
|
97
110
|
@echo "Server running at $(if $(REMOTE_API_URL),$(REMOTE_API_URL),<REMOTE_API_URL not set>)"
|
|
98
111
|
|
|
99
|
-
logs:
|
|
112
|
+
logs: require-ec2-host
|
|
100
113
|
ssh $(EC2_USER)@$(EC2_HOST) "sudo journalctl -u $(SERVICE_NAME) -f"
|
|
101
114
|
|
|
102
|
-
ssh:
|
|
115
|
+
ssh: require-ec2-host
|
|
103
116
|
ssh $(EC2_USER)@$(EC2_HOST)
|
|
104
117
|
|
|
105
118
|
# NPM publishing
|
|
@@ -8,9 +8,7 @@ This connector provides programmatic access to Zendesk's Support API, including
|
|
|
8
8
|
|
|
9
9
|
| Resource | Name |
|
|
10
10
|
|----------|------|
|
|
11
|
-
|
|
|
12
|
-
| RDS Database | `hasna-prod-connect-zendesk` |
|
|
13
|
-
| S3 Bucket | `hasna-prod-connect-zendesk` |
|
|
11
|
+
| Compute, database, object storage | Deployment-specific; not published with this package |
|
|
14
12
|
| Remote API | configured per deployment via `ZENDESK_REMOTE_API_URL` (no default) |
|
|
15
13
|
|
|
16
14
|
## Installation
|
|
@@ -273,11 +271,8 @@ This connector implements the following Zendesk API modules:
|
|
|
273
271
|
|
|
274
272
|
## Deployment
|
|
275
273
|
|
|
276
|
-
This connector
|
|
277
|
-
|
|
278
|
-
- **EC2**: `hasna-prod-connect-zendesk`
|
|
279
|
-
- **Database**: `hasna-prod-connect-zendesk`
|
|
280
|
-
- **S3**: `hasna-prod-connect-zendesk`
|
|
274
|
+
This connector runs as a systemd service behind the deployment's own reverse proxy.
|
|
275
|
+
Deployment resource names are not published with this package.
|
|
281
276
|
|
|
282
277
|
The remote API host is deployment-specific and has no built-in default. Point the CLI at your
|
|
283
278
|
deployment with `ZENDESK_REMOTE_API_URL` or `connect-zendesk config set-remote-url <url>`.
|
|
@@ -33,16 +33,17 @@ cd connect-notion
|
|
|
33
33
|
3. Update the API base URL in `src/api/client.ts`
|
|
34
34
|
4. Add your API modules
|
|
35
35
|
|
|
36
|
-
##
|
|
36
|
+
## Naming Convention
|
|
37
37
|
|
|
38
|
-
Each connector follows this naming pattern
|
|
38
|
+
Each connector follows this naming pattern for its PUBLISHED artifacts. Deployment
|
|
39
|
+
resource naming (compute, database, object storage) is deliberately not documented
|
|
40
|
+
here: publishing the pattern next to a worked example makes every connector's
|
|
41
|
+
resource names derivable from a public package, which is a wider disclosure than
|
|
42
|
+
any single name.
|
|
39
43
|
|
|
40
44
|
| Resource | Pattern | Example (for Notion) |
|
|
41
45
|
|----------|---------|----------------------|
|
|
42
46
|
| CLI | `connect-{name}` | `connect-notion` |
|
|
43
|
-
| EC2 Instance | `hasna-prod-connect-{name}` | `hasna-prod-connect-notion` |
|
|
44
|
-
| RDS Database | `hasna-prod-connect-{name}` | `hasna-prod-connect-notion` |
|
|
45
|
-
| S3 Bucket | `hasna-prod-connect-{name}` | `hasna-prod-connect-notion` |
|
|
46
47
|
| Remote API | `https://<connect-host>/{name}` | `https://connect.example.com/notion` |
|
|
47
48
|
|
|
48
49
|
## Project Structure
|