@superblocksteam/sdk-api 2.0.103 → 2.0.104-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -299
- package/dist/api/definition.js +1 -1
- package/dist/api/definition.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 +0 -44
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +0 -32
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -9
- 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/types.d.ts +2 -2
- package/dist/integrations/base/index.d.ts +1 -1
- package/dist/integrations/base/index.d.ts.map +1 -1
- package/dist/integrations/base/rest-api-integration-client.d.ts +4 -48
- package/dist/integrations/base/rest-api-integration-client.d.ts.map +1 -1
- package/dist/integrations/base/rest-api-integration-client.js +2 -110
- 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/types.d.ts +3 -3
- package/dist/integrations/databricks/types.d.ts +3 -3
- 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 +83 -0
- package/dist/integrations/documentation.test.js.map +1 -0
- package/dist/integrations/index.d.ts +1 -1
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/lakebase/types.d.ts +4 -4
- package/dist/integrations/mariadb/types.d.ts +2 -2
- package/dist/integrations/mssql/types.d.ts +2 -2
- package/dist/integrations/mysql/types.d.ts +4 -4
- 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/types.d.ts +2 -2
- package/dist/integrations/registry.d.ts +0 -16
- package/dist/integrations/registry.d.ts.map +1 -1
- package/dist/integrations/registry.js +38 -38
- 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/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/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/package.json +1 -1
- package/src/api/definition.ts +1 -1
- package/src/api/index.ts +0 -4
- package/src/errors.ts +0 -48
- package/src/index.ts +2 -28
- package/src/integrations/anthropic/README.md +5 -101
- package/src/integrations/anthropic/types.ts +3 -29
- package/src/integrations/athena/README.md +4 -4
- package/src/integrations/athena/types.ts +2 -2
- package/src/integrations/base/index.ts +0 -2
- package/src/integrations/base/rest-api-integration-client.ts +4 -153
- package/src/integrations/base/types.ts +3 -74
- package/src/integrations/bigquery/README.md +28 -3
- package/src/integrations/bigquery/types.ts +3 -3
- package/src/integrations/cohere/README.md +11 -11
- package/src/integrations/databricks/README.md +29 -4
- package/src/integrations/databricks/types.ts +3 -3
- package/src/integrations/documentation.test.ts +122 -0
- package/src/integrations/fireworks/README.md +43 -17
- package/src/integrations/googleanalytics/README.md +2 -2
- package/src/integrations/googledrive/README.md +2 -2
- package/src/integrations/groq/README.md +41 -34
- package/src/integrations/gsheets/README.md +2 -2
- package/src/integrations/index.ts +0 -1
- package/src/integrations/lakebase/types.ts +4 -4
- package/src/integrations/launchdarkly/README.md +2 -2
- package/src/integrations/mariadb/README.md +3 -3
- package/src/integrations/mariadb/types.ts +2 -2
- package/src/integrations/mistral/README.md +39 -13
- package/src/integrations/mssql/README.md +3 -3
- package/src/integrations/mssql/types.ts +2 -2
- package/src/integrations/mysql/README.md +4 -4
- package/src/integrations/mysql/types.ts +4 -4
- package/src/integrations/openai_v2/README.md +44 -116
- package/src/integrations/openai_v2/types.ts +4 -29
- package/src/integrations/oracledb/README.md +3 -3
- package/src/integrations/oracledb/types.ts +2 -2
- package/src/integrations/pagerduty/README.md +2 -2
- package/src/integrations/perplexity/README.md +2 -1
- package/src/integrations/registry.test.ts +1 -3
- package/src/integrations/registry.ts +38 -127
- package/src/integrations/restapiintegration/README.md +4 -43
- package/src/integrations/restapiintegration/types.ts +2 -8
- package/src/integrations/sendgrid/README.md +2 -2
- package/src/integrations/snowflakecortex/README.md +4 -53
- package/src/integrations/snowflakecortex/client.ts +2 -3
- package/src/integrations/snowflakecortex/types.ts +3 -11
- package/src/integrations/stabilityai/README.md +2 -2
- package/src/runtime/index.ts +1 -23
- 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/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 -433
- package/src/api/streaming.ts +0 -303
- package/src/runtime/execute.ts +0 -221
- package/src/runtime/streaming-context.ts +0 -164
- package/src/runtime/streaming-executor.ts +0 -367
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC/D,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGxD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC/D,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGxD,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGxE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG7E,YAAY,EACV,SAAS,EACT,UAAU,EACV,OAAO,EACP,MAAM,EACN,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,eAAe,GAChB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SA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,GACd,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -55,23 +55,19 @@ export { z } from "zod";
|
|
|
55
55
|
// Canonical file contracts
|
|
56
56
|
export { fileRefSchema, readableFileSchema } from "./files.js";
|
|
57
57
|
// API definition and registry
|
|
58
|
-
export { api, __setEntryPoint
|
|
59
|
-
// Streaming API support
|
|
60
|
-
streamingApi, isStreamingApi, } from "./api/index.js";
|
|
58
|
+
export { api, __setEntryPoint } from "./api/index.js";
|
|
61
59
|
// Integration declaration functions
|
|
62
60
|
export { postgres, slack, openai, anthropic, stripe, github, notion, snowflake, snowflakeCortex, airtable, asana, bitbucket, box, circleci, cohere, confluence, datadog, dropbox, elasticsearch, fireworks, front, gemini, googleAnalytics, googleDrive, groq, hubspot, intercom, jira, launchDarkly, mistral, pagerDuty, perplexity, segment, sendGrid, stabilityAI, twilio, zendesk, zoom, graphql, mysql, mariadb, mssql, cockroachdb, oracledb, redshift, athena, databricks, bigquery, mongodb, dynamodb, cosmosdb, couchbase, s3, gcs, googleSheets, kafka, kinesis, salesforce, redis, superblocksOcr, python, restApiIntegration, getIntegrationDeclarations, confluent, redpanda, lakebase, snowflakePostgres, smtp, } from "./integrations/index.js";
|
|
63
61
|
// Runtime (for orchestrator use)
|
|
64
62
|
export {
|
|
65
|
-
//
|
|
66
|
-
|
|
67
|
-
// Legacy executors (still available for specific use cases)
|
|
68
|
-
executeApi, executeStreamingApi, createStreamingApiGenerator,
|
|
63
|
+
// Executor
|
|
64
|
+
executeApi,
|
|
69
65
|
// Context factories
|
|
70
|
-
createApiContext,
|
|
66
|
+
createApiContext,
|
|
71
67
|
// Error types
|
|
72
68
|
SdkError, InputValidationError, OutputValidationError, IntegrationNotFoundError, IntegrationError, ExecutionError, ErrorCode, } from "./runtime/index.js";
|
|
73
69
|
// Integration registry (for orchestrator use)
|
|
74
70
|
export { createClient, isPluginSupported, SUPPORTED_PLUGINS, } from "./integrations/index.js";
|
|
75
71
|
// SDK-level error types
|
|
76
|
-
export { RestApiValidationError, QueryValidationError, CodeExecutionError,
|
|
72
|
+
export { RestApiValidationError, QueryValidationError, CodeExecutionError, } from "./errors.js";
|
|
77
73
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,gCAAgC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2BAA2B;AAC3B,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAG/D,8BAA8B;AAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,gCAAgC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2BAA2B;AAC3B,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAG/D,8BAA8B;AAC9B,OAAO,EAAE,GAAG,EAAE,eAAe,EAAoB,MAAM,gBAAgB,CAAC;AAiBxE,oCAAoC;AACpC,OAAO,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,MAAM,EACN,MAAM,EACN,MAAM,EACN,SAAS,EACT,eAAe,EACf,QAAQ,EACR,KAAK,EACL,SAAS,EACT,GAAG,EACH,QAAQ,EACR,MAAM,EACN,UAAU,EACV,OAAO,EACP,OAAO,EACP,aAAa,EACb,SAAS,EACT,KAAK,EACL,MAAM,EACN,eAAe,EACf,WAAW,EACX,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,SAAS,EACT,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,MAAM,EACN,OAAO,EACP,IAAI,EACJ,OAAO,EACP,KAAK,EACL,OAAO,EACP,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,UAAU,EACV,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,EAAE,EACF,GAAG,EACH,YAAY,EACZ,KAAK,EACL,OAAO,EACP,UAAU,EACV,KAAK,EACL,cAAc,EACd,MAAM,EACN,kBAAkB,EAClB,0BAA0B,EAC1B,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,IAAI,GAsEL,MAAM,yBAAyB,CAAC;AAwEjC,iCAAiC;AACjC,OAAO;AACL,WAAW;AACX,UAAU;AACV,oBAAoB;AACpB,gBAAgB;AAChB,cAAc;AACd,QAAQ,EACR,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,SAAS,GACV,MAAM,oBAAoB,CAAC;AAY5B,8CAA8C;AAC9C,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AAWjC,wBAAwB;AACxB,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,aAAa,CAAC"}
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
* Anthropic 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
|
* Anthropic client for Claude AI model interactions.
|
|
8
8
|
*
|
|
9
|
-
* Provides the generic apiRequest() method for any Anthropic API endpoint
|
|
10
|
-
* and streamApiRequest() for streaming responses.
|
|
9
|
+
* Provides the generic apiRequest() method for any Anthropic API endpoint.
|
|
11
10
|
* Use this to interact with Anthropic's messages API and other endpoints.
|
|
12
11
|
*
|
|
13
12
|
* @example
|
|
@@ -53,26 +52,8 @@ import type { SupportsApiRequest, SupportsStreamingApiRequest } from "../base/in
|
|
|
53
52
|
* }
|
|
54
53
|
* );
|
|
55
54
|
*
|
|
56
|
-
* // Or use streaming for real-time responses
|
|
57
|
-
* const stream = anthropic.streamApiRequest(
|
|
58
|
-
* {
|
|
59
|
-
* method: 'POST',
|
|
60
|
-
* path: '/v1/messages',
|
|
61
|
-
* body: {
|
|
62
|
-
* model: 'claude-3-5-sonnet-20241022',
|
|
63
|
-
* max_tokens: 1024,
|
|
64
|
-
* stream: true,
|
|
65
|
-
* messages: [{ role: 'user', content: 'Hello!' }],
|
|
66
|
-
* },
|
|
67
|
-
* },
|
|
68
|
-
* { chunk: StreamEventSchema }
|
|
69
|
-
* );
|
|
70
|
-
*
|
|
71
|
-
* for await (const event of stream) {
|
|
72
|
-
* // Handle streaming events
|
|
73
|
-
* }
|
|
74
55
|
* ```
|
|
75
56
|
*/
|
|
76
|
-
export interface AnthropicClient extends BaseIntegrationClient, SupportsApiRequest
|
|
57
|
+
export interface AnthropicClient extends BaseIntegrationClient, SupportsApiRequest {
|
|
77
58
|
}
|
|
78
59
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/anthropic/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/anthropic/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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,WAAW,eACf,SAAQ,qBAAqB,EAAE,kBAAkB;CAElD"}
|
|
@@ -22,7 +22,7 @@ import type { TraceMetadata } from "../registry.js";
|
|
|
22
22
|
* });
|
|
23
23
|
*
|
|
24
24
|
* const logs = await athena.query(
|
|
25
|
-
* 'SELECT * FROM logs WHERE level =
|
|
25
|
+
* 'SELECT * FROM logs WHERE level = ?',
|
|
26
26
|
* LogSchema,
|
|
27
27
|
* ['ERROR']
|
|
28
28
|
* );
|
|
@@ -32,7 +32,7 @@ export interface AthenaClient extends BaseIntegrationClient {
|
|
|
32
32
|
/**
|
|
33
33
|
* Execute a SQL query and validate results against a Zod schema.
|
|
34
34
|
*
|
|
35
|
-
* @param sql - SQL query string (use
|
|
35
|
+
* @param sql - SQL query string (use ? placeholders for parameters)
|
|
36
36
|
* @param schema - Zod schema to validate the query results
|
|
37
37
|
* @param params - Optional query parameters
|
|
38
38
|
* @returns Promise resolving to validated query results
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
export { RestApiIntegrationClient } from "./rest-api-integration-client.js";
|
|
5
5
|
export type { RestApiRequest } from "./rest-api-integration-client.js";
|
|
6
6
|
export { GraphQLIntegrationClient } from "./graphql-integration-client.js";
|
|
7
|
-
export type { ApiRequestOptions, ApiRequestSchema, SupportsApiRequest,
|
|
7
|
+
export type { ApiRequestOptions, ApiRequestSchema, SupportsApiRequest, } from "./types.js";
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/base/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,YAAY,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/base/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,YAAY,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,YAAY,CAAC"}
|
|
@@ -7,24 +7,22 @@ import type { PartialMessage } from "@bufbuild/protobuf";
|
|
|
7
7
|
import type { z } from "zod";
|
|
8
8
|
import type { Property } from "@superblocksteam/types/dist/src/common/v1/plugin_pb";
|
|
9
9
|
import type { Plugin as RestApiIntegrationPlugin } from "@superblocksteam/types/dist/src/plugins/restapiintegration/v1/plugin_pb";
|
|
10
|
-
import type { QueryExecutor,
|
|
10
|
+
import type { QueryExecutor, TraceMetadata } from "../registry.js";
|
|
11
11
|
import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
|
|
12
|
-
import type { ApiRequestOptions, ApiRequestSchema, SupportsApiRequest
|
|
12
|
+
import type { ApiRequestOptions, ApiRequestSchema, SupportsApiRequest } from "./types.js";
|
|
13
13
|
export type RestApiRequest = PartialMessage<RestApiIntegrationPlugin>;
|
|
14
14
|
/**
|
|
15
15
|
* Base implementation for REST API Integration clients.
|
|
16
16
|
*
|
|
17
17
|
* All OpenAPI-based integration clients extend this class to inherit
|
|
18
18
|
* the generic apiRequest() method with runtime schema validation.
|
|
19
|
-
* Also supports streaming API requests when a streaming executor is provided.
|
|
20
19
|
*/
|
|
21
|
-
export declare abstract class RestApiIntegrationClient implements IntegrationClientImpl, SupportsApiRequest
|
|
20
|
+
export declare abstract class RestApiIntegrationClient implements IntegrationClientImpl, SupportsApiRequest {
|
|
22
21
|
readonly name: string;
|
|
23
22
|
readonly pluginId: string;
|
|
24
23
|
readonly config: IntegrationConfig;
|
|
25
24
|
protected readonly executeQuery: QueryExecutor;
|
|
26
|
-
|
|
27
|
-
constructor(config: IntegrationConfig, executeQuery: QueryExecutor, executeStreamingQuery?: StreamingQueryExecutor);
|
|
25
|
+
constructor(config: IntegrationConfig, executeQuery: QueryExecutor);
|
|
28
26
|
/**
|
|
29
27
|
* Helper to create a Property object for params.
|
|
30
28
|
*/
|
|
@@ -32,47 +30,5 @@ export declare abstract class RestApiIntegrationClient implements IntegrationCli
|
|
|
32
30
|
apiRequest<TBody, TResponse>(options: ApiRequestOptions<TBody>, schema: ApiRequestSchema<TBody, TResponse> & {
|
|
33
31
|
response: z.ZodSchema<TResponse>;
|
|
34
32
|
}, metadata?: TraceMetadata): Promise<TResponse>;
|
|
35
|
-
/**
|
|
36
|
-
* Execute a streaming API request with type-safe chunk validation.
|
|
37
|
-
*
|
|
38
|
-
* Returns an AsyncIterable that yields validated chunks as they arrive.
|
|
39
|
-
* Each chunk is validated against the provided schema before being yielded.
|
|
40
|
-
*
|
|
41
|
-
* @param options - Request configuration including method, path, params, and body
|
|
42
|
-
* @param schema - Zod schemas for request body and chunk validation
|
|
43
|
-
* @param metadata - Optional trace metadata for observability (label, description)
|
|
44
|
-
* @returns AsyncIterable yielding validated chunks
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```typescript
|
|
48
|
-
* const ChunkSchema = z.object({
|
|
49
|
-
* id: z.string(),
|
|
50
|
-
* choices: z.array(z.object({
|
|
51
|
-
* delta: z.object({
|
|
52
|
-
* content: z.string().optional(),
|
|
53
|
-
* }),
|
|
54
|
-
* })),
|
|
55
|
-
* });
|
|
56
|
-
*
|
|
57
|
-
* const stream = client.streamApiRequest(
|
|
58
|
-
* {
|
|
59
|
-
* method: 'POST',
|
|
60
|
-
* path: '/v1/chat/completions',
|
|
61
|
-
* body: {
|
|
62
|
-
* model: 'gpt-4',
|
|
63
|
-
* stream: true,
|
|
64
|
-
* messages: [{ role: 'user', content: 'Hello!' }],
|
|
65
|
-
* },
|
|
66
|
-
* },
|
|
67
|
-
* { chunk: ChunkSchema },
|
|
68
|
-
* { label: 'openai.chatCompletions', description: 'Stream chat completion' }
|
|
69
|
-
* );
|
|
70
|
-
*
|
|
71
|
-
* for await (const chunk of stream) {
|
|
72
|
-
* console.log(chunk.choices[0]?.delta?.content);
|
|
73
|
-
* }
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
streamApiRequest<TBody, TChunk>(options: ApiRequestOptions<TBody>, schema: StreamApiRequestSchema<TBody, TChunk>, metadata?: TraceMetadata): AsyncIterable<TChunk>;
|
|
77
33
|
}
|
|
78
34
|
//# sourceMappingURL=rest-api-integration-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest-api-integration-client.d.ts","sourceRoot":"","sources":["../../../src/integrations/base/rest-api-integration-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qDAAqD,CAAC;AACpF,OAAO,KAAK,EAAE,MAAM,IAAI,wBAAwB,EAAE,MAAM,yEAAyE,CAAC;
|
|
1
|
+
{"version":3,"file":"rest-api-integration-client.d.ts","sourceRoot":"","sources":["../../../src/integrations/base/rest-api-integration-client.ts"],"names":[],"m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AAO,CAAC,SAAS,CAAC;CAsEtB"}
|
|
@@ -3,26 +3,23 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides common apiRequest() method for all OpenAPI-based plugins.
|
|
5
5
|
*/
|
|
6
|
-
import { RestApiValidationError
|
|
6
|
+
import { RestApiValidationError } from "../../errors.js";
|
|
7
7
|
/**
|
|
8
8
|
* Base implementation for REST API Integration clients.
|
|
9
9
|
*
|
|
10
10
|
* All OpenAPI-based integration clients extend this class to inherit
|
|
11
11
|
* the generic apiRequest() method with runtime schema validation.
|
|
12
|
-
* Also supports streaming API requests when a streaming executor is provided.
|
|
13
12
|
*/
|
|
14
13
|
export class RestApiIntegrationClient {
|
|
15
14
|
name;
|
|
16
15
|
pluginId;
|
|
17
16
|
config;
|
|
18
17
|
executeQuery;
|
|
19
|
-
|
|
20
|
-
constructor(config, executeQuery, executeStreamingQuery) {
|
|
18
|
+
constructor(config, executeQuery) {
|
|
21
19
|
this.name = config.name;
|
|
22
20
|
this.pluginId = config.pluginId;
|
|
23
21
|
this.config = config;
|
|
24
22
|
this.executeQuery = executeQuery;
|
|
25
|
-
this.executeStreamingQuery = executeStreamingQuery;
|
|
26
23
|
}
|
|
27
24
|
/**
|
|
28
25
|
* Helper to create a Property object for params.
|
|
@@ -85,110 +82,5 @@ export class RestApiIntegrationClient {
|
|
|
85
82
|
}
|
|
86
83
|
return responseParseResult.data;
|
|
87
84
|
}
|
|
88
|
-
/**
|
|
89
|
-
* Execute a streaming API request with type-safe chunk validation.
|
|
90
|
-
*
|
|
91
|
-
* Returns an AsyncIterable that yields validated chunks as they arrive.
|
|
92
|
-
* Each chunk is validated against the provided schema before being yielded.
|
|
93
|
-
*
|
|
94
|
-
* @param options - Request configuration including method, path, params, and body
|
|
95
|
-
* @param schema - Zod schemas for request body and chunk validation
|
|
96
|
-
* @param metadata - Optional trace metadata for observability (label, description)
|
|
97
|
-
* @returns AsyncIterable yielding validated chunks
|
|
98
|
-
*
|
|
99
|
-
* @example
|
|
100
|
-
* ```typescript
|
|
101
|
-
* const ChunkSchema = z.object({
|
|
102
|
-
* id: z.string(),
|
|
103
|
-
* choices: z.array(z.object({
|
|
104
|
-
* delta: z.object({
|
|
105
|
-
* content: z.string().optional(),
|
|
106
|
-
* }),
|
|
107
|
-
* })),
|
|
108
|
-
* });
|
|
109
|
-
*
|
|
110
|
-
* const stream = client.streamApiRequest(
|
|
111
|
-
* {
|
|
112
|
-
* method: 'POST',
|
|
113
|
-
* path: '/v1/chat/completions',
|
|
114
|
-
* body: {
|
|
115
|
-
* model: 'gpt-4',
|
|
116
|
-
* stream: true,
|
|
117
|
-
* messages: [{ role: 'user', content: 'Hello!' }],
|
|
118
|
-
* },
|
|
119
|
-
* },
|
|
120
|
-
* { chunk: ChunkSchema },
|
|
121
|
-
* { label: 'openai.chatCompletions', description: 'Stream chat completion' }
|
|
122
|
-
* );
|
|
123
|
-
*
|
|
124
|
-
* for await (const chunk of stream) {
|
|
125
|
-
* console.log(chunk.choices[0]?.delta?.content);
|
|
126
|
-
* }
|
|
127
|
-
* ```
|
|
128
|
-
*/
|
|
129
|
-
async *streamApiRequest(options, schema, metadata) {
|
|
130
|
-
// Validate that streaming is supported
|
|
131
|
-
if (!this.executeStreamingQuery) {
|
|
132
|
-
throw new Error(`Streaming is not supported for integration "${this.name}". ` +
|
|
133
|
-
"The orchestrator must provide a streaming query executor.");
|
|
134
|
-
}
|
|
135
|
-
// Validate request body against schema if both are present.
|
|
136
|
-
// Body schema is optional — if not provided, the body is sent unvalidated.
|
|
137
|
-
if (options.body !== undefined && schema?.body) {
|
|
138
|
-
const bodyParseResult = schema.body.safeParse(options.body);
|
|
139
|
-
if (!bodyParseResult.success) {
|
|
140
|
-
throw new RestApiValidationError(`Request body validation failed: ${bodyParseResult.error.message}`, {
|
|
141
|
-
zodError: bodyParseResult.error,
|
|
142
|
-
data: options.body,
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
// Convert headers to Property array
|
|
147
|
-
const headers = [];
|
|
148
|
-
if (options.headers) {
|
|
149
|
-
for (const [key, value] of Object.entries(options.headers)) {
|
|
150
|
-
headers.push(this.createParam(key, value));
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
// Convert query params to Property array
|
|
154
|
-
const params = [];
|
|
155
|
-
if (options.params) {
|
|
156
|
-
for (const [key, value] of Object.entries(options.params)) {
|
|
157
|
-
params.push(this.createParam(key, value));
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
// Build the request using raw HTTP mode with streaming response
|
|
161
|
-
// Note: responseType must be "raw" for streaming - the orchestrator's
|
|
162
|
-
// Stream block expects SSE responses and only works with "raw" type.
|
|
163
|
-
const request = {
|
|
164
|
-
openApiAction: "genericHttpRequest",
|
|
165
|
-
httpMethod: options.method.toUpperCase(),
|
|
166
|
-
urlPath: options.path,
|
|
167
|
-
headers,
|
|
168
|
-
params,
|
|
169
|
-
responseType: "raw",
|
|
170
|
-
};
|
|
171
|
-
// Add body if provided
|
|
172
|
-
if (options.body !== undefined) {
|
|
173
|
-
request.body = JSON.stringify(options.body);
|
|
174
|
-
request.bodyType = "jsonBody";
|
|
175
|
-
}
|
|
176
|
-
// Execute the streaming request
|
|
177
|
-
const stream = this.executeStreamingQuery(request, metadata);
|
|
178
|
-
// Validate and yield each chunk
|
|
179
|
-
let chunkIndex = 0;
|
|
180
|
-
for await (const rawChunk of stream) {
|
|
181
|
-
const parseResult = schema.chunk.safeParse(rawChunk);
|
|
182
|
-
if (!parseResult.success) {
|
|
183
|
-
throw new StreamChunkValidationError(`Chunk validation failed at index ${chunkIndex}: ${parseResult.error.message}`, {
|
|
184
|
-
chunkIndex,
|
|
185
|
-
chunk: rawChunk,
|
|
186
|
-
zodError: parseResult.error,
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
yield parseResult.data;
|
|
190
|
-
chunkIndex++;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
85
|
}
|
|
194
86
|
//# sourceMappingURL=rest-api-integration-client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest-api-integration-client.js","sourceRoot":"","sources":["../../../src/integrations/base/rest-api-integration-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,
|
|
1
|
+
{"version":3,"file":"rest-api-integration-client.js","sourceRoot":"","sources":["../../../src/integrations/base/rest-api-integration-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAWzD;;;;;GAKG;AACH,MAAM,OAAgB,wBAAwB;IAGnC,IAAI,CAAS;IACb,QAAQ,CAAS;IACjB,MAAM,CAAoB;IAEhB,YAAY,CAAgB;IAE/C,YAAY,MAAyB,EAAE,YAA2B;QAChE,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;OAEG;IACO,WAAW,CAAC,GAAW,EAAE,KAAc;QAC/C,OAAO;YACL,GAAG;YACH,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;SACjE,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,UAAU,CACd,OAAiC,EACjC,MAEC,EACD,QAAwB;QAExB,4DAA4D;QAC5D,2EAA2E;QAC3E,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,EAAE,IAAI,EAAE,CAAC;YAC/C,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC5D,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;gBAC7B,MAAM,IAAI,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,UAAU,CAAC;QAChC,CAAC;QAED,sBAAsB;QACtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CACpC,OAAkC,EAClC,SAAS,EACT,QAAQ,CACT,CAAC;QAEF,gDAAgD;QAChD,MAAM,mBAAmB,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAE9D,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,CAAC;YACjC,MAAM,IAAI,sBAAsB,CAC9B,+BAA+B,mBAAmB,CAAC,KAAK,CAAC,OAAO,EAAE,EAClE;gBACE,QAAQ,EAAE,mBAAmB,CAAC,KAAK;gBACnC,IAAI,EAAE,MAAM;aACb,CACF,CAAC;QACJ,CAAC;QAED,OAAO,mBAAmB,CAAC,IAAI,CAAC;IAClC,CAAC;CACF"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { z } from "zod";
|
|
5
5
|
import type { TraceMetadata } from "../registry.js";
|
|
6
|
+
export type { TraceMetadata };
|
|
6
7
|
/**
|
|
7
8
|
* Options for making a generic REST API request.
|
|
8
9
|
*/
|
|
@@ -87,71 +88,4 @@ export interface SupportsApiRequest {
|
|
|
87
88
|
response: z.ZodSchema<TResponse>;
|
|
88
89
|
}, metadata?: TraceMetadata): Promise<TResponse>;
|
|
89
90
|
}
|
|
90
|
-
/**
|
|
91
|
-
* Schema configuration for streaming API request validation.
|
|
92
|
-
*/
|
|
93
|
-
export interface StreamApiRequestSchema<TBody = unknown, TChunk = unknown> {
|
|
94
|
-
/**
|
|
95
|
-
* Optional Zod schema for request body validation.
|
|
96
|
-
* Required if body is provided in options.
|
|
97
|
-
*/
|
|
98
|
-
body?: z.ZodSchema<TBody>;
|
|
99
|
-
/**
|
|
100
|
-
* Zod schema for validating each streamed chunk.
|
|
101
|
-
*
|
|
102
|
-
* Every chunk received from the stream is validated against this schema.
|
|
103
|
-
* Validation errors will terminate the stream.
|
|
104
|
-
*/
|
|
105
|
-
chunk: z.ZodSchema<TChunk>;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Interface for integration clients that support streaming API requests.
|
|
109
|
-
*
|
|
110
|
-
* Streaming API requests return an AsyncIterable of validated chunks,
|
|
111
|
-
* enabling real-time data streaming from LLMs and other sources.
|
|
112
|
-
*/
|
|
113
|
-
export interface SupportsStreamingApiRequest {
|
|
114
|
-
/**
|
|
115
|
-
* Execute a streaming API request with type-safe chunk validation.
|
|
116
|
-
*
|
|
117
|
-
* Returns an AsyncIterable that yields validated chunks as they arrive.
|
|
118
|
-
* Each chunk is validated against the provided schema before being yielded.
|
|
119
|
-
*
|
|
120
|
-
* @param options - Request configuration including method, path, params, and body
|
|
121
|
-
* @param schema - Zod schemas for request body and chunk validation (chunk schema REQUIRED)
|
|
122
|
-
* @param metadata - Optional trace metadata for observability (label, description)
|
|
123
|
-
* @returns AsyncIterable yielding validated chunks
|
|
124
|
-
*
|
|
125
|
-
* @example
|
|
126
|
-
* ```typescript
|
|
127
|
-
* const ChunkSchema = z.object({
|
|
128
|
-
* id: z.string(),
|
|
129
|
-
* choices: z.array(z.object({
|
|
130
|
-
* delta: z.object({
|
|
131
|
-
* content: z.string().optional(),
|
|
132
|
-
* }),
|
|
133
|
-
* })),
|
|
134
|
-
* });
|
|
135
|
-
*
|
|
136
|
-
* const stream = client.streamApiRequest(
|
|
137
|
-
* {
|
|
138
|
-
* method: 'POST',
|
|
139
|
-
* path: '/v1/chat/completions',
|
|
140
|
-
* body: {
|
|
141
|
-
* model: 'gpt-4',
|
|
142
|
-
* stream: true,
|
|
143
|
-
* messages: [{ role: 'user', content: 'Hello!' }],
|
|
144
|
-
* },
|
|
145
|
-
* },
|
|
146
|
-
* { chunk: ChunkSchema },
|
|
147
|
-
* { label: 'openai.chatCompletions', description: 'Stream chat completion' }
|
|
148
|
-
* );
|
|
149
|
-
*
|
|
150
|
-
* for await (const chunk of stream) {
|
|
151
|
-
* console.log(chunk.choices[0]?.delta?.content);
|
|
152
|
-
* }
|
|
153
|
-
* ```
|
|
154
|
-
*/
|
|
155
|
-
streamApiRequest<TBody, TChunk>(options: ApiRequestOptions<TBody>, schema: StreamApiRequestSchema<TBody, TChunk>, metadata?: TraceMetadata): AsyncIterable<TChunk>;
|
|
156
|
-
}
|
|
157
91
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/base/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/base/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,KAAK,GAAG,OAAO;IAChD;;OAEG;IACH,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;IAEzE;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC;IAEb;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,KAAK,GAAG,OAAO,EAAE,SAAS,GAAG,OAAO;IACpE;;;OAGG;IACH,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,UAAU,CAAC,KAAK,EAAE,SAAS,EACzB,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,EACjC,MAAM,EAAE,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG;QAC3C,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;KAClC,EACD,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,SAAS,CAAC,CAAC;CACvB"}
|
|
@@ -22,7 +22,7 @@ import type { TraceMetadata } from "../registry.js";
|
|
|
22
22
|
* });
|
|
23
23
|
*
|
|
24
24
|
* const events = await bigquery.query(
|
|
25
|
-
* 'SELECT * FROM events WHERE date =
|
|
25
|
+
* 'SELECT * FROM events WHERE date = ?',
|
|
26
26
|
* EventSchema,
|
|
27
27
|
* ['2024-01-01']
|
|
28
28
|
* );
|
|
@@ -32,9 +32,9 @@ export interface BigQueryClient extends BaseIntegrationClient {
|
|
|
32
32
|
/**
|
|
33
33
|
* Execute a SQL query and validate results against a Zod schema.
|
|
34
34
|
*
|
|
35
|
-
* @param sql - SQL query string (use
|
|
35
|
+
* @param sql - SQL query string (use ? placeholders for parameters)
|
|
36
36
|
* @param schema - Zod schema to validate the query results
|
|
37
|
-
* @param params - Optional query parameters
|
|
37
|
+
* @param params - Optional query parameters, bound positionally from the provided array
|
|
38
38
|
* @returns Promise resolving to validated query results
|
|
39
39
|
*
|
|
40
40
|
* @throws {QueryValidationError} If results don't match schema
|
|
@@ -22,7 +22,7 @@ import type { TraceMetadata } from "../registry.js";
|
|
|
22
22
|
* });
|
|
23
23
|
*
|
|
24
24
|
* const data = await databricks.query(
|
|
25
|
-
* 'SELECT * FROM data WHERE date =
|
|
25
|
+
* 'SELECT * FROM data WHERE date = :PARAM_1',
|
|
26
26
|
* DataSchema,
|
|
27
27
|
* ['2024-01-01']
|
|
28
28
|
* );
|
|
@@ -32,9 +32,9 @@ export interface DatabricksClient extends BaseIntegrationClient {
|
|
|
32
32
|
/**
|
|
33
33
|
* Execute a SQL query and validate results against a Zod schema.
|
|
34
34
|
*
|
|
35
|
-
* @param sql - SQL query string (use
|
|
35
|
+
* @param sql - SQL query string (use :PARAM_1, :PARAM_2, etc. for parameters)
|
|
36
36
|
* @param schema - Zod schema to validate the query results
|
|
37
|
-
* @param params - Optional query parameters
|
|
37
|
+
* @param params - Optional query parameters, bound positionally so the first value maps to :PARAM_1
|
|
38
38
|
* @returns Promise resolving to validated query results
|
|
39
39
|
*
|
|
40
40
|
* @throws {QueryValidationError} If results don't match schema
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentation.test.d.ts","sourceRoot":"","sources":["../../src/integrations/documentation.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
2
|
+
import { dirname, resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { describe, expect, it } from "vitest";
|
|
5
|
+
import { SUPPORTED_PLUGINS } from "./registry.js";
|
|
6
|
+
const TEST_DIR = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const DOC_DIRECTORY_ALIASES = {
|
|
8
|
+
confluent: "kafka",
|
|
9
|
+
graphqlintegration: "graphql",
|
|
10
|
+
redpanda: "kafka",
|
|
11
|
+
};
|
|
12
|
+
const DOC_DIRECTORY_EXCLUSIONS = new Set(["base"]);
|
|
13
|
+
function hasDocDirectoryAlias(pluginId) {
|
|
14
|
+
return pluginId in DOC_DIRECTORY_ALIASES;
|
|
15
|
+
}
|
|
16
|
+
const EXPECTED_DOC_DIRECTORIES = Array.from(new Set(Object.values(SUPPORTED_PLUGINS)
|
|
17
|
+
.map((pluginId) => hasDocDirectoryAlias(pluginId)
|
|
18
|
+
? DOC_DIRECTORY_ALIASES[pluginId]
|
|
19
|
+
: pluginId)
|
|
20
|
+
.filter((directory) => !DOC_DIRECTORY_EXCLUSIONS.has(directory)))).sort();
|
|
21
|
+
const ACTUAL_DOC_DIRECTORIES = readdirSync(TEST_DIR, { withFileTypes: true })
|
|
22
|
+
.filter((entry) => entry.isDirectory())
|
|
23
|
+
.map((entry) => entry.name)
|
|
24
|
+
.filter((directory) => !DOC_DIRECTORY_EXCLUSIONS.has(directory))
|
|
25
|
+
.sort();
|
|
26
|
+
const PLACEHOLDER_DOC_CASES = [
|
|
27
|
+
{ integrationId: "athena", expectedPlaceholder: "?" },
|
|
28
|
+
{ integrationId: "bigquery", expectedPlaceholder: "?" },
|
|
29
|
+
{
|
|
30
|
+
integrationId: "cockroachdb",
|
|
31
|
+
expectedPlaceholder: "$1",
|
|
32
|
+
rejectsPostgresStyle: false,
|
|
33
|
+
},
|
|
34
|
+
{ integrationId: "databricks", expectedPlaceholder: ":PARAM_1" },
|
|
35
|
+
{ integrationId: "dynamodb", expectedPlaceholder: "?" },
|
|
36
|
+
{
|
|
37
|
+
integrationId: "lakebase",
|
|
38
|
+
expectedPlaceholder: "$1",
|
|
39
|
+
rejectsPostgresStyle: false,
|
|
40
|
+
},
|
|
41
|
+
{ integrationId: "mariadb", expectedPlaceholder: "?" },
|
|
42
|
+
{ integrationId: "mssql", expectedPlaceholder: "@PARAM_1" },
|
|
43
|
+
{ integrationId: "mysql", expectedPlaceholder: "?" },
|
|
44
|
+
{ integrationId: "oracledb", expectedPlaceholder: ":1" },
|
|
45
|
+
{
|
|
46
|
+
integrationId: "redshift",
|
|
47
|
+
expectedPlaceholder: "$1",
|
|
48
|
+
rejectsPostgresStyle: false,
|
|
49
|
+
},
|
|
50
|
+
{ integrationId: "snowflake", expectedPlaceholder: "?" },
|
|
51
|
+
{
|
|
52
|
+
integrationId: "snowflakepostgres",
|
|
53
|
+
expectedPlaceholder: "$1",
|
|
54
|
+
rejectsPostgresStyle: false,
|
|
55
|
+
},
|
|
56
|
+
];
|
|
57
|
+
function readIntegrationFile(integrationId, fileName) {
|
|
58
|
+
return readFileSync(resolve(TEST_DIR, integrationId, fileName), "utf8");
|
|
59
|
+
}
|
|
60
|
+
describe("SQL integration documentation", () => {
|
|
61
|
+
it("documents every supported integration directory", () => {
|
|
62
|
+
expect(ACTUAL_DOC_DIRECTORIES).toEqual(EXPECTED_DOC_DIRECTORIES);
|
|
63
|
+
for (const integrationId of EXPECTED_DOC_DIRECTORIES) {
|
|
64
|
+
expect(existsSync(resolve(TEST_DIR, integrationId, "README.md"))).toBe(true);
|
|
65
|
+
expect(existsSync(resolve(TEST_DIR, integrationId, "types.ts"))).toBe(true);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
it.each(PLACEHOLDER_DOC_CASES)("$integrationId README uses $expectedPlaceholder placeholders", ({ integrationId, expectedPlaceholder, rejectsPostgresStyle = true }) => {
|
|
69
|
+
const readme = readIntegrationFile(integrationId, "README.md");
|
|
70
|
+
expect(readme).toContain(expectedPlaceholder);
|
|
71
|
+
if (rejectsPostgresStyle) {
|
|
72
|
+
expect(readme).not.toMatch(/\$\d+/);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
it.each(PLACEHOLDER_DOC_CASES)("$integrationId JSDoc uses $expectedPlaceholder placeholders", ({ integrationId, expectedPlaceholder, rejectsPostgresStyle = true }) => {
|
|
76
|
+
const typeDocs = readIntegrationFile(integrationId, "types.ts");
|
|
77
|
+
expect(typeDocs).toContain(expectedPlaceholder);
|
|
78
|
+
if (rejectsPostgresStyle) {
|
|
79
|
+
expect(typeDocs).not.toMatch(/\$\d+/);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
//# sourceMappingURL=documentation.test.js.map
|
|
@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