@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
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Uses the native SMTP plugin type from @superblocksteam/types.
|
|
5
5
|
* Sends emails with support for CC, BCC, reply-to, and attachments.
|
|
6
6
|
*/
|
|
7
|
-
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
8
7
|
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
8
|
+
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
9
9
|
import type { SmtpClient, SmtpSendOptions } from "./types.js";
|
|
10
10
|
/**
|
|
11
11
|
* Internal implementation of SmtpClient.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/smtp/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/smtp/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,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,UAAU,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAO9D;;;;;GAKG;AACH,qBAAa,cAAe,YAAW,UAAU,EAAE,qBAAqB;IACtE,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;IAEK,IAAI,CACR,OAAO,EAAE,eAAe,EACxB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,OAAO,CAAC;CA0BpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/smtp/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/smtp/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAU3D;;;;;GAKG;AACH,MAAM,OAAO,cAAc;IAChB,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,KAAK,CAAC,IAAI,CACR,OAAwB,EACxB,QAAwB;QAExB,MAAM,OAAO,GAAgB;YAC3B,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,EAAE,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE;YACpB,GAAG,EAAE,OAAO,CAAC,GAAG,IAAI,EAAE;YACtB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,EAAE;YAC9B,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE;SACvC,CAAC;QAEF,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,YAAY,CAC5B,OAAkC,EAClC,SAAS,EACT,QAAQ,CACT,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,gBAAgB,EAAE,CAAC;gBACtC,MAAM,KAAK,CAAC;YACd,CAAC;YAED,MAAM,IAAI,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;CACF"}
|
|
@@ -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 { SnowflakeClient } from "./types.js";
|
|
11
11
|
/**
|
|
12
12
|
* Internal implementation of the Snowflake client.
|
|
@@ -21,10 +21,10 @@ export declare class SnowflakeClientImpl implements SnowflakeClient, Integration
|
|
|
21
21
|
* Builds a Snowflake request object from SQL and parameters.
|
|
22
22
|
*
|
|
23
23
|
* When params are provided, the SQL body is sent with placeholders intact
|
|
24
|
-
* (e.g.
|
|
24
|
+
* (e.g. ?) and the parameter values are passed via the `parameters`
|
|
25
25
|
* field as a JSON-stringified array for server-side binding.
|
|
26
26
|
*
|
|
27
|
-
* @param sql - The SQL query with optional
|
|
27
|
+
* @param sql - The SQL query with optional ? placeholders
|
|
28
28
|
* @param params - Optional array of parameter values for server-side binding
|
|
29
29
|
* @returns The plugin request object
|
|
30
30
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/snowflake/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/snowflake/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,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;GAEG;AACH,qBAAa,mBACX,YAAW,eAAe,EAAE,qBAAqB;IAEjD,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;IAmDT,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;CAqBjC"}
|
|
@@ -27,10 +27,10 @@ export class SnowflakeClientImpl {
|
|
|
27
27
|
* Builds a Snowflake request object from SQL and parameters.
|
|
28
28
|
*
|
|
29
29
|
* When params are provided, the SQL body is sent with placeholders intact
|
|
30
|
-
* (e.g.
|
|
30
|
+
* (e.g. ?) and the parameter values are passed via the `parameters`
|
|
31
31
|
* field as a JSON-stringified array for server-side binding.
|
|
32
32
|
*
|
|
33
|
-
* @param sql - The SQL query with optional
|
|
33
|
+
* @param sql - The SQL query with optional ? placeholders
|
|
34
34
|
* @param params - Optional array of parameter values for server-side binding
|
|
35
35
|
* @returns The plugin request object
|
|
36
36
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/snowflake/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/snowflake/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,mBAAmB;IAGrB,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;QAC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E,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/snowflake/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/snowflake/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,eAAgB,SAAQ,qBAAqB;IAC5D;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;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;;;;;;;;;;;;;;;OAeG;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"}
|
|
@@ -9,8 +9,7 @@ import type { SnowflakeCortexClient } from "./types.js";
|
|
|
9
9
|
/**
|
|
10
10
|
* Internal implementation of SnowflakeCortexClient.
|
|
11
11
|
*
|
|
12
|
-
* Extends RestApiIntegrationClient to inherit generic apiRequest()
|
|
13
|
-
* streamApiRequest() methods.
|
|
12
|
+
* Extends RestApiIntegrationClient to inherit generic apiRequest() method.
|
|
14
13
|
*/
|
|
15
14
|
export declare class SnowflakeCortexClientImpl extends RestApiIntegrationClient implements SnowflakeCortexClient {
|
|
16
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/snowflakecortex/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/snowflakecortex/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD;;;;GAIG;AACH,qBAAa,yBACX,SAAQ,wBACR,YAAW,qBAAqB;CAGjC"}
|
|
@@ -8,8 +8,7 @@ import { RestApiIntegrationClient } from "../base/index.js";
|
|
|
8
8
|
/**
|
|
9
9
|
* Internal implementation of SnowflakeCortexClient.
|
|
10
10
|
*
|
|
11
|
-
* Extends RestApiIntegrationClient to inherit generic apiRequest()
|
|
12
|
-
* streamApiRequest() methods.
|
|
11
|
+
* Extends RestApiIntegrationClient to inherit generic apiRequest() method.
|
|
13
12
|
*/
|
|
14
13
|
export class SnowflakeCortexClientImpl extends RestApiIntegrationClient {
|
|
15
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/snowflakecortex/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAG5D
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/snowflakecortex/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAG5D;;;;GAIG;AACH,MAAM,OAAO,yBACX,SAAQ,wBAAwB;CAIjC"}
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
* Snowflake Cortex client types.
|
|
3
3
|
*/
|
|
4
4
|
import type { BaseIntegrationClient } from "../../types.js";
|
|
5
|
-
import type { SupportsApiRequest
|
|
5
|
+
import type { SupportsApiRequest } from "../base/index.js";
|
|
6
6
|
/**
|
|
7
7
|
* Snowflake Cortex client for inference interactions.
|
|
8
8
|
*
|
|
9
|
-
* Provides the generic apiRequest() method for any Snowflake Cortex API endpoint
|
|
10
|
-
* and streamApiRequest() for streaming responses.
|
|
9
|
+
* Provides the generic apiRequest() method for any Snowflake Cortex API endpoint.
|
|
11
10
|
*/
|
|
12
|
-
export interface SnowflakeCortexClient extends BaseIntegrationClient, SupportsApiRequest
|
|
11
|
+
export interface SnowflakeCortexClient extends BaseIntegrationClient, SupportsApiRequest {
|
|
13
12
|
}
|
|
14
13
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/snowflakecortex/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/snowflakecortex/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,qBACf,SAAQ,qBAAqB,EAAE,kBAAkB;CAElD"}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* PostgreSQL integration in sdk-api, so this client delegates to the same base
|
|
6
6
|
* implementation.
|
|
7
7
|
*/
|
|
8
|
-
import type { SnowflakePostgresClient } from "./types.js";
|
|
9
8
|
import { PostgresClientImpl } from "../postgres/client.js";
|
|
9
|
+
import type { SnowflakePostgresClient } from "./types.js";
|
|
10
10
|
export declare class SnowflakePostgresClientImpl extends PostgresClientImpl implements SnowflakePostgresClient {
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/snowflakepostgres/client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/snowflakepostgres/client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1D,qBAAa,2BACX,SAAQ,kBACR,YAAW,uBAAuB;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/snowflakepostgres/client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/snowflakepostgres/client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,MAAM,OAAO,2BACX,SAAQ,kBAAkB;CACW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/snowflakepostgres/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/snowflakepostgres/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;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;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,uBAAwB,SAAQ,qBAAqB;IACpE;;;;;;;OAOG;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"}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Creates the context object that is passed to user API functions,
|
|
5
5
|
* providing access to integrations, logging, and environment.
|
|
6
6
|
*/
|
|
7
|
-
import type { ApiContext, ApiUser, Logger, AnyIntegrationRef } from "../types.js";
|
|
8
|
-
import type { IntegrationConfig } from "../integrations/types.js";
|
|
9
7
|
import type { IntegrationDeclaration } from "../integrations/declarations.js";
|
|
10
8
|
import { type TraceMetadata } from "../integrations/registry.js";
|
|
9
|
+
import type { IntegrationConfig } from "../integrations/types.js";
|
|
10
|
+
import type { ApiContext, ApiUser, Logger, AnyIntegrationRef } from "../types.js";
|
|
11
11
|
/**
|
|
12
12
|
* Options for creating an API execution context.
|
|
13
13
|
*/
|
|
@@ -24,7 +24,7 @@ export interface CreateContextOptions {
|
|
|
24
24
|
/**
|
|
25
25
|
* Function to execute integration operations.
|
|
26
26
|
*
|
|
27
|
-
* For language plugins (
|
|
27
|
+
* For language plugins (JavaScript), pass the bindings parameter
|
|
28
28
|
* to the API execution request as `input` field for binding resolution.
|
|
29
29
|
*/
|
|
30
30
|
executeQuery: (integrationId: string, request: Record<string, unknown>, bindings?: Record<string, unknown>, metadata?: TraceMetadata) => Promise<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/runtime/context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/runtime/context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,iBAAiB,EAElB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,MAAM,EACN,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAGrB;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,uDAAuD;IACvD,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAE7C;;;;;OAKG;IACH,uBAAuB,EAAE,sBAAsB,EAAE,CAAC;IAElD;;;;;OAKG;IACH,YAAY,EAAE,CACZ,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,QAAQ,CAAC,EAAE,aAAa,KACrB,OAAO,CAAC,OAAO,CAAC,CAAC;IAEtB,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IAEpB,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE5B,gCAAgC;IAChC,IAAI,EAAE,OAAO,CAAC;IAEd,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,oBAAoB,GAC5B,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAgF/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/runtime/context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/runtime/context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,YAAY,GAGb,MAAM,6BAA6B,CAAC;AAWrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AA2ClD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAA6B;IAE7B,MAAM,EACJ,YAAY,EACZ,uBAAuB,EACvB,YAAY,EACZ,WAAW,EACX,GAAG,EACH,IAAI,EACJ,MAAM,GACP,GAAG,OAAO,CAAC;IAEZ,wCAAwC;IACxC,MAAM,WAAW,GAAG,IAAI,GAAG,EAAiC,CAAC;IAE7D,gBAAgB;IAChB,MAAM,GAAG,GAAG,MAAM,IAAI,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAEvD;;;;;;OAMG;IACH,SAAS,cAAc,CAAC,EAAU,EAAE,QAAgB;QAClD,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AG,GAAG,EAAE,CAAC;QAC9B,IAAI;KACL,CAAC;AACJ,CAAC"}
|
|
@@ -30,13 +30,13 @@ export interface ExecuteApiRequest {
|
|
|
30
30
|
* The request object should match the protobuf Plugin schema for the
|
|
31
31
|
* specific integration type (e.g., postgresql.v1.Plugin for Postgres).
|
|
32
32
|
*
|
|
33
|
-
* For language plugins (
|
|
33
|
+
* For language plugins (JavaScript), the bindings parameter should be
|
|
34
34
|
* passed to the API execution request as `input` or `inputs` field for
|
|
35
35
|
* binding resolution.
|
|
36
36
|
*
|
|
37
37
|
* @param integrationId - The integration ID
|
|
38
38
|
* @param request - Plugin-specific request object matching the proto schema
|
|
39
|
-
* @param bindings - Optional bindings data for binding resolution (e.g.,
|
|
39
|
+
* @param bindings - Optional bindings data for binding resolution (e.g., JavaScript bindings)
|
|
40
40
|
* @returns Promise resolving to the operation result
|
|
41
41
|
*/
|
|
42
42
|
executeQuery: (integrationId: string, request: Record<string, unknown>, bindings?: Record<string, unknown>, metadata?: TraceMetadata) => Promise<unknown>;
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
* Provides the execution engine for running compiled APIs,
|
|
5
5
|
* including context creation, validation, and error handling.
|
|
6
6
|
*/
|
|
7
|
-
export { execute, isStreamingApi, type UnifiedExecuteApiRequest, type AnyCompiledApi, } from "./execute.js";
|
|
8
7
|
export { executeApi, type ExecuteApiRequest, type ExecuteApiResponse, type ExecuteApiSuccessResponse, type ExecuteApiErrorResponse, } from "./executor.js";
|
|
9
|
-
export { executeStreamingApi, createStreamingApiGenerator, type ExecuteStreamingApiRequest, type StreamingApiCallbacks, type StreamingApiError, type ExecuteStreamingApiResult, } from "./streaming-executor.js";
|
|
10
8
|
export { createApiContext, type CreateContextOptions } from "./context.js";
|
|
11
|
-
export { createStreamingApiContext, type CreateStreamingContextOptions, } from "./streaming-context.js";
|
|
12
9
|
export { SdkError, InputValidationError, OutputValidationError, IntegrationNotFoundError, IntegrationError, ExecutionError, ErrorCode, type ErrorCodeType, } from "./errors.js";
|
|
13
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,GAC7B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAG3E,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC"}
|
package/dist/runtime/index.js
CHANGED
|
@@ -4,15 +4,10 @@
|
|
|
4
4
|
* Provides the execution engine for running compiled APIs,
|
|
5
5
|
* including context creation, validation, and error handling.
|
|
6
6
|
*/
|
|
7
|
-
//
|
|
8
|
-
export { execute, isStreamingApi, } from "./execute.js";
|
|
9
|
-
// Main executor (for non-streaming APIs)
|
|
7
|
+
// Main executor
|
|
10
8
|
export { executeApi, } from "./executor.js";
|
|
11
|
-
// Streaming executor (for streaming APIs)
|
|
12
|
-
export { executeStreamingApi, createStreamingApiGenerator, } from "./streaming-executor.js";
|
|
13
9
|
// Context factories
|
|
14
10
|
export { createApiContext } from "./context.js";
|
|
15
|
-
export { createStreamingApiContext, } from "./streaming-context.js";
|
|
16
11
|
// Error types
|
|
17
12
|
export { SdkError, InputValidationError, OutputValidationError, IntegrationNotFoundError, IntegrationError, ExecutionError, ErrorCode, } from "./errors.js";
|
|
18
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,gBAAgB;AAChB,OAAO,EACL,UAAU,GAKX,MAAM,eAAe,CAAC;AAEvB,oBAAoB;AACpB,OAAO,EAAE,gBAAgB,EAA6B,MAAM,cAAc,CAAC;AAE3E,cAAc;AACd,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,SAAS,GAEV,MAAM,aAAa,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -37,10 +37,13 @@ import type { IntegrationRef, AnyIntegrationRef, IntegrationsMap } from "./integ
|
|
|
37
37
|
* if (users.length === 0) {
|
|
38
38
|
* throw new Error('User not found');
|
|
39
39
|
* }
|
|
40
|
-
* await ctx.integrations.notifier.
|
|
41
|
-
* channel: '#alerts',
|
|
42
|
-
*
|
|
43
|
-
*
|
|
40
|
+
* const notifyResult = await ctx.integrations.notifier.apiRequest(
|
|
41
|
+
* { method: 'POST', path: '/chat.postMessage', body: { channel: '#alerts', text: `Fetched user ${users[0].name}` } },
|
|
42
|
+
* { response: z.object({ channel: z.string(), ts: z.string() }) }
|
|
43
|
+
* );
|
|
44
|
+
* if (!notifyResult.ok) {
|
|
45
|
+
* throw new Error(`Slack API error: ${notifyResult.error}`);
|
|
46
|
+
* }
|
|
44
47
|
* return { user: users[0] };
|
|
45
48
|
* },
|
|
46
49
|
* });
|
|
@@ -70,7 +73,7 @@ export interface ApiConfig<TInput extends z.ZodType, TOutput extends z.ZodType,
|
|
|
70
73
|
* ```typescript
|
|
71
74
|
* integrations: {
|
|
72
75
|
* db: postgres('Production Postgres'),
|
|
73
|
-
* cache:
|
|
76
|
+
* cache: mongodb('Cache MongoDB'),
|
|
74
77
|
* }
|
|
75
78
|
* ```
|
|
76
79
|
*/
|
|
@@ -129,7 +132,13 @@ export interface ApiContext<TIntegrations extends Record<string, AnyIntegrationR
|
|
|
129
132
|
* const users = await ctx.integrations.db.query('SELECT * FROM users', UserSchema);
|
|
130
133
|
*
|
|
131
134
|
* // ctx.integrations.notifier is SlackClient
|
|
132
|
-
* await ctx.integrations.notifier.
|
|
135
|
+
* const notifyResult = await ctx.integrations.notifier.apiRequest(
|
|
136
|
+
* { method: 'POST', path: '/chat.postMessage', body: { channel: '#alerts', text: 'Hello!' } },
|
|
137
|
+
* { response: z.object({ channel: z.string(), ts: z.string() }) }
|
|
138
|
+
* );
|
|
139
|
+
* if (!notifyResult.ok) {
|
|
140
|
+
* throw new Error(`Slack API error: ${notifyResult.error}`);
|
|
141
|
+
* }
|
|
133
142
|
* ```
|
|
134
143
|
*/
|
|
135
144
|
readonly integrations: IntegrationsMap<TIntegrations>;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/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/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,eAAe,EAChB,MAAM,gCAAgC,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,WAAW,SAAS,CACxB,MAAM,SAAS,CAAC,CAAC,OAAO,EACxB,OAAO,SAAS,CAAC,CAAC,OAAO,EACzB,aAAa,SAAS,MAAM,CAAC,MAAM,EAA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ACtC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAE/C,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,MAAM;IACrB,0BAA0B;IAC1B,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAE5D,4BAA4B;IAC5B,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAE5D,2BAA2B;IAC3B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAE7D,0BAA0B;IAC1B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,2BAA2B;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,qDAAqD;IACrD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAGD,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superblocksteam/sdk-api",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Superblocks SDK for TypeScript-based API definitions",
|
|
5
5
|
"license": "Superblocks Community Software License",
|
|
6
6
|
"files": [
|
|
@@ -13,22 +13,22 @@
|
|
|
13
13
|
"main": "dist/index.js",
|
|
14
14
|
"types": "dist/index.d.ts",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@superblocksteam/types": "1.
|
|
16
|
+
"@superblocksteam/types": "1.351.0",
|
|
17
17
|
"zod": "^3.23.8"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@bufbuild/protobuf": "1.3.0",
|
|
21
21
|
"@eslint/js": "^9.39.1",
|
|
22
22
|
"@types/node": "^20",
|
|
23
|
-
"@types/uuid": "^9.0.0",
|
|
24
23
|
"dotenv": "^16.4.5",
|
|
25
24
|
"eslint": "^9.39.1",
|
|
26
25
|
"eslint-config-prettier": "^10.1.8",
|
|
27
26
|
"tsx": "^4.19.0",
|
|
28
|
-
"typescript": "^
|
|
29
|
-
"typescript-eslint": "^8.
|
|
30
|
-
"uuid": "^
|
|
31
|
-
"vitest": "^2.0.0"
|
|
27
|
+
"typescript": "^6.0.3",
|
|
28
|
+
"typescript-eslint": "^8.59.2",
|
|
29
|
+
"uuid": "^11.1.1",
|
|
30
|
+
"vitest": "^2.0.0",
|
|
31
|
+
"@superblocksteam/shared": "0.0.1"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=20",
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
6
6
|
import { describe, it, expect, expectTypeOf } from "vitest";
|
|
7
7
|
import { z } from "zod";
|
|
8
|
+
|
|
8
9
|
import {
|
|
9
10
|
api,
|
|
10
11
|
__setEntryPoint,
|
|
11
|
-
|
|
12
|
+
getEntryPoint,
|
|
12
13
|
type ExtractApiInput,
|
|
13
14
|
type ExtractApiOutput,
|
|
14
15
|
} from "./definition.js";
|
|
@@ -344,27 +345,52 @@ describe("entryPoint mechanism", () => {
|
|
|
344
345
|
expect(compiled.entryPoint).toBe("server/apis/GetUsers/api.ts");
|
|
345
346
|
});
|
|
346
347
|
|
|
347
|
-
it("
|
|
348
|
-
__setEntryPoint("server/apis/
|
|
349
|
-
const
|
|
350
|
-
|
|
348
|
+
it("entryPoint persists across multiple api() calls from the same file", () => {
|
|
349
|
+
__setEntryPoint("server/apis/slack/helper.ts");
|
|
350
|
+
const dashboard = api({
|
|
351
|
+
name: "SlackDashboard",
|
|
352
|
+
input: z.object({}),
|
|
353
|
+
output: z.object({}),
|
|
354
|
+
async run() {
|
|
355
|
+
return {};
|
|
356
|
+
},
|
|
357
|
+
});
|
|
358
|
+
const search = api({
|
|
359
|
+
name: "SlackSearch",
|
|
360
|
+
input: z.object({}),
|
|
361
|
+
output: z.object({}),
|
|
362
|
+
async run() {
|
|
363
|
+
return {};
|
|
364
|
+
},
|
|
365
|
+
});
|
|
366
|
+
const postMessage = api({
|
|
367
|
+
name: "SlackPostMessage",
|
|
368
|
+
input: z.object({}),
|
|
369
|
+
output: z.object({}),
|
|
370
|
+
async run() {
|
|
371
|
+
return {};
|
|
372
|
+
},
|
|
373
|
+
});
|
|
351
374
|
|
|
352
|
-
expect(
|
|
353
|
-
expect(
|
|
375
|
+
expect(dashboard.entryPoint).toBe("server/apis/slack/helper.ts");
|
|
376
|
+
expect(search.entryPoint).toBe("server/apis/slack/helper.ts");
|
|
377
|
+
expect(postMessage.entryPoint).toBe("server/apis/slack/helper.ts");
|
|
354
378
|
});
|
|
355
379
|
|
|
356
|
-
it("
|
|
357
|
-
__setEntryPoint("server/apis/
|
|
358
|
-
const
|
|
359
|
-
name: "
|
|
380
|
+
it("new __setEntryPoint overwrites previous value for a different file", () => {
|
|
381
|
+
__setEntryPoint("server/apis/slack/helper.ts");
|
|
382
|
+
const slackApi = api({
|
|
383
|
+
name: "SlackDashboard",
|
|
360
384
|
input: z.object({}),
|
|
361
385
|
output: z.object({}),
|
|
362
386
|
async run() {
|
|
363
387
|
return {};
|
|
364
388
|
},
|
|
365
389
|
});
|
|
366
|
-
|
|
367
|
-
|
|
390
|
+
|
|
391
|
+
__setEntryPoint("server/apis/users/api.ts");
|
|
392
|
+
const usersApi = api({
|
|
393
|
+
name: "GetUsers",
|
|
368
394
|
input: z.object({}),
|
|
369
395
|
output: z.object({}),
|
|
370
396
|
async run() {
|
|
@@ -372,7 +398,7 @@ describe("entryPoint mechanism", () => {
|
|
|
372
398
|
},
|
|
373
399
|
});
|
|
374
400
|
|
|
375
|
-
expect(
|
|
376
|
-
expect(
|
|
401
|
+
expect(slackApi.entryPoint).toBe("server/apis/slack/helper.ts");
|
|
402
|
+
expect(usersApi.entryPoint).toBe("server/apis/users/api.ts");
|
|
377
403
|
});
|
|
378
404
|
});
|
package/src/api/definition.ts
CHANGED
|
@@ -44,29 +44,36 @@ export type ExtractApiInput<T> =
|
|
|
44
44
|
export type ExtractApiOutput<T> =
|
|
45
45
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46
46
|
T extends CompiledApi<any, infer TOutput> ? TOutput : never;
|
|
47
|
-
import type { ApiConfig, ApiContext, AnyIntegrationRef } from "../types.js";
|
|
48
47
|
import {
|
|
49
48
|
extractIntegrationDeclarations,
|
|
50
49
|
type IntegrationDeclaration,
|
|
51
50
|
} from "../integrations/declarations.js";
|
|
51
|
+
import type { ApiConfig, ApiContext, AnyIntegrationRef } from "../types.js";
|
|
52
52
|
|
|
53
53
|
// ---------------------------------------------------------------------------
|
|
54
54
|
// Entry point setter — used by the Vite plugin to stamp the source file path
|
|
55
|
-
// onto
|
|
56
|
-
// synchronous, so the prepended __setEntryPoint() always runs before
|
|
55
|
+
// onto every api()/streamingApi() call in a module. ESM top-level execution
|
|
56
|
+
// is synchronous, so the prepended __setEntryPoint() always runs before any
|
|
57
|
+
// api() call in the same file. The value is intentionally NOT cleared after
|
|
58
|
+
// the first read so that multiple named-exported api() calls in a single file
|
|
59
|
+
// all receive the same entry point. The next file's __setEntryPoint() call
|
|
60
|
+
// naturally overwrites the value.
|
|
57
61
|
// ---------------------------------------------------------------------------
|
|
58
62
|
|
|
59
63
|
let __pendingEntryPoint: string | undefined;
|
|
60
64
|
|
|
61
|
-
/** Called by the Vite plugin to set the entry point for
|
|
65
|
+
/** Called by the Vite plugin to set the entry point for api() calls in this file. */
|
|
62
66
|
export function __setEntryPoint(entryPoint: string): void {
|
|
63
67
|
__pendingEntryPoint = entryPoint;
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Returns the current pending entry point without clearing it.
|
|
72
|
+
* This allows multiple api() calls within the same file to share the same
|
|
73
|
+
* entry point (e.g. named exports from a single module).
|
|
74
|
+
*/
|
|
75
|
+
export function getEntryPoint(): string | undefined {
|
|
76
|
+
return __pendingEntryPoint;
|
|
70
77
|
}
|
|
71
78
|
|
|
72
79
|
/**
|
|
@@ -170,10 +177,10 @@ export interface CompiledApi<TInput = unknown, TOutput = unknown> {
|
|
|
170
177
|
* throw new Error('User not found');
|
|
171
178
|
* }
|
|
172
179
|
*
|
|
173
|
-
* await ctx.integrations.notifier.
|
|
174
|
-
* channel: '#user-lookups',
|
|
175
|
-
*
|
|
176
|
-
*
|
|
180
|
+
* await ctx.integrations.notifier.apiRequest(
|
|
181
|
+
* { method: 'POST', path: '/chat.postMessage', body: { channel: '#user-lookups', text: `Fetched user ${user.name}` } },
|
|
182
|
+
* { response: z.object({ ok: z.boolean() }) }
|
|
183
|
+
* );
|
|
177
184
|
*
|
|
178
185
|
* return { user };
|
|
179
186
|
* },
|
|
@@ -196,7 +203,7 @@ export function api<
|
|
|
196
203
|
const compiled: CompiledApi<z.infer<TInput>, z.infer<TOutput>> = {
|
|
197
204
|
name: config.name,
|
|
198
205
|
description: config.description,
|
|
199
|
-
entryPoint:
|
|
206
|
+
entryPoint: getEntryPoint(),
|
|
200
207
|
inputSchema: config.input,
|
|
201
208
|
outputSchema: config.output,
|
|
202
209
|
run: config.run as (
|
package/src/api/index.ts
CHANGED
|
@@ -4,7 +4,3 @@
|
|
|
4
4
|
|
|
5
5
|
export { api, __setEntryPoint } from "./definition.js";
|
|
6
6
|
export type { CompiledApi } from "./definition.js";
|
|
7
|
-
|
|
8
|
-
// Streaming API support
|
|
9
|
-
export { streamingApi, isStreamingApi } from "./streaming.js";
|
|
10
|
-
export type { StreamingApiConfig, CompiledStreamingApi } from "./streaming.js";
|
package/src/errors.ts
CHANGED
|
@@ -53,7 +53,7 @@ export class QueryValidationError extends Error {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* Error thrown when
|
|
56
|
+
* Error thrown when code execution fails.
|
|
57
57
|
*
|
|
58
58
|
* Contains context about the code, bindings, and any validation errors
|
|
59
59
|
* that occurred during execution.
|
|
@@ -80,51 +80,3 @@ export class CodeExecutionError extends Error {
|
|
|
80
80
|
Object.setPrototypeOf(this, CodeExecutionError.prototype);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Error thrown when a streamed chunk fails validation.
|
|
86
|
-
*
|
|
87
|
-
* Contains information about the chunk index, the raw chunk data,
|
|
88
|
-
* and the Zod validation error details.
|
|
89
|
-
*/
|
|
90
|
-
export class StreamChunkValidationError extends Error {
|
|
91
|
-
constructor(
|
|
92
|
-
message: string,
|
|
93
|
-
public readonly details: {
|
|
94
|
-
/** Index of the chunk that failed validation (0-based) */
|
|
95
|
-
chunkIndex: number;
|
|
96
|
-
/** The raw chunk data that failed validation */
|
|
97
|
-
chunk: unknown;
|
|
98
|
-
/** The complete Zod error object with all validation information */
|
|
99
|
-
zodError: z.ZodError;
|
|
100
|
-
},
|
|
101
|
-
) {
|
|
102
|
-
super(message);
|
|
103
|
-
this.name = "StreamChunkValidationError";
|
|
104
|
-
// Ensure proper prototype chain for instanceof checks
|
|
105
|
-
Object.setPrototypeOf(this, StreamChunkValidationError.prototype);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Error thrown when a streaming API encounters an error mid-stream.
|
|
111
|
-
*
|
|
112
|
-
* This error indicates that the stream was interrupted before completion.
|
|
113
|
-
* Contains context about where in the stream the error occurred.
|
|
114
|
-
*/
|
|
115
|
-
export class StreamError extends Error {
|
|
116
|
-
constructor(
|
|
117
|
-
message: string,
|
|
118
|
-
public readonly details?: {
|
|
119
|
-
/** Number of chunks successfully received before the error */
|
|
120
|
-
chunksReceived?: number;
|
|
121
|
-
/** The original error that caused the stream to fail */
|
|
122
|
-
originalError?: unknown;
|
|
123
|
-
},
|
|
124
|
-
) {
|
|
125
|
-
super(message);
|
|
126
|
-
this.name = "StreamError";
|
|
127
|
-
// Ensure proper prototype chain for instanceof checks
|
|
128
|
-
Object.setPrototypeOf(this, StreamError.prototype);
|
|
129
|
-
}
|
|
130
|
-
}
|