@superblocksteam/sdk-api 2.0.96 → 2.0.97-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/README.md +68 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/integrations/athena/client.d.ts +3 -3
  6. package/dist/integrations/athena/client.d.ts.map +1 -1
  7. package/dist/integrations/athena/client.js +4 -4
  8. package/dist/integrations/athena/client.js.map +1 -1
  9. package/dist/integrations/athena/types.d.ts +3 -2
  10. package/dist/integrations/athena/types.d.ts.map +1 -1
  11. package/dist/integrations/base/graphql-integration-client.d.ts +5 -3
  12. package/dist/integrations/base/graphql-integration-client.d.ts.map +1 -1
  13. package/dist/integrations/base/graphql-integration-client.js +8 -6
  14. package/dist/integrations/base/graphql-integration-client.js.map +1 -1
  15. package/dist/integrations/base/rest-api-integration-client.d.ts +6 -4
  16. package/dist/integrations/base/rest-api-integration-client.d.ts.map +1 -1
  17. package/dist/integrations/base/rest-api-integration-client.js +7 -5
  18. package/dist/integrations/base/rest-api-integration-client.js.map +1 -1
  19. package/dist/integrations/base/types.d.ts +9 -4
  20. package/dist/integrations/base/types.d.ts.map +1 -1
  21. package/dist/integrations/bigquery/client.d.ts +3 -3
  22. package/dist/integrations/bigquery/client.d.ts.map +1 -1
  23. package/dist/integrations/bigquery/client.js +4 -4
  24. package/dist/integrations/bigquery/client.js.map +1 -1
  25. package/dist/integrations/bigquery/types.d.ts +3 -2
  26. package/dist/integrations/bigquery/types.d.ts.map +1 -1
  27. package/dist/integrations/cockroachdb/client.d.ts +3 -3
  28. package/dist/integrations/cockroachdb/client.d.ts.map +1 -1
  29. package/dist/integrations/cockroachdb/client.js +4 -4
  30. package/dist/integrations/cockroachdb/client.js.map +1 -1
  31. package/dist/integrations/cockroachdb/types.d.ts +3 -2
  32. package/dist/integrations/cockroachdb/types.d.ts.map +1 -1
  33. package/dist/integrations/cosmosdb/client.d.ts +7 -7
  34. package/dist/integrations/cosmosdb/client.d.ts.map +1 -1
  35. package/dist/integrations/cosmosdb/client.js +14 -14
  36. package/dist/integrations/cosmosdb/client.js.map +1 -1
  37. package/dist/integrations/cosmosdb/types.d.ts +12 -6
  38. package/dist/integrations/cosmosdb/types.d.ts.map +1 -1
  39. package/dist/integrations/couchbase/client.d.ts +5 -5
  40. package/dist/integrations/couchbase/client.d.ts.map +1 -1
  41. package/dist/integrations/couchbase/client.js +8 -8
  42. package/dist/integrations/couchbase/client.js.map +1 -1
  43. package/dist/integrations/couchbase/types.d.ts +8 -4
  44. package/dist/integrations/couchbase/types.d.ts.map +1 -1
  45. package/dist/integrations/databricks/client.d.ts +3 -3
  46. package/dist/integrations/databricks/client.d.ts.map +1 -1
  47. package/dist/integrations/databricks/client.js +4 -4
  48. package/dist/integrations/databricks/client.js.map +1 -1
  49. package/dist/integrations/databricks/types.d.ts +3 -2
  50. package/dist/integrations/databricks/types.d.ts.map +1 -1
  51. package/dist/integrations/dynamodb/client.d.ts +12 -12
  52. package/dist/integrations/dynamodb/client.d.ts.map +1 -1
  53. package/dist/integrations/dynamodb/client.js +24 -24
  54. package/dist/integrations/dynamodb/client.js.map +1 -1
  55. package/dist/integrations/dynamodb/types.d.ts +28 -14
  56. package/dist/integrations/dynamodb/types.d.ts.map +1 -1
  57. package/dist/integrations/gcs/client.d.ts +8 -8
  58. package/dist/integrations/gcs/client.d.ts.map +1 -1
  59. package/dist/integrations/gcs/client.js +16 -16
  60. package/dist/integrations/gcs/client.js.map +1 -1
  61. package/dist/integrations/gcs/types.d.ts +14 -7
  62. package/dist/integrations/gcs/types.d.ts.map +1 -1
  63. package/dist/integrations/graphql/types.d.ts +11 -4
  64. package/dist/integrations/graphql/types.d.ts.map +1 -1
  65. package/dist/integrations/gsheets/client.d.ts +2 -2
  66. package/dist/integrations/gsheets/client.d.ts.map +1 -1
  67. package/dist/integrations/gsheets/client.js +2 -2
  68. package/dist/integrations/gsheets/client.js.map +1 -1
  69. package/dist/integrations/gsheets/types.d.ts +2 -1
  70. package/dist/integrations/gsheets/types.d.ts.map +1 -1
  71. package/dist/integrations/index.d.ts +1 -1
  72. package/dist/integrations/index.d.ts.map +1 -1
  73. package/dist/integrations/index.js.map +1 -1
  74. package/dist/integrations/kafka/client.d.ts +3 -3
  75. package/dist/integrations/kafka/client.d.ts.map +1 -1
  76. package/dist/integrations/kafka/client.js +6 -6
  77. package/dist/integrations/kafka/client.js.map +1 -1
  78. package/dist/integrations/kafka/types.d.ts +4 -2
  79. package/dist/integrations/kafka/types.d.ts.map +1 -1
  80. package/dist/integrations/kinesis/client.d.ts +3 -3
  81. package/dist/integrations/kinesis/client.d.ts.map +1 -1
  82. package/dist/integrations/kinesis/client.js +6 -6
  83. package/dist/integrations/kinesis/client.js.map +1 -1
  84. package/dist/integrations/kinesis/types.d.ts +4 -2
  85. package/dist/integrations/kinesis/types.d.ts.map +1 -1
  86. package/dist/integrations/lakebase/client.d.ts +3 -3
  87. package/dist/integrations/lakebase/client.d.ts.map +1 -1
  88. package/dist/integrations/lakebase/client.js +4 -4
  89. package/dist/integrations/lakebase/client.js.map +1 -1
  90. package/dist/integrations/lakebase/types.d.ts +3 -2
  91. package/dist/integrations/lakebase/types.d.ts.map +1 -1
  92. package/dist/integrations/mariadb/client.d.ts +3 -3
  93. package/dist/integrations/mariadb/client.d.ts.map +1 -1
  94. package/dist/integrations/mariadb/client.js +4 -4
  95. package/dist/integrations/mariadb/client.js.map +1 -1
  96. package/dist/integrations/mariadb/types.d.ts +3 -2
  97. package/dist/integrations/mariadb/types.d.ts.map +1 -1
  98. package/dist/integrations/mongodb/client.d.ts +2 -2
  99. package/dist/integrations/mongodb/client.d.ts.map +1 -1
  100. package/dist/integrations/mongodb/client.js +2 -2
  101. package/dist/integrations/mongodb/client.js.map +1 -1
  102. package/dist/integrations/mongodb/types.d.ts +2 -1
  103. package/dist/integrations/mongodb/types.d.ts.map +1 -1
  104. package/dist/integrations/mssql/client.d.ts +3 -3
  105. package/dist/integrations/mssql/client.d.ts.map +1 -1
  106. package/dist/integrations/mssql/client.js +4 -4
  107. package/dist/integrations/mssql/client.js.map +1 -1
  108. package/dist/integrations/mssql/types.d.ts +3 -2
  109. package/dist/integrations/mssql/types.d.ts.map +1 -1
  110. package/dist/integrations/mysql/client.d.ts +3 -3
  111. package/dist/integrations/mysql/client.d.ts.map +1 -1
  112. package/dist/integrations/mysql/client.js +4 -4
  113. package/dist/integrations/mysql/client.js.map +1 -1
  114. package/dist/integrations/mysql/types.d.ts +3 -2
  115. package/dist/integrations/mysql/types.d.ts.map +1 -1
  116. package/dist/integrations/oracledb/client.d.ts +3 -3
  117. package/dist/integrations/oracledb/client.d.ts.map +1 -1
  118. package/dist/integrations/oracledb/client.js +4 -4
  119. package/dist/integrations/oracledb/client.js.map +1 -1
  120. package/dist/integrations/oracledb/types.d.ts +3 -2
  121. package/dist/integrations/oracledb/types.d.ts.map +1 -1
  122. package/dist/integrations/postgres/client.d.ts +3 -3
  123. package/dist/integrations/postgres/client.d.ts.map +1 -1
  124. package/dist/integrations/postgres/client.js +4 -4
  125. package/dist/integrations/postgres/client.js.map +1 -1
  126. package/dist/integrations/postgres/types.d.ts +3 -2
  127. package/dist/integrations/postgres/types.d.ts.map +1 -1
  128. package/dist/integrations/python/client.d.ts +2 -2
  129. package/dist/integrations/python/client.d.ts.map +1 -1
  130. package/dist/integrations/python/client.js +2 -2
  131. package/dist/integrations/python/client.js.map +1 -1
  132. package/dist/integrations/python/types.d.ts +19 -2
  133. package/dist/integrations/python/types.d.ts.map +1 -1
  134. package/dist/integrations/redis/client.d.ts +12 -12
  135. package/dist/integrations/redis/client.d.ts.map +1 -1
  136. package/dist/integrations/redis/client.js +24 -24
  137. package/dist/integrations/redis/client.js.map +1 -1
  138. package/dist/integrations/redis/types.d.ts +22 -11
  139. package/dist/integrations/redis/types.d.ts.map +1 -1
  140. package/dist/integrations/redshift/client.d.ts +3 -3
  141. package/dist/integrations/redshift/client.d.ts.map +1 -1
  142. package/dist/integrations/redshift/client.js +4 -4
  143. package/dist/integrations/redshift/client.js.map +1 -1
  144. package/dist/integrations/redshift/types.d.ts +3 -2
  145. package/dist/integrations/redshift/types.d.ts.map +1 -1
  146. package/dist/integrations/registry.d.ts +21 -2
  147. package/dist/integrations/registry.d.ts.map +1 -1
  148. package/dist/integrations/registry.js.map +1 -1
  149. package/dist/integrations/s3/client.d.ts +8 -8
  150. package/dist/integrations/s3/client.d.ts.map +1 -1
  151. package/dist/integrations/s3/client.js +16 -16
  152. package/dist/integrations/s3/client.js.map +1 -1
  153. package/dist/integrations/s3/types.d.ts +14 -7
  154. package/dist/integrations/s3/types.d.ts.map +1 -1
  155. package/dist/integrations/salesforce/client.d.ts +10 -10
  156. package/dist/integrations/salesforce/client.d.ts.map +1 -1
  157. package/dist/integrations/salesforce/client.js +20 -20
  158. package/dist/integrations/salesforce/client.js.map +1 -1
  159. package/dist/integrations/salesforce/types.d.ts +18 -9
  160. package/dist/integrations/salesforce/types.d.ts.map +1 -1
  161. package/dist/integrations/smtp/client.d.ts +2 -2
  162. package/dist/integrations/smtp/client.d.ts.map +1 -1
  163. package/dist/integrations/smtp/client.js +2 -2
  164. package/dist/integrations/smtp/client.js.map +1 -1
  165. package/dist/integrations/smtp/types.d.ts +2 -1
  166. package/dist/integrations/smtp/types.d.ts.map +1 -1
  167. package/dist/integrations/snowflake/client.d.ts +3 -3
  168. package/dist/integrations/snowflake/client.d.ts.map +1 -1
  169. package/dist/integrations/snowflake/client.js +4 -4
  170. package/dist/integrations/snowflake/client.js.map +1 -1
  171. package/dist/integrations/snowflake/types.d.ts +3 -2
  172. package/dist/integrations/snowflake/types.d.ts.map +1 -1
  173. package/dist/integrations/snowflakepostgres/types.d.ts +3 -2
  174. package/dist/integrations/snowflakepostgres/types.d.ts.map +1 -1
  175. package/dist/runtime/context.d.ts +2 -1
  176. package/dist/runtime/context.d.ts.map +1 -1
  177. package/dist/runtime/context.js +2 -2
  178. package/dist/runtime/context.js.map +1 -1
  179. package/dist/runtime/execute.d.ts +4 -2
  180. package/dist/runtime/execute.d.ts.map +1 -1
  181. package/dist/runtime/execute.js.map +1 -1
  182. package/dist/runtime/executor.d.ts +2 -1
  183. package/dist/runtime/executor.d.ts.map +1 -1
  184. package/dist/runtime/executor.js.map +1 -1
  185. package/dist/runtime/streaming-context.d.ts +3 -2
  186. package/dist/runtime/streaming-context.d.ts.map +1 -1
  187. package/dist/runtime/streaming-context.js +2 -2
  188. package/dist/runtime/streaming-context.js.map +1 -1
  189. package/dist/runtime/streaming-executor.d.ts +4 -2
  190. package/dist/runtime/streaming-executor.d.ts.map +1 -1
  191. package/dist/runtime/streaming-executor.js.map +1 -1
  192. package/package.json +1 -1
  193. package/src/index.ts +1 -0
  194. package/src/integrations/airtable/README.md +7 -3
  195. package/src/integrations/anthropic/README.md +8 -4
  196. package/src/integrations/asana/README.md +7 -3
  197. package/src/integrations/athena/README.md +8 -4
  198. package/src/integrations/athena/client.ts +5 -3
  199. package/src/integrations/athena/types.ts +7 -1
  200. package/src/integrations/base/graphql-integration-client.ts +9 -4
  201. package/src/integrations/base/rest-api-integration-client.ts +16 -3
  202. package/src/integrations/base/types.ts +9 -2
  203. package/src/integrations/bigquery/README.md +8 -4
  204. package/src/integrations/bigquery/client.ts +5 -3
  205. package/src/integrations/bigquery/types.ts +7 -1
  206. package/src/integrations/bitbucket/README.md +7 -3
  207. package/src/integrations/box/README.md +7 -3
  208. package/src/integrations/circleci/README.md +7 -3
  209. package/src/integrations/cockroachdb/README.md +8 -4
  210. package/src/integrations/cockroachdb/client.ts +5 -3
  211. package/src/integrations/cockroachdb/types.ts +7 -1
  212. package/src/integrations/cohere/README.md +7 -3
  213. package/src/integrations/confluence/README.md +7 -3
  214. package/src/integrations/cosmosdb/README.md +7 -3
  215. package/src/integrations/cosmosdb/client.ts +19 -8
  216. package/src/integrations/cosmosdb/types.ts +12 -0
  217. package/src/integrations/couchbase/README.md +10 -6
  218. package/src/integrations/couchbase/client.ts +23 -4
  219. package/src/integrations/couchbase/types.ts +12 -1
  220. package/src/integrations/databricks/README.md +8 -4
  221. package/src/integrations/databricks/client.ts +5 -3
  222. package/src/integrations/databricks/types.ts +7 -1
  223. package/src/integrations/datadog/README.md +7 -3
  224. package/src/integrations/dropbox/README.md +7 -3
  225. package/src/integrations/dynamodb/README.md +17 -13
  226. package/src/integrations/dynamodb/client.ts +52 -15
  227. package/src/integrations/dynamodb/types.ts +32 -6
  228. package/src/integrations/elasticsearch/README.md +7 -3
  229. package/src/integrations/fireworks/README.md +7 -3
  230. package/src/integrations/front/README.md +7 -3
  231. package/src/integrations/gcs/README.md +13 -9
  232. package/src/integrations/gcs/client.ts +61 -24
  233. package/src/integrations/gcs/types.ts +27 -4
  234. package/src/integrations/gemini/README.md +7 -3
  235. package/src/integrations/github/README.md +7 -3
  236. package/src/integrations/googleanalytics/README.md +7 -3
  237. package/src/integrations/googledrive/README.md +7 -3
  238. package/src/integrations/graphql/README.md +8 -4
  239. package/src/integrations/graphql/types.ts +11 -2
  240. package/src/integrations/groq/README.md +7 -3
  241. package/src/integrations/gsheets/README.md +7 -3
  242. package/src/integrations/gsheets/client.ts +4 -1
  243. package/src/integrations/gsheets/types.ts +2 -0
  244. package/src/integrations/hubspot/README.md +7 -3
  245. package/src/integrations/index.ts +1 -0
  246. package/src/integrations/intercom/README.md +7 -3
  247. package/src/integrations/jira/README.md +7 -3
  248. package/src/integrations/kafka/README.md +8 -4
  249. package/src/integrations/kafka/client.ts +8 -3
  250. package/src/integrations/kafka/types.ts +12 -2
  251. package/src/integrations/kinesis/README.md +8 -4
  252. package/src/integrations/kinesis/client.ts +13 -4
  253. package/src/integrations/kinesis/types.ts +10 -2
  254. package/src/integrations/lakebase/client.ts +7 -1
  255. package/src/integrations/lakebase/types.ts +7 -1
  256. package/src/integrations/launchdarkly/README.md +7 -3
  257. package/src/integrations/mariadb/README.md +8 -4
  258. package/src/integrations/mariadb/client.ts +5 -3
  259. package/src/integrations/mariadb/types.ts +7 -1
  260. package/src/integrations/mistral/README.md +7 -3
  261. package/src/integrations/mongodb/README.md +7 -3
  262. package/src/integrations/mongodb/client.ts +4 -1
  263. package/src/integrations/mongodb/types.ts +2 -0
  264. package/src/integrations/mssql/README.md +8 -4
  265. package/src/integrations/mssql/client.ts +5 -3
  266. package/src/integrations/mssql/types.ts +7 -1
  267. package/src/integrations/mysql/README.md +8 -4
  268. package/src/integrations/mysql/client.ts +5 -3
  269. package/src/integrations/mysql/types.ts +7 -1
  270. package/src/integrations/notion/README.md +7 -3
  271. package/src/integrations/openai_v2/README.md +8 -4
  272. package/src/integrations/oracledb/README.md +8 -4
  273. package/src/integrations/oracledb/client.ts +5 -3
  274. package/src/integrations/oracledb/types.ts +7 -1
  275. package/src/integrations/pagerduty/README.md +7 -3
  276. package/src/integrations/perplexity/README.md +7 -3
  277. package/src/integrations/postgres/README.md +28 -4
  278. package/src/integrations/postgres/client.ts +5 -3
  279. package/src/integrations/postgres/types.ts +7 -1
  280. package/src/integrations/python/README.md +20 -5
  281. package/src/integrations/python/client.ts +4 -1
  282. package/src/integrations/python/types.ts +19 -1
  283. package/src/integrations/redis/README.md +7 -3
  284. package/src/integrations/redis/client.ts +46 -23
  285. package/src/integrations/redis/types.ts +40 -11
  286. package/src/integrations/redshift/README.md +8 -4
  287. package/src/integrations/redshift/client.ts +5 -3
  288. package/src/integrations/redshift/types.ts +7 -1
  289. package/src/integrations/registry.ts +22 -0
  290. package/src/integrations/s3/README.md +13 -9
  291. package/src/integrations/s3/client.ts +61 -24
  292. package/src/integrations/s3/types.ts +27 -4
  293. package/src/integrations/salesforce/README.md +15 -11
  294. package/src/integrations/salesforce/client.ts +29 -12
  295. package/src/integrations/salesforce/types.ts +30 -3
  296. package/src/integrations/segment/README.md +7 -3
  297. package/src/integrations/sendgrid/README.md +7 -3
  298. package/src/integrations/slack/README.md +7 -3
  299. package/src/integrations/smtp/client.ts +10 -3
  300. package/src/integrations/smtp/types.ts +2 -1
  301. package/src/integrations/snowflake/README.md +8 -4
  302. package/src/integrations/snowflake/client.ts +5 -3
  303. package/src/integrations/snowflake/types.ts +7 -1
  304. package/src/integrations/snowflakepostgres/types.ts +7 -1
  305. package/src/integrations/stabilityai/README.md +7 -3
  306. package/src/integrations/stripe/README.md +7 -3
  307. package/src/integrations/superblocks-ocr/README.md +7 -3
  308. package/src/integrations/twilio/README.md +7 -3
  309. package/src/integrations/zendesk/README.md +7 -3
  310. package/src/integrations/zoom/README.md +7 -3
  311. package/src/runtime/context.ts +8 -2
  312. package/src/runtime/execute.ts +4 -0
  313. package/src/runtime/executor.ts +2 -0
  314. package/src/runtime/streaming-context.ts +7 -3
  315. package/src/runtime/streaming-executor.ts +4 -0
