@superblocksteam/sdk-api 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +351 -427
- package/dist/api/definition.d.ts +12 -7
- package/dist/api/definition.d.ts.map +1 -1
- package/dist/api/definition.js +19 -12
- package/dist/api/definition.js.map +1 -1
- package/dist/api/definition.test.js +39 -15
- package/dist/api/definition.test.js.map +1 -1
- package/dist/api/index.d.ts +0 -2
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +0 -2
- package/dist/api/index.js.map +1 -1
- package/dist/errors.d.ts +1 -45
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +1 -33
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +16 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -15
- package/dist/index.js.map +1 -1
- package/dist/integrations/anthropic/types.d.ts +3 -22
- package/dist/integrations/anthropic/types.d.ts.map +1 -1
- package/dist/integrations/athena/client.d.ts +1 -1
- package/dist/integrations/athena/client.d.ts.map +1 -1
- package/dist/integrations/athena/client.js.map +1 -1
- package/dist/integrations/athena/types.d.ts +2 -2
- package/dist/integrations/athena/types.d.ts.map +1 -1
- package/dist/integrations/base/graphql-integration-client.d.ts +8 -4
- package/dist/integrations/base/graphql-integration-client.d.ts.map +1 -1
- package/dist/integrations/base/graphql-integration-client.js +18 -5
- package/dist/integrations/base/graphql-integration-client.js.map +1 -1
- package/dist/integrations/base/index.d.ts +3 -2
- package/dist/integrations/base/index.d.ts.map +1 -1
- package/dist/integrations/base/index.js +1 -0
- package/dist/integrations/base/index.js.map +1 -1
- package/dist/integrations/base/rest-api-client-base.d.ts +48 -0
- package/dist/integrations/base/rest-api-client-base.d.ts.map +1 -0
- package/dist/integrations/base/rest-api-client-base.js +98 -0
- package/dist/integrations/base/rest-api-client-base.js.map +1 -0
- package/dist/integrations/base/rest-api-integration-client.d.ts +11 -65
- package/dist/integrations/base/rest-api-integration-client.d.ts.map +1 -1
- package/dist/integrations/base/rest-api-integration-client.js +11 -174
- package/dist/integrations/base/rest-api-integration-client.js.map +1 -1
- package/dist/integrations/base/types.d.ts +1 -67
- package/dist/integrations/base/types.d.ts.map +1 -1
- package/dist/integrations/bigquery/client.d.ts +1 -1
- package/dist/integrations/bigquery/client.d.ts.map +1 -1
- package/dist/integrations/bigquery/client.js.map +1 -1
- package/dist/integrations/bigquery/types.d.ts +3 -3
- package/dist/integrations/bigquery/types.d.ts.map +1 -1
- package/dist/integrations/box/types.d.ts +1 -1
- package/dist/integrations/cockroachdb/client.d.ts +1 -1
- package/dist/integrations/cockroachdb/client.d.ts.map +1 -1
- package/dist/integrations/cockroachdb/client.js.map +1 -1
- package/dist/integrations/cockroachdb/types.d.ts.map +1 -1
- package/dist/integrations/cosmosdb/client.d.ts +1 -1
- package/dist/integrations/cosmosdb/client.d.ts.map +1 -1
- package/dist/integrations/cosmosdb/client.js.map +1 -1
- package/dist/integrations/cosmosdb/client.test.js.map +1 -1
- package/dist/integrations/cosmosdb/types.d.ts.map +1 -1
- package/dist/integrations/databricks/client.d.ts +1 -1
- package/dist/integrations/databricks/client.d.ts.map +1 -1
- package/dist/integrations/databricks/client.js.map +1 -1
- package/dist/integrations/databricks/types.d.ts +3 -3
- package/dist/integrations/databricks/types.d.ts.map +1 -1
- package/dist/integrations/declarations.d.ts +36 -104
- package/dist/integrations/declarations.d.ts.map +1 -1
- package/dist/integrations/declarations.js +5 -68
- package/dist/integrations/declarations.js.map +1 -1
- package/dist/integrations/declarations.test.js.map +1 -1
- package/dist/integrations/documentation-resolver.test.d.ts +2 -0
- package/dist/integrations/documentation-resolver.test.d.ts.map +1 -0
- package/dist/integrations/documentation-resolver.test.js +608 -0
- package/dist/integrations/documentation-resolver.test.js.map +1 -0
- package/dist/integrations/documentation.d.ts +8 -0
- package/dist/integrations/documentation.d.ts.map +1 -0
- package/dist/integrations/documentation.js +277 -0
- package/dist/integrations/documentation.js.map +1 -0
- package/dist/integrations/documentation.test.d.ts +2 -0
- package/dist/integrations/documentation.test.d.ts.map +1 -0
- package/dist/integrations/documentation.test.js +81 -0
- package/dist/integrations/documentation.test.js.map +1 -0
- package/dist/integrations/dynamodb/client.d.ts +1 -1
- package/dist/integrations/dynamodb/client.d.ts.map +1 -1
- package/dist/integrations/dynamodb/client.js.map +1 -1
- package/dist/integrations/dynamodb/types.d.ts.map +1 -1
- package/dist/integrations/gcs/client.d.ts +1 -1
- package/dist/integrations/gcs/client.d.ts.map +1 -1
- package/dist/integrations/gcs/client.js.map +1 -1
- package/dist/integrations/gcs/types.d.ts.map +1 -1
- package/dist/integrations/googledrive/types.d.ts +1 -1
- package/dist/integrations/graphql/client.test.d.ts +15 -0
- package/dist/integrations/graphql/client.test.d.ts.map +1 -0
- package/dist/integrations/graphql/client.test.js +148 -0
- package/dist/integrations/graphql/client.test.js.map +1 -0
- package/dist/integrations/graphql/types.d.ts +22 -3
- package/dist/integrations/graphql/types.d.ts.map +1 -1
- package/dist/integrations/gsheets/client.d.ts +1 -1
- package/dist/integrations/gsheets/client.d.ts.map +1 -1
- package/dist/integrations/gsheets/client.js.map +1 -1
- package/dist/integrations/gsheets/types.d.ts.map +1 -1
- package/dist/integrations/index.d.ts +2 -12
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +2 -8
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/lakebase/client.d.ts +1 -1
- package/dist/integrations/lakebase/client.d.ts.map +1 -1
- package/dist/integrations/lakebase/client.js.map +1 -1
- package/dist/integrations/lakebase/types.d.ts +4 -4
- package/dist/integrations/lakebase/types.d.ts.map +1 -1
- package/dist/integrations/mariadb/client.d.ts +1 -1
- package/dist/integrations/mariadb/client.d.ts.map +1 -1
- package/dist/integrations/mariadb/client.js.map +1 -1
- package/dist/integrations/mariadb/types.d.ts +2 -2
- package/dist/integrations/mariadb/types.d.ts.map +1 -1
- package/dist/integrations/mongodb/client.d.ts +1 -1
- package/dist/integrations/mongodb/client.d.ts.map +1 -1
- package/dist/integrations/mongodb/client.js.map +1 -1
- package/dist/integrations/mongodb/types.d.ts.map +1 -1
- package/dist/integrations/mssql/client.d.ts +1 -1
- package/dist/integrations/mssql/client.d.ts.map +1 -1
- package/dist/integrations/mssql/client.js.map +1 -1
- package/dist/integrations/mssql/types.d.ts +2 -2
- package/dist/integrations/mssql/types.d.ts.map +1 -1
- package/dist/integrations/mysql/client.d.ts +1 -1
- package/dist/integrations/mysql/client.d.ts.map +1 -1
- package/dist/integrations/mysql/client.js.map +1 -1
- package/dist/integrations/mysql/types.d.ts +4 -4
- package/dist/integrations/mysql/types.d.ts.map +1 -1
- package/dist/integrations/openai_v2/types.d.ts +4 -22
- package/dist/integrations/openai_v2/types.d.ts.map +1 -1
- package/dist/integrations/oracledb/client.d.ts +1 -1
- package/dist/integrations/oracledb/client.d.ts.map +1 -1
- package/dist/integrations/oracledb/client.js.map +1 -1
- package/dist/integrations/oracledb/types.d.ts +2 -2
- package/dist/integrations/oracledb/types.d.ts.map +1 -1
- package/dist/integrations/postgres/client.d.ts +2 -2
- package/dist/integrations/postgres/client.d.ts.map +1 -1
- package/dist/integrations/postgres/client.js.map +1 -1
- package/dist/integrations/postgres/types.d.ts.map +1 -1
- package/dist/integrations/redshift/client.d.ts +1 -1
- package/dist/integrations/redshift/client.d.ts.map +1 -1
- package/dist/integrations/redshift/client.js.map +1 -1
- package/dist/integrations/redshift/types.d.ts.map +1 -1
- package/dist/integrations/registry.d.ts +6 -27
- package/dist/integrations/registry.d.ts.map +1 -1
- package/dist/integrations/registry.js +64 -88
- package/dist/integrations/registry.js.map +1 -1
- package/dist/integrations/registry.test.js +1 -3
- package/dist/integrations/registry.test.js.map +1 -1
- package/dist/integrations/restapiintegration/types.d.ts +2 -2
- package/dist/integrations/restapiintegration/types.d.ts.map +1 -1
- package/dist/integrations/s3/client.d.ts +1 -1
- package/dist/integrations/s3/client.d.ts.map +1 -1
- package/dist/integrations/s3/client.js.map +1 -1
- package/dist/integrations/s3/types.d.ts +3 -1
- package/dist/integrations/s3/types.d.ts.map +1 -1
- package/dist/integrations/salesforce/client.d.ts +1 -1
- package/dist/integrations/salesforce/client.d.ts.map +1 -1
- package/dist/integrations/salesforce/client.js.map +1 -1
- package/dist/integrations/salesforce/types.d.ts.map +1 -1
- package/dist/integrations/slack/client.d.ts +13 -9
- package/dist/integrations/slack/client.d.ts.map +1 -1
- package/dist/integrations/slack/client.js +60 -8
- package/dist/integrations/slack/client.js.map +1 -1
- package/dist/integrations/slack/client.test.d.ts +11 -0
- package/dist/integrations/slack/client.test.d.ts.map +1 -0
- package/dist/integrations/slack/client.test.js +368 -0
- package/dist/integrations/slack/client.test.js.map +1 -0
- package/dist/integrations/slack/index.d.ts +2 -1
- package/dist/integrations/slack/index.d.ts.map +1 -1
- package/dist/integrations/slack/index.js +1 -0
- package/dist/integrations/slack/index.js.map +1 -1
- package/dist/integrations/slack/types.d.ts +127 -28
- package/dist/integrations/slack/types.d.ts.map +1 -1
- package/dist/integrations/slack/types.js +27 -1
- package/dist/integrations/slack/types.js.map +1 -1
- package/dist/integrations/smtp/client.d.ts +1 -1
- package/dist/integrations/smtp/client.d.ts.map +1 -1
- package/dist/integrations/smtp/client.js.map +1 -1
- package/dist/integrations/snowflake/client.d.ts +3 -3
- package/dist/integrations/snowflake/client.d.ts.map +1 -1
- package/dist/integrations/snowflake/client.js +2 -2
- package/dist/integrations/snowflake/client.js.map +1 -1
- package/dist/integrations/snowflake/types.d.ts.map +1 -1
- package/dist/integrations/snowflakecortex/client.d.ts +1 -2
- package/dist/integrations/snowflakecortex/client.d.ts.map +1 -1
- package/dist/integrations/snowflakecortex/client.js +1 -2
- package/dist/integrations/snowflakecortex/client.js.map +1 -1
- package/dist/integrations/snowflakecortex/types.d.ts +3 -4
- package/dist/integrations/snowflakecortex/types.d.ts.map +1 -1
- package/dist/integrations/snowflakepostgres/client.d.ts +1 -1
- package/dist/integrations/snowflakepostgres/client.d.ts.map +1 -1
- package/dist/integrations/snowflakepostgres/client.js.map +1 -1
- package/dist/integrations/snowflakepostgres/types.d.ts.map +1 -1
- package/dist/runtime/context.d.ts +3 -3
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/context.js.map +1 -1
- package/dist/runtime/executor.d.ts +2 -2
- package/dist/runtime/index.d.ts +0 -3
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -6
- package/dist/runtime/index.js.map +1 -1
- package/dist/types.d.ts +15 -6
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/api/definition.test.ts +41 -15
- package/src/api/definition.ts +20 -13
- package/src/api/index.ts +0 -4
- package/src/errors.ts +1 -49
- package/src/index.ts +20 -61
- package/src/integrations/airtable/docs.manifest.json +5 -0
- package/src/integrations/anthropic/README.md +5 -101
- package/src/integrations/anthropic/docs.manifest.json +5 -0
- package/src/integrations/anthropic/types.ts +3 -29
- package/src/integrations/asana/README.md +12 -12
- package/src/integrations/asana/docs.manifest.json +5 -0
- package/src/integrations/athena/README.md +4 -4
- package/src/integrations/athena/client.ts +5 -3
- package/src/integrations/athena/docs.manifest.json +5 -0
- package/src/integrations/athena/types.ts +3 -2
- package/src/integrations/base/graphql-integration-client.ts +27 -5
- package/src/integrations/base/index.ts +2 -3
- package/src/integrations/base/rest-api-client-base.ts +134 -0
- package/src/integrations/base/rest-api-integration-client.ts +15 -239
- package/src/integrations/base/types.ts +4 -74
- package/src/integrations/bigquery/README.md +28 -3
- package/src/integrations/bigquery/client.ts +5 -3
- package/src/integrations/bigquery/docs.manifest.json +5 -0
- package/src/integrations/bigquery/types.ts +4 -3
- package/src/integrations/bitbucket/README.md +19 -19
- package/src/integrations/bitbucket/docs.manifest.json +5 -0
- package/src/integrations/box/README.md +24 -24
- package/src/integrations/box/docs.manifest.json +5 -0
- package/src/integrations/box/types.ts +1 -1
- package/src/integrations/circleci/README.md +18 -18
- package/src/integrations/circleci/docs.manifest.json +5 -0
- package/src/integrations/cockroachdb/client.ts +5 -3
- package/src/integrations/cockroachdb/docs.manifest.json +5 -0
- package/src/integrations/cockroachdb/types.ts +1 -0
- package/src/integrations/cohere/README.md +11 -11
- package/src/integrations/cohere/docs.manifest.json +5 -0
- package/src/integrations/confluence/docs.manifest.json +5 -0
- package/src/integrations/cosmosdb/client.test.ts +2 -1
- package/src/integrations/cosmosdb/client.ts +5 -3
- package/src/integrations/cosmosdb/docs.manifest.json +5 -0
- package/src/integrations/cosmosdb/types.ts +1 -0
- package/src/integrations/databricks/README.md +29 -4
- package/src/integrations/databricks/client.ts +5 -3
- package/src/integrations/databricks/docs.manifest.json +5 -0
- package/src/integrations/databricks/types.ts +4 -3
- package/src/integrations/datadog/docs.manifest.json +5 -0
- package/src/integrations/declarations.test.ts +1 -0
- package/src/integrations/declarations.ts +36 -136
- package/src/integrations/documentation-resolver.test.ts +704 -0
- package/src/integrations/documentation.test.ts +120 -0
- package/src/integrations/documentation.ts +421 -0
- package/src/integrations/dropbox/docs.manifest.json +5 -0
- package/src/integrations/dynamodb/client.ts +3 -2
- package/src/integrations/dynamodb/docs.manifest.json +5 -0
- package/src/integrations/dynamodb/types.ts +1 -0
- package/src/integrations/elasticsearch/docs.manifest.json +5 -0
- package/src/integrations/fireworks/README.md +43 -17
- package/src/integrations/fireworks/docs.manifest.json +5 -0
- package/src/integrations/front/docs.manifest.json +5 -0
- package/src/integrations/gcs/client.ts +5 -3
- package/src/integrations/gcs/docs.manifest.json +5 -0
- package/src/integrations/gcs/types.ts +1 -0
- package/src/integrations/gemini/docs.manifest.json +5 -0
- package/src/integrations/github/docs.manifest.json +5 -0
- package/src/integrations/googleanalytics/README.md +2 -2
- package/src/integrations/googleanalytics/docs.manifest.json +5 -0
- package/src/integrations/googledrive/README.md +27 -24
- package/src/integrations/googledrive/docs.manifest.json +5 -0
- package/src/integrations/googledrive/types.ts +1 -1
- package/src/integrations/graphql/README.md +2 -2
- package/src/integrations/graphql/client.test.ts +220 -0
- package/src/integrations/graphql/docs.manifest.json +5 -0
- package/src/integrations/graphql/types.ts +23 -1
- package/src/integrations/groq/README.md +49 -42
- package/src/integrations/groq/docs.manifest.json +5 -0
- package/src/integrations/gsheets/README.md +2 -2
- package/src/integrations/gsheets/client.ts +5 -3
- package/src/integrations/gsheets/docs.manifest.json +5 -0
- package/src/integrations/gsheets/types.ts +1 -0
- package/src/integrations/hubspot/docs.manifest.json +5 -0
- package/src/integrations/index.ts +1 -52
- package/src/integrations/intercom/docs.manifest.json +5 -0
- package/src/integrations/jira/docs.manifest.json +5 -0
- package/src/integrations/lakebase/README.md +242 -0
- package/src/integrations/lakebase/client.ts +6 -4
- package/src/integrations/lakebase/docs.manifest.json +5 -0
- package/src/integrations/lakebase/types.ts +5 -4
- package/src/integrations/launchdarkly/README.md +2 -2
- package/src/integrations/launchdarkly/docs.manifest.json +5 -0
- package/src/integrations/mariadb/README.md +3 -3
- package/src/integrations/mariadb/client.ts +5 -3
- package/src/integrations/mariadb/docs.manifest.json +5 -0
- package/src/integrations/mariadb/types.ts +3 -2
- package/src/integrations/mistral/README.md +39 -13
- package/src/integrations/mistral/docs.manifest.json +5 -0
- package/src/integrations/mongodb/README.md +65 -12
- package/src/integrations/mongodb/client.ts +5 -3
- package/src/integrations/mongodb/docs.manifest.json +5 -0
- package/src/integrations/mongodb/types.ts +1 -0
- package/src/integrations/mssql/README.md +3 -3
- package/src/integrations/mssql/client.ts +5 -3
- package/src/integrations/mssql/docs.manifest.json +5 -0
- package/src/integrations/mssql/types.ts +3 -2
- package/src/integrations/mysql/README.md +4 -4
- package/src/integrations/mysql/client.ts +5 -3
- package/src/integrations/mysql/docs.manifest.json +5 -0
- package/src/integrations/mysql/types.ts +5 -4
- package/src/integrations/notion/docs.manifest.json +5 -0
- package/src/integrations/openai_v2/README.md +44 -116
- package/src/integrations/openai_v2/docs.manifest.json +5 -0
- package/src/integrations/openai_v2/types.ts +4 -29
- package/src/integrations/oracledb/README.md +3 -3
- package/src/integrations/oracledb/client.ts +5 -3
- package/src/integrations/oracledb/docs.manifest.json +5 -0
- package/src/integrations/oracledb/types.ts +3 -2
- package/src/integrations/pagerduty/README.md +2 -2
- package/src/integrations/pagerduty/docs.manifest.json +5 -0
- package/src/integrations/perplexity/README.md +39 -47
- package/src/integrations/perplexity/docs.manifest.json +5 -0
- package/src/integrations/postgres/client.ts +6 -4
- package/src/integrations/postgres/docs.manifest.json +5 -0
- package/src/integrations/postgres/types.ts +1 -0
- package/src/integrations/redshift/client.ts +5 -3
- package/src/integrations/redshift/docs.manifest.json +5 -0
- package/src/integrations/redshift/types.ts +1 -0
- package/src/integrations/registry.test.ts +2 -3
- package/src/integrations/registry.ts +69 -188
- package/src/integrations/restapiintegration/README.md +320 -0
- package/src/integrations/restapiintegration/docs.manifest.json +5 -0
- package/src/integrations/restapiintegration/types.ts +2 -8
- package/src/integrations/s3/client.ts +5 -3
- package/src/integrations/s3/docs.manifest.json +5 -0
- package/src/integrations/s3/types.ts +4 -1
- package/src/integrations/salesforce/README.md +11 -9
- package/src/integrations/salesforce/client.ts +3 -2
- package/src/integrations/salesforce/docs.manifest.json +5 -0
- package/src/integrations/salesforce/types.ts +1 -0
- package/src/integrations/segment/docs.manifest.json +5 -0
- package/src/integrations/sendgrid/README.md +2 -2
- package/src/integrations/sendgrid/docs.manifest.json +5 -0
- package/src/integrations/slack/README.md +62 -19
- package/src/integrations/slack/client.test.ts +553 -0
- package/src/integrations/slack/client.ts +92 -12
- package/src/integrations/slack/docs.manifest.json +5 -0
- package/src/integrations/slack/index.ts +6 -1
- package/src/integrations/slack/types.ts +142 -29
- package/src/integrations/smtp/README.md +220 -0
- package/src/integrations/smtp/client.ts +4 -2
- package/src/integrations/smtp/docs.manifest.json +5 -0
- package/src/integrations/snowflake/client.ts +7 -5
- package/src/integrations/snowflake/docs.manifest.json +5 -0
- package/src/integrations/snowflake/types.ts +1 -0
- package/src/integrations/snowflakecortex/README.md +167 -0
- package/src/integrations/snowflakecortex/client.ts +2 -3
- package/src/integrations/snowflakecortex/docs.manifest.json +5 -0
- package/src/integrations/snowflakecortex/types.ts +3 -11
- package/src/integrations/snowflakepostgres/README.md +233 -0
- package/src/integrations/snowflakepostgres/client.ts +1 -1
- package/src/integrations/snowflakepostgres/docs.manifest.json +5 -0
- package/src/integrations/snowflakepostgres/types.ts +1 -0
- package/src/integrations/stabilityai/README.md +2 -2
- package/src/integrations/stabilityai/docs.manifest.json +5 -0
- package/src/integrations/stripe/docs.manifest.json +5 -0
- package/src/integrations/superblocks-ocr/docs.manifest.json +5 -0
- package/src/integrations/twilio/docs.manifest.json +5 -0
- package/src/integrations/zendesk/docs.manifest.json +5 -0
- package/src/integrations/zoom/README.md +15 -15
- package/src/integrations/zoom/docs.manifest.json +5 -0
- package/src/runtime/context.ts +11 -11
- package/src/runtime/executor.ts +2 -2
- package/src/runtime/index.ts +1 -23
- package/src/types.ts +16 -6
- package/dist/api/streaming.d.ts +0 -229
- package/dist/api/streaming.d.ts.map +0 -1
- package/dist/api/streaming.js +0 -107
- package/dist/api/streaming.js.map +0 -1
- package/dist/api/streaming.test.d.ts +0 -5
- package/dist/api/streaming.test.d.ts.map +0 -1
- package/dist/api/streaming.test.js +0 -364
- package/dist/api/streaming.test.js.map +0 -1
- package/dist/integrations/couchbase/client.d.ts +0 -30
- package/dist/integrations/couchbase/client.d.ts.map +0 -1
- package/dist/integrations/couchbase/client.js +0 -154
- 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 -237
- 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
|
@@ -10,7 +10,9 @@ Interact with Fireworks AI's fast inference platform for LLM chat completions an
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Step 1: List Available Models
|
|
14
|
+
|
|
15
|
+
Model availability varies by account. Before making requests, validate which models are deployed on your account:
|
|
14
16
|
|
|
15
17
|
```typescript
|
|
16
18
|
import { api, z, fireworks } from "@superblocksteam/sdk-api";
|
|
@@ -18,6 +20,30 @@ import { api, z, fireworks } from "@superblocksteam/sdk-api";
|
|
|
18
20
|
// Integration ID from the integrations panel
|
|
19
21
|
const PROD_FIREWORKS = "a1b2c3d4-5678-90ab-cdef-fireworks001";
|
|
20
22
|
|
|
23
|
+
const ModelsResponseSchema = z.object({
|
|
24
|
+
data: z.array(
|
|
25
|
+
z.object({
|
|
26
|
+
id: z.string(),
|
|
27
|
+
object: z.string(),
|
|
28
|
+
}),
|
|
29
|
+
),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const models = await ctx.integrations.fireworks.apiRequest(
|
|
33
|
+
{
|
|
34
|
+
method: "GET",
|
|
35
|
+
path: "/v1/models",
|
|
36
|
+
},
|
|
37
|
+
{ response: ModelsResponseSchema },
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
// Use a model ID from the response in subsequent requests
|
|
41
|
+
const availableModelId = models.data[0]?.id;
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Chat Completion
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
21
47
|
const ChatCompletionResponseSchema = z.object({
|
|
22
48
|
id: z.string(),
|
|
23
49
|
object: z.string(),
|
|
@@ -55,7 +81,7 @@ export default api({
|
|
|
55
81
|
const result = await ctx.integrations.fireworks.apiRequest(
|
|
56
82
|
{
|
|
57
83
|
method: "POST",
|
|
58
|
-
path: "/
|
|
84
|
+
path: "/v1/chat/completions",
|
|
59
85
|
body: {
|
|
60
86
|
model: "accounts/fireworks/models/llama-v3p1-70b-instruct",
|
|
61
87
|
messages: [{ role: "user", content: prompt }],
|
|
@@ -76,7 +102,7 @@ export default api({
|
|
|
76
102
|
const llama70b = await ctx.integrations.fireworks.apiRequest(
|
|
77
103
|
{
|
|
78
104
|
method: "POST",
|
|
79
|
-
path: "/
|
|
105
|
+
path: "/v1/chat/completions",
|
|
80
106
|
body: {
|
|
81
107
|
model: "accounts/fireworks/models/llama-v3p1-70b-instruct",
|
|
82
108
|
messages: [{ role: "user", content: "Complex task..." }],
|
|
@@ -89,7 +115,7 @@ const llama70b = await ctx.integrations.fireworks.apiRequest(
|
|
|
89
115
|
const llama8b = await ctx.integrations.fireworks.apiRequest(
|
|
90
116
|
{
|
|
91
117
|
method: "POST",
|
|
92
|
-
path: "/
|
|
118
|
+
path: "/v1/chat/completions",
|
|
93
119
|
body: {
|
|
94
120
|
model: "accounts/fireworks/models/llama-v3p1-8b-instruct",
|
|
95
121
|
messages: [{ role: "user", content: "Simple task..." }],
|
|
@@ -102,7 +128,7 @@ const llama8b = await ctx.integrations.fireworks.apiRequest(
|
|
|
102
128
|
const mixtral = await ctx.integrations.fireworks.apiRequest(
|
|
103
129
|
{
|
|
104
130
|
method: "POST",
|
|
105
|
-
path: "/
|
|
131
|
+
path: "/v1/chat/completions",
|
|
106
132
|
body: {
|
|
107
133
|
model: "accounts/fireworks/models/mixtral-8x7b-instruct",
|
|
108
134
|
messages: [{ role: "user", content: "..." }],
|
|
@@ -115,7 +141,7 @@ const mixtral = await ctx.integrations.fireworks.apiRequest(
|
|
|
115
141
|
const qwen = await ctx.integrations.fireworks.apiRequest(
|
|
116
142
|
{
|
|
117
143
|
method: "POST",
|
|
118
|
-
path: "/
|
|
144
|
+
path: "/v1/chat/completions",
|
|
119
145
|
body: {
|
|
120
146
|
model: "accounts/fireworks/models/qwen2p5-coder-32b-instruct",
|
|
121
147
|
messages: [{ role: "user", content: "Write code..." }],
|
|
@@ -147,7 +173,7 @@ const EmbeddingsResponseSchema = z.object({
|
|
|
147
173
|
const result = await ctx.integrations.fireworks.apiRequest(
|
|
148
174
|
{
|
|
149
175
|
method: "POST",
|
|
150
|
-
path: "/
|
|
176
|
+
path: "/v1/embeddings",
|
|
151
177
|
body: {
|
|
152
178
|
model: "accounts/fireworks/models/nomic-embed-text-v1.5",
|
|
153
179
|
input: ["Hello world", "How are you?"],
|
|
@@ -188,7 +214,7 @@ const FunctionCallResponseSchema = z.object({
|
|
|
188
214
|
const result = await ctx.integrations.fireworks.apiRequest(
|
|
189
215
|
{
|
|
190
216
|
method: "POST",
|
|
191
|
-
path: "/
|
|
217
|
+
path: "/v1/chat/completions",
|
|
192
218
|
body: {
|
|
193
219
|
model: "accounts/fireworks/models/firefunction-v2",
|
|
194
220
|
messages: [{ role: "user", content: "What's the weather in Paris?" }],
|
|
@@ -220,7 +246,7 @@ const result = await ctx.integrations.fireworks.apiRequest(
|
|
|
220
246
|
const result = await ctx.integrations.fireworks.apiRequest(
|
|
221
247
|
{
|
|
222
248
|
method: "POST",
|
|
223
|
-
path: "/
|
|
249
|
+
path: "/v1/chat/completions",
|
|
224
250
|
body: {
|
|
225
251
|
model: "accounts/fireworks/models/llama-v3p1-70b-instruct",
|
|
226
252
|
messages: [{ role: "user", content: "List 3 colors in JSON format" }],
|
|
@@ -239,7 +265,7 @@ const data = JSON.parse(result.choices[0]?.message.content ?? "{}");
|
|
|
239
265
|
const result = await ctx.integrations.fireworks.apiRequest(
|
|
240
266
|
{
|
|
241
267
|
method: "POST",
|
|
242
|
-
path: "/
|
|
268
|
+
path: "/v1/chat/completions",
|
|
243
269
|
body: {
|
|
244
270
|
model: "accounts/fireworks/models/llama-v3p1-70b-instruct",
|
|
245
271
|
messages: [{ role: "user", content: "Generate user data" }],
|
|
@@ -276,7 +302,7 @@ await fireworks.complete({ ... });
|
|
|
276
302
|
|
|
277
303
|
// CORRECT - Use apiRequest
|
|
278
304
|
await ctx.integrations.fireworks.apiRequest(
|
|
279
|
-
{ method: "POST", path: "/
|
|
305
|
+
{ method: "POST", path: "/v1/chat/completions", body: { ... } },
|
|
280
306
|
{ response: ChatCompletionResponseSchema }
|
|
281
307
|
);
|
|
282
308
|
```
|
|
@@ -301,18 +327,18 @@ const body = {
|
|
|
301
327
|
|
|
302
328
|
### API Path
|
|
303
329
|
|
|
304
|
-
|
|
330
|
+
The integration's base URL already includes `https://api.fireworks.ai/inference`, so paths should start with `/v1/`:
|
|
305
331
|
|
|
306
332
|
```typescript
|
|
307
|
-
// WRONG -
|
|
333
|
+
// WRONG - Duplicates the /inference prefix (base URL already includes it)
|
|
308
334
|
await ctx.integrations.fireworks.apiRequest(
|
|
309
|
-
{ method: "POST", path: "/v1/chat/completions", body: { ... } },
|
|
335
|
+
{ method: "POST", path: "/inference/v1/chat/completions", body: { ... } },
|
|
310
336
|
{ response: schema }
|
|
311
337
|
);
|
|
312
338
|
|
|
313
|
-
// CORRECT -
|
|
339
|
+
// CORRECT - Start with /v1/ (the integration prepends /inference automatically)
|
|
314
340
|
await ctx.integrations.fireworks.apiRequest(
|
|
315
|
-
{ method: "POST", path: "/
|
|
341
|
+
{ method: "POST", path: "/v1/chat/completions", body: { ... } },
|
|
316
342
|
{ response: schema }
|
|
317
343
|
);
|
|
318
344
|
```
|
|
@@ -347,7 +373,7 @@ import { RestApiValidationError } from "@superblocksteam/sdk-api";
|
|
|
347
373
|
|
|
348
374
|
try {
|
|
349
375
|
const result = await ctx.integrations.fireworks.apiRequest(
|
|
350
|
-
{ method: "POST", path: "/
|
|
376
|
+
{ method: "POST", path: "/v1/chat/completions", body: { ... } },
|
|
351
377
|
{ response: ChatCompletionResponseSchema }
|
|
352
378
|
);
|
|
353
379
|
} catch (error) {
|
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
* Uses the native GCS plugin type from @superblocksteam/types.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { z } from "zod";
|
|
8
7
|
import type { PartialMessage } from "@bufbuild/protobuf";
|
|
8
|
+
import type { z } from "zod";
|
|
9
|
+
|
|
9
10
|
import type { Plugin as GCSPlugin } from "@superblocksteam/types/dist/src/plugins/gcs/v1/plugin_pb";
|
|
10
|
-
|
|
11
|
-
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
11
|
+
|
|
12
12
|
import { RestApiValidationError } from "../../errors.js";
|
|
13
13
|
import { IntegrationError } from "../../runtime/errors.js";
|
|
14
|
+
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
15
|
+
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
14
16
|
import type {
|
|
15
17
|
GCSClient,
|
|
16
18
|
GCSAction,
|
|
@@ -13,7 +13,7 @@ Run reports, get real-time data, and interact with Google Analytics 4 properties
|
|
|
13
13
|
### Run a Report
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { api, z,
|
|
16
|
+
import { api, z, googleAnalytics } from "@superblocksteam/sdk-api";
|
|
17
17
|
|
|
18
18
|
// Integration ID from the integrations panel
|
|
19
19
|
const PROD_GA4 = "a1b2c3d4-5678-90ab-cdef-ga4000000001";
|
|
@@ -46,7 +46,7 @@ const ReportResponseSchema = z.object({
|
|
|
46
46
|
|
|
47
47
|
export default api({
|
|
48
48
|
integrations: {
|
|
49
|
-
ga:
|
|
49
|
+
ga: googleAnalytics(PROD_GA4),
|
|
50
50
|
},
|
|
51
51
|
name: "GoogleAnalyticsExample",
|
|
52
52
|
input: z.object({
|
|
@@ -13,7 +13,7 @@ Upload, download, and manage files in Google Drive.
|
|
|
13
13
|
### List Files
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { api, z,
|
|
16
|
+
import { api, z, googleDrive } from "@superblocksteam/sdk-api";
|
|
17
17
|
|
|
18
18
|
// Integration ID from the integrations panel
|
|
19
19
|
const PROD_DRIVE = "a1b2c3d4-5678-90ab-cdef-gdrive000001";
|
|
@@ -45,7 +45,7 @@ const ListFilesResponseSchema = z.object({
|
|
|
45
45
|
|
|
46
46
|
export default api({
|
|
47
47
|
integrations: {
|
|
48
|
-
drive:
|
|
48
|
+
drive: googleDrive(PROD_DRIVE),
|
|
49
49
|
},
|
|
50
50
|
name: "GoogleDriveExample",
|
|
51
51
|
input: z.object({
|
|
@@ -71,7 +71,7 @@ export default api({
|
|
|
71
71
|
const result = await ctx.integrations.drive.apiRequest(
|
|
72
72
|
{
|
|
73
73
|
method: "GET",
|
|
74
|
-
path: "/
|
|
74
|
+
path: "/files",
|
|
75
75
|
params: {
|
|
76
76
|
q: query,
|
|
77
77
|
pageSize: pageSize,
|
|
@@ -99,7 +99,7 @@ export default api({
|
|
|
99
99
|
const file = await ctx.integrations.drive.apiRequest(
|
|
100
100
|
{
|
|
101
101
|
method: "GET",
|
|
102
|
-
path: `/
|
|
102
|
+
path: `/files/${fileId}`,
|
|
103
103
|
params: {
|
|
104
104
|
fields:
|
|
105
105
|
"id,name,mimeType,size,createdTime,modifiedTime,parents,webViewLink,webContentLink,owners",
|
|
@@ -120,7 +120,7 @@ const DownloadResponseSchema = z.string(); // Raw content
|
|
|
120
120
|
const content = await ctx.integrations.drive.apiRequest(
|
|
121
121
|
{
|
|
122
122
|
method: "GET",
|
|
123
|
-
path: `/
|
|
123
|
+
path: `/files/${fileId}`,
|
|
124
124
|
params: {
|
|
125
125
|
alt: "media",
|
|
126
126
|
},
|
|
@@ -134,7 +134,7 @@ const ExportResponseSchema = z.string();
|
|
|
134
134
|
const docContent = await ctx.integrations.drive.apiRequest(
|
|
135
135
|
{
|
|
136
136
|
method: "GET",
|
|
137
|
-
path: `/
|
|
137
|
+
path: `/files/${fileId}/export`,
|
|
138
138
|
params: {
|
|
139
139
|
mimeType: "text/plain", // or application/pdf, text/html, etc.
|
|
140
140
|
},
|
|
@@ -149,7 +149,7 @@ const docContent = await ctx.integrations.drive.apiRequest(
|
|
|
149
149
|
const folder = await ctx.integrations.drive.apiRequest(
|
|
150
150
|
{
|
|
151
151
|
method: "POST",
|
|
152
|
-
path: "/
|
|
152
|
+
path: "/files",
|
|
153
153
|
body: {
|
|
154
154
|
name: "New Folder",
|
|
155
155
|
mimeType: "application/vnd.google-apps.folder",
|
|
@@ -194,7 +194,7 @@ const uploadedFile = await ctx.integrations.drive.apiRequest(
|
|
|
194
194
|
const updatedFile = await ctx.integrations.drive.apiRequest(
|
|
195
195
|
{
|
|
196
196
|
method: "PATCH",
|
|
197
|
-
path: `/
|
|
197
|
+
path: `/files/${fileId}`,
|
|
198
198
|
body: {
|
|
199
199
|
name: "Renamed File.txt",
|
|
200
200
|
description: "Updated description",
|
|
@@ -210,7 +210,7 @@ const updatedFile = await ctx.integrations.drive.apiRequest(
|
|
|
210
210
|
const movedFile = await ctx.integrations.drive.apiRequest(
|
|
211
211
|
{
|
|
212
212
|
method: "PATCH",
|
|
213
|
-
path: `/
|
|
213
|
+
path: `/files/${fileId}`,
|
|
214
214
|
params: {
|
|
215
215
|
addParents: newFolderId,
|
|
216
216
|
removeParents: oldFolderId,
|
|
@@ -226,7 +226,7 @@ const movedFile = await ctx.integrations.drive.apiRequest(
|
|
|
226
226
|
const result = await ctx.integrations.drive.apiRequest(
|
|
227
227
|
{
|
|
228
228
|
method: "GET",
|
|
229
|
-
path: "/
|
|
229
|
+
path: "/files",
|
|
230
230
|
params: {
|
|
231
231
|
q: "name contains 'report' and mimeType = 'application/pdf' and trashed = false",
|
|
232
232
|
pageSize: 25,
|
|
@@ -250,7 +250,7 @@ const PermissionSchema = z.object({
|
|
|
250
250
|
const permission = await ctx.integrations.drive.apiRequest(
|
|
251
251
|
{
|
|
252
252
|
method: "POST",
|
|
253
|
-
path: `/
|
|
253
|
+
path: `/files/${fileId}/permissions`,
|
|
254
254
|
body: {
|
|
255
255
|
type: "user", // user, group, domain, anyone
|
|
256
256
|
role: "reader", // reader, writer, commenter, owner
|
|
@@ -271,7 +271,7 @@ const permission = await ctx.integrations.drive.apiRequest(
|
|
|
271
271
|
await ctx.integrations.drive.apiRequest(
|
|
272
272
|
{
|
|
273
273
|
method: "PATCH",
|
|
274
|
-
path: `/
|
|
274
|
+
path: `/files/${fileId}`,
|
|
275
275
|
body: {
|
|
276
276
|
trashed: true,
|
|
277
277
|
},
|
|
@@ -283,7 +283,7 @@ await ctx.integrations.drive.apiRequest(
|
|
|
283
283
|
await ctx.integrations.drive.apiRequest(
|
|
284
284
|
{
|
|
285
285
|
method: "DELETE",
|
|
286
|
-
path: `/
|
|
286
|
+
path: `/files/${fileId}`,
|
|
287
287
|
},
|
|
288
288
|
{ response: z.void() },
|
|
289
289
|
);
|
|
@@ -304,7 +304,7 @@ await drive.uploadFile({ ... });
|
|
|
304
304
|
|
|
305
305
|
// CORRECT - Use apiRequest
|
|
306
306
|
await ctx.integrations.drive.apiRequest(
|
|
307
|
-
{ method: "GET", path: "/
|
|
307
|
+
{ method: "GET", path: "/files", params: { ... } },
|
|
308
308
|
{ response: ListFilesResponseSchema }
|
|
309
309
|
);
|
|
310
310
|
```
|
|
@@ -316,7 +316,7 @@ By default, only basic fields are returned. Use the `fields` parameter:
|
|
|
316
316
|
```typescript
|
|
317
317
|
// WRONG - Missing fields, gets minimal data
|
|
318
318
|
const file = await ctx.integrations.drive.apiRequest(
|
|
319
|
-
{ method: "GET", path: `/
|
|
319
|
+
{ method: "GET", path: `/files/${fileId}` },
|
|
320
320
|
{ response: FileSchema },
|
|
321
321
|
);
|
|
322
322
|
// file.size, file.owners, etc. will be undefined
|
|
@@ -325,7 +325,7 @@ const file = await ctx.integrations.drive.apiRequest(
|
|
|
325
325
|
const file = await ctx.integrations.drive.apiRequest(
|
|
326
326
|
{
|
|
327
327
|
method: "GET",
|
|
328
|
-
path: `/
|
|
328
|
+
path: `/files/${fileId}`,
|
|
329
329
|
params: {
|
|
330
330
|
fields: "id,name,mimeType,size,createdTime,modifiedTime,owners",
|
|
331
331
|
},
|
|
@@ -367,10 +367,10 @@ Google Docs, Sheets, etc. must be exported, not downloaded directly:
|
|
|
367
367
|
|
|
368
368
|
```typescript
|
|
369
369
|
// Regular files - use alt=media
|
|
370
|
-
const path = `/
|
|
370
|
+
const path = `/files/${fileId}?alt=media`;
|
|
371
371
|
|
|
372
372
|
// Google Docs - use export endpoint
|
|
373
|
-
const path = `/
|
|
373
|
+
const path = `/files/${fileId}/export?mimeType=text/plain`;
|
|
374
374
|
|
|
375
375
|
// Export formats for Google Docs
|
|
376
376
|
// Documents: text/plain, text/html, application/pdf, application/vnd.oasis.opendocument.text
|
|
@@ -396,14 +396,17 @@ const sizeMB = sizeBytes / (1024 * 1024);
|
|
|
396
396
|
|
|
397
397
|
### Upload Path vs Regular Path
|
|
398
398
|
|
|
399
|
-
|
|
399
|
+
The base URL already includes `/drive/v3`, so regular API paths omit this prefix. However, uploads use a different URL root (`/upload/drive/v3/...` instead of `/drive/v3/...`) and require the full path:
|
|
400
400
|
|
|
401
401
|
```typescript
|
|
402
|
-
// Regular API calls
|
|
403
|
-
const path = "/
|
|
402
|
+
// Regular API calls (base URL already has /drive/v3)
|
|
403
|
+
const path = "/files";
|
|
404
404
|
|
|
405
|
-
// Upload calls
|
|
405
|
+
// Upload calls use a different URL root — include the full path
|
|
406
406
|
const path = "/upload/drive/v3/files";
|
|
407
|
+
|
|
408
|
+
// WRONG - Duplicates base URL prefix for regular calls
|
|
409
|
+
const path = "/drive/v3/files";
|
|
407
410
|
```
|
|
408
411
|
|
|
409
412
|
### Folder MIME Type
|
|
@@ -436,7 +439,7 @@ async function getAllFiles(drive: GoogleDriveClient, folderId: string) {
|
|
|
436
439
|
const result = await ctx.integrations.drive.apiRequest(
|
|
437
440
|
{
|
|
438
441
|
method: "GET",
|
|
439
|
-
path: "/
|
|
442
|
+
path: "/files",
|
|
440
443
|
params: {
|
|
441
444
|
q: `'${folderId}' in parents and trashed = false`,
|
|
442
445
|
pageSize: 100,
|
|
@@ -463,7 +466,7 @@ import { RestApiValidationError } from "@superblocksteam/sdk-api";
|
|
|
463
466
|
|
|
464
467
|
try {
|
|
465
468
|
const result = await ctx.integrations.drive.apiRequest(
|
|
466
|
-
{ method: "GET", path: "/
|
|
469
|
+
{ method: "GET", path: "/files", params: { ... } },
|
|
467
470
|
{ response: ListFilesResponseSchema }
|
|
468
471
|
);
|
|
469
472
|
} catch (error) {
|
|
@@ -112,7 +112,7 @@ const CreateUserResponseSchema = z.object({
|
|
|
112
112
|
}),
|
|
113
113
|
});
|
|
114
114
|
|
|
115
|
-
const result = await graphql.mutation(
|
|
115
|
+
const result = await ctx.integrations.graphql.mutation(
|
|
116
116
|
`mutation CreateUser($input: CreateUserInput!) {
|
|
117
117
|
createUser(input: $input) {
|
|
118
118
|
id
|
|
@@ -150,7 +150,7 @@ const UpdateOrderResponseSchema = z.object({
|
|
|
150
150
|
}),
|
|
151
151
|
});
|
|
152
152
|
|
|
153
|
-
const result = await graphql.mutation(
|
|
153
|
+
const result = await ctx.integrations.graphql.mutation(
|
|
154
154
|
`mutation UpdateOrder($id: ID!, $input: UpdateOrderInput!) {
|
|
155
155
|
updateOrder(id: $id, input: $input) {
|
|
156
156
|
id
|