@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
package/docs/zoho-crm.md
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Zoho CRM
|
|
2
|
+
|
|
3
|
+
Import `zohoCrmProvider` from `@jskit-ai/connectors-catalog/server/zoho-crm`.
|
|
4
|
+
The initial adapter reads the current CRM user and pages of leads, contacts,
|
|
5
|
+
accounts and deals. It uses the existing OAuth connection service and encrypted
|
|
6
|
+
file store. Vibe64 and CLI users edit the same `integrations.json`; saving that
|
|
7
|
+
file does not perform consent or verify credentials.
|
|
8
|
+
|
|
9
|
+
## Register a client
|
|
10
|
+
|
|
11
|
+
1. Sign into the [Zoho API Console](https://api-console.zoho.com/) with the account
|
|
12
|
+
that will own the registration. Choose **Get Started**, or add a client if
|
|
13
|
+
your console already contains registrations.
|
|
14
|
+
2. Select **Server-based Applications**, then **Create Now**. This adapter uses
|
|
15
|
+
a backend-held secret. Enter **Client Name**, **Homepage URL**, and the exact
|
|
16
|
+
**Authorized Redirect URI** served by your backend. Choose **Create**.
|
|
17
|
+
3. Open **Client Secret**. Copy **Client ID** into the registration below.
|
|
18
|
+
Store **Client Secret** in the runtime binding `ZOHO_CRM_CLIENT_SECRET`.
|
|
19
|
+
Store the registered redirect URI in `ZOHO_CRM_CALLBACK_URL`.
|
|
20
|
+
4. In the configuration, select the data centre containing the CRM account and
|
|
21
|
+
the intended Production, Sandbox or Developer environment. During consent,
|
|
22
|
+
choose the matching organisation and environment. A token belongs to that
|
|
23
|
+
choice and cannot be reused for another CRM environment.
|
|
24
|
+
5. For accounts in additional data centres, open the client's **Settings** and
|
|
25
|
+
enable **Multi DC** for each required location. Client secrets can differ by
|
|
26
|
+
data centre; assign the appropriate secret reference to each registration.
|
|
27
|
+
Confirm the target region is enabled before starting consent.
|
|
28
|
+
6. Save configuration, call `beginAuthorization`, and open its URL in the system
|
|
29
|
+
browser. Complete consent through `completeAuthorization` with the same
|
|
30
|
+
authenticated owner. Verification calls `users.current`. The library requests
|
|
31
|
+
offline access, consent and PKCE; the host supplies the callback handler.
|
|
32
|
+
|
|
33
|
+
[Registration fields](https://www.zoho.com/crm/developer/docs/api/v8/register-client.html),
|
|
34
|
+
[organisation consent](https://www.zoho.com/crm/developer/docs/api/v8/auth-request.html),
|
|
35
|
+
[Multi DC settings](https://www.zoho.com/crm/developer/docs/api/v8/multi-dc.html),
|
|
36
|
+
[server apps and PKCE](https://www.zoho.com/developer/oauth/web-server-apps/overview.html).
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"schemaVersion": 1,
|
|
41
|
+
"registrations": {
|
|
42
|
+
"zoho": {
|
|
43
|
+
"source": "own",
|
|
44
|
+
"clientId": "1000.REPLACE_WITH_ASSIGNED_CLIENT_ID",
|
|
45
|
+
"clientSecretRef": "env:ZOHO_CRM_CLIENT_SECRET",
|
|
46
|
+
"callbackUrlRef": "env:ZOHO_CRM_CALLBACK_URL"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"integrations": {
|
|
50
|
+
"crm": {
|
|
51
|
+
"provider": "zoho-crm",
|
|
52
|
+
"displayName": "Personal CRM",
|
|
53
|
+
"accountMode": "per-user",
|
|
54
|
+
"authentication": { "method": "oauth2", "registrationRef": "zoho" },
|
|
55
|
+
"settings": { "region": "eu", "environment": "production" },
|
|
56
|
+
"scopes": [
|
|
57
|
+
"ZohoCRM.users.READ",
|
|
58
|
+
"ZohoCRM.modules.leads.READ",
|
|
59
|
+
"ZohoCRM.modules.contacts.READ",
|
|
60
|
+
"ZohoCRM.modules.accounts.READ",
|
|
61
|
+
"ZohoCRM.modules.deals.READ"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Client authentication defaults to `client_secret_post`. The form offers twelve
|
|
69
|
+
permission choices; five read scopes are selected initially. Full-access scopes
|
|
70
|
+
are optional and do not add write operations to this adapter. Scope names are
|
|
71
|
+
case-sensitive and are sent comma-separated. [Scopes](https://www.zoho.com/crm/developer/docs/api/v8/scopes.html)
|
|
72
|
+
|
|
73
|
+
## Routing and ownership
|
|
74
|
+
|
|
75
|
+
| Region | Accounts host | Production API host |
|
|
76
|
+
| --- | --- | --- |
|
|
77
|
+
| `us` | `accounts.zoho.com` | `www.zohoapis.com` |
|
|
78
|
+
| `eu` | `accounts.zoho.eu` | `www.zohoapis.eu` |
|
|
79
|
+
| `in` | `accounts.zoho.in` | `www.zohoapis.in` |
|
|
80
|
+
| `au` | `accounts.zoho.com.au` | `www.zohoapis.com.au` |
|
|
81
|
+
| `jp` | `accounts.zoho.jp` | `www.zohoapis.jp` |
|
|
82
|
+
| `ca` | `accounts.zohocloud.ca` | `www.zohoapis.ca` |
|
|
83
|
+
| `cn` | `accounts.zoho.com.cn` | `www.zohoapis.com.cn` |
|
|
84
|
+
|
|
85
|
+
Sandbox and Developer replace `www` with `sandbox` and `developer`. Every token
|
|
86
|
+
response must contain the exact configured API origin. A different or missing
|
|
87
|
+
`api_domain` fails before an API request. The runtime does not follow arbitrary
|
|
88
|
+
`accounts-server` callback values or switch regions automatically; reconnect with
|
|
89
|
+
the correct regional configuration and client secret. Changing region or environment
|
|
90
|
+
invalidates the old connection. Additional provider regions remain outside this
|
|
91
|
+
initial adapter. [Token domains and environments](https://www.zoho.com/crm/developer/docs/api/v8/access-refresh.html)
|
|
92
|
+
|
|
93
|
+
The host's `authorize` policy maps an authenticated app user to a stable
|
|
94
|
+
application/subject pair. `shared` deliberately maps authorized members to one
|
|
95
|
+
shared subject; `assistant` uses the assistant owner's subject. The integration
|
|
96
|
+
file never establishes membership or app login. For a CLI, use a trusted process
|
|
97
|
+
owner, the same library, a registered callback listener, and explicit reference
|
|
98
|
+
resolution. A public desktop editor must not distribute a commercial client secret.
|
|
99
|
+
|
|
100
|
+
## Operations and failure behavior
|
|
101
|
+
|
|
102
|
+
| Operation | Inputs | Result |
|
|
103
|
+
| --- | --- | --- |
|
|
104
|
+
| `users.current` | None | Exactly one current CRM user, in the provider's `users` envelope |
|
|
105
|
+
| `leads.list` | Paging and fields | `data` and `info`; default fields `Last_Name,Email` |
|
|
106
|
+
| `contacts.list` | Paging and fields | `data` and `info`; default fields `Last_Name,Email` |
|
|
107
|
+
| `accounts.list` | Paging and fields | `data` and `info`; default field `Account_Name` |
|
|
108
|
+
| `deals.list` | Paging and fields | `data` and `info`; default fields `Deal_Name,Stage` |
|
|
109
|
+
|
|
110
|
+
Paging accepts `per_page` 1–200 (default100), `page` 1–10 (default1), or a
|
|
111
|
+
`page_token`, never both page selectors. `fields` accepts up to50 distinct,
|
|
112
|
+
comma-separated ordinary field API names. The adapter excludes special `$` fields.
|
|
113
|
+
IDs remain strings. No arbitrary module, query, destination or write is accepted.
|
|
114
|
+
|
|
115
|
+
The adapter makes one request per page and preserves cursor metadata and null
|
|
116
|
+
field values. Use a returned cursor with the same user and query parameters;
|
|
117
|
+
the provider limits cursor lifetime and total traversal. HTTP204 becomes an empty
|
|
118
|
+
record page, while malformed HTTP200 responses fail. The application owns record
|
|
119
|
+
selection, display, continued paging and policy. [Records and paging](https://www.zoho.com/crm/developer/docs/api/v8/get-records.html),
|
|
120
|
+
[current user](https://www.zoho.com/crm/developer/docs/api/v8/get-users.html),
|
|
121
|
+
[HTTP statuses](https://www.zoho.com/crm/developer/docs/api/v8/status-codes.html).
|
|
122
|
+
|
|
123
|
+
Refresh preserves an existing refresh token when Zoho omits a replacement.
|
|
124
|
+
Expired/revoked grants require reconnect; missing permissions and rate limits
|
|
125
|
+
produce distinct errors. No request is retried automatically. Cancellation and
|
|
126
|
+
timeouts reach the HTTP request. [Refresh](https://www.zoho.com/crm/developer/docs/api/v8/refresh.html)
|
|
127
|
+
|
|
128
|
+
`disconnect` removes local connection credentials. To revoke provider access,
|
|
129
|
+
open Zoho Accounts, **Connected Apps**, and revoke the appropriate application.
|
|
130
|
+
Revocation is separate from deleting this integration's configuration.
|
|
131
|
+
[Provider revocation](https://www.zoho.com/developer/oauth/web-server-apps/overview.html)
|
|
132
|
+
|
|
133
|
+
## Application ownership, callbacks and capacity
|
|
134
|
+
|
|
135
|
+
The application owner creates the provider registration and stores its secret
|
|
136
|
+
in the application's private Env. Public Vibe64, Vibe64 Online and CLI users use
|
|
137
|
+
this same ownership model. The configuration file holds the client ID and Env
|
|
138
|
+
references; the editor does not own the application's grants.
|
|
139
|
+
|
|
140
|
+
Register the exact callback implemented by the application. For a hosted project,
|
|
141
|
+
start with its assigned application URL and append the implemented callback path.
|
|
142
|
+
Save that same URL through the application's callback Env reference. On a domain
|
|
143
|
+
or host change, update both the provider registration and callback Env if the URL
|
|
144
|
+
changes. Preserve the application's identity and persistent grant store when
|
|
145
|
+
moving it; neither a new editor URL nor a new hosting address creates a new owner.
|
|
146
|
+
See the [callback guide](../../connectors-core/docs/oauth-callbacks.md) and
|
|
147
|
+
[application setup command](../../connectors-core/docs/setup-command.md).
|
|
148
|
+
|
|
149
|
+
Configure the required Multi DC settings for this client and keep all regional
|
|
150
|
+
secrets in the application's private Env. Preserve the selected region with the
|
|
151
|
+
connection. Separate clients do not guarantee separate CRM organisation credits;
|
|
152
|
+
Zoho's quotas depend on edition, licenses and concurrency.
|
|
153
|
+
[API limits](https://www.zoho.com/crm/developer/docs/api/v8/api-limits.html)
|
|
154
|
+
|
|
155
|
+
## Automation feasibility and current proof
|
|
156
|
+
|
|
157
|
+
AI can generate this file, validate it, compose the existing library, prepare
|
|
158
|
+
callback handlers and guide an authorized operator through the portal. The reviewed
|
|
159
|
+
registration instructions describe console creation; a public API for automatically
|
|
160
|
+
creating these client registrations has not been established. Account sign-in,
|
|
161
|
+
consent, regional enablement, secret assignment and any production/provider review
|
|
162
|
+
remain operator/provider steps. The runtime itself does not create registrations.
|
|
163
|
+
|
|
164
|
+
Focused tests use controlled HTTP responses and temporary encrypted files, covering
|
|
165
|
+
regional routing, environment binding, paging, scope enforcement, refresh, ownership,
|
|
166
|
+
error handling and interruption. Real accounts, consent, registrations and generated
|
|
167
|
+
applications are outside this test pass. Complete connection UI, native/self
|
|
168
|
+
client grants, additional regions, arbitrary CRM modules, mutations and provider-side
|
|
169
|
+
revocation remain unfinished; the initial read adapter does not imply full API coverage.
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
## Existing-scope closeout — 13 September 2026
|
|
173
|
+
|
|
174
|
+
Supported: current user and paged leads, contacts, accounts and deals through
|
|
175
|
+
project-owned server OAuth, seven configured data centres and three environments,
|
|
176
|
+
explicit fields/page tokens, encrypted local grants and refresh. Source and
|
|
177
|
+
offline installed-package tests each pass 11/11. Historical editor form evidence
|
|
178
|
+
is retained; the added inline sentence clarifying read-only operation scope was
|
|
179
|
+
source-reviewed, not freshly browser-tested.
|
|
180
|
+
|
|
181
|
+
Full limitations/deferred work: no create/update/delete, relationships mutations,
|
|
182
|
+
arbitrary modules, required-field/module metadata discovery, search/query APIs,
|
|
183
|
+
bulk jobs, attachments, webhooks or automatic pagination. Full-access scopes do
|
|
184
|
+
not add these operations. Named record lists have the documented field/page
|
|
185
|
+
bounds; caller owns continuation and must preserve provider tokens per user/query.
|
|
186
|
+
No native/self/client-credentials grants, additional regions beyond the configured
|
|
187
|
+
seven, region auto-discovery or provider-side revocation. Current-user verification
|
|
188
|
+
does not prove module/field permissions. The application supplies callbacks,
|
|
189
|
+
organisation/user policy, end-user connection screens and native framework wiring;
|
|
190
|
+
connecting CRM is not app sign-in. Disconnect is local. Editor assistant attachment,
|
|
191
|
+
live regional OAuth/permissions/data and generated-app execution remain deferred
|
|
192
|
+
or unverified. The original broader CRM packet remains backlog.
|
package/package.json
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jskit-ai/connectors-catalog",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Provider definitions and focused API operations for JSKIT connectors.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
"./shared/ai": "./src/shared/ai.js",
|
|
8
|
+
"./server/ai": "./src/server/ai.js",
|
|
9
|
+
"./shared": "./src/shared/definitions.js",
|
|
10
|
+
"./server/resend": "./src/server/resend.js",
|
|
11
|
+
"./server/firecrawl": "./src/server/firecrawl.js",
|
|
12
|
+
"./server/gmail": "./src/server/gmail.js",
|
|
13
|
+
"./server/google-drive": "./src/server/google-drive.js",
|
|
14
|
+
"./server/google-sheets": "./src/server/google-sheets.js",
|
|
15
|
+
"./server/google-docs": "./src/server/google-docs.js",
|
|
16
|
+
"./server/google-slides": "./src/server/google-slides.js",
|
|
17
|
+
"./server/google-search-console": "./src/server/google-search-console.js",
|
|
18
|
+
"./server/airtable": "./src/server/airtable.js",
|
|
19
|
+
"./server/notion": "./src/server/notion.js",
|
|
20
|
+
"./server/brevo": "./src/server/brevo.js",
|
|
21
|
+
"./server/elevenlabs": "./src/server/elevenlabs.js",
|
|
22
|
+
"./server/github-api": "./src/server/github-api.js",
|
|
23
|
+
"./server/apify": "./src/server/apify.js",
|
|
24
|
+
"./server/calendly": "./src/server/calendly.js",
|
|
25
|
+
"./server/hubspot": "./src/server/hubspot.js",
|
|
26
|
+
"./server/linear": "./src/server/linear.js",
|
|
27
|
+
"./server/pipedrive": "./src/server/pipedrive.js",
|
|
28
|
+
"./server/gitlab-api": "./src/server/gitlab-api.js",
|
|
29
|
+
"./server/tally": "./src/server/tally.js",
|
|
30
|
+
"./server/contentful": "./src/server/contentful.js",
|
|
31
|
+
"./server/asana": "./src/server/asana.js",
|
|
32
|
+
"./server/microsoft-outlook": "./src/server/microsoft-outlook.js",
|
|
33
|
+
"./server/microsoft-onedrive": "./src/server/microsoft-onedrive.js",
|
|
34
|
+
"./server/microsoft-excel": "./src/server/microsoft-excel.js",
|
|
35
|
+
"./server/microsoft-teams": "./src/server/microsoft-teams.js",
|
|
36
|
+
"./server/microsoft-onenote": "./src/server/microsoft-onenote.js",
|
|
37
|
+
"./server/microsoft-sharepoint": "./src/server/microsoft-sharepoint.js",
|
|
38
|
+
"./server/microsoft-word": "./src/server/microsoft-word.js",
|
|
39
|
+
"./server/microsoft-powerpoint": "./src/server/microsoft-powerpoint.js",
|
|
40
|
+
"./server/stripe": "./src/server/stripe.js",
|
|
41
|
+
"./server/replicate": "./src/server/replicate.js",
|
|
42
|
+
"./server/sentry": "./src/server/sentry.js",
|
|
43
|
+
"./server/incident-io": "./src/server/incident-io.js",
|
|
44
|
+
"./server/fireflies": "./src/server/fireflies.js",
|
|
45
|
+
"./server/heygen": "./src/server/heygen.js",
|
|
46
|
+
"./server/perplexity": "./src/server/perplexity.js",
|
|
47
|
+
"./server/supabase": "./src/server/supabase.js",
|
|
48
|
+
"./server/bigquery": "./src/server/bigquery.js",
|
|
49
|
+
"./server/paddle": "./src/server/paddle.js",
|
|
50
|
+
"./server/mailgun": "./src/server/mailgun.js",
|
|
51
|
+
"./server/fireworks-ai": "./src/server/fireworks-ai.js",
|
|
52
|
+
"./server/gatewayapi": "./src/server/gatewayapi.js",
|
|
53
|
+
"./server/polar": "./src/server/polar.js",
|
|
54
|
+
"./server/storyblok": "./src/server/storyblok.js",
|
|
55
|
+
"./server/oura": "./src/server/oura.js",
|
|
56
|
+
"./server/algolia": "./src/server/algolia.js",
|
|
57
|
+
"./server/twilio": "./src/server/twilio.js",
|
|
58
|
+
"./server/gong": "./src/server/gong.js",
|
|
59
|
+
"./server/posthog": "./src/server/posthog.js",
|
|
60
|
+
"./server/chargebee": "./src/server/chargebee.js",
|
|
61
|
+
"./server/ashby": "./src/server/ashby.js",
|
|
62
|
+
"./server/lexware": "./src/server/lexware.js",
|
|
63
|
+
"./server/sevdesk": "./src/server/sevdesk.js",
|
|
64
|
+
"./server/apollo-io": "./src/server/apollo-io.js",
|
|
65
|
+
"./server/attention": "./src/server/attention.js",
|
|
66
|
+
"./server/telegram": "./src/server/telegram.js",
|
|
67
|
+
"./server/klipy": "./src/server/klipy.js",
|
|
68
|
+
"./server/mapbox": "./src/server/mapbox.js",
|
|
69
|
+
"./server/google-maps-platform": "./src/server/google-maps-platform.js",
|
|
70
|
+
"./server/wordpress-com": "./src/server/wordpress-com.js",
|
|
71
|
+
"./server/n8n": "./src/server/n8n.js",
|
|
72
|
+
"./server/sanity": "./src/server/sanity.js",
|
|
73
|
+
"./server/inngest": "./src/server/inngest.js",
|
|
74
|
+
"./server/woocommerce": "./src/server/woocommerce.js",
|
|
75
|
+
"./server/wordpress-self-hosted": "./src/server/wordpress-self-hosted.js",
|
|
76
|
+
"./client/google-maps-platform": "./src/client/google-maps-platform.js",
|
|
77
|
+
"./client/google-analytics": "./src/client/google-analytics.js",
|
|
78
|
+
"./client/logo-dev": "./src/client/logo-dev.js",
|
|
79
|
+
"./server/amplitude": "./src/server/amplitude.js",
|
|
80
|
+
"./server/atlassian": "./src/server/atlassian.js",
|
|
81
|
+
"./server/canva": "./src/server/canva.js",
|
|
82
|
+
"./server/figma": "./src/server/figma.js",
|
|
83
|
+
"./server/miro": "./src/server/miro.js",
|
|
84
|
+
"./server/clay": "./src/server/clay.js",
|
|
85
|
+
"./server/prestashop": "./src/server/prestashop.js",
|
|
86
|
+
"./server/clickhouse": "./src/server/clickhouse.js",
|
|
87
|
+
"./server/twitch": "./src/server/twitch.js",
|
|
88
|
+
"./server/slack": "./src/server/slack.js",
|
|
89
|
+
"./server/aws-s3": "./src/server/aws-s3.js",
|
|
90
|
+
"./server/aws-athena": "./src/server/aws-athena.js",
|
|
91
|
+
"./server/amazon-redshift": "./src/server/amazon-redshift.js",
|
|
92
|
+
"./server/xero": "./src/server/xero.js",
|
|
93
|
+
"./server/semrush": "./src/server/semrush.js",
|
|
94
|
+
"./server/wave": "./src/server/wave.js",
|
|
95
|
+
"./server/zoho-crm": "./src/server/zoho-crm.js",
|
|
96
|
+
"./server/zoho-books": "./src/server/zoho-books.js",
|
|
97
|
+
"./server/granola": "./src/server/granola.js",
|
|
98
|
+
"./server/hex": "./src/server/hex.js",
|
|
99
|
+
"./server/confidence-flags": "./src/server/confidence.js",
|
|
100
|
+
"./server/confidence-exp": "./src/server/confidence.js",
|
|
101
|
+
"./server/lightspeed": "./src/server/lightspeed.js",
|
|
102
|
+
"./server/databricks": "./src/server/databricks.js",
|
|
103
|
+
"./server/microsoft-fabric": "./src/server/microsoft-fabric.js",
|
|
104
|
+
"./server/dbt-semantic-layer": "./src/server/dbt-semantic-layer.js",
|
|
105
|
+
"./server/salesforce": "./src/server/salesforce.js",
|
|
106
|
+
"./server/firebase-cloud-messaging": "./src/server/firebase-cloud-messaging.js",
|
|
107
|
+
"./client/firebase-cloud-messaging": "./src/client/firebase-cloud-messaging.js",
|
|
108
|
+
"./shared/google-ads-search": "./src/shared/google-ads-search.js",
|
|
109
|
+
"./server/google-ads-search": "./src/server/google-ads-search.js",
|
|
110
|
+
"./server/google-ads": "./src/server/google-ads.js",
|
|
111
|
+
"./server/wix": "./src/server/wix.js",
|
|
112
|
+
"./server/tiktok": "./src/server/tiktok.js",
|
|
113
|
+
"./server/linkedin": "./src/server/linkedin.js",
|
|
114
|
+
"./server/x-twitter": "./src/server/x-twitter.js",
|
|
115
|
+
"./server/snowflake": "./src/server/snowflake.js",
|
|
116
|
+
"./server/gemini-enterprise": "./src/server/gemini-enterprise.js",
|
|
117
|
+
"./server/workday": "./src/server/workday.js",
|
|
118
|
+
"./server/shopify": "./src/server/shopify.js",
|
|
119
|
+
"./server/wiz": "./src/server/wiz.js"
|
|
120
|
+
},
|
|
121
|
+
"dependencies": {
|
|
122
|
+
"@aws-sdk/client-athena": "3.1128.0",
|
|
123
|
+
"@aws-sdk/client-redshift-data": "3.1128.0",
|
|
124
|
+
"@aws-sdk/client-s3": "3.1128.0",
|
|
125
|
+
"@aws-sdk/s3-request-presigner": "3.1128.0",
|
|
126
|
+
"@jskit-ai/connectors-core": "0.1.1",
|
|
127
|
+
"@modelcontextprotocol/sdk": "1.30.0",
|
|
128
|
+
"@smithy/fetch-http-handler": "5.8.0",
|
|
129
|
+
"json-rest-schema": "^1.0.17",
|
|
130
|
+
"jose": "^6.1.3"
|
|
131
|
+
},
|
|
132
|
+
"peerDependencies": {
|
|
133
|
+
"@jskit-ai/kernel": "0.1.184"
|
|
134
|
+
},
|
|
135
|
+
"jskit": {
|
|
136
|
+
"kind": "runtime",
|
|
137
|
+
"capabilities": {
|
|
138
|
+
"provides": [],
|
|
139
|
+
"requires": []
|
|
140
|
+
},
|
|
141
|
+
"runtime": {
|
|
142
|
+
"server": {
|
|
143
|
+
"providers": []
|
|
144
|
+
},
|
|
145
|
+
"client": {
|
|
146
|
+
"providers": []
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"scripts": {
|
|
151
|
+
"test": "node --test --test-concurrency=1"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: connectors/ai-connections
|
|
3
|
+
title: App-owned AI connections and static model selection
|
|
4
|
+
summary: Resolve an administrator environment key or an individual user's grant, then use the application's chosen AI SDK directly.
|
|
5
|
+
keywords: ai, models, free, big-pickle, zen, zai, environment, api-key, ownership, cli
|
|
6
|
+
requires: @jskit-ai/connectors-core, @jskit-ai/connectors-catalog
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# App-owned AI connections and static model selection
|
|
10
|
+
|
|
11
|
+
## Use when
|
|
12
|
+
|
|
13
|
+
Use the [AI guide](https://github.com/mobily-enterprises/jskit-ai/blob/main/packages/connectors-catalog/docs/ai.md) to choose the model, account owner and
|
|
14
|
+
framework SDK before wiring requests. The shared catalogue is a deliberate
|
|
15
|
+
static extraction, not an OpenCode runtime integration. The default Big Pickle
|
|
16
|
+
route needs no account, user key or environment setup.
|
|
17
|
+
|
|
18
|
+
## Framework APIs
|
|
19
|
+
|
|
20
|
+
The imported library validates configuration and resolves authorized server-side
|
|
21
|
+
parameters. The example only composes those parameters with an **app-supplied**
|
|
22
|
+
model factory. It does not implement inference or install an SDK. Pass a factory
|
|
23
|
+
for the returned provider/protocol; do not treat every model as chat completions.
|
|
24
|
+
|
|
25
|
+
## Product decisions
|
|
26
|
+
|
|
27
|
+
For a CLI app, read and validate `integrations.json`, use a trusted local
|
|
28
|
+
operator policy and your normal private environment. For a web app, derive
|
|
29
|
+
identity from its authenticated server session and explicitly authorize shared
|
|
30
|
+
account use. Never adapt a permissive CLI policy into a public HTTP endpoint.
|
|
31
|
+
|
|
32
|
+
## Invariants
|
|
33
|
+
|
|
34
|
+
Administrator keys use `env:APP_AI_API_KEY`; the existing environment resolver
|
|
35
|
+
is the default. Individual keys use an app-owned reference and a resolver scoped
|
|
36
|
+
to authorized application, user, provider and integration. The application owns
|
|
37
|
+
key-entry and disconnect screens. Never return connection parameters to a
|
|
38
|
+
browser or share coding-agent subscription credentials.
|
|
39
|
+
|
|
40
|
+
## Do not use when
|
|
41
|
+
|
|
42
|
+
Frameworks outside Node follow their own configuration and AI client patterns.
|
|
43
|
+
These provider facts and the text file are portable; this JavaScript example is
|
|
44
|
+
not a dependency that Laravel or another framework must install.
|
|
45
|
+
|
|
46
|
+
## Example files
|
|
47
|
+
|
|
48
|
+
- `example/ai-model.js` composes the connection resolver with an app-owned SDK factory.
|
|
49
|
+
|
|
50
|
+
## Variation points
|
|
51
|
+
|
|
52
|
+
Choose shared Env or an authenticated individual-key resolver, then provide the
|
|
53
|
+
SDK factory for the selected provider. The application owns prompts, request
|
|
54
|
+
limits, streaming, tools and user-visible provider failures.
|
|
55
|
+
|
|
56
|
+
## Verification
|
|
57
|
+
|
|
58
|
+
Verify with controlled SDK factories and private test keys. Do not call live
|
|
59
|
+
inference or generate/deploy a sample application to prove configuration wiring.
|
|
60
|
+
|
|
61
|
+
## Avoid
|
|
62
|
+
|
|
63
|
+
Do not add a runtime catalogue fetch, token billing, an inference proxy, a
|
|
64
|
+
cross-language runtime or a silent paid fallback. Never infer that a model
|
|
65
|
+
marked free can be used without the authentication its provider requires.
|
|
66
|
+
|
|
67
|
+
## Existing Perplexity connector slots
|
|
68
|
+
|
|
69
|
+
Use `example/perplexity-answer.js` when configuration already has provider
|
|
70
|
+
`perplexity`. It reads that exact slot, authorizes the caller, resolves its private
|
|
71
|
+
reference and passes it to an app-supplied OpenAI-compatible SDK factory.
|
|
72
|
+
It neither creates another `ai` slot nor stores another copy of the key.
|
|
73
|
+
The app installs its own native SDK, for example `openai`, and supplies
|
|
74
|
+
`createClient: options => new OpenAI(options)`. No SDK is a dependency of this
|
|
75
|
+
connector package. Call the returned function with context, integrationId,
|
|
76
|
+
question, current provider model name and optional stream/signal.
|
|
77
|
+
For a normal result render choices[0].message.content with citations and
|
|
78
|
+
search_results. For stream=true consume the async iterator, rendering deltas
|
|
79
|
+
and retaining final citations/search_results; cancel with AbortSignal.
|
|
80
|
+
Allow only safe HTTP(S) links in rendered citations. Never send the API key/client
|
|
81
|
+
to a browser. A public route must sanitize SDK failures and enforce app budgets.
|
|
82
|
+
This is direct app-to-provider traffic, with no Vibe64 token sales or proxy.
|
|
83
|
+
A trusted CLI operator can use the same JSON/Env and factory. Other frameworks
|
|
84
|
+
use their own native Perplexity/OpenAI-compatible clients and the same slot.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createAiConnectionResolver } from "@jskit-ai/connectors-catalog/server/ai";
|
|
2
|
+
|
|
3
|
+
// App-owned composition. Supply the authenticated authorization policy and the
|
|
4
|
+
// SDK model factory used by this application. Omit resolveReference for Env.
|
|
5
|
+
export function createConfiguredAiModel({ configuration, authorize, resolveReference, createModel }) {
|
|
6
|
+
const connections = createAiConnectionResolver({ configuration, authorize, resolveReference });
|
|
7
|
+
return async ({ context, integrationId }) => {
|
|
8
|
+
const parameters = await connections.resolve({ context, integrationId });
|
|
9
|
+
return createModel(parameters); // Backend only; the app owns subsequent inference.
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ConnectorError, createEnvironmentReferenceResolver } from "@jskit-ai/connectors-core/server";
|
|
2
|
+
import { validateIntegrationConfiguration } from "@jskit-ai/connectors-core/shared/configuration";
|
|
3
|
+
import { perplexityProvider } from "@jskit-ai/connectors-catalog/server/perplexity";
|
|
4
|
+
|
|
5
|
+
// App-owned composition, not an inference service. Supply the application's native
|
|
6
|
+
// OpenAI-compatible client factory. Credentials and the returned client stay server-side.
|
|
7
|
+
export function createPerplexityAnswers({ configuration, authorize, createClient,
|
|
8
|
+
resolveReference = createEnvironmentReferenceResolver() }) {
|
|
9
|
+
if (typeof authorize !== "function" || typeof createClient !== "function") throw new TypeError("Supply application authorization and its native client factory.");
|
|
10
|
+
const config = validateIntegrationConfiguration(configuration, { providers: [perplexityProvider], allowUnknownProviders: true });
|
|
11
|
+
return async ({ context, integrationId, question, model, stream = false, signal }) => {
|
|
12
|
+
const slot = Object.hasOwn(config.integrations, integrationId) ? config.integrations[integrationId] : null;
|
|
13
|
+
if (slot?.provider !== "perplexity") throw new ConnectorError("connector_not_found", "Configure a Perplexity slot.", { statusCode: 404 });
|
|
14
|
+
const owner = await authorize(context, { integrationId, accountMode: slot.accountMode, operation: "perplexity.answer", input: { question, model, stream } });
|
|
15
|
+
if (!owner?.applicationId || !owner?.subjectId) throw new ConnectorError("connector_access_denied", "Perplexity access was denied.", { statusCode: 403 });
|
|
16
|
+
if (typeof question !== "string" || !question.trim() || question.length > 20000 || typeof model !== "string" || !model.trim() || model.length > 200 || typeof stream !== "boolean")
|
|
17
|
+
throw new ConnectorError("connector_input_invalid", "Supply a question, provider model name and boolean stream flag.", { statusCode: 422 });
|
|
18
|
+
signal?.throwIfAborted();
|
|
19
|
+
let apiKey;
|
|
20
|
+
try {
|
|
21
|
+
apiKey = await resolveReference(slot.authentication.secretRef, owner, { integrationId, accountMode: slot.accountMode, providerId: "perplexity" });
|
|
22
|
+
if (typeof apiKey !== "string" || !apiKey.trim() || apiKey.trim() === "MISSING" || /[\r\n\0]/.test(apiKey) || apiKey.length > 16384) throw new Error();
|
|
23
|
+
} catch { throw new ConnectorError("connector_binding_missing", "Set this Perplexity credential in the application's private Env.", { statusCode: 422 }); }
|
|
24
|
+
const client = createClient({ apiKey, baseURL: "https://api.perplexity.ai", maxRetries: 0, timeout: 60000 });
|
|
25
|
+
// Preserve citations/search_results/usage and streaming chunks. The application
|
|
26
|
+
// renders them, accounts for usage and sanitizes failures at its HTTP boundary.
|
|
27
|
+
return client.chat.completions.create({ model, messages: [{ role: "user", content: question }], stream }, { signal });
|
|
28
|
+
};
|
|
29
|
+
}
|