@superblocksteam/sdk-api 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +351 -427
- package/dist/api/definition.d.ts +12 -7
- package/dist/api/definition.d.ts.map +1 -1
- package/dist/api/definition.js +19 -12
- package/dist/api/definition.js.map +1 -1
- package/dist/api/definition.test.js +39 -15
- package/dist/api/definition.test.js.map +1 -1
- package/dist/api/index.d.ts +0 -2
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +0 -2
- package/dist/api/index.js.map +1 -1
- package/dist/errors.d.ts +1 -45
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +1 -33
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +16 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -15
- package/dist/index.js.map +1 -1
- package/dist/integrations/anthropic/types.d.ts +3 -22
- package/dist/integrations/anthropic/types.d.ts.map +1 -1
- package/dist/integrations/athena/client.d.ts +1 -1
- package/dist/integrations/athena/client.d.ts.map +1 -1
- package/dist/integrations/athena/client.js.map +1 -1
- package/dist/integrations/athena/types.d.ts +2 -2
- package/dist/integrations/athena/types.d.ts.map +1 -1
- package/dist/integrations/base/graphql-integration-client.d.ts +8 -4
- package/dist/integrations/base/graphql-integration-client.d.ts.map +1 -1
- package/dist/integrations/base/graphql-integration-client.js +18 -5
- package/dist/integrations/base/graphql-integration-client.js.map +1 -1
- package/dist/integrations/base/index.d.ts +3 -2
- package/dist/integrations/base/index.d.ts.map +1 -1
- package/dist/integrations/base/index.js +1 -0
- package/dist/integrations/base/index.js.map +1 -1
- package/dist/integrations/base/rest-api-client-base.d.ts +48 -0
- package/dist/integrations/base/rest-api-client-base.d.ts.map +1 -0
- package/dist/integrations/base/rest-api-client-base.js +118 -0
- package/dist/integrations/base/rest-api-client-base.js.map +1 -0
- package/dist/integrations/base/rest-api-integration-client.d.ts +18 -66
- package/dist/integrations/base/rest-api-integration-client.d.ts.map +1 -1
- package/dist/integrations/base/rest-api-integration-client.js +38 -173
- package/dist/integrations/base/rest-api-integration-client.js.map +1 -1
- package/dist/integrations/base/types.d.ts +59 -59
- package/dist/integrations/base/types.d.ts.map +1 -1
- package/dist/integrations/base/types.js +23 -1
- package/dist/integrations/base/types.js.map +1 -1
- package/dist/integrations/bigquery/client.d.ts +1 -1
- package/dist/integrations/bigquery/client.d.ts.map +1 -1
- package/dist/integrations/bigquery/client.js.map +1 -1
- package/dist/integrations/bigquery/types.d.ts +3 -3
- package/dist/integrations/bigquery/types.d.ts.map +1 -1
- package/dist/integrations/box/types.d.ts +1 -1
- package/dist/integrations/cockroachdb/client.d.ts +1 -1
- package/dist/integrations/cockroachdb/client.d.ts.map +1 -1
- package/dist/integrations/cockroachdb/client.js.map +1 -1
- package/dist/integrations/cockroachdb/types.d.ts.map +1 -1
- package/dist/integrations/cosmosdb/client.d.ts +1 -1
- package/dist/integrations/cosmosdb/client.d.ts.map +1 -1
- package/dist/integrations/cosmosdb/client.js.map +1 -1
- package/dist/integrations/cosmosdb/client.test.js.map +1 -1
- package/dist/integrations/cosmosdb/types.d.ts.map +1 -1
- package/dist/integrations/databricks/client.d.ts +1 -1
- package/dist/integrations/databricks/client.d.ts.map +1 -1
- package/dist/integrations/databricks/client.js.map +1 -1
- package/dist/integrations/databricks/types.d.ts +3 -3
- package/dist/integrations/databricks/types.d.ts.map +1 -1
- package/dist/integrations/declarations.d.ts +36 -104
- package/dist/integrations/declarations.d.ts.map +1 -1
- package/dist/integrations/declarations.js +5 -68
- package/dist/integrations/declarations.js.map +1 -1
- package/dist/integrations/declarations.test.js.map +1 -1
- package/dist/integrations/documentation-resolver.test.d.ts +2 -0
- package/dist/integrations/documentation-resolver.test.d.ts.map +1 -0
- package/dist/integrations/documentation-resolver.test.js +774 -0
- package/dist/integrations/documentation-resolver.test.js.map +1 -0
- package/dist/integrations/documentation.d.ts +9 -0
- package/dist/integrations/documentation.d.ts.map +1 -0
- package/dist/integrations/documentation.js +300 -0
- package/dist/integrations/documentation.js.map +1 -0
- package/dist/integrations/documentation.test.d.ts +2 -0
- package/dist/integrations/documentation.test.d.ts.map +1 -0
- package/dist/integrations/documentation.test.js +81 -0
- package/dist/integrations/documentation.test.js.map +1 -0
- package/dist/integrations/dynamodb/client.d.ts +1 -1
- package/dist/integrations/dynamodb/client.d.ts.map +1 -1
- package/dist/integrations/dynamodb/client.js.map +1 -1
- package/dist/integrations/dynamodb/types.d.ts.map +1 -1
- package/dist/integrations/gcs/client.d.ts +1 -1
- package/dist/integrations/gcs/client.d.ts.map +1 -1
- package/dist/integrations/gcs/client.js.map +1 -1
- package/dist/integrations/gcs/types.d.ts.map +1 -1
- package/dist/integrations/googledrive/types.d.ts +1 -1
- package/dist/integrations/graphql/client.test.d.ts +15 -0
- package/dist/integrations/graphql/client.test.d.ts.map +1 -0
- package/dist/integrations/graphql/client.test.js +148 -0
- package/dist/integrations/graphql/client.test.js.map +1 -0
- package/dist/integrations/graphql/types.d.ts +22 -3
- package/dist/integrations/graphql/types.d.ts.map +1 -1
- package/dist/integrations/gsheets/client.d.ts +1 -1
- package/dist/integrations/gsheets/client.d.ts.map +1 -1
- package/dist/integrations/gsheets/client.js.map +1 -1
- package/dist/integrations/gsheets/types.d.ts.map +1 -1
- package/dist/integrations/index.d.ts +2 -12
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +2 -8
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/lakebase/client.d.ts +1 -1
- package/dist/integrations/lakebase/client.d.ts.map +1 -1
- package/dist/integrations/lakebase/client.js.map +1 -1
- package/dist/integrations/lakebase/types.d.ts +4 -4
- package/dist/integrations/lakebase/types.d.ts.map +1 -1
- package/dist/integrations/mariadb/client.d.ts +1 -1
- package/dist/integrations/mariadb/client.d.ts.map +1 -1
- package/dist/integrations/mariadb/client.js.map +1 -1
- package/dist/integrations/mariadb/types.d.ts +2 -2
- package/dist/integrations/mariadb/types.d.ts.map +1 -1
- package/dist/integrations/mongodb/client.d.ts +1 -1
- package/dist/integrations/mongodb/client.d.ts.map +1 -1
- package/dist/integrations/mongodb/client.js.map +1 -1
- package/dist/integrations/mongodb/types.d.ts.map +1 -1
- package/dist/integrations/mssql/client.d.ts +1 -1
- package/dist/integrations/mssql/client.d.ts.map +1 -1
- package/dist/integrations/mssql/client.js.map +1 -1
- package/dist/integrations/mssql/types.d.ts +2 -2
- package/dist/integrations/mssql/types.d.ts.map +1 -1
- package/dist/integrations/mysql/client.d.ts +1 -1
- package/dist/integrations/mysql/client.d.ts.map +1 -1
- package/dist/integrations/mysql/client.js.map +1 -1
- package/dist/integrations/mysql/types.d.ts +4 -4
- package/dist/integrations/mysql/types.d.ts.map +1 -1
- package/dist/integrations/openai_v2/types.d.ts +4 -22
- package/dist/integrations/openai_v2/types.d.ts.map +1 -1
- package/dist/integrations/oracledb/client.d.ts +1 -1
- package/dist/integrations/oracledb/client.d.ts.map +1 -1
- package/dist/integrations/oracledb/client.js.map +1 -1
- package/dist/integrations/oracledb/types.d.ts +2 -2
- package/dist/integrations/oracledb/types.d.ts.map +1 -1
- package/dist/integrations/postgres/client.d.ts +1 -8
- package/dist/integrations/postgres/client.d.ts.map +1 -1
- package/dist/integrations/postgres/client.js.map +1 -1
- package/dist/integrations/postgres/types.d.ts.map +1 -1
- package/dist/integrations/redshift/client.d.ts +1 -1
- package/dist/integrations/redshift/client.d.ts.map +1 -1
- package/dist/integrations/redshift/client.js.map +1 -1
- package/dist/integrations/redshift/types.d.ts.map +1 -1
- package/dist/integrations/registry.d.ts +6 -27
- package/dist/integrations/registry.d.ts.map +1 -1
- package/dist/integrations/registry.js +64 -88
- package/dist/integrations/registry.js.map +1 -1
- package/dist/integrations/registry.test.js +1 -3
- package/dist/integrations/registry.test.js.map +1 -1
- package/dist/integrations/restapiintegration/client.test.d.ts +12 -0
- package/dist/integrations/restapiintegration/client.test.d.ts.map +1 -0
- package/dist/integrations/restapiintegration/client.test.js +236 -0
- package/dist/integrations/restapiintegration/client.test.js.map +1 -0
- package/dist/integrations/restapiintegration/types.d.ts +2 -2
- package/dist/integrations/restapiintegration/types.d.ts.map +1 -1
- package/dist/integrations/s3/client.d.ts +1 -1
- package/dist/integrations/s3/client.d.ts.map +1 -1
- package/dist/integrations/s3/client.js.map +1 -1
- package/dist/integrations/s3/types.d.ts +3 -1
- package/dist/integrations/s3/types.d.ts.map +1 -1
- package/dist/integrations/salesforce/client.d.ts +1 -1
- package/dist/integrations/salesforce/client.d.ts.map +1 -1
- package/dist/integrations/salesforce/client.js.map +1 -1
- package/dist/integrations/salesforce/types.d.ts.map +1 -1
- package/dist/integrations/slack/client.d.ts +13 -9
- package/dist/integrations/slack/client.d.ts.map +1 -1
- package/dist/integrations/slack/client.js +60 -8
- package/dist/integrations/slack/client.js.map +1 -1
- package/dist/integrations/slack/client.test.d.ts +11 -0
- package/dist/integrations/slack/client.test.d.ts.map +1 -0
- package/dist/integrations/slack/client.test.js +368 -0
- package/dist/integrations/slack/client.test.js.map +1 -0
- package/dist/integrations/slack/index.d.ts +2 -1
- package/dist/integrations/slack/index.d.ts.map +1 -1
- package/dist/integrations/slack/index.js +1 -0
- package/dist/integrations/slack/index.js.map +1 -1
- package/dist/integrations/slack/types.d.ts +127 -28
- package/dist/integrations/slack/types.d.ts.map +1 -1
- package/dist/integrations/slack/types.js +27 -1
- package/dist/integrations/slack/types.js.map +1 -1
- package/dist/integrations/smtp/client.d.ts +1 -1
- package/dist/integrations/smtp/client.d.ts.map +1 -1
- package/dist/integrations/smtp/client.js.map +1 -1
- package/dist/integrations/snowflake/client.d.ts +3 -3
- package/dist/integrations/snowflake/client.d.ts.map +1 -1
- package/dist/integrations/snowflake/client.js +2 -2
- package/dist/integrations/snowflake/client.js.map +1 -1
- package/dist/integrations/snowflake/types.d.ts.map +1 -1
- package/dist/integrations/snowflakecortex/client.d.ts +1 -2
- package/dist/integrations/snowflakecortex/client.d.ts.map +1 -1
- package/dist/integrations/snowflakecortex/client.js +1 -2
- package/dist/integrations/snowflakecortex/client.js.map +1 -1
- package/dist/integrations/snowflakecortex/types.d.ts +3 -4
- package/dist/integrations/snowflakecortex/types.d.ts.map +1 -1
- package/dist/integrations/snowflakepostgres/client.d.ts +1 -1
- package/dist/integrations/snowflakepostgres/client.d.ts.map +1 -1
- package/dist/integrations/snowflakepostgres/client.js.map +1 -1
- package/dist/integrations/snowflakepostgres/types.d.ts.map +1 -1
- package/dist/runtime/context.d.ts +3 -3
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/context.js.map +1 -1
- package/dist/runtime/executor.d.ts +2 -2
- package/dist/runtime/index.d.ts +0 -3
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -6
- package/dist/runtime/index.js.map +1 -1
- package/dist/types.d.ts +15 -6
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/api/definition.test.ts +41 -15
- package/src/api/definition.ts +20 -13
- package/src/api/index.ts +0 -4
- package/src/errors.ts +1 -49
- package/src/index.ts +20 -61
- package/src/integrations/airtable/docs.manifest.json +5 -0
- package/src/integrations/anthropic/README.md +5 -101
- package/src/integrations/anthropic/docs.manifest.json +5 -0
- package/src/integrations/anthropic/types.ts +3 -29
- package/src/integrations/asana/README.md +12 -12
- package/src/integrations/asana/docs.manifest.json +5 -0
- package/src/integrations/athena/README.md +4 -4
- package/src/integrations/athena/client.ts +5 -3
- package/src/integrations/athena/docs.manifest.json +5 -0
- package/src/integrations/athena/types.ts +3 -2
- package/src/integrations/base/graphql-integration-client.ts +27 -5
- package/src/integrations/base/index.ts +3 -3
- package/src/integrations/base/rest-api-client-base.ts +158 -0
- package/src/integrations/base/rest-api-integration-client.ts +62 -237
- package/src/integrations/base/types.ts +68 -64
- package/src/integrations/bigquery/README.md +28 -3
- package/src/integrations/bigquery/client.ts +5 -3
- package/src/integrations/bigquery/docs.manifest.json +5 -0
- package/src/integrations/bigquery/types.ts +4 -3
- package/src/integrations/bitbucket/README.md +19 -19
- package/src/integrations/bitbucket/docs.manifest.json +5 -0
- package/src/integrations/box/README.md +24 -24
- package/src/integrations/box/docs.manifest.json +5 -0
- package/src/integrations/box/types.ts +1 -1
- package/src/integrations/circleci/README.md +18 -18
- package/src/integrations/circleci/docs.manifest.json +5 -0
- package/src/integrations/cockroachdb/client.ts +5 -3
- package/src/integrations/cockroachdb/docs.manifest.json +5 -0
- package/src/integrations/cockroachdb/types.ts +1 -0
- package/src/integrations/cohere/README.md +11 -11
- package/src/integrations/cohere/docs.manifest.json +5 -0
- package/src/integrations/confluence/docs.manifest.json +5 -0
- package/src/integrations/cosmosdb/client.test.ts +2 -1
- package/src/integrations/cosmosdb/client.ts +5 -3
- package/src/integrations/cosmosdb/docs.manifest.json +5 -0
- package/src/integrations/cosmosdb/types.ts +1 -0
- package/src/integrations/databricks/README.md +29 -4
- package/src/integrations/databricks/client.ts +5 -3
- package/src/integrations/databricks/docs.manifest.json +5 -0
- package/src/integrations/databricks/types.ts +4 -3
- package/src/integrations/datadog/docs.manifest.json +5 -0
- package/src/integrations/declarations.test.ts +1 -0
- package/src/integrations/declarations.ts +36 -136
- package/src/integrations/documentation-resolver.test.ts +893 -0
- package/src/integrations/documentation.test.ts +120 -0
- package/src/integrations/documentation.ts +473 -0
- package/src/integrations/dropbox/docs.manifest.json +5 -0
- package/src/integrations/dynamodb/client.ts +3 -2
- package/src/integrations/dynamodb/docs.manifest.json +5 -0
- package/src/integrations/dynamodb/types.ts +1 -0
- package/src/integrations/elasticsearch/docs.manifest.json +5 -0
- package/src/integrations/fireworks/README.md +43 -17
- package/src/integrations/fireworks/docs.manifest.json +5 -0
- package/src/integrations/front/docs.manifest.json +5 -0
- package/src/integrations/gcs/client.ts +5 -3
- package/src/integrations/gcs/docs.manifest.json +5 -0
- package/src/integrations/gcs/types.ts +1 -0
- package/src/integrations/gemini/docs.manifest.json +5 -0
- package/src/integrations/github/docs.manifest.json +5 -0
- package/src/integrations/googleanalytics/README.md +2 -2
- package/src/integrations/googleanalytics/docs.manifest.json +5 -0
- package/src/integrations/googledrive/README.md +27 -24
- package/src/integrations/googledrive/docs.manifest.json +5 -0
- package/src/integrations/googledrive/types.ts +1 -1
- package/src/integrations/graphql/README.md +2 -2
- package/src/integrations/graphql/client.test.ts +220 -0
- package/src/integrations/graphql/docs.manifest.json +10 -0
- package/src/integrations/graphql/overlays/dynamic-headers.md +34 -0
- package/src/integrations/graphql/types.ts +23 -1
- package/src/integrations/groq/README.md +49 -42
- package/src/integrations/groq/docs.manifest.json +5 -0
- package/src/integrations/gsheets/README.md +2 -2
- package/src/integrations/gsheets/client.ts +5 -3
- package/src/integrations/gsheets/docs.manifest.json +5 -0
- package/src/integrations/gsheets/types.ts +1 -0
- package/src/integrations/hubspot/docs.manifest.json +5 -0
- package/src/integrations/index.ts +1 -52
- package/src/integrations/intercom/docs.manifest.json +5 -0
- package/src/integrations/jira/docs.manifest.json +5 -0
- package/src/integrations/lakebase/README.md +242 -0
- package/src/integrations/lakebase/client.ts +6 -4
- package/src/integrations/lakebase/docs.manifest.json +5 -0
- package/src/integrations/lakebase/types.ts +5 -4
- package/src/integrations/launchdarkly/README.md +2 -2
- package/src/integrations/launchdarkly/docs.manifest.json +5 -0
- package/src/integrations/mariadb/README.md +3 -3
- package/src/integrations/mariadb/client.ts +5 -3
- package/src/integrations/mariadb/docs.manifest.json +5 -0
- package/src/integrations/mariadb/types.ts +3 -2
- package/src/integrations/mistral/README.md +39 -13
- package/src/integrations/mistral/docs.manifest.json +5 -0
- package/src/integrations/mongodb/README.md +65 -12
- package/src/integrations/mongodb/client.ts +5 -3
- package/src/integrations/mongodb/docs.manifest.json +5 -0
- package/src/integrations/mongodb/types.ts +1 -0
- package/src/integrations/mssql/README.md +3 -3
- package/src/integrations/mssql/client.ts +5 -3
- package/src/integrations/mssql/docs.manifest.json +5 -0
- package/src/integrations/mssql/types.ts +3 -2
- package/src/integrations/mysql/README.md +4 -4
- package/src/integrations/mysql/client.ts +5 -3
- package/src/integrations/mysql/docs.manifest.json +5 -0
- package/src/integrations/mysql/types.ts +5 -4
- package/src/integrations/notion/docs.manifest.json +5 -0
- package/src/integrations/openai_v2/README.md +44 -116
- package/src/integrations/openai_v2/docs.manifest.json +5 -0
- package/src/integrations/openai_v2/types.ts +4 -29
- package/src/integrations/oracledb/README.md +3 -3
- package/src/integrations/oracledb/client.ts +5 -3
- package/src/integrations/oracledb/docs.manifest.json +5 -0
- package/src/integrations/oracledb/types.ts +3 -2
- package/src/integrations/pagerduty/README.md +2 -2
- package/src/integrations/pagerduty/docs.manifest.json +5 -0
- package/src/integrations/perplexity/README.md +39 -47
- package/src/integrations/perplexity/docs.manifest.json +5 -0
- package/src/integrations/postgres/client.ts +7 -5
- package/src/integrations/postgres/docs.manifest.json +5 -0
- package/src/integrations/postgres/types.ts +1 -0
- package/src/integrations/redshift/client.ts +5 -3
- package/src/integrations/redshift/docs.manifest.json +5 -0
- package/src/integrations/redshift/types.ts +1 -0
- package/src/integrations/registry.test.ts +2 -3
- package/src/integrations/registry.ts +69 -188
- package/src/integrations/restapiintegration/README.md +320 -0
- package/src/integrations/restapiintegration/client.test.ts +359 -0
- package/src/integrations/restapiintegration/docs.manifest.json +14 -0
- package/src/integrations/restapiintegration/overlays/response-types-unsupported.md +5 -0
- package/src/integrations/restapiintegration/overlays/response-types.md +26 -0
- package/src/integrations/restapiintegration/types.ts +2 -8
- package/src/integrations/s3/client.ts +5 -3
- package/src/integrations/s3/docs.manifest.json +5 -0
- package/src/integrations/s3/types.ts +4 -1
- package/src/integrations/salesforce/README.md +11 -9
- package/src/integrations/salesforce/client.ts +3 -2
- package/src/integrations/salesforce/docs.manifest.json +5 -0
- package/src/integrations/salesforce/types.ts +1 -0
- package/src/integrations/segment/docs.manifest.json +5 -0
- package/src/integrations/sendgrid/README.md +2 -2
- package/src/integrations/sendgrid/docs.manifest.json +5 -0
- package/src/integrations/slack/README.md +62 -19
- package/src/integrations/slack/client.test.ts +553 -0
- package/src/integrations/slack/client.ts +92 -12
- package/src/integrations/slack/docs.manifest.json +5 -0
- package/src/integrations/slack/index.ts +6 -1
- package/src/integrations/slack/types.ts +142 -29
- package/src/integrations/smtp/README.md +220 -0
- package/src/integrations/smtp/client.ts +4 -2
- package/src/integrations/smtp/docs.manifest.json +5 -0
- package/src/integrations/snowflake/client.ts +7 -5
- package/src/integrations/snowflake/docs.manifest.json +5 -0
- package/src/integrations/snowflake/types.ts +1 -0
- package/src/integrations/snowflakecortex/README.md +167 -0
- package/src/integrations/snowflakecortex/client.ts +2 -3
- package/src/integrations/snowflakecortex/docs.manifest.json +5 -0
- package/src/integrations/snowflakecortex/types.ts +3 -11
- package/src/integrations/snowflakepostgres/README.md +233 -0
- package/src/integrations/snowflakepostgres/client.ts +1 -1
- package/src/integrations/snowflakepostgres/docs.manifest.json +5 -0
- package/src/integrations/snowflakepostgres/types.ts +1 -0
- package/src/integrations/stabilityai/README.md +2 -2
- package/src/integrations/stabilityai/docs.manifest.json +5 -0
- package/src/integrations/stripe/docs.manifest.json +5 -0
- package/src/integrations/superblocks-ocr/docs.manifest.json +5 -0
- package/src/integrations/twilio/docs.manifest.json +5 -0
- package/src/integrations/zendesk/docs.manifest.json +5 -0
- package/src/integrations/zoom/README.md +15 -15
- package/src/integrations/zoom/docs.manifest.json +5 -0
- package/src/runtime/context.ts +11 -11
- package/src/runtime/executor.ts +2 -2
- package/src/runtime/index.ts +1 -23
- package/src/types.ts +16 -6
- package/dist/api/streaming.d.ts +0 -229
- package/dist/api/streaming.d.ts.map +0 -1
- package/dist/api/streaming.js +0 -107
- package/dist/api/streaming.js.map +0 -1
- package/dist/api/streaming.test.d.ts +0 -5
- package/dist/api/streaming.test.d.ts.map +0 -1
- package/dist/api/streaming.test.js +0 -364
- package/dist/api/streaming.test.js.map +0 -1
- package/dist/integrations/couchbase/client.d.ts +0 -36
- package/dist/integrations/couchbase/client.d.ts.map +0 -1
- package/dist/integrations/couchbase/client.js +0 -148
- package/dist/integrations/couchbase/client.js.map +0 -1
- package/dist/integrations/couchbase/index.d.ts +0 -8
- package/dist/integrations/couchbase/index.d.ts.map +0 -1
- package/dist/integrations/couchbase/index.js +0 -7
- package/dist/integrations/couchbase/index.js.map +0 -1
- package/dist/integrations/couchbase/types.d.ts +0 -100
- package/dist/integrations/couchbase/types.d.ts.map +0 -1
- package/dist/integrations/couchbase/types.js +0 -5
- package/dist/integrations/couchbase/types.js.map +0 -1
- package/dist/integrations/kafka/client.d.ts +0 -25
- package/dist/integrations/kafka/client.d.ts.map +0 -1
- package/dist/integrations/kafka/client.js +0 -124
- package/dist/integrations/kafka/client.js.map +0 -1
- package/dist/integrations/kafka/index.d.ts +0 -8
- package/dist/integrations/kafka/index.d.ts.map +0 -1
- package/dist/integrations/kafka/index.js +0 -7
- package/dist/integrations/kafka/index.js.map +0 -1
- package/dist/integrations/kafka/types.d.ts +0 -113
- package/dist/integrations/kafka/types.d.ts.map +0 -1
- package/dist/integrations/kafka/types.js +0 -5
- package/dist/integrations/kafka/types.js.map +0 -1
- package/dist/integrations/kinesis/client.d.ts +0 -31
- package/dist/integrations/kinesis/client.d.ts.map +0 -1
- package/dist/integrations/kinesis/client.js +0 -101
- package/dist/integrations/kinesis/client.js.map +0 -1
- package/dist/integrations/kinesis/index.d.ts +0 -8
- package/dist/integrations/kinesis/index.d.ts.map +0 -1
- package/dist/integrations/kinesis/index.js +0 -7
- package/dist/integrations/kinesis/index.js.map +0 -1
- package/dist/integrations/kinesis/types.d.ts +0 -97
- package/dist/integrations/kinesis/types.d.ts.map +0 -1
- package/dist/integrations/kinesis/types.js +0 -7
- package/dist/integrations/kinesis/types.js.map +0 -1
- package/dist/integrations/python/client.d.ts +0 -42
- package/dist/integrations/python/client.d.ts.map +0 -1
- package/dist/integrations/python/client.js +0 -89
- package/dist/integrations/python/client.js.map +0 -1
- package/dist/integrations/python/client.test.d.ts +0 -5
- package/dist/integrations/python/client.test.d.ts.map +0 -1
- package/dist/integrations/python/client.test.js +0 -214
- package/dist/integrations/python/client.test.js.map +0 -1
- package/dist/integrations/python/index.d.ts +0 -6
- package/dist/integrations/python/index.d.ts.map +0 -1
- package/dist/integrations/python/index.js +0 -5
- package/dist/integrations/python/index.js.map +0 -1
- package/dist/integrations/python/types.d.ts +0 -85
- package/dist/integrations/python/types.d.ts.map +0 -1
- package/dist/integrations/python/types.js +0 -5
- package/dist/integrations/python/types.js.map +0 -1
- package/dist/integrations/redis/client.d.ts +0 -43
- package/dist/integrations/redis/client.d.ts.map +0 -1
- package/dist/integrations/redis/client.js +0 -142
- package/dist/integrations/redis/client.js.map +0 -1
- package/dist/integrations/redis/index.d.ts +0 -8
- package/dist/integrations/redis/index.d.ts.map +0 -1
- package/dist/integrations/redis/index.js +0 -7
- package/dist/integrations/redis/index.js.map +0 -1
- package/dist/integrations/redis/types.d.ts +0 -137
- package/dist/integrations/redis/types.d.ts.map +0 -1
- package/dist/integrations/redis/types.js +0 -5
- package/dist/integrations/redis/types.js.map +0 -1
- package/dist/runtime/execute.d.ts +0 -128
- package/dist/runtime/execute.d.ts.map +0 -1
- package/dist/runtime/execute.js +0 -84
- package/dist/runtime/execute.js.map +0 -1
- package/dist/runtime/streaming-context.d.ts +0 -49
- package/dist/runtime/streaming-context.d.ts.map +0 -1
- package/dist/runtime/streaming-context.js +0 -71
- package/dist/runtime/streaming-context.js.map +0 -1
- package/dist/runtime/streaming-executor.d.ts +0 -159
- package/dist/runtime/streaming-executor.d.ts.map +0 -1
- package/dist/runtime/streaming-executor.js +0 -229
- package/dist/runtime/streaming-executor.js.map +0 -1
- package/src/api/streaming.test.ts +0 -432
- package/src/api/streaming.ts +0 -302
- package/src/integrations/couchbase/README.md +0 -138
- package/src/integrations/couchbase/client.ts +0 -224
- package/src/integrations/couchbase/index.ts +0 -8
- package/src/integrations/couchbase/types.ts +0 -125
- package/src/integrations/kafka/README.md +0 -144
- package/src/integrations/kafka/client.ts +0 -215
- package/src/integrations/kafka/index.ts +0 -14
- package/src/integrations/kafka/types.ts +0 -127
- package/src/integrations/kinesis/README.md +0 -153
- package/src/integrations/kinesis/client.ts +0 -146
- package/src/integrations/kinesis/index.ts +0 -14
- package/src/integrations/kinesis/types.ts +0 -114
- package/src/integrations/python/README.md +0 -566
- package/src/integrations/python/client.test.ts +0 -340
- package/src/integrations/python/client.ts +0 -134
- package/src/integrations/python/index.ts +0 -6
- package/src/integrations/python/types.ts +0 -91
- package/src/integrations/redis/README.md +0 -200
- package/src/integrations/redis/client.ts +0 -207
- package/src/integrations/redis/index.ts +0 -8
- package/src/integrations/redis/types.ts +0 -166
- package/src/runtime/execute.ts +0 -221
- package/src/runtime/streaming-context.ts +0 -164
- package/src/runtime/streaming-executor.ts +0 -367
|
@@ -1,81 +1,51 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Generic REST API Integration client with Zod response validation.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Extends RestApiClientBase with an apiRequest() that validates the
|
|
5
|
+
* full response against a caller-supplied Zod schema and throws
|
|
6
|
+
* RestApiValidationError on mismatch. When no response schema is
|
|
7
|
+
* provided, the raw result is returned without validation — useful for
|
|
8
|
+
* non-JSON responses (e.g. XML), which can alternatively be validated
|
|
9
|
+
* with a schema matching the decoded value (e.g. z.string()).
|
|
5
10
|
*/
|
|
6
|
-
import {
|
|
11
|
+
import { z } from "zod";
|
|
12
|
+
import { RestApiValidationError } from "../../errors.js";
|
|
13
|
+
import { RestApiClientBase } from "./rest-api-client-base.js";
|
|
7
14
|
/**
|
|
8
15
|
* Base implementation for REST API Integration clients.
|
|
9
16
|
*
|
|
10
|
-
* All OpenAPI-based integration clients
|
|
11
|
-
*
|
|
12
|
-
*
|
|
17
|
+
* All OpenAPI-based integration clients (except those with
|
|
18
|
+
* integration-specific response handling) extend this class to
|
|
19
|
+
* inherit the generic apiRequest() method with runtime Zod validation.
|
|
13
20
|
*/
|
|
14
|
-
export class RestApiIntegrationClient {
|
|
15
|
-
name;
|
|
16
|
-
pluginId;
|
|
17
|
-
config;
|
|
18
|
-
executeQuery;
|
|
19
|
-
executeStreamingQuery;
|
|
20
|
-
constructor(config, executeQuery, executeStreamingQuery) {
|
|
21
|
-
this.name = config.name;
|
|
22
|
-
this.pluginId = config.pluginId;
|
|
23
|
-
this.config = config;
|
|
24
|
-
this.executeQuery = executeQuery;
|
|
25
|
-
this.executeStreamingQuery = executeStreamingQuery;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Helper to create a Property object for params.
|
|
29
|
-
*/
|
|
30
|
-
createParam(key, value) {
|
|
31
|
-
return {
|
|
32
|
-
key,
|
|
33
|
-
value: typeof value === "string" ? value : JSON.stringify(value),
|
|
34
|
-
};
|
|
35
|
-
}
|
|
21
|
+
export class RestApiIntegrationClient extends RestApiClientBase {
|
|
36
22
|
async apiRequest(options, schema, metadata) {
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
for (const [key, value] of Object.entries(options.headers)) {
|
|
52
|
-
headers.push(this.createParam(key, value));
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
// Convert query params to Property array
|
|
56
|
-
const params = [];
|
|
57
|
-
if (options.params) {
|
|
58
|
-
for (const [key, value] of Object.entries(options.params)) {
|
|
59
|
-
params.push(this.createParam(key, value));
|
|
60
|
-
}
|
|
23
|
+
// The overloads make schema-less JSON unrepresentable in TypeScript,
|
|
24
|
+
// but user API code executes as bundled JS with no type enforcement —
|
|
25
|
+
// enforce the same contract at runtime, before issuing the request.
|
|
26
|
+
if ((options.responseType ?? "json") === "json" && !schema?.response) {
|
|
27
|
+
throw new RestApiValidationError('apiRequest() with responseType "json" requires a response schema — provide one, or set responseType: "text" to receive a non-JSON payload unvalidated', {
|
|
28
|
+
zodError: new z.ZodError([
|
|
29
|
+
{
|
|
30
|
+
code: z.ZodIssueCode.custom,
|
|
31
|
+
message: "response schema is required for JSON responses",
|
|
32
|
+
path: ["response"],
|
|
33
|
+
},
|
|
34
|
+
]),
|
|
35
|
+
data: undefined,
|
|
36
|
+
});
|
|
61
37
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (options.body !== undefined) {
|
|
73
|
-
request.body = JSON.stringify(options.body);
|
|
74
|
-
request.bodyType = "jsonBody";
|
|
38
|
+
const result = await this.executeApiRequest(options, schema?.body, metadata);
|
|
39
|
+
// Without a response schema the raw result is returned as-is (typed
|
|
40
|
+
// unknown). Non-JSON responses (e.g. responseType "text" returning
|
|
41
|
+
// XML) can either omit the schema or pass one matching the decoded
|
|
42
|
+
// value, such as z.string(). Request-body validation is opt-in:
|
|
43
|
+
// executeApiRequest only validates options.body when schema.body is
|
|
44
|
+
// provided (unchanged from the previous contract, where schema.body
|
|
45
|
+
// was already optional).
|
|
46
|
+
if (!schema?.response) {
|
|
47
|
+
return result;
|
|
75
48
|
}
|
|
76
|
-
// Execute the request
|
|
77
|
-
const result = await this.executeQuery(request, undefined, metadata);
|
|
78
|
-
// Response schema is REQUIRED - always validate
|
|
79
49
|
const responseParseResult = schema.response.safeParse(result);
|
|
80
50
|
if (!responseParseResult.success) {
|
|
81
51
|
throw new RestApiValidationError(`Response validation failed: ${responseParseResult.error.message}`, {
|
|
@@ -85,110 +55,5 @@ export class RestApiIntegrationClient {
|
|
|
85
55
|
}
|
|
86
56
|
return responseParseResult.data;
|
|
87
57
|
}
|
|
88
|
-
/**
|
|
89
|
-
* Execute a streaming API request with type-safe chunk validation.
|
|
90
|
-
*
|
|
91
|
-
* Returns an AsyncIterable that yields validated chunks as they arrive.
|
|
92
|
-
* Each chunk is validated against the provided schema before being yielded.
|
|
93
|
-
*
|
|
94
|
-
* @param options - Request configuration including method, path, params, and body
|
|
95
|
-
* @param schema - Zod schemas for request body and chunk validation
|
|
96
|
-
* @param metadata - Optional trace metadata for observability (label, description)
|
|
97
|
-
* @returns AsyncIterable yielding validated chunks
|
|
98
|
-
*
|
|
99
|
-
* @example
|
|
100
|
-
* ```typescript
|
|
101
|
-
* const ChunkSchema = z.object({
|
|
102
|
-
* id: z.string(),
|
|
103
|
-
* choices: z.array(z.object({
|
|
104
|
-
* delta: z.object({
|
|
105
|
-
* content: z.string().optional(),
|
|
106
|
-
* }),
|
|
107
|
-
* })),
|
|
108
|
-
* });
|
|
109
|
-
*
|
|
110
|
-
* const stream = client.streamApiRequest(
|
|
111
|
-
* {
|
|
112
|
-
* method: 'POST',
|
|
113
|
-
* path: '/v1/chat/completions',
|
|
114
|
-
* body: {
|
|
115
|
-
* model: 'gpt-4',
|
|
116
|
-
* stream: true,
|
|
117
|
-
* messages: [{ role: 'user', content: 'Hello!' }],
|
|
118
|
-
* },
|
|
119
|
-
* },
|
|
120
|
-
* { chunk: ChunkSchema },
|
|
121
|
-
* { label: 'openai.chatCompletions', description: 'Stream chat completion' }
|
|
122
|
-
* );
|
|
123
|
-
*
|
|
124
|
-
* for await (const chunk of stream) {
|
|
125
|
-
* console.log(chunk.choices[0]?.delta?.content);
|
|
126
|
-
* }
|
|
127
|
-
* ```
|
|
128
|
-
*/
|
|
129
|
-
async *streamApiRequest(options, schema, metadata) {
|
|
130
|
-
// Validate that streaming is supported
|
|
131
|
-
if (!this.executeStreamingQuery) {
|
|
132
|
-
throw new Error(`Streaming is not supported for integration "${this.name}". ` +
|
|
133
|
-
"The orchestrator must provide a streaming query executor.");
|
|
134
|
-
}
|
|
135
|
-
// Validate request body against schema if both are present.
|
|
136
|
-
// Body schema is optional — if not provided, the body is sent unvalidated.
|
|
137
|
-
if (options.body !== undefined && schema?.body) {
|
|
138
|
-
const bodyParseResult = schema.body.safeParse(options.body);
|
|
139
|
-
if (!bodyParseResult.success) {
|
|
140
|
-
throw new RestApiValidationError(`Request body validation failed: ${bodyParseResult.error.message}`, {
|
|
141
|
-
zodError: bodyParseResult.error,
|
|
142
|
-
data: options.body,
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
// Convert headers to Property array
|
|
147
|
-
const headers = [];
|
|
148
|
-
if (options.headers) {
|
|
149
|
-
for (const [key, value] of Object.entries(options.headers)) {
|
|
150
|
-
headers.push(this.createParam(key, value));
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
// Convert query params to Property array
|
|
154
|
-
const params = [];
|
|
155
|
-
if (options.params) {
|
|
156
|
-
for (const [key, value] of Object.entries(options.params)) {
|
|
157
|
-
params.push(this.createParam(key, value));
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
// Build the request using raw HTTP mode with streaming response
|
|
161
|
-
// Note: responseType must be "raw" for streaming - the orchestrator's
|
|
162
|
-
// Stream block expects SSE responses and only works with "raw" type.
|
|
163
|
-
const request = {
|
|
164
|
-
openApiAction: "genericHttpRequest",
|
|
165
|
-
httpMethod: options.method.toUpperCase(),
|
|
166
|
-
urlPath: options.path,
|
|
167
|
-
headers,
|
|
168
|
-
params,
|
|
169
|
-
responseType: "raw",
|
|
170
|
-
};
|
|
171
|
-
// Add body if provided
|
|
172
|
-
if (options.body !== undefined) {
|
|
173
|
-
request.body = JSON.stringify(options.body);
|
|
174
|
-
request.bodyType = "jsonBody";
|
|
175
|
-
}
|
|
176
|
-
// Execute the streaming request
|
|
177
|
-
const stream = this.executeStreamingQuery(request, metadata);
|
|
178
|
-
// Validate and yield each chunk
|
|
179
|
-
let chunkIndex = 0;
|
|
180
|
-
for await (const rawChunk of stream) {
|
|
181
|
-
const parseResult = schema.chunk.safeParse(rawChunk);
|
|
182
|
-
if (!parseResult.success) {
|
|
183
|
-
throw new StreamChunkValidationError(`Chunk validation failed at index ${chunkIndex}: ${parseResult.error.message}`, {
|
|
184
|
-
chunkIndex,
|
|
185
|
-
chunk: rawChunk,
|
|
186
|
-
zodError: parseResult.error,
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
yield parseResult.data;
|
|
190
|
-
chunkIndex++;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
58
|
}
|
|
194
59
|
//# sourceMappingURL=rest-api-integration-client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest-api-integration-client.js","sourceRoot":"","sources":["../../../src/integrations/base/rest-api-integration-client.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rest-api-integration-client.js","sourceRoot":"","sources":["../../../src/integrations/base/rest-api-integration-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAQ9D;;;;;;GAMG;AACH,MAAM,OAAgB,wBACpB,SAAQ,iBAAiB;IAiBzB,KAAK,CAAC,UAAU,CACd,OAAiC,EACjC,MAA2C,EAC3C,QAAwB;QAExB,qEAAqE;QACrE,sEAAsE;QACtE,oEAAoE;QACpE,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,MAAM,CAAC,KAAK,MAAM,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC;YACrE,MAAM,IAAI,sBAAsB,CAC9B,uJAAuJ,EACvJ;gBACE,QAAQ,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC;oBACvB;wBACE,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM;wBAC3B,OAAO,EAAE,gDAAgD;wBACzD,IAAI,EAAE,CAAC,UAAU,CAAC;qBACnB;iBACF,CAAC;gBACF,IAAI,EAAE,SAAS;aAChB,CACF,CAAC;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,iBAAiB,CACzC,OAAO,EACP,MAAM,EAAE,IAAI,EACZ,QAAQ,CACT,CAAC;QAEF,oEAAoE;QACpE,mEAAmE;QACnE,mEAAmE;QACnE,gEAAgE;QAChE,oEAAoE;QACpE,oEAAoE;QACpE,yBAAyB;QACzB,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC;YACtB,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,MAAM,mBAAmB,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAE9D,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,CAAC;YACjC,MAAM,IAAI,sBAAsB,CAC9B,+BAA+B,mBAAmB,CAAC,KAAK,CAAC,OAAO,EAAE,EAClE;gBACE,QAAQ,EAAE,mBAAmB,CAAC,KAAK;gBACnC,IAAI,EAAE,MAAM;aACb,CACF,CAAC;QACJ,CAAC;QAED,OAAO,mBAAmB,CAAC,IAAI,CAAC;IAClC,CAAC;CACF"}
|
|
@@ -3,6 +3,31 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { z } from "zod";
|
|
5
5
|
import type { TraceMetadata } from "../registry.js";
|
|
6
|
+
export type { TraceMetadata };
|
|
7
|
+
/**
|
|
8
|
+
* How the orchestrator should decode the HTTP response body.
|
|
9
|
+
*
|
|
10
|
+
* - `"json"` (default): parse the response as JSON; fails on non-JSON bodies
|
|
11
|
+
* - `"text"`: return the decoded response body as a string (XML, CSV, HTML, ...)
|
|
12
|
+
*
|
|
13
|
+
* The orchestrator also implements `"auto"`, `"binary"`, and `"raw"` wire
|
|
14
|
+
* values; they are deliberately not exposed here (widening this union later
|
|
15
|
+
* is backward-compatible, narrowing it is not):
|
|
16
|
+
*
|
|
17
|
+
* - `"auto"` returns parsed JSON whenever the body happens to parse, which
|
|
18
|
+
* would let JSON responses bypass schema validation via the schema-less
|
|
19
|
+
* overload
|
|
20
|
+
* - `"binary"` would freeze the worker's internal Buffer JSON encoding
|
|
21
|
+
* (`{ type: "Buffer", data: number[] }`, ~4x payload inflation) into the
|
|
22
|
+
* public SDK contract
|
|
23
|
+
* - `"raw"` is rejected by the orchestrator for non-streaming requests
|
|
24
|
+
*
|
|
25
|
+
* The runtime tuple backs the request-time guard in `executeApiRequest`:
|
|
26
|
+
* the type-level union is erased in the bundled JS user APIs run as, so
|
|
27
|
+
* values outside it must also be rejected at runtime.
|
|
28
|
+
*/
|
|
29
|
+
export declare const REST_API_RESPONSE_TYPES: readonly ["json", "text"];
|
|
30
|
+
export type RestApiResponseType = (typeof REST_API_RESPONSE_TYPES)[number];
|
|
6
31
|
/**
|
|
7
32
|
* Options for making a generic REST API request.
|
|
8
33
|
*/
|
|
@@ -28,6 +53,14 @@ export interface ApiRequestOptions<TBody = unknown> {
|
|
|
28
53
|
* Optional HTTP headers
|
|
29
54
|
*/
|
|
30
55
|
headers?: Record<string, string>;
|
|
56
|
+
/**
|
|
57
|
+
* How the response body should be decoded. Defaults to `"json"`.
|
|
58
|
+
*
|
|
59
|
+
* Use `"text"` for endpoints that return non-JSON payloads such as
|
|
60
|
+
* XML. When requesting a text response, omit the response schema (or
|
|
61
|
+
* use one matching the decoded string, e.g. `z.string()`).
|
|
62
|
+
*/
|
|
63
|
+
responseType?: RestApiResponseType;
|
|
31
64
|
}
|
|
32
65
|
/**
|
|
33
66
|
* Schema configuration for API request validation.
|
|
@@ -35,7 +68,7 @@ export interface ApiRequestOptions<TBody = unknown> {
|
|
|
35
68
|
export interface ApiRequestSchema<TBody = unknown, TResponse = unknown> {
|
|
36
69
|
/**
|
|
37
70
|
* Optional Zod schema for request body validation.
|
|
38
|
-
*
|
|
71
|
+
* When omitted, `options.body` is sent without validation.
|
|
39
72
|
*/
|
|
40
73
|
body?: z.ZodSchema<TBody>;
|
|
41
74
|
/**
|
|
@@ -47,14 +80,18 @@ export interface ApiRequestSchema<TBody = unknown, TResponse = unknown> {
|
|
|
47
80
|
/**
|
|
48
81
|
* Interface for integration clients that support generic API requests.
|
|
49
82
|
*
|
|
50
|
-
*
|
|
83
|
+
* Providing a response schema gives type-safe, validated results. Omitting
|
|
84
|
+
* it returns the raw response as `unknown`. For non-JSON payloads (e.g.
|
|
85
|
+
* `responseType: "text"` for XML), either omit the schema or supply one
|
|
86
|
+
* matching the decoded value (e.g. `z.string()` for text) — object schemas
|
|
87
|
+
* only make sense for JSON-shaped results.
|
|
51
88
|
*/
|
|
52
89
|
export interface SupportsApiRequest {
|
|
53
90
|
/**
|
|
54
91
|
* Execute a generic API request with type-safe validation.
|
|
55
92
|
*
|
|
56
93
|
* @param options - Request configuration including method, path, params, and body
|
|
57
|
-
* @param schema - Zod schemas for request body and response validation
|
|
94
|
+
* @param schema - Zod schemas for request body and response validation
|
|
58
95
|
* @param metadata - Optional trace metadata for observability (label, description)
|
|
59
96
|
* @returns Validated response data
|
|
60
97
|
*
|
|
@@ -86,72 +123,35 @@ export interface SupportsApiRequest {
|
|
|
86
123
|
apiRequest<TBody, TResponse>(options: ApiRequestOptions<TBody>, schema: ApiRequestSchema<TBody, TResponse> & {
|
|
87
124
|
response: z.ZodSchema<TResponse>;
|
|
88
125
|
}, metadata?: TraceMetadata): Promise<TResponse>;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Schema configuration for streaming API request validation.
|
|
92
|
-
*/
|
|
93
|
-
export interface StreamApiRequestSchema<TBody = unknown, TChunk = unknown> {
|
|
94
|
-
/**
|
|
95
|
-
* Optional Zod schema for request body validation.
|
|
96
|
-
* Required if body is provided in options.
|
|
97
|
-
*/
|
|
98
|
-
body?: z.ZodSchema<TBody>;
|
|
99
126
|
/**
|
|
100
|
-
*
|
|
127
|
+
* Execute a generic API request without response validation.
|
|
101
128
|
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Interface for integration clients that support streaming API requests.
|
|
109
|
-
*
|
|
110
|
-
* Streaming API requests return an AsyncIterable of validated chunks,
|
|
111
|
-
* enabling real-time data streaming from LLMs and other sources.
|
|
112
|
-
*/
|
|
113
|
-
export interface SupportsStreamingApiRequest {
|
|
114
|
-
/**
|
|
115
|
-
* Execute a streaming API request with type-safe chunk validation.
|
|
129
|
+
* This overload requires an explicit non-JSON `responseType` — JSON
|
|
130
|
+
* responses must always be consumed through the schema overload above,
|
|
131
|
+
* so "unvalidated JSON" is unrepresentable. The decoded non-JSON
|
|
132
|
+
* response is returned as-is, typed `unknown`.
|
|
116
133
|
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
134
|
+
* Note: request-body validation is opt-in — it runs only when
|
|
135
|
+
* `schema.body` is provided. Omitting `schema` sends `options.body`
|
|
136
|
+
* without validation.
|
|
119
137
|
*
|
|
120
|
-
* @param options - Request configuration
|
|
121
|
-
* @param schema - Zod
|
|
138
|
+
* @param options - Request configuration; `responseType` must be "text"
|
|
139
|
+
* @param schema - Optional Zod schema for request body validation
|
|
122
140
|
* @param metadata - Optional trace metadata for observability (label, description)
|
|
123
|
-
* @returns
|
|
141
|
+
* @returns The raw response from the integration
|
|
124
142
|
*
|
|
125
143
|
* @example
|
|
126
144
|
* ```typescript
|
|
127
|
-
* const
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* content: z.string().optional(),
|
|
132
|
-
* }),
|
|
133
|
-
* })),
|
|
145
|
+
* const xml = await ctx.integrations.legacyApi.apiRequest({
|
|
146
|
+
* method: 'GET',
|
|
147
|
+
* path: '/report.xml',
|
|
148
|
+
* responseType: 'text',
|
|
134
149
|
* });
|
|
135
|
-
*
|
|
136
|
-
* const stream = client.streamApiRequest(
|
|
137
|
-
* {
|
|
138
|
-
* method: 'POST',
|
|
139
|
-
* path: '/v1/chat/completions',
|
|
140
|
-
* body: {
|
|
141
|
-
* model: 'gpt-4',
|
|
142
|
-
* stream: true,
|
|
143
|
-
* messages: [{ role: 'user', content: 'Hello!' }],
|
|
144
|
-
* },
|
|
145
|
-
* },
|
|
146
|
-
* { chunk: ChunkSchema },
|
|
147
|
-
* { label: 'openai.chatCompletions', description: 'Stream chat completion' }
|
|
148
|
-
* );
|
|
149
|
-
*
|
|
150
|
-
* for await (const chunk of stream) {
|
|
151
|
-
* console.log(chunk.choices[0]?.delta?.content);
|
|
152
|
-
* }
|
|
150
|
+
* // xml is the raw XML string
|
|
153
151
|
* ```
|
|
154
152
|
*/
|
|
155
|
-
|
|
153
|
+
apiRequest<TBody>(options: ApiRequestOptions<TBody> & {
|
|
154
|
+
responseType: Exclude<RestApiResponseType, "json">;
|
|
155
|
+
}, schema?: ApiRequestSchema<TBody, unknown>, metadata?: TraceMetadata): Promise<unknown>;
|
|
156
156
|
}
|
|
157
157
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/base/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/base/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,uBAAuB,2BAA4B,CAAC;AAEjE,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,KAAK,GAAG,OAAO;IAChD;;OAEG;IACH,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;IAEzE;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH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1
|
/**
|
|
2
2
|
* Shared types for REST API Integration (OpenAPI) based clients.
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* How the orchestrator should decode the HTTP response body.
|
|
6
|
+
*
|
|
7
|
+
* - `"json"` (default): parse the response as JSON; fails on non-JSON bodies
|
|
8
|
+
* - `"text"`: return the decoded response body as a string (XML, CSV, HTML, ...)
|
|
9
|
+
*
|
|
10
|
+
* The orchestrator also implements `"auto"`, `"binary"`, and `"raw"` wire
|
|
11
|
+
* values; they are deliberately not exposed here (widening this union later
|
|
12
|
+
* is backward-compatible, narrowing it is not):
|
|
13
|
+
*
|
|
14
|
+
* - `"auto"` returns parsed JSON whenever the body happens to parse, which
|
|
15
|
+
* would let JSON responses bypass schema validation via the schema-less
|
|
16
|
+
* overload
|
|
17
|
+
* - `"binary"` would freeze the worker's internal Buffer JSON encoding
|
|
18
|
+
* (`{ type: "Buffer", data: number[] }`, ~4x payload inflation) into the
|
|
19
|
+
* public SDK contract
|
|
20
|
+
* - `"raw"` is rejected by the orchestrator for non-streaming requests
|
|
21
|
+
*
|
|
22
|
+
* The runtime tuple backs the request-time guard in `executeApiRequest`:
|
|
23
|
+
* the type-level union is erased in the bundled JS user APIs run as, so
|
|
24
|
+
* values outside it must also be rejected at runtime.
|
|
25
|
+
*/
|
|
26
|
+
export const REST_API_RESPONSE_TYPES = ["json", "text"];
|
|
5
27
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/integrations/base/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/integrations/base/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAU,CAAC"}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* runtime validation using Zod schemas.
|
|
6
6
|
*/
|
|
7
7
|
import type { z } from "zod";
|
|
8
|
-
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
9
8
|
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
9
|
+
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
10
10
|
import type { BigQueryClient } from "./types.js";
|
|
11
11
|
/**
|
|
12
12
|
* Internal implementation of the BigQuery client.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/bigquery/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/bigquery/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAM7B,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;GAEG;AACH,qBAAa,kBACX,YAAW,cAAc,EAAE,qBAAqB;IAEhD,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAgB;gBAEjC,MAAM,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa;IAKlE,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED;;;;;;;;;;OAUG;IACH,OAAO,CAAC,YAAY;IAYd,KAAK,CAAC,CAAC,EACX,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EACtB,MAAM,CAAC,EAAE,OAAO,EAAE,EAClB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,CAAC,EAAE,CAAC;IAiDT,OAAO,CACX,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,OAAO,EAAE,EAClB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CAmBjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/bigquery/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/bigquery/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAGpB,MAAM,CAAoB;IAClB,YAAY,CAAgB;IAE7C,YAAY,MAAyB,EAAE,YAA2B;QAChE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;IAC9B,CAAC;IAED;;;;;;;;;;OAUG;IACK,YAAY,CAClB,GAAW,EACX,MAAkB;QAElB,MAAM,SAAS,GAAG,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;Q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
25
|
-
* 'SELECT * FROM events WHERE date =
|
|
25
|
+
* 'SELECT * FROM events WHERE date = ?',
|
|
26
26
|
* EventSchema,
|
|
27
27
|
* ['2024-01-01']
|
|
28
28
|
* );
|
|
@@ -32,9 +32,9 @@ export interface BigQueryClient extends BaseIntegrationClient {
|
|
|
32
32
|
/**
|
|
33
33
|
* Execute a SQL query and validate results against a Zod schema.
|
|
34
34
|
*
|
|
35
|
-
* @param sql - SQL query string (use
|
|
35
|
+
* @param sql - SQL query string (use ? placeholders for parameters)
|
|
36
36
|
* @param schema - Zod schema to validate the query results
|
|
37
|
-
* @param params - Optional query parameters
|
|
37
|
+
* @param params - Optional query parameters, bound positionally from the provided array
|
|
38
38
|
* @returns Promise resolving to validated query results
|
|
39
39
|
*
|
|
40
40
|
* @throws {QueryValidationError} If results don't match schema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/bigquery/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/bigquery/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,cAAe,SAAQ,qBAAqB;IAC3D;;;;;;;;;;OAUG;IACH,KAAK,CAAC,CAAC,EACL,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EACtB,MAAM,CAAC,EAAE,OAAO,EAAE,EAClB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAEhB;;;;;;OAMG;IACH,OAAO,CACL,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,OAAO,EAAE,EAClB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClC"}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* runtime validation using Zod schemas.
|
|
6
6
|
*/
|
|
7
7
|
import type { z } from "zod";
|
|
8
|
-
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
9
8
|
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
9
|
+
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
10
10
|
import type { CockroachDBClient } from "./types.js";
|
|
11
11
|
/**
|
|
12
12
|
* Internal implementation of the CockroachDB client.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/cockroachdb/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/cockroachdb/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAM7B,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;GAEG;AACH,qBAAa,qBACX,YAAW,iBAAiB,EAAE,qBAAqB;IAEnD,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAgB;gBAEjC,MAAM,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa;IAKlE,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED;;;;;;;;;;OAUG;IACH,OAAO,CAAC,YAAY;IAYd,KAAK,CAAC,CAAC,EACX,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EACtB,MAAM,CAAC,EAAE,OAAO,EAAE,EAClB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,CAAC,EAAE,CAAC;IAiDT,OAAO,CACX,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,OAAO,EAAE,EAClB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CAmBjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/cockroachdb/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/cockroachdb/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C;;GAEG;AACH,MAAM,OAAO,qBAAqB;IAGvB,MAAM,CAAoB;IAClB,YAAY,CAAgB;IAE7C,YAAY,MAAyB,EAAE,YAA2B;QAChE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED,IAAI,IAAI;Q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AAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/cockroachdb/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/cockroachdb/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D;;;;;;;;;;OAUG;IACH,KAAK,CAAC,CAAC,EACL,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EACtB,MAAM,CAAC,EAAE,OAAO,EAAE,EAClB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAEhB;;;;;;OAMG;IACH,OAAO,CACL,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,OAAO,EAAE,EAClB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClC"}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* upsert, delete) against CosmosDB containers.
|
|
7
7
|
*/
|
|
8
8
|
import type { z } from "zod";
|
|
9
|
-
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
10
9
|
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
10
|
+
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
11
11
|
import type { CosmosDBClient, CosmosDBQueryOptions } from "./types.js";
|
|
12
12
|
/**
|
|
13
13
|
* Internal implementation of CosmosDBClient.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/cosmosdb/client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/cosmosdb/client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAM7B,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAOvE;;;;;GAKG;AACH,qBAAa,kBACX,YAAW,cAAc,EAAE,qBAAqB;IAEhD,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAgB;gBAEjC,MAAM,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa;IAKlE,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED;;OAEG;YACW,IAAI;IAuBlB;;OAEG;IACH,OAAO,CAAC,QAAQ;IAgBV,KAAK,CAAC,CAAC,EACX,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EACtB,OAAO,CAAC,EAAE,oBAAoB,EAC9B,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,CAAC,CAAC;IAsBP,IAAI,CAAC,CAAC,EACV,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EACtB,YAAY,CAAC,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,CAAC,CAAC;IAiBP,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,OAAO,EACb,YAAY,CAAC,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,OAAO,CAAC;IAkBb,OAAO,CACX,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,OAAO,EACb,YAAY,CAAC,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,OAAO,CAAC;IAkBb,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,OAAO,EACb,YAAY,CAAC,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,OAAO,CAAC;IAkBb,UAAU,CACd,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,MAAM,EACV,YAAY,CAAC,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,OAAO,CAAC;CAcpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/cosmosdb/client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/cosmosdb/client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH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