@superblocksteam/sdk-api 0.0.6 → 0.0.8
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 +351 -427
- package/dist/api/definition.d.ts +12 -7
- package/dist/api/definition.d.ts.map +1 -1
- package/dist/api/definition.js +19 -12
- package/dist/api/definition.js.map +1 -1
- package/dist/api/definition.test.js +39 -15
- package/dist/api/definition.test.js.map +1 -1
- package/dist/api/index.d.ts +0 -2
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +0 -2
- package/dist/api/index.js.map +1 -1
- package/dist/errors.d.ts +1 -45
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +1 -33
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +16 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -15
- package/dist/index.js.map +1 -1
- package/dist/integrations/anthropic/types.d.ts +3 -22
- package/dist/integrations/anthropic/types.d.ts.map +1 -1
- package/dist/integrations/athena/client.d.ts +1 -1
- package/dist/integrations/athena/client.d.ts.map +1 -1
- package/dist/integrations/athena/client.js.map +1 -1
- package/dist/integrations/athena/types.d.ts +2 -2
- package/dist/integrations/athena/types.d.ts.map +1 -1
- package/dist/integrations/base/graphql-integration-client.d.ts +8 -4
- package/dist/integrations/base/graphql-integration-client.d.ts.map +1 -1
- package/dist/integrations/base/graphql-integration-client.js +18 -5
- package/dist/integrations/base/graphql-integration-client.js.map +1 -1
- package/dist/integrations/base/index.d.ts +3 -2
- package/dist/integrations/base/index.d.ts.map +1 -1
- package/dist/integrations/base/index.js +1 -0
- package/dist/integrations/base/index.js.map +1 -1
- package/dist/integrations/base/rest-api-client-base.d.ts +48 -0
- package/dist/integrations/base/rest-api-client-base.d.ts.map +1 -0
- package/dist/integrations/base/rest-api-client-base.js +118 -0
- package/dist/integrations/base/rest-api-client-base.js.map +1 -0
- package/dist/integrations/base/rest-api-integration-client.d.ts +18 -66
- package/dist/integrations/base/rest-api-integration-client.d.ts.map +1 -1
- package/dist/integrations/base/rest-api-integration-client.js +38 -173
- package/dist/integrations/base/rest-api-integration-client.js.map +1 -1
- package/dist/integrations/base/types.d.ts +59 -59
- package/dist/integrations/base/types.d.ts.map +1 -1
- package/dist/integrations/base/types.js +23 -1
- package/dist/integrations/base/types.js.map +1 -1
- package/dist/integrations/bigquery/client.d.ts +1 -1
- package/dist/integrations/bigquery/client.d.ts.map +1 -1
- package/dist/integrations/bigquery/client.js.map +1 -1
- package/dist/integrations/bigquery/types.d.ts +3 -3
- package/dist/integrations/bigquery/types.d.ts.map +1 -1
- package/dist/integrations/box/types.d.ts +1 -1
- package/dist/integrations/cockroachdb/client.d.ts +1 -1
- package/dist/integrations/cockroachdb/client.d.ts.map +1 -1
- package/dist/integrations/cockroachdb/client.js.map +1 -1
- package/dist/integrations/cockroachdb/types.d.ts.map +1 -1
- package/dist/integrations/cosmosdb/client.d.ts +1 -1
- package/dist/integrations/cosmosdb/client.d.ts.map +1 -1
- package/dist/integrations/cosmosdb/client.js.map +1 -1
- package/dist/integrations/cosmosdb/client.test.js.map +1 -1
- package/dist/integrations/cosmosdb/types.d.ts.map +1 -1
- package/dist/integrations/databricks/client.d.ts +1 -1
- package/dist/integrations/databricks/client.d.ts.map +1 -1
- package/dist/integrations/databricks/client.js.map +1 -1
- package/dist/integrations/databricks/types.d.ts +3 -3
- package/dist/integrations/databricks/types.d.ts.map +1 -1
- package/dist/integrations/declarations.d.ts +36 -104
- package/dist/integrations/declarations.d.ts.map +1 -1
- package/dist/integrations/declarations.js +5 -68
- package/dist/integrations/declarations.js.map +1 -1
- package/dist/integrations/declarations.test.js.map +1 -1
- package/dist/integrations/documentation-resolver.test.d.ts +2 -0
- package/dist/integrations/documentation-resolver.test.d.ts.map +1 -0
- package/dist/integrations/documentation-resolver.test.js +774 -0
- package/dist/integrations/documentation-resolver.test.js.map +1 -0
- package/dist/integrations/documentation.d.ts +9 -0
- package/dist/integrations/documentation.d.ts.map +1 -0
- package/dist/integrations/documentation.js +300 -0
- package/dist/integrations/documentation.js.map +1 -0
- package/dist/integrations/documentation.test.d.ts +2 -0
- package/dist/integrations/documentation.test.d.ts.map +1 -0
- package/dist/integrations/documentation.test.js +81 -0
- package/dist/integrations/documentation.test.js.map +1 -0
- package/dist/integrations/dynamodb/client.d.ts +1 -1
- package/dist/integrations/dynamodb/client.d.ts.map +1 -1
- package/dist/integrations/dynamodb/client.js.map +1 -1
- package/dist/integrations/dynamodb/types.d.ts.map +1 -1
- package/dist/integrations/gcs/client.d.ts +1 -1
- package/dist/integrations/gcs/client.d.ts.map +1 -1
- package/dist/integrations/gcs/client.js.map +1 -1
- package/dist/integrations/gcs/types.d.ts.map +1 -1
- package/dist/integrations/googledrive/types.d.ts +1 -1
- package/dist/integrations/graphql/client.test.d.ts +15 -0
- package/dist/integrations/graphql/client.test.d.ts.map +1 -0
- package/dist/integrations/graphql/client.test.js +148 -0
- package/dist/integrations/graphql/client.test.js.map +1 -0
- package/dist/integrations/graphql/types.d.ts +22 -3
- package/dist/integrations/graphql/types.d.ts.map +1 -1
- package/dist/integrations/gsheets/client.d.ts +1 -1
- package/dist/integrations/gsheets/client.d.ts.map +1 -1
- package/dist/integrations/gsheets/client.js.map +1 -1
- package/dist/integrations/gsheets/types.d.ts.map +1 -1
- package/dist/integrations/index.d.ts +2 -12
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +2 -8
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/lakebase/client.d.ts +1 -1
- package/dist/integrations/lakebase/client.d.ts.map +1 -1
- package/dist/integrations/lakebase/client.js.map +1 -1
- package/dist/integrations/lakebase/types.d.ts +4 -4
- package/dist/integrations/lakebase/types.d.ts.map +1 -1
- package/dist/integrations/mariadb/client.d.ts +1 -1
- package/dist/integrations/mariadb/client.d.ts.map +1 -1
- package/dist/integrations/mariadb/client.js.map +1 -1
- package/dist/integrations/mariadb/types.d.ts +2 -2
- package/dist/integrations/mariadb/types.d.ts.map +1 -1
- package/dist/integrations/mongodb/client.d.ts +1 -1
- package/dist/integrations/mongodb/client.d.ts.map +1 -1
- package/dist/integrations/mongodb/client.js.map +1 -1
- package/dist/integrations/mongodb/types.d.ts.map +1 -1
- package/dist/integrations/mssql/client.d.ts +1 -1
- package/dist/integrations/mssql/client.d.ts.map +1 -1
- package/dist/integrations/mssql/client.js.map +1 -1
- package/dist/integrations/mssql/types.d.ts +2 -2
- package/dist/integrations/mssql/types.d.ts.map +1 -1
- package/dist/integrations/mysql/client.d.ts +1 -1
- package/dist/integrations/mysql/client.d.ts.map +1 -1
- package/dist/integrations/mysql/client.js.map +1 -1
- package/dist/integrations/mysql/types.d.ts +4 -4
- package/dist/integrations/mysql/types.d.ts.map +1 -1
- package/dist/integrations/openai_v2/types.d.ts +4 -22
- package/dist/integrations/openai_v2/types.d.ts.map +1 -1
- package/dist/integrations/oracledb/client.d.ts +1 -1
- package/dist/integrations/oracledb/client.d.ts.map +1 -1
- package/dist/integrations/oracledb/client.js.map +1 -1
- package/dist/integrations/oracledb/types.d.ts +2 -2
- package/dist/integrations/oracledb/types.d.ts.map +1 -1
- package/dist/integrations/postgres/client.d.ts +1 -8
- package/dist/integrations/postgres/client.d.ts.map +1 -1
- package/dist/integrations/postgres/client.js.map +1 -1
- package/dist/integrations/postgres/types.d.ts.map +1 -1
- package/dist/integrations/redshift/client.d.ts +1 -1
- package/dist/integrations/redshift/client.d.ts.map +1 -1
- package/dist/integrations/redshift/client.js.map +1 -1
- package/dist/integrations/redshift/types.d.ts.map +1 -1
- package/dist/integrations/registry.d.ts +6 -27
- package/dist/integrations/registry.d.ts.map +1 -1
- package/dist/integrations/registry.js +64 -88
- package/dist/integrations/registry.js.map +1 -1
- package/dist/integrations/registry.test.js +1 -3
- package/dist/integrations/registry.test.js.map +1 -1
- package/dist/integrations/restapiintegration/client.test.d.ts +12 -0
- package/dist/integrations/restapiintegration/client.test.d.ts.map +1 -0
- package/dist/integrations/restapiintegration/client.test.js +236 -0
- package/dist/integrations/restapiintegration/client.test.js.map +1 -0
- package/dist/integrations/restapiintegration/types.d.ts +2 -2
- package/dist/integrations/restapiintegration/types.d.ts.map +1 -1
- package/dist/integrations/s3/client.d.ts +1 -1
- package/dist/integrations/s3/client.d.ts.map +1 -1
- package/dist/integrations/s3/client.js.map +1 -1
- package/dist/integrations/s3/types.d.ts +3 -1
- package/dist/integrations/s3/types.d.ts.map +1 -1
- package/dist/integrations/salesforce/client.d.ts +1 -1
- package/dist/integrations/salesforce/client.d.ts.map +1 -1
- package/dist/integrations/salesforce/client.js.map +1 -1
- package/dist/integrations/salesforce/types.d.ts.map +1 -1
- package/dist/integrations/slack/client.d.ts +13 -9
- package/dist/integrations/slack/client.d.ts.map +1 -1
- package/dist/integrations/slack/client.js +60 -8
- package/dist/integrations/slack/client.js.map +1 -1
- package/dist/integrations/slack/client.test.d.ts +11 -0
- package/dist/integrations/slack/client.test.d.ts.map +1 -0
- package/dist/integrations/slack/client.test.js +368 -0
- package/dist/integrations/slack/client.test.js.map +1 -0
- package/dist/integrations/slack/index.d.ts +2 -1
- package/dist/integrations/slack/index.d.ts.map +1 -1
- package/dist/integrations/slack/index.js +1 -0
- package/dist/integrations/slack/index.js.map +1 -1
- package/dist/integrations/slack/types.d.ts +127 -28
- package/dist/integrations/slack/types.d.ts.map +1 -1
- package/dist/integrations/slack/types.js +27 -1
- package/dist/integrations/slack/types.js.map +1 -1
- package/dist/integrations/smtp/client.d.ts +1 -1
- package/dist/integrations/smtp/client.d.ts.map +1 -1
- package/dist/integrations/smtp/client.js.map +1 -1
- package/dist/integrations/snowflake/client.d.ts +3 -3
- package/dist/integrations/snowflake/client.d.ts.map +1 -1
- package/dist/integrations/snowflake/client.js +2 -2
- package/dist/integrations/snowflake/client.js.map +1 -1
- package/dist/integrations/snowflake/types.d.ts.map +1 -1
- package/dist/integrations/snowflakecortex/client.d.ts +1 -2
- package/dist/integrations/snowflakecortex/client.d.ts.map +1 -1
- package/dist/integrations/snowflakecortex/client.js +1 -2
- package/dist/integrations/snowflakecortex/client.js.map +1 -1
- package/dist/integrations/snowflakecortex/types.d.ts +3 -4
- package/dist/integrations/snowflakecortex/types.d.ts.map +1 -1
- package/dist/integrations/snowflakepostgres/client.d.ts +1 -1
- package/dist/integrations/snowflakepostgres/client.d.ts.map +1 -1
- package/dist/integrations/snowflakepostgres/client.js.map +1 -1
- package/dist/integrations/snowflakepostgres/types.d.ts.map +1 -1
- package/dist/runtime/context.d.ts +3 -3
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/context.js.map +1 -1
- package/dist/runtime/executor.d.ts +2 -2
- package/dist/runtime/index.d.ts +0 -3
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -6
- package/dist/runtime/index.js.map +1 -1
- package/dist/types.d.ts +15 -6
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/api/definition.test.ts +41 -15
- package/src/api/definition.ts +20 -13
- package/src/api/index.ts +0 -4
- package/src/errors.ts +1 -49
- package/src/index.ts +20 -61
- package/src/integrations/airtable/docs.manifest.json +5 -0
- package/src/integrations/anthropic/README.md +5 -101
- package/src/integrations/anthropic/docs.manifest.json +5 -0
- package/src/integrations/anthropic/types.ts +3 -29
- package/src/integrations/asana/README.md +12 -12
- package/src/integrations/asana/docs.manifest.json +5 -0
- package/src/integrations/athena/README.md +4 -4
- package/src/integrations/athena/client.ts +5 -3
- package/src/integrations/athena/docs.manifest.json +5 -0
- package/src/integrations/athena/types.ts +3 -2
- package/src/integrations/base/graphql-integration-client.ts +27 -5
- package/src/integrations/base/index.ts +3 -3
- package/src/integrations/base/rest-api-client-base.ts +158 -0
- package/src/integrations/base/rest-api-integration-client.ts +62 -237
- package/src/integrations/base/types.ts +68 -64
- package/src/integrations/bigquery/README.md +28 -3
- package/src/integrations/bigquery/client.ts +5 -3
- package/src/integrations/bigquery/docs.manifest.json +5 -0
- package/src/integrations/bigquery/types.ts +4 -3
- package/src/integrations/bitbucket/README.md +19 -19
- package/src/integrations/bitbucket/docs.manifest.json +5 -0
- package/src/integrations/box/README.md +24 -24
- package/src/integrations/box/docs.manifest.json +5 -0
- package/src/integrations/box/types.ts +1 -1
- package/src/integrations/circleci/README.md +18 -18
- package/src/integrations/circleci/docs.manifest.json +5 -0
- package/src/integrations/cockroachdb/client.ts +5 -3
- package/src/integrations/cockroachdb/docs.manifest.json +5 -0
- package/src/integrations/cockroachdb/types.ts +1 -0
- package/src/integrations/cohere/README.md +11 -11
- package/src/integrations/cohere/docs.manifest.json +5 -0
- package/src/integrations/confluence/docs.manifest.json +5 -0
- package/src/integrations/cosmosdb/client.test.ts +2 -1
- package/src/integrations/cosmosdb/client.ts +5 -3
- package/src/integrations/cosmosdb/docs.manifest.json +5 -0
- package/src/integrations/cosmosdb/types.ts +1 -0
- package/src/integrations/databricks/README.md +29 -4
- package/src/integrations/databricks/client.ts +5 -3
- package/src/integrations/databricks/docs.manifest.json +5 -0
- package/src/integrations/databricks/types.ts +4 -3
- package/src/integrations/datadog/docs.manifest.json +5 -0
- package/src/integrations/declarations.test.ts +1 -0
- package/src/integrations/declarations.ts +36 -136
- package/src/integrations/documentation-resolver.test.ts +893 -0
- package/src/integrations/documentation.test.ts +120 -0
- package/src/integrations/documentation.ts +473 -0
- package/src/integrations/dropbox/docs.manifest.json +5 -0
- package/src/integrations/dynamodb/client.ts +3 -2
- package/src/integrations/dynamodb/docs.manifest.json +5 -0
- package/src/integrations/dynamodb/types.ts +1 -0
- package/src/integrations/elasticsearch/docs.manifest.json +5 -0
- package/src/integrations/fireworks/README.md +43 -17
- package/src/integrations/fireworks/docs.manifest.json +5 -0
- package/src/integrations/front/docs.manifest.json +5 -0
- package/src/integrations/gcs/client.ts +5 -3
- package/src/integrations/gcs/docs.manifest.json +5 -0
- package/src/integrations/gcs/types.ts +1 -0
- package/src/integrations/gemini/docs.manifest.json +5 -0
- package/src/integrations/github/docs.manifest.json +5 -0
- package/src/integrations/googleanalytics/README.md +2 -2
- package/src/integrations/googleanalytics/docs.manifest.json +5 -0
- package/src/integrations/googledrive/README.md +27 -24
- package/src/integrations/googledrive/docs.manifest.json +5 -0
- package/src/integrations/googledrive/types.ts +1 -1
- package/src/integrations/graphql/README.md +2 -2
- package/src/integrations/graphql/client.test.ts +220 -0
- package/src/integrations/graphql/docs.manifest.json +10 -0
- package/src/integrations/graphql/overlays/dynamic-headers.md +34 -0
- package/src/integrations/graphql/types.ts +23 -1
- package/src/integrations/groq/README.md +49 -42
- package/src/integrations/groq/docs.manifest.json +5 -0
- package/src/integrations/gsheets/README.md +2 -2
- package/src/integrations/gsheets/client.ts +5 -3
- package/src/integrations/gsheets/docs.manifest.json +5 -0
- package/src/integrations/gsheets/types.ts +1 -0
- package/src/integrations/hubspot/docs.manifest.json +5 -0
- package/src/integrations/index.ts +1 -52
- package/src/integrations/intercom/docs.manifest.json +5 -0
- package/src/integrations/jira/docs.manifest.json +5 -0
- package/src/integrations/lakebase/README.md +242 -0
- package/src/integrations/lakebase/client.ts +6 -4
- package/src/integrations/lakebase/docs.manifest.json +5 -0
- package/src/integrations/lakebase/types.ts +5 -4
- package/src/integrations/launchdarkly/README.md +2 -2
- package/src/integrations/launchdarkly/docs.manifest.json +5 -0
- package/src/integrations/mariadb/README.md +3 -3
- package/src/integrations/mariadb/client.ts +5 -3
- package/src/integrations/mariadb/docs.manifest.json +5 -0
- package/src/integrations/mariadb/types.ts +3 -2
- package/src/integrations/mistral/README.md +39 -13
- package/src/integrations/mistral/docs.manifest.json +5 -0
- package/src/integrations/mongodb/README.md +65 -12
- package/src/integrations/mongodb/client.ts +5 -3
- package/src/integrations/mongodb/docs.manifest.json +5 -0
- package/src/integrations/mongodb/types.ts +1 -0
- package/src/integrations/mssql/README.md +3 -3
- package/src/integrations/mssql/client.ts +5 -3
- package/src/integrations/mssql/docs.manifest.json +5 -0
- package/src/integrations/mssql/types.ts +3 -2
- package/src/integrations/mysql/README.md +4 -4
- package/src/integrations/mysql/client.ts +5 -3
- package/src/integrations/mysql/docs.manifest.json +5 -0
- package/src/integrations/mysql/types.ts +5 -4
- package/src/integrations/notion/docs.manifest.json +5 -0
- package/src/integrations/openai_v2/README.md +44 -116
- package/src/integrations/openai_v2/docs.manifest.json +5 -0
- package/src/integrations/openai_v2/types.ts +4 -29
- package/src/integrations/oracledb/README.md +3 -3
- package/src/integrations/oracledb/client.ts +5 -3
- package/src/integrations/oracledb/docs.manifest.json +5 -0
- package/src/integrations/oracledb/types.ts +3 -2
- package/src/integrations/pagerduty/README.md +2 -2
- package/src/integrations/pagerduty/docs.manifest.json +5 -0
- package/src/integrations/perplexity/README.md +39 -47
- package/src/integrations/perplexity/docs.manifest.json +5 -0
- package/src/integrations/postgres/client.ts +7 -5
- package/src/integrations/postgres/docs.manifest.json +5 -0
- package/src/integrations/postgres/types.ts +1 -0
- package/src/integrations/redshift/client.ts +5 -3
- package/src/integrations/redshift/docs.manifest.json +5 -0
- package/src/integrations/redshift/types.ts +1 -0
- package/src/integrations/registry.test.ts +2 -3
- package/src/integrations/registry.ts +69 -188
- package/src/integrations/restapiintegration/README.md +320 -0
- package/src/integrations/restapiintegration/client.test.ts +359 -0
- package/src/integrations/restapiintegration/docs.manifest.json +14 -0
- package/src/integrations/restapiintegration/overlays/response-types-unsupported.md +5 -0
- package/src/integrations/restapiintegration/overlays/response-types.md +26 -0
- package/src/integrations/restapiintegration/types.ts +2 -8
- package/src/integrations/s3/client.ts +5 -3
- package/src/integrations/s3/docs.manifest.json +5 -0
- package/src/integrations/s3/types.ts +4 -1
- package/src/integrations/salesforce/README.md +11 -9
- package/src/integrations/salesforce/client.ts +3 -2
- package/src/integrations/salesforce/docs.manifest.json +5 -0
- package/src/integrations/salesforce/types.ts +1 -0
- package/src/integrations/segment/docs.manifest.json +5 -0
- package/src/integrations/sendgrid/README.md +2 -2
- package/src/integrations/sendgrid/docs.manifest.json +5 -0
- package/src/integrations/slack/README.md +62 -19
- package/src/integrations/slack/client.test.ts +553 -0
- package/src/integrations/slack/client.ts +92 -12
- package/src/integrations/slack/docs.manifest.json +5 -0
- package/src/integrations/slack/index.ts +6 -1
- package/src/integrations/slack/types.ts +142 -29
- package/src/integrations/smtp/README.md +220 -0
- package/src/integrations/smtp/client.ts +4 -2
- package/src/integrations/smtp/docs.manifest.json +5 -0
- package/src/integrations/snowflake/client.ts +7 -5
- package/src/integrations/snowflake/docs.manifest.json +5 -0
- package/src/integrations/snowflake/types.ts +1 -0
- package/src/integrations/snowflakecortex/README.md +167 -0
- package/src/integrations/snowflakecortex/client.ts +2 -3
- package/src/integrations/snowflakecortex/docs.manifest.json +5 -0
- package/src/integrations/snowflakecortex/types.ts +3 -11
- package/src/integrations/snowflakepostgres/README.md +233 -0
- package/src/integrations/snowflakepostgres/client.ts +1 -1
- package/src/integrations/snowflakepostgres/docs.manifest.json +5 -0
- package/src/integrations/snowflakepostgres/types.ts +1 -0
- package/src/integrations/stabilityai/README.md +2 -2
- package/src/integrations/stabilityai/docs.manifest.json +5 -0
- package/src/integrations/stripe/docs.manifest.json +5 -0
- package/src/integrations/superblocks-ocr/docs.manifest.json +5 -0
- package/src/integrations/twilio/docs.manifest.json +5 -0
- package/src/integrations/zendesk/docs.manifest.json +5 -0
- package/src/integrations/zoom/README.md +15 -15
- package/src/integrations/zoom/docs.manifest.json +5 -0
- package/src/runtime/context.ts +11 -11
- package/src/runtime/executor.ts +2 -2
- package/src/runtime/index.ts +1 -23
- package/src/types.ts +16 -6
- package/dist/api/streaming.d.ts +0 -229
- package/dist/api/streaming.d.ts.map +0 -1
- package/dist/api/streaming.js +0 -107
- package/dist/api/streaming.js.map +0 -1
- package/dist/api/streaming.test.d.ts +0 -5
- package/dist/api/streaming.test.d.ts.map +0 -1
- package/dist/api/streaming.test.js +0 -364
- package/dist/api/streaming.test.js.map +0 -1
- package/dist/integrations/couchbase/client.d.ts +0 -36
- package/dist/integrations/couchbase/client.d.ts.map +0 -1
- package/dist/integrations/couchbase/client.js +0 -148
- package/dist/integrations/couchbase/client.js.map +0 -1
- package/dist/integrations/couchbase/index.d.ts +0 -8
- package/dist/integrations/couchbase/index.d.ts.map +0 -1
- package/dist/integrations/couchbase/index.js +0 -7
- package/dist/integrations/couchbase/index.js.map +0 -1
- package/dist/integrations/couchbase/types.d.ts +0 -100
- package/dist/integrations/couchbase/types.d.ts.map +0 -1
- package/dist/integrations/couchbase/types.js +0 -5
- package/dist/integrations/couchbase/types.js.map +0 -1
- package/dist/integrations/kafka/client.d.ts +0 -25
- package/dist/integrations/kafka/client.d.ts.map +0 -1
- package/dist/integrations/kafka/client.js +0 -124
- package/dist/integrations/kafka/client.js.map +0 -1
- package/dist/integrations/kafka/index.d.ts +0 -8
- package/dist/integrations/kafka/index.d.ts.map +0 -1
- package/dist/integrations/kafka/index.js +0 -7
- package/dist/integrations/kafka/index.js.map +0 -1
- package/dist/integrations/kafka/types.d.ts +0 -113
- package/dist/integrations/kafka/types.d.ts.map +0 -1
- package/dist/integrations/kafka/types.js +0 -5
- package/dist/integrations/kafka/types.js.map +0 -1
- package/dist/integrations/kinesis/client.d.ts +0 -31
- package/dist/integrations/kinesis/client.d.ts.map +0 -1
- package/dist/integrations/kinesis/client.js +0 -101
- package/dist/integrations/kinesis/client.js.map +0 -1
- package/dist/integrations/kinesis/index.d.ts +0 -8
- package/dist/integrations/kinesis/index.d.ts.map +0 -1
- package/dist/integrations/kinesis/index.js +0 -7
- package/dist/integrations/kinesis/index.js.map +0 -1
- package/dist/integrations/kinesis/types.d.ts +0 -97
- package/dist/integrations/kinesis/types.d.ts.map +0 -1
- package/dist/integrations/kinesis/types.js +0 -7
- package/dist/integrations/kinesis/types.js.map +0 -1
- package/dist/integrations/python/client.d.ts +0 -42
- package/dist/integrations/python/client.d.ts.map +0 -1
- package/dist/integrations/python/client.js +0 -89
- package/dist/integrations/python/client.js.map +0 -1
- package/dist/integrations/python/client.test.d.ts +0 -5
- package/dist/integrations/python/client.test.d.ts.map +0 -1
- package/dist/integrations/python/client.test.js +0 -214
- package/dist/integrations/python/client.test.js.map +0 -1
- package/dist/integrations/python/index.d.ts +0 -6
- package/dist/integrations/python/index.d.ts.map +0 -1
- package/dist/integrations/python/index.js +0 -5
- package/dist/integrations/python/index.js.map +0 -1
- package/dist/integrations/python/types.d.ts +0 -85
- package/dist/integrations/python/types.d.ts.map +0 -1
- package/dist/integrations/python/types.js +0 -5
- package/dist/integrations/python/types.js.map +0 -1
- package/dist/integrations/redis/client.d.ts +0 -43
- package/dist/integrations/redis/client.d.ts.map +0 -1
- package/dist/integrations/redis/client.js +0 -142
- package/dist/integrations/redis/client.js.map +0 -1
- package/dist/integrations/redis/index.d.ts +0 -8
- package/dist/integrations/redis/index.d.ts.map +0 -1
- package/dist/integrations/redis/index.js +0 -7
- package/dist/integrations/redis/index.js.map +0 -1
- package/dist/integrations/redis/types.d.ts +0 -137
- package/dist/integrations/redis/types.d.ts.map +0 -1
- package/dist/integrations/redis/types.js +0 -5
- package/dist/integrations/redis/types.js.map +0 -1
- package/dist/runtime/execute.d.ts +0 -128
- package/dist/runtime/execute.d.ts.map +0 -1
- package/dist/runtime/execute.js +0 -84
- package/dist/runtime/execute.js.map +0 -1
- package/dist/runtime/streaming-context.d.ts +0 -49
- package/dist/runtime/streaming-context.d.ts.map +0 -1
- package/dist/runtime/streaming-context.js +0 -71
- package/dist/runtime/streaming-context.js.map +0 -1
- package/dist/runtime/streaming-executor.d.ts +0 -159
- package/dist/runtime/streaming-executor.d.ts.map +0 -1
- package/dist/runtime/streaming-executor.js +0 -229
- package/dist/runtime/streaming-executor.js.map +0 -1
- package/src/api/streaming.test.ts +0 -432
- package/src/api/streaming.ts +0 -302
- package/src/integrations/couchbase/README.md +0 -138
- package/src/integrations/couchbase/client.ts +0 -224
- package/src/integrations/couchbase/index.ts +0 -8
- package/src/integrations/couchbase/types.ts +0 -125
- package/src/integrations/kafka/README.md +0 -144
- package/src/integrations/kafka/client.ts +0 -215
- package/src/integrations/kafka/index.ts +0 -14
- package/src/integrations/kafka/types.ts +0 -127
- package/src/integrations/kinesis/README.md +0 -153
- package/src/integrations/kinesis/client.ts +0 -146
- package/src/integrations/kinesis/index.ts +0 -14
- package/src/integrations/kinesis/types.ts +0 -114
- package/src/integrations/python/README.md +0 -566
- package/src/integrations/python/client.test.ts +0 -340
- package/src/integrations/python/client.ts +0 -134
- package/src/integrations/python/index.ts +0 -6
- package/src/integrations/python/types.ts +0 -91
- package/src/integrations/redis/README.md +0 -200
- package/src/integrations/redis/client.ts +0 -207
- package/src/integrations/redis/index.ts +0 -8
- package/src/integrations/redis/types.ts +0 -166
- package/src/runtime/execute.ts +0 -221
- package/src/runtime/streaming-context.ts +0 -164
- package/src/runtime/streaming-executor.ts +0 -367
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## Non-JSON Responses
|
|
2
|
+
|
|
3
|
+
`apiRequest()` decodes responses as JSON by default. For endpoints that return non-JSON payloads (XML, CSV, HTML, plain text), pass `responseType: "text"` to receive the decoded body as a string.
|
|
4
|
+
|
|
5
|
+
With `responseType: "text"` the response schema may be omitted — the raw string is returned typed `unknown`:
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
const xml = await ctx.integrations.legacyApi.apiRequest({
|
|
9
|
+
method: "GET",
|
|
10
|
+
path: "/report.xml",
|
|
11
|
+
responseType: "text",
|
|
12
|
+
});
|
|
13
|
+
// xml is the raw XML string (typed unknown)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
To get a typed string instead, validate with a schema matching the decoded value:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
const xml = await ctx.integrations.legacyApi.apiRequest(
|
|
20
|
+
{ method: "GET", path: "/report.xml", responseType: "text" },
|
|
21
|
+
{ response: z.string() },
|
|
22
|
+
);
|
|
23
|
+
// xml is typed string
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
JSON responses (the default) always require a response schema. Omitting the schema is only allowed together with an explicit `responseType: "text"`, so unvalidated JSON is not representable.
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import type { BaseIntegrationClient } from "../../types.js";
|
|
6
|
-
import type {
|
|
7
|
-
SupportsApiRequest,
|
|
8
|
-
SupportsStreamingApiRequest,
|
|
9
|
-
} from "../base/index.js";
|
|
6
|
+
import type { SupportsApiRequest } from "../base/index.js";
|
|
10
7
|
|
|
11
8
|
/**
|
|
12
9
|
* REST API Integration client for making HTTP requests to configured endpoints.
|
|
@@ -34,7 +31,4 @@ import type {
|
|
|
34
31
|
* ```
|
|
35
32
|
*/
|
|
36
33
|
export interface RestApiIntegrationPluginClient
|
|
37
|
-
extends
|
|
38
|
-
BaseIntegrationClient,
|
|
39
|
-
SupportsApiRequest,
|
|
40
|
-
SupportsStreamingApiRequest {}
|
|
34
|
+
extends BaseIntegrationClient, SupportsApiRequest {}
|
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
* Uses the native S3 plugin type from @superblocksteam/types.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { z } from "zod";
|
|
8
7
|
import type { PartialMessage } from "@bufbuild/protobuf";
|
|
8
|
+
import type { z } from "zod";
|
|
9
|
+
|
|
9
10
|
import type { Plugin as S3Plugin } from "@superblocksteam/types/dist/src/plugins/s3/v1/plugin_pb";
|
|
10
|
-
|
|
11
|
-
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
11
|
+
|
|
12
12
|
import { RestApiValidationError } from "../../errors.js";
|
|
13
13
|
import { IntegrationError } from "../../runtime/errors.js";
|
|
14
|
+
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
15
|
+
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
14
16
|
import type {
|
|
15
17
|
S3Client,
|
|
16
18
|
S3Action,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import type { z } from "zod";
|
|
6
|
+
|
|
6
7
|
import type { BaseIntegrationClient } from "../../types.js";
|
|
7
8
|
import type { TraceMetadata } from "../registry.js";
|
|
8
9
|
|
|
@@ -129,7 +130,9 @@ export interface S3Client extends BaseIntegrationClient {
|
|
|
129
130
|
*
|
|
130
131
|
* @param bucket - Bucket name
|
|
131
132
|
* @param path - Object key/path
|
|
132
|
-
* @param body -
|
|
133
|
+
* @param body - String content stored verbatim (no base64 decoding is performed).
|
|
134
|
+
* Suitable for plain text, JSON, or CSV. For binary files (PDF, DOCX, images),
|
|
135
|
+
* use {@link S3Client.uploadMultipleObjects | uploadMultipleObjects} with file references instead.
|
|
133
136
|
* @param metadata - Optional trace metadata for diagnostics
|
|
134
137
|
*/
|
|
135
138
|
uploadObject(
|
|
@@ -77,7 +77,7 @@ const opportunities = await ctx.integrations.salesforce.query(
|
|
|
77
77
|
### Create a Record
|
|
78
78
|
|
|
79
79
|
```typescript
|
|
80
|
-
await salesforce.create("Account", {
|
|
80
|
+
await ctx.integrations.salesforce.create("Account", {
|
|
81
81
|
Name: "Acme Corp",
|
|
82
82
|
Industry: "Technology",
|
|
83
83
|
Website: "https://acme.example.com",
|
|
@@ -87,7 +87,7 @@ await salesforce.create("Account", {
|
|
|
87
87
|
### Read a Record by ID
|
|
88
88
|
|
|
89
89
|
```typescript
|
|
90
|
-
const account = await salesforce.read(
|
|
90
|
+
const account = await ctx.integrations.salesforce.read(
|
|
91
91
|
"Account",
|
|
92
92
|
"001xx000003DGb2AAG",
|
|
93
93
|
z.object({
|
|
@@ -101,7 +101,7 @@ const account = await salesforce.read(
|
|
|
101
101
|
### Update a Record
|
|
102
102
|
|
|
103
103
|
```typescript
|
|
104
|
-
await salesforce.update("Account", "001xx000003DGb2AAG", {
|
|
104
|
+
await ctx.integrations.salesforce.update("Account", "001xx000003DGb2AAG", {
|
|
105
105
|
Name: "Acme Corp (Updated)",
|
|
106
106
|
Industry: "Software",
|
|
107
107
|
});
|
|
@@ -116,7 +116,7 @@ await ctx.integrations.salesforce.remove("Account", "001xx000003DGb2AAG");
|
|
|
116
116
|
### Bulk Create
|
|
117
117
|
|
|
118
118
|
```typescript
|
|
119
|
-
await salesforce.bulkCreate("Contact", [
|
|
119
|
+
await ctx.integrations.salesforce.bulkCreate("Contact", [
|
|
120
120
|
{ FirstName: "Alice", LastName: "Smith", Email: "alice@example.com" },
|
|
121
121
|
{ FirstName: "Bob", LastName: "Jones", Email: "bob@example.com" },
|
|
122
122
|
{ FirstName: "Charlie", LastName: "Lee", Email: "charlie@example.com" },
|
|
@@ -126,7 +126,7 @@ await salesforce.bulkCreate("Contact", [
|
|
|
126
126
|
### Bulk Update
|
|
127
127
|
|
|
128
128
|
```typescript
|
|
129
|
-
await salesforce.bulkUpdate("Contact", [
|
|
129
|
+
await ctx.integrations.salesforce.bulkUpdate("Contact", [
|
|
130
130
|
{ Id: "003xx000004TmiQAAS", Email: "alice-new@example.com" },
|
|
131
131
|
{ Id: "003xx000004TmiRAAS", Email: "bob-new@example.com" },
|
|
132
132
|
]);
|
|
@@ -135,7 +135,7 @@ await salesforce.bulkUpdate("Contact", [
|
|
|
135
135
|
### Bulk Delete
|
|
136
136
|
|
|
137
137
|
```typescript
|
|
138
|
-
await salesforce.bulkDelete("Contact", [
|
|
138
|
+
await ctx.integrations.salesforce.bulkDelete("Contact", [
|
|
139
139
|
{ Id: "003xx000004TmiQAAS" },
|
|
140
140
|
{ Id: "003xx000004TmiRAAS" },
|
|
141
141
|
]);
|
|
@@ -144,7 +144,7 @@ await salesforce.bulkDelete("Contact", [
|
|
|
144
144
|
### Bulk Upsert
|
|
145
145
|
|
|
146
146
|
```typescript
|
|
147
|
-
await salesforce.bulkUpsert(
|
|
147
|
+
await ctx.integrations.salesforce.bulkUpsert(
|
|
148
148
|
"Account",
|
|
149
149
|
[
|
|
150
150
|
{ ExternalId__c: "EXT-001", Name: "Acme Corp", Industry: "Tech" },
|
|
@@ -198,12 +198,14 @@ Bulk update and delete records must include the `Id` field:
|
|
|
198
198
|
|
|
199
199
|
```typescript
|
|
200
200
|
// CORRECT
|
|
201
|
-
await salesforce.bulkUpdate("Contact", [
|
|
201
|
+
await ctx.integrations.salesforce.bulkUpdate("Contact", [
|
|
202
202
|
{ Id: "003xx000004TmiQAAS", Email: "new@example.com" },
|
|
203
203
|
]);
|
|
204
204
|
|
|
205
205
|
// WRONG - Missing Id field
|
|
206
|
-
await salesforce.bulkUpdate("Contact", [
|
|
206
|
+
await ctx.integrations.salesforce.bulkUpdate("Contact", [
|
|
207
|
+
{ Email: "new@example.com" },
|
|
208
|
+
]);
|
|
207
209
|
```
|
|
208
210
|
|
|
209
211
|
## Error Handling
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { z } from "zod";
|
|
9
|
-
|
|
10
|
-
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
9
|
+
|
|
11
10
|
import { QueryValidationError, RestApiValidationError } from "../../errors.js";
|
|
12
11
|
import { IntegrationError } from "../../runtime/errors.js";
|
|
12
|
+
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
13
|
+
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
13
14
|
import { describeType } from "../utils.js";
|
|
14
15
|
import type { SalesforceClient } from "./types.js";
|
|
15
16
|
|
|
@@ -13,7 +13,7 @@ Send transactional emails, manage contacts, and interact with SendGrid's email A
|
|
|
13
13
|
### Send a Simple Email
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { api, z,
|
|
16
|
+
import { api, z, sendGrid } from "@superblocksteam/sdk-api";
|
|
17
17
|
|
|
18
18
|
// Integration ID from the integrations panel
|
|
19
19
|
const PROD_SENDGRID = "a1b2c3d4-5678-90ab-cdef-sendgrid0001";
|
|
@@ -23,7 +23,7 @@ const SendEmailResponseSchema = z.object({}).optional();
|
|
|
23
23
|
|
|
24
24
|
export default api({
|
|
25
25
|
integrations: {
|
|
26
|
-
sendgrid:
|
|
26
|
+
sendgrid: sendGrid(PROD_SENDGRID),
|
|
27
27
|
},
|
|
28
28
|
name: "SendGridExample",
|
|
29
29
|
input: z.object({
|
|
@@ -16,7 +16,6 @@ Send messages, manage channels, and interact with Slack workspaces.
|
|
|
16
16
|
import { api, z, slack } from "@superblocksteam/sdk-api";
|
|
17
17
|
|
|
18
18
|
const PostMessageResponseSchema = z.object({
|
|
19
|
-
ok: z.boolean(),
|
|
20
19
|
channel: z.string(),
|
|
21
20
|
ts: z.string(), // Message timestamp (unique ID)
|
|
22
21
|
message: z.object({
|
|
@@ -55,6 +54,10 @@ export default api({
|
|
|
55
54
|
{ response: PostMessageResponseSchema },
|
|
56
55
|
);
|
|
57
56
|
|
|
57
|
+
if (!result.ok) {
|
|
58
|
+
throw new Error(`Slack API error: ${result.error}`);
|
|
59
|
+
}
|
|
60
|
+
|
|
58
61
|
return { messageId: result.ts };
|
|
59
62
|
},
|
|
60
63
|
});
|
|
@@ -106,7 +109,6 @@ const result = await ctx.integrations.slack.apiRequest(
|
|
|
106
109
|
|
|
107
110
|
```typescript
|
|
108
111
|
const ListChannelsResponseSchema = z.object({
|
|
109
|
-
ok: z.boolean(),
|
|
110
112
|
channels: z.array(
|
|
111
113
|
z.object({
|
|
112
114
|
id: z.string(),
|
|
@@ -135,6 +137,10 @@ const result = await ctx.integrations.slack.apiRequest(
|
|
|
135
137
|
{ response: ListChannelsResponseSchema },
|
|
136
138
|
);
|
|
137
139
|
|
|
140
|
+
if (!result.ok) {
|
|
141
|
+
throw new Error(`Slack API error: ${result.error}`);
|
|
142
|
+
}
|
|
143
|
+
|
|
138
144
|
result.channels.forEach((channel) => {
|
|
139
145
|
console.log(`#${channel.name} (${channel.id})`);
|
|
140
146
|
});
|
|
@@ -144,7 +150,6 @@ result.channels.forEach((channel) => {
|
|
|
144
150
|
|
|
145
151
|
```typescript
|
|
146
152
|
const UserInfoResponseSchema = z.object({
|
|
147
|
-
ok: z.boolean(),
|
|
148
153
|
user: z.object({
|
|
149
154
|
id: z.string(),
|
|
150
155
|
name: z.string(),
|
|
@@ -167,6 +172,10 @@ const result = await ctx.integrations.slack.apiRequest(
|
|
|
167
172
|
{ response: UserInfoResponseSchema },
|
|
168
173
|
);
|
|
169
174
|
|
|
175
|
+
if (!result.ok) {
|
|
176
|
+
throw new Error(`Slack API error: ${result.error}`);
|
|
177
|
+
}
|
|
178
|
+
|
|
170
179
|
console.log(`User: ${result.user.real_name} (${result.user.profile.email})`);
|
|
171
180
|
```
|
|
172
181
|
|
|
@@ -174,7 +183,6 @@ console.log(`User: ${result.user.real_name} (${result.user.profile.email})`);
|
|
|
174
183
|
|
|
175
184
|
```typescript
|
|
176
185
|
const FileUploadResponseSchema = z.object({
|
|
177
|
-
ok: z.boolean(),
|
|
178
186
|
file: z.object({
|
|
179
187
|
id: z.string(),
|
|
180
188
|
name: z.string(),
|
|
@@ -197,6 +205,10 @@ const result = await ctx.integrations.slack.apiRequest(
|
|
|
197
205
|
{ response: FileUploadResponseSchema },
|
|
198
206
|
);
|
|
199
207
|
|
|
208
|
+
if (!result.ok) {
|
|
209
|
+
throw new Error(`Slack API error: ${result.error}`);
|
|
210
|
+
}
|
|
211
|
+
|
|
200
212
|
console.log(`File uploaded: ${result.file.permalink}`);
|
|
201
213
|
```
|
|
202
214
|
|
|
@@ -221,7 +233,6 @@ const result = await ctx.integrations.slack.apiRequest(
|
|
|
221
233
|
|
|
222
234
|
```typescript
|
|
223
235
|
const UpdateMessageResponseSchema = z.object({
|
|
224
|
-
ok: z.boolean(),
|
|
225
236
|
channel: z.string(),
|
|
226
237
|
ts: z.string(),
|
|
227
238
|
text: z.string(),
|
|
@@ -333,6 +344,10 @@ async function getAllChannels(slack: SlackClient) {
|
|
|
333
344
|
{ response: ListChannelsResponseSchema },
|
|
334
345
|
);
|
|
335
346
|
|
|
347
|
+
if (!result.ok) {
|
|
348
|
+
throw new Error(`Slack API error: ${result.error}`);
|
|
349
|
+
}
|
|
350
|
+
|
|
336
351
|
allChannels.push(...result.channels);
|
|
337
352
|
cursor = result.response_metadata?.next_cursor;
|
|
338
353
|
} while (cursor);
|
|
@@ -371,30 +386,58 @@ Code block
|
|
|
371
386
|
|
|
372
387
|
## Error Handling
|
|
373
388
|
|
|
389
|
+
Slack returns API errors as HTTP 200 with `{ ok: false, error: "error_code" }` instead of HTTP error status codes. The SDK surfaces these as the `SlackErrorResponse` branch of a discriminated union (`SlackResponse<T>`) — no exceptions, just check `result.ok`:
|
|
390
|
+
|
|
374
391
|
```typescript
|
|
375
|
-
import {
|
|
392
|
+
import type { SlackResponse } from "@superblocksteam/sdk-api";
|
|
393
|
+
|
|
394
|
+
const result = await ctx.integrations.slack.apiRequest(
|
|
395
|
+
{ method: "POST", path: "/chat.postMessage", body: { channel, text } },
|
|
396
|
+
{ response: PostMessageResponseSchema },
|
|
397
|
+
);
|
|
376
398
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
);
|
|
399
|
+
if (!result.ok) {
|
|
400
|
+
// TypeScript narrows to SlackErrorResponse
|
|
401
|
+
console.error(`Slack error: ${result.error}`);
|
|
402
|
+
// e.g. "missing_scope", "channel_not_found", "not_authed"
|
|
382
403
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
}
|
|
387
|
-
} catch (error) {
|
|
388
|
-
if (error instanceof RestApiValidationError) {
|
|
389
|
-
console.error("Validation failed:", error.details.zodError);
|
|
404
|
+
if (result.needed) {
|
|
405
|
+
console.error(`Required scopes: ${result.needed}`);
|
|
406
|
+
// e.g. "chat:write"
|
|
390
407
|
}
|
|
408
|
+
return;
|
|
391
409
|
}
|
|
410
|
+
|
|
411
|
+
// TypeScript narrows to T & { ok: true } — all success fields accessible
|
|
412
|
+
console.log(`Sent message: ${result.ts}`);
|
|
392
413
|
```
|
|
393
414
|
|
|
415
|
+
### SlackResponse\<T\>
|
|
416
|
+
|
|
417
|
+
Every `apiRequest` call returns `SlackResponse<T>`, a discriminated union:
|
|
418
|
+
|
|
419
|
+
| Branch | Shape | When |
|
|
420
|
+
| ------- | -------------------- | -------------------------------------------------------------------------- |
|
|
421
|
+
| Success | `T & { ok: true }` | Slack returned `ok: true`; response validated against your Zod schema |
|
|
422
|
+
| Error | `SlackErrorResponse` | Slack returned `ok: false`; contains `error`, optional `needed`/`provided` |
|
|
423
|
+
|
|
424
|
+
`T` is your payload schema output. Define payload fields only (do not include `ok` in your response schema) and the SDK injects `ok: true` for the discriminant on success.
|
|
425
|
+
|
|
426
|
+
**`SlackErrorResponse` fields:**
|
|
427
|
+
|
|
428
|
+
| Field | Type | Description |
|
|
429
|
+
| ---------- | --------- | ------------------------------------------------------------ |
|
|
430
|
+
| `ok` | `false` | Discriminant |
|
|
431
|
+
| `error` | `string` | Slack error code (e.g. `missing_scope`, `channel_not_found`) |
|
|
432
|
+
| `needed` | `string?` | Required OAuth scopes (present on `missing_scope` errors) |
|
|
433
|
+
| `provided` | `string?` | Current token scopes (present on `missing_scope` errors) |
|
|
434
|
+
|
|
435
|
+
Schema validation errors (Zod mismatch on a _success_ response) still throw `RestApiValidationError`. Body validation errors also throw. Only Slack's own `ok: false` errors are returned as values.
|
|
436
|
+
|
|
394
437
|
## API Reference
|
|
395
438
|
|
|
396
439
|
- [Slack API Documentation](https://api.slack.com/methods)
|
|
397
440
|
- [chat.postMessage](https://api.slack.com/methods/chat.postMessage)
|
|
398
441
|
- [conversations.list](https://api.slack.com/methods/conversations.list)
|
|
399
|
-
- [Block Kit Builder](https://app.slack.com/block-kit-builder)
|
|
400
442
|
- [OAuth Scopes](https://api.slack.com/scopes)
|
|
443
|
+
- [Block Kit Builder](https://app.slack.com/block-kit-builder)
|