@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
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import type { BaseIntegrationClient } from "../../types.js";
6
+ import type { TraceMetadata } from "../registry.js";
6
7
  import type { z } from "zod";
7
8
 
8
9
  /**
@@ -68,7 +69,10 @@ export interface GraphQLClient extends BaseIntegrationClient {
68
69
  *
69
70
  * @param query - GraphQL query string
70
71
  * @param schema - Zod schema for response validation (REQUIRED)
71
- * @param variables - Optional variables for the query
72
+ * @param variables - Optional variables for the query. **Note:** since both `variables` and
73
+ * `metadata` accept plain objects, pass `undefined` for variables when you only need metadata:
74
+ * `query(q, schema, undefined, { label: "..." })`
75
+ * @param metadata - Optional trace metadata for observability
72
76
  * @returns Validated query result
73
77
  *
74
78
  * @example
@@ -89,6 +93,7 @@ export interface GraphQLClient extends BaseIntegrationClient {
89
93
  query: string,
90
94
  schema: { response: z.ZodSchema<TResponse> },
91
95
  variables?: Record<string, unknown>,
96
+ metadata?: TraceMetadata,
92
97
  ): Promise<TResponse>;
93
98
 
94
99
  /**
@@ -96,7 +101,10 @@ export interface GraphQLClient extends BaseIntegrationClient {
96
101
  *
97
102
  * @param mutation - GraphQL mutation string
98
103
  * @param schema - Zod schema for response validation (REQUIRED)
99
- * @param variables - Optional variables for the mutation
104
+ * @param variables - Optional variables for the mutation. **Note:** since both `variables` and
105
+ * `metadata` accept plain objects, pass `undefined` for variables when you only need metadata:
106
+ * `mutation(m, schema, undefined, { label: "..." })`
107
+ * @param metadata - Optional trace metadata for observability
100
108
  * @returns Validated mutation result
101
109
  *
102
110
  * @example
@@ -118,5 +126,6 @@ export interface GraphQLClient extends BaseIntegrationClient {
118
126
  mutation: string,
119
127
  schema: { response: z.ZodSchema<TResponse> },
120
128
  variables?: Record<string, unknown>,
129
+ metadata?: TraceMetadata,
121
130
  ): Promise<TResponse>;
122
131
  }
@@ -4,9 +4,9 @@ Interact with Groq's ultra-fast inference API for LLM chat completions with low
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | ----------------------------- | ------------------------------------------------ |
9
- | `apiRequest(options, schema)` | Make any Groq API request with schema validation |
7
+ | Method | Description |
8
+ | ---------------------------------------- | ------------------------------------------------ |
9
+ | `apiRequest(options, schema, metadata?)` | Make any Groq API request with schema validation |
10
10
 
11
11
  ## Usage
12
12
 
@@ -219,6 +219,10 @@ const result = await ctx.integrations.groq.apiRequest(
219
219
  const data = JSON.parse(result.choices[0]?.message.content ?? "{}");
220
220
  ```
221
221
 
222
+ ## Trace Metadata
223
+
224
+ 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.
225
+
222
226
  ## Common Pitfalls
223
227
 
224
228
  ### No Specialized Methods
@@ -4,9 +4,9 @@ Interact with Google Sheets with full type safety and runtime validation.
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | ----------------------------- | --------------------------------- |
9
- | `run(action, schema, params)` | Execute a Google Sheets operation |
7
+ | Method | Description |
8
+ | ---------------------------------------- | --------------------------------- |
9
+ | `run(action, schema, params, metadata?)` | Execute a Google Sheets operation |
10
10
 
11
11
  ## Actions
12
12
 
@@ -129,6 +129,10 @@ await ctx.integrations.sheets.run("CREATE_WORKSHEET", z.any(), {
129
129
  | `rowNumber` | `string` | Row number for single row operations |
130
130
  | `addSheet` | `object` | Config for CREATE_WORKSHEET action |
131
131
 
132
+ ## Trace Metadata
133
+
134
+ 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.
135
+
132
136
  ## Common Pitfalls
133
137
 
134
138
  ### Use extractFirstRowHeader for Objects
@@ -8,7 +8,7 @@ import type { z } from "zod";
8
8
  import type { PartialMessage } from "@bufbuild/protobuf";
9
9
  import type { Plugin as GSheetsPlugin } from "@superblocksteam/types/dist/src/plugins/gsheets/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 {
@@ -96,12 +96,15 @@ export class GoogleSheetsClientImpl
96
96
  action: GoogleSheetsAction,
97
97
  schema: z.ZodSchema<T>,
98
98
  params: GoogleSheetsParams,
99
+ metadata?: TraceMetadata,
99
100
  ): Promise<T> {
100
101
  const request = this.buildRequest(action, params);
101
102
 
102
103
  try {
103
104
  const result = await this.executeQuery(
104
105
  request as Record<string, unknown>,
106
+ undefined,
107
+ metadata,
105
108
  );
106
109
 
107
110
  // 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
  * Google Sheets action types.
@@ -96,5 +97,6 @@ export interface GoogleSheetsClient extends BaseIntegrationClient {
96
97
  action: GoogleSheetsAction,
97
98
  schema: z.ZodSchema<T>,
98
99
  params: GoogleSheetsParams,
100
+ metadata?: TraceMetadata,
99
101
  ): Promise<T>;
100
102
  }
@@ -4,9 +4,9 @@ Manage contacts, deals, companies, and interact with HubSpot's CRM platform.
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | ----------------------------- | --------------------------------------------------- |
9
- | `apiRequest(options, schema)` | Make any HubSpot API request with schema validation |
7
+ | Method | Description |
8
+ | ---------------------------------------- | --------------------------------------------------- |
9
+ | `apiRequest(options, schema, metadata?)` | Make any HubSpot API request with schema validation |
10
10
 
11
11
  ## Usage
12
12
 
@@ -281,6 +281,10 @@ const engagements = await ctx.integrations.hubspot.apiRequest(
281
281
  );
282
282
  ```
283
283
 
284
+ ## Trace Metadata
285
+
286
+ 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.
287
+
284
288
  ## Common Pitfalls
285
289
 
286
290
  ### No Specialized Methods
@@ -167,6 +167,7 @@ export {
167
167
  type SupportedPluginId,
168
168
  type QueryExecutor,
169
169
  type StreamingQueryExecutor,
170
+ type TraceMetadata,
170
171
  type CreateClientOptions,
171
172
  } from "./registry.js";
172
173
 
@@ -4,9 +4,9 @@ Manage customer conversations, contacts, and support workflows with Intercom.
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | ----------------------------- | ---------------------------------------------------- |
9
- | `apiRequest(options, schema)` | Make any Intercom API request with schema validation |
7
+ | Method | Description |
8
+ | ---------------------------------------- | ---------------------------------------------------- |
9
+ | `apiRequest(options, schema, metadata?)` | Make any Intercom API request with schema validation |
10
10
 
11
11
  ## Usage
12
12
 
@@ -239,6 +239,10 @@ const result = await ctx.integrations.intercom.apiRequest(
239
239
  );
240
240
  ```
241
241
 
242
+ ## Trace Metadata
243
+
244
+ 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.
245
+
242
246
  ## Common Pitfalls
243
247
 
244
248
  ### No Specialized Methods
@@ -4,9 +4,9 @@ Create issues, search projects, and manage work in Jira.
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | ----------------------------- | ------------------------------------------------ |
9
- | `apiRequest(options, schema)` | Make any Jira API request with schema validation |
7
+ | Method | Description |
8
+ | ---------------------------------------- | ------------------------------------------------ |
9
+ | `apiRequest(options, schema, metadata?)` | Make any Jira API request with schema validation |
10
10
 
11
11
  ## Usage
12
12
 
@@ -285,6 +285,10 @@ const result = await ctx.integrations.jira.apiRequest(
285
285
  );
286
286
  ```
287
287
 
288
+ ## Trace Metadata
289
+
290
+ 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.
291
+
288
292
  ## Common Pitfalls
289
293
 
290
294
  ### No Specialized Methods
@@ -4,10 +4,10 @@ Interact with Apache Kafka with full type safety and runtime validation.
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | ------------------------- | ----------------------------------- |
9
- | `consume(schema, params)` | Consume messages from a Kafka topic |
10
- | `produce(schema, params)` | Produce messages to Kafka topics |
7
+ | Method | Description |
8
+ | ------------------------------------ | ----------------------------------- |
9
+ | `consume(schema, params, metadata?)` | Consume messages from a Kafka topic |
10
+ | `produce(schema, params, metadata?)` | Produce messages to Kafka topics |
11
11
 
12
12
  ## Usage
13
13
 
@@ -112,6 +112,10 @@ const result = await ctx.integrations.kafka.produce(ProduceResultSchema, {
112
112
  | `clientId` | `string` | Client ID |
113
113
  | `timeout` | `number` | Timeout in milliseconds |
114
114
 
115
+ ## Trace Metadata
116
+
117
+ 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.
118
+
115
119
  ## Error Handling
116
120
 
117
121
  ```typescript
@@ -6,7 +6,7 @@
6
6
 
7
7
  import type { z } from "zod";
8
8
  import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
9
- import type { QueryExecutor } from "../registry.js";
9
+ import type { QueryExecutor, TraceMetadata } from "../registry.js";
10
10
  import { RestApiValidationError } from "../../errors.js";
11
11
  import { IntegrationError } from "../../runtime/errors.js";
12
12
  import type {
@@ -161,10 +161,13 @@ export class KafkaClientImpl implements KafkaClient, IntegrationClientImpl {
161
161
  request: KafkaRequest,
162
162
  schema: z.ZodSchema<T>,
163
163
  operation: string,
164
+ metadata?: TraceMetadata,
164
165
  ): Promise<T> {
165
166
  try {
166
167
  const result = await this.executeQuery(
167
168
  request as unknown as Record<string, unknown>,
169
+ undefined,
170
+ metadata,
168
171
  );
169
172
 
170
173
  const parseResult = schema.safeParse(result);
@@ -195,16 +198,18 @@ export class KafkaClientImpl implements KafkaClient, IntegrationClientImpl {
195
198
  async consume<T>(
196
199
  schema: z.ZodSchema<T>,
197
200
  params: KafkaConsumeParams,
201
+ metadata?: TraceMetadata,
198
202
  ): Promise<T> {
199
203
  const request = this.buildConsumeRequest(params);
200
- return this.executeAndValidate(request, schema, "consume");
204
+ return this.executeAndValidate(request, schema, "consume", metadata);
201
205
  }
202
206
 
203
207
  async produce<T>(
204
208
  schema: z.ZodSchema<T>,
205
209
  params: KafkaProduceParams,
210
+ metadata?: TraceMetadata,
206
211
  ): Promise<T> {
207
212
  const request = this.buildProduceRequest(params);
208
- return this.executeAndValidate(request, schema, "produce");
213
+ return this.executeAndValidate(request, schema, "produce", metadata);
209
214
  }
210
215
  }
@@ -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
  * Kafka operation types.
@@ -104,14 +105,23 @@ export interface KafkaClient extends BaseIntegrationClient {
104
105
  * @param params - Consume parameters
105
106
  * @returns The validated result
106
107
  */
