@superblocksteam/sdk-api 0.0.6 → 0.0.7
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 +98 -0
- package/dist/integrations/base/rest-api-client-base.js.map +1 -0
- package/dist/integrations/base/rest-api-integration-client.d.ts +11 -65
- package/dist/integrations/base/rest-api-integration-client.d.ts.map +1 -1
- package/dist/integrations/base/rest-api-integration-client.js +11 -174
- package/dist/integrations/base/rest-api-integration-client.js.map +1 -1
- package/dist/integrations/base/types.d.ts +1 -67
- package/dist/integrations/base/types.d.ts.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 +608 -0
- package/dist/integrations/documentation-resolver.test.js.map +1 -0
- package/dist/integrations/documentation.d.ts +8 -0
- package/dist/integrations/documentation.d.ts.map +1 -0
- package/dist/integrations/documentation.js +277 -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 +2 -2
- 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/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 +2 -2
- 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 +2 -3
- package/src/integrations/base/rest-api-client-base.ts +134 -0
- package/src/integrations/base/rest-api-integration-client.ts +15 -239
- package/src/integrations/base/types.ts +4 -74
- 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 +704 -0
- package/src/integrations/documentation.test.ts +120 -0
- package/src/integrations/documentation.ts +421 -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 +5 -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 +6 -4
- 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/docs.manifest.json +5 -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
|
@@ -75,7 +75,7 @@ export default api({
|
|
|
75
75
|
const result = await ctx.integrations.box.apiRequest(
|
|
76
76
|
{
|
|
77
77
|
method: "GET",
|
|
78
|
-
path: `/
|
|
78
|
+
path: `/folders/${folderId}/items`,
|
|
79
79
|
params: {
|
|
80
80
|
limit: limit,
|
|
81
81
|
offset: 0,
|
|
@@ -133,7 +133,7 @@ const FileInfoSchema = z.object({
|
|
|
133
133
|
const file = await ctx.integrations.box.apiRequest(
|
|
134
134
|
{
|
|
135
135
|
method: "GET",
|
|
136
|
-
path: `/
|
|
136
|
+
path: `/files/${fileId}`,
|
|
137
137
|
params: {
|
|
138
138
|
fields:
|
|
139
139
|
"id,name,size,created_at,modified_at,created_by,modified_by,parent,sha1,shared_link",
|
|
@@ -154,7 +154,7 @@ const DownloadUrlResponseSchema = z.string();
|
|
|
154
154
|
const content = await ctx.integrations.box.apiRequest(
|
|
155
155
|
{
|
|
156
156
|
method: "GET",
|
|
157
|
-
path: `/
|
|
157
|
+
path: `/files/${fileId}/content`,
|
|
158
158
|
},
|
|
159
159
|
{ response: DownloadUrlResponseSchema },
|
|
160
160
|
);
|
|
@@ -172,7 +172,7 @@ const UploadResponseSchema = z.object({
|
|
|
172
172
|
const result = await ctx.integrations.box.apiRequest(
|
|
173
173
|
{
|
|
174
174
|
method: "POST",
|
|
175
|
-
path: "/
|
|
175
|
+
path: "/files/content",
|
|
176
176
|
headers: {
|
|
177
177
|
"Content-Type": "multipart/form-data",
|
|
178
178
|
},
|
|
@@ -209,7 +209,7 @@ const FolderInfoSchema = z.object({
|
|
|
209
209
|
const folder = await ctx.integrations.box.apiRequest(
|
|
210
210
|
{
|
|
211
211
|
method: "POST",
|
|
212
|
-
path: "/
|
|
212
|
+
path: "/folders",
|
|
213
213
|
body: {
|
|
214
214
|
name: "New Folder",
|
|
215
215
|
parent: {
|
|
@@ -229,7 +229,7 @@ console.log(`Created folder: ${folder.name} (${folder.id})`);
|
|
|
229
229
|
const copiedFile = await ctx.integrations.box.apiRequest(
|
|
230
230
|
{
|
|
231
231
|
method: "POST",
|
|
232
|
-
path: `/
|
|
232
|
+
path: `/files/${fileId}/copy`,
|
|
233
233
|
body: {
|
|
234
234
|
parent: {
|
|
235
235
|
id: destinationFolderId,
|
|
@@ -247,7 +247,7 @@ const copiedFile = await ctx.integrations.box.apiRequest(
|
|
|
247
247
|
const movedFile = await ctx.integrations.box.apiRequest(
|
|
248
248
|
{
|
|
249
249
|
method: "PUT",
|
|
250
|
-
path: `/
|
|
250
|
+
path: `/files/${fileId}`,
|
|
251
251
|
body: {
|
|
252
252
|
parent: {
|
|
253
253
|
id: newParentFolderId,
|
|
@@ -264,7 +264,7 @@ const movedFile = await ctx.integrations.box.apiRequest(
|
|
|
264
264
|
const updatedFile = await ctx.integrations.box.apiRequest(
|
|
265
265
|
{
|
|
266
266
|
method: "PUT",
|
|
267
|
-
path: `/
|
|
267
|
+
path: `/files/${fileId}`,
|
|
268
268
|
body: {
|
|
269
269
|
name: "renamed-file.txt",
|
|
270
270
|
description: "Updated file description",
|
|
@@ -281,7 +281,7 @@ const updatedFile = await ctx.integrations.box.apiRequest(
|
|
|
281
281
|
await ctx.integrations.box.apiRequest(
|
|
282
282
|
{
|
|
283
283
|
method: "DELETE",
|
|
284
|
-
path: `/
|
|
284
|
+
path: `/files/${fileId}`,
|
|
285
285
|
},
|
|
286
286
|
{ response: z.void() },
|
|
287
287
|
);
|
|
@@ -304,7 +304,7 @@ const SharedLinkSchema = z.object({
|
|
|
304
304
|
const file = await ctx.integrations.box.apiRequest(
|
|
305
305
|
{
|
|
306
306
|
method: "PUT",
|
|
307
|
-
path: `/
|
|
307
|
+
path: `/files/${fileId}`,
|
|
308
308
|
params: {
|
|
309
309
|
fields: "shared_link",
|
|
310
310
|
},
|
|
@@ -337,7 +337,7 @@ const SearchResponseSchema = z.object({
|
|
|
337
337
|
const result = await ctx.integrations.box.apiRequest(
|
|
338
338
|
{
|
|
339
339
|
method: "GET",
|
|
340
|
-
path: "/
|
|
340
|
+
path: "/search",
|
|
341
341
|
params: {
|
|
342
342
|
query: "quarterly report",
|
|
343
343
|
type: "file",
|
|
@@ -372,7 +372,7 @@ const CommentSchema = z.object({
|
|
|
372
372
|
const comment = await ctx.integrations.box.apiRequest(
|
|
373
373
|
{
|
|
374
374
|
method: "POST",
|
|
375
|
-
path: "/
|
|
375
|
+
path: "/comments",
|
|
376
376
|
body: {
|
|
377
377
|
item: {
|
|
378
378
|
type: "file",
|
|
@@ -400,22 +400,22 @@ await box.uploadFile({ ... });
|
|
|
400
400
|
|
|
401
401
|
// CORRECT - Use apiRequest
|
|
402
402
|
await ctx.integrations.box.apiRequest(
|
|
403
|
-
{ method: "GET", path: `/
|
|
403
|
+
{ method: "GET", path: `/folders/${folderId}/items`, params: { ... } },
|
|
404
404
|
{ response: ListItemsResponseSchema }
|
|
405
405
|
);
|
|
406
406
|
```
|
|
407
407
|
|
|
408
408
|
### API Version in Path
|
|
409
409
|
|
|
410
|
-
|
|
410
|
+
The base URL already includes `/2.0`, so do not repeat it in paths:
|
|
411
411
|
|
|
412
412
|
```typescript
|
|
413
|
-
// CORRECT -
|
|
414
|
-
const path = "/2.0/files/123";
|
|
415
|
-
const path = "/2.0/folders/0/items";
|
|
416
|
-
|
|
417
|
-
// WRONG - Missing version
|
|
413
|
+
// CORRECT - No version prefix (base URL already has /2.0)
|
|
418
414
|
const path = "/files/123";
|
|
415
|
+
const path = "/folders/0/items";
|
|
416
|
+
|
|
417
|
+
// WRONG - Duplicates version from base URL
|
|
418
|
+
const path = "/2.0/files/123";
|
|
419
419
|
```
|
|
420
420
|
|
|
421
421
|
### Root Folder ID is "0"
|
|
@@ -437,7 +437,7 @@ Use `fields` to get specific data:
|
|
|
437
437
|
```typescript
|
|
438
438
|
// Without fields, you get minimal data
|
|
439
439
|
const result = await ctx.integrations.box.apiRequest(
|
|
440
|
-
{ method: "GET", path: `/
|
|
440
|
+
{ method: "GET", path: `/files/${fileId}` },
|
|
441
441
|
{ response: FileSchema },
|
|
442
442
|
);
|
|
443
443
|
|
|
@@ -445,7 +445,7 @@ const result = await ctx.integrations.box.apiRequest(
|
|
|
445
445
|
const result = await ctx.integrations.box.apiRequest(
|
|
446
446
|
{
|
|
447
447
|
method: "GET",
|
|
448
|
-
path: `/
|
|
448
|
+
path: `/files/${fileId}`,
|
|
449
449
|
params: {
|
|
450
450
|
fields: "id,name,size,created_at,modified_at,parent,shared_link",
|
|
451
451
|
},
|
|
@@ -477,7 +477,7 @@ Use `If-Match` with etag for safe updates:
|
|
|
477
477
|
const result = await ctx.integrations.box.apiRequest(
|
|
478
478
|
{
|
|
479
479
|
method: "PUT",
|
|
480
|
-
path: `/
|
|
480
|
+
path: `/files/${fileId}`,
|
|
481
481
|
headers: {
|
|
482
482
|
"If-Match": file.etag, // Prevents overwriting concurrent changes
|
|
483
483
|
},
|
|
@@ -503,7 +503,7 @@ async function getAllItems(box: BoxClient, folderId: string) {
|
|
|
503
503
|
const result = await ctx.integrations.box.apiRequest(
|
|
504
504
|
{
|
|
505
505
|
method: "GET",
|
|
506
|
-
path: `/
|
|
506
|
+
path: `/folders/${folderId}/items`,
|
|
507
507
|
params: { limit, offset, fields: "id,name,type" },
|
|
508
508
|
},
|
|
509
509
|
{ response: ListItemsResponseSchema },
|
|
@@ -557,7 +557,7 @@ import { RestApiValidationError } from "@superblocksteam/sdk-api";
|
|
|
557
557
|
|
|
558
558
|
try {
|
|
559
559
|
const result = await ctx.integrations.box.apiRequest(
|
|
560
|
-
{ method: "GET", path: `/
|
|
560
|
+
{ method: "GET", path: `/folders/${folderId}/items`, params: { ... } },
|
|
561
561
|
{ response: ListItemsResponseSchema }
|
|
562
562
|
);
|
|
563
563
|
} catch (error) {
|
|
@@ -51,7 +51,7 @@ export default api({
|
|
|
51
51
|
const result = await ctx.integrations.circleci.apiRequest(
|
|
52
52
|
{
|
|
53
53
|
method: "POST",
|
|
54
|
-
path: `/
|
|
54
|
+
path: `/project/${projectSlug}/pipeline`,
|
|
55
55
|
body: {
|
|
56
56
|
branch: branch,
|
|
57
57
|
parameters: {
|
|
@@ -73,7 +73,7 @@ export default api({
|
|
|
73
73
|
const result = await ctx.integrations.circleci.apiRequest(
|
|
74
74
|
{
|
|
75
75
|
method: "GET",
|
|
76
|
-
path: `/
|
|
76
|
+
path: `/pipeline/${pipelineId}`,
|
|
77
77
|
},
|
|
78
78
|
{ response: PipelineSchema },
|
|
79
79
|
);
|
|
@@ -102,7 +102,7 @@ const ListWorkflowsResponseSchema = z.object({
|
|
|
102
102
|
const result = await ctx.integrations.circleci.apiRequest(
|
|
103
103
|
{
|
|
104
104
|
method: "GET",
|
|
105
|
-
path: `/
|
|
105
|
+
path: `/pipeline/${pipelineId}/workflow`,
|
|
106
106
|
},
|
|
107
107
|
{ response: ListWorkflowsResponseSchema },
|
|
108
108
|
);
|
|
@@ -133,7 +133,7 @@ const ListJobsResponseSchema = z.object({
|
|
|
133
133
|
const result = await ctx.integrations.circleci.apiRequest(
|
|
134
134
|
{
|
|
135
135
|
method: "GET",
|
|
136
|
-
path: `/
|
|
136
|
+
path: `/workflow/${workflowId}/job`,
|
|
137
137
|
},
|
|
138
138
|
{ response: ListJobsResponseSchema },
|
|
139
139
|
);
|
|
@@ -162,7 +162,7 @@ const JobDetailSchema = z.object({
|
|
|
162
162
|
const result = await ctx.integrations.circleci.apiRequest(
|
|
163
163
|
{
|
|
164
164
|
method: "GET",
|
|
165
|
-
path: `/
|
|
165
|
+
path: `/project/${projectSlug}/job/${jobNumber}`,
|
|
166
166
|
},
|
|
167
167
|
{ response: JobDetailSchema },
|
|
168
168
|
);
|
|
@@ -178,7 +178,7 @@ const RetryResponseSchema = z.object({
|
|
|
178
178
|
const result = await ctx.integrations.circleci.apiRequest(
|
|
179
179
|
{
|
|
180
180
|
method: "POST",
|
|
181
|
-
path: `/
|
|
181
|
+
path: `/workflow/${workflowId}/rerun`,
|
|
182
182
|
body: {
|
|
183
183
|
from_failed: true, // Only rerun failed jobs
|
|
184
184
|
},
|
|
@@ -199,7 +199,7 @@ const CancelResponseSchema = z.object({
|
|
|
199
199
|
const result = await ctx.integrations.circleci.apiRequest(
|
|
200
200
|
{
|
|
201
201
|
method: "POST",
|
|
202
|
-
path: `/
|
|
202
|
+
path: `/workflow/${workflowId}/cancel`,
|
|
203
203
|
},
|
|
204
204
|
{ response: CancelResponseSchema },
|
|
205
205
|
);
|
|
@@ -216,7 +216,7 @@ const ListPipelinesResponseSchema = z.object({
|
|
|
216
216
|
const result = await ctx.integrations.circleci.apiRequest(
|
|
217
217
|
{
|
|
218
218
|
method: "GET",
|
|
219
|
-
path: `/
|
|
219
|
+
path: `/project/${projectSlug}/pipeline`,
|
|
220
220
|
params: {
|
|
221
221
|
branch: "main",
|
|
222
222
|
"page-token": undefined, // For pagination
|
|
@@ -247,7 +247,7 @@ const ProjectSchema = z.object({
|
|
|
247
247
|
const result = await ctx.integrations.circleci.apiRequest(
|
|
248
248
|
{
|
|
249
249
|
method: "GET",
|
|
250
|
-
path: `/
|
|
250
|
+
path: `/project/${projectSlug}`,
|
|
251
251
|
},
|
|
252
252
|
{ response: ProjectSchema },
|
|
253
253
|
);
|
|
@@ -270,7 +270,7 @@ const ListArtifactsResponseSchema = z.object({
|
|
|
270
270
|
const result = await ctx.integrations.circleci.apiRequest(
|
|
271
271
|
{
|
|
272
272
|
method: "GET",
|
|
273
|
-
path: `/
|
|
273
|
+
path: `/project/${projectSlug}/${jobNumber}/artifacts`,
|
|
274
274
|
},
|
|
275
275
|
{ response: ListArtifactsResponseSchema },
|
|
276
276
|
);
|
|
@@ -295,7 +295,7 @@ await circleci.getWorkflow({ ... });
|
|
|
295
295
|
|
|
296
296
|
// CORRECT - Use apiRequest
|
|
297
297
|
await ctx.integrations.circleci.apiRequest(
|
|
298
|
-
{ method: "POST", path: `/
|
|
298
|
+
{ method: "POST", path: `/project/${slug}/pipeline`, body: { ... } },
|
|
299
299
|
{ response: PipelineSchema }
|
|
300
300
|
);
|
|
301
301
|
```
|
|
@@ -317,13 +317,13 @@ const slug = "gl/my-group/my-repo";
|
|
|
317
317
|
|
|
318
318
|
### API Version in Path
|
|
319
319
|
|
|
320
|
-
|
|
320
|
+
The base URL already includes `/api/v2`, so do not repeat it in paths:
|
|
321
321
|
|
|
322
322
|
```typescript
|
|
323
|
-
//
|
|
323
|
+
// CORRECT - No version prefix (base URL already has /api/v2)
|
|
324
324
|
const path = `/project/${slug}/pipeline`;
|
|
325
325
|
|
|
326
|
-
//
|
|
326
|
+
// WRONG - Duplicates version from base URL
|
|
327
327
|
const path = `/api/v2/project/${slug}/pipeline`;
|
|
328
328
|
```
|
|
329
329
|
|
|
@@ -406,7 +406,7 @@ async function getAllPipelines(circleci: CircleCIClient, projectSlug: string) {
|
|
|
406
406
|
const result = await ctx.integrations.circleci.apiRequest(
|
|
407
407
|
{
|
|
408
408
|
method: "GET",
|
|
409
|
-
path: `/
|
|
409
|
+
path: `/project/${projectSlug}/pipeline`,
|
|
410
410
|
params: pageToken ? { "page-token": pageToken } : {},
|
|
411
411
|
},
|
|
412
412
|
{ response: ListPipelinesResponseSchema },
|
|
@@ -429,7 +429,7 @@ When rerunning workflows:
|
|
|
429
429
|
await ctx.integrations.circleci.apiRequest(
|
|
430
430
|
{
|
|
431
431
|
method: "POST",
|
|
432
|
-
path: `/
|
|
432
|
+
path: `/workflow/${workflowId}/rerun`,
|
|
433
433
|
body: {
|
|
434
434
|
from_failed: false, // Rerun everything
|
|
435
435
|
},
|
|
@@ -441,7 +441,7 @@ await ctx.integrations.circleci.apiRequest(
|
|
|
441
441
|
await ctx.integrations.circleci.apiRequest(
|
|
442
442
|
{
|
|
443
443
|
method: "POST",
|
|
444
|
-
path: `/
|
|
444
|
+
path: `/workflow/${workflowId}/rerun`,
|
|
445
445
|
body: {
|
|
446
446
|
from_failed: true, // Only failed jobs
|
|
447
447
|
},
|
|
@@ -457,7 +457,7 @@ import { RestApiValidationError } from "@superblocksteam/sdk-api";
|
|
|
457
457
|
|
|
458
458
|
try {
|
|
459
459
|
const result = await ctx.integrations.circleci.apiRequest(
|
|
460
|
-
{ method: "POST", path: `/
|
|
460
|
+
{ method: "POST", path: `/project/${slug}/pipeline`, body: { ... } },
|
|
461
461
|
{ response: PipelineSchema }
|
|
462
462
|
);
|
|
463
463
|
} catch (error) {
|
|
@@ -5,13 +5,15 @@
|
|
|
5
5
|
* runtime validation using Zod schemas.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { z } from "zod";
|
|
9
8
|
import type { PartialMessage } from "@bufbuild/protobuf";
|
|
9
|
+
import type { z } from "zod";
|
|
10
|
+
|
|
10
11
|
import type { Plugin as CockroachDBPlugin } from "@superblocksteam/types/dist/src/plugins/cockroachdb/v1/plugin_pb";
|
|
11
|
-
|
|
12
|
-
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
12
|
+
|
|
13
13
|
import { QueryValidationError } from "../../errors.js";
|
|
14
14
|
import { IntegrationError } from "../../runtime/errors.js";
|
|
15
|
+
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
16
|
+
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
15
17
|
import { describeType } from "../utils.js";
|
|
16
18
|
import type { CockroachDBClient } from "./types.js";
|
|
17
19
|
|
|
@@ -52,7 +52,7 @@ export default api({
|
|
|
52
52
|
const result = await ctx.integrations.cohere.apiRequest(
|
|
53
53
|
{
|
|
54
54
|
method: "POST",
|
|
55
|
-
path: "/
|
|
55
|
+
path: "/chat",
|
|
56
56
|
body: {
|
|
57
57
|
model: "command-r-plus",
|
|
58
58
|
message: message,
|
|
@@ -81,7 +81,7 @@ const EmbedResponseSchema = z.object({
|
|
|
81
81
|
const result = await ctx.integrations.cohere.apiRequest(
|
|
82
82
|
{
|
|
83
83
|
method: "POST",
|
|
84
|
-
path: "/
|
|
84
|
+
path: "/embed",
|
|
85
85
|
body: {
|
|
86
86
|
model: "embed-english-v3.0",
|
|
87
87
|
texts: ["Hello world", "How are you?"],
|
|
@@ -115,7 +115,7 @@ const ClassifyResponseSchema = z.object({
|
|
|
115
115
|
const result = await ctx.integrations.cohere.apiRequest(
|
|
116
116
|
{
|
|
117
117
|
method: "POST",
|
|
118
|
-
path: "/
|
|
118
|
+
path: "/classify",
|
|
119
119
|
body: {
|
|
120
120
|
model: "embed-english-v3.0",
|
|
121
121
|
inputs: ["This product is amazing!", "Terrible experience, never again"],
|
|
@@ -159,7 +159,7 @@ const documents = [
|
|
|
159
159
|
const result = await ctx.integrations.cohere.apiRequest(
|
|
160
160
|
{
|
|
161
161
|
method: "POST",
|
|
162
|
-
path: "/
|
|
162
|
+
path: "/rerank",
|
|
163
163
|
body: {
|
|
164
164
|
model: "rerank-english-v3.0",
|
|
165
165
|
query: "What is the capital of the United States?",
|
|
@@ -193,7 +193,7 @@ const GenerateResponseSchema = z.object({
|
|
|
193
193
|
const result = await ctx.integrations.cohere.apiRequest(
|
|
194
194
|
{
|
|
195
195
|
method: "POST",
|
|
196
|
-
path: "/
|
|
196
|
+
path: "/generate",
|
|
197
197
|
body: {
|
|
198
198
|
model: "command",
|
|
199
199
|
prompt: "Write a creative story about",
|
|
@@ -220,7 +220,7 @@ await cohere.embed({ ... });
|
|
|
220
220
|
|
|
221
221
|
// CORRECT - Use apiRequest
|
|
222
222
|
await ctx.integrations.cohere.apiRequest(
|
|
223
|
-
{ method: "POST", path: "/
|
|
223
|
+
{ method: "POST", path: "/chat", body: { ... } },
|
|
224
224
|
{ response: ChatResponseSchema }
|
|
225
225
|
);
|
|
226
226
|
```
|
|
@@ -234,7 +234,7 @@ When creating embeddings, specify the correct `input_type`:
|
|
|
234
234
|
const docEmbeddings = await ctx.integrations.cohere.apiRequest(
|
|
235
235
|
{
|
|
236
236
|
method: "POST",
|
|
237
|
-
path: "/
|
|
237
|
+
path: "/embed",
|
|
238
238
|
body: {
|
|
239
239
|
texts: documents,
|
|
240
240
|
input_type: "search_document", // For documents
|
|
@@ -247,7 +247,7 @@ const docEmbeddings = await ctx.integrations.cohere.apiRequest(
|
|
|
247
247
|
const queryEmbedding = await ctx.integrations.cohere.apiRequest(
|
|
248
248
|
{
|
|
249
249
|
method: "POST",
|
|
250
|
-
path: "/
|
|
250
|
+
path: "/embed",
|
|
251
251
|
body: {
|
|
252
252
|
texts: [query],
|
|
253
253
|
input_type: "search_query", // For queries
|
|
@@ -266,7 +266,7 @@ The classify endpoint requires labeled examples:
|
|
|
266
266
|
const result = await ctx.integrations.cohere.apiRequest(
|
|
267
267
|
{
|
|
268
268
|
method: "POST",
|
|
269
|
-
path: "/
|
|
269
|
+
path: "/classify",
|
|
270
270
|
body: {
|
|
271
271
|
inputs: ["Great product!"],
|
|
272
272
|
// Missing examples!
|
|
@@ -279,7 +279,7 @@ const result = await ctx.integrations.cohere.apiRequest(
|
|
|
279
279
|
const result = await ctx.integrations.cohere.apiRequest(
|
|
280
280
|
{
|
|
281
281
|
method: "POST",
|
|
282
|
-
path: "/
|
|
282
|
+
path: "/classify",
|
|
283
283
|
body: {
|
|
284
284
|
inputs: ["Great product!"],
|
|
285
285
|
examples: [
|
|
@@ -299,7 +299,7 @@ import { RestApiValidationError } from "@superblocksteam/sdk-api";
|
|
|
299
299
|
|
|
300
300
|
try {
|
|
301
301
|
const result = await ctx.integrations.cohere.apiRequest(
|
|
302
|
-
{ method: "POST", path: "/
|
|
302
|
+
{ method: "POST", path: "/chat", body: { ... } },
|
|
303
303
|
{ response: ChatResponseSchema }
|
|
304
304
|
);
|
|
305
305
|
} catch (error) {
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
import { describe, it, expect, vi } from "vitest";
|
|
9
9
|
import { z } from "zod";
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
import type { IntegrationConfig } from "../types.js";
|
|
12
|
+
import { CosmosDBClientImpl } from "./client.js";
|
|
12
13
|
|
|
13
14
|
/** Minimal integration config for testing. */
|
|
14
15
|
const TEST_CONFIG: IntegrationConfig = {
|
|
@@ -6,13 +6,15 @@
|
|
|
6
6
|
* upsert, delete) against CosmosDB containers.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { z } from "zod";
|
|
10
9
|
import type { PartialMessage } from "@bufbuild/protobuf";
|
|
10
|
+
import type { z } from "zod";
|
|
11
|
+
|
|
11
12
|
import type { Plugin as CosmosDBPlugin } from "@superblocksteam/types/dist/src/plugins/cosmosdb/v1/plugin_pb";
|
|
12
|
-
|
|
13
|
-
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
13
|
+
|
|
14
14
|
import { RestApiValidationError } from "../../errors.js";
|
|
15
15
|
import { IntegrationError } from "../../runtime/errors.js";
|
|
16
|
+
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
17
|
+
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
16
18
|
import type { CosmosDBClient, CosmosDBQueryOptions } from "./types.js";
|
|
17
19
|
|
|
18
20
|
/**
|
|
@@ -38,7 +38,7 @@ export default api({
|
|
|
38
38
|
}),
|
|
39
39
|
async run(ctx, { date }) {
|
|
40
40
|
const data = await ctx.integrations.databricks.query(
|
|
41
|
-
"SELECT id, value, timestamp FROM data WHERE date =
|
|
41
|
+
"SELECT id, value, timestamp FROM data WHERE date = :PARAM_1",
|
|
42
42
|
DataSchema,
|
|
43
43
|
[date],
|
|
44
44
|
);
|
|
@@ -48,25 +48,29 @@ export default api({
|
|
|
48
48
|
});
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
The SDK accepts Databricks parameters as a positional `params` array, but the
|
|
52
|
+
SQL text should use `:PARAM_1`, `:PARAM_2`, and so on. The first array value
|
|
53
|
+
binds to `:PARAM_1`, the second binds to `:PARAM_2`, and so forth.
|
|
54
|
+
|
|
51
55
|
### Executing INSERT, UPDATE, DELETE Statements
|
|
52
56
|
|
|
53
57
|
```typescript
|
|
54
58
|
// INSERT
|
|
55
59
|
await ctx.integrations.databricks.execute(
|
|
56
|
-
"INSERT INTO metrics (name, value) VALUES (
|
|
60
|
+
"INSERT INTO metrics (name, value) VALUES (:PARAM_1, :PARAM_2)",
|
|
57
61
|
["cpu_usage", "75.5"],
|
|
58
62
|
);
|
|
59
63
|
|
|
60
64
|
// UPDATE
|
|
61
65
|
const updateResult = await ctx.integrations.databricks.execute(
|
|
62
|
-
"UPDATE metrics SET value =
|
|
66
|
+
"UPDATE metrics SET value = :PARAM_1 WHERE name = :PARAM_2",
|
|
63
67
|
["80.0", "cpu_usage"],
|
|
64
68
|
);
|
|
65
69
|
console.log(`Updated ${updateResult.rowCount} rows`);
|
|
66
70
|
|
|
67
71
|
// DELETE
|
|
68
72
|
const deleteResult = await ctx.integrations.databricks.execute(
|
|
69
|
-
"DELETE FROM metrics WHERE timestamp <
|
|
73
|
+
"DELETE FROM metrics WHERE timestamp < :PARAM_1",
|
|
70
74
|
["2024-01-01"],
|
|
71
75
|
);
|
|
72
76
|
console.log(`Deleted ${deleteResult.rowCount} rows`);
|
|
@@ -100,6 +104,27 @@ All methods accept an optional `metadata` parameter as the last argument for dia
|
|
|
100
104
|
|
|
101
105
|
## Common Pitfalls
|
|
102
106
|
|
|
107
|
+
### Parameter Placeholders Must Match the SDK Contract
|
|
108
|
+
|
|
109
|
+
Pass parameter values as an array, but write the SQL with `:PARAM_n`
|
|
110
|
+
placeholders:
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
// WRONG - Positional question marks are not the placeholder syntax this SDK emits
|
|
114
|
+
await ctx.integrations.databricks.query(
|
|
115
|
+
"SELECT * FROM data WHERE date = ?",
|
|
116
|
+
DataSchema,
|
|
117
|
+
["2024-01-01"],
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
// CORRECT - Use Databricks placeholders with positional params
|
|
121
|
+
await ctx.integrations.databricks.query(
|
|
122
|
+
"SELECT * FROM data WHERE date = :PARAM_1",
|
|
123
|
+
DataSchema,
|
|
124
|
+
["2024-01-01"],
|
|
125
|
+
);
|
|
126
|
+
```
|
|
127
|
+
|
|
103
128
|
### BIGINT/LONG Values Returned as Strings
|
|
104
129
|
|
|
105
130
|
```typescript
|
|
@@ -5,13 +5,15 @@
|
|
|
5
5
|
* runtime validation using Zod schemas.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { z } from "zod";
|
|
9
8
|
import type { PartialMessage } from "@bufbuild/protobuf";
|
|
9
|
+
import type { z } from "zod";
|
|
10
|
+
|
|
10
11
|
import type { Plugin as DatabricksPlugin } from "@superblocksteam/types/dist/src/plugins/databricks/v1/plugin_pb";
|
|
11
|
-
|
|
12
|
-
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
12
|
+
|
|
13
13
|
import { QueryValidationError } from "../../errors.js";
|
|
14
14
|
import { IntegrationError } from "../../runtime/errors.js";
|
|
15
|
+
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
16
|
+
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
15
17
|
import { describeType } from "../utils.js";
|
|
16
18
|
import type { DatabricksClient } from "./types.js";
|
|
17
19
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import type { z } from "zod";
|
|
8
|
+
|
|
8
9
|
import type { BaseIntegrationClient } from "../../types.js";
|
|
9
10
|
import type { TraceMetadata } from "../registry.js";
|
|
10
11
|
|
|
@@ -24,7 +25,7 @@ import type { TraceMetadata } from "../registry.js";
|
|
|
24
25
|
* });
|
|
25
26
|
*
|
|
26
27
|
* const data = await databricks.query(
|
|
27
|
-
* 'SELECT * FROM data WHERE date =
|
|
28
|
+
* 'SELECT * FROM data WHERE date = :PARAM_1',
|
|
28
29
|
* DataSchema,
|
|
29
30
|
* ['2024-01-01']
|
|
30
31
|
* );
|
|
@@ -34,9 +35,9 @@ export interface DatabricksClient extends BaseIntegrationClient {
|
|
|
34
35
|
/**
|
|
35
36
|
* Execute a SQL query and validate results against a Zod schema.
|
|
36
37
|
*
|
|
37
|
-
* @param sql - SQL query string (use
|
|
38
|
+
* @param sql - SQL query string (use :PARAM_1, :PARAM_2, etc. for parameters)
|
|
38
39
|
* @param schema - Zod schema to validate the query results
|
|
39
|
-
* @param params - Optional query parameters
|
|
40
|
+
* @param params - Optional query parameters, bound positionally so the first value maps to :PARAM_1
|
|
40
41
|
* @returns Promise resolving to validated query results
|
|
41
42
|
*
|
|
42
43
|
* @throws {QueryValidationError} If results don't match schema
|