@superblocksteam/sdk-api 2.0.93-next.7 → 2.0.94-next.0
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
|
@@ -4,8 +4,8 @@ Interact with Azure CosmosDB with full type safety and runtime validation.
|
|
|
4
4
|
|
|
5
5
|
## Methods
|
|
6
6
|
|
|
7
|
-
| Method
|
|
8
|
-
|
|
|
7
|
+
| Method | Description |
|
|
8
|
+
| ----------------------------- | ---------------------------------------------------- |
|
|
9
9
|
| `apiRequest(options, schema)` | Make any CosmosDB API request with schema validation |
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
@@ -13,7 +13,7 @@ Interact with Azure CosmosDB with full type safety and runtime validation.
|
|
|
13
13
|
### Query Documents
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { api, z } from "@superblocksteam/sdk-api";
|
|
16
|
+
import { api, z, cosmosdb } from "@superblocksteam/sdk-api";
|
|
17
17
|
|
|
18
18
|
// Integration ID from the integrations panel
|
|
19
19
|
const PROD_COSMOSDB = "a1b2c3d4-5678-90ab-cdef-cosmosdb0001";
|
|
@@ -24,27 +24,30 @@ const QueryResponseSchema = z.object({
|
|
|
24
24
|
id: z.string(),
|
|
25
25
|
name: z.string(),
|
|
26
26
|
email: z.string(),
|
|
27
|
-
})
|
|
27
|
+
}),
|
|
28
28
|
),
|
|
29
29
|
_count: z.number(),
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
export default api({
|
|
33
33
|
name: "CosmosDBExample",
|
|
34
|
+
integrations: {
|
|
35
|
+
cosmosdb: cosmosdb(PROD_COSMOSDB),
|
|
36
|
+
},
|
|
34
37
|
input: z.object({
|
|
35
38
|
status: z.string(),
|
|
36
39
|
}),
|
|
37
40
|
output: z.object({
|
|
38
|
-
users: z.array(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
users: z.array(
|
|
42
|
+
z.object({
|
|
43
|
+
id: z.string(),
|
|
44
|
+
name: z.string(),
|
|
45
|
+
email: z.string(),
|
|
46
|
+
}),
|
|
47
|
+
),
|
|
43
48
|
}),
|
|
44
49
|
async run(ctx, { status }) {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
const result = await cosmosdb.apiRequest(
|
|
50
|
+
const result = await ctx.integrations.cosmosdb.apiRequest(
|
|
48
51
|
{
|
|
49
52
|
method: "POST",
|
|
50
53
|
path: "/dbs/mydb/colls/users/docs",
|
|
@@ -56,7 +59,7 @@ export default api({
|
|
|
56
59
|
parameters: [{ name: "@status", value: status }],
|
|
57
60
|
},
|
|
58
61
|
},
|
|
59
|
-
{ response: QueryResponseSchema }
|
|
62
|
+
{ response: QueryResponseSchema },
|
|
60
63
|
);
|
|
61
64
|
|
|
62
65
|
return { users: result.Documents };
|
|
@@ -73,7 +76,7 @@ const GetDocumentResponseSchema = z.object({
|
|
|
73
76
|
email: z.string(),
|
|
74
77
|
});
|
|
75
78
|
|
|
76
|
-
const result = await cosmosdb.apiRequest(
|
|
79
|
+
const result = await ctx.integrations.cosmosdb.apiRequest(
|
|
77
80
|
{
|
|
78
81
|
method: "GET",
|
|
79
82
|
path: `/dbs/mydb/colls/users/docs/${documentId}`,
|
|
@@ -81,7 +84,7 @@ const result = await cosmosdb.apiRequest(
|
|
|
81
84
|
"x-ms-documentdb-partitionkey": `["${partitionKey}"]`,
|
|
82
85
|
},
|
|
83
86
|
},
|
|
84
|
-
{ response: GetDocumentResponseSchema }
|
|
87
|
+
{ response: GetDocumentResponseSchema },
|
|
85
88
|
);
|
|
86
89
|
```
|
|
87
90
|
|
|
@@ -94,7 +97,7 @@ const CreateResponseSchema = z.object({
|
|
|
94
97
|
_etag: z.string(),
|
|
95
98
|
});
|
|
96
99
|
|
|
97
|
-
const result = await cosmosdb.apiRequest(
|
|
100
|
+
const result = await ctx.integrations.cosmosdb.apiRequest(
|
|
98
101
|
{
|
|
99
102
|
method: "POST",
|
|
100
103
|
path: "/dbs/mydb/colls/users/docs",
|
|
@@ -108,7 +111,7 @@ const result = await cosmosdb.apiRequest(
|
|
|
108
111
|
partitionKey: partitionKey,
|
|
109
112
|
},
|
|
110
113
|
},
|
|
111
|
-
{ response: CreateResponseSchema }
|
|
114
|
+
{ response: CreateResponseSchema },
|
|
112
115
|
);
|
|
113
116
|
```
|
|
114
117
|
|
|
@@ -120,7 +123,7 @@ const ReplaceResponseSchema = z.object({
|
|
|
120
123
|
_etag: z.string(),
|
|
121
124
|
});
|
|
122
125
|
|
|
123
|
-
const result = await cosmosdb.apiRequest(
|
|
126
|
+
const result = await ctx.integrations.cosmosdb.apiRequest(
|
|
124
127
|
{
|
|
125
128
|
method: "PUT",
|
|
126
129
|
path: `/dbs/mydb/colls/users/docs/${documentId}`,
|
|
@@ -134,7 +137,7 @@ const result = await cosmosdb.apiRequest(
|
|
|
134
137
|
partitionKey: partitionKey,
|
|
135
138
|
},
|
|
136
139
|
},
|
|
137
|
-
{ response: ReplaceResponseSchema }
|
|
140
|
+
{ response: ReplaceResponseSchema },
|
|
138
141
|
);
|
|
139
142
|
```
|
|
140
143
|
|
|
@@ -143,7 +146,7 @@ const result = await cosmosdb.apiRequest(
|
|
|
143
146
|
```typescript
|
|
144
147
|
const DeleteResponseSchema = z.object({}).passthrough();
|
|
145
148
|
|
|
146
|
-
await cosmosdb.apiRequest(
|
|
149
|
+
await ctx.integrations.cosmosdb.apiRequest(
|
|
147
150
|
{
|
|
148
151
|
method: "DELETE",
|
|
149
152
|
path: `/dbs/mydb/colls/users/docs/${documentId}`,
|
|
@@ -151,7 +154,7 @@ await cosmosdb.apiRequest(
|
|
|
151
154
|
"x-ms-documentdb-partitionkey": `["${partitionKey}"]`,
|
|
152
155
|
},
|
|
153
156
|
},
|
|
154
|
-
{ response: DeleteResponseSchema }
|
|
157
|
+
{ response: DeleteResponseSchema },
|
|
155
158
|
);
|
|
156
159
|
```
|
|
157
160
|
|
|
@@ -181,7 +184,7 @@ headers: {
|
|
|
181
184
|
|
|
182
185
|
```typescript
|
|
183
186
|
// CORRECT - Response schema is required
|
|
184
|
-
await cosmosdb.apiRequest(
|
|
187
|
+
await ctx.integrations.cosmosdb.apiRequest(
|
|
185
188
|
{ method: "POST", path: "/...", body: { ... } },
|
|
186
189
|
{ response: ResponseSchema }
|
|
187
190
|
);
|
|
@@ -193,7 +196,7 @@ await cosmosdb.apiRequest(
|
|
|
193
196
|
import { RestApiValidationError } from "@superblocksteam/sdk-api";
|
|
194
197
|
|
|
195
198
|
try {
|
|
196
|
-
const result = await cosmosdb.apiRequest(
|
|
199
|
+
const result = await ctx.integrations.cosmosdb.apiRequest(
|
|
197
200
|
{ method: "POST", path: "/...", body: { ... } },
|
|
198
201
|
{ response: ResponseSchema }
|
|
199
202
|
);
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
* upsert, delete) against CosmosDB containers.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { z } from
|
|
10
|
-
import type { PartialMessage } from
|
|
11
|
-
import type { Plugin as CosmosDBPlugin } from
|
|
12
|
-
import type { IntegrationConfig, IntegrationClientImpl } from
|
|
13
|
-
import type { QueryExecutor } from
|
|
14
|
-
import { RestApiValidationError } from
|
|
15
|
-
import { IntegrationError } from
|
|
16
|
-
import type { CosmosDBClient, CosmosDBQueryOptions } from
|
|
9
|
+
import type { z } from "zod";
|
|
10
|
+
import type { PartialMessage } from "@bufbuild/protobuf";
|
|
11
|
+
import type { Plugin as CosmosDBPlugin } from "@superblocksteam/types/dist/src/plugins/cosmosdb/v1/plugin_pb";
|
|
12
|
+
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
13
|
+
import type { QueryExecutor } from "../registry.js";
|
|
14
|
+
import { RestApiValidationError } from "../../errors.js";
|
|
15
|
+
import { IntegrationError } from "../../runtime/errors.js";
|
|
16
|
+
import type { CosmosDBClient, CosmosDBQueryOptions } from "./types.js";
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* CosmosDB request type derived from proto definition.
|
|
@@ -26,7 +26,9 @@ type CosmosDBRequest = PartialMessage<CosmosDBPlugin>;
|
|
|
26
26
|
* Communicates with the orchestrator using the native CosmosDB plugin
|
|
27
27
|
* proto format, supporting SQL queries and point operations.
|
|
28
28
|
*/
|
|
29
|
-
export class CosmosDBClientImpl
|
|
29
|
+
export class CosmosDBClientImpl
|
|
30
|
+
implements CosmosDBClient, IntegrationClientImpl
|
|
31
|
+
{
|
|
30
32
|
readonly config: IntegrationConfig;
|
|
31
33
|
private readonly executeQuery: QueryExecutor;
|
|
32
34
|
|
|
@@ -91,10 +93,10 @@ export class CosmosDBClientImpl implements CosmosDBClient, IntegrationClientImpl
|
|
|
91
93
|
): Promise<T> {
|
|
92
94
|
const request: CosmosDBRequest = {
|
|
93
95
|
cosmosdbAction: {
|
|
94
|
-
case:
|
|
96
|
+
case: "sql",
|
|
95
97
|
value: {
|
|
96
98
|
action: {
|
|
97
|
-
case:
|
|
99
|
+
case: "singleton",
|
|
98
100
|
value: {
|
|
99
101
|
containerId,
|
|
100
102
|
query: sql,
|
|
@@ -106,7 +108,7 @@ export class CosmosDBClientImpl implements CosmosDBClient, IntegrationClientImpl
|
|
|
106
108
|
},
|
|
107
109
|
};
|
|
108
110
|
|
|
109
|
-
const result = await this.exec(request,
|
|
111
|
+
const result = await this.exec(request, "query");
|
|
110
112
|
return this.validate(result, schema);
|
|
111
113
|
}
|
|
112
114
|
|
|
@@ -118,18 +120,18 @@ export class CosmosDBClientImpl implements CosmosDBClient, IntegrationClientImpl
|
|
|
118
120
|
): Promise<T> {
|
|
119
121
|
const request: CosmosDBRequest = {
|
|
120
122
|
cosmosdbAction: {
|
|
121
|
-
case:
|
|
123
|
+
case: "pointOperation",
|
|
122
124
|
value: {
|
|
123
125
|
containerId,
|
|
124
126
|
action: {
|
|
125
|
-
case:
|
|
127
|
+
case: "read",
|
|
126
128
|
value: { id, partitionKey },
|
|
127
129
|
},
|
|
128
130
|
},
|
|
129
131
|
},
|
|
130
132
|
};
|
|
131
133
|
|
|
132
|
-
const result = await this.exec(request,
|
|
134
|
+
const result = await this.exec(request, "read");
|
|
133
135
|
return this.validate(result, schema);
|
|
134
136
|
}
|
|
135
137
|
|
|
@@ -140,13 +142,13 @@ export class CosmosDBClientImpl implements CosmosDBClient, IntegrationClientImpl
|
|
|
140
142
|
): Promise<unknown> {
|
|
141
143
|
const request: CosmosDBRequest = {
|
|
142
144
|
cosmosdbAction: {
|
|
143
|
-
case:
|
|
145
|
+
case: "pointOperation",
|
|
144
146
|
value: {
|
|
145
147
|
containerId,
|
|
146
148
|
action: {
|
|
147
|
-
case:
|
|
149
|
+
case: "create",
|
|
148
150
|
value: {
|
|
149
|
-
body: typeof body ===
|
|
151
|
+
body: typeof body === "string" ? body : JSON.stringify(body),
|
|
150
152
|
partitionKey,
|
|
151
153
|
},
|
|
152
154
|
},
|
|
@@ -154,7 +156,7 @@ export class CosmosDBClientImpl implements CosmosDBClient, IntegrationClientImpl
|
|
|
154
156
|
},
|
|
155
157
|
};
|
|
156
158
|
|
|
157
|
-
return this.exec(request,
|
|
159
|
+
return this.exec(request, "create");
|
|
158
160
|
}
|
|
159
161
|
|
|
160
162
|
async replace(
|
|
@@ -164,13 +166,13 @@ export class CosmosDBClientImpl implements CosmosDBClient, IntegrationClientImpl
|
|
|
164
166
|
): Promise<unknown> {
|
|
165
167
|
const request: CosmosDBRequest = {
|
|
166
168
|
cosmosdbAction: {
|
|
167
|
-
case:
|
|
169
|
+
case: "pointOperation",
|
|
168
170
|
value: {
|
|
169
171
|
containerId,
|
|
170
172
|
action: {
|
|
171
|
-
case:
|
|
173
|
+
case: "replace",
|
|
172
174
|
value: {
|
|
173
|
-
body: typeof body ===
|
|
175
|
+
body: typeof body === "string" ? body : JSON.stringify(body),
|
|
174
176
|
partitionKey,
|
|
175
177
|
},
|
|
176
178
|
},
|
|
@@ -178,7 +180,7 @@ export class CosmosDBClientImpl implements CosmosDBClient, IntegrationClientImpl
|
|
|
178
180
|
},
|
|
179
181
|
};
|
|
180
182
|
|
|
181
|
-
return this.exec(request,
|
|
183
|
+
return this.exec(request, "replace");
|
|
182
184
|
}
|
|
183
185
|
|
|
184
186
|
async upsert(
|
|
@@ -188,13 +190,13 @@ export class CosmosDBClientImpl implements CosmosDBClient, IntegrationClientImpl
|
|
|
188
190
|
): Promise<unknown> {
|
|
189
191
|
const request: CosmosDBRequest = {
|
|
190
192
|
cosmosdbAction: {
|
|
191
|
-
case:
|
|
193
|
+
case: "pointOperation",
|
|
192
194
|
value: {
|
|
193
195
|
containerId,
|
|
194
196
|
action: {
|
|
195
|
-
case:
|
|
197
|
+
case: "upsert",
|
|
196
198
|
value: {
|
|
197
|
-
body: typeof body ===
|
|
199
|
+
body: typeof body === "string" ? body : JSON.stringify(body),
|
|
198
200
|
partitionKey,
|
|
199
201
|
},
|
|
200
202
|
},
|
|
@@ -202,7 +204,7 @@ export class CosmosDBClientImpl implements CosmosDBClient, IntegrationClientImpl
|
|
|
202
204
|
},
|
|
203
205
|
};
|
|
204
206
|
|
|
205
|
-
return this.exec(request,
|
|
207
|
+
return this.exec(request, "upsert");
|
|
206
208
|
}
|
|
207
209
|
|
|
208
210
|
async deleteItem(
|
|
@@ -212,17 +214,17 @@ export class CosmosDBClientImpl implements CosmosDBClient, IntegrationClientImpl
|
|
|
212
214
|
): Promise<unknown> {
|
|
213
215
|
const request: CosmosDBRequest = {
|
|
214
216
|
cosmosdbAction: {
|
|
215
|
-
case:
|
|
217
|
+
case: "pointOperation",
|
|
216
218
|
value: {
|
|
217
219
|
containerId,
|
|
218
220
|
action: {
|
|
219
|
-
case:
|
|
221
|
+
case: "delete",
|
|
220
222
|
value: { id, partitionKey },
|
|
221
223
|
},
|
|
222
224
|
},
|
|
223
225
|
},
|
|
224
226
|
};
|
|
225
227
|
|
|
226
|
-
return this.exec(request,
|
|
228
|
+
return this.exec(request, "delete");
|
|
227
229
|
}
|
|
228
230
|
}
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export type { CosmosDBClient, CosmosDBQueryOptions } from
|
|
8
|
-
export { CosmosDBClientImpl } from
|
|
7
|
+
export type { CosmosDBClient, CosmosDBQueryOptions } from "./types.js";
|
|
8
|
+
export { CosmosDBClientImpl } from "./client.js";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* CosmosDB client types.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import type { z } from
|
|
6
|
-
import type { BaseIntegrationClient } from
|
|
5
|
+
import type { z } from "zod";
|
|
6
|
+
import type { BaseIntegrationClient } from "../../types.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Options for CosmosDB SQL queries.
|
|
@@ -23,7 +23,8 @@ export interface CosmosDBQueryOptions {
|
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```typescript
|
|
26
|
-
*
|
|
26
|
+
* // Declare in api(): integrations: { cosmos: cosmosdb(INTEGRATION_ID) }
|
|
27
|
+
* // In run(), access via ctx.integrations.cosmos
|
|
27
28
|
*
|
|
28
29
|
* // SQL query
|
|
29
30
|
* const users = await cosmos.query(
|
|
@@ -4,19 +4,19 @@ Interact with Couchbase databases with full type safety and runtime validation.
|
|
|
4
4
|
|
|
5
5
|
## Methods
|
|
6
6
|
|
|
7
|
-
| Method
|
|
8
|
-
|
|
|
7
|
+
| Method | Description |
|
|
8
|
+
| ------------------------------------- | -------------------------------------------- |
|
|
9
9
|
| `query(bucket, sql, schema, params?)` | Execute a SQL++ query with schema validation |
|
|
10
|
-
| `insert(key, value, identifier)`
|
|
11
|
-
| `get(key, schema, identifier)`
|
|
12
|
-
| `remove(key, identifier)`
|
|
10
|
+
| `insert(key, value, identifier)` | Insert a document into a collection |
|
|
11
|
+
| `get(key, schema, identifier)` | Get a document by key with schema validation |
|
|
12
|
+
| `remove(key, identifier)` | Remove a document by key |
|
|
13
13
|
|
|
14
14
|
## Usage
|
|
15
15
|
|
|
16
16
|
### SQL++ Query
|
|
17
17
|
|
|
18
18
|
```typescript
|
|
19
|
-
import { api, z } from "@superblocksteam/sdk-api";
|
|
19
|
+
import { api, z, couchbase } from "@superblocksteam/sdk-api";
|
|
20
20
|
|
|
21
21
|
// Integration ID from the integrations panel
|
|
22
22
|
const PROD_COUCHBASE = "a1b2c3d4-5678-90ab-cdef-couchbase001";
|
|
@@ -29,6 +29,9 @@ const UserSchema = z.object({
|
|
|
29
29
|
|
|
30
30
|
export default api({
|
|
31
31
|
name: "CouchbaseExample",
|
|
32
|
+
integrations: {
|
|
33
|
+
cb: couchbase(PROD_COUCHBASE),
|
|
34
|
+
},
|
|
32
35
|
input: z.object({
|
|
33
36
|
status: z.string(),
|
|
34
37
|
}),
|
|
@@ -36,9 +39,7 @@ export default api({
|
|
|
36
39
|
users: z.array(UserSchema),
|
|
37
40
|
}),
|
|
38
41
|
async run(ctx, { status }) {
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
const users = await cb.query(
|
|
42
|
+
const users = await ctx.integrations.cb.query(
|
|
42
43
|
"my-bucket",
|
|
43
44
|
`SELECT META().id, name, email FROM bucket WHERE status = "${status}"`,
|
|
44
45
|
UserSchema,
|
|
@@ -52,7 +53,7 @@ export default api({
|
|
|
52
53
|
### Parameterized Query
|
|
53
54
|
|
|
54
55
|
```typescript
|
|
55
|
-
const users = await cb.query(
|
|
56
|
+
const users = await ctx.integrations.cb.query(
|
|
56
57
|
"my-bucket",
|
|
57
58
|
"SELECT META().id, name, email FROM bucket WHERE status = $1",
|
|
58
59
|
UserSchema,
|
|
@@ -63,7 +64,7 @@ const users = await cb.query(
|
|
|
63
64
|
### Insert Document
|
|
64
65
|
|
|
65
66
|
```typescript
|
|
66
|
-
await cb.insert(
|
|
67
|
+
await ctx.integrations.cb.insert(
|
|
67
68
|
"user::123",
|
|
68
69
|
{ name: "Alice", email: "alice@example.com", status: "active" },
|
|
69
70
|
{ bucket: "my-bucket", scope: "_default", collection: "_default" },
|
|
@@ -79,33 +80,46 @@ const UserSchema = z.object({
|
|
|
79
80
|
status: z.string(),
|
|
80
81
|
});
|
|
81
82
|
|
|
82
|
-
const user = await cb.get(
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
);
|
|
83
|
+
const user = await ctx.integrations.cb.get("user::123", UserSchema, {
|
|
84
|
+
bucket: "my-bucket",
|
|
85
|
+
scope: "_default",
|
|
86
|
+
collection: "_default",
|
|
87
|
+
});
|
|
87
88
|
```
|
|
88
89
|
|
|
89
90
|
### Remove Document
|
|
90
91
|
|
|
91
92
|
```typescript
|
|
92
|
-
await cb.remove(
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
await ctx.integrations.cb.remove("user::123", {
|
|
94
|
+
bucket: "my-bucket",
|
|
95
|
+
scope: "_default",
|
|
96
|
+
collection: "_default",
|
|
97
|
+
});
|
|
96
98
|
```
|
|
97
99
|
|
|
98
100
|
## Error Handling
|
|
99
101
|
|
|
100
102
|
```typescript
|
|
101
|
-
import {
|
|
103
|
+
import {
|
|
104
|
+
QueryValidationError,
|
|
105
|
+
RestApiValidationError,
|
|
106
|
+
} from "@superblocksteam/sdk-api";
|
|
102
107
|
|
|
103
108
|
try {
|
|
104
|
-
const users = await cb.query(
|
|
109
|
+
const users = await ctx.integrations.cb.query(
|
|
110
|
+
"my-bucket",
|
|
111
|
+
"SELECT * FROM bucket",
|
|
112
|
+
UserSchema,
|
|
113
|
+
);
|
|
105
114
|
} catch (error) {
|
|
106
115
|
if (error instanceof QueryValidationError) {
|
|
107
116
|
// Query result row failed schema validation
|
|
108
|
-
console.error(
|
|
117
|
+
console.error(
|
|
118
|
+
"Row",
|
|
119
|
+
error.details.rowIndex,
|
|
120
|
+
"failed:",
|
|
121
|
+
error.details.errors,
|
|
122
|
+
);
|
|
109
123
|
}
|
|
110
124
|
if (error instanceof RestApiValidationError) {
|
|
111
125
|
// Document get result failed schema validation
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
* get, and remove operations against Couchbase buckets.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { z } from
|
|
10
|
-
import type { PartialMessage } from
|
|
11
|
-
import type { Plugin as CouchbasePlugin } from
|
|
12
|
-
import type { IntegrationConfig, IntegrationClientImpl } from
|
|
13
|
-
import type { QueryExecutor } from
|
|
14
|
-
import { QueryValidationError, RestApiValidationError } from
|
|
15
|
-
import { IntegrationError } from
|
|
16
|
-
import { describeType } from
|
|
17
|
-
import type { CouchbaseClient, CouchbaseIdentifier } from
|
|
9
|
+
import type { z } from "zod";
|
|
10
|
+
import type { PartialMessage } from "@bufbuild/protobuf";
|
|
11
|
+
import type { Plugin as CouchbasePlugin } from "@superblocksteam/types/dist/src/plugins/couchbase/v1/plugin_pb";
|
|
12
|
+
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
13
|
+
import type { QueryExecutor } from "../registry.js";
|
|
14
|
+
import { QueryValidationError, RestApiValidationError } from "../../errors.js";
|
|
15
|
+
import { IntegrationError } from "../../runtime/errors.js";
|
|
16
|
+
import { describeType } from "../utils.js";
|
|
17
|
+
import type { CouchbaseClient, CouchbaseIdentifier } from "./types.js";
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Couchbase request type derived from proto definition.
|
|
@@ -28,7 +28,9 @@ type CouchbaseRequest = PartialMessage<CouchbasePlugin>;
|
|
|
28
28
|
* proto format, supporting SQL++ queries and key-value document operations.
|
|
29
29
|
* All operations require a bucket name.
|
|
30
30
|
*/
|
|
31
|
-
export class CouchbaseClientImpl
|
|
31
|
+
export class CouchbaseClientImpl
|
|
32
|
+
implements CouchbaseClient, IntegrationClientImpl
|
|
33
|
+
{
|
|
32
34
|
readonly config: IntegrationConfig;
|
|
33
35
|
private readonly executeQuery: QueryExecutor;
|
|
34
36
|
|
|
@@ -55,7 +57,7 @@ export class CouchbaseClientImpl implements CouchbaseClient, IntegrationClientIm
|
|
|
55
57
|
const request: CouchbaseRequest = {
|
|
56
58
|
bucketName: bucket,
|
|
57
59
|
couchbaseAction: {
|
|
58
|
-
case:
|
|
60
|
+
case: "runSql",
|
|
59
61
|
value: {
|
|
60
62
|
sqlBody: sql,
|
|
61
63
|
parameters: hasParams ? JSON.stringify(params) : undefined,
|
|
@@ -64,12 +66,14 @@ export class CouchbaseClientImpl implements CouchbaseClient, IntegrationClientIm
|
|
|
64
66
|
};
|
|
65
67
|
|
|
66
68
|
try {
|
|
67
|
-
const result = await this.executeQuery(
|
|
69
|
+
const result = await this.executeQuery(
|
|
70
|
+
request as Record<string, unknown>,
|
|
71
|
+
);
|
|
68
72
|
|
|
69
73
|
if (!Array.isArray(result)) {
|
|
70
74
|
throw new IntegrationError(
|
|
71
75
|
this.config.name,
|
|
72
|
-
|
|
76
|
+
"query",
|
|
73
77
|
`Expected array result from Couchbase query, got: ${describeType(result)}`,
|
|
74
78
|
);
|
|
75
79
|
}
|
|
@@ -102,7 +106,7 @@ export class CouchbaseClientImpl implements CouchbaseClient, IntegrationClientIm
|
|
|
102
106
|
throw error;
|
|
103
107
|
}
|
|
104
108
|
|
|
105
|
-
throw new IntegrationError(this.config.name,
|
|
109
|
+
throw new IntegrationError(this.config.name, "query", error);
|
|
106
110
|
}
|
|
107
111
|
}
|
|
108
112
|
|
|
@@ -114,10 +118,10 @@ export class CouchbaseClientImpl implements CouchbaseClient, IntegrationClientIm
|
|
|
114
118
|
const request: CouchbaseRequest = {
|
|
115
119
|
bucketName: identifier.bucket,
|
|
116
120
|
couchbaseAction: {
|
|
117
|
-
case:
|
|
121
|
+
case: "insert",
|
|
118
122
|
value: {
|
|
119
123
|
key,
|
|
120
|
-
value: typeof value ===
|
|
124
|
+
value: typeof value === "string" ? value : JSON.stringify(value),
|
|
121
125
|
identifier: {
|
|
122
126
|
scope: identifier.scope,
|
|
123
127
|
collection: identifier.collection,
|
|
@@ -133,7 +137,7 @@ export class CouchbaseClientImpl implements CouchbaseClient, IntegrationClientIm
|
|
|
133
137
|
throw error;
|
|
134
138
|
}
|
|
135
139
|
|
|
136
|
-
throw new IntegrationError(this.config.name,
|
|
140
|
+
throw new IntegrationError(this.config.name, "insert", error);
|
|
137
141
|
}
|
|
138
142
|
}
|
|
139
143
|
|
|
@@ -145,7 +149,7 @@ export class CouchbaseClientImpl implements CouchbaseClient, IntegrationClientIm
|
|
|
145
149
|
const request: CouchbaseRequest = {
|
|
146
150
|
bucketName: identifier.bucket,
|
|
147
151
|
couchbaseAction: {
|
|
148
|
-
case:
|
|
152
|
+
case: "get",
|
|
149
153
|
value: {
|
|
150
154
|
key,
|
|
151
155
|
identifier: {
|
|
@@ -157,7 +161,9 @@ export class CouchbaseClientImpl implements CouchbaseClient, IntegrationClientIm
|
|
|
157
161
|
};
|
|
158
162
|
|
|
159
163
|
try {
|
|
160
|
-
const result = await this.executeQuery(
|
|
164
|
+
const result = await this.executeQuery(
|
|
165
|
+
request as Record<string, unknown>,
|
|
166
|
+
);
|
|
161
167
|
|
|
162
168
|
const parseResult = schema.safeParse(result);
|
|
163
169
|
|
|
@@ -180,7 +186,7 @@ export class CouchbaseClientImpl implements CouchbaseClient, IntegrationClientIm
|
|
|
180
186
|
throw error;
|
|
181
187
|
}
|
|
182
188
|
|
|
183
|
-
throw new IntegrationError(this.config.name,
|
|
189
|
+
throw new IntegrationError(this.config.name, "get", error);
|
|
184
190
|
}
|
|
185
191
|
}
|
|
186
192
|
|
|
@@ -188,7 +194,7 @@ export class CouchbaseClientImpl implements CouchbaseClient, IntegrationClientIm
|
|
|
188
194
|
const request: CouchbaseRequest = {
|
|
189
195
|
bucketName: identifier.bucket,
|
|
190
196
|
couchbaseAction: {
|
|
191
|
-
case:
|
|
197
|
+
case: "remove",
|
|
192
198
|
value: {
|
|
193
199
|
key,
|
|
194
200
|
identifier: {
|
|
@@ -206,7 +212,7 @@ export class CouchbaseClientImpl implements CouchbaseClient, IntegrationClientIm
|
|
|
206
212
|
throw error;
|
|
207
213
|
}
|
|
208
214
|
|
|
209
|
-
throw new IntegrationError(this.config.name,
|
|
215
|
+
throw new IntegrationError(this.config.name, "remove", error);
|
|
210
216
|
}
|
|
211
217
|
}
|
|
212
218
|
}
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export type { CouchbaseClient, CouchbaseIdentifier } from
|
|
8
|
-
export { CouchbaseClientImpl } from
|
|
7
|
+
export type { CouchbaseClient, CouchbaseIdentifier } from "./types.js";
|
|
8
|
+
export { CouchbaseClientImpl } from "./client.js";
|