@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/oura.md
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Oura
|
|
2
|
+
|
|
3
|
+
Import `ouraProvider` from `@jskit-ai/connectors-catalog/server/oura`. This
|
|
4
|
+
fragment connects each app user's Oura account and reads daily sleep summaries
|
|
5
|
+
and permitted profile fields. It uses OAuth2; personal access tokens were
|
|
6
|
+
deprecated in December 2025. [Current API](https://cloud.ouraring.com/v2/docs).
|
|
7
|
+
|
|
8
|
+
## Register and configure
|
|
9
|
+
|
|
10
|
+
1. For new registrations, sign into https://developer.ouraring.com with the
|
|
11
|
+
account that will own the integration and create an API application. Existing
|
|
12
|
+
registrations remain editable through Oura Cloud → My Applications at
|
|
13
|
+
https://cloud.ouraring.com/oauth/applications. Oura's current
|
|
14
|
+
[support guide](https://support.ouraring.com/hc/en-us/articles/4415266939155-The-Oura-API)
|
|
15
|
+
distinguishes these portals. The new portal's authenticated form labels
|
|
16
|
+
were not inspected; the required registration values below are documented.
|
|
17
|
+
2. Enter a name and website describing the application. Configure the exact
|
|
18
|
+
redirect URI served by the application's backend, including scheme and path.
|
|
19
|
+
3. Copy the assigned Client ID into the integration form. Store the Client
|
|
20
|
+
Secret in backend Env as `OURA_CLIENT_SECRET`; store the callback URL as
|
|
21
|
+
`OURA_CALLBACK_URL`.
|
|
22
|
+
4. New applications have a ten-user limit. When ready for a wider audience,
|
|
23
|
+
submit the application for approval from its application page.
|
|
24
|
+
[Application registration](https://cloud.ouraring.com/docs/).
|
|
25
|
+
5. Save this configuration, then start consent. The form selects per-user mode
|
|
26
|
+
and `daily` permission by default. Add `personal` or `email` only when the
|
|
27
|
+
corresponding profile data is needed. Save configuration, then use the Env
|
|
28
|
+
links to populate those references. Connect account invokes the configured
|
|
29
|
+
application setup command; its runtime performs consent and stores grants.
|
|
30
|
+
Gen3 and later users need active Oura Membership to retrieve API data.
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"schemaVersion": 1,
|
|
35
|
+
"registrations": {
|
|
36
|
+
"oura": {
|
|
37
|
+
"source": "own",
|
|
38
|
+
"clientId": "YOUR_OURA_CLIENT_ID",
|
|
39
|
+
"clientSecretRef": "env:OURA_CLIENT_SECRET",
|
|
40
|
+
"callbackUrlRef": "env:OURA_CALLBACK_URL"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"integrations": {
|
|
44
|
+
"oura": {
|
|
45
|
+
"provider": "oura",
|
|
46
|
+
"displayName": "My Oura data",
|
|
47
|
+
"accountMode": "per-user",
|
|
48
|
+
"scopes": ["daily"],
|
|
49
|
+
"authentication": { "method": "oauth2", "registrationRef": "oura" }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Consent uses `https://cloud.ouraring.com/oauth/authorize` and exchanges the code
|
|
56
|
+
at `https://api.ouraring.com/oauth/token`. The runtime submits client credentials
|
|
57
|
+
in the form-encoded token request. It retains reduced callback scopes when the
|
|
58
|
+
token response omits them, and serializes refresh because Oura refresh tokens
|
|
59
|
+
are single-use. A declined `daily` permission prevents verification. The runtime
|
|
60
|
+
sends state and an S256 PKCE challenge; Oura's documentation does not establish
|
|
61
|
+
server-side PKCE enforcement, which has not been tested against a live account.
|
|
62
|
+
[OAuth protocol](https://cloud.ouraring.com/docs/authentication).
|
|
63
|
+
|
|
64
|
+
## Runtime and AI composition
|
|
65
|
+
|
|
66
|
+
Use ordinary application modules; no template, generator or database is needed:
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
import { readFile } from "node:fs/promises";
|
|
70
|
+
import { parseIntegrationConfiguration } from "@jskit-ai/connectors-core/shared/configuration";
|
|
71
|
+
import { createConnectionService, createEnvironmentReferenceResolver } from "@jskit-ai/connectors-core/server";
|
|
72
|
+
import { createFileConnectionStore, createCredentialProtection } from "@jskit-ai/connectors-core/server/file-storage";
|
|
73
|
+
import { ouraProvider } from "@jskit-ai/connectors-catalog/server/oura";
|
|
74
|
+
|
|
75
|
+
const providers = [ouraProvider];
|
|
76
|
+
const configuration = parseIntegrationConfiguration(await readFile("integrations.json", "utf8"), { providers });
|
|
77
|
+
const protection = createCredentialProtection({
|
|
78
|
+
keys: { current: Buffer.from(process.env.CONNECTOR_STORAGE_KEY, "base64") },
|
|
79
|
+
activeKeyId: "current"
|
|
80
|
+
});
|
|
81
|
+
const connections = createConnectionService({
|
|
82
|
+
configuration, providers,
|
|
83
|
+
store: createFileConnectionStore({ directory: process.env.CONNECTOR_STATE_DIRECTORY, protection }),
|
|
84
|
+
resolveReference: createEnvironmentReferenceResolver(),
|
|
85
|
+
authorize: applicationConnectionPolicy
|
|
86
|
+
});
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`applicationConnectionPolicy` is the existing application's authenticated policy.
|
|
90
|
+
It derives the application ID and subject ID from trusted session/operator
|
|
91
|
+
context. Never accept these owner identifiers directly from request input.
|
|
92
|
+
Keep the runtime directory outside exported source and the encryption key stable
|
|
93
|
+
across restarts and backups. A CLI uses the same imports, JSON and local operator
|
|
94
|
+
policy with its registered callback listener.
|
|
95
|
+
|
|
96
|
+
Call `beginAuthorization({ context, integrationId: "oura" })` to obtain the URL.
|
|
97
|
+
After the user approves, the backend callback supplies the same authenticated
|
|
98
|
+
context and exact callback URL to `completeAuthorization`. Redirect to the
|
|
99
|
+
application after success; never put provider tokens in the browser or chat.
|
|
100
|
+
Use `cancelAuthorization` when abandoning a pending attempt and `disconnect`
|
|
101
|
+
to remove local access. Neither revokes other applications' provider grants.
|
|
102
|
+
|
|
103
|
+
`invoke({ context, integrationId: "oura", operation: "dailySleep.list", input })`
|
|
104
|
+
reads `/v2/usercollection/daily_sleep`. Inputs are optional `start_date` and
|
|
105
|
+
`end_date` as valid `YYYY-MM-DD` dates, plus opaque `next_token`. Preserve the
|
|
106
|
+
same date range when paging and stop when the returned token is absent or null.
|
|
107
|
+
This fragment supports dates, not date-time input or selectable response fields.
|
|
108
|
+
`personalInfo.read` reads `/v2/usercollection/personal_info` with `personal` or
|
|
109
|
+
`email` consent. It returns only the fields Oura permits. Other Oura permission
|
|
110
|
+
families and operations are outside this fragment.
|
|
111
|
+
[Endpoint schemas](https://cloud.ouraring.com/v2/static/json/openapi-1.37.json).
|
|
112
|
+
|
|
113
|
+
An Oura grant provides data access; implement application login through the
|
|
114
|
+
application's identity system. The six simulated runtime tests cover consent
|
|
115
|
+
reduction, cancellation, token-response precedence, file persistence, owner
|
|
116
|
+
isolation, refresh rotation, input validation, provider errors and disconnect.
|
|
117
|
+
No live user data or generated application was exercised.
|
|
118
|
+
|
|
119
|
+
## Application ownership, callbacks and capacity
|
|
120
|
+
|
|
121
|
+
The documented initial registration workflow is the dashboard. No supported
|
|
122
|
+
public API for creating OAuth client registrations was established in this pass.
|
|
123
|
+
An AI can prepare JSON, callback handlers and runtime composition after an owner
|
|
124
|
+
creates and authorizes the registration; approval remains a provider process.
|
|
125
|
+
|
|
126
|
+
The application owner creates the provider registration and stores its secret
|
|
127
|
+
in the application's private Env. Public Vibe64, Vibe64 Online and CLI users use
|
|
128
|
+
this same ownership model. The configuration file holds the client ID and Env
|
|
129
|
+
references; the editor does not own the application's grants.
|
|
130
|
+
|
|
131
|
+
Register the exact callback implemented by the application. For a hosted project,
|
|
132
|
+
start with its assigned application URL and append the implemented callback path.
|
|
133
|
+
Save that same URL through the application's callback Env reference. On a domain
|
|
134
|
+
or host change, update both the provider registration and callback Env if the URL
|
|
135
|
+
changes. Preserve the application's identity and persistent grant store when
|
|
136
|
+
moving it; neither a new editor URL nor a new hosting address creates a new owner.
|
|
137
|
+
See the [callback guide](../../connectors-core/docs/oauth-callbacks.md) and
|
|
138
|
+
[application setup command](../../connectors-core/docs/setup-command.md).
|
|
139
|
+
|
|
140
|
+
Separate client IDs do not guarantee isolation from user/account limits; verify
|
|
141
|
+
those limits for the approved applications.
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
## Accepted data coverage
|
|
145
|
+
|
|
146
|
+
The project-owned adapter provides dailySleep.list, sleep.list,
|
|
147
|
+
dailyReadiness.list and dailyActivity.list under daily permission. Supply
|
|
148
|
+
start_date/end_date (YYYY-MM-DD). heartRate.list separately requires heartrate;
|
|
149
|
+
use start_datetime/end_datetime with an explicit timezone. Optional next_token
|
|
150
|
+
is opaque; invoke again explicitly until it is absent. Start cannot exceed end.
|
|
151
|
+
A user may decline heart-rate permission without preventing daily sleep access.
|
|
152
|
+
|
|
153
|
+
The same service.invoke/configuration/Env/store contract works from a CLI app.
|
|
154
|
+
Other frameworks use their native OAuth client and these Oura V2 endpoints,
|
|
155
|
+
with per-user grants; Vibe64 holds no health-data gateway. The app owns charts,
|
|
156
|
+
refresh scheduling, user access policy and private storage.
|
|
157
|
+
|
|
158
|
+
**LIMITATIONS:** No continuous sync/webhooks, health dashboard, workouts, tags,
|
|
159
|
+
sessions or SpO2 operations; no coding-chat attachment. Example: fetch sleep and
|
|
160
|
+
readiness history, then build the chart in the app. No live/generated-app proof.
|
|
161
|
+
Source: [Oura V2 API and linked OpenAPI1.37](https://cloud.ouraring.com/v2/docs).
|
package/docs/paddle.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Paddle
|
|
2
|
+
|
|
3
|
+
Import `paddleProvider` from `@jskit-ai/connectors-catalog/server/paddle`.
|
|
4
|
+
This adapter reads a Paddle Billing product catalogue and creates products and prices. Checkout creation,
|
|
5
|
+
merchant activation and payment processing are separate application work.
|
|
6
|
+
|
|
7
|
+
## Configure access
|
|
8
|
+
|
|
9
|
+
First [create or sign into your own Paddle account](https://login.paddle.com/signup).
|
|
10
|
+
Follow Paddle's [account signup instructions](https://www.paddle.com/help/start/intro-to-paddle/essentials-to-sign-upcreate-a-paddle-account)
|
|
11
|
+
and complete the requested seller verification in its dashboard. Use a sandbox
|
|
12
|
+
account for testing; a saved sandbox key does not approve your business or enable
|
|
13
|
+
live payments. The merchant is the business receiving payments, not a customer
|
|
14
|
+
or business record created through the billing API.
|
|
15
|
+
|
|
16
|
+
1. Sign into the intended Paddle sandbox or live account. Open **Developer
|
|
17
|
+
tools → Authentication → API keys → New API key**.
|
|
18
|
+
2. Enter a descriptive name, choose the `product.read` permission and an expiry
|
|
19
|
+
appropriate to your application. Add `product.write` for product creation and
|
|
20
|
+
`price.write` for price creation, and `notification_setting.write` to edit
|
|
21
|
+
notification destinations. Save the key and copy its secret when shown.
|
|
22
|
+
This is a backend API key; a frontend client token cannot replace it.
|
|
23
|
+
[Authentication setup](https://developer.paddle.com/api-reference/about/authentication).
|
|
24
|
+
3. Put the secret in backend Env as `PADDLE_API_KEY`. Save provider `paddle`,
|
|
25
|
+
mode `shared` or `assistant`, `scopes: []`, and authentication
|
|
26
|
+
`{ "method": "api-key", "secretRef": "env:PADDLE_API_KEY" }`.
|
|
27
|
+
4. Set `settings.environment` to `sandbox` (the default) or `live`, matching the
|
|
28
|
+
account that issued the key. The editor exposes the same choice as
|
|
29
|
+
**Environment**. Sandbox calls use `https://sandbox-api.paddle.com`; live
|
|
30
|
+
calls use `https://api.paddle.com`. Requests specify `Paddle-Version: 1`.
|
|
31
|
+
[API environments](https://developer.paddle.com/api-reference/about).
|
|
32
|
+
5. Call `connectApiKey` to verify product access. A changed environment requires
|
|
33
|
+
verification again. Local disconnect removes local access state; revoke a
|
|
34
|
+
key in the Paddle dashboard when remote access should end.
|
|
35
|
+
|
|
36
|
+
## Runtime and AI composition
|
|
37
|
+
|
|
38
|
+
`products.list` calls `GET /products`. Inputs are `per_page` (1–200, default
|
|
39
|
+
50), `after` (the previous page's final product ID), and `status` (`active` by
|
|
40
|
+
default or `archived`). Results retain `data` and `meta.pagination`, including
|
|
41
|
+
`has_more`. Extract the next cursor rather than treating a returned URL as an
|
|
42
|
+
arbitrary authenticated request destination.
|
|
43
|
+
[Product listing](https://developer.paddle.com/api-reference/products/list-products).
|
|
44
|
+
|
|
45
|
+
`products.create` calls `POST /products`. Supply `name` (1–200 characters),
|
|
46
|
+
`tax_category` from the provider's supported categories, and optionally
|
|
47
|
+
`description` (up to 2048 characters). It creates the product only; retain its
|
|
48
|
+
returned `data.id` for the next operation.
|
|
49
|
+
[Create product](https://developer.paddle.com/api-reference/products/create-product/).
|
|
50
|
+
|
|
51
|
+
`prices.create` calls `POST /prices`. Supply `product_id`, `description`
|
|
52
|
+
(2–500 characters), and `unit_price: { amount: "1200", currency_code: "USD" }`.
|
|
53
|
+
Amounts are integer strings in the currency's smallest unit. The currency must
|
|
54
|
+
be supported by Paddle. Omit `billing_cycle` for a one-time price, or supply
|
|
55
|
+
`{ interval: "month", frequency: 1 }` for a monthly recurring price. Other
|
|
56
|
+
intervals are `day`, `week` and `year`, with a positive integer frequency.
|
|
57
|
+
[Create price](https://developer.paddle.com/api-reference/prices/create-price/).
|
|
58
|
+
|
|
59
|
+
Product and price writes are separate requests, not an atomic transaction.
|
|
60
|
+
If price creation fails after product creation, retain the product ID and
|
|
61
|
+
resolve the failed price step rather than recreating the product. The adapter
|
|
62
|
+
does not retry failed writes. A network failure can leave an unknown outcome;
|
|
63
|
+
inspect the merchant catalogue before deciding whether to repeat the action.
|
|
64
|
+
These operations create catalogue entries; they do not charge a customer.
|
|
65
|
+
|
|
66
|
+
Use the [API-key pattern](../patterns/api-key-connection/PATTERN.md) and the file
|
|
67
|
+
connection store. An AI can compose a product picker from this operation without
|
|
68
|
+
creating transactions. Unsupported settings and excessive page sizes fail
|
|
69
|
+
locally. Tests exercise sandbox/live routing, verification, result validation,
|
|
70
|
+
file restart, ownership and failure handling with simulated HTTP responses.
|
|
71
|
+
|
|
72
|
+
## Edit a webhook destination
|
|
73
|
+
|
|
74
|
+
In Paddle, open **Developer tools → Notifications**, choose the destination's
|
|
75
|
+
menu, then **Edit destination**. The same change can be made by calling
|
|
76
|
+
`webhooks.update` with its `notification_setting_id` (`ntfset_…`) and the fields
|
|
77
|
+
to change. At least one change is required. Supported fields are `description`,
|
|
78
|
+
`destination`, `active`, `api_version`, `include_sensitive_fields`,
|
|
79
|
+
`subscribed_events`, and `traffic_source` (`platform`, `simulation`, or `all`).
|
|
80
|
+
The provider validates the destination against its existing URL/email type.
|
|
81
|
+
[Update API](https://developer.paddle.com/api-reference/notification-settings/update-notification-setting/).
|
|
82
|
+
|
|
83
|
+
Send the **complete desired event list** when changing `subscribed_events`;
|
|
84
|
+
omitted events are unsubscribed. Omit the field to preserve subscriptions.
|
|
85
|
+
The adapter keeps omitted settings unchanged and removes `endpoint_secret_key`
|
|
86
|
+
from the result. Store the signing secret separately in the app's backend Env
|
|
87
|
+
when provisioning the destination. The application owns the HTTP receiver,
|
|
88
|
+
signature verification and event handling. This operation neither creates
|
|
89
|
+
that receiver nor confirms that deliveries succeed.
|
|
90
|
+
[Dashboard instructions](https://developer.paddle.com/webhooks/about/notification-destinations/).
|
|
91
|
+
|
|
92
|
+
## Domain approval and going live
|
|
93
|
+
|
|
94
|
+
`checkoutDomains.get` accepts `domain_id` (`chedom_…`) and reads the provider's
|
|
95
|
+
approval status. Grant `checkout_domain.read` to the API key. In assistant mode
|
|
96
|
+
this operation uses the `goLive.check` policy. Preserve the returned status:
|
|
97
|
+
`pending_review`, `in_review`, `action_required`, `rejected`, or `approved`.
|
|
98
|
+
An approved domain does not establish seller verification, working checkout,
|
|
99
|
+
correct app entitlements or successful webhook delivery.
|
|
100
|
+
[Domain status API](https://developer.paddle.com/api-reference/checkout-domains/get-checkout-domain/).
|
|
101
|
+
|
|
102
|
+
For production, use Paddle's dashboard to complete seller setup. Configure
|
|
103
|
+
**Checkout → Checkout settings** with the approved website's payment link.
|
|
104
|
+
Review **Catalog → Products** and **Catalog → Taxable categories**, and configure
|
|
105
|
+
payouts under **Business account → Payouts → Payout settings**. Create live keys
|
|
106
|
+
and a frontend client token under **Developer tools → Authentication**, plus
|
|
107
|
+
live webhook destinations under **Developer tools → Notifications**. Replace
|
|
108
|
+
sandbox catalogue IDs and credentials in the app. Sandbox IDs do not identify
|
|
109
|
+
live products. The connector does not copy catalogues on deployment or inspect
|
|
110
|
+
legal pages, and never labels a connected key “ready to accept payments.”
|
|
111
|
+
[Go-live guide](https://developer.paddle.com/build/go-live-checklist/).
|
|
112
|
+
|
|
113
|
+
## Automation and application ownership
|
|
114
|
+
|
|
115
|
+
The documented initial key setup is through the dashboard. This research has
|
|
116
|
+
not established an API that creates the initial merchant account or API key.
|
|
117
|
+
The [public API reference](https://developer.paddle.com/api-reference/) does not
|
|
118
|
+
establish a supported merchant-provisioning path for this connector. Create the
|
|
119
|
+
merchant through the provider signup flow above; do not substitute the customer
|
|
120
|
+
or business creation endpoints. Any partner-only onboarding would require a
|
|
121
|
+
separate documented provider agreement and implementation. It is not a hidden
|
|
122
|
+
requirement for this project's runtime or export.
|
|
123
|
+
Paddle documents automatic key rotation through AWS Secrets Manager for keys
|
|
124
|
+
created with the Rotatable option; this fragment does not provision that
|
|
125
|
+
integration. [Rotation workflow](https://developer.paddle.com/api-reference/about/rotate-api-keys).
|
|
126
|
+
|
|
127
|
+
An AI can prepare configuration and runtime wiring after credential bootstrap.
|
|
128
|
+
The merchant owner still handles account access, verification and activation.
|
|
129
|
+
Sandbox/live is a testing/production choice, not a free/paid quota partition.
|
|
130
|
+
Separate keys in one merchant account do not establish separate account limits
|
|
131
|
+
or balances. The application owner supplies credentials for its intended merchant
|
|
132
|
+
account; the editor does not supply a merchant account or shared capacity.
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
## Assistant permissions and payment workflow ownership
|
|
136
|
+
|
|
137
|
+
The provider declares the captured enable, recommendation, product/price,
|
|
138
|
+
batch-product, go-live, read/write and webhook-edit permission controls.
|
|
139
|
+
`products.list` maps to `api.read`. In assistant execution mode the connection
|
|
140
|
+
service enforces its configured ask/always/never policy before invocation.
|
|
141
|
+
The host must bind an approval to the authenticated caller and exact arguments;
|
|
142
|
+
a policy cannot grant missing Paddle permissions.
|
|
143
|
+
|
|
144
|
+
For host-owned actions, use `authorizeAssistantAction` with the declared action
|
|
145
|
+
and exact input before executing the host's implementation. This method only
|
|
146
|
+
authorizes; it does not create a merchant, product, price, payment or webhook.
|
|
147
|
+
The adapter supplies product listing, product creation, price creation and
|
|
148
|
+
existing webhook-destination updates.
|
|
149
|
+
The [catalogue recipe](../patterns/paddle-catalogue/PATTERN.md) composes
|
|
150
|
+
product-with-price and batch workflows with a partial-success report. Domain
|
|
151
|
+
approval can be read explicitly; full go-live readiness and arbitrary read/write
|
|
152
|
+
actions remain outstanding and must not be advertised as executable merely because
|
|
153
|
+
permission controls exist. No unrestricted API URL or write proxy is exposed.
|
|
154
|
+
JSKIT owns the JavaScript configuration/runtime contract; Laravel applications
|
|
155
|
+
use their own Paddle SDK and authorization implementation. Vibe64 edits the
|
|
156
|
+
project configuration and does not become the merchant account owner.
|
|
157
|
+
|
|
158
|
+
## Full application payments
|
|
159
|
+
|
|
160
|
+
This connector's operations are only part of a billing implementation. For
|
|
161
|
+
checkout, subscriptions, feature access, renewal credits and durable catalogue
|
|
162
|
+
mappings, read [payments-core](../../payments-core/README.md) and its
|
|
163
|
+
[standalone composition guide](../../payments-core/docs/standalone.md). These
|
|
164
|
+
JavaScript libraries work from ordinary app code or a CLI without Vibe64 or
|
|
165
|
+
Genesis. Other frameworks consume the [portable contract](../../payments-core/docs/contract.md)
|
|
166
|
+
and its static examples using their own runtime libraries. Keep provider setup
|
|
167
|
+
from this guide; do not substitute a successful connection check for working
|
|
168
|
+
checkout, verified webhooks or merchant approval.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Perplexity
|
|
2
|
+
|
|
3
|
+
Import `perplexityProvider` from
|
|
4
|
+
`@jskit-ai/connectors-catalog/server/perplexity`.
|
|
5
|
+
The adapter verifies credentials with async-request summaries. The app-owned native-client recipe below uses this same saved slot for cited answers and streaming.
|
|
6
|
+
|
|
7
|
+
## Configure access
|
|
8
|
+
|
|
9
|
+
1. Sign into the Perplexity API console. Open **Projects** and create or select
|
|
10
|
+
the project that should own these credentials.
|
|
11
|
+
2. Open **API Keys**, generate the initial key, and copy its value before
|
|
12
|
+
navigating away. Store it in backend Env as `PERPLEXITY_API_KEY`.
|
|
13
|
+
3. Save provider `perplexity`, mode `shared` or `assistant`, `scopes: []`, and
|
|
14
|
+
authentication
|
|
15
|
+
`{ "method": "api-key", "secretRef": "env:PERPLEXITY_API_KEY" }`.
|
|
16
|
+
4. Run `connectApiKey` to verify the authenticated async-request listing.
|
|
17
|
+
Provider revocation remains separate from local disconnect.
|
|
18
|
+
[Key management](https://docs.perplexity.ai/docs/admin/api-key-management).
|
|
19
|
+
|
|
20
|
+
## Runtime and AI composition
|
|
21
|
+
|
|
22
|
+
`requests.list` calls `GET https://api.perplexity.ai/v1/async/sonar` using
|
|
23
|
+
Bearer authorization. The result contains `requests` and may contain
|
|
24
|
+
`next_token`. This fragment exposes the initial page only: the reference read
|
|
25
|
+
in this pass did not specify a continuation query parameter, so none is
|
|
26
|
+
invented. It does not submit or resume a generation job.
|
|
27
|
+
[Async list](https://docs.perplexity.ai/api-reference/async-sonar-get).
|
|
28
|
+
|
|
29
|
+
`models.list` calls `GET /v1/models` and returns the provider's `object: list`
|
|
30
|
+
envelope. That endpoint is public and therefore is not used to verify the key.
|
|
31
|
+
Both operations accept no input. Model names remain provider data rather than
|
|
32
|
+
hard-coded choices. [Model list](https://docs.perplexity.ai/api-reference/models-get).
|
|
33
|
+
|
|
34
|
+
Use the [API-key pattern](../patterns/api-key-connection/PATTERN.md) with this
|
|
35
|
+
provider and the private file store. AI-written source can present model
|
|
36
|
+
choices or previous request statuses. For answer generation and streaming, use the supplied app-owned recipe below.
|
|
37
|
+
|
|
38
|
+
## Automation and application ownership
|
|
39
|
+
|
|
40
|
+
After the console project and initial key exist, an authorized AI can create
|
|
41
|
+
additional keys with `POST /generate_auth_token`, Bearer auth and
|
|
42
|
+
`{ "token_name": "application-name" }`. Capture `auth_token` once into Env.
|
|
43
|
+
`POST /revoke_auth_token` accepts the old `auth_token` for retirement after
|
|
44
|
+
replacement. These administrative operations are not invoked by the fragment.
|
|
45
|
+
[Provisioning API](https://docs.perplexity.ai/docs/admin/api-key-management).
|
|
46
|
+
|
|
47
|
+
The application owner supplies its own token and checks overlapping project and
|
|
48
|
+
account limits. Token labels alone do not isolate capacity. Billing remains
|
|
49
|
+
between that owner and Perplexity; this adapter does not assign platform credits.
|
|
50
|
+
|
|
51
|
+
Tests verify authenticated checking, request paths, result validation, key
|
|
52
|
+
rotation, restart, isolation and HTTP errors without live service use.
|
|
53
|
+
|
|
54
|
+
## Complete native-client recipe
|
|
55
|
+
|
|
56
|
+
Use [perplexity-answer.js](../patterns/ai-connections/example/perplexity-answer.js)
|
|
57
|
+
from the existing AI-connections pattern. Your app supplies its native SDK factory:
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
import OpenAI from "openai"; // installed and owned by the application
|
|
61
|
+
import { createPerplexityAnswers } from "./perplexity-answer.js";
|
|
62
|
+
const answer = createPerplexityAnswers({ configuration, authorize,
|
|
63
|
+
createClient: options => new OpenAI(options) });
|
|
64
|
+
const response = await answer({ context, integrationId: "research",
|
|
65
|
+
model: "sonar", question: "What does the source report?" });
|
|
66
|
+
// response.choices[0].message.content, response.citations, response.search_results
|
|
67
|
+
const chunks = await answer({ context, integrationId: "research", model: "sonar",
|
|
68
|
+
question: "Summarize the source", stream: true, signal });
|
|
69
|
+
for await (const chunk of chunks) { /* render delta text; retain final citations */ }
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The slot is provider perplexity, authentication api-key and your own secretRef;
|
|
73
|
+
there is no second AI configuration or model catalogue to maintain. The app's
|
|
74
|
+
policy authorizes the exact question/model/mode before Env access. Keys resolve
|
|
75
|
+
on every call, so rotation applies without rewriting source. CLI apps use the
|
|
76
|
+
same recipe; other frameworks read the slot and use their native SDK directly.
|
|
77
|
+
|
|
78
|
+
**LIMITATIONS:** No premade research/chat screen, persistent conversation, budget
|
|
79
|
+
manager, Agent API orchestration or automatic coding-chat attachment. Example:
|
|
80
|
+
a backend can request a cited answer; the app owns rendering and spending rules.
|
|
81
|
+
The adapter's async-history listing still only reads its initial page. Live
|
|
82
|
+
provider behavior and generated-app execution are unproven.
|
|
83
|
+
|
|
84
|
+
[Native compatibility](https://docs.perplexity.ai/docs/sonar/openai-compatibility)
|
|
85
|
+
and [streaming](https://docs.perplexity.ai/docs/sonar/pro-search/stream-mode).
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Pipedrive
|
|
2
|
+
|
|
3
|
+
Import `pipedriveProvider` from `@jskit-ai/connectors-catalog/server/pipedrive`.
|
|
4
|
+
The adapter reads the authenticated profile using an API token or project-owned
|
|
5
|
+
OAuth registration, and provides the CRM operations listed below.
|
|
6
|
+
|
|
7
|
+
## Configure access
|
|
8
|
+
|
|
9
|
+
1. Sign into Pipedrive and switch to the intended company. A user has a distinct
|
|
10
|
+
token in each company.
|
|
11
|
+
2. Open the top-right account menu, **Company settings → Personal preferences → API**.
|
|
12
|
+
3. Copy the existing API token. If the API section is missing, follow Pipedrive's
|
|
13
|
+
enablement guidance with the company administrator.
|
|
14
|
+
4. Store it in backend Env as `PIPEDRIVE_API_KEY`. Only one active user token
|
|
15
|
+
exists for that company; regenerating it can affect other connected tools.
|
|
16
|
+
5. Save provider `pipedrive`, mode `shared` or `assistant`, `scopes: []`, and
|
|
17
|
+
authentication `{ "method": "api-key", "secretRef": "env:PIPEDRIVE_API_KEY" }`.
|
|
18
|
+
6. Verify with `connectApiKey`. Manage the original credential through the API
|
|
19
|
+
settings page. [Token setup](https://pipedrive.readme.io/docs/how-to-find-the-api-token).
|
|
20
|
+
|
|
21
|
+
## OAuth setup
|
|
22
|
+
|
|
23
|
+
1. Use a developer sandbox account. Open the account menu → Developer Hub →
|
|
24
|
+
Create an app. Choose private for an unlisted integration or public for a
|
|
25
|
+
Marketplace listing; the type cannot be changed later.
|
|
26
|
+
2. In Basic info enter the app name and exact project callback, then Save.
|
|
27
|
+
Pipedrive permits one callback per registration. The generated application
|
|
28
|
+
must serve it; its initial hosting URL is the suggested origin.
|
|
29
|
+
3. OAuth & access scopes contains Client ID and Client secret. Copy the ID
|
|
30
|
+
into the project registration and store the secret in private Env, for
|
|
31
|
+
example `PIPEDRIVE_CLIENT_SECRET`. Store the registered callback in
|
|
32
|
+
`PIPEDRIVE_CALLBACK_URL`. Registration authentication is `client_secret_basic`.
|
|
33
|
+
4. This adapter needs only the default `base` permission. Leave configuration
|
|
34
|
+
`scopes: []`: permissions are selected in Pipedrive's registration rather
|
|
35
|
+
than dynamically selected here. CRM reads/writes require the corresponding
|
|
36
|
+
implementation and provider permissions.
|
|
37
|
+
5. A private draft is limited to its own company. Use Change to live to allow
|
|
38
|
+
other companies to install it. Public Marketplace publication has a separate
|
|
39
|
+
review process. [Private registration](https://pipedrive.readme.io/docs/marketplace-registering-a-private-app),
|
|
40
|
+
[Developer Hub states](https://pipedrive.readme.io/docs/developer-hub).
|
|
41
|
+
6. Save authentication `{ "method": "oauth2", "registrationRef": "pipedrive" }`
|
|
42
|
+
and an own registration with Client ID, the two Env references and Basic
|
|
43
|
+
authentication. Use `per-user` for independent application-user grants,
|
|
44
|
+
`shared` for a shared application account, or `assistant` for assistant use.
|
|
45
|
+
7. Start `beginAuthorization`, redirect to consent, and complete the exact
|
|
46
|
+
callback with `completeAuthorization`. The user selects their company and
|
|
47
|
+
allows installation. This connects CRM access, not application login.
|
|
48
|
+
|
|
49
|
+
The provider's [OAuth contract](https://pipedrive.readme.io/docs/marketplace-oauth-authorization)
|
|
50
|
+
uses confidential Basic authentication and form-encoded token requests. The
|
|
51
|
+
adapter uses the existing runtime's non-PKCE confidential flow. Each grant
|
|
52
|
+
retains the validated `api_domain` returned by the provider. Only a bare HTTPS
|
|
53
|
+
company subdomain of `pipedrive.com` is accepted. API calls use that company's
|
|
54
|
+
`/api/v1/users/me` with a bearer token. Refresh must return the same domain;
|
|
55
|
+
a change requires reconnection. A custom project domain changes the registered
|
|
56
|
+
callback, not the connected Pipedrive company.
|
|
57
|
+
|
|
58
|
+
## Runtime and CLI composition
|
|
59
|
+
|
|
60
|
+
In API-token mode, `profile.read` sends `GET https://api.pipedrive.com/v1/users/me` with
|
|
61
|
+
`x-api-token`. It takes no operation inputs and returns the `success`/`data`
|
|
62
|
+
envelope, including user and available company metadata. The verifier requires
|
|
63
|
+
`success: true` and a numeric user ID; malformed successful HTTP responses are
|
|
64
|
+
not accepted as connections. The global discovery endpoint is documented by
|
|
65
|
+
Pipedrive's [company-domain guide](https://pipedrive.readme.io/docs/how-to-get-the-company-domain).
|
|
66
|
+
|
|
67
|
+
Use the [API-key pattern](../patterns/api-key-connection/PATTERN.md) with this
|
|
68
|
+
provider. Do not send the token in query parameters or store it in source JSON.
|
|
69
|
+
Connection metadata belongs to the runtime's private file directory.
|
|
70
|
+
|
|
71
|
+
## Automation and application registrations
|
|
72
|
+
|
|
73
|
+
An AI can prepare files and validate requests after the owner supplies their
|
|
74
|
+
token or OAuth registration. No ordinary-account API for
|
|
75
|
+
unattended app registration was established in this pass.
|
|
76
|
+
|
|
77
|
+
The application owner supplies its authorized user token through private Env.
|
|
78
|
+
Separate configuration names still reference the same user/company capacity.
|
|
79
|
+
The project owns its registration, callback handler, Env secrets and private
|
|
80
|
+
grants. Vibe64 configures these values; it does not operate a central gateway.
|
|
81
|
+
JSKIT supplies the JavaScript runtime; Laravel implements the same provider
|
|
82
|
+
contract with its own framework. Disconnect deletes the local grant; revoke
|
|
83
|
+
provider access separately by uninstalling the app in Pipedrive.
|
|
84
|
+
OAuth fixtures cover two-company routing, refresh rotation after restart,
|
|
85
|
+
callback replay, rejected API destinations and company changes on refresh.
|
|
86
|
+
Local fixtures cover headers, file-store restart, rotation, tenant isolation,
|
|
87
|
+
invalid responses, forbidden requests and rate limits. No Pipedrive account or
|
|
88
|
+
record was accessed.
|
|
89
|
+
## CRM operations
|
|
90
|
+
|
|
91
|
+
Set settings.companyDomain for API-token record calls: copy `acme` from
|
|
92
|
+
`https://acme.pipedrive.com`. OAuth instead uses its stored provider-issued company
|
|
93
|
+
address; settings cannot override that grant. Changing settings requires recheck.
|
|
94
|
+
Missing domain fails before sending CRM traffic; profile checking remains global.
|
|
95
|
+
|
|
96
|
+
Use list/get/create/update for deals, persons, organizations, activities and
|
|
97
|
+
leads. Pipelines support list/get only. Standard objects use v2; leads use v1.
|
|
98
|
+
List inputs limit/cursor (v2) or limit/start (leads); preserve additional_data
|
|
99
|
+
and explicitly request subsequent pages. Creation requires title (deal/lead),
|
|
100
|
+
name (person/organization), subject (activity). Leads also need person_id or
|
|
101
|
+
organization_id. Update takes numeric id (lead UUID) and changed fields.
|
|
102
|
+
Persons support emails/phones arrays of value, primary and label. Deals accept
|
|
103
|
+
value/currency/status, owner/person/org/stage IDs; activities accept links,
|
|
104
|
+
done and due_date/due_time. Provider validates actual company IDs/field values.
|
|
105
|
+
|
|
106
|
+
In Developer Hub OAuth & access scopes choose deals:read/full, contacts:read/full,
|
|
107
|
+
activities:read/full for the selected operations, then reconnect. These are
|
|
108
|
+
registration-controlled capabilities, not dynamically selected scope checkboxes.
|
|
109
|
+
Provider permissions and the app's own record/write policy both apply. Verification
|
|
110
|
+
never creates a CRM record; uncertain writes are not automatically replayed.
|
|
111
|
+
|
|
112
|
+
CLI uses service.invoke with the same JSON/Env and authorized local operator.
|
|
113
|
+
Other frameworks use these endpoints with their native client and company-bound
|
|
114
|
+
OAuth grant. No central Vibe64 credential gateway.
|
|
115
|
+
**LIMITATIONS:** No full CRM UI, pipeline administration, custom fields/bulk import,
|
|
116
|
+
attachments, webhooks or coding-chat attachment. Example: create a contact and
|
|
117
|
+
follow-up deal; build the sales dashboard in the application. No live/generated-app proof.
|
|
118
|
+
[Records](https://developers.pipedrive.com/docs/api/v1/Deals),
|
|
119
|
+
[permissions](https://pipedrive.readme.io/docs/marketplace-scopes-and-permissions-explanations),
|
|
120
|
+
[company routing](https://developers.pipedrive.com/tutorials/get-deals-pipedrive-api).
|
package/docs/polar.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Polar
|
|
2
|
+
|
|
3
|
+
Import `polarProvider` from `@jskit-ai/connectors-catalog/server/polar`.
|
|
4
|
+
This is the Polar.sh commerce service. The fragment reads products through an
|
|
5
|
+
Organization Access Token; merchant activation and payment creation are separate.
|
|
6
|
+
|
|
7
|
+
## Configure access
|
|
8
|
+
|
|
9
|
+
1. Open the intended organization in the Polar dashboard, then **Settings**.
|
|
10
|
+
Scroll to **Developers → New Token**.
|
|
11
|
+
2. Give the token an application-specific name and expiration. Select
|
|
12
|
+
`products:read`, create the token and copy it into backend Env as `POLAR_OAT`.
|
|
13
|
+
[Token setup](https://polar.sh/docs/integrate/oat).
|
|
14
|
+
3. Save provider `polar`, mode `shared` or `assistant`, `scopes: []`, and
|
|
15
|
+
authentication `{ "method": "api-key", "secretRef": "env:POLAR_OAT" }`.
|
|
16
|
+
The requested permission was assigned when creating the token, not through
|
|
17
|
+
an OAuth consent flow in this configuration.
|
|
18
|
+
4. Choose `settings.environment: "sandbox"` (default) or `"production"`.
|
|
19
|
+
Sandbox has separate organizations, data and tokens. Its origin is
|
|
20
|
+
`https://sandbox-api.polar.sh`; production uses `https://api.polar.sh`.
|
|
21
|
+
[Environments and authentication](https://polar.sh/docs/api-reference/introduction).
|
|
22
|
+
5. Call `connectApiKey` to verify product access. A customer access token does
|
|
23
|
+
not replace this organization credential. Changing environments requires
|
|
24
|
+
verification again. Local disconnect does not revoke the remote token.
|
|
25
|
+
|
|
26
|
+
## Runtime and AI composition
|
|
27
|
+
|
|
28
|
+
`products.list` reads `GET /v1/products/`, including the trailing slash to avoid
|
|
29
|
+
an authenticated redirect. Inputs are `page` (default 1), `limit` (1–100, default
|
|
30
|
+
10), optional product-name `query`, `is_archived` and `is_recurring` booleans.
|
|
31
|
+
The result retains `items` and `pagination` (`total_count`, `max_page`). Increment
|
|
32
|
+
the page until `max_page`. Additional array, metadata and sorting filters are
|
|
33
|
+
outside this operation's supported inputs.
|
|
34
|
+
[Product listing](https://polar.sh/docs/api-reference/2026-04/products/list-products).
|
|
35
|
+
|
|
36
|
+
Use the [API-key pattern](../patterns/api-key-connection/PATTERN.md) and file store
|
|
37
|
+
to compose a product catalogue or picker. Creating checkout sessions, processing
|
|
38
|
+
webhooks and connecting other merchants through OAuth are further application
|
|
39
|
+
work. Replace Env credentials on rotation and revoke obsolete tokens in Polar.
|
|
40
|
+
Tests cover pagination, sandbox/production routing, invalid settings, credential
|
|
41
|
+
replacement, persistence and failures with simulated provider responses.
|
|
42
|
+
|
|
43
|
+
## Automation and application ownership
|
|
44
|
+
|
|
45
|
+
The documented OAT bootstrap is the organization dashboard; this pass does not
|
|
46
|
+
establish a public token-creation API. Polar does document organization creation
|
|
47
|
+
through `POST /v1/organizations/` with `organizations:write`, a name and slug.
|
|
48
|
+
That needs existing authorized access and does not complete merchant review or
|
|
49
|
+
activate payments. [Organization API](https://polar.sh/docs/api-reference/organizations/create).
|
|
50
|
+
|
|
51
|
+
An AI can prepare configuration and compose runtime calls after bootstrap.
|
|
52
|
+
Each application supplies a token belonging to its intended organization and
|
|
53
|
+
billing owner. Tokens within one organization share its applicable limits;
|
|
54
|
+
sandbox/production separates test and real commerce. The editor supplies no
|
|
55
|
+
shared registration, token pool or merchant account.
|
|
56
|
+
|
|
57
|
+
## Existing-scope closeout — 13 September 2026
|
|
58
|
+
|
|
59
|
+
The existing app-owned Organization Access Token adapter lists a Polar.sh product catalogue in sandbox or production, with bounded page/name/archive/recurrence filters and environment-bound verification.
|
|
60
|
+
|
|
61
|
+
This is NOT the captured personal builder MCP/billing-context experience: coding-assistant attachment and MCP authentication/tools remain deferred. No managed payments, merchant onboarding, checkout, subscription/customer/order management, refunds, webhooks, credits/entitlements, catalogue writes/synchronization or customer login is shipped by this adapter. No merchant OAuth, customer-access-token mode, token provisioning, extra array/metadata/sort filters or automatic pagination. Changing environment requires verification; local disconnect does not revoke the token. The app supplies its own organization token, permissions, UI and access policy. To extend: implement the separately deferred editor tool bridge for the captured use case; require a separate scope decision before adding an app billing product. Do not infer Stripe/Paddle parity from this catalogue reader. No live provider account, provider registration, paid request or generated-application execution was tested. No new editor coding-assistant tool attachment is claimed. Other frameworks use the same project configuration and their own native tools; JSKIT is optional.
|
|
62
|
+
|
|
63
|
+
2 Polar-specific plus 2 shared environment/pagination source checks passed, and the same 4 installed-package checks passed on September 13. Existing shared token/environment form evidence is retained; no fresh browser run.
|