@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/slack.md
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
# Slack
|
|
2
|
+
|
|
3
|
+
## Delivered connector
|
|
4
|
+
|
|
5
|
+
Import `slackProvider` from `@jskit-ai/connectors-catalog/server/slack`.
|
|
6
|
+
It completes an own-registration OAuth flow as either the connecting person or
|
|
7
|
+
an installed bot, then reads channel lists, message history and user profiles, and posts text messages. The
|
|
8
|
+
shared library owns consent, token selection, refresh, operation validation and
|
|
9
|
+
encrypted file persistence. Application code supplies authenticated ownership,
|
|
10
|
+
reference resolution and callback routes. No database is required.
|
|
11
|
+
|
|
12
|
+
The configuration form retains the captured 57 distinct permissions: 52 apply to
|
|
13
|
+
users and 49 to bots. Its initial selection is `channels:read` and
|
|
14
|
+
`channels:history`; only `channels:read` is needed for the implemented connection
|
|
15
|
+
check. Keep history when using channels.history; deselect it for list-only applications. Saving another permission does not
|
|
16
|
+
implement its operation. Switching actor removes incompatible permissions and
|
|
17
|
+
preserves compatible selections; switching back does not restore removed ones.
|
|
18
|
+
|
|
19
|
+
`settings.actor` and `accountMode` answer different questions. Actor selects the
|
|
20
|
+
Slack identity, while account mode controls ownership in the application. An
|
|
21
|
+
individually owned bot connection still acts as the installed workspace bot;
|
|
22
|
+
it does not become a personal Slack account. Host membership checks remain
|
|
23
|
+
necessary before exposing a shared connection. This adapter implements neither
|
|
24
|
+
application login nor workspace-member administration.
|
|
25
|
+
|
|
26
|
+
## Manual provider setup
|
|
27
|
+
|
|
28
|
+
1. Open [Your Apps](https://api.slack.com/apps), select **Create New App**, then
|
|
29
|
+
**From scratch**. Enter an **App Name**, select the **Development Workspace**,
|
|
30
|
+
and create it. Use an account authorized to manage that workspace's apps.
|
|
31
|
+
2. Open **OAuth & Permissions**. Under **Redirect URLs**, choose **Add New Redirect
|
|
32
|
+
URL**, enter the backend's complete HTTPS callback, and save the URLs. A plain
|
|
33
|
+
HTTP localhost callback is not accepted by Slack. A CLI can use its own HTTPS
|
|
34
|
+
backend or an HTTPS development tunnel; the editor is not required.
|
|
35
|
+
3. Under **Scopes**, add `channels:read` in **User Token Scopes** for a connected
|
|
36
|
+
user or **Bot Token Scopes** for an installed bot. Add the other read scopes
|
|
37
|
+
from the operation table only when needed. Configure a bot identity under
|
|
38
|
+
**App Home** if the dashboard requests it for a bot installation.
|
|
39
|
+
4. In **Basic Information → App Credentials**, copy **Client ID** into the
|
|
40
|
+
registration. Keep **Client Secret** outside source, under the referenced
|
|
41
|
+
environment variable. Supply the same callback URL through its reference.
|
|
42
|
+
|
|
43
|
+
See Slack's [OAuth installation guide](https://docs.slack.dev/authentication/installing-with-oauth/)
|
|
44
|
+
and [app credential details](https://docs.slack.dev/authentication/using-token-rotation/).
|
|
45
|
+
|
|
46
|
+
5. For new rotating grants, enable token rotation under **OAuth & Permissions**
|
|
47
|
+
before installation. Published apps use **Published App Settings**. Slack
|
|
48
|
+
makes this setting irreversible. The fragment supports both rotating and
|
|
49
|
+
non-rotating new grants; converting an existing long-lived grant with
|
|
50
|
+
`oauth.v2.exchange` is not implemented.
|
|
51
|
+
[Rotation setup](https://docs.slack.dev/authentication/using-token-rotation/).
|
|
52
|
+
6. To install outside the development workspace, open **Manage Distribution →
|
|
53
|
+
Share Your App with Other Workspaces**, complete the displayed checklist,
|
|
54
|
+
then choose **Activate Public Distribution**. Slack directs commercially
|
|
55
|
+
distributed apps through Marketplace review. Workspace administrators can
|
|
56
|
+
require approval or restrict installation to listed apps.
|
|
57
|
+
[Distribution and approval](https://docs.slack.dev/app-management/distribution/).
|
|
58
|
+
7. Save the application configuration below, start its separate consent flow,
|
|
59
|
+
choose a workspace, and approve the requested permissions. Saving a form
|
|
60
|
+
alone does not install anything or report a connected account.
|
|
61
|
+
|
|
62
|
+
## Portable configuration
|
|
63
|
+
|
|
64
|
+
The same `integrations.json` is usable by CLI code and Vibe64's form. Replace
|
|
65
|
+
the Client ID placeholder and supply the two referenced environment values.
|
|
66
|
+
No client secret, access token or refresh token belongs in this file.
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"schemaVersion": 1,
|
|
71
|
+
"integrations": {
|
|
72
|
+
"slack": {
|
|
73
|
+
"provider": "slack",
|
|
74
|
+
"displayName": "Team Slack",
|
|
75
|
+
"accountMode": "per-user",
|
|
76
|
+
"settings": { "actor": "user" },
|
|
77
|
+
"scopes": ["channels:read"],
|
|
78
|
+
"authentication": { "method": "oauth2", "registrationRef": "slack" }
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"registrations": {
|
|
82
|
+
"slack": {
|
|
83
|
+
"source": "own",
|
|
84
|
+
"clientId": "replace-with-your-client-id",
|
|
85
|
+
"clientSecretRef": "env:SLACK_CLIENT_SECRET",
|
|
86
|
+
"callbackUrlRef": "env:SLACK_CALLBACK_URL"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Set `actor` to `bot` for installation as a bot. Use `shared` only when the host's
|
|
93
|
+
policy maps authorized workspace members to the intended shared subject.
|
|
94
|
+
`assistant` ownership is also available; it does not bypass application policy.
|
|
95
|
+
The [OAuth connection pattern](../patterns/oauth-connection/PATTERN.md) shows
|
|
96
|
+
parsing, service composition, encrypted file storage and callback handling.
|
|
97
|
+
Use `slackProvider` in its provider array. Keep runtime state outside exported
|
|
98
|
+
source and retain its encryption key across restarts.
|
|
99
|
+
|
|
100
|
+
## Operations and errors
|
|
101
|
+
|
|
102
|
+
| Operation | Required permission | Result |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| `auth.test` | No additional scope | Connected Slack team and user identity |
|
|
105
|
+
| `channels.list` | `channels:read` | Public-channel metadata; also the connection check |
|
|
106
|
+
| `groups.list` | `groups:read` | Private-channel metadata visible to this identity |
|
|
107
|
+
| `directMessages.list` | `im:read` | Direct-message conversation metadata |
|
|
108
|
+
| `groupMessages.list` | `mpim:read` | Group direct-message conversation metadata |
|
|
109
|
+
|
|
110
|
+
Every list accepts optional `limit` (integer 1–200, default 100), `cursor`
|
|
111
|
+
(opaque nonempty string) and `exclude_archived` (boolean, default false).
|
|
112
|
+
It returns one provider page. Pass `response_metadata.next_cursor` to continue,
|
|
113
|
+
including after an empty filtered page. No automatic paging occurs. Callers
|
|
114
|
+
cannot supply `types`, `team_id`, another API origin or a raw token. This is a
|
|
115
|
+
workspace-installation fragment; organization-wide installation needs additional
|
|
116
|
+
team-selection handling. [Conversation lists](https://docs.slack.dev/reference/methods/conversations.list/),
|
|
117
|
+
[identity check](https://docs.slack.dev/reference/methods/auth.test/).
|
|
118
|
+
|
|
119
|
+
Consent uses `user_scope` for the person and `scope` for the bot. Code exchange
|
|
120
|
+
selects only the requested identity; it cannot silently substitute the other
|
|
121
|
+
token in a response containing both. Refresh validates the same identity.
|
|
122
|
+
Slack's `ok:false` bodies are failures even with HTTP 200. The adapter maps
|
|
123
|
+
revocation, missing permissions, rate limits and malformed replies into bounded
|
|
124
|
+
errors without exposing provider bodies. [OAuth token response contract](https://docs.slack.dev/reference/methods/oauth.v2.access/).
|
|
125
|
+
|
|
126
|
+
The shared service refreshes expiring grants before data requests, serializes
|
|
127
|
+
refresh under the connection lock, and stores new credentials before reuse.
|
|
128
|
+
It starts no background scheduler. Non-expiring grants do not invent an expiry.
|
|
129
|
+
Actor or registration changes invalidate existing attempts and connections.
|
|
130
|
+
Cancelled attempts cannot be completed later. Disconnect removes local access;
|
|
131
|
+
it does not uninstall the Slack app or revoke every grant in that workspace.
|
|
132
|
+
|
|
133
|
+
Socket mode, slash commands, organization-wide
|
|
134
|
+
installs, GovSlack and Sign in with Slack are outside this initial fragment.
|
|
135
|
+
|
|
136
|
+
## Online, public editor and automation
|
|
137
|
+
|
|
138
|
+
Each application owns its provider registration, callback route, credentials
|
|
139
|
+
and grants. Hosted and installed editors configure the same app-owned setup;
|
|
140
|
+
neither supplies a shared Vibe64 registration or token gateway. Use the app's
|
|
141
|
+
assigned public URL as the initial callback origin, append the route the backend
|
|
142
|
+
actually implements, and register the exact URL with the provider. Keep the
|
|
143
|
+
client secret and callback binding in the application's Env.
|
|
144
|
+
|
|
145
|
+
A custom-domain or hosting move that changes the callback requires updating both
|
|
146
|
+
the provider registration and the app's Env. Preserve the application's identity
|
|
147
|
+
and private connection store, validate callback state and initiator, and allow
|
|
148
|
+
only application-approved return destinations. The editor's address is not the
|
|
149
|
+
provider callback. See the [callback contract](../../connectors-core/docs/oauth-callbacks.md)
|
|
150
|
+
and [setup command](../../connectors-core/docs/setup-command.md).
|
|
151
|
+
|
|
152
|
+
Provider distribution approval and workspace administrator decisions apply to
|
|
153
|
+
the actual application. Separate app registrations cannot bypass them.
|
|
154
|
+
|
|
155
|
+
Slack generally meters Web API traffic by method, workspace and app. Callers sharing one registration and Slack workspace share its method allowance. Message delivery and other features have additional limits.
|
|
156
|
+
Application scheduling should respect those actual keys and
|
|
157
|
+
`Retry-After`; this fragment reports throttling without replay or a scheduler.
|
|
158
|
+
Commercial non-Marketplace history/reply access has additional restrictions, so
|
|
159
|
+
future message-reading work must use the then-current method limits.
|
|
160
|
+
[Rate-limit ownership](https://docs.slack.dev/apis/web-api/rate-limits/).
|
|
161
|
+
|
|
162
|
+
**API-assisted registration is possible after operator authorization.** On
|
|
163
|
+
**Your Apps**, locate **Your App Configuration Tokens → Generate Token**. This
|
|
164
|
+
credential is bound to an operator and development workspace, not one app. Keep
|
|
165
|
+
it in the provisioning service; never give it to customer apps. It expires after
|
|
166
|
+
12 hours and has its own `tooling.tokens.rotate` flow, separate from the runtime
|
|
167
|
+
OAuth refresh implemented here. [Manifest API credentials](https://docs.slack.dev/app-manifests/configuring-apps-with-app-manifests/).
|
|
168
|
+
|
|
169
|
+
An AI-assisted provisioning tool can prepare each app manifest, validate it
|
|
170
|
+
through `apps.manifest.validate`, create it with `apps.manifest.create`, and
|
|
171
|
+
update it with `apps.manifest.update`. The manifest holds the display name,
|
|
172
|
+
redirect URLs, user/bot scopes and desired rotation setting. Create each product
|
|
173
|
+
registration separately and record the returned `app_id`, `credentials.client_id`
|
|
174
|
+
and secret through protected operator storage. Check `ok` and validation errors
|
|
175
|
+
before marking provisioning complete. The create response contains secrets and
|
|
176
|
+
must not be logged or copied into a project JSON file.
|
|
177
|
+
[Creation API](https://docs.slack.dev/reference/methods/apps.manifest.create/).
|
|
178
|
+
|
|
179
|
+
The operator still supplies ownership, distribution information, approval and
|
|
180
|
+
consent. This package documents that automation path; it does not ship or run a
|
|
181
|
+
registration provisioner. For a manual manifest path, select **Create New App →
|
|
182
|
+
From a manifest**, select the workspace, paste JSON/YAML, review and create.
|
|
183
|
+
[Manifest UI](https://docs.slack.dev/app-manifests/configuring-apps-with-app-manifests/).
|
|
184
|
+
|
|
185
|
+
## Verification boundary
|
|
186
|
+
|
|
187
|
+
Controlled local tests exercise both identities, encrypted file restart,
|
|
188
|
+
rotating and non-rotating grants, scope restrictions, cancellation, actor changes,
|
|
189
|
+
bounded paging, HTTP-200 failures, malformed responses and interruption. Shared
|
|
190
|
+
form tests and Vibe64 browser tests cover conditional scopes and file round trips.
|
|
191
|
+
No live Slack registration, provider consent, customer data or generated app is
|
|
192
|
+
part of this proof. Current controlled source and installed-package suites each pass 17/17.
|
|
193
|
+
Current-source compact and expanded editor cases pass separately, including
|
|
194
|
+
actor/scope persistence, signing-secret reference, inline guidance, per-user
|
|
195
|
+
connection instructions and shared connect/cancel/disconnect controls. Registration
|
|
196
|
+
provisioning remains an operator action; editor coding-assistant attachment is
|
|
197
|
+
deferred.
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
## Message operations
|
|
201
|
+
|
|
202
|
+
- `channels.history`, `groups.history`, `directMessages.history` and
|
|
203
|
+
`groupMessages.history` take `channel`, optional `cursor`, `oldest`, `latest`
|
|
204
|
+
and `inclusive`. Each requires its matching `*:history` scope. A request reads
|
|
205
|
+
one page, at most 15 entries; callers explicitly request subsequent pages.
|
|
206
|
+
This bound accommodates the restricted commercially distributed app allowance.
|
|
207
|
+
Slack still enforces actual channel membership and method rate limits.
|
|
208
|
+
- `users.info({ user })` requires `users:read`. It returns a profile; email needs
|
|
209
|
+
an additional provider permission and is not promised by this operation.
|
|
210
|
+
- `messages.send({ channel, text, thread_ts? })` requires `chat:write` and posts
|
|
211
|
+
as the connected actor. Text is bounded to 4,000 characters; link/media unfurls
|
|
212
|
+
default off. A thread timestamp is optional. No automatic mutation retry occurs:
|
|
213
|
+
after an uncertain response, inspect the conversation before retrying.
|
|
214
|
+
|
|
215
|
+
In **OAuth & Permissions**, add the corresponding scope under the selected
|
|
216
|
+
user or bot token section, update project configuration and reconnect. Invite
|
|
217
|
+
bots to the intended channel. Application code must authorize which local users
|
|
218
|
+
can invoke a shared grant before calling these operations. This does not add
|
|
219
|
+
Sign in with Slack or automatically expose all workspace messages.
|
|
220
|
+
|
|
221
|
+
Method references: [history](https://docs.slack.dev/reference/methods/conversations.history/),
|
|
222
|
+
[posting](https://docs.slack.dev/reference/methods/chat.postMessage/),
|
|
223
|
+
[user profiles](https://docs.slack.dev/reference/methods/users.info/).
|
|
224
|
+
These operations use the same application-owned connection as channel discovery.
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
## Incoming events and interactions
|
|
228
|
+
|
|
229
|
+
Set optional `settings.signingSecretRef` to `env:SLACK_SIGNING_SECRET`; supply the
|
|
230
|
+
value from **Basic Information → App Credentials → Signing Secret** in the app
|
|
231
|
+
Env. This is a separate credential from the OAuth client secret. Implement an
|
|
232
|
+
HTTPS application event route, then enable **Event Subscriptions**, set its
|
|
233
|
+
**Request URL**, subscribe to needed bot/user events and reinstall when scopes
|
|
234
|
+
change. For buttons/views, enable **Interactivity & Shortcuts** and supply an
|
|
235
|
+
application interaction route. These are not OAuth redirect URLs.
|
|
236
|
+
|
|
237
|
+
Import `verifySlackRequest` from the same provider export. Pass `rawBody` as
|
|
238
|
+
unmodified bytes before JSON/form parsing, `signature` from `X-Slack-Signature`,
|
|
239
|
+
`timestamp` from `X-Slack-Request-Timestamp`, `contentType`, resolved `secret`,
|
|
240
|
+
and the installation's expected `appId` and `teamId`. Header lookup must be
|
|
241
|
+
case-insensitive. The verifier enforces Slack's five-minute timestamp window,
|
|
242
|
+
HMAC signature and installation identity, then returns the authenticated JSON
|
|
243
|
+
or form-encoded interaction payload. It supports event callbacks, URL challenge,
|
|
244
|
+
block actions, view submission/close and shortcuts/message actions.
|
|
245
|
+
|
|
246
|
+
The route returns the authenticated URL challenge when requested. Otherwise,
|
|
247
|
+
acknowledge within three seconds and use application-owned processing. Deduplicate
|
|
248
|
+
events by `event_id`; freshness alone does not prevent replay within the window.
|
|
249
|
+
Authorize `user.id`, action identifiers and business-object access before changing
|
|
250
|
+
anything. Persist action idempotency where duplicates would matter. A signed
|
|
251
|
+
request establishes Slack origin, not permission to act on arbitrary app data.
|
|
252
|
+
Do not fetch payload `response_url` or execute arbitrary payload actions blindly.
|
|
253
|
+
Enterprise-wide installs without a concrete team identity are outside this helper.
|
|
254
|
+
CLI applications use this same code without the editor; other frameworks can use
|
|
255
|
+
native Slack verification support with the same Env and route contract.
|
|
256
|
+
|
|
257
|
+
[Slack signature contract](https://docs.slack.dev/authentication/verifying-requests-from-slack/).
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# Snowflake
|
|
2
|
+
|
|
3
|
+
The initial `snowflakeProvider` connects a custom Snowflake OAuth client and
|
|
4
|
+
lists database metadata. JSKIT owns the configuration, field metadata, OAuth
|
|
5
|
+
exchange, refresh and file-backed connection state. The application supplies
|
|
6
|
+
its authenticated ownership policy and secret-reference resolver. The editor
|
|
7
|
+
stores the same JSON a CLI user writes. Saving configuration contacts no provider.
|
|
8
|
+
|
|
9
|
+
## Configuration
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"schemaVersion": 1,
|
|
14
|
+
"registrations": {
|
|
15
|
+
"snowflake": {
|
|
16
|
+
"source": "own",
|
|
17
|
+
"clientId": "client-id-from-your-security-integration",
|
|
18
|
+
"clientSecretRef": "env:SNOWFLAKE_SECRET",
|
|
19
|
+
"callbackUrlRef": "env:SNOWFLAKE_CALLBACK"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"integrations": {
|
|
23
|
+
"warehouse": {
|
|
24
|
+
"provider": "snowflake",
|
|
25
|
+
"accountMode": "per-user",
|
|
26
|
+
"settings": {
|
|
27
|
+
"accountUrl": "https://myorg-myaccount.snowflakecomputing.com",
|
|
28
|
+
"role": "VIBE64_READER"
|
|
29
|
+
},
|
|
30
|
+
"scopes": ["refresh_token", "session:role:VIBE64_READER"],
|
|
31
|
+
"authentication": { "method": "oauth2", "registrationRef": "snowflake" }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`shared` uses one grant under the application's shared owner; `assistant` uses
|
|
38
|
+
the assistant owner's grant; `per-user` keeps each user's grant separate. The
|
|
39
|
+
host must authorize those owners. None of these modes implements application
|
|
40
|
+
login or automatically grants workspace members access.
|
|
41
|
+
|
|
42
|
+
Set `SNOWFLAKE_SECRET` in the host's established secret store and
|
|
43
|
+
`SNOWFLAKE_CALLBACK` to the exact route handled by the backend. Values stay out
|
|
44
|
+
of this file. `client_secret_post` is the default. To use HTTP Basic, explicitly
|
|
45
|
+
set registration `tokenEndpointAuthMethod` to `client_secret_basic`.
|
|
46
|
+
|
|
47
|
+
The account URL accepts HTTPS account-name, locator/region and PrivateLink
|
|
48
|
+
addresses under `snowflakecomputing.com`, with an optional trailing slash.
|
|
49
|
+
Use the address reported by the account; paths, credentials, ports and query
|
|
50
|
+
strings are rejected. PrivateLink also needs reachable private DNS/networking;
|
|
51
|
+
validation does not create that connectivity. See [account URL formats](https://docs.snowflake.com/en/user-guide/organizations-connect).
|
|
52
|
+
|
|
53
|
+
Role is optional in this initial form for every ownership mode. For a shared
|
|
54
|
+
connection, assign a dedicated role. Use exact case from `SHOW ROLES`, without
|
|
55
|
+
surrounding quotes. This fragment accepts ASCII names up to 255 characters,
|
|
56
|
+
excluding double quotes/backslashes and the four privileged administrator
|
|
57
|
+
roles. Spaces and punctuation use Snowflake's encoded role scope. Non-ASCII
|
|
58
|
+
role names are not implemented. The UI updates the required role permission
|
|
59
|
+
when the role changes; CLI users must update `scopes` too.
|
|
60
|
+
|
|
61
|
+
For the default user role, omit `settings.role` and use `["refresh_token"]`.
|
|
62
|
+
For a named role, refresh permission is optional and the role permission is
|
|
63
|
+
required. The current shared schema requires at least one permission, so the
|
|
64
|
+
blank-role form keeps refresh selected. A user who declines offline access can
|
|
65
|
+
still connect, but must reconnect after the access token expires. Changing the
|
|
66
|
+
account or role invalidates saved access and pending consent.
|
|
67
|
+
|
|
68
|
+
## Create the provider registration
|
|
69
|
+
|
|
70
|
+
1. Sign into the target account in Snowsight. Open the account menu/details and
|
|
71
|
+
copy its **Account URL**, rather than the current browser address. Confirm
|
|
72
|
+
the account before continuing.
|
|
73
|
+
2. Select an administrator role with `CREATE INTEGRATION`. Open **Projects →
|
|
74
|
+
Worksheets**, choose **+ → SQL Worksheet**, or open an existing SQL worksheet.
|
|
75
|
+
In accounts using the newer Workspaces navigation, create a SQL file there.
|
|
76
|
+
The SQL operations below are the stable setup contract when labels differ.
|
|
77
|
+
3. Have the account administrator choose or create a dedicated reader role,
|
|
78
|
+
grant it the necessary database visibility, and grant it to intended users.
|
|
79
|
+
Registration permission and data access are separate. The runtime's first
|
|
80
|
+
read can succeed with an empty list; that does not prove table access.
|
|
81
|
+
4. Edit the following SQL with the real callback and approved role. Execute it
|
|
82
|
+
in that account. Use a fresh integration name; do not replace an existing
|
|
83
|
+
production integration as a shortcut.
|
|
84
|
+
|
|
85
|
+
```sql
|
|
86
|
+
CREATE SECURITY INTEGRATION DOGANDGROOM_READER
|
|
87
|
+
TYPE = OAUTH
|
|
88
|
+
ENABLED = TRUE
|
|
89
|
+
OAUTH_CLIENT = CUSTOM
|
|
90
|
+
OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
|
|
91
|
+
OAUTH_REDIRECT_URI = 'https://your-app.example/integrations/snowflake/callback'
|
|
92
|
+
OAUTH_ENFORCE_PKCE = TRUE
|
|
93
|
+
OAUTH_ISSUE_REFRESH_TOKENS = TRUE
|
|
94
|
+
OAUTH_REFRESH_TOKEN_VALIDITY = 86400
|
|
95
|
+
OAUTH_USE_SECONDARY_ROLES = NONE;
|
|
96
|
+
|
|
97
|
+
DESC SECURITY INTEGRATION DOGANDGROOM_READER;
|
|
98
|
+
SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('DOGANDGROOM_READER');
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
5. Copy `OAUTH_CLIENT_ID` into **Client ID**. Save one returned client secret in
|
|
102
|
+
the host's secret store and enter only its reference in **Client secret
|
|
103
|
+
reference**. Treat the SQL result as secret material; do not paste it into
|
|
104
|
+
AI chat, source files or logs. Confirm the allowed OAuth endpoints in the
|
|
105
|
+
`DESC` result match the account URL.
|
|
106
|
+
6. Enter **Account URL**, optional **Role**, **Callback URL reference** and
|
|
107
|
+
ownership in the editor, or write the JSON above. Configure the callback
|
|
108
|
+
handler before starting consent. Use the system browser, select the intended
|
|
109
|
+
Snowflake user and approve the requested role/offline access.
|
|
110
|
+
7. Verify using `databases.list`, then inspect an intentionally small page.
|
|
111
|
+
Lack of database visibility requires changing Snowflake grants, not changing
|
|
112
|
+
the app user's identity or requesting administrator roles.
|
|
113
|
+
|
|
114
|
+
The callback above is an illustrative placeholder. Substitute the application's
|
|
115
|
+
actual implemented backend callback before running the SQL. For local HTTP loopback development, Snowflake additionally needs
|
|
116
|
+
`OAUTH_ALLOW_NON_TLS_REDIRECT_URI = TRUE`; use a separate development integration.
|
|
117
|
+
Keep production HTTPS. PKCE is supported with confidential clients. See the
|
|
118
|
+
[registration SQL reference](https://docs.snowflake.com/en/sql-reference/sql/create-security-integration-oauth-snowflake).
|
|
119
|
+
|
|
120
|
+
## Connection ownership and callbacks
|
|
121
|
+
|
|
122
|
+
Register the real callback implemented by the runtime that owns this connection.
|
|
123
|
+
For an application integration, use the application's assigned hosting URL as
|
|
124
|
+
the initial origin and its implemented callback path. Store the exact callback
|
|
125
|
+
in its Env reference and provider registration. A domain change requires updating
|
|
126
|
+
both values if the callback URL changes; retain the application identity and its
|
|
127
|
+
persistent grants when moving hosts. Public Vibe64, Online and CLI users supply
|
|
128
|
+
their own registrations through this same contract.
|
|
129
|
+
See the [callback guide](../../connectors-core/docs/oauth-callbacks.md).
|
|
130
|
+
|
|
131
|
+
A Snowflake security integration belongs to one Snowflake account. Separate
|
|
132
|
+
security integrations produce independent client credentials; they do not split
|
|
133
|
+
that account's compute costs or guarantee independent provider quotas. Another
|
|
134
|
+
customer's account needs its own integration. A single registration cannot
|
|
135
|
+
unlock arbitrary accounts. Store each application's client secret in private Env.
|
|
136
|
+
Snowflake's `PUBLIC` client type is a separate credential mode; that native
|
|
137
|
+
public-client flow is not included by this confidential-client adapter.
|
|
138
|
+
|
|
139
|
+
## What AI can automate
|
|
140
|
+
|
|
141
|
+
With an already authorized administrator connection, AI can prepare and execute
|
|
142
|
+
registration SQL using Snowflake CLI or the SQL API, inspect integration
|
|
143
|
+
properties and configure the application's registration in its account. An operator must
|
|
144
|
+
approve the account, roles, network policy and callback ownership and arrange
|
|
145
|
+
secret capture directly into the secret store. Account enrollment, administrator
|
|
146
|
+
access and user consent are not supplied by this adapter. There is no named OAuth-registration provisioning operation. General statement
|
|
147
|
+
submission can execute only SQL permitted by the configured Snowflake role and
|
|
148
|
+
application policy; do not grant registration administration to an ordinary
|
|
149
|
+
application reader.
|
|
150
|
+
|
|
151
|
+
For manual work use the worksheet steps above. For CLI work use the same SQL
|
|
152
|
+
and portable configuration; there is no separate editor-only format. The host
|
|
153
|
+
owns provisioning authority, not an implicitly elevated runtime OAuth grant.
|
|
154
|
+
|
|
155
|
+
## Runtime contract and limits
|
|
156
|
+
|
|
157
|
+
Import `snowflakeProvider` from `@jskit-ai/connectors-catalog/server/snowflake` and
|
|
158
|
+
register it with `createConnectionService`. Call `beginAuthorization`, return the
|
|
159
|
+
provider callback to `completeAuthorization`, and invoke `databases.list` through
|
|
160
|
+
the authenticated application's owner context. See the packaged OAuth AI pattern
|
|
161
|
+
and `@jskit-ai/connectors-core` guide for file-store and resolver wiring.
|
|
162
|
+
|
|
163
|
+
The reader makes `GET /api/v2/databases`. It accepts `showLimit` (1–1000, default
|
|
164
|
+
20; an adapter cap), optional `like`, `startsWith`, `fromName` (1–255 characters)
|
|
165
|
+
and `history` (default false). It returns the provider's array of database
|
|
166
|
+
records. Request the next page explicitly with the last name as `fromName` and
|
|
167
|
+
the same filters; there is no background crawl or arbitrary continuation URL.
|
|
168
|
+
See the [Database API reference](https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/database)
|
|
169
|
+
and its [OpenAPI response schema](https://github.com/snowflakedb/snowflake-rest-api-specs/blob/main/specifications/database.yaml).
|
|
170
|
+
|
|
171
|
+
Each request uses an OAuth bearer token, token-type header and, when configured,
|
|
172
|
+
an exact quoted role header. Snowflake enforces the token's permitted role;
|
|
173
|
+
a caller cannot override it through operation input. See [REST authentication](https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/authentication)
|
|
174
|
+
and [role context](https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/setting-context).
|
|
175
|
+
|
|
176
|
+
OAuth uses the account's `/oauth/authorize` and `/oauth/token-request`, state and
|
|
177
|
+
S256 PKCE. The callback must contain an unambiguous scope value. Token lifetimes
|
|
178
|
+
and optional refresh fields are validated; refresh rotations are stored before
|
|
179
|
+
subsequent reads. Missing refresh or revoked grants require reconnecting.
|
|
180
|
+
See [Snowflake's custom OAuth flow](https://docs.snowflake.com/en/user-guide/oauth-custom).
|
|
181
|
+
|
|
182
|
+
The reader validates completed JSON pages, rejects oversized/malformed results
|
|
183
|
+
and fails explicitly on HTTP 202 rather than treating pending work as success.
|
|
184
|
+
This restriction applies to database listing; SQL operations below explicitly
|
|
185
|
+
handle pending responses. External OAuth, key-pair/PAT mode and provider
|
|
186
|
+
revocation are not implemented. Disconnect removes local state; revoke delegated authorization in
|
|
187
|
+
Snowflake separately when required. Errors are sanitized; cancellation and
|
|
188
|
+
timeouts are bounded. Automated tests use controlled protocol fixtures only.
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
## SQL context
|
|
192
|
+
|
|
193
|
+
Optional `settings.warehouse`, `settings.database` and `settings.schema` retain
|
|
194
|
+
exact case-sensitive names in portable configuration. Snowflake uses the connected
|
|
195
|
+
user's defaults when these are omitted. These defaults are not an access-control
|
|
196
|
+
boundary; the user's role grants remain authoritative. Statement submission, polling, partition retrieval and cancellation now exist;
|
|
197
|
+
warehouse actions also use that lifecycle. The application explicitly invokes each operation.
|
|
198
|
+
|
|
199
|
+
Find the warehouse in Snowsight's warehouse administration and database/schema
|
|
200
|
+
names in its database explorer, or ask the account administrator for the exact
|
|
201
|
+
names. The role needs warehouse USAGE and applicable database/schema/object
|
|
202
|
+
permissions. Query execution may resume a suspended warehouse and incur compute
|
|
203
|
+
charges; no live execution is part of implementation verification.
|
|
204
|
+
|
|
205
|
+
Use `statements.submit({ statement, requestId, bindings?, timeout? })` for a
|
|
206
|
+
single parameterized statement. The UUID request ID is explicit; timeout defaults
|
|
207
|
+
to 60 seconds and is bounded to 1–3600. Numbered bindings carry a Snowflake type
|
|
208
|
+
and string/null value, preserving numeric precision. The operation uses configured
|
|
209
|
+
warehouse/database/schema/role, sets single-statement mode and requests async
|
|
210
|
+
execution. It returns pending/completed with a handle.
|
|
211
|
+
|
|
212
|
+
Use `statements.get({ handle, partition? })` to poll or read one result partition.
|
|
213
|
+
Completed results retain `data` as string/null rows and `metadata` when supplied;
|
|
214
|
+
retain the first partition’s row types when subsequent partitions omit metadata.
|
|
215
|
+
Use `statements.cancel({ handle })` to explicitly cancel. Requests construct the
|
|
216
|
+
account URL from configuration; returned status links are never followed. The application owns operation authorization,
|
|
217
|
+
query selection, polling and uncertain-request recovery. Multi-statement execution
|
|
218
|
+
and raw end-user SQL must not be silently enabled.
|
|
219
|
+
|
|
220
|
+
[Snowflake SQL API contract](https://docs.snowflake.com/en/developer-guide/sql-api/reference).
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
The application must authorize the statement text and handle before invocation.
|
|
224
|
+
Do not expose arbitrary SQL to untrusted visitors. Namespace settings are defaults,
|
|
225
|
+
not a SQL sandbox; fully qualified SQL can name any resource the Snowflake role
|
|
226
|
+
can access. Keep grants narrow and maintain application ownership of handles.
|
|
227
|
+
A transport timeout is not proof the query stopped. Keep the request ID, consult
|
|
228
|
+
Snowflake query history and reconcile before submitting another mutation; this
|
|
229
|
+
adapter never retries submission automatically. Controlled tests cover asynchronous rejection, malformed results and uncertain
|
|
230
|
+
submission without replay. Live provider execution remains untested.
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
## Warehouse actions
|
|
234
|
+
|
|
235
|
+
`warehouses.create({ name, size, requestId })` creates a standard warehouse,
|
|
236
|
+
initially suspended, with auto-resume disabled and 60-second auto-suspend.
|
|
237
|
+
`warehouses.resize({ name, size, requestId })` changes its size. Accepted sizes
|
|
238
|
+
are XSMALL, SMALL, MEDIUM, LARGE, XLARGE, XXLARGE, XXXLARGE, X4LARGE, X5LARGE
|
|
239
|
+
and X6LARGE; availability depends on the account.
|
|
240
|
+
|
|
241
|
+
`warehouses.resume`, `warehouses.suspend` and `warehouses.delete` each accept
|
|
242
|
+
`{ name, requestId }`. Names are exact case-sensitive identifiers, quoted by
|
|
243
|
+
the adapter; do not enter surrounding SQL quotes. Each action returns the same
|
|
244
|
+
pending/completed handle result as SQL submission. Poll through statements.get.
|
|
245
|
+
The application must authorize the named warehouse and action, present billing
|
|
246
|
+
implications before resume/resize, and confirm deletion. Role grants are enforced
|
|
247
|
+
by Snowflake. Creation does not replace an existing warehouse; deletion is explicit.
|
|
248
|
+
These helpers do not manage multi-cluster scaling, resource monitors or grants.
|
|
249
|
+
|
|
250
|
+
See [CREATE WAREHOUSE](https://docs.snowflake.com/en/sql-reference/sql/create-warehouse),
|
|
251
|
+
[ALTER WAREHOUSE](https://docs.snowflake.com/en/sql-reference/sql/alter-warehouse)
|
|
252
|
+
and [DROP WAREHOUSE](https://docs.snowflake.com/en/sql-reference/sql/drop-warehouse).
|
|
253
|
+
|
|
254
|
+
Responses are read with a 16 MiB limit before JSON parsing. A larger partition
|
|
255
|
+
returns connector_response_too_large; reduce the query projection/result or use
|
|
256
|
+
Snowflake's native streaming facilities in the chosen framework. SQL is not
|
|
257
|
+
resubmitted on that error. Keep the handle to reconcile existing execution.
|
|
258
|
+
|
|
259
|
+
Controlled source and installed-package verification each pass 17 focused tests,
|
|
260
|
+
including interrupted oversized response streams and application resource policy.
|
|
261
|
+
Expanded configuration and compact configuration/lifecycle checks pass, including
|
|
262
|
+
SQL-default persistence, rendered setup instructions and consent cancellation/
|
|
263
|
+
disconnect. No live account, SQL compute or generated application was exercised.
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
For another framework, use its native OAuth client and Snowflake SQL client with
|
|
267
|
+
the same account URL, callback Env, exact role and namespace defaults. Implement
|
|
268
|
+
the confidential-client/PKCE consent and refresh lifecycle there; JSKIT is not a
|
|
269
|
+
remote service. Preserve string-valued numeric results, one explicit statement
|
|
270
|
+
request ID, partition polling and cancellation. Apply the same application
|
|
271
|
+
policy to SQL text, handles and warehouse names before invoking the provider.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Storyblok
|
|
2
|
+
|
|
3
|
+
Import `storyblokProvider` from `@jskit-ai/connectors-catalog/server/storyblok`.
|
|
4
|
+
The fragment reads Content Delivery API space metadata and stories. It supports
|
|
5
|
+
the Public and Preview token types and all five standard space regions.
|
|
6
|
+
|
|
7
|
+
## Configure access
|
|
8
|
+
|
|
9
|
+
1. Sign into Storyblok and select the space whose content the application uses.
|
|
10
|
+
Open **Settings → Access Tokens**.
|
|
11
|
+
2. Create a named **Public** token for published content, or a **Preview** token
|
|
12
|
+
for draft and published content. Copy its value into backend Env as
|
|
13
|
+
`STORYBLOK_TOKEN`. Keep Preview tokens on the server. Management API personal
|
|
14
|
+
tokens, Asset tokens and Release tokens serve different purposes.
|
|
15
|
+
[Token types and settings](https://www.storyblok.com/docs/concepts/access-tokens).
|
|
16
|
+
3. Add this integration to the ordinary `integrations.json` document. The UI
|
|
17
|
+
edits the same fields; only the reference goes in source:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"provider": "storyblok",
|
|
22
|
+
"displayName": "Website content",
|
|
23
|
+
"accountMode": "shared",
|
|
24
|
+
"scopes": [],
|
|
25
|
+
"authentication": { "method": "api-key", "secretRef": "env:STORYBLOK_TOKEN" },
|
|
26
|
+
"settings": { "region": "eu" }
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
4. Set **Space region** to match the space: `eu` (default), `us`, `ca`, `ap`, or
|
|
31
|
+
`cn`. Their API hosts are `api.storyblok.com`, `api-us.storyblok.com`,
|
|
32
|
+
`api-ca.storyblok.com`, `api-ap.storyblok.com`, and `app.storyblokchina.cn`.
|
|
33
|
+
All use `/v2/cdn`. Enterprise-specific hosts are not part of this fragment.
|
|
34
|
+
[Content Delivery endpoints](https://www.storyblok.com/docs/api/content-delivery/v2).
|
|
35
|
+
5. Use `connectApiKey` to verify space access. A region or reference change
|
|
36
|
+
requires verification again. Local disconnect removes the runtime connection;
|
|
37
|
+
revoke an obsolete token in Storyblok when it should stop working everywhere.
|
|
38
|
+
|
|
39
|
+
## Runtime and AI composition
|
|
40
|
+
|
|
41
|
+
Compose the provider with the [API-key pattern](../patterns/api-key-connection/PATTERN.md)
|
|
42
|
+
and file store. `space.read` calls `GET /v2/cdn/spaces/me`, returning the space's
|
|
43
|
+
ID, name, languages and available cache-version metadata. Verification proves
|
|
44
|
+
space access; it does not establish that the token can read drafts.
|
|
45
|
+
[Space endpoint](https://www.storyblok.com/docs/api/content-delivery/v2/spaces/retrieve-current-space).
|
|
46
|
+
|
|
47
|
+
`stories.list` calls `GET /v2/cdn/stories`. Inputs are `version` (`published` by
|
|
48
|
+
default or explicit `draft`), `page` (starting at 1), `per_page` (1–100, default
|
|
49
|
+
25), optional `starts_with`, `search_term`, `content_type`, `language`, and `cv`.
|
|
50
|
+
Results retain the stories and other response-body metadata. Increment page
|
|
51
|
+
until a short or empty page; this runtime does not expose the API's pagination
|
|
52
|
+
headers. Draft access requires a Preview token; it never falls back silently
|
|
53
|
+
to published content. Content writing is outside this Delivery API connector. The application owns
|
|
54
|
+
rendering and cache policy.
|
|
55
|
+
[Story listing](https://www.storyblok.com/docs/api/content-delivery/v2/stories/retrieve-multiple-stories).
|
|
56
|
+
|
|
57
|
+
The core inserts the resolved token into the authenticated query string. Do not
|
|
58
|
+
pass tokens as operation inputs or log full request URLs in application HTTP
|
|
59
|
+
instrumentation. Preview content also needs application access controls; selecting
|
|
60
|
+
`shared` makes the credential shared, not the resulting content public.
|
|
61
|
+
|
|
62
|
+
## Automation and application ownership
|
|
63
|
+
|
|
64
|
+
After an authorized human supplies Management API access, an AI can create
|
|
65
|
+
Content Delivery tokens with `POST /v1/spaces/{space_id}/api_keys/` on the
|
|
66
|
+
appropriate Management API host. The request body includes
|
|
67
|
+
`api_key: { access: "public", name: "Application content" }`, and the result
|
|
68
|
+
contains `api_key`. EU management uses `mapi.storyblok.com`. This is a setup API,
|
|
69
|
+
not an operation exposed by this read fragment.
|
|
70
|
+
[Token creation](https://www.storyblok.com/docs/api/management/access-tokens/create-an-access-token).
|
|
71
|
+
|
|
72
|
+
Space creation and configuration are also available through the Management API;
|
|
73
|
+
account creation, billing and initial authorization still require the account
|
|
74
|
+
owner. [Space APIs](https://www.storyblok.com/docs/api/management/spaces).
|
|
75
|
+
|
|
76
|
+
The application owner supplies a token for its Storyblok space. Two token names
|
|
77
|
+
in one space do not guarantee quota isolation; confirm space/organization plan
|
|
78
|
+
limits. This Content Delivery flow needs no OAuth client ID or callback, so
|
|
79
|
+
editor VM and hosted-application domains need no per-domain OAuth registrations.
|
|
80
|
+
|
|
81
|
+
Automated tests use simulated responses: all five destinations, published/draft
|
|
82
|
+
selection, page limits, encoded credentials, rotation, file-store restart,
|
|
83
|
+
authorization isolation, invalid responses and failures. No live space was
|
|
84
|
+
created or read, and no sample application was generated or executed.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## Page retrieval and rendering
|
|
88
|
+
|
|
89
|
+
`stories.get({ id, find_by?, version?, language?, cv?, resolve_relations?,
|
|
90
|
+
resolve_links?, resolve_assets? })` reads one page by numeric ID or full slug.
|
|
91
|
+
Pass a UUID with `find_by: "uuid"`. Slugs are encoded as path segments; do not
|
|
92
|
+
pass an API URL. Relative or empty path segments are rejected.
|
|
93
|
+
|
|
94
|
+
Both get and list accept `resolve_relations` as comma-separated component.field
|
|
95
|
+
names, `resolve_links` as url/link/story, and `resolve_assets` as 0/1. The response
|
|
96
|
+
retains relation, link and asset metadata. Additional relations beyond the
|
|
97
|
+
provider's expansion limit require explicit subsequent reads; no automatic crawl
|
|
98
|
+
or remote asset fetch occurs. Use asset filename and alt values when rendering
|
|
99
|
+
approved images; private asset access still follows Storyblok's access policy.
|
|
100
|
+
[Single story contract](https://www.storyblok.com/docs/api/content-delivery/v2/stories/retrieve-a-single-story).
|
|
101
|
+
|
|
102
|
+
An application-owned page route maps its slug to stories.get and supplies an
|
|
103
|
+
authenticated owner context. Render content.component through an explicit map
|
|
104
|
+
of framework components; render field strings as escaped text. Use the chosen
|
|
105
|
+
framework's Storyblok rich-text renderer for rich-text documents, with reviewed
|
|
106
|
+
link and embedded-component rules. Do not inject arbitrary content as HTML.
|
|
107
|
+
Return an ordinary not-found page when published content is absent. JSKIT
|
|
108
|
+
provides data operations, not a page builder or preview-editor subsystem.
|
|
109
|
+
|
|
110
|
+
Use a Public token for public routes. If the project also needs preview, keep
|
|
111
|
+
a Preview token in a separate server-side integration, require editor access
|
|
112
|
+
before requesting draft, and mark preview responses private/no-store. The
|
|
113
|
+
application policy receives the requested version before provider transport.
|
|
114
|
+
Never let an unauthenticated request parameter select the preview integration.
|
|
115
|
+
Cache published pages by space/integration, language, slug, version and cache
|
|
116
|
+
version; do not mix draft and published results. Use returned cv consistently
|
|
117
|
+
while paginating and refresh the space version when revalidating after publish.
|
|
118
|
+
The app owns its revalidation trigger and scheduler.
|
|
119
|
+
|
|
120
|
+
A CLI-only or non-JSKIT app uses the same token Env and region with its native
|
|
121
|
+
HTTP/Storyblok client. Keep the same published-default and preview authorization
|
|
122
|
+
rules; it does not need Vibe64 or a JSKIT server.
|
|
123
|
+
|
|
124
|
+
Current focused source proof: four Storyblok cases pass, covering all regions,
|
|
125
|
+
credential rotation/restart, page/list results, linked content and assets,
|
|
126
|
+
invalid paths/results, policy-denied draft access and provider failures. No
|
|
127
|
+
live space or generated application was used. The same four cases pass through
|
|
128
|
+
installed package exports in a disposable CLI consumer. Public configuration and
|
|
129
|
+
API-key connection/disconnect checks pass at compact, medium and expanded widths,
|
|
130
|
+
including region persistence, inline instructions and horizontal-overflow checks.
|