@superblocksteam/sdk-api 2.0.93 → 2.0.94-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +137 -98
- package/dist/api/definition.d.ts +10 -0
- package/dist/api/definition.d.ts.map +1 -1
- package/dist/api/definition.js +17 -0
- package/dist/api/definition.js.map +1 -1
- package/dist/api/definition.test.d.ts +1 -1
- package/dist/api/definition.test.js +56 -3
- package/dist/api/definition.test.js.map +1 -1
- package/dist/api/index.d.ts +4 -4
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -2
- package/dist/api/index.js.map +1 -1
- package/dist/api/streaming.d.ts +17 -3
- package/dist/api/streaming.d.ts.map +1 -1
- package/dist/api/streaming.js +10 -7
- package/dist/api/streaming.js.map +1 -1
- package/dist/api/streaming.test.js +147 -80
- package/dist/api/streaming.test.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +5 -5
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/airtable/client.d.ts +2 -2
- package/dist/integrations/airtable/client.d.ts.map +1 -1
- package/dist/integrations/airtable/client.js +1 -1
- package/dist/integrations/airtable/client.js.map +1 -1
- package/dist/integrations/airtable/index.d.ts +2 -2
- package/dist/integrations/airtable/index.js +1 -1
- package/dist/integrations/airtable/types.d.ts +5 -10
- package/dist/integrations/airtable/types.d.ts.map +1 -1
- package/dist/integrations/anthropic/client.d.ts +2 -2
- package/dist/integrations/anthropic/client.d.ts.map +1 -1
- package/dist/integrations/anthropic/client.js +1 -1
- package/dist/integrations/anthropic/client.js.map +1 -1
- package/dist/integrations/anthropic/index.d.ts +2 -2
- package/dist/integrations/anthropic/index.js +1 -1
- package/dist/integrations/anthropic/types.d.ts +5 -4
- package/dist/integrations/anthropic/types.d.ts.map +1 -1
- package/dist/integrations/asana/client.d.ts +2 -2
- package/dist/integrations/asana/client.d.ts.map +1 -1
- package/dist/integrations/asana/client.js +1 -1
- package/dist/integrations/asana/client.js.map +1 -1
- package/dist/integrations/asana/index.d.ts +2 -2
- package/dist/integrations/asana/index.js +1 -1
- package/dist/integrations/asana/types.d.ts +4 -3
- package/dist/integrations/asana/types.d.ts.map +1 -1
- package/dist/integrations/athena/client.d.ts +4 -4
- package/dist/integrations/athena/client.d.ts.map +1 -1
- package/dist/integrations/athena/client.js +8 -8
- package/dist/integrations/athena/client.js.map +1 -1
- package/dist/integrations/athena/index.d.ts +2 -2
- package/dist/integrations/athena/index.js +1 -1
- package/dist/integrations/athena/types.d.ts +4 -3
- package/dist/integrations/athena/types.d.ts.map +1 -1
- package/dist/integrations/base/graphql-integration-client.d.ts +3 -3
- package/dist/integrations/base/graphql-integration-client.js +3 -3
- package/dist/integrations/base/index.d.ts +4 -4
- package/dist/integrations/base/index.js +2 -2
- package/dist/integrations/base/rest-api-integration-client.d.ts.map +1 -1
- package/dist/integrations/base/rest-api-integration-client.js +1 -1
- package/dist/integrations/base/rest-api-integration-client.js.map +1 -1
- package/dist/integrations/base/types.d.ts +5 -10
- package/dist/integrations/base/types.d.ts.map +1 -1
- package/dist/integrations/bigquery/client.d.ts +4 -4
- package/dist/integrations/bigquery/client.d.ts.map +1 -1
- package/dist/integrations/bigquery/client.js +8 -8
- package/dist/integrations/bigquery/client.js.map +1 -1
- package/dist/integrations/bigquery/index.d.ts +2 -2
- package/dist/integrations/bigquery/index.js +1 -1
- package/dist/integrations/bigquery/types.d.ts +4 -3
- package/dist/integrations/bigquery/types.d.ts.map +1 -1
- package/dist/integrations/bitbucket/client.d.ts +2 -2
- package/dist/integrations/bitbucket/client.d.ts.map +1 -1
- package/dist/integrations/bitbucket/client.js +1 -1
- package/dist/integrations/bitbucket/client.js.map +1 -1
- package/dist/integrations/bitbucket/index.d.ts +2 -2
- package/dist/integrations/bitbucket/index.js +1 -1
- package/dist/integrations/bitbucket/types.d.ts +4 -3
- package/dist/integrations/bitbucket/types.d.ts.map +1 -1
- package/dist/integrations/box/client.d.ts +2 -2
- package/dist/integrations/box/client.d.ts.map +1 -1
- package/dist/integrations/box/client.js +1 -1
- package/dist/integrations/box/client.js.map +1 -1
- package/dist/integrations/box/index.d.ts +2 -2
- package/dist/integrations/box/index.js +1 -1
- package/dist/integrations/box/types.d.ts +4 -3
- package/dist/integrations/box/types.d.ts.map +1 -1
- package/dist/integrations/circleci/client.d.ts +2 -2
- package/dist/integrations/circleci/client.d.ts.map +1 -1
- package/dist/integrations/circleci/client.js +1 -1
- package/dist/integrations/circleci/client.js.map +1 -1
- package/dist/integrations/circleci/index.d.ts +2 -2
- package/dist/integrations/circleci/index.js +1 -1
- package/dist/integrations/circleci/types.d.ts +4 -3
- package/dist/integrations/circleci/types.d.ts.map +1 -1
- package/dist/integrations/cockroachdb/client.d.ts +4 -4
- package/dist/integrations/cockroachdb/client.d.ts.map +1 -1
- package/dist/integrations/cockroachdb/client.js +8 -8
- package/dist/integrations/cockroachdb/client.js.map +1 -1
- package/dist/integrations/cockroachdb/index.d.ts +2 -2
- package/dist/integrations/cockroachdb/index.js +1 -1
- package/dist/integrations/cockroachdb/types.d.ts +4 -3
- package/dist/integrations/cockroachdb/types.d.ts.map +1 -1
- package/dist/integrations/cohere/client.d.ts +2 -2
- package/dist/integrations/cohere/client.d.ts.map +1 -1
- package/dist/integrations/cohere/client.js +1 -1
- package/dist/integrations/cohere/client.js.map +1 -1
- package/dist/integrations/cohere/index.d.ts +2 -2
- package/dist/integrations/cohere/index.js +1 -1
- package/dist/integrations/cohere/types.d.ts +5 -10
- package/dist/integrations/cohere/types.d.ts.map +1 -1
- package/dist/integrations/confluence/client.d.ts +2 -2
- package/dist/integrations/confluence/client.d.ts.map +1 -1
- package/dist/integrations/confluence/client.js +1 -1
- package/dist/integrations/confluence/client.js.map +1 -1
- package/dist/integrations/confluence/index.d.ts +2 -2
- package/dist/integrations/confluence/index.js +1 -1
- package/dist/integrations/confluence/types.d.ts +4 -3
- package/dist/integrations/confluence/types.d.ts.map +1 -1
- package/dist/integrations/cosmosdb/client.d.ts +4 -4
- package/dist/integrations/cosmosdb/client.d.ts.map +1 -1
- package/dist/integrations/cosmosdb/client.js +23 -23
- package/dist/integrations/cosmosdb/client.js.map +1 -1
- package/dist/integrations/cosmosdb/index.d.ts +2 -2
- package/dist/integrations/cosmosdb/index.js +1 -1
- package/dist/integrations/cosmosdb/types.d.ts +4 -3
- package/dist/integrations/cosmosdb/types.d.ts.map +1 -1
- package/dist/integrations/couchbase/client.d.ts +4 -4
- package/dist/integrations/couchbase/client.d.ts.map +1 -1
- package/dist/integrations/couchbase/client.js +13 -13
- package/dist/integrations/couchbase/client.js.map +1 -1
- package/dist/integrations/couchbase/index.d.ts +2 -2
- package/dist/integrations/couchbase/index.js +1 -1
- package/dist/integrations/couchbase/types.d.ts +8 -7
- package/dist/integrations/couchbase/types.d.ts.map +1 -1
- package/dist/integrations/databricks/client.d.ts +4 -4
- package/dist/integrations/databricks/client.d.ts.map +1 -1
- package/dist/integrations/databricks/client.js +8 -8
- package/dist/integrations/databricks/client.js.map +1 -1
- package/dist/integrations/databricks/index.d.ts +2 -2
- package/dist/integrations/databricks/index.js +1 -1
- package/dist/integrations/databricks/types.d.ts +4 -3
- package/dist/integrations/databricks/types.d.ts.map +1 -1
- package/dist/integrations/datadog/client.d.ts +2 -2
- package/dist/integrations/datadog/client.d.ts.map +1 -1
- package/dist/integrations/datadog/client.js +1 -1
- package/dist/integrations/datadog/client.js.map +1 -1
- package/dist/integrations/datadog/index.d.ts +2 -2
- package/dist/integrations/datadog/index.js +1 -1
- package/dist/integrations/datadog/types.d.ts +4 -3
- package/dist/integrations/datadog/types.d.ts.map +1 -1
- package/dist/integrations/declarations.d.ts +130 -130
- package/dist/integrations/declarations.d.ts.map +1 -1
- package/dist/integrations/declarations.js +66 -66
- package/dist/integrations/declarations.js.map +1 -1
- package/dist/integrations/dropbox/client.d.ts +2 -2
- package/dist/integrations/dropbox/client.d.ts.map +1 -1
- package/dist/integrations/dropbox/client.js +1 -1
- package/dist/integrations/dropbox/client.js.map +1 -1
- package/dist/integrations/dropbox/index.d.ts +2 -2
- package/dist/integrations/dropbox/index.js +1 -1
- package/dist/integrations/dropbox/types.d.ts +4 -3
- package/dist/integrations/dropbox/types.d.ts.map +1 -1
- package/dist/integrations/dynamodb/client.d.ts +4 -4
- package/dist/integrations/dynamodb/client.d.ts.map +1 -1
- package/dist/integrations/dynamodb/client.js +30 -30
- package/dist/integrations/dynamodb/client.js.map +1 -1
- package/dist/integrations/dynamodb/index.d.ts +2 -2
- package/dist/integrations/dynamodb/index.js +1 -1
- package/dist/integrations/dynamodb/types.d.ts +10 -9
- package/dist/integrations/dynamodb/types.d.ts.map +1 -1
- package/dist/integrations/elasticsearch/client.d.ts +2 -2
- package/dist/integrations/elasticsearch/client.d.ts.map +1 -1
- package/dist/integrations/elasticsearch/client.js +1 -1
- package/dist/integrations/elasticsearch/client.js.map +1 -1
- package/dist/integrations/elasticsearch/index.d.ts +2 -2
- package/dist/integrations/elasticsearch/index.js +1 -1
- package/dist/integrations/elasticsearch/types.d.ts +4 -3
- package/dist/integrations/elasticsearch/types.d.ts.map +1 -1
- package/dist/integrations/fireworks/client.d.ts +2 -2
- package/dist/integrations/fireworks/client.d.ts.map +1 -1
- package/dist/integrations/fireworks/client.js +1 -1
- package/dist/integrations/fireworks/client.js.map +1 -1
- package/dist/integrations/fireworks/index.d.ts +2 -2
- package/dist/integrations/fireworks/index.js +1 -1
- package/dist/integrations/fireworks/types.d.ts +4 -3
- package/dist/integrations/fireworks/types.d.ts.map +1 -1
- package/dist/integrations/front/client.d.ts +2 -2
- package/dist/integrations/front/client.d.ts.map +1 -1
- package/dist/integrations/front/client.js +1 -1
- package/dist/integrations/front/client.js.map +1 -1
- package/dist/integrations/front/index.d.ts +2 -2
- package/dist/integrations/front/index.js +1 -1
- package/dist/integrations/front/types.d.ts +4 -3
- package/dist/integrations/front/types.d.ts.map +1 -1
- package/dist/integrations/gcs/client.d.ts +4 -4
- package/dist/integrations/gcs/client.js +20 -20
- package/dist/integrations/gcs/index.d.ts +2 -2
- package/dist/integrations/gcs/index.js +1 -1
- package/dist/integrations/gcs/types.d.ts +3 -3
- package/dist/integrations/gcs/types.d.ts.map +1 -1
- package/dist/integrations/gemini/client.d.ts +2 -2
- package/dist/integrations/gemini/client.d.ts.map +1 -1
- package/dist/integrations/gemini/client.js +1 -1
- package/dist/integrations/gemini/client.js.map +1 -1
- package/dist/integrations/gemini/index.d.ts +2 -2
- package/dist/integrations/gemini/index.js +1 -1
- package/dist/integrations/gemini/types.d.ts +4 -3
- package/dist/integrations/gemini/types.d.ts.map +1 -1
- package/dist/integrations/github/client.d.ts +2 -2
- package/dist/integrations/github/client.d.ts.map +1 -1
- package/dist/integrations/github/client.js +1 -1
- package/dist/integrations/github/client.js.map +1 -1
- package/dist/integrations/github/index.d.ts +2 -2
- package/dist/integrations/github/index.js +1 -1
- package/dist/integrations/github/types.d.ts +6 -5
- package/dist/integrations/github/types.d.ts.map +1 -1
- package/dist/integrations/googleanalytics/client.d.ts +2 -2
- package/dist/integrations/googleanalytics/client.d.ts.map +1 -1
- package/dist/integrations/googleanalytics/client.js +1 -1
- package/dist/integrations/googleanalytics/client.js.map +1 -1
- package/dist/integrations/googleanalytics/index.d.ts +2 -2
- package/dist/integrations/googleanalytics/index.js +1 -1
- package/dist/integrations/googleanalytics/types.d.ts +4 -3
- package/dist/integrations/googleanalytics/types.d.ts.map +1 -1
- package/dist/integrations/googledrive/client.d.ts +2 -2
- package/dist/integrations/googledrive/client.d.ts.map +1 -1
- package/dist/integrations/googledrive/client.js +1 -1
- package/dist/integrations/googledrive/client.js.map +1 -1
- package/dist/integrations/googledrive/index.d.ts +2 -2
- package/dist/integrations/googledrive/index.js +1 -1
- package/dist/integrations/googledrive/types.d.ts +4 -3
- package/dist/integrations/googledrive/types.d.ts.map +1 -1
- package/dist/integrations/graphql/client.d.ts +2 -2
- package/dist/integrations/graphql/client.d.ts.map +1 -1
- package/dist/integrations/graphql/client.js +1 -1
- package/dist/integrations/graphql/client.js.map +1 -1
- package/dist/integrations/graphql/index.d.ts +2 -2
- package/dist/integrations/graphql/index.js +1 -1
- package/dist/integrations/graphql/types.d.ts +4 -3
- package/dist/integrations/graphql/types.d.ts.map +1 -1
- package/dist/integrations/groq/client.d.ts +2 -2
- package/dist/integrations/groq/client.d.ts.map +1 -1
- package/dist/integrations/groq/client.js +1 -1
- package/dist/integrations/groq/client.js.map +1 -1
- package/dist/integrations/groq/index.d.ts +2 -2
- package/dist/integrations/groq/index.js +1 -1
- package/dist/integrations/groq/types.d.ts +4 -3
- package/dist/integrations/groq/types.d.ts.map +1 -1
- package/dist/integrations/gsheets/client.d.ts +4 -4
- package/dist/integrations/gsheets/client.d.ts.map +1 -1
- package/dist/integrations/gsheets/client.js +3 -3
- package/dist/integrations/gsheets/client.js.map +1 -1
- package/dist/integrations/gsheets/index.d.ts +2 -2
- package/dist/integrations/gsheets/index.js +1 -1
- package/dist/integrations/gsheets/types.d.ts +7 -6
- package/dist/integrations/gsheets/types.d.ts.map +1 -1
- package/dist/integrations/hubspot/client.d.ts +2 -2
- package/dist/integrations/hubspot/client.d.ts.map +1 -1
- package/dist/integrations/hubspot/client.js +1 -1
- package/dist/integrations/hubspot/client.js.map +1 -1
- package/dist/integrations/hubspot/index.d.ts +2 -2
- package/dist/integrations/hubspot/index.js +1 -1
- package/dist/integrations/hubspot/types.d.ts +4 -3
- package/dist/integrations/hubspot/types.d.ts.map +1 -1
- package/dist/integrations/index.d.ts +131 -131
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +66 -66
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/intercom/client.d.ts +2 -2
- package/dist/integrations/intercom/client.d.ts.map +1 -1
- package/dist/integrations/intercom/client.js +1 -1
- package/dist/integrations/intercom/client.js.map +1 -1
- package/dist/integrations/intercom/index.d.ts +2 -2
- package/dist/integrations/intercom/index.js +1 -1
- package/dist/integrations/intercom/types.d.ts +4 -3
- package/dist/integrations/intercom/types.d.ts.map +1 -1
- package/dist/integrations/jira/client.d.ts +2 -2
- package/dist/integrations/jira/client.d.ts.map +1 -1
- package/dist/integrations/jira/client.js +1 -1
- package/dist/integrations/jira/client.js.map +1 -1
- package/dist/integrations/jira/index.d.ts +2 -2
- package/dist/integrations/jira/index.js +1 -1
- package/dist/integrations/jira/types.d.ts +4 -3
- package/dist/integrations/jira/types.d.ts.map +1 -1
- package/dist/integrations/kafka/client.d.ts +4 -4
- package/dist/integrations/kafka/client.d.ts.map +1 -1
- package/dist/integrations/kafka/client.js +19 -17
- package/dist/integrations/kafka/client.js.map +1 -1
- package/dist/integrations/kafka/index.d.ts +2 -2
- package/dist/integrations/kafka/index.js +1 -1
- package/dist/integrations/kafka/types.d.ts +8 -7
- package/dist/integrations/kafka/types.d.ts.map +1 -1
- package/dist/integrations/kinesis/client.d.ts +3 -3
- package/dist/integrations/kinesis/client.d.ts.map +1 -1
- package/dist/integrations/kinesis/client.js +5 -5
- package/dist/integrations/kinesis/client.js.map +1 -1
- package/dist/integrations/kinesis/index.d.ts +2 -2
- package/dist/integrations/kinesis/index.js +1 -1
- package/dist/integrations/kinesis/types.d.ts +5 -4
- package/dist/integrations/kinesis/types.d.ts.map +1 -1
- package/dist/integrations/lakebase/client.d.ts +4 -4
- package/dist/integrations/lakebase/client.d.ts.map +1 -1
- package/dist/integrations/lakebase/client.js +8 -8
- package/dist/integrations/lakebase/client.js.map +1 -1
- package/dist/integrations/lakebase/index.d.ts +2 -2
- package/dist/integrations/lakebase/index.js +1 -1
- package/dist/integrations/lakebase/types.d.ts +2 -2
- package/dist/integrations/lakebase/types.d.ts.map +1 -1
- package/dist/integrations/launchdarkly/client.d.ts +2 -2
- package/dist/integrations/launchdarkly/client.d.ts.map +1 -1
- package/dist/integrations/launchdarkly/client.js +1 -1
- package/dist/integrations/launchdarkly/client.js.map +1 -1
- package/dist/integrations/launchdarkly/index.d.ts +2 -2
- package/dist/integrations/launchdarkly/index.js +1 -1
- package/dist/integrations/launchdarkly/types.d.ts +4 -3
- package/dist/integrations/launchdarkly/types.d.ts.map +1 -1
- package/dist/integrations/mariadb/client.d.ts +4 -4
- package/dist/integrations/mariadb/client.d.ts.map +1 -1
- package/dist/integrations/mariadb/client.js +8 -8
- package/dist/integrations/mariadb/client.js.map +1 -1
- package/dist/integrations/mariadb/index.d.ts +2 -2
- package/dist/integrations/mariadb/index.js +1 -1
- package/dist/integrations/mariadb/types.d.ts +4 -3
- package/dist/integrations/mariadb/types.d.ts.map +1 -1
- package/dist/integrations/mistral/client.d.ts +2 -2
- package/dist/integrations/mistral/client.d.ts.map +1 -1
- package/dist/integrations/mistral/client.js +1 -1
- package/dist/integrations/mistral/client.js.map +1 -1
- package/dist/integrations/mistral/index.d.ts +2 -2
- package/dist/integrations/mistral/index.js +1 -1
- package/dist/integrations/mistral/types.d.ts +4 -3
- package/dist/integrations/mistral/types.d.ts.map +1 -1
- package/dist/integrations/mongodb/client.d.ts +4 -4
- package/dist/integrations/mongodb/client.d.ts.map +1 -1
- package/dist/integrations/mongodb/client.js +3 -3
- package/dist/integrations/mongodb/client.js.map +1 -1
- package/dist/integrations/mongodb/index.d.ts +2 -2
- package/dist/integrations/mongodb/index.js +1 -1
- package/dist/integrations/mongodb/types.d.ts +5 -4
- package/dist/integrations/mongodb/types.d.ts.map +1 -1
- package/dist/integrations/mssql/client.d.ts +4 -4
- package/dist/integrations/mssql/client.d.ts.map +1 -1
- package/dist/integrations/mssql/client.js +8 -8
- package/dist/integrations/mssql/client.js.map +1 -1
- package/dist/integrations/mssql/index.d.ts +2 -2
- package/dist/integrations/mssql/index.js +1 -1
- package/dist/integrations/mssql/types.d.ts +4 -3
- package/dist/integrations/mssql/types.d.ts.map +1 -1
- package/dist/integrations/mysql/client.d.ts +4 -4
- package/dist/integrations/mysql/client.d.ts.map +1 -1
- package/dist/integrations/mysql/client.js +8 -8
- package/dist/integrations/mysql/client.js.map +1 -1
- package/dist/integrations/mysql/index.d.ts +2 -2
- package/dist/integrations/mysql/index.js +1 -1
- package/dist/integrations/mysql/types.d.ts +4 -3
- package/dist/integrations/mysql/types.d.ts.map +1 -1
- package/dist/integrations/notion/client.d.ts +2 -2
- package/dist/integrations/notion/client.d.ts.map +1 -1
- package/dist/integrations/notion/client.js +1 -1
- package/dist/integrations/notion/client.js.map +1 -1
- package/dist/integrations/notion/index.d.ts +2 -2
- package/dist/integrations/notion/index.js +1 -1
- package/dist/integrations/notion/types.d.ts +6 -5
- package/dist/integrations/notion/types.d.ts.map +1 -1
- package/dist/integrations/openai_v2/client.d.ts +2 -2
- package/dist/integrations/openai_v2/client.d.ts.map +1 -1
- package/dist/integrations/openai_v2/client.js +1 -1
- package/dist/integrations/openai_v2/client.js.map +1 -1
- package/dist/integrations/openai_v2/index.d.ts +2 -2
- package/dist/integrations/openai_v2/index.js +1 -1
- package/dist/integrations/openai_v2/types.d.ts +5 -4
- package/dist/integrations/openai_v2/types.d.ts.map +1 -1
- package/dist/integrations/oracledb/client.d.ts +4 -4
- package/dist/integrations/oracledb/client.d.ts.map +1 -1
- package/dist/integrations/oracledb/client.js +8 -8
- package/dist/integrations/oracledb/client.js.map +1 -1
- package/dist/integrations/oracledb/index.d.ts +2 -2
- package/dist/integrations/oracledb/index.js +1 -1
- package/dist/integrations/oracledb/types.d.ts +4 -3
- package/dist/integrations/oracledb/types.d.ts.map +1 -1
- package/dist/integrations/pagerduty/client.d.ts +2 -2
- package/dist/integrations/pagerduty/client.d.ts.map +1 -1
- package/dist/integrations/pagerduty/client.js +1 -1
- package/dist/integrations/pagerduty/client.js.map +1 -1
- package/dist/integrations/pagerduty/index.d.ts +2 -2
- package/dist/integrations/pagerduty/index.js +1 -1
- package/dist/integrations/pagerduty/types.d.ts +4 -3
- package/dist/integrations/pagerduty/types.d.ts.map +1 -1
- package/dist/integrations/perplexity/client.d.ts +2 -2
- package/dist/integrations/perplexity/client.d.ts.map +1 -1
- package/dist/integrations/perplexity/client.js +1 -1
- package/dist/integrations/perplexity/client.js.map +1 -1
- package/dist/integrations/perplexity/index.d.ts +2 -2
- package/dist/integrations/perplexity/index.js +1 -1
- package/dist/integrations/perplexity/types.d.ts +4 -3
- package/dist/integrations/perplexity/types.d.ts.map +1 -1
- package/dist/integrations/postgres/client.d.ts +6 -6
- package/dist/integrations/postgres/client.d.ts.map +1 -1
- package/dist/integrations/postgres/client.js +8 -8
- package/dist/integrations/postgres/client.js.map +1 -1
- package/dist/integrations/postgres/index.d.ts +2 -2
- package/dist/integrations/postgres/index.js +1 -1
- package/dist/integrations/postgres/types.d.ts +8 -7
- package/dist/integrations/postgres/types.d.ts.map +1 -1
- package/dist/integrations/python/client.d.ts +6 -6
- package/dist/integrations/python/client.d.ts.map +1 -1
- package/dist/integrations/python/client.js +5 -5
- package/dist/integrations/python/client.js.map +1 -1
- package/dist/integrations/python/client.test.js +82 -63
- package/dist/integrations/python/client.test.js.map +1 -1
- package/dist/integrations/python/index.d.ts +2 -2
- package/dist/integrations/python/index.js +1 -1
- package/dist/integrations/python/types.d.ts +5 -5
- package/dist/integrations/redis/client.d.ts +4 -4
- package/dist/integrations/redis/client.d.ts.map +1 -1
- package/dist/integrations/redis/client.js +23 -23
- package/dist/integrations/redis/client.js.map +1 -1
- package/dist/integrations/redis/index.d.ts +2 -2
- package/dist/integrations/redis/index.js +1 -1
- package/dist/integrations/redis/types.d.ts +4 -3
- package/dist/integrations/redis/types.d.ts.map +1 -1
- package/dist/integrations/redshift/client.d.ts +4 -4
- package/dist/integrations/redshift/client.d.ts.map +1 -1
- package/dist/integrations/redshift/client.js +8 -8
- package/dist/integrations/redshift/client.js.map +1 -1
- package/dist/integrations/redshift/index.d.ts +2 -2
- package/dist/integrations/redshift/index.js +1 -1
- package/dist/integrations/redshift/types.d.ts +4 -3
- package/dist/integrations/redshift/types.d.ts.map +1 -1
- package/dist/integrations/registry.d.ts +2 -2
- package/dist/integrations/registry.d.ts.map +1 -1
- package/dist/integrations/registry.js +132 -132
- package/dist/integrations/registry.js.map +1 -1
- package/dist/integrations/registry.test.js +10 -10
- package/dist/integrations/registry.test.js.map +1 -1
- package/dist/integrations/s3/client.d.ts +4 -4
- package/dist/integrations/s3/client.d.ts.map +1 -1
- package/dist/integrations/s3/client.js +20 -20
- package/dist/integrations/s3/client.js.map +1 -1
- package/dist/integrations/s3/index.d.ts +2 -2
- package/dist/integrations/s3/index.js +1 -1
- package/dist/integrations/s3/types.d.ts +3 -3
- package/dist/integrations/s3/types.d.ts.map +1 -1
- package/dist/integrations/salesforce/client.d.ts +4 -4
- package/dist/integrations/salesforce/client.d.ts.map +1 -1
- package/dist/integrations/salesforce/client.js +22 -22
- package/dist/integrations/salesforce/client.js.map +1 -1
- package/dist/integrations/salesforce/index.d.ts +2 -2
- package/dist/integrations/salesforce/index.d.ts.map +1 -1
- package/dist/integrations/salesforce/index.js +1 -1
- package/dist/integrations/salesforce/index.js.map +1 -1
- package/dist/integrations/salesforce/types.d.ts +12 -11
- package/dist/integrations/salesforce/types.d.ts.map +1 -1
- package/dist/integrations/segment/client.d.ts +2 -2
- package/dist/integrations/segment/client.d.ts.map +1 -1
- package/dist/integrations/segment/client.js +1 -1
- package/dist/integrations/segment/client.js.map +1 -1
- package/dist/integrations/segment/index.d.ts +2 -2
- package/dist/integrations/segment/index.js +1 -1
- package/dist/integrations/segment/types.d.ts +4 -3
- package/dist/integrations/segment/types.d.ts.map +1 -1
- package/dist/integrations/sendgrid/client.d.ts +2 -2
- package/dist/integrations/sendgrid/client.d.ts.map +1 -1
- package/dist/integrations/sendgrid/client.js +1 -1
- package/dist/integrations/sendgrid/client.js.map +1 -1
- package/dist/integrations/sendgrid/index.d.ts +2 -2
- package/dist/integrations/sendgrid/index.js +1 -1
- package/dist/integrations/sendgrid/types.d.ts +4 -3
- package/dist/integrations/sendgrid/types.d.ts.map +1 -1
- package/dist/integrations/slack/client.d.ts.map +1 -1
- package/dist/integrations/slack/client.js.map +1 -1
- package/dist/integrations/slack/index.d.ts +2 -2
- package/dist/integrations/slack/index.js +1 -1
- package/dist/integrations/slack/types.d.ts +6 -12
- package/dist/integrations/slack/types.d.ts.map +1 -1
- package/dist/integrations/smtp/client.d.ts +3 -3
- package/dist/integrations/smtp/client.js +6 -6
- package/dist/integrations/smtp/index.d.ts +2 -2
- package/dist/integrations/smtp/index.js +1 -1
- package/dist/integrations/smtp/types.d.ts +1 -1
- package/dist/integrations/snowflake/client.d.ts.map +1 -1
- package/dist/integrations/snowflake/client.js.map +1 -1
- package/dist/integrations/snowflake/index.d.ts +2 -2
- package/dist/integrations/snowflake/index.js +1 -1
- package/dist/integrations/snowflake/types.d.ts +4 -3
- package/dist/integrations/snowflake/types.d.ts.map +1 -1
- package/dist/integrations/snowflakecortex/client.d.ts +2 -2
- package/dist/integrations/snowflakecortex/client.d.ts.map +1 -1
- package/dist/integrations/snowflakecortex/client.js +1 -1
- package/dist/integrations/snowflakecortex/client.js.map +1 -1
- package/dist/integrations/snowflakecortex/index.d.ts +2 -2
- package/dist/integrations/snowflakecortex/index.js +1 -1
- package/dist/integrations/snowflakecortex/types.d.ts +2 -2
- package/dist/integrations/snowflakecortex/types.d.ts.map +1 -1
- package/dist/integrations/snowflakepostgres/client.d.ts +2 -2
- package/dist/integrations/snowflakepostgres/client.js +1 -1
- package/dist/integrations/snowflakepostgres/index.d.ts +2 -2
- package/dist/integrations/snowflakepostgres/index.js +1 -1
- package/dist/integrations/snowflakepostgres/types.d.ts +2 -2
- package/dist/integrations/snowflakepostgres/types.d.ts.map +1 -1
- package/dist/integrations/stabilityai/client.d.ts +2 -2
- package/dist/integrations/stabilityai/client.d.ts.map +1 -1
- package/dist/integrations/stabilityai/client.js +1 -1
- package/dist/integrations/stabilityai/client.js.map +1 -1
- package/dist/integrations/stabilityai/index.d.ts +2 -2
- package/dist/integrations/stabilityai/index.js +1 -1
- package/dist/integrations/stabilityai/types.d.ts +4 -3
- package/dist/integrations/stabilityai/types.d.ts.map +1 -1
- package/dist/integrations/stripe/client.d.ts +2 -2
- package/dist/integrations/stripe/client.d.ts.map +1 -1
- package/dist/integrations/stripe/client.js +1 -1
- package/dist/integrations/stripe/client.js.map +1 -1
- package/dist/integrations/stripe/index.d.ts +2 -2
- package/dist/integrations/stripe/index.js +1 -1
- package/dist/integrations/stripe/types.d.ts +6 -5
- package/dist/integrations/stripe/types.d.ts.map +1 -1
- package/dist/integrations/superblocks-ocr/client.d.ts +2 -2
- package/dist/integrations/superblocks-ocr/client.d.ts.map +1 -1
- package/dist/integrations/superblocks-ocr/client.js +1 -1
- package/dist/integrations/superblocks-ocr/client.js.map +1 -1
- package/dist/integrations/superblocks-ocr/index.d.ts +2 -2
- package/dist/integrations/superblocks-ocr/index.js +1 -1
- package/dist/integrations/superblocks-ocr/types.d.ts +4 -3
- package/dist/integrations/superblocks-ocr/types.d.ts.map +1 -1
- package/dist/integrations/twilio/client.d.ts +2 -2
- package/dist/integrations/twilio/client.d.ts.map +1 -1
- package/dist/integrations/twilio/client.js +1 -1
- package/dist/integrations/twilio/client.js.map +1 -1
- package/dist/integrations/twilio/index.d.ts +2 -2
- package/dist/integrations/twilio/index.js +1 -1
- package/dist/integrations/twilio/types.d.ts +4 -3
- package/dist/integrations/twilio/types.d.ts.map +1 -1
- package/dist/integrations/types.d.ts +1 -1
- package/dist/integrations/utils.js +5 -5
- package/dist/integrations/zendesk/client.d.ts +2 -2
- package/dist/integrations/zendesk/client.d.ts.map +1 -1
- package/dist/integrations/zendesk/client.js +1 -1
- package/dist/integrations/zendesk/client.js.map +1 -1
- package/dist/integrations/zendesk/index.d.ts +2 -2
- package/dist/integrations/zendesk/index.js +1 -1
- package/dist/integrations/zendesk/types.d.ts +4 -3
- package/dist/integrations/zendesk/types.d.ts.map +1 -1
- package/dist/integrations/zoom/client.d.ts +2 -2
- package/dist/integrations/zoom/client.d.ts.map +1 -1
- package/dist/integrations/zoom/client.js +1 -1
- package/dist/integrations/zoom/client.js.map +1 -1
- package/dist/integrations/zoom/index.d.ts +2 -2
- package/dist/integrations/zoom/index.js +1 -1
- package/dist/integrations/zoom/types.d.ts +5 -4
- package/dist/integrations/zoom/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 +3 -3
- package/dist/runtime/context.js.map +1 -1
- package/dist/runtime/errors.d.ts.map +1 -1
- package/dist/runtime/errors.js +17 -13
- package/dist/runtime/errors.js.map +1 -1
- package/dist/runtime/execute.d.ts +5 -5
- package/dist/runtime/execute.d.ts.map +1 -1
- package/dist/runtime/execute.js +3 -3
- package/dist/runtime/execute.js.map +1 -1
- package/dist/runtime/executor.d.ts +4 -4
- package/dist/runtime/executor.js +5 -5
- package/dist/runtime/index.d.ts +6 -6
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +6 -6
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/logger.d.ts +1 -1
- package/dist/runtime/logger.d.ts.map +1 -1
- package/dist/runtime/logger.js +5 -5
- package/dist/runtime/logger.js.map +1 -1
- package/dist/runtime/streaming-context.d.ts +3 -3
- package/dist/runtime/streaming-context.d.ts.map +1 -1
- package/dist/runtime/streaming-context.js +2 -2
- package/dist/runtime/streaming-context.js.map +1 -1
- package/dist/runtime/streaming-executor.d.ts +4 -4
- package/dist/runtime/streaming-executor.d.ts.map +1 -1
- package/dist/runtime/streaming-executor.js +5 -5
- package/dist/runtime/streaming-executor.js.map +1 -1
- package/dist/types.d.ts +10 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/api/definition.test.ts +65 -2
- package/src/api/definition.ts +33 -1
- package/src/api/index.ts +4 -4
- package/src/api/streaming.test.ts +166 -88
- package/src/api/streaming.ts +41 -13
- package/src/errors.ts +6 -6
- package/src/index.ts +14 -3
- package/src/integrations/airtable/README.md +46 -39
- package/src/integrations/airtable/client.ts +5 -3
- package/src/integrations/airtable/index.ts +2 -2
- package/src/integrations/airtable/types.ts +7 -11
- package/src/integrations/anthropic/README.md +57 -47
- package/src/integrations/anthropic/client.ts +5 -3
- package/src/integrations/anthropic/index.ts +2 -2
- package/src/integrations/anthropic/types.ts +12 -5
- package/src/integrations/asana/README.md +39 -37
- package/src/integrations/asana/client.ts +5 -3
- package/src/integrations/asana/index.ts +2 -2
- package/src/integrations/asana/types.ts +4 -3
- package/src/integrations/athena/README.md +23 -16
- package/src/integrations/athena/client.ts +18 -15
- package/src/integrations/athena/index.ts +2 -2
- package/src/integrations/athena/types.ts +9 -4
- package/src/integrations/base/graphql-integration-client.ts +9 -9
- package/src/integrations/base/index.ts +4 -4
- package/src/integrations/base/rest-api-integration-client.ts +15 -4
- package/src/integrations/base/types.ts +8 -11
- package/src/integrations/bigquery/README.md +24 -19
- package/src/integrations/bigquery/client.ts +21 -16
- package/src/integrations/bigquery/index.ts +2 -2
- package/src/integrations/bigquery/types.ts +9 -4
- package/src/integrations/bitbucket/README.md +56 -40
- package/src/integrations/bitbucket/client.ts +5 -3
- package/src/integrations/bitbucket/index.ts +2 -2
- package/src/integrations/bitbucket/types.ts +6 -4
- package/src/integrations/box/README.md +60 -53
- package/src/integrations/box/client.ts +5 -3
- package/src/integrations/box/index.ts +2 -2
- package/src/integrations/box/types.ts +4 -3
- package/src/integrations/circleci/README.md +70 -43
- package/src/integrations/circleci/client.ts +5 -3
- package/src/integrations/circleci/index.ts +2 -2
- package/src/integrations/circleci/types.ts +6 -4
- package/src/integrations/cockroachdb/README.md +26 -21
- package/src/integrations/cockroachdb/client.ts +18 -15
- package/src/integrations/cockroachdb/index.ts +2 -2
- package/src/integrations/cockroachdb/types.ts +9 -4
- package/src/integrations/cohere/README.md +30 -29
- package/src/integrations/cohere/client.ts +5 -3
- package/src/integrations/cohere/index.ts +2 -2
- package/src/integrations/cohere/types.ts +7 -11
- package/src/integrations/confluence/README.md +50 -46
- package/src/integrations/confluence/client.ts +5 -3
- package/src/integrations/confluence/index.ts +2 -2
- package/src/integrations/confluence/types.ts +6 -4
- package/src/integrations/cosmosdb/README.md +26 -23
- package/src/integrations/cosmosdb/client.ts +32 -30
- package/src/integrations/cosmosdb/index.ts +2 -2
- package/src/integrations/cosmosdb/types.ts +4 -3
- package/src/integrations/couchbase/README.md +37 -23
- package/src/integrations/couchbase/client.ts +28 -22
- package/src/integrations/couchbase/index.ts +2 -2
- package/src/integrations/couchbase/types.ts +14 -8
- package/src/integrations/databricks/README.md +25 -20
- package/src/integrations/databricks/client.ts +18 -15
- package/src/integrations/databricks/index.ts +2 -2
- package/src/integrations/databricks/types.ts +9 -4
- package/src/integrations/datadog/README.md +51 -38
- package/src/integrations/datadog/client.ts +5 -3
- package/src/integrations/datadog/index.ts +2 -2
- package/src/integrations/datadog/types.ts +6 -4
- package/src/integrations/declarations.ts +237 -199
- package/src/integrations/dropbox/README.md +42 -39
- package/src/integrations/dropbox/client.ts +5 -3
- package/src/integrations/dropbox/index.ts +2 -2
- package/src/integrations/dropbox/types.ts +6 -4
- package/src/integrations/dynamodb/README.md +92 -60
- package/src/integrations/dynamodb/client.ts +45 -36
- package/src/integrations/dynamodb/index.ts +2 -2
- package/src/integrations/dynamodb/types.ts +10 -9
- package/src/integrations/elasticsearch/README.md +72 -70
- package/src/integrations/elasticsearch/client.ts +5 -3
- package/src/integrations/elasticsearch/index.ts +2 -2
- package/src/integrations/elasticsearch/types.ts +6 -4
- package/src/integrations/fireworks/README.md +35 -38
- package/src/integrations/fireworks/client.ts +5 -3
- package/src/integrations/fireworks/index.ts +2 -2
- package/src/integrations/fireworks/types.ts +6 -4
- package/src/integrations/front/README.md +29 -28
- package/src/integrations/front/client.ts +5 -3
- package/src/integrations/front/index.ts +2 -2
- package/src/integrations/front/types.ts +4 -3
- package/src/integrations/gcs/README.md +24 -19
- package/src/integrations/gcs/client.ts +26 -26
- package/src/integrations/gcs/index.ts +2 -2
- package/src/integrations/gcs/types.ts +11 -14
- package/src/integrations/gemini/README.md +31 -28
- package/src/integrations/gemini/client.ts +5 -3
- package/src/integrations/gemini/index.ts +2 -2
- package/src/integrations/gemini/types.ts +6 -4
- package/src/integrations/github/README.md +41 -35
- package/src/integrations/github/client.ts +5 -3
- package/src/integrations/github/index.ts +2 -2
- package/src/integrations/github/types.ts +8 -6
- package/src/integrations/googleanalytics/README.md +51 -40
- package/src/integrations/googleanalytics/client.ts +5 -3
- package/src/integrations/googleanalytics/index.ts +2 -2
- package/src/integrations/googleanalytics/types.ts +6 -4
- package/src/integrations/googledrive/README.md +57 -50
- package/src/integrations/googledrive/client.ts +5 -3
- package/src/integrations/googledrive/index.ts +2 -2
- package/src/integrations/googledrive/types.ts +6 -4
- package/src/integrations/graphql/README.md +62 -41
- package/src/integrations/graphql/client.ts +5 -3
- package/src/integrations/graphql/index.ts +2 -2
- package/src/integrations/graphql/types.ts +6 -5
- package/src/integrations/groq/README.md +34 -35
- package/src/integrations/groq/client.ts +5 -3
- package/src/integrations/groq/index.ts +2 -2
- package/src/integrations/groq/types.ts +4 -3
- package/src/integrations/gsheets/README.md +61 -47
- package/src/integrations/gsheets/client.ts +19 -11
- package/src/integrations/gsheets/index.ts +2 -2
- package/src/integrations/gsheets/types.ts +12 -11
- package/src/integrations/hubspot/README.md +80 -67
- package/src/integrations/hubspot/client.ts +5 -3
- package/src/integrations/hubspot/index.ts +2 -2
- package/src/integrations/hubspot/types.ts +6 -4
- package/src/integrations/index.ts +169 -131
- package/src/integrations/intercom/README.md +25 -24
- package/src/integrations/intercom/client.ts +5 -3
- package/src/integrations/intercom/index.ts +2 -2
- package/src/integrations/intercom/types.ts +6 -4
- package/src/integrations/jira/README.md +46 -43
- package/src/integrations/jira/client.ts +5 -3
- package/src/integrations/jira/index.ts +2 -2
- package/src/integrations/jira/types.ts +4 -3
- package/src/integrations/kafka/README.md +39 -33
- package/src/integrations/kafka/client.ts +34 -30
- package/src/integrations/kafka/index.ts +2 -2
- package/src/integrations/kafka/types.ts +8 -7
- package/src/integrations/kinesis/README.md +34 -32
- package/src/integrations/kinesis/client.ts +12 -8
- package/src/integrations/kinesis/index.ts +2 -2
- package/src/integrations/kinesis/types.ts +9 -10
- package/src/integrations/lakebase/client.ts +33 -20
- package/src/integrations/lakebase/index.ts +2 -2
- package/src/integrations/lakebase/types.ts +7 -3
- package/src/integrations/launchdarkly/README.md +38 -37
- package/src/integrations/launchdarkly/client.ts +5 -3
- package/src/integrations/launchdarkly/index.ts +2 -2
- package/src/integrations/launchdarkly/types.ts +6 -4
- package/src/integrations/mariadb/README.md +24 -19
- package/src/integrations/mariadb/client.ts +18 -15
- package/src/integrations/mariadb/index.ts +2 -2
- package/src/integrations/mariadb/types.ts +9 -4
- package/src/integrations/mistral/README.md +33 -34
- package/src/integrations/mistral/client.ts +5 -3
- package/src/integrations/mistral/index.ts +2 -2
- package/src/integrations/mistral/types.ts +6 -4
- package/src/integrations/mongodb/README.md +131 -86
- package/src/integrations/mongodb/client.ts +12 -10
- package/src/integrations/mongodb/index.ts +2 -2
- package/src/integrations/mongodb/types.ts +17 -16
- package/src/integrations/mssql/README.md +26 -21
- package/src/integrations/mssql/client.ts +18 -15
- package/src/integrations/mssql/index.ts +2 -2
- package/src/integrations/mssql/types.ts +9 -4
- package/src/integrations/mysql/README.md +27 -22
- package/src/integrations/mysql/client.ts +18 -15
- package/src/integrations/mysql/index.ts +2 -2
- package/src/integrations/mysql/types.ts +9 -4
- package/src/integrations/notion/README.md +31 -28
- package/src/integrations/notion/client.ts +5 -3
- package/src/integrations/notion/index.ts +2 -2
- package/src/integrations/notion/types.ts +8 -6
- package/src/integrations/openai_v2/README.md +40 -39
- package/src/integrations/openai_v2/client.ts +5 -3
- package/src/integrations/openai_v2/index.ts +2 -2
- package/src/integrations/openai_v2/types.ts +12 -5
- package/src/integrations/oracledb/README.md +26 -21
- package/src/integrations/oracledb/client.ts +21 -16
- package/src/integrations/oracledb/index.ts +2 -2
- package/src/integrations/oracledb/types.ts +9 -4
- package/src/integrations/pagerduty/README.md +48 -41
- package/src/integrations/pagerduty/client.ts +5 -3
- package/src/integrations/pagerduty/index.ts +2 -2
- package/src/integrations/pagerduty/types.ts +6 -4
- package/src/integrations/perplexity/README.md +31 -32
- package/src/integrations/perplexity/client.ts +5 -3
- package/src/integrations/perplexity/index.ts +2 -2
- package/src/integrations/perplexity/types.ts +6 -4
- package/src/integrations/postgres/README.md +30 -27
- package/src/integrations/postgres/client.ts +27 -18
- package/src/integrations/postgres/index.ts +2 -2
- package/src/integrations/postgres/types.ts +13 -8
- package/src/integrations/python/README.md +86 -67
- package/src/integrations/python/client.test.ts +104 -86
- package/src/integrations/python/client.ts +27 -23
- package/src/integrations/python/index.ts +2 -2
- package/src/integrations/python/types.ts +6 -6
- package/src/integrations/redis/README.md +48 -35
- package/src/integrations/redis/client.ts +32 -28
- package/src/integrations/redis/index.ts +2 -2
- package/src/integrations/redis/types.ts +4 -3
- package/src/integrations/redshift/README.md +26 -21
- package/src/integrations/redshift/client.ts +21 -16
- package/src/integrations/redshift/index.ts +2 -2
- package/src/integrations/redshift/types.ts +9 -4
- package/src/integrations/registry.test.ts +14 -10
- package/src/integrations/registry.ts +225 -154
- package/src/integrations/s3/README.md +23 -18
- package/src/integrations/s3/client.ts +26 -27
- package/src/integrations/s3/index.ts +2 -2
- package/src/integrations/s3/types.ts +11 -15
- package/src/integrations/salesforce/README.md +35 -30
- package/src/integrations/salesforce/client.ts +27 -30
- package/src/integrations/salesforce/index.ts +6 -2
- package/src/integrations/salesforce/types.ts +23 -18
- package/src/integrations/segment/README.md +23 -22
- package/src/integrations/segment/client.ts +5 -3
- package/src/integrations/segment/index.ts +2 -2
- package/src/integrations/segment/types.ts +6 -4
- package/src/integrations/sendgrid/README.md +27 -24
- package/src/integrations/sendgrid/client.ts +5 -3
- package/src/integrations/sendgrid/index.ts +2 -2
- package/src/integrations/sendgrid/types.ts +6 -4
- package/src/integrations/slack/README.md +29 -28
- package/src/integrations/slack/client.ts +3 -1
- package/src/integrations/slack/index.ts +2 -2
- package/src/integrations/slack/types.ts +6 -12
- package/src/integrations/smtp/client.ts +11 -11
- package/src/integrations/smtp/index.ts +2 -2
- package/src/integrations/smtp/types.ts +1 -1
- package/src/integrations/snowflake/README.md +35 -37
- package/src/integrations/snowflake/client.ts +2 -1
- package/src/integrations/snowflake/index.ts +2 -2
- package/src/integrations/snowflake/types.ts +9 -4
- package/src/integrations/snowflakecortex/client.ts +5 -3
- package/src/integrations/snowflakecortex/index.ts +2 -2
- package/src/integrations/snowflakecortex/types.ts +9 -3
- package/src/integrations/snowflakepostgres/client.ts +2 -2
- package/src/integrations/snowflakepostgres/index.ts +2 -2
- package/src/integrations/snowflakepostgres/types.ts +7 -3
- package/src/integrations/stabilityai/README.md +34 -39
- package/src/integrations/stabilityai/client.ts +5 -3
- package/src/integrations/stabilityai/index.ts +2 -2
- package/src/integrations/stabilityai/types.ts +6 -4
- package/src/integrations/stripe/README.md +34 -33
- package/src/integrations/stripe/client.ts +5 -3
- package/src/integrations/stripe/index.ts +2 -2
- package/src/integrations/stripe/types.ts +8 -6
- package/src/integrations/superblocks-ocr/README.md +35 -30
- package/src/integrations/superblocks-ocr/client.ts +3 -4
- package/src/integrations/superblocks-ocr/index.ts +2 -2
- package/src/integrations/superblocks-ocr/types.ts +6 -4
- package/src/integrations/twilio/README.md +26 -32
- package/src/integrations/twilio/client.ts +5 -3
- package/src/integrations/twilio/index.ts +2 -2
- package/src/integrations/twilio/types.ts +6 -4
- package/src/integrations/types.ts +1 -1
- package/src/integrations/utils.ts +5 -5
- package/src/integrations/zendesk/README.md +29 -28
- package/src/integrations/zendesk/client.ts +5 -3
- package/src/integrations/zendesk/index.ts +2 -2
- package/src/integrations/zendesk/types.ts +6 -4
- package/src/integrations/zoom/README.md +40 -41
- package/src/integrations/zoom/client.ts +5 -3
- package/src/integrations/zoom/index.ts +2 -2
- package/src/integrations/zoom/types.ts +5 -4
- package/src/runtime/context.ts +25 -10
- package/src/runtime/errors.ts +17 -13
- package/src/runtime/execute.ts +10 -11
- package/src/runtime/executor.ts +9 -9
- package/src/runtime/index.ts +9 -6
- package/src/runtime/logger.ts +11 -7
- package/src/runtime/streaming-context.ts +23 -9
- package/src/runtime/streaming-executor.ts +15 -9
- package/src/types.ts +23 -6
|
@@ -16,7 +16,10 @@ import type {
|
|
|
16
16
|
StreamApiRequestSchema,
|
|
17
17
|
SupportsStreamingApiRequest,
|
|
18
18
|
} from "./types.js";
|
|
19
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
RestApiValidationError,
|
|
21
|
+
StreamChunkValidationError,
|
|
22
|
+
} from "../../errors.js";
|
|
20
23
|
import type { z } from "zod";
|
|
21
24
|
|
|
22
25
|
export type RestApiRequest = PartialMessage<RestApiIntegrationPlugin>;
|
|
@@ -29,7 +32,11 @@ export type RestApiRequest = PartialMessage<RestApiIntegrationPlugin>;
|
|
|
29
32
|
* Also supports streaming API requests when a streaming executor is provided.
|
|
30
33
|
*/
|
|
31
34
|
export abstract class RestApiIntegrationClient
|
|
32
|
-
implements
|
|
35
|
+
implements
|
|
36
|
+
IntegrationClientImpl,
|
|
37
|
+
SupportsApiRequest,
|
|
38
|
+
SupportsStreamingApiRequest
|
|
39
|
+
{
|
|
33
40
|
readonly name: string;
|
|
34
41
|
readonly pluginId: string;
|
|
35
42
|
readonly config: IntegrationConfig;
|
|
@@ -61,7 +68,9 @@ export abstract class RestApiIntegrationClient
|
|
|
61
68
|
|
|
62
69
|
async apiRequest<TBody, TResponse>(
|
|
63
70
|
options: ApiRequestOptions<TBody>,
|
|
64
|
-
schema: ApiRequestSchema<TBody, TResponse> & {
|
|
71
|
+
schema: ApiRequestSchema<TBody, TResponse> & {
|
|
72
|
+
response: z.ZodSchema<TResponse>;
|
|
73
|
+
},
|
|
65
74
|
): Promise<TResponse> {
|
|
66
75
|
// Validate that body schema is provided if body is present
|
|
67
76
|
if (options.body !== undefined) {
|
|
@@ -267,7 +276,9 @@ export abstract class RestApiIntegrationClient
|
|
|
267
276
|
}
|
|
268
277
|
|
|
269
278
|
// Execute the streaming request
|
|
270
|
-
const stream = this.executeStreamingQuery(
|
|
279
|
+
const stream = this.executeStreamingQuery(
|
|
280
|
+
request as Record<string, unknown>,
|
|
281
|
+
);
|
|
271
282
|
|
|
272
283
|
// Validate and yield each chunk
|
|
273
284
|
let chunkIndex = 0;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Shared types for REST API Integration (OpenAPI) based clients.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import type { z } from
|
|
5
|
+
import type { z } from "zod";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Options for making a generic REST API request.
|
|
@@ -11,7 +11,7 @@ export interface ApiRequestOptions<TBody = unknown> {
|
|
|
11
11
|
/**
|
|
12
12
|
* HTTP method for the request.
|
|
13
13
|
*/
|
|
14
|
-
method:
|
|
14
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* API endpoint path (e.g., "/users", "/repos/owner/repo")
|
|
@@ -67,14 +67,9 @@ export interface SupportsApiRequest {
|
|
|
67
67
|
*
|
|
68
68
|
* @example
|
|
69
69
|
* ```typescript
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* const
|
|
73
|
-
* ts: z.string(),
|
|
74
|
-
* channel: z.string(),
|
|
75
|
-
* });
|
|
76
|
-
*
|
|
77
|
-
* const result = await client.apiRequest(
|
|
70
|
+
* // Declare in api(): integrations: { slack: slack(INTEGRATION_ID) }
|
|
71
|
+
* // In run(), access via: ctx.integrations.<name>
|
|
72
|
+
* const result = await ctx.integrations.slack.apiRequest(
|
|
78
73
|
* {
|
|
79
74
|
* method: 'POST',
|
|
80
75
|
* path: '/chat.postMessage',
|
|
@@ -96,7 +91,9 @@ export interface SupportsApiRequest {
|
|
|
96
91
|
*/
|
|
97
92
|
apiRequest<TBody, TResponse>(
|
|
98
93
|
options: ApiRequestOptions<TBody>,
|
|
99
|
-
schema: ApiRequestSchema<TBody, TResponse> & {
|
|
94
|
+
schema: ApiRequestSchema<TBody, TResponse> & {
|
|
95
|
+
response: z.ZodSchema<TResponse>;
|
|
96
|
+
},
|
|
100
97
|
): Promise<TResponse>;
|
|
101
98
|
}
|
|
102
99
|
|
|
@@ -4,17 +4,17 @@ Execute SQL queries against Google BigQuery with full type safety and runtime va
|
|
|
4
4
|
|
|
5
5
|
## Methods
|
|
6
6
|
|
|
7
|
-
| Method
|
|
8
|
-
|
|
|
7
|
+
| Method | Description |
|
|
8
|
+
| -------------------------------- | ---------------------------------------------------------- |
|
|
9
9
|
| `query<T>(sql, schema, params?)` | Execute a SELECT query and return validated, typed results |
|
|
10
|
-
| `execute(sql, params?)`
|
|
10
|
+
| `execute(sql, params?)` | Execute a statement and return affected row count |
|
|
11
11
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
### Basic Query with Schema Validation
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
import { api, z } from "@superblocksteam/sdk-api";
|
|
17
|
+
import { api, z, bigquery } from "@superblocksteam/sdk-api";
|
|
18
18
|
|
|
19
19
|
// Integration ID from the integrations panel
|
|
20
20
|
const PROD_BIGQUERY = "a1b2c3d4-5678-90ab-cdef-bigquery0001";
|
|
@@ -27,6 +27,9 @@ const EventSchema = z.object({
|
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
export default api({
|
|
30
|
+
integrations: {
|
|
31
|
+
bigquery: bigquery(PROD_BIGQUERY),
|
|
32
|
+
},
|
|
30
33
|
input: z.object({
|
|
31
34
|
event_name: z.string(),
|
|
32
35
|
}),
|
|
@@ -34,15 +37,13 @@ export default api({
|
|
|
34
37
|
events: z.array(EventSchema),
|
|
35
38
|
}),
|
|
36
39
|
async run(ctx, { event_name }) {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
const events = await bigquery.query(
|
|
40
|
+
const events = await ctx.integrations.bigquery.query(
|
|
40
41
|
`SELECT event_id, event_name, user_id, timestamp
|
|
41
42
|
FROM \`project.dataset.events\`
|
|
42
43
|
WHERE event_name = $1
|
|
43
44
|
LIMIT 100`,
|
|
44
45
|
EventSchema,
|
|
45
|
-
[event_name]
|
|
46
|
+
[event_name],
|
|
46
47
|
);
|
|
47
48
|
|
|
48
49
|
return { events };
|
|
@@ -53,12 +54,10 @@ export default api({
|
|
|
53
54
|
### Executing INSERT, UPDATE, DELETE Statements
|
|
54
55
|
|
|
55
56
|
```typescript
|
|
56
|
-
const bigquery = ctx.bigquery(PROD_BIGQUERY);
|
|
57
|
-
|
|
58
57
|
// INSERT
|
|
59
|
-
await bigquery.execute(
|
|
58
|
+
await ctx.integrations.bigquery.execute(
|
|
60
59
|
"INSERT INTO `project.dataset.metrics` (name, value, timestamp) VALUES ($1, $2, CURRENT_TIMESTAMP())",
|
|
61
|
-
["cpu_usage", "75.5"]
|
|
60
|
+
["cpu_usage", "75.5"],
|
|
62
61
|
);
|
|
63
62
|
```
|
|
64
63
|
|
|
@@ -71,7 +70,7 @@ const AnalyticsSchema = z.object({
|
|
|
71
70
|
unique_users: z.coerce.number(),
|
|
72
71
|
});
|
|
73
72
|
|
|
74
|
-
const analytics = await bigquery.query(
|
|
73
|
+
const analytics = await ctx.integrations.bigquery.query(
|
|
75
74
|
`SELECT
|
|
76
75
|
DATE(timestamp) as date,
|
|
77
76
|
COUNT(*) as total_events,
|
|
@@ -80,7 +79,7 @@ const analytics = await bigquery.query(
|
|
|
80
79
|
WHERE timestamp >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
|
|
81
80
|
GROUP BY date
|
|
82
81
|
ORDER BY date DESC`,
|
|
83
|
-
AnalyticsSchema
|
|
82
|
+
AnalyticsSchema,
|
|
84
83
|
);
|
|
85
84
|
```
|
|
86
85
|
|
|
@@ -93,11 +92,11 @@ const UserActivitySchema = z.object({
|
|
|
93
92
|
z.object({
|
|
94
93
|
event_name: z.string(),
|
|
95
94
|
count: z.coerce.number(),
|
|
96
|
-
})
|
|
95
|
+
}),
|
|
97
96
|
),
|
|
98
97
|
});
|
|
99
98
|
|
|
100
|
-
const activity = await bigquery.query(
|
|
99
|
+
const activity = await ctx.integrations.bigquery.query(
|
|
101
100
|
`SELECT
|
|
102
101
|
user_id,
|
|
103
102
|
ARRAY_AGG(STRUCT(event_name, count)) as events
|
|
@@ -107,7 +106,7 @@ const activity = await bigquery.query(
|
|
|
107
106
|
GROUP BY user_id, event_name
|
|
108
107
|
)
|
|
109
108
|
GROUP BY user_id`,
|
|
110
|
-
UserActivitySchema
|
|
109
|
+
UserActivitySchema,
|
|
111
110
|
);
|
|
112
111
|
```
|
|
113
112
|
|
|
@@ -138,7 +137,10 @@ const schema = z.object({
|
|
|
138
137
|
|
|
139
138
|
```typescript
|
|
140
139
|
// CORRECT - Schema is required
|
|
141
|
-
const events = await bigquery.query(
|
|
140
|
+
const events = await ctx.integrations.bigquery.query(
|
|
141
|
+
"SELECT * FROM `project.dataset.events`",
|
|
142
|
+
EventSchema,
|
|
143
|
+
);
|
|
142
144
|
```
|
|
143
145
|
|
|
144
146
|
### NULL Handling
|
|
@@ -169,7 +171,10 @@ const query = `
|
|
|
169
171
|
import { QueryValidationError } from "@superblocksteam/sdk-api";
|
|
170
172
|
|
|
171
173
|
try {
|
|
172
|
-
const events = await bigquery.query(
|
|
174
|
+
const events = await ctx.integrations.bigquery.query(
|
|
175
|
+
"SELECT * FROM `project.dataset.events`",
|
|
176
|
+
EventSchema,
|
|
177
|
+
);
|
|
173
178
|
} catch (error) {
|
|
174
179
|
if (error instanceof QueryValidationError) {
|
|
175
180
|
console.error("Row index:", error.details.rowIndex);
|
|
@@ -5,20 +5,22 @@
|
|
|
5
5
|
* runtime validation using Zod schemas.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { z } from
|
|
9
|
-
import type { PartialMessage } from
|
|
10
|
-
import type { Plugin as BigQueryPlugin } from
|
|
11
|
-
import type { IntegrationConfig, IntegrationClientImpl } from
|
|
12
|
-
import type { QueryExecutor } from
|
|
13
|
-
import { QueryValidationError } from
|
|
14
|
-
import { IntegrationError } from
|
|
15
|
-
import { describeType } from
|
|
16
|
-
import type { BigQueryClient } from
|
|
8
|
+
import type { z } from "zod";
|
|
9
|
+
import type { PartialMessage } from "@bufbuild/protobuf";
|
|
10
|
+
import type { Plugin as BigQueryPlugin } from "@superblocksteam/types/dist/src/plugins/bigquery/v1/plugin_pb";
|
|
11
|
+
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
12
|
+
import type { QueryExecutor } from "../registry.js";
|
|
13
|
+
import { QueryValidationError } from "../../errors.js";
|
|
14
|
+
import { IntegrationError } from "../../runtime/errors.js";
|
|
15
|
+
import { describeType } from "../utils.js";
|
|
16
|
+
import type { BigQueryClient } from "./types.js";
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Internal implementation of the BigQuery client.
|
|
20
20
|
*/
|
|
21
|
-
export class BigQueryClientImpl
|
|
21
|
+
export class BigQueryClientImpl
|
|
22
|
+
implements BigQueryClient, IntegrationClientImpl
|
|
23
|
+
{
|
|
22
24
|
readonly config: IntegrationConfig;
|
|
23
25
|
private readonly executeQuery: QueryExecutor;
|
|
24
26
|
|
|
@@ -71,7 +73,7 @@ export class BigQueryClientImpl implements BigQueryClient, IntegrationClientImpl
|
|
|
71
73
|
if (!Array.isArray(result)) {
|
|
72
74
|
throw new IntegrationError(
|
|
73
75
|
this.config.name,
|
|
74
|
-
|
|
76
|
+
"query",
|
|
75
77
|
`Expected array result from BigQuery query, got: ${describeType(result)}`,
|
|
76
78
|
);
|
|
77
79
|
}
|
|
@@ -107,27 +109,30 @@ export class BigQueryClientImpl implements BigQueryClient, IntegrationClientImpl
|
|
|
107
109
|
throw error;
|
|
108
110
|
}
|
|
109
111
|
|
|
110
|
-
throw new IntegrationError(this.config.name,
|
|
112
|
+
throw new IntegrationError(this.config.name, "query", error);
|
|
111
113
|
}
|
|
112
114
|
}
|
|
113
115
|
|
|
114
|
-
async execute(
|
|
116
|
+
async execute(
|
|
117
|
+
sql: string,
|
|
118
|
+
params?: unknown[],
|
|
119
|
+
): Promise<{ rowCount: number }> {
|
|
115
120
|
const request = this.buildRequest(sql, params);
|
|
116
121
|
|
|
117
122
|
try {
|
|
118
123
|
const result = await this.executeQuery(request);
|
|
119
124
|
|
|
120
125
|
if (
|
|
121
|
-
typeof result ===
|
|
126
|
+
typeof result === "object" &&
|
|
122
127
|
result !== null &&
|
|
123
|
-
|
|
128
|
+
"rowCount" in result
|
|
124
129
|
) {
|
|
125
130
|
return { rowCount: Number(result.rowCount) || 0 };
|
|
126
131
|
}
|
|
127
132
|
|
|
128
133
|
return { rowCount: 0 };
|
|
129
134
|
} catch (error) {
|
|
130
|
-
throw new IntegrationError(this.config.name,
|
|
135
|
+
throw new IntegrationError(this.config.name, "execute", error);
|
|
131
136
|
}
|
|
132
137
|
}
|
|
133
138
|
}
|
|
@@ -4,15 +4,16 @@
|
|
|
4
4
|
* Provides typed methods for executing BigQuery queries with runtime validation.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { z } from
|
|
8
|
-
import type { BaseIntegrationClient } from
|
|
7
|
+
import type { z } from "zod";
|
|
8
|
+
import type { BaseIntegrationClient } from "../../types.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Client for executing BigQuery queries with type-safe validation.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```typescript
|
|
15
|
-
*
|
|
15
|
+
* // Declare in api(): integrations: { bigquery: bigquery(INTEGRATION_ID) }
|
|
16
|
+
* // In run(), access via ctx.integrations.bigquery
|
|
16
17
|
*
|
|
17
18
|
* // Query with validation
|
|
18
19
|
* const EventSchema = z.object({
|
|
@@ -40,7 +41,11 @@ export interface BigQueryClient extends BaseIntegrationClient {
|
|
|
40
41
|
* @throws {QueryValidationError} If results don't match schema
|
|
41
42
|
* @throws {IntegrationError} If query execution fails
|
|
42
43
|
*/
|
|
43
|
-
query<T>(
|
|
44
|
+
query<T>(
|
|
45
|
+
sql: string,
|
|
46
|
+
schema: z.ZodSchema<T>,
|
|
47
|
+
params?: unknown[],
|
|
48
|
+
): Promise<T[]>;
|
|
44
49
|
|
|
45
50
|
/**
|
|
46
51
|
* Execute a SQL statement (INSERT, UPDATE, DELETE) without output validation.
|
|
@@ -4,8 +4,8 @@ Manage repositories, pull requests, and interact with Bitbucket's APIs.
|
|
|
4
4
|
|
|
5
5
|
## Methods
|
|
6
6
|
|
|
7
|
-
| Method
|
|
8
|
-
|
|
|
7
|
+
| Method | Description |
|
|
8
|
+
| ----------------------------- | ----------------------------------------------------- |
|
|
9
9
|
| `apiRequest(options, schema)` | Make any Bitbucket API request with schema validation |
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
@@ -13,7 +13,7 @@ Manage repositories, pull requests, and interact with Bitbucket's APIs.
|
|
|
13
13
|
### List Repositories
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { api, z } from "@superblocksteam/sdk-api";
|
|
16
|
+
import { api, z, bitbucket } from "@superblocksteam/sdk-api";
|
|
17
17
|
|
|
18
18
|
// Integration ID from the integrations panel
|
|
19
19
|
const PROD_BITBUCKET = "a1b2c3d4-5678-90ab-cdef-bitbucke0001";
|
|
@@ -41,6 +41,9 @@ const ListReposResponseSchema = z.object({
|
|
|
41
41
|
|
|
42
42
|
export default api({
|
|
43
43
|
name: "BitbucketExample",
|
|
44
|
+
integrations: {
|
|
45
|
+
bitbucket: bitbucket(PROD_BITBUCKET),
|
|
46
|
+
},
|
|
44
47
|
input: z.object({
|
|
45
48
|
workspace: z.string(),
|
|
46
49
|
}),
|
|
@@ -48,9 +51,7 @@ export default api({
|
|
|
48
51
|
repos: z.array(z.object({ name: z.string(), url: z.string() })),
|
|
49
52
|
}),
|
|
50
53
|
async run(ctx, { workspace }) {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
const result = await bitbucket.apiRequest(
|
|
54
|
+
const result = await ctx.integrations.bitbucket.apiRequest(
|
|
54
55
|
{
|
|
55
56
|
method: "GET",
|
|
56
57
|
path: `/2.0/repositories/${workspace}`,
|
|
@@ -58,7 +59,7 @@ export default api({
|
|
|
58
59
|
pagelen: 50,
|
|
59
60
|
},
|
|
60
61
|
},
|
|
61
|
-
{ response: ListReposResponseSchema }
|
|
62
|
+
{ response: ListReposResponseSchema },
|
|
62
63
|
);
|
|
63
64
|
|
|
64
65
|
return {
|
|
@@ -74,12 +75,12 @@ export default api({
|
|
|
74
75
|
### Get Repository
|
|
75
76
|
|
|
76
77
|
```typescript
|
|
77
|
-
const repo = await bitbucket.apiRequest(
|
|
78
|
+
const repo = await ctx.integrations.bitbucket.apiRequest(
|
|
78
79
|
{
|
|
79
80
|
method: "GET",
|
|
80
81
|
path: `/2.0/repositories/${workspace}/${repoSlug}`,
|
|
81
82
|
},
|
|
82
|
-
{ response: RepositorySchema }
|
|
83
|
+
{ response: RepositorySchema },
|
|
83
84
|
);
|
|
84
85
|
|
|
85
86
|
console.log(`${repo.full_name}: ${repo.is_private ? "private" : "public"}`);
|
|
@@ -107,7 +108,7 @@ const PullRequestSchema = z.object({
|
|
|
107
108
|
}),
|
|
108
109
|
});
|
|
109
110
|
|
|
110
|
-
const pr = await bitbucket.apiRequest(
|
|
111
|
+
const pr = await ctx.integrations.bitbucket.apiRequest(
|
|
111
112
|
{
|
|
112
113
|
method: "POST",
|
|
113
114
|
path: `/2.0/repositories/${workspace}/${repoSlug}/pullrequests`,
|
|
@@ -123,7 +124,7 @@ const pr = await bitbucket.apiRequest(
|
|
|
123
124
|
close_source_branch: true,
|
|
124
125
|
},
|
|
125
126
|
},
|
|
126
|
-
{ response: PullRequestSchema }
|
|
127
|
+
{ response: PullRequestSchema },
|
|
127
128
|
);
|
|
128
129
|
|
|
129
130
|
console.log(`Created PR #${pr.id}: ${pr.links.html.href}`);
|
|
@@ -139,7 +140,7 @@ const ListPRsResponseSchema = z.object({
|
|
|
139
140
|
next: z.string().optional(),
|
|
140
141
|
});
|
|
141
142
|
|
|
142
|
-
const result = await bitbucket.apiRequest(
|
|
143
|
+
const result = await ctx.integrations.bitbucket.apiRequest(
|
|
143
144
|
{
|
|
144
145
|
method: "GET",
|
|
145
146
|
path: `/2.0/repositories/${workspace}/${repoSlug}/pullrequests`,
|
|
@@ -148,7 +149,7 @@ const result = await bitbucket.apiRequest(
|
|
|
148
149
|
pagelen: 25,
|
|
149
150
|
},
|
|
150
151
|
},
|
|
151
|
-
{ response: ListPRsResponseSchema }
|
|
152
|
+
{ response: ListPRsResponseSchema },
|
|
152
153
|
);
|
|
153
154
|
|
|
154
155
|
result.values.forEach((pr) => {
|
|
@@ -161,12 +162,14 @@ result.values.forEach((pr) => {
|
|
|
161
162
|
```typescript
|
|
162
163
|
const MergeResponseSchema = z.object({
|
|
163
164
|
state: z.string(),
|
|
164
|
-
merge_commit: z
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
merge_commit: z
|
|
166
|
+
.object({
|
|
167
|
+
hash: z.string(),
|
|
168
|
+
})
|
|
169
|
+
.optional(),
|
|
167
170
|
});
|
|
168
171
|
|
|
169
|
-
const result = await bitbucket.apiRequest(
|
|
172
|
+
const result = await ctx.integrations.bitbucket.apiRequest(
|
|
170
173
|
{
|
|
171
174
|
method: "POST",
|
|
172
175
|
path: `/2.0/repositories/${workspace}/${repoSlug}/pullrequests/${prId}/merge`,
|
|
@@ -177,7 +180,7 @@ const result = await bitbucket.apiRequest(
|
|
|
177
180
|
merge_strategy: "squash", // merge_commit, squash, fast_forward
|
|
178
181
|
},
|
|
179
182
|
},
|
|
180
|
-
{ response: MergeResponseSchema }
|
|
183
|
+
{ response: MergeResponseSchema },
|
|
181
184
|
);
|
|
182
185
|
```
|
|
183
186
|
|
|
@@ -190,9 +193,11 @@ const CommitSchema = z.object({
|
|
|
190
193
|
date: z.string(),
|
|
191
194
|
author: z.object({
|
|
192
195
|
raw: z.string(),
|
|
193
|
-
user: z
|
|
194
|
-
|
|
195
|
-
|
|
196
|
+
user: z
|
|
197
|
+
.object({
|
|
198
|
+
display_name: z.string(),
|
|
199
|
+
})
|
|
200
|
+
.optional(),
|
|
196
201
|
}),
|
|
197
202
|
});
|
|
198
203
|
|
|
@@ -201,7 +206,7 @@ const ListCommitsResponseSchema = z.object({
|
|
|
201
206
|
next: z.string().optional(),
|
|
202
207
|
});
|
|
203
208
|
|
|
204
|
-
const result = await bitbucket.apiRequest(
|
|
209
|
+
const result = await ctx.integrations.bitbucket.apiRequest(
|
|
205
210
|
{
|
|
206
211
|
method: "GET",
|
|
207
212
|
path: `/2.0/repositories/${workspace}/${repoSlug}/commits`,
|
|
@@ -210,7 +215,7 @@ const result = await bitbucket.apiRequest(
|
|
|
210
215
|
pagelen: 10,
|
|
211
216
|
},
|
|
212
217
|
},
|
|
213
|
-
{ response: ListCommitsResponseSchema }
|
|
218
|
+
{ response: ListCommitsResponseSchema },
|
|
214
219
|
);
|
|
215
220
|
```
|
|
216
221
|
|
|
@@ -224,7 +229,7 @@ const BranchSchema = z.object({
|
|
|
224
229
|
}),
|
|
225
230
|
});
|
|
226
231
|
|
|
227
|
-
const branch = await bitbucket.apiRequest(
|
|
232
|
+
const branch = await ctx.integrations.bitbucket.apiRequest(
|
|
228
233
|
{
|
|
229
234
|
method: "POST",
|
|
230
235
|
path: `/2.0/repositories/${workspace}/${repoSlug}/refs/branches`,
|
|
@@ -235,7 +240,7 @@ const branch = await bitbucket.apiRequest(
|
|
|
235
240
|
},
|
|
236
241
|
},
|
|
237
242
|
},
|
|
238
|
-
{ response: BranchSchema }
|
|
243
|
+
{ response: BranchSchema },
|
|
239
244
|
);
|
|
240
245
|
```
|
|
241
246
|
|
|
@@ -243,12 +248,12 @@ const branch = await bitbucket.apiRequest(
|
|
|
243
248
|
|
|
244
249
|
```typescript
|
|
245
250
|
// Note: Returns raw file content, not JSON
|
|
246
|
-
const content = await bitbucket.apiRequest(
|
|
251
|
+
const content = await ctx.integrations.bitbucket.apiRequest(
|
|
247
252
|
{
|
|
248
253
|
method: "GET",
|
|
249
254
|
path: `/2.0/repositories/${workspace}/${repoSlug}/src/main/README.md`,
|
|
250
255
|
},
|
|
251
|
-
{ response: z.string() }
|
|
256
|
+
{ response: z.string() },
|
|
252
257
|
);
|
|
253
258
|
```
|
|
254
259
|
|
|
@@ -266,7 +271,7 @@ const CommentSchema = z.object({
|
|
|
266
271
|
}),
|
|
267
272
|
});
|
|
268
273
|
|
|
269
|
-
const comment = await bitbucket.apiRequest(
|
|
274
|
+
const comment = await ctx.integrations.bitbucket.apiRequest(
|
|
270
275
|
{
|
|
271
276
|
method: "POST",
|
|
272
277
|
path: `/2.0/repositories/${workspace}/${repoSlug}/pullrequests/${prId}/comments`,
|
|
@@ -276,7 +281,7 @@ const comment = await bitbucket.apiRequest(
|
|
|
276
281
|
},
|
|
277
282
|
},
|
|
278
283
|
},
|
|
279
|
-
{ response: CommentSchema }
|
|
284
|
+
{ response: CommentSchema },
|
|
280
285
|
);
|
|
281
286
|
```
|
|
282
287
|
|
|
@@ -290,7 +295,7 @@ await bitbucket.createPullRequest({ ... });
|
|
|
290
295
|
await bitbucket.listRepos();
|
|
291
296
|
|
|
292
297
|
// CORRECT - Use apiRequest
|
|
293
|
-
await bitbucket.apiRequest(
|
|
298
|
+
await ctx.integrations.bitbucket.apiRequest(
|
|
294
299
|
{ method: "POST", path: `/2.0/repositories/${workspace}/${repo}/pullrequests`, body: { ... } },
|
|
295
300
|
{ response: PullRequestSchema }
|
|
296
301
|
);
|
|
@@ -325,18 +330,22 @@ const path = `/2.0/repositories/myusername/myrepo`;
|
|
|
325
330
|
Bitbucket uses `pagelen` and `next` URL:
|
|
326
331
|
|
|
327
332
|
```typescript
|
|
328
|
-
async function getAllPRs(
|
|
333
|
+
async function getAllPRs(
|
|
334
|
+
bitbucket: BitbucketClient,
|
|
335
|
+
workspace: string,
|
|
336
|
+
repo: string,
|
|
337
|
+
) {
|
|
329
338
|
const allPRs: PullRequest[] = [];
|
|
330
339
|
let url = `/2.0/repositories/${workspace}/${repo}/pullrequests`;
|
|
331
340
|
|
|
332
341
|
while (url) {
|
|
333
|
-
const result = await bitbucket.apiRequest(
|
|
342
|
+
const result = await ctx.integrations.bitbucket.apiRequest(
|
|
334
343
|
{
|
|
335
344
|
method: "GET",
|
|
336
345
|
path: url,
|
|
337
346
|
params: url.includes("?") ? {} : { pagelen: 50 },
|
|
338
347
|
},
|
|
339
|
-
{ response: ListPRsResponseSchema }
|
|
348
|
+
{ response: ListPRsResponseSchema },
|
|
340
349
|
);
|
|
341
350
|
|
|
342
351
|
allPRs.push(...result.values);
|
|
@@ -355,10 +364,14 @@ PR states are uppercase:
|
|
|
355
364
|
const states = ["OPEN", "MERGED", "DECLINED", "SUPERSEDED"];
|
|
356
365
|
|
|
357
366
|
// WRONG
|
|
358
|
-
params: {
|
|
367
|
+
params: {
|
|
368
|
+
state: "open";
|
|
369
|
+
}
|
|
359
370
|
|
|
360
371
|
// CORRECT
|
|
361
|
-
params: {
|
|
372
|
+
params: {
|
|
373
|
+
state: "OPEN";
|
|
374
|
+
}
|
|
362
375
|
```
|
|
363
376
|
|
|
364
377
|
### Branch Names in Paths
|
|
@@ -377,9 +390,12 @@ File content endpoints return raw text, not JSON:
|
|
|
377
390
|
|
|
378
391
|
```typescript
|
|
379
392
|
// This returns raw file content as string
|
|
380
|
-
const content = await bitbucket.apiRequest(
|
|
381
|
-
{
|
|
382
|
-
|
|
393
|
+
const content = await ctx.integrations.bitbucket.apiRequest(
|
|
394
|
+
{
|
|
395
|
+
method: "GET",
|
|
396
|
+
path: `/2.0/repositories/${workspace}/${repo}/src/main/file.txt`,
|
|
397
|
+
},
|
|
398
|
+
{ response: z.string() }, // Not a JSON schema
|
|
383
399
|
);
|
|
384
400
|
```
|
|
385
401
|
|
|
@@ -389,9 +405,9 @@ const content = await bitbucket.apiRequest(
|
|
|
389
405
|
import { RestApiValidationError } from "@superblocksteam/sdk-api";
|
|
390
406
|
|
|
391
407
|
try {
|
|
392
|
-
const result = await bitbucket.apiRequest(
|
|
408
|
+
const result = await ctx.integrations.bitbucket.apiRequest(
|
|
393
409
|
{ method: "GET", path: `/2.0/repositories/${workspace}/${repo}` },
|
|
394
|
-
{ response: RepositorySchema }
|
|
410
|
+
{ response: RepositorySchema },
|
|
395
411
|
);
|
|
396
412
|
} catch (error) {
|
|
397
413
|
if (error instanceof RestApiValidationError) {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Bitbucket integrations use the REST API Integration plugin under the hood.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { RestApiIntegrationClient } from
|
|
9
|
-
import type { BitbucketClient } from
|
|
8
|
+
import { RestApiIntegrationClient } from "../base/index.js";
|
|
9
|
+
import type { BitbucketClient } from "./types.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Internal implementation of BitbucketClient.
|
|
@@ -16,6 +16,8 @@ import type { BitbucketClient } from './types.js';
|
|
|
16
16
|
* Bitbucket API calls. At runtime, the orchestrator handles authentication
|
|
17
17
|
* and API request execution.
|
|
18
18
|
*/
|
|
19
|
-
export class BitbucketClientImpl
|
|
19
|
+
export class BitbucketClientImpl
|
|
20
|
+
extends RestApiIntegrationClient
|
|
21
|
+
implements BitbucketClient {
|
|
20
22
|
// Inherits: name, pluginId, config, executeQuery, apiRequest()
|
|
21
23
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BitbucketClientImpl } from
|
|
2
|
-
export type { BitbucketClient } from
|
|
1
|
+
export { BitbucketClientImpl } from "./client.js";
|
|
2
|
+
export type { BitbucketClient } from "./types.js";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Bitbucket client types.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import type { BaseIntegrationClient } from
|
|
6
|
-
import type { SupportsApiRequest } from
|
|
5
|
+
import type { BaseIntegrationClient } from "../../types.js";
|
|
6
|
+
import type { SupportsApiRequest } from "../base/index.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Bitbucket client for API interactions.
|
|
@@ -13,7 +13,8 @@ import type { SupportsApiRequest } from '../base/index.js';
|
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```typescript
|
|
16
|
-
*
|
|
16
|
+
* // Declare in api(): integrations: { bitbucket: bitbucket(INTEGRATION_ID) }
|
|
17
|
+
* // In run(), access via ctx.integrations.bitbucket
|
|
17
18
|
*
|
|
18
19
|
* // Make API requests
|
|
19
20
|
* const ResponseSchema = z.object({
|
|
@@ -29,6 +30,7 @@ import type { SupportsApiRequest } from '../base/index.js';
|
|
|
29
30
|
* );
|
|
30
31
|
* ```
|
|
31
32
|
*/
|
|
32
|
-
export interface BitbucketClient
|
|
33
|
+
export interface BitbucketClient
|
|
34
|
+
extends BaseIntegrationClient, SupportsApiRequest {
|
|
33
35
|
// apiRequest() method inherited from SupportsApiRequest
|
|
34
36
|
}
|