@@ -4,9 +4,9 @@ Execute MongoDB operations with full type safety and runtime validation.
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | ----------------------------------------- | --------------------------- |
9
- | `run(collection, action, schema, params)` | Execute a MongoDB operation |
7
+ | Method | Description |
8
+ | ---------------------------------------------------- | --------------------------- |
9
+ | `run(collection, action, schema, params, metadata?)` | Execute a MongoDB operation |
10
10
 
11
11
  ## Actions
12
12
 
@@ -215,6 +215,10 @@ const users = await ctx.integrations.mongodb.run("users", "find", UserSchema, {
215
215
  | `skip` | `number` | Documents to skip |
216
216
  | `field` | `string` | Field for distinct operation |
217
217
 
218
+ ## Trace Metadata
219
+
220
+ All methods accept an optional `metadata` parameter as the last argument for diagnostics labeling. See the [root SDK README](../../../README.md#trace-metadata) for details.
221
+
218
222
  ## Error Handling
219
223
 
220
224
  ```typescript
@@ -8,7 +8,7 @@ import type { z } from "zod";
8
8
  import type { PartialMessage } from "@bufbuild/protobuf";
9
9
  import type { Plugin as MongoDBPlugin } from "@superblocksteam/types/dist/src/plugins/mongodb/v1/plugin_pb";
10
10
  import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
11
- import type { QueryExecutor } from "../registry.js";
11
+ import type { QueryExecutor, TraceMetadata } from "../registry.js";
12
12
  import { RestApiValidationError } from "../../errors.js";
13
13
  import { IntegrationError } from "../../runtime/errors.js";
14
14
  import type { MongoDBClient, MongoDBAction, MongoDBParams } from "./types.js";
@@ -98,12 +98,15 @@ export class MongoDBClientImpl implements MongoDBClient, IntegrationClientImpl {
98
98
  action: MongoDBAction,
99
99
  schema: z.ZodSchema<T>,
100
100
  params?: MongoDBParams,
101
+ metadata?: TraceMetadata,
101
102
  ): Promise<T> {
102
103
  const request = this.buildRequest(collection, action, params);
103
104
 
104
105
  try {
105
106
  const result = await this.executeQuery(
106
107
  request as Record<string, unknown>,
108
+ undefined,
109
+ metadata,
107
110
  );
108
111
 
109
112
  // Validate result against schema
@@ -4,6 +4,7 @@
4
4
 
5
5
  import type { z } from "zod";
6
6
  import type { BaseIntegrationClient } from "../../types.js";
7
+ import type { TraceMetadata } from "../registry.js";
7
8
 
8
9
  /**
9
10
  * MongoDB operation types.
@@ -99,5 +100,6 @@ export interface MongoDBClient extends BaseIntegrationClient {
99
100
  action: MongoDBAction,
100
101
  schema: z.ZodSchema<T>,
101
102
  params?: MongoDBParams,
103
+ metadata?: TraceMetadata,
102
104
  ): Promise<T>;
103
105
  }
@@ -4,10 +4,10 @@ Execute SQL queries and statements against Microsoft SQL Server databases with f
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | -------------------------------- | -------------------------------------------------------------------------- |
9
- | `query<T>(sql, schema, params?)` | Execute a SELECT query and return validated, typed results |
10
- | `execute(sql, params?)` | Execute a statement (INSERT, UPDATE, DELETE) and return affected row count |
7
+ | Method | Description |
8
+ | ------------------------------------------- | -------------------------------------------------------------------------- |
9
+ | `query<T>(sql, schema, params?, metadata?)` | Execute a SELECT query and return validated, typed results |
10
+ | `execute(sql, params?, metadata?)` | Execute a statement (INSERT, UPDATE, DELETE) and return affected row count |
11
11
 
12
12
  ## Usage
13
13
 
@@ -94,6 +94,10 @@ const analytics = await ctx.integrations.mssql.query(
94
94
  );
95
95
  ```
96
96
 
97
+ ## Trace Metadata
98
+
99
+ All methods accept an optional `metadata` parameter as the last argument for diagnostics labeling. See the [root SDK README](../../../README.md#trace-metadata) for details.
100
+
97
101
  ## Common Pitfalls
98
102
 
99
103
  ### BIGINT Values Returned as Strings
@@ -9,7 +9,7 @@ import type { z } from "zod";
9
9
  import type { PartialMessage } from "@bufbuild/protobuf";
10
10
  import type { Plugin as MSSQLPlugin } from "@superblocksteam/types/dist/src/plugins/mssql/v1/plugin_pb";
11
11
  import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
12
- import type { QueryExecutor } from "../registry.js";
12
+ import type { QueryExecutor, TraceMetadata } from "../registry.js";
13
13
  import { QueryValidationError } from "../../errors.js";
14
14
  import { IntegrationError } from "../../runtime/errors.js";
15
15
  import { describeType } from "../utils.js";
@@ -62,11 +62,12 @@ export class MSSQLClientImpl implements MSSQLClient, IntegrationClientImpl {
62
62
  sql: string,
63
63
  schema: z.ZodSchema<T>,
64
64
  params?: unknown[],
65
+ metadata?: TraceMetadata,
65
66
  ): Promise<T[]> {
66
67
  const request = this.buildRequest(sql, params);
67
68
 
68
69
  try {
69
- const result = await this.executeQuery(request);
70
+ const result = await this.executeQuery(request, undefined, metadata);
70
71
 
71
72
  if (!Array.isArray(result)) {
72
73
  throw new IntegrationError(
@@ -114,11 +115,12 @@ export class MSSQLClientImpl implements MSSQLClient, IntegrationClientImpl {
114
115
  async execute(
115
116
  sql: string,
116
117
  params?: unknown[],
118
+ metadata?: TraceMetadata,
117
119
  ): Promise<{ rowCount: number }> {
118
120
  const request = this.buildRequest(sql, params);
119
121
 
120
122
  try {
121
- const result = await this.executeQuery(request);
123
+ const result = await this.executeQuery(request, undefined, metadata);
122
124
 
123
125
  if (
124
126
  typeof result === "object" &&
@@ -6,6 +6,7 @@
6
6
 
7
7
  import type { z } from "zod";
8
8
  import type { BaseIntegrationClient } from "../../types.js";
9
+ import type { TraceMetadata } from "../registry.js";
9
10
 
10
11
  /**
11
12
  * Client for executing MSSQL queries with type-safe validation.
@@ -45,6 +46,7 @@ export interface MSSQLClient extends BaseIntegrationClient {
45
46
  sql: string,
46
47
  schema: z.ZodSchema<T>,
47
48
  params?: unknown[],
49
+ metadata?: TraceMetadata,
48
50
  ): Promise<T[]>;
49
51
 
50
52
  /**
@@ -54,5 +56,9 @@ export interface MSSQLClient extends BaseIntegrationClient {
54
56
  * @param params - Optional parameters for prepared statements
55
57
  * @returns Promise resolving to execution result with row count
56
58
  */
57
- execute(sql: string, params?: unknown[]): Promise<{ rowCount: number }>;
59
+ execute(
60
+ sql: string,
61
+ params?: unknown[],
62
+ metadata?: TraceMetadata,
63
+ ): Promise<{ rowCount: number }>;
58
64
  }
@@ -4,10 +4,10 @@ Execute SQL queries and statements against MySQL databases with full type safety
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | -------------------------------- | -------------------------------------------------------------------------- |
9
- | `query<T>(sql, schema, params?)` | Execute a SELECT query and return validated, typed results |
10
- | `execute(sql, params?)` | Execute a statement (INSERT, UPDATE, DELETE) and return affected row count |
7
+ | Method | Description |
8
+ | ------------------------------------------- | -------------------------------------------------------------------------- |
9
+ | `query<T>(sql, schema, params?, metadata?)` | Execute a SELECT query and return validated, typed results |
10
+ | `execute(sql, params?, metadata?)` | Execute a statement (INSERT, UPDATE, DELETE) and return affected row count |
11
11
 
12
12
  ## Usage
13
13
 
@@ -96,6 +96,10 @@ const orders = await ctx.integrations.mysql.query(
96
96
  );
97
97
  ```
98
98
 
99
+ ## Trace Metadata
100
+
101
+ All methods accept an optional `metadata` parameter as the last argument for diagnostics labeling. See the [root SDK README](../../../README.md#trace-metadata) for details.
102
+
99
103
  ## Common Pitfalls
100
104
 
101
105
  ### BIGINT Values Returned as Strings
@@ -9,7 +9,7 @@ import type { z } from "zod";
9
9
  import type { PartialMessage } from "@bufbuild/protobuf";
10
10
  import type { Plugin as MySQLPlugin } from "@superblocksteam/types/dist/src/plugins/mysql/v1/plugin_pb";
11
11
  import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
12
- import type { QueryExecutor } from "../registry.js";
12
+ import type { QueryExecutor, TraceMetadata } from "../registry.js";
13
13
  import { QueryValidationError } from "../../errors.js";
14
14
  import { IntegrationError } from "../../runtime/errors.js";
15
15
  import { describeType } from "../utils.js";
@@ -62,11 +62,12 @@ export class MySQLClientImpl implements MySQLClient, IntegrationClientImpl {
62
62
  sql: string,
63
63
  schema: z.ZodSchema<T>,
64
64
  params?: unknown[],
65
+ metadata?: TraceMetadata,
65
66
  ): Promise<T[]> {
66
67
  const request = this.buildRequest(sql, params);
67
68
 
68
69
  try {
69
- const result = await this.executeQuery(request);
70
+ const result = await this.executeQuery(request, undefined, metadata);
70
71
 
71
72
  if (!Array.isArray(result)) {
72
73
  throw new IntegrationError(
@@ -114,11 +115,12 @@ export class MySQLClientImpl implements MySQLClient, IntegrationClientImpl {
114
115
  async execute(
115
116
  sql: string,
116
117
  params?: unknown[],
118
+ metadata?: TraceMetadata,
117
119
  ): Promise<{ rowCount: number }> {
118
120
  const request = this.buildRequest(sql, params);
119
121
 
120
122
  try {
121
- const result = await this.executeQuery(request);
123
+ const result = await this.executeQuery(request, undefined, metadata);
122
124
 
123
125
  if (
124
126
  typeof result === "object" &&
@@ -6,6 +6,7 @@
6
6
 
7
7
  import type { z } from "zod";
8
8
  import type { BaseIntegrationClient } from "../../types.js";
9
+ import type { TraceMetadata } from "../registry.js";
9
10
 
10
11
  /**
11
12
  * Client for executing MySQL queries with type-safe validation.
@@ -60,6 +61,7 @@ export interface MySQLClient extends BaseIntegrationClient {
60
61
  sql: string,
61
62
  schema: z.ZodSchema<T>,
62
63
  params?: unknown[],
64
+ metadata?: TraceMetadata,
63
65
  ): Promise<T[]>;
64
66
 
65
67
  /**
@@ -78,5 +80,9 @@ export interface MySQLClient extends BaseIntegrationClient {
78
80
  * console.log(`Updated ${result.rowCount} rows`);
79
81
  * ```
80
82
  */
81
- execute(sql: string, params?: unknown[]): Promise<{ rowCount: number }>;
83
+ execute(
84
+ sql: string,
85
+ params?: unknown[],
86
+ metadata?: TraceMetadata,
87
+ ): Promise<{ rowCount: number }>;
82
88
  }
@@ -4,9 +4,9 @@ Query databases, create pages, and manage content in Notion workspaces.
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | ----------------------------- | -------------------------------------------------- |
9
- | `apiRequest(options, schema)` | Make any Notion API request with schema validation |
7
+ | Method | Description |
8
+ | ---------------------------------------- | -------------------------------------------------- |
9
+ | `apiRequest(options, schema, metadata?)` | Make any Notion API request with schema validation |
10
10
 
11
11
  ## Usage
12
12
 
@@ -250,6 +250,10 @@ const result = await ctx.integrations.notion.apiRequest(
250
250
  console.log("Properties:", Object.keys(result.properties));
251
251
  ```
252
252
 
253
+ ## Trace Metadata
254
+
255
+ All methods accept an optional `metadata` parameter as the last argument for diagnostics labeling. See the [root SDK README](../../../README.md#trace-metadata) for details.
256
+
253
257
  ## Common Pitfalls
254
258
 
255
259
  ### No Specialized Methods
@@ -4,10 +4,10 @@ Interact with OpenAI's APIs for chat completions, embeddings, image generation,
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | ----------------------------------- | -------------------------------------------------- |
9
- | `apiRequest(options, schema)` | Make any OpenAI API request with schema validation |
10
- | `streamApiRequest(options, schema)` | Stream responses with real-time chunk validation |
7
+ | Method | Description |
8
+ | ---------------------------------------------- | -------------------------------------------------- |
9
+ | `apiRequest(options, schema, metadata?)` | Make any OpenAI API request with schema validation |
10
+ | `streamApiRequest(options, schema, metadata?)` | Stream responses with real-time chunk validation |
11
11
 
12
12
  ## Usage
13
13
 
@@ -311,6 +311,10 @@ OpenAI's streaming chunks have this structure:
311
311
  }
312
312
  ```
313
313
 
314
+ ## Trace Metadata
315
+
316
+ All methods accept an optional `metadata` parameter as the last argument for diagnostics labeling. See the [root SDK README](../../../README.md#trace-metadata) for details.
317
+
314
318
  ## Common Pitfalls
315
319
 
316
320
  ### No Specialized Methods
@@ -4,10 +4,10 @@ Execute SQL queries and statements against Oracle databases with full type safet
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | -------------------------------- | -------------------------------------------------------------------------- |
9
- | `query<T>(sql, schema, params?)` | Execute a SELECT query and return validated, typed results |
10
- | `execute(sql, params?)` | Execute a statement (INSERT, UPDATE, DELETE) and return affected row count |
7
+ | Method | Description |
8
+ | ------------------------------------------- | -------------------------------------------------------------------------- |
9
+ | `query<T>(sql, schema, params?, metadata?)` | Execute a SELECT query and return validated, typed results |
10
+ | `execute(sql, params?, metadata?)` | Execute a statement (INSERT, UPDATE, DELETE) and return affected row count |
11
11
 
12
12
  ## Usage
13
13
 
@@ -94,6 +94,10 @@ const analytics = await ctx.integrations.oracledb.query(
94
94
  );
95
95
  ```
96
96
 
97
+ ## Trace Metadata
98
+
99
+ All methods accept an optional `metadata` parameter as the last argument for diagnostics labeling. See the [root SDK README](../../../README.md#trace-metadata) for details.
100
+
97
101
  ## Common Pitfalls
98
102
 
99
103
  ### Uppercase Column Names
@@ -9,7 +9,7 @@ import type { z } from "zod";
9
9
  import type { PartialMessage } from "@bufbuild/protobuf";
10
10
  import type { Plugin as OracleDBPlugin } from "@superblocksteam/types/dist/src/plugins/oracledb/v1/plugin_pb";
11
11
  import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
12
- import type { QueryExecutor } from "../registry.js";
12
+ import type { QueryExecutor, TraceMetadata } from "../registry.js";
13
13
  import { QueryValidationError } from "../../errors.js";
14
14
  import { IntegrationError } from "../../runtime/errors.js";
15
15
  import { describeType } from "../utils.js";
@@ -66,11 +66,12 @@ export class OracleDBClientImpl
66
66
  sql: string,
67
67
  schema: z.ZodSchema<T>,
68
68
  params?: unknown[],
69
+ metadata?: TraceMetadata,
69
70
  ): Promise<T[]> {
70
71
  const request = this.buildRequest(sql, params);
71
72
 
72
73
  try {
73
- const result = await this.executeQuery(request);
74
+ const result = await this.executeQuery(request, undefined, metadata);
74
75
 
75
76
  if (!Array.isArray(result)) {
76
77
  throw new IntegrationError(
@@ -118,11 +119,12 @@ export class OracleDBClientImpl
118
119
  async execute(
119
120
  sql: string,
120
121
  params?: unknown[],
122
+ metadata?: TraceMetadata,
121
123
  ): Promise<{ rowCount: number }> {
122
124
  const request = this.buildRequest(sql, params);
123
125
 
124
126
  try {
125
- const result = await this.executeQuery(request);
127
+ const result = await this.executeQuery(request, undefined, metadata);
126
128
 
127
129
  if (
128
130
  typeof result === "object" &&
@@ -6,6 +6,7 @@
6
6
 
7
7
  import type { z } from "zod";
8
8
  import type { BaseIntegrationClient } from "../../types.js";
9
+ import type { TraceMetadata } from "../registry.js";
9
10
 
10
11
  /**
11
12
  * Client for executing OracleDB queries with type-safe validation.
@@ -45,6 +46,7 @@ export interface OracleDBClient extends BaseIntegrationClient {
45
46
  sql: string,
46
47
  schema: z.ZodSchema<T>,
47
48
  params?: unknown[],
49
+ metadata?: TraceMetadata,
48
50
  ): Promise<T[]>;
49
51
 
50
52
  /**
@@ -54,5 +56,9 @@ export interface OracleDBClient extends BaseIntegrationClient {
54
56
  * @param params - Optional parameters for prepared statements
55
57
  * @returns Promise resolving to execution result with row count
56
58
  */
57
- execute(sql: string, params?: unknown[]): Promise<{ rowCount: number }>;
59
+ execute(
60
+ sql: string,
61
+ params?: unknown[],
62
+ metadata?: TraceMetadata,
63
+ ): Promise<{ rowCount: number }>;
58
64
  }
@@ -4,9 +4,9 @@ Create incidents, manage services, and interact with PagerDuty's incident manage
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | ----------------------------- | ----------------------------------------------------- |
9
- | `apiRequest(options, schema)` | Make any PagerDuty API request with schema validation |
7
+ | Method | Description |
8
+ | ---------------------------------------- | ----------------------------------------------------- |
9
+ | `apiRequest(options, schema, metadata?)` | Make any PagerDuty API request with schema validation |
10
10
 
11
11
  ## Usage
12
12
 
@@ -315,6 +315,10 @@ await ctx.integrations.pagerduty.apiRequest(
315
315
  );
316
316
  ```
317
317
 
318
+ ## Trace Metadata
319
+
320
+ All methods accept an optional `metadata` parameter as the last argument for diagnostics labeling. See the [root SDK README](../../../README.md#trace-metadata) for details.
321
+
318
322
  ## Common Pitfalls
319
323
 
320
324
  ### No Specialized Methods
@@ -4,9 +4,9 @@ Interact with Perplexity's search-augmented AI for real-time information retriev
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | ----------------------------- | ------------------------------------------------------ |
9
- | `apiRequest(options, schema)` | Make any Perplexity API request with schema validation |
7
+ | Method | Description |
8
+ | ---------------------------------------- | ------------------------------------------------------ |
9
+ | `apiRequest(options, schema, metadata?)` | Make any Perplexity API request with schema validation |
10
10
 
11
11
  ## Usage
12
12
 
@@ -183,6 +183,10 @@ const result = await ctx.integrations.perplexity.apiRequest(
183
183
  );
184
184
  ```
185
185
 
186
+ ## Trace Metadata
187
+
188
+ All methods accept an optional `metadata` parameter as the last argument for diagnostics labeling. See the [root SDK README](../../../README.md#trace-metadata) for details.
189
+
186
190
  ## Common Pitfalls
187
191
 
188
192
  ### No Specialized Methods
@@ -4,10 +4,10 @@ Execute SQL queries and statements against PostgreSQL databases with full type s
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | -------------------------------- | -------------------------------------------------------------------------- |
9
- | `query<T>(sql, schema, params?)` | Execute a SELECT query and return validated, typed results |
10
- | `execute(sql, params?)` | Execute a statement (INSERT, UPDATE, DELETE) and return affected row count |
7
+ | Method | Description |
8
+ | ------------------------------------------- | -------------------------------------------------------------------------- |
9
+ | `query<T>(sql, schema, params?, metadata?)` | Execute a SELECT query and return validated, typed results |
10
+ | `execute(sql, params?, metadata?)` | Execute a statement (INSERT, UPDATE, DELETE) and return affected row count |
11
11
 
12
12
  ## Usage
13
13
 
@@ -173,6 +173,30 @@ const users = await ctx.integrations.db.query(
173
173
  );
174
174
  ```
175
175
 
176
+ ## Trace Metadata
177
+
178
+ All methods accept an optional `metadata` parameter as the last argument for diagnostics labeling:
179
+
180
+ ```typescript
181
+ const users = await ctx.integrations.db.query(
182
+ "SELECT * FROM users WHERE status = $1",
183
+ UserSchema,
184
+ ["active"],
185
+ {
186
+ label: "Fetch active users",
187
+ description: "Paginated user list for dashboard",
188
+ },
189
+ );
190
+
191
+ await ctx.integrations.db.execute(
192
+ "DELETE FROM sessions WHERE expires_at < NOW()",
193
+ undefined, // no params
194
+ { label: "Clean expired sessions" },
195
+ );
196
+ ```
197
+
198
+ When `includeDiagnostics` is enabled, `label` and `description` appear in the trace view. See the [root SDK README](../../../README.md#trace-metadata) for details.
199
+
176
200
  ## Common Pitfalls
177
201
 
178
202
  ### Aggregate Functions (COUNT, SUM) Return Strings
@@ -9,7 +9,7 @@ import type { z } from "zod";
9
9
  import type { PartialMessage } from "@bufbuild/protobuf";
10
10
  import type { Plugin as PostgresPlugin } from "@superblocksteam/types/dist/src/plugins/postgresql/v1/plugin_pb";
11
11
  import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
12
- import type { QueryExecutor } from "../registry.js";
12
+ import type { QueryExecutor, TraceMetadata } from "../registry.js";
13
13
  import type { PostgresClient } from "./types.js";
14
14
  import { QueryValidationError } from "../../errors.js";
15
15
  import { IntegrationError } from "../../runtime/errors.js";
@@ -68,11 +68,12 @@ export class PostgresClientImpl
68
68
  sql: string,
69
69
  schema: z.ZodSchema<T>,
70
70
  params?: unknown[],
71
+ metadata?: TraceMetadata,
71
72
  ): Promise<T[]> {
72
73
  const request = this.buildRequest(sql, params);
73
74
 
74
75
  try {
75
- const result = await this.executeQuery(request);
76
+ const result = await this.executeQuery(request, undefined, metadata);
76
77
 
77
78
  if (!Array.isArray(result)) {
78
79
  throw new IntegrationError(
@@ -117,11 +118,12 @@ export class PostgresClientImpl
117
118
  async execute(
118
119
  sql: string,
119
120
  params?: unknown[],
121
+ metadata?: TraceMetadata,
120
122
  ): Promise<{ rowCount: number }> {
121
123
  const request = this.buildRequest(sql, params);
122
124
 
123
125
  try {
124
- const result = await this.executeQuery(request);
126
+ const result = await this.executeQuery(request, undefined, metadata);
125
127
 
126
128
  if (
127
129
  typeof result === "object" &&
@@ -4,6 +4,7 @@
4
4
 
5
5
  import type { z } from "zod";
6
6
  import type { BaseIntegrationClient } from "../../types.js";
7
+ import type { TraceMetadata } from "../registry.js";
7
8
 
8
9
  /**
9
10
  * PostgreSQL client for database operations.
@@ -76,6 +77,7 @@ export interface PostgresClient extends BaseIntegrationClient {
76
77
  sql: string,
77
78
  schema: z.ZodSchema<T>,
78
79
  params?: unknown[],
80
+ metadata?: TraceMetadata,
79
81
  ): Promise<T[]>;
80
82
 
81
83
  /**
@@ -96,5 +98,9 @@ export interface PostgresClient extends BaseIntegrationClient {
96
98
  * console.log(`Deleted ${result.rowCount} expired sessions`);
97
99
  * ```
98
100
  */
99
- execute(sql: string, params?: unknown[]): Promise<{ rowCount: number }>;
101
+ execute(
102
+ sql: string,
103
+ params?: unknown[],
104
+ metadata?: TraceMetadata,
105
+ ): Promise<{ rowCount: number }>;
100
106
  }
@@ -63,7 +63,7 @@ export default api({
63
63
 
64
64
  ## API Reference
65
65
 
66
- ### `ctx.integrations.<name>.run<T>(code, schema, bindings?): Promise<T>`
66
+ ### `ctx.integrations.<name>.run<T>(code, schema, bindings?, metadata?): Promise<T>`
67
67
 
68
68
  Executes Python code with validated output. Use the **key name** you declared in `integrations` (e.g. `ctx.integrations.runtime.run(...)` if you declared `runtime: python(...)`).
69
69
 
@@ -71,7 +71,8 @@ Executes Python code with validated output. Use the **key name** you declared in
71
71
 
72
72
  - `code` (string): Python script to execute. Bindings are automatically injected as Python variables.
73
73
  - `schema` (ZodSchema<T>): **Required** Zod schema for validating the return value.
74
- - `bindings` (Record<string, unknown>, optional): Key/value pairs that become Python variables in your code.
74
+ - `bindings` (Record<string, unknown>, optional): Key/value pairs that become Python variables in your code. Do not pass `TraceMetadata` here; use the `metadata` parameter instead.
75
+ - `metadata` (TraceMetadata, optional): Trace metadata for diagnostics labeling (see [Trace Metadata](#trace-metadata)).
75
76
 
76
77
  **Returns:** Promise resolving to validated result matching the schema.
77
78
 
@@ -79,6 +80,16 @@ Executes Python code with validated output. Use the **key name** you declared in
79
80
 
80
81
  **Important:** Your Python code must use a `return` statement to return a value.
81
82
 
83
+ > **Note:** Because `bindings` and `metadata` are both plain objects, take care not
84
+ > to pass metadata as the third argument. If you need metadata but no bindings,
85
+ > pass `undefined` for `bindings` explicitly:
86
+ >
87
+ > ```typescript
88
+ > await ctx.integrations.runtime.run(code, schema, undefined, {
89
+ > label: "My trace label",
90
+ > });
91
+ > ```
92
+
82
93
  ## Binding Syntax
83
94
 
84
95
  Bindings are passed as a map and automatically injected as Python variables. Reference them directly in your code by their key names:
@@ -302,6 +313,10 @@ export default api({
302
313
  });
303
314
  ```
304
315
 
316
+ ## Trace Metadata
317
+
318
+ All methods accept an optional `metadata` parameter as the last argument for diagnostics labeling. See the [root SDK README](../../../README.md#trace-metadata) for details.
319
+
305
320
  ## Error Handling
306
321
 
307
322
  The client throws `CodeExecutionError` when execution or validation fails:
@@ -546,6 +561,6 @@ For specific package requirements, consult your Superblocks environment document
546
561
 
547
562
  ## See Also
548
563
 
549
- - [API Reference](../../README.md) - Main SDK documentation
550
- - [Error Handling](../../README.md#error-handling) - Error types and handling strategies
551
- - [Best Practices](../../README.md#best-practices) - General SDK best practices
564
+ - [API Reference](../../../README.md) - Main SDK documentation
565
+ - [Error Handling](../../../README.md#error-handling) - Error types and handling strategies
566
+ - [Best Practices](../../../README.md#best-practices) - General SDK best practices
@@ -8,7 +8,7 @@ import type { z } from "zod";
8
8
  import type { PartialMessage } from "@bufbuild/protobuf";
9
9
  import type { Plugin as PythonPlugin } from "@superblocksteam/types/dist/src/plugins/python/v1/plugin_pb";
10
10
  import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
11
- import type { QueryExecutor } from "../registry.js";
11
+ import type { QueryExecutor, TraceMetadata } from "../registry.js";
12
12
  import type { PythonClient } from "./types.js";
13
13
  import { CodeExecutionError } from "../../errors.js";
14
14
 
@@ -89,6 +89,7 @@ export class PythonClientImpl implements PythonClient, IntegrationClientImpl {
89
89
  code: string,
90
90
  schema: z.ZodSchema<T>,
91
91
  bindings?: Record<string, unknown>,
92
+ metadata?: TraceMetadata,
92
93
  ): Promise<T> {
93
94
  // Build request with bindings injected as Python variables
94
95
  const request = this.buildRequest(code, bindings);
@@ -98,6 +99,8 @@ export class PythonClientImpl implements PythonClient, IntegrationClientImpl {
98
99
  // No need to pass bindings as input since they're already in the code
99
100
  const result = await this.executeQuery(
100
101
  request as unknown as Record<string, unknown>,
102
+ undefined,
103
+ metadata,
101
104
  );
102
105
 
103
106
  // Validate result against schema