107
- consume<T>(schema: z.ZodSchema<T>, params: KafkaConsumeParams): Promise<T>;
108
+ consume<T>(
109
+ schema: z.ZodSchema<T>,
110
+ params: KafkaConsumeParams,
111
+ metadata?: TraceMetadata,
112
+ ): Promise<T>;
108
113
 
109
114
  /**
110
115
  * Produce messages to Kafka.
111
116
  *
112
117
  * @param schema - Zod schema for validating the result
113
118
  * @param params - Produce parameters
119
+ * @param metadata - Optional trace metadata for diagnostics
114
120
  * @returns The validated result
115
121
  */
116
- produce<T>(schema: z.ZodSchema<T>, params: KafkaProduceParams): Promise<T>;
122
+ produce<T>(
123
+ schema: z.ZodSchema<T>,
124
+ params: KafkaProduceParams,
125
+ metadata?: TraceMetadata,
126
+ ): Promise<T>;
117
127
  }
@@ -4,10 +4,10 @@ Write records to and read records from Amazon Kinesis Data Streams.
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | -------------------- | ----------------------------------------- |
9
- | `putRecord(params)` | Write a single record to a Kinesis stream |
10
- | `getRecords(params)` | Read records from a Kinesis stream shard |
7
+ | Method | Description |
8
+ | ------------------------------- | ----------------------------------------- |
9
+ | `putRecord(params, metadata?)` | Write a single record to a Kinesis stream |
10
+ | `getRecords(params, metadata?)` | Read records from a Kinesis stream shard |
11
11
 
12
12
  ## Usage
13
13
 
@@ -124,6 +124,10 @@ const records = await kinesis.getRecords({
124
124
  | `TRIM_HORIZON` | Start at the oldest record in the shard |
125
125
  | `LATEST` | Start at the most recent record |
126
126
 
127
+ ## Trace Metadata
128
+
129
+ 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.
130
+
127
131
  ## Error Handling
128
132
 
129
133
  ```typescript
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import type { IntegrationConfig, IntegrationClientImpl } from "../types.js";
9
- import type { QueryExecutor } from "../registry.js";
9
+ import type { QueryExecutor, TraceMetadata } from "../registry.js";
10
10
  import { IntegrationError } from "../../runtime/errors.js";
11
11
  import type {
12
12
  KinesisClient,
@@ -53,9 +53,10 @@ export class KinesisClientImpl implements KinesisClient, IntegrationClientImpl {
53
53
  private async exec(
54
54
  request: Record<string, unknown>,
55
55
  operation: string,
56
+ metadata?: TraceMetadata,
56
57
  ): Promise<unknown> {
57
58
  try {
58
- return await this.executeQuery(request);
59
+ return await this.executeQuery(request, undefined, metadata);
59
60
  } catch (error) {
60
61
  if (error instanceof IntegrationError) {
61
62
  throw error;
@@ -65,7 +66,10 @@ export class KinesisClientImpl implements KinesisClient, IntegrationClientImpl {
65
66
  }
66
67
  }
67
68
 
68
- async putRecord(params: KinesisPutParams): Promise<unknown> {
69
+ async putRecord(
70
+ params: KinesisPutParams,
71
+ metadata?: TraceMetadata,
72
+ ): Promise<unknown> {
69
73
  const put: Record<string, unknown> = {
70
74
  data: params.data,
71
75
  partitionKey: params.partitionKey,
@@ -89,10 +93,14 @@ export class KinesisClientImpl implements KinesisClient, IntegrationClientImpl {
89
93
  put,
90
94
  },
91
95
  "putRecord",
96
+ metadata,
92
97
  );
93
98
  }
94
99
 
95
- async getRecords(params: KinesisGetParams): Promise<unknown> {
100
+ async getRecords(
101
+ params: KinesisGetParams,
102
+ metadata?: TraceMetadata,
103
+ ): Promise<unknown> {
96
104
  const get: Record<string, unknown> = {
97
105
  shardId: params.shardId,
98
106
  shardIteratorType: params.shardIteratorType,
@@ -132,6 +140,7 @@ export class KinesisClientImpl implements KinesisClient, IntegrationClientImpl {
132
140
  get,
133
141
  },
134
142
  "getRecords",
143
+ metadata,
135
144
  );
136
145
  }
137
146
  }
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import type { BaseIntegrationClient } from "../../types.js";
8
+ import type { TraceMetadata } from "../registry.js";
8
9
 
9
10
  /**
10
11
  * Stream identifier type for Kinesis operations.
@@ -94,13 +95,20 @@ export interface KinesisClient extends BaseIntegrationClient {
94
95
  * @param params - PUT operation parameters
95
96
  * @returns The raw result from Kinesis (includes ShardId and SequenceNumber)
96
97
  */
97
- putRecord(params: KinesisPutParams): Promise<unknown>;
98
+ putRecord(
99
+ params: KinesisPutParams,
100
+ metadata?: TraceMetadata,
101
+ ): Promise<unknown>;
98
102
 
99
103
  /**
100
104
  * Get records from a Kinesis stream shard.
101
105
  *
102
106
  * @param params - GET operation parameters
107
+ * @param metadata - Optional trace metadata for diagnostics
103
108
  * @returns The raw result from Kinesis (includes Records array)
104
109
  */
105
- getRecords(params: KinesisGetParams): Promise<unknown>;
110
+ getRecords(
111
+ params: KinesisGetParams,
112
+ metadata?: TraceMetadata,
113
+ ): Promise<unknown>;
106
114
  }
@@ -9,7 +9,7 @@ import type { z } from "zod";
9
9
  import type { PartialMessage } from "@bufbuild/protobuf";
10
10
  import type { Plugin as LakebasePlugin } from "@superblocksteam/types/dist/src/plugins/lakebase/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 { LakebaseClient } from "./types.js";
14
14
  import { QueryValidationError } from "../../errors.js";
15
15
  import { IntegrationError } from "../../runtime/errors.js";
@@ -62,12 +62,15 @@ export class LakebaseClientImpl
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
70
  const result = await this.executeQuery(
70
71
  request as Record<string, unknown>,
72
+ undefined,
73
+ metadata,
71
74
  );
72
75
 
73
76
  if (!Array.isArray(result)) {
@@ -113,12 +116,15 @@ export class LakebaseClientImpl
113
116
  async execute(
114
117
  sql: string,
115
118
  params?: unknown[],
119
+ metadata?: TraceMetadata,
116
120
  ): Promise<{ rowCount: number }> {
117
121
  const request = this.buildRequest(sql, params);
118
122
 
119
123
  try {
120
124
  const result = await this.executeQuery(
121
125
  request as Record<string, unknown>,
126
+ undefined,
127
+ metadata,
122
128
  );
123
129
 
124
130
  if (
@@ -7,6 +7,7 @@
7
7
 
8
8
  import type { z } from "zod";
9
9
  import type { BaseIntegrationClient } from "../../types.js";
10
+ import type { TraceMetadata } from "../registry.js";
10
11
 
11
12
  /**
12
13
  * Lakebase client for SQL query and execute operations.
@@ -42,6 +43,7 @@ export interface LakebaseClient extends BaseIntegrationClient {
42
43
  sql: string,
43
44
  schema: z.ZodSchema<T>,
44
45
  params?: unknown[],
46
+ metadata?: TraceMetadata,
45
47
  ): Promise<T[]>;
46
48
 
47
49
  /**
@@ -51,5 +53,9 @@ export interface LakebaseClient extends BaseIntegrationClient {
51
53
  * @param params - Optional query parameters for server-side binding
52
54
  * @returns The affected row count
53
55
  */
54
- execute(sql: string, params?: unknown[]): Promise<{ rowCount: number }>;
56
+ execute(
57
+ sql: string,
58
+ params?: unknown[],
59
+ metadata?: TraceMetadata,
60
+ ): Promise<{ rowCount: number }>;
55
61
  }
@@ -4,9 +4,9 @@ Manage feature flags, get flag evaluations, and interact with LaunchDarkly's fea
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | ----------------------------- | -------------------------------------------------------- |
9
- | `apiRequest(options, schema)` | Make any LaunchDarkly API request with schema validation |
7
+ | Method | Description |
8
+ | ---------------------------------------- | -------------------------------------------------------- |
9
+ | `apiRequest(options, schema, metadata?)` | Make any LaunchDarkly API request with schema validation |
10
10
 
11
11
  ## Usage
12
12
 
@@ -296,6 +296,10 @@ const result = await ctx.integrations.launchdarkly.apiRequest(
296
296
  );
297
297
  ```
298
298
 
299
+ ## Trace Metadata
300
+
301
+ 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.
302
+
299
303
  ## Common Pitfalls
300
304
 
301
305
  ### No Specialized Methods
@@ -4,10 +4,10 @@ Execute SQL queries and statements against MariaDB databases with full type safe
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
 
@@ -72,6 +72,10 @@ const deleteResult = await ctx.integrations.mariadb.execute(
72
72
  console.log(`Deleted ${deleteResult.rowCount} expired sessions`);
73
73
  ```
74
74
 
75
+ ## Trace Metadata
76
+
77
+ 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.
78
+
75
79
  ## Common Pitfalls
76
80
 
77
81
  ### 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 MariaDBPlugin } from "@superblocksteam/types/dist/src/plugins/mariadb/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 MariaDBClientImpl implements MariaDBClient, 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 MariaDBClientImpl implements MariaDBClient, 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 MariaDB queries with type-safe validation.
@@ -45,6 +46,7 @@ export interface MariaDBClient 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 MariaDBClient 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 @@ Interact with Mistral AI's APIs for chat completions, embeddings, and code gener
4
4
 
5
5
  ## Methods
6
6
 
7
- | Method | Description |
8
- | ----------------------------- | --------------------------------------------------- |
9
- | `apiRequest(options, schema)` | Make any Mistral API request with schema validation |
7
+ | Method | Description |
8
+ | ---------------------------------------- | --------------------------------------------------- |
9
+ | `apiRequest(options, schema, metadata?)` | Make any Mistral API request with schema validation |
10
10
 
11
11
  ## Usage
12
12
 
@@ -245,6 +245,10 @@ const result = await ctx.integrations.mistral.apiRequest(
245
245
  const data = JSON.parse(result.choices[0]?.message.content ?? "{}");
246
246
  ```
247
247
 
248
+ ## Trace Metadata
249
+
250
+ 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.
251
+
248
252
  ## Common Pitfalls
249
253
 
250
254
  ### No Specialized Methods