@jskit-ai/connectors-catalog 0.1.1
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 +192 -0
- package/docs/ai-upstream-notices.md +51 -0
- package/docs/ai.md +191 -0
- package/docs/airtable.md +130 -0
- package/docs/algolia.md +190 -0
- package/docs/amazon-redshift.md +229 -0
- package/docs/amplitude.md +210 -0
- package/docs/apify.md +162 -0
- package/docs/apollo-io.md +200 -0
- package/docs/asana.md +126 -0
- package/docs/ashby.md +188 -0
- package/docs/atlassian.md +224 -0
- package/docs/attention.md +162 -0
- package/docs/aws-athena.md +150 -0
- package/docs/aws-credentials.md +75 -0
- package/docs/aws-s3.md +193 -0
- package/docs/bigquery.md +146 -0
- package/docs/brevo.md +122 -0
- package/docs/calendly.md +158 -0
- package/docs/canva.md +191 -0
- package/docs/chargebee.md +192 -0
- package/docs/clay.md +194 -0
- package/docs/clickhouse.md +242 -0
- package/docs/confidence-exp.md +74 -0
- package/docs/confidence-flags.md +75 -0
- package/docs/confidence-oauth.md +137 -0
- package/docs/contentful.md +123 -0
- package/docs/databricks.md +180 -0
- package/docs/dbt-semantic-layer.md +175 -0
- package/docs/elevenlabs.md +102 -0
- package/docs/figma.md +132 -0
- package/docs/firebase-cloud-messaging.md +262 -0
- package/docs/firecrawl.md +137 -0
- package/docs/fireflies.md +95 -0
- package/docs/fireworks-ai.md +53 -0
- package/docs/gatewayapi.md +113 -0
- package/docs/gemini-enterprise.md +224 -0
- package/docs/github-api.md +133 -0
- package/docs/gitlab-api.md +138 -0
- package/docs/gmail.md +133 -0
- package/docs/gong.md +205 -0
- package/docs/google-ads.md +156 -0
- package/docs/google-analytics.md +202 -0
- package/docs/google-docs.md +105 -0
- package/docs/google-drive.md +108 -0
- package/docs/google-maps-platform.md +208 -0
- package/docs/google-oauth.md +123 -0
- package/docs/google-search-console.md +124 -0
- package/docs/google-sheets.md +94 -0
- package/docs/google-slides.md +95 -0
- package/docs/granola.md +178 -0
- package/docs/hex.md +161 -0
- package/docs/heygen.md +124 -0
- package/docs/hubspot.md +142 -0
- package/docs/incident-io.md +118 -0
- package/docs/inngest.md +178 -0
- package/docs/klipy.md +149 -0
- package/docs/lexware.md +144 -0
- package/docs/lightspeed.md +193 -0
- package/docs/linear.md +137 -0
- package/docs/linkedin.md +196 -0
- package/docs/logo-dev.md +152 -0
- package/docs/mailgun.md +153 -0
- package/docs/mapbox.md +174 -0
- package/docs/microsoft-excel.md +97 -0
- package/docs/microsoft-fabric.md +249 -0
- package/docs/microsoft-oauth.md +143 -0
- package/docs/microsoft-onedrive.md +76 -0
- package/docs/microsoft-onenote.md +75 -0
- package/docs/microsoft-outlook.md +90 -0
- package/docs/microsoft-powerpoint.md +119 -0
- package/docs/microsoft-sharepoint.md +75 -0
- package/docs/microsoft-teams.md +72 -0
- package/docs/microsoft-word.md +119 -0
- package/docs/miro.md +117 -0
- package/docs/n8n.md +169 -0
- package/docs/notion.md +137 -0
- package/docs/oura.md +161 -0
- package/docs/paddle.md +168 -0
- package/docs/perplexity.md +85 -0
- package/docs/pipedrive.md +120 -0
- package/docs/polar.md +63 -0
- package/docs/posthog.md +227 -0
- package/docs/prestashop.md +151 -0
- package/docs/replicate.md +60 -0
- package/docs/resend.md +153 -0
- package/docs/salesforce.md +234 -0
- package/docs/sanity.md +122 -0
- package/docs/semrush.md +276 -0
- package/docs/sentry.md +112 -0
- package/docs/sevdesk.md +107 -0
- package/docs/shopify.md +206 -0
- package/docs/slack.md +257 -0
- package/docs/snowflake.md +271 -0
- package/docs/storyblok.md +130 -0
- package/docs/stripe.md +77 -0
- package/docs/supabase.md +51 -0
- package/docs/tally.md +105 -0
- package/docs/telegram.md +165 -0
- package/docs/tiktok.md +201 -0
- package/docs/twilio.md +284 -0
- package/docs/twitch.md +428 -0
- package/docs/wave.md +440 -0
- package/docs/wix.md +1249 -0
- package/docs/wiz.md +177 -0
- package/docs/woocommerce.md +400 -0
- package/docs/wordpress-com.md +358 -0
- package/docs/wordpress-self-hosted.md +252 -0
- package/docs/workday.md +292 -0
- package/docs/x-twitter.md +188 -0
- package/docs/xero.md +429 -0
- package/docs/zoho-books.md +214 -0
- package/docs/zoho-crm.md +192 -0
- package/package.json +153 -0
- package/patterns/ai-connections/PATTERN.md +84 -0
- package/patterns/ai-connections/example/ai-model.js +11 -0
- package/patterns/ai-connections/example/perplexity-answer.js +29 -0
- package/patterns/api-key-connection/PATTERN.md +368 -0
- package/patterns/api-key-connection/example/connections.js +18 -0
- package/patterns/api-key-connection/example/integrations.json +19 -0
- package/patterns/assistant-mcp/PATTERN.md +110 -0
- package/patterns/assistant-mcp/example/integrations.json +13 -0
- package/patterns/assistant-mcp-oauth/PATTERN.md +235 -0
- package/patterns/assistant-mcp-oauth/example/integrations.json +102 -0
- package/patterns/aws-storage-queries/PATTERN.md +169 -0
- package/patterns/aws-storage-queries/example/formats/data-formats.js +35 -0
- package/patterns/aws-storage-queries/example/formats/package-lock.json +49 -0
- package/patterns/aws-storage-queries/example/formats/package.json +12 -0
- package/patterns/aws-storage-queries/example/formats/verify-formats.mjs +37 -0
- package/patterns/aws-storage-queries/example/integrations.json +38 -0
- package/patterns/aws-storage-queries/example/s3-transfer.js +34 -0
- package/patterns/event-delivery/PATTERN.md +151 -0
- package/patterns/event-delivery/example/integrations.json +17 -0
- package/patterns/firebase-messaging/PATTERN.md +156 -0
- package/patterns/firebase-messaging/example/server/notifications.js +23 -0
- package/patterns/google-ads-search/PATTERN.md +92 -0
- package/patterns/google-ads-search/example/ads-setup.js +25 -0
- package/patterns/oauth-connection/PATTERN.md +724 -0
- package/patterns/oauth-connection/example/integrations.json +20 -0
- package/patterns/paddle-catalogue/PATTERN.md +78 -0
- package/patterns/paddle-catalogue/example/create-products.js +38 -0
- package/patterns/public-image/PATTERN.md +84 -0
- package/patterns/public-image/example/integrations.json +13 -0
- package/patterns/public-image/example/logo-url.js +16 -0
- package/patterns/redshift-queries/PATTERN.md +150 -0
- package/patterns/redshift-queries/example/integrations.json +33 -0
- package/patterns/source-scanning/PATTERN.md +83 -0
- package/patterns/source-scanning/example/source-scanner.js +13 -0
- package/src/client/firebase-cloud-messaging.js +10 -0
- package/src/client/google-analytics.js +72 -0
- package/src/client/google-maps-platform.js +39 -0
- package/src/client/logo-dev.js +36 -0
- package/src/server/ai.js +46 -0
- package/src/server/airtable.js +67 -0
- package/src/server/algolia.js +63 -0
- package/src/server/amazon-redshift.js +96 -0
- package/src/server/amplitude.js +31 -0
- package/src/server/apify.js +68 -0
- package/src/server/apollo-io.js +85 -0
- package/src/server/asana.js +64 -0
- package/src/server/ashby.js +61 -0
- package/src/server/atlassian.js +32 -0
- package/src/server/attention.js +93 -0
- package/src/server/aws-athena.js +82 -0
- package/src/server/aws-s3.js +49 -0
- package/src/server/awsTransport.js +75 -0
- package/src/server/bigquery.js +97 -0
- package/src/server/brevo.js +97 -0
- package/src/server/calendly.js +77 -0
- package/src/server/canva.js +13 -0
- package/src/server/chargebee.js +88 -0
- package/src/server/clay.js +78 -0
- package/src/server/clickhouse.js +66 -0
- package/src/server/confidence.js +29 -0
- package/src/server/contentful.js +40 -0
- package/src/server/databricks.js +55 -0
- package/src/server/dbt-semantic-layer.js +95 -0
- package/src/server/elevenlabs.js +81 -0
- package/src/server/figma.js +24 -0
- package/src/server/firebase-cloud-messaging.js +111 -0
- package/src/server/firecrawl.js +70 -0
- package/src/server/fireflies.js +31 -0
- package/src/server/fireworks-ai.js +16 -0
- package/src/server/gatewayapi.js +48 -0
- package/src/server/gemini-enterprise.js +47 -0
- package/src/server/github-api.js +90 -0
- package/src/server/gitlab-api.js +67 -0
- package/src/server/gmail.js +60 -0
- package/src/server/gong.js +52 -0
- package/src/server/google-ads-search.js +134 -0
- package/src/server/google-ads.js +80 -0
- package/src/server/google-docs.js +36 -0
- package/src/server/google-drive.js +71 -0
- package/src/server/google-maps-platform.js +90 -0
- package/src/server/google-search-console.js +31 -0
- package/src/server/google-sheets.js +60 -0
- package/src/server/google-slides.js +36 -0
- package/src/server/google.js +61 -0
- package/src/server/granola.js +115 -0
- package/src/server/graphqlOperation.js +15 -0
- package/src/server/hex.js +29 -0
- package/src/server/heygen.js +54 -0
- package/src/server/hubspot.js +85 -0
- package/src/server/incident-io.js +68 -0
- package/src/server/inngest.js +86 -0
- package/src/server/jsonOperation.js +34 -0
- package/src/server/klipy.js +34 -0
- package/src/server/lexware.js +59 -0
- package/src/server/lightspeed.js +82 -0
- package/src/server/linear.js +52 -0
- package/src/server/linkedin.js +74 -0
- package/src/server/mailgun.js +76 -0
- package/src/server/mapbox.js +46 -0
- package/src/server/mcpRegistration.js +41 -0
- package/src/server/mcpTransport.js +60 -0
- package/src/server/microsoft-excel.js +67 -0
- package/src/server/microsoft-fabric.js +81 -0
- package/src/server/microsoft-onedrive.js +58 -0
- package/src/server/microsoft-onenote.js +52 -0
- package/src/server/microsoft-outlook.js +58 -0
- package/src/server/microsoft-powerpoint.js +5 -0
- package/src/server/microsoft-sharepoint.js +46 -0
- package/src/server/microsoft-teams.js +29 -0
- package/src/server/microsoft-word.js +5 -0
- package/src/server/microsoft.js +88 -0
- package/src/server/miro.js +29 -0
- package/src/server/n8n.js +78 -0
- package/src/server/notion.js +76 -0
- package/src/server/oura.js +48 -0
- package/src/server/paddle.js +83 -0
- package/src/server/perplexity.js +15 -0
- package/src/server/pipedrive.js +95 -0
- package/src/server/polar.js +20 -0
- package/src/server/posthog.js +44 -0
- package/src/server/prestashop.js +42 -0
- package/src/server/replicate.js +42 -0
- package/src/server/resend.js +93 -0
- package/src/server/salesforce.js +84 -0
- package/src/server/sanity.js +31 -0
- package/src/server/semrush.js +359 -0
- package/src/server/sentry.js +30 -0
- package/src/server/sevdesk.js +20 -0
- package/src/server/shopify.js +99 -0
- package/src/server/slack.js +143 -0
- package/src/server/snowflake.js +139 -0
- package/src/server/storyblok.js +49 -0
- package/src/server/stripe.js +13 -0
- package/src/server/supabase.js +13 -0
- package/src/server/tally.js +78 -0
- package/src/server/telegram.js +55 -0
- package/src/server/tiktok.js +86 -0
- package/src/server/twilio.js +90 -0
- package/src/server/twitch.js +409 -0
- package/src/server/wave.js +520 -0
- package/src/server/wix.js +1048 -0
- package/src/server/wiz.js +117 -0
- package/src/server/woocommerce.js +412 -0
- package/src/server/wordpress-com.js +236 -0
- package/src/server/wordpress-self-hosted.js +134 -0
- package/src/server/workday.js +136 -0
- package/src/server/x-twitter.js +110 -0
- package/src/server/xero.js +397 -0
- package/src/server/zoho-books.js +90 -0
- package/src/server/zoho-crm.js +89 -0
- package/src/server/zohoOAuth.js +21 -0
- package/src/shared/ai-models.json +8049 -0
- package/src/shared/ai.js +63 -0
- package/src/shared/algolia.js +29 -0
- package/src/shared/amazon-redshift.js +51 -0
- package/src/shared/amplitude.js +28 -0
- package/src/shared/atlassian.js +43 -0
- package/src/shared/aws.js +72 -0
- package/src/shared/canva.js +66 -0
- package/src/shared/chargebee.js +26 -0
- package/src/shared/clickhouse.js +38 -0
- package/src/shared/confidence.js +28 -0
- package/src/shared/databricks.js +33 -0
- package/src/shared/dbt-semantic-layer.js +32 -0
- package/src/shared/definitions.js +140 -0
- package/src/shared/figma.js +21 -0
- package/src/shared/firebase-cloud-messaging.js +45 -0
- package/src/shared/gemini-enterprise.js +33 -0
- package/src/shared/gong.js +33 -0
- package/src/shared/google-ads-search.js +31 -0
- package/src/shared/google-ads.js +28 -0
- package/src/shared/google-maps-platform.js +28 -0
- package/src/shared/google.js +133 -0
- package/src/shared/granola.js +25 -0
- package/src/shared/hex.js +28 -0
- package/src/shared/inngest.js +35 -0
- package/src/shared/lightspeed.js +75 -0
- package/src/shared/linkedin.js +27 -0
- package/src/shared/logo-dev.js +21 -0
- package/src/shared/mapbox.js +38 -0
- package/src/shared/mcp.js +92 -0
- package/src/shared/microsoft-fabric.js +47 -0
- package/src/shared/microsoft.js +231 -0
- package/src/shared/miro.js +27 -0
- package/src/shared/oura.js +23 -0
- package/src/shared/posthog.js +33 -0
- package/src/shared/prestashop.js +23 -0
- package/src/shared/salesforce.js +36 -0
- package/src/shared/semrush.js +24 -0
- package/src/shared/shopify.js +51 -0
- package/src/shared/siteUrl.js +12 -0
- package/src/shared/slack.js +88 -0
- package/src/shared/snowflake.js +55 -0
- package/src/shared/tiktok.js +22 -0
- package/src/shared/tokens.js +747 -0
- package/src/shared/twilio.js +41 -0
- package/src/shared/twitch.js +49 -0
- package/src/shared/wave.js +52 -0
- package/src/shared/wix.js +40 -0
- package/src/shared/wiz.js +41 -0
- package/src/shared/wordpress-com.js +30 -0
- package/src/shared/wordpress.js +69 -0
- package/src/shared/workday.js +50 -0
- package/src/shared/x-twitter.js +19 -0
- package/src/shared/xero.js +46 -0
- package/src/shared/zoho-books.js +39 -0
- package/src/shared/zoho-crm.js +43 -0
- package/src/shared/zoho-regions.js +12 -0
- package/test/ai.test.js +136 -0
- package/test/airtable.test.js +125 -0
- package/test/algolia.test.js +207 -0
- package/test/amazon-redshift.test.js +272 -0
- package/test/amplitude.test.js +239 -0
- package/test/apify.test.js +93 -0
- package/test/apollo-io.test.js +125 -0
- package/test/asana.test.js +99 -0
- package/test/ashby.test.js +97 -0
- package/test/atlassian.test.js +249 -0
- package/test/attention.test.js +79 -0
- package/test/aws.test.js +405 -0
- package/test/brevo.test.js +71 -0
- package/test/calendly.test.js +136 -0
- package/test/canva.test.js +258 -0
- package/test/chargebee.test.js +195 -0
- package/test/clickhouse.test.js +278 -0
- package/test/confidence.test.js +205 -0
- package/test/databricks.test.js +253 -0
- package/test/dbt-semantic-layer.test.js +221 -0
- package/test/designMcp.test.js +336 -0
- package/test/elevenlabs.test.js +52 -0
- package/test/firebase-cloud-messaging.test.js +242 -0
- package/test/firecrawl.test.js +66 -0
- package/test/gemini-enterprise.test.js +218 -0
- package/test/github-api.test.js +167 -0
- package/test/gitlab-api.test.js +160 -0
- package/test/gong.test.js +192 -0
- package/test/google-ads.test.js +350 -0
- package/test/google-maps-platform.test.js +191 -0
- package/test/google.test.js +710 -0
- package/test/granola.test.js +240 -0
- package/test/hex.test.js +253 -0
- package/test/heygen.test.js +121 -0
- package/test/hubspot.test.js +103 -0
- package/test/inngest.test.js +219 -0
- package/test/lightspeed.test.js +250 -0
- package/test/linear.test.js +146 -0
- package/test/linkedin.test.js +243 -0
- package/test/logo-dev.test.js +79 -0
- package/test/mailgun.test.js +107 -0
- package/test/mapbox.test.js +181 -0
- package/test/mcp.test.js +227 -0
- package/test/microsoft-fabric.test.js +258 -0
- package/test/microsoft.test.js +554 -0
- package/test/n8nOAuth.test.js +188 -0
- package/test/notionOAuth.test.js +183 -0
- package/test/oura.test.js +211 -0
- package/test/paddleCatalogue.test.js +51 -0
- package/test/paddlePermissions.test.js +101 -0
- package/test/perplexityComposition.test.js +39 -0
- package/test/pipedriveOAuth.test.js +140 -0
- package/test/posthog.test.js +200 -0
- package/test/prestashop.test.js +207 -0
- package/test/resend.test.js +163 -0
- package/test/salesforce.test.js +276 -0
- package/test/semrush.test.js +479 -0
- package/test/sentry.test.js +35 -0
- package/test/shopify.test.js +247 -0
- package/test/slack.test.js +320 -0
- package/test/snowflake.test.js +391 -0
- package/test/tally.test.js +75 -0
- package/test/telegram.test.js +58 -0
- package/test/tiktok.test.js +243 -0
- package/test/tokens.test.js +1079 -0
- package/test/twilio.test.js +221 -0
- package/test/twitch.test.js +573 -0
- package/test/wave.test.js +678 -0
- package/test/wix.test.js +1099 -0
- package/test/wiz.test.js +185 -0
- package/test/wordpress-com.test.js +469 -0
- package/test/wordpress.test.js +660 -0
- package/test/workday.test.js +314 -0
- package/test/x-twitter.test.js +256 -0
- package/test/xero.test.js +700 -0
- package/test/zoho-books.test.js +253 -0
- package/test/zoho-crm.test.js +223 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Chargebee
|
|
2
|
+
|
|
3
|
+
Import `chargebeeProvider` from `@jskit-ai/connectors-catalog/server/chargebee`.
|
|
4
|
+
This adapter manages customers and Product Catalog 2.0 subscriptions, reads catalogue
|
|
5
|
+
and invoice data, and creates provider-hosted checkout and customer portal sessions.
|
|
6
|
+
Payment details stay in Chargebee-hosted screens. It does not implement OAuth.
|
|
7
|
+
|
|
8
|
+
## Manual site and credential setup
|
|
9
|
+
|
|
10
|
+
1. Sign into the Chargebee site as its owner or an administrator. Select the
|
|
11
|
+
intended test or live environment. Copy the site name from its address:
|
|
12
|
+
for `https://acme-test.chargebee.com`, use `acme-test`.
|
|
13
|
+
2. Open **Settings → Configure Chargebee → API Keys and Events → API keys**.
|
|
14
|
+
Some documentation/views label the section **API Keys and Webhooks**.
|
|
15
|
+
3. Choose **+ Add API Key**. For reads, choose **Read-Only Key** with transactional
|
|
16
|
+
and product-catalog access, or **Read-only: All**. For customer/subscription
|
|
17
|
+
changes, checkout and portal sessions, choose **Full-Access Key**, subtype
|
|
18
|
+
**Write** (create/read/update, without deletion). Name it and choose
|
|
19
|
+
**Create Key**, then retain the issued key securely. A publishable key or
|
|
20
|
+
a key restricted to product-catalog reads is insufficient for this fragment.
|
|
21
|
+
4. Store the key under `CHARGEBEE_API_KEY` in the backend environment. Enter
|
|
22
|
+
`env:CHARGEBEE_API_KEY` in Vibe64's API-key reference field and the site name
|
|
23
|
+
in **Site name**. Save the configuration, then choose **Set credential in Env**,
|
|
24
|
+
enter the issued key as `CHARGEBEE_API_KEY`, and save it. Return to the
|
|
25
|
+
integration and choose **Connect account** or **Verify again**. **Check connection**
|
|
26
|
+
only reads saved status. No OAuth callback is required.
|
|
27
|
+
|
|
28
|
+
Test and live sites use distinct keys. API keys apply to a site, rather than
|
|
29
|
+
being restricted to one business entity within it.
|
|
30
|
+
[Key types and creation](https://www.chargebee.com/docs/billing/2.0/site-configuration/api_keys).
|
|
31
|
+
|
|
32
|
+
## Portable configuration and runtime
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"schemaVersion": 1,
|
|
37
|
+
"registrations": {},
|
|
38
|
+
"integrations": {
|
|
39
|
+
"billing": {
|
|
40
|
+
"provider": "chargebee",
|
|
41
|
+
"displayName": "Customer directory",
|
|
42
|
+
"accountMode": "shared",
|
|
43
|
+
"scopes": [],
|
|
44
|
+
"authentication": {
|
|
45
|
+
"method": "api-key",
|
|
46
|
+
"secretRef": "env:CHARGEBEE_API_KEY"
|
|
47
|
+
},
|
|
48
|
+
"settings": { "siteName": "acme-test" }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The same shared schema validates CLI edits and the UI form. `siteName` accepts
|
|
55
|
+
one DNS label, 1–63 letters/digits/hyphens, with a letter or digit at each end.
|
|
56
|
+
The operation normalizes its host to lowercase. Full URLs, `.chargebee.com`,
|
|
57
|
+
paths, ports, spaces and embedded credentials are rejected. Changing the site
|
|
58
|
+
or credential reference requires a fresh runtime verification.
|
|
59
|
+
|
|
60
|
+
Use the [API-key composition pattern](../patterns/api-key-connection/PATTERN.md)
|
|
61
|
+
with `providers: [chargebeeProvider]`, environment-reference resolution and
|
|
62
|
+
the file connection store. Configuration and runtime state are text files; the
|
|
63
|
+
CLI application does not need an editor or a database. Authorize the requested
|
|
64
|
+
application/team context before access to the shared billing connection.
|
|
65
|
+
|
|
66
|
+
```js
|
|
67
|
+
await connections.connectApiKey({ context, integrationId: "billing" });
|
|
68
|
+
const page = await connections.invoke({
|
|
69
|
+
context, integrationId: "billing", operation: "customers.list",
|
|
70
|
+
input: { limit: 25, include_deleted: false }
|
|
71
|
+
});
|
|
72
|
+
// The application can request another page explicitly using page.next_offset.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Requests use HTTP Basic authentication with the API key as username and an
|
|
76
|
+
empty password. The runtime only sends credentials to the exact configured
|
|
77
|
+
`https://<site>.chargebee.com` origin and rejects redirects. Keys remain outside
|
|
78
|
+
the portable file and runtime connection records. Rotation updates the
|
|
79
|
+
environment binding; a provider rejection marks the connection for verification
|
|
80
|
+
again. Disconnect removes local state, not the site's provider key.
|
|
81
|
+
[Authentication example](https://www.chargebee.com/docs/billing/2.0/site-configuration/api_keys).
|
|
82
|
+
|
|
83
|
+
`customers.list` performs `GET /api/v2/customers`. It accepts `limit` from 1–100
|
|
84
|
+
(default 10), optional opaque `offset` up to 1000 characters and
|
|
85
|
+
`include_deleted` (default false). It returns the provider's `list` entries and
|
|
86
|
+
optional `next_offset`. Pass that cursor unchanged for the next page. Empty
|
|
87
|
+
lists are valid. Deleted customers are returned only when explicitly requested.
|
|
88
|
+
The provider describes this listing as eventually consistent.
|
|
89
|
+
[Customer listing](https://apidocs.chargebee.com/docs/api/customers/list-customers).
|
|
90
|
+
|
|
91
|
+
The fragment preserves customer data and any accompanying resource fields,
|
|
92
|
+
checks the response envelope, and does not automatically traverse pages.
|
|
93
|
+
The additional operations below supply customer-filtered billing reads and explicit
|
|
94
|
+
writes. Sorting and entity-specific access remain native application concerns. The application's policy must control who may read the customer
|
|
95
|
+
directory; knowing a Chargebee customer ID is not an authenticated login.
|
|
96
|
+
|
|
97
|
+
## Automation and application credentials
|
|
98
|
+
|
|
99
|
+
An AI can prepare the configuration, environment reference, JSKIT composition
|
|
100
|
+
and customer-reading code. The reviewed setup documentation describes key
|
|
101
|
+
creation through the dashboard; it does not establish a public self-service API
|
|
102
|
+
for creating operator accounts, sites or API keys. Treat initial provisioning
|
|
103
|
+
as an owner/admin step and do not invent a registration endpoint. A separate
|
|
104
|
+
partner arrangement may offer capabilities that are not covered here.
|
|
105
|
+
|
|
106
|
+
Create an application-specific key on the appropriate Chargebee site. This is
|
|
107
|
+
a credential, not an OAuth app registration. When connecting a customer's own billing
|
|
108
|
+
system, use its site and authorized key; an operator key cannot access every
|
|
109
|
+
customer's Chargebee account. No callback URL is required for this flow, so
|
|
110
|
+
editor VM and deployed application domains do not affect registration.
|
|
111
|
+
|
|
112
|
+
API rate and concurrency limits apply to the site. A second key on the same
|
|
113
|
+
site does not create an independent quota. Chargebee returns HTTP 429 when
|
|
114
|
+
limits are exceeded; its documentation describes plan-dependent site limits
|
|
115
|
+
and a support route for increases.
|
|
116
|
+
[Rate limits](https://apidocs.chargebee.com/docs/api/error-handling).
|
|
117
|
+
The application owns its credential selection and usage policy. Separate
|
|
118
|
+
provider capacity requires the appropriate site/account arrangement. A test
|
|
119
|
+
site is not additional production capacity.
|
|
120
|
+
|
|
121
|
+
## Focused evidence
|
|
122
|
+
|
|
123
|
+
Six tests use simulated Chargebee replies and real temporary encrypted JSON
|
|
124
|
+
files. They cover Basic authentication, file restart, rotation, ownership,
|
|
125
|
+
disconnect, unsafe site/credential rejection, site changes, cursors, deleted
|
|
126
|
+
records, page-size limits and failures. The editor check covers site validation,
|
|
127
|
+
reference-only storage and persistence after reload. Provider signup, live API
|
|
128
|
+
requests, billing changes and sample-app generation are excluded.
|
|
129
|
+
|
|
130
|
+
## Billing operations and recovery
|
|
131
|
+
|
|
132
|
+
| Operations | Result / boundary |
|
|
133
|
+
| --- | --- |
|
|
134
|
+
| `customers.list/get/create/update` | Customer directory and profile fields; never raw card details |
|
|
135
|
+
| `itemFamilies.list`, `items.list/get`, `itemPrices.list/get` | Product Catalog 2.0 products and configured prices |
|
|
136
|
+
| `subscriptions.list/get/create` | Customer-linked subscriptions; direct creation requires explicit auto_collection and invoice_immediately |
|
|
137
|
+
| `subscriptions.updateAtTermEnd` | Schedule selected item/quantity changes; explicit replace_items_list controls replacement |
|
|
138
|
+
| `subscriptions.cancelAtTermEnd` | Non-renewal at billing term end; does not immediately cancel service |
|
|
139
|
+
| `invoices.list/get/pdf` | Invoice/status/line-item data and an expiring PDF link |
|
|
140
|
+
| `hostedPages.checkoutNew/checkoutExisting/get` | Hosted new/changed subscription checkout, then authoritative completion details |
|
|
141
|
+
| `portalSessions.create` | Customer-authenticated hosted billing management session |
|
|
142
|
+
| `events.list/get` | Provider events for application-owned reconciliation |
|
|
143
|
+
|
|
144
|
+
Inputs use resource IDs as `resource`. New customer creation optionally accepts `id`.
|
|
145
|
+
List operations accept limit/offset; subscription and invoice lists accept
|
|
146
|
+
`customer_id[is]`, and invoices also accept `subscription_id[is]`. Preserve opaque
|
|
147
|
+
pagination offsets. Subscription item arrays contain `{ item_price_id, quantity }`;
|
|
148
|
+
the first item must be a plan price in hosted checkout. The adapter encodes Chargebee's
|
|
149
|
+
indexed form fields server-side. Product Catalog 1.0 requires native older endpoints.
|
|
150
|
+
|
|
151
|
+
Every supplied POST requires `idempotencyKey`, a unique application intent identifier
|
|
152
|
+
(up to 100 letters/digits/underscores/hyphens). Persist it with the exact intended
|
|
153
|
+
request before submitting. The provider's idempotency window is 30 minutes, and the
|
|
154
|
+
same key requires the same path, body and headers. The adapter never automatically
|
|
155
|
+
replays an uncertain request. After a timeout or beyond that window, reconcile the
|
|
156
|
+
customer/subscription/page/event before deciding whether a new request is appropriate.
|
|
157
|
+
Do not generate a fresh key for a blind retry. Provider errors remain errors; this
|
|
158
|
+
adapter does not expose the response's idempotency-replayed header.
|
|
159
|
+
|
|
160
|
+
Example flow for DogAndGroom: authenticate the customer in the app, resolve their
|
|
161
|
+
server-owned Chargebee customer ID, select a configured recurring item price, then
|
|
162
|
+
create hosted checkout with that customer and the app's allowlisted return/cancel URLs.
|
|
163
|
+
Keep the hosted page ID bound to that local customer. Send the returned URL to their
|
|
164
|
+
browser. After return, retrieve the stored page ID server-side, verify `succeeded`,
|
|
165
|
+
its customer/subscription association and actual invoice/subscription state. A query
|
|
166
|
+
string saying success and even a succeeded checkout do not independently prove that
|
|
167
|
+
an invoice is paid. Offline or deferred collection can leave payment due. The app
|
|
168
|
+
must decide access policy and reconcile later events. Never trust a browser-supplied
|
|
169
|
+
customer ID to issue a portal session: that URL grants billing-account access.
|
|
170
|
+
|
|
171
|
+
Use the same service.invoke operations in a standalone Node/CLI application;
|
|
172
|
+
Vibe64 only edits the portable configuration. Other frameworks use native Chargebee
|
|
173
|
+
SDK/HTTP with these Env bindings, indexed form fields and app-owned intent state.
|
|
174
|
+
No Node bridge or Vibe64 server is needed. The existing owner authorization callback
|
|
175
|
+
must approve customer, subscription, return destination and financial intent.
|
|
176
|
+
|
|
177
|
+
**LIMITATIONS:** Editor coding-assistant attachment is deferred. For example, an app
|
|
178
|
+
can launch customer checkout and show invoices, but Vibe64's Codex/OpenCode cannot
|
|
179
|
+
inspect the billing site through this saved connection. This is a connector, not the
|
|
180
|
+
Stripe/Paddle payments product: product authoring, entitlement/credit engines,
|
|
181
|
+
webhook receivers, immediate/prorated changes, refunds, contract-term cancellation,
|
|
182
|
+
advanced tax/coupon/metered billing and multi-entity controls use native app wiring.
|
|
183
|
+
Configure catalogue/prices, payment gateway and portal in Chargebee. No live billing,
|
|
184
|
+
provider signup or generated app was exercised. Creating keys does not isolate site quotas.
|
|
185
|
+
|
|
186
|
+
Sources checked 12 September 2026:
|
|
187
|
+
[idempotency](https://apidocs.chargebee.com/docs/api/idempotency),
|
|
188
|
+
[hosted checkout](https://apidocs.chargebee.com/docs/api/hosted_pages/create-checkout-for-a-new-subscription),
|
|
189
|
+
[subscription creation](https://apidocs.chargebee.com/docs/api/subscriptions/create-subscription-for-items),
|
|
190
|
+
[scheduled changes](https://apidocs.chargebee.com/docs/api/subscriptions/update-subscription-for-items),
|
|
191
|
+
[cancellation](https://apidocs.chargebee.com/docs/api/subscriptions/cancel-subscription-for-items),
|
|
192
|
+
[portal sessions](https://apidocs.chargebee.com/docs/api/portal_sessions/create-a-portal-session).
|
package/docs/clay.md
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# Clay Public API
|
|
2
|
+
|
|
3
|
+
Reviewed against Clay's API documentation on 12 September 2026. Import
|
|
4
|
+
`clayProvider` from `@jskit-ai/connectors-catalog/server/clay`. This adapter verifies user/workspace identity, searches people and companies,
|
|
5
|
+
runs enrichment routines, reads results and queries Enterprise tables. It uses a Public API key, not a legacy workspace key.
|
|
6
|
+
|
|
7
|
+
## Manual setup
|
|
8
|
+
|
|
9
|
+
1. Sign into the Clay account with access to the intended workspace. Open
|
|
10
|
+
**Settings → Account → API keys (beta)**, or follow the official guide's
|
|
11
|
+
[direct API-key settings link](https://app.clay.com/workspaces/~/settings/account?accountTab=api-keys-beta).
|
|
12
|
+
2. Create a Public API key. Copy the newly issued value
|
|
13
|
+
into the backend environment as `CLAY_PUBLIC_API_KEY`.
|
|
14
|
+
3. In Vibe64, open **Integrations → Add Clay**. Enter a display name and
|
|
15
|
+
`env:CLAY_PUBLIC_API_KEY` in **Public API key reference**. Choose shared
|
|
16
|
+
application access or assistant access for the intended owner, then save.
|
|
17
|
+
4. The host explicitly calls `connectApiKey`. Its `GET /public/v0/me` check
|
|
18
|
+
verifies both user and workspace identity without starting a search.
|
|
19
|
+
5. For rotation, create a replacement key, update the existing Env binding and
|
|
20
|
+
verify it before retiring the old key in Clay. Disconnecting the application
|
|
21
|
+
removes local connection state; it does not revoke the provider key.
|
|
22
|
+
|
|
23
|
+
The provider documents the account navigation and `clay-api-key` header in its
|
|
24
|
+
[authentication guide](https://developers.clay.com/public-api/authentication).
|
|
25
|
+
The [identity endpoint](https://developers.clay.com/api-reference/me/get-the-authenticated-user)
|
|
26
|
+
returns the account and workspace associated with that key. Their names may be
|
|
27
|
+
null; a successful check does not prove search capacity or access to every table.
|
|
28
|
+
These console instructions are documented, not verified through a live account.
|
|
29
|
+
The official guide establishes the destination and key type. Dialog labels may
|
|
30
|
+
change; use the Public API key creation action on that page, not the legacy
|
|
31
|
+
workspace-key flow. If this page is unavailable to your account, resolve Public
|
|
32
|
+
API access with Clay before configuring this connector.
|
|
33
|
+
|
|
34
|
+
## Portable source and CLI
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"schemaVersion": 1,
|
|
39
|
+
"registrations": {},
|
|
40
|
+
"integrations": {
|
|
41
|
+
"prospects": {
|
|
42
|
+
"provider": "clay",
|
|
43
|
+
"displayName": "Clay prospect search",
|
|
44
|
+
"accountMode": "shared",
|
|
45
|
+
"scopes": [],
|
|
46
|
+
"authentication": {
|
|
47
|
+
"method": "api-key",
|
|
48
|
+
"secretRef": "env:CLAY_PUBLIC_API_KEY"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Compose this file with `providers: [clayProvider]`, an authorization policy and
|
|
56
|
+
the encrypted file connection store as in the
|
|
57
|
+
[API-key pattern](../patterns/api-key-connection/PATTERN.md). A CLI uses these
|
|
58
|
+
same library methods. Vibe64 writes the same source file and supplies no separate
|
|
59
|
+
database requirement.
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
await connections.connectApiKey({ context, integrationId: "prospects" });
|
|
63
|
+
const search = await connections.invoke({
|
|
64
|
+
context, integrationId: "prospects", operation: "searches.create",
|
|
65
|
+
input: { query: approvedQuery }, signal
|
|
66
|
+
});
|
|
67
|
+
// Bind this returned ID to the authenticated connection in application state.
|
|
68
|
+
const page = await connections.invoke({
|
|
69
|
+
context, integrationId: "prospects", operation: "searches.next",
|
|
70
|
+
input: { searchId: search.search_id, limit: 20 }, signal
|
|
71
|
+
});
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`approvedQuery` must follow Clay's current grammar and the application's policy.
|
|
75
|
+
Clay publishes that grammar through authenticated
|
|
76
|
+
`GET https://api.clay.com/public/v0/search/query-mode/reference`; retrieve it
|
|
77
|
+
with the same private header before authoring queries. Use `searches.reference` to retrieve the current grammar. The query endpoint supports people
|
|
78
|
+
and companies, excluding count queries and jobs.
|
|
79
|
+
[Query guidance](https://developers.clay.com/searches/advanced),
|
|
80
|
+
[search creation](https://developers.clay.com/api-reference/search/create-a-search-from-a-clay-search-query).
|
|
81
|
+
|
|
82
|
+
`searches.next` calls `POST /public/v0/search/query-mode/{search_id}/run`.
|
|
83
|
+
The default limit is 20, with provider bounds of 1–500. Responses preserve
|
|
84
|
+
`data`, `source_type`, `has_more`, and available exhaustion/quota metadata.
|
|
85
|
+
Each call advances the provider's iterator; the adapter never fetches another
|
|
86
|
+
page automatically. An interrupted request may already have advanced it.
|
|
87
|
+
Authorize the exact search ID and volume, retain the ID under its connection,
|
|
88
|
+
and request another page deliberately. Do not replay it as an ordinary GET.
|
|
89
|
+
[Iterator contract](https://developers.clay.com/api-reference/search/run-the-query-mode-iterator-and-return-the-next-page-of-results).
|
|
90
|
+
|
|
91
|
+
Local validation caps query text at 16,000 characters and search IDs at 1,024
|
|
92
|
+
ASCII letters, digits, underscores or hyphens. It does not reimplement Clay's
|
|
93
|
+
query grammar. API keys stay in the header on the fixed `api.clay.com` origin;
|
|
94
|
+
returned links and input values cannot select another credential destination.
|
|
95
|
+
|
|
96
|
+
## Application credentials and automation
|
|
97
|
+
|
|
98
|
+
This API-key flow has **no OAuth callback**, so there is no universal callback
|
|
99
|
+
URL to register for Clay. VM addresses and custom application domains do not
|
|
100
|
+
change its authentication.
|
|
101
|
+
|
|
102
|
+
The application owner supplies its authorized Clay key through private Env.
|
|
103
|
+
Two keys alone do not establish separate quota or billing pools; confirm the
|
|
104
|
+
provider's capacity terms. The application must not silently substitute an
|
|
105
|
+
unrelated Clay workspace for the customer's. See the
|
|
106
|
+
[application setup contract](../../connectors-core/docs/online-setup.md).
|
|
107
|
+
|
|
108
|
+
AI can generate the portable file, environment wiring, query operations and
|
|
109
|
+
tests. The documentation reviewed exposes key creation through the console,
|
|
110
|
+
not a verified public provisioning API. Account access, key issuance and any
|
|
111
|
+
required provider plan approval remain operator actions. A bootstrap script
|
|
112
|
+
must not pretend those actions have been automated.
|
|
113
|
+
|
|
114
|
+
## Routines and table queries
|
|
115
|
+
|
|
116
|
+
For custom functions, open [Functions](https://app.clay.com/functions), create or
|
|
117
|
+
select a function, open **Details**, enable **API**, and copy its `t_...` function
|
|
118
|
+
ID. Prefix it with `function:`. Supply the exact inputs defined by that function.
|
|
119
|
+
For Clay-managed routines, use the published routine ID and input contract from
|
|
120
|
+
[Clay-managed functions](https://developers.clay.com/routines/clay-managed-functions).
|
|
121
|
+
There is no public routine-discovery operation in this adapter.
|
|
122
|
+
|
|
123
|
+
```js
|
|
124
|
+
const run = await connections.invoke({
|
|
125
|
+
context, integrationId: "prospects", operation: "routines.run",
|
|
126
|
+
input: { routineId: "function:t_example", items: [
|
|
127
|
+
{ id: "row-1", inputs: { domain: "example.com" } }
|
|
128
|
+
] }, signal
|
|
129
|
+
});
|
|
130
|
+
// Persist run.routine_run_id under this connection. Later, explicitly poll:
|
|
131
|
+
const progress = await connections.invoke({
|
|
132
|
+
context, integrationId: "prospects", operation: "routines.results",
|
|
133
|
+
input: { routineId: run.routine_run_id, limit: 20 }, signal
|
|
134
|
+
});
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The results operation's `routineId` is the **run ID returned by the start request**,
|
|
138
|
+
not the function ID. Starts accept 1–100 items with caller-owned IDs (1–64 chars)
|
|
139
|
+
and an optional existing `webhook_id`. The adapter does not register webhooks.
|
|
140
|
+
An `in_progress` response is not success for the enrichment; preserve status,
|
|
141
|
+
progress, each item's output/error and any cursor. Run completion does not mean
|
|
142
|
+
all items succeeded. No automatic polling, pagination or replay is performed.
|
|
143
|
+
Authorize exact inputs, routine and volume; runs can consume credits. The optional
|
|
144
|
+
`credits.balance` read reports current balance, not a price quote or reservation.
|
|
145
|
+
After an uncertain start, investigate in Clay before repeating it: no idempotency
|
|
146
|
+
guarantee is claimed. [Routine API](https://developers.clay.com/routines/api),
|
|
147
|
+
[function exposure](https://developers.clay.com/routines/custom-functions).
|
|
148
|
+
|
|
149
|
+
`tables.query` requires **Enterprise** and known table IDs. Open the target Clay
|
|
150
|
+
table and copy the ID after `/tables/` in its URL. No public list-tables endpoint
|
|
151
|
+
exists. For example:
|
|
152
|
+
|
|
153
|
+
```js
|
|
154
|
+
await connections.invoke({ context, integrationId: "prospects", operation: "tables.query",
|
|
155
|
+
input: { query: { tables: [{ id: "t_example" }], field_mode: "names",
|
|
156
|
+
select: [{ field: "Domain", as: "domain" }],
|
|
157
|
+
filter: { field: "Domain", op: "is_not_empty" }
|
|
158
|
+
}, limit: 20 }, signal });
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
The adapter validates the query envelope, known top-level fields, table IDs,
|
|
162
|
+
collection bounds and a limit of 1–100. Clay validates its provider-owned nested
|
|
163
|
+
filter/select/join/order grammar; the adapter does not translate SQL or invent
|
|
164
|
+
fields. Use [Clay's table query guide](https://developers.clay.com/tables)
|
|
165
|
+
for exact field and filter syntax. Returned data, field metadata, cursor and
|
|
166
|
+
`truncated` are preserved. Scans can repeat records updated during pagination:
|
|
167
|
+
deduplicate by record ID. Grouping/aggregation/custom ordering cannot always
|
|
168
|
+
produce cursors; `truncated: true` without a cursor requires narrowing the query,
|
|
169
|
+
not treating that response as the full dataset.
|
|
170
|
+
|
|
171
|
+
Current query-mode handles search criteria; legacy filters-mode is deprecated
|
|
172
|
+
and is intentionally absent. Native frameworks can use these same fixed Public
|
|
173
|
+
API endpoints with `clay-api-key` from private Env and their own HTTP client;
|
|
174
|
+
JSKIT and Vibe64 are not required for execution.
|
|
175
|
+
|
|
176
|
+
## Focused proof and limitations
|
|
177
|
+
|
|
178
|
+
Controlled HTTP tests with real temporary file state cover verification, restart,
|
|
179
|
+
rotation, ownership, search paging, routine start/progress/item errors, table
|
|
180
|
+
queries/truncation, invalid input, denied writes, billing/rate/provider failures,
|
|
181
|
+
and interrupted iterators without replay. The rendered editor check covers the
|
|
182
|
+
Public API key label, raw-secret rejection, reference persistence, function API
|
|
183
|
+
enablement, Enterprise prerequisite and local-disconnect explanation.
|
|
184
|
+
No live provider calls or generated applications are part of this proof.
|
|
185
|
+
|
|
186
|
+
**LIMITATIONS:** Automatic Vibe64 coding-assistant attachment is deferred. For
|
|
187
|
+
example, saving Clay here does not let you ask the Vibe64 chat to enrich leads;
|
|
188
|
+
the generated app or explicitly wired assistant host can invoke these operations.
|
|
189
|
+
Clay's workflow/function authoring UI, large JSONL batch uploads, webhook
|
|
190
|
+
provisioning/verification and automatic key issuance remain provider/native app
|
|
191
|
+
work. For example, create and enable a custom function in Clay first; this adapter
|
|
192
|
+
can run it but cannot build it from a canvas. HTTP 402 is a sanitized provider
|
|
193
|
+
failure, never a successful empty search. Key-dialog instructions follow official
|
|
194
|
+
docs; no signed-in console or paid-plan capability was verified.
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# ClickHouse
|
|
2
|
+
|
|
3
|
+
Import `clickhouseProvider` from `@jskit-ai/connectors-catalog/server/clickhouse`.
|
|
4
|
+
This fragment verifies an HTTPS database endpoint, discovers tables and columns,
|
|
5
|
+
and reads bounded pages. The application owns access to this shared database.
|
|
6
|
+
A database connection does not sign users into the application.
|
|
7
|
+
|
|
8
|
+
## Manual setup
|
|
9
|
+
|
|
10
|
+
1. In ClickHouse Cloud, select your organization and service, then choose
|
|
11
|
+
**Connect → HTTPS**. Copy the host and port from its connection example.
|
|
12
|
+
Put the full `https://host:port` address in **HTTP Interface URL**. For a
|
|
13
|
+
self-hosted server, obtain its HTTPS query endpoint from its administrator;
|
|
14
|
+
a reverse-proxy path is supported. Native TCP connection strings do not work.
|
|
15
|
+
[Connection details](https://clickhouse.com/docs/products/cloud/guides/sql-console/connection-details).
|
|
16
|
+
2. Open the service's **SQL Console**, create a query using **+**, and have a
|
|
17
|
+
database administrator create a dedicated application user and grant SELECT
|
|
18
|
+
only on the intended tables. Use SQL `CREATE USER` and `GRANT SELECT`, with a
|
|
19
|
+
private password supplied through your administration process. Cloud console
|
|
20
|
+
accounts and database users are separate. Do not place a Cloud management
|
|
21
|
+
API key in this integration's password field.
|
|
22
|
+
[SQL Console](https://clickhouse.com/docs/products/cloud/features/sql-console-features/sql-console),
|
|
23
|
+
[database users and permissions](https://clickhouse.com/docs/concepts/features/security/access-rights).
|
|
24
|
+
3. Select **Settings → Security → IP access list → Add IPs** for the service.
|
|
25
|
+
Choose access from specific locations, add the application backend's source
|
|
26
|
+
IP/CIDR and save. Include an administrator's authorized access path when
|
|
27
|
+
needed. Requests originate from the server running this adapter; the
|
|
28
|
+
application's browser domain is not the source IP.
|
|
29
|
+
[IP filters](https://clickhouse.com/docs/products/cloud/guides/security/connectivity/setting-ip-filters).
|
|
30
|
+
4. Select **Username and password** in the integration form. Enter the database
|
|
31
|
+
username. Enter `env:CLICKHOUSE_PASSWORD` in **Password reference
|
|
32
|
+
(optional)**, then save configuration. Choose **Set credential in Env**, paste
|
|
33
|
+
the password as `CLICKHOUSE_PASSWORD`, and save it there. CLI users set the
|
|
34
|
+
same variable in their backend environment. The form stores a reference, not the
|
|
35
|
+
password. The backend resolves it when verifying and reading.
|
|
36
|
+
5. Verify using `connectApiKey` as shown below, then exercise the particular
|
|
37
|
+
table operation your application needs. A successful `SELECT 1` proves
|
|
38
|
+
endpoint access, not permission to read every table.
|
|
39
|
+
|
|
40
|
+
The database administrator must allow the adapter's fixed query settings:
|
|
41
|
+
`max_execution_time=10`, `max_result_rows=100`, `max_result_bytes=5242880`, and
|
|
42
|
+
`result_overflow_mode=throw`. A user profile that forbids these settings will
|
|
43
|
+
reject the request; the adapter does not retry without bounds. Configure
|
|
44
|
+
compatible settings constraints for a user with `readonly=1`.
|
|
45
|
+
[Query permissions](https://clickhouse.com/docs/concepts/features/configuration/settings/permissions-for-queries).
|
|
46
|
+
|
|
47
|
+
## Credential choices
|
|
48
|
+
|
|
49
|
+
| Configuration | HTTP behavior |
|
|
50
|
+
|---|---|
|
|
51
|
+
| `api-key`, username and password reference | Basic authentication with that database user and resolved password |
|
|
52
|
+
| `api-key`, username omitted | Basic authentication as `default` |
|
|
53
|
+
| `api-key`, password reference omitted | Basic authentication with an empty password |
|
|
54
|
+
| `api-key`, reference resolves to an empty string | An explicitly configured empty password |
|
|
55
|
+
| `api-key`, reference missing or invalid | Local binding error; no database request |
|
|
56
|
+
| `none` | No Authorization header and no credential resolution |
|
|
57
|
+
|
|
58
|
+
Use **No credentials** only for an endpoint intentionally configured to permit
|
|
59
|
+
that access. ClickHouse otherwise uses its default user and an empty password;
|
|
60
|
+
the database's permissions still apply. Switching modes clears the username and
|
|
61
|
+
password reference that no longer apply. Both modes require verification and
|
|
62
|
+
the application's ordinary authorization policy.
|
|
63
|
+
[HTTP authentication](https://clickhouse.com/docs/concepts/features/interfaces/http#authentication).
|
|
64
|
+
|
|
65
|
+
## Portable configuration and CLI wiring
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"schemaVersion": 1,
|
|
70
|
+
"registrations": {},
|
|
71
|
+
"integrations": {
|
|
72
|
+
"warehouse": {
|
|
73
|
+
"provider": "clickhouse",
|
|
74
|
+
"displayName": "Reporting database",
|
|
75
|
+
"accountMode": "shared",
|
|
76
|
+
"scopes": [],
|
|
77
|
+
"authentication": {
|
|
78
|
+
"method": "api-key",
|
|
79
|
+
"secretRef": "env:CLICKHOUSE_PASSWORD"
|
|
80
|
+
},
|
|
81
|
+
"settings": {
|
|
82
|
+
"httpUrl": "https://warehouse.example:8443/",
|
|
83
|
+
"username": "report_reader"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Compose the [API-key source pattern](../patterns/api-key-connection/PATTERN.md)
|
|
91
|
+
with `providers: [clickhouseProvider]`. Use `createFileConnectionStore` for
|
|
92
|
+
encrypted JSON runtime state outside source. The CLI and editor use the same
|
|
93
|
+
parser, fields and runtime; no application generator or local SQL store is
|
|
94
|
+
needed. Supply authenticated application context and its authorization policy.
|
|
95
|
+
|
|
96
|
+
```js
|
|
97
|
+
await connections.connectApiKey({ context, integrationId: "warehouse" });
|
|
98
|
+
const tables = await connections.invoke({
|
|
99
|
+
context, integrationId: "warehouse", operation: "tables.list",
|
|
100
|
+
input: { database: "reports", limit: 20 }
|
|
101
|
+
});
|
|
102
|
+
const columns = await connections.invoke({
|
|
103
|
+
context, integrationId: "warehouse", operation: "columns.list",
|
|
104
|
+
input: { database: "reports", table: "orders" }
|
|
105
|
+
});
|
|
106
|
+
const rows = await connections.invoke({
|
|
107
|
+
context, integrationId: "warehouse", operation: "rows.list",
|
|
108
|
+
input: { database: "reports", table: "orders", orderBy: "id", limit: 25, offset: 0 }
|
|
109
|
+
});
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
For no credentials, replace authentication with `{ "method": "none" }`, remove
|
|
113
|
+
`settings.username`, and use `connectWithoutCredentials` instead of
|
|
114
|
+
`connectApiKey`. The remaining configuration and invocation APIs are identical.
|
|
115
|
+
An existing grant cannot survive a change of mode, endpoint, username or
|
|
116
|
+
password reference without verification. Rotating the environment value takes
|
|
117
|
+
effect on the next call. Disconnect removes local state; revoke the database
|
|
118
|
+
user or change its password separately when appropriate.
|
|
119
|
+
|
|
120
|
+
## Operations and result handling
|
|
121
|
+
|
|
122
|
+
| Operation | Inputs | Result |
|
|
123
|
+
|---|---|---|
|
|
124
|
+
| `connection.check` | None | `SELECT 1 AS ok, currentUser() AS user` |
|
|
125
|
+
| `tables.list` | Optional database; limit, offset | Database, table name and engine from `system.tables` |
|
|
126
|
+
| `columns.list` | Database and table; limit, offset | Column type, position and default metadata from `system.columns` |
|
|
127
|
+
| `rows.list` | Database and table; optional orderBy; limit, offset | One page of table rows |
|
|
128
|
+
| `queries.read` | SELECT/WITH SQL and optional named string parameters | Bounded analytical result with column metadata/statistics |
|
|
129
|
+
|
|
130
|
+
Names are nonempty strings of up to 256 characters without control characters.
|
|
131
|
+
Table/database names and the optional ascending sort column use ClickHouse
|
|
132
|
+
typed parameters, including `Identifier`; they are never inserted into SQL
|
|
133
|
+
text. Quotes, dots and backslashes remain parameter values. `orderBy` denotes
|
|
134
|
+
one column name, not an expression. The discovery operations use fixed SELECT queries. `queries.read` accepts an
|
|
135
|
+
application-approved SELECT/WITH query; endpoint and HTTP setting overrides are
|
|
136
|
+
not accepted as operation inputs.
|
|
137
|
+
[Typed parameters](https://clickhouse.com/docs/reference/syntax#defining-and-using-query-parameters).
|
|
138
|
+
|
|
139
|
+
For analytical queries, use a backend-owned template and typed placeholders:
|
|
140
|
+
|
|
141
|
+
```js
|
|
142
|
+
await connections.invoke({ context, integrationId: "warehouse", operation: "queries.read",
|
|
143
|
+
input: { sql: "SELECT toStartOfMonth(booked_at) AS month, count() AS bookings FROM {db:Identifier}.{table:Identifier} WHERE tenant = {tenant:String} GROUP BY month ORDER BY month LIMIT 100",
|
|
144
|
+
parameters: { db: "reports", table: "bookings", tenant: authorizedTenantId }
|
|
145
|
+
} });
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The operation accepts one SELECT/WITH query, up to 16,000 characters, without a
|
|
149
|
+
semicolon or trailing FORMAT clause (the adapter appends FORMAT JSON). Up to 100
|
|
150
|
+
parameters use identifier names and string values up to 16,000 characters, without
|
|
151
|
+
control characters. Encode numeric/date values as strings for their declared
|
|
152
|
+
ClickHouse types. Parameter values stay separate from SQL; they cannot override
|
|
153
|
+
HTTP settings. Arrays/complex values require ClickHouse's typed literal syntax.
|
|
154
|
+
|
|
155
|
+
This is **not a SQL sandbox**. The initial keyword check is input guidance, not a
|
|
156
|
+
security boundary. Database grants, read-only profiles, row policies and server
|
|
157
|
+
setting constraints must enforce permitted reads, tenant isolation and resource
|
|
158
|
+
budgets. SELECT can access table functions or external sources where the database
|
|
159
|
+
allows them. Prefer fixed approved templates; never let an untrusted frontend
|
|
160
|
+
choose arbitrary queries/table functions or omit its required tenant filter.
|
|
161
|
+
Read-only HTTP and result bounds do not make arbitrary SQL safe or inexpensive.
|
|
162
|
+
SQL and parameter values are in the request URL; redact proxy/access logs.
|
|
163
|
+
Other frameworks use the same HTTPS endpoint and typed `param_name` contract with
|
|
164
|
+
their native HTTP/database tools, and read the same Env/configuration values.
|
|
165
|
+
|
|
166
|
+
Limit is 1–100, default 20; offset is 0–1000000, default 0. Calls never fetch
|
|
167
|
+
another page automatically. Offset paging can repeat or skip rows as data
|
|
168
|
+
changes. Rows have no guaranteed ordering without `orderBy`; even with it,
|
|
169
|
+
choose a stable unique column for predictable paging. A small result limit
|
|
170
|
+
does not guarantee a cheap scan or sort. The database administrator owns scan,
|
|
171
|
+
memory, thread and quota constraints.
|
|
172
|
+
|
|
173
|
+
The adapter returns the parsed `FORMAT JSON` envelope unchanged: `meta`, `data`,
|
|
174
|
+
`rows` and any provider statistics. It accepts empty pages and validates the
|
|
175
|
+
envelope before success. It does not convert strings into numbers or dates;
|
|
176
|
+
preserve large integer strings and consult `meta` for column types. Provider
|
|
177
|
+
format settings determine decimal/large-number encoding, so do not assume
|
|
178
|
+
JavaScript numbers can represent every value exactly.
|
|
179
|
+
[JSON format](https://clickhouse.com/docs/reference/formats/JSON/JSON).
|
|
180
|
+
|
|
181
|
+
Requests ask for response buffering with `wait_end_of_query=1`. ClickHouse can
|
|
182
|
+
still report an execution exception after sending HTTP 200; incomplete JSON or
|
|
183
|
+
an exception envelope is an error, never a successful partial page. HTTP errors
|
|
184
|
+
and timeouts are surfaced without replay. Cancellation ends the local request;
|
|
185
|
+
it does not prove the database query stopped. The fixed execution-time setting
|
|
186
|
+
limits server work, subject to ClickHouse's execution checks.
|
|
187
|
+
[HTTP buffering and error behavior](https://clickhouse.com/docs/concepts/features/interfaces/http).
|
|
188
|
+
|
|
189
|
+
The configured endpoint may be private and may include a port or proxy path.
|
|
190
|
+
Validation rejects HTTP, embedded credentials, queries, fragments and parent
|
|
191
|
+
path segments. It does not resolve DNS or impose network policy. The host must
|
|
192
|
+
restrict configuration editing and its backend's network access. Redirects are
|
|
193
|
+
rejected; credentials never go in the URL or browser configuration.
|
|
194
|
+
|
|
195
|
+
## Automation and Online ownership
|
|
196
|
+
|
|
197
|
+
An AI can prepare portable JSON and wire the library. With an authorized
|
|
198
|
+
database administrator connection, it can provision users, grants, profiles and
|
|
199
|
+
quotas using SQL. A self-hosted administrator can also use ClickHouse access
|
|
200
|
+
configuration files. These are separate administrative operations; this adapter
|
|
201
|
+
does not execute them.
|
|
202
|
+
|
|
203
|
+
Cloud service provisioning is also programmable using ClickHouse's management
|
|
204
|
+
API. An organization operator first opens **API Keys → New API Key**, sets the
|
|
205
|
+
name, roles, expiration and allowed IPs, and chooses **Generate API Key**.
|
|
206
|
+
Store the displayed Key ID/secret privately. Authorized automation can then use
|
|
207
|
+
the API with those management credentials. Account setup, billing access and
|
|
208
|
+
required administrative permission remain operator responsibilities. Management
|
|
209
|
+
credentials belong to provisioning, not the application's database connection.
|
|
210
|
+
[Cloud API keys](https://clickhouse.com/docs/products/cloud/features/admin-features/api/openapi).
|
|
211
|
+
|
|
212
|
+
**Universal callback: not applicable.** This mode has no OAuth registration or
|
|
213
|
+
provider redirect. Each customer supplies their database endpoint and access.
|
|
214
|
+
An editor VM or app custom-domain change needs no new callback. If backend
|
|
215
|
+
egress changes, update the database IP allowlist. If the database URL changes,
|
|
216
|
+
update `httpUrl` and verify again.
|
|
217
|
+
|
|
218
|
+
The database owner can create separate application users with distinct grants and
|
|
219
|
+
quota profiles. Two usernames alone do not isolate CPU, memory or storage;
|
|
220
|
+
independent capacity requires appropriate budgets or separate compute. Each
|
|
221
|
+
application stores its own credential in private Env and enforces its access and
|
|
222
|
+
network policy. The [application setup contract](../../connectors-core/docs/online-setup.md)
|
|
223
|
+
also applies when the application moves hosts.
|
|
224
|
+
|
|
225
|
+
## Focused proof and remaining work
|
|
226
|
+
|
|
227
|
+
Tests use controlled HTTP and real encrypted temporary files. They cover Basic
|
|
228
|
+
and no-credential modes, default users, empty/missing passwords, rotation,
|
|
229
|
+
restart, isolation, changed bindings, typed query parameters, page bounds,
|
|
230
|
+
malformed replies, HTTP-200 exceptions, errors and cancellation without replay.
|
|
231
|
+
The shared form tests cover mode changes, hidden-field removal, locking, CLI
|
|
232
|
+
import and remount at 390, 820 and 1440 pixels. Public-editor cases cover phone
|
|
233
|
+
and desktop file persistence. These checks do not execute SQL on a live server.
|
|
234
|
+
|
|
235
|
+
**LIMITATIONS:** Automatic Vibe64 coding-assistant attachment remains deferred.
|
|
236
|
+
For example, the app can show monthly booking totals through `queries.read`, but
|
|
237
|
+
saving this configuration does not enable Vibe64 chat to query that database.
|
|
238
|
+
Writes, database provisioning/administration and per-user database identity
|
|
239
|
+
management remain native work; use an administrator outside this connector to
|
|
240
|
+
create a reporting user and its row/resource policies. There is no query-builder
|
|
241
|
+
canvas or SQL sandbox. Controlled query tests exercise both credential modes;
|
|
242
|
+
no live SQL service, provisioning or generated application is claimed.
|