@superblocksteam/sdk-api 2.0.105-next.0 → 2.0.105-next.2

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 (163) hide show
  1. package/README.md +202 -86
  2. package/dist/api/definition.d.ts +11 -6
  3. package/dist/api/definition.d.ts.map +1 -1
  4. package/dist/api/definition.js +19 -12
  5. package/dist/api/definition.js.map +1 -1
  6. package/dist/api/definition.test.js +39 -15
  7. package/dist/api/definition.test.js.map +1 -1
  8. package/dist/errors.d.ts +1 -1
  9. package/dist/errors.js +1 -1
  10. package/dist/index.d.ts +10 -10
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +9 -5
  13. package/dist/index.js.map +1 -1
  14. package/dist/integrations/base/index.d.ts +2 -1
  15. package/dist/integrations/base/index.d.ts.map +1 -1
  16. package/dist/integrations/base/index.js +1 -0
  17. package/dist/integrations/base/index.js.map +1 -1
  18. package/dist/integrations/base/rest-api-client-base.d.ts +48 -0
  19. package/dist/integrations/base/rest-api-client-base.d.ts.map +1 -0
  20. package/dist/integrations/base/rest-api-client-base.js +98 -0
  21. package/dist/integrations/base/rest-api-client-base.js.map +1 -0
  22. package/dist/integrations/base/rest-api-integration-client.d.ts +10 -20
  23. package/dist/integrations/base/rest-api-integration-client.d.ts.map +1 -1
  24. package/dist/integrations/base/rest-api-integration-client.js +10 -65
  25. package/dist/integrations/base/rest-api-integration-client.js.map +1 -1
  26. package/dist/integrations/box/types.d.ts +1 -1
  27. package/dist/integrations/declarations.d.ts +5 -63
  28. package/dist/integrations/declarations.d.ts.map +1 -1
  29. package/dist/integrations/declarations.js +5 -59
  30. package/dist/integrations/declarations.js.map +1 -1
  31. package/dist/integrations/documentation.test.js +0 -2
  32. package/dist/integrations/documentation.test.js.map +1 -1
  33. package/dist/integrations/googledrive/types.d.ts +1 -1
  34. package/dist/integrations/index.d.ts +1 -9
  35. package/dist/integrations/index.d.ts.map +1 -1
  36. package/dist/integrations/index.js +1 -6
  37. package/dist/integrations/index.js.map +1 -1
  38. package/dist/integrations/registry.d.ts +1 -10
  39. package/dist/integrations/registry.d.ts.map +1 -1
  40. package/dist/integrations/registry.js +0 -25
  41. package/dist/integrations/registry.js.map +1 -1
  42. package/dist/integrations/slack/client.d.ts +13 -9
  43. package/dist/integrations/slack/client.d.ts.map +1 -1
  44. package/dist/integrations/slack/client.js +60 -8
  45. package/dist/integrations/slack/client.js.map +1 -1
  46. package/dist/integrations/slack/client.test.d.ts +11 -0
  47. package/dist/integrations/slack/client.test.d.ts.map +1 -0
  48. package/dist/integrations/slack/client.test.js +368 -0
  49. package/dist/integrations/slack/client.test.js.map +1 -0
  50. package/dist/integrations/slack/index.d.ts +2 -1
  51. package/dist/integrations/slack/index.d.ts.map +1 -1
  52. package/dist/integrations/slack/index.js +1 -0
  53. package/dist/integrations/slack/index.js.map +1 -1
  54. package/dist/integrations/slack/types.d.ts +127 -28
  55. package/dist/integrations/slack/types.d.ts.map +1 -1
  56. package/dist/integrations/slack/types.js +27 -1
  57. package/dist/integrations/slack/types.js.map +1 -1
  58. package/dist/integrations/snowflake/client.d.ts +2 -2
  59. package/dist/integrations/snowflake/client.js +2 -2
  60. package/dist/runtime/context.d.ts +1 -1
  61. package/dist/runtime/executor.d.ts +2 -2
  62. package/dist/types.d.ts +14 -5
  63. package/dist/types.d.ts.map +1 -1
  64. package/package.json +2 -2
  65. package/src/api/definition.test.ts +40 -15
  66. package/src/api/definition.ts +19 -12
  67. package/src/errors.ts +1 -1
  68. package/src/index.ts +13 -30
  69. package/src/integrations/asana/README.md +12 -12
  70. package/src/integrations/base/index.ts +2 -1
  71. package/src/integrations/base/rest-api-client-base.ts +134 -0
  72. package/src/integrations/base/rest-api-integration-client.ts +12 -89
  73. package/src/integrations/bitbucket/README.md +19 -19
  74. package/src/integrations/box/README.md +24 -24
  75. package/src/integrations/box/types.ts +1 -1
  76. package/src/integrations/circleci/README.md +18 -18
  77. package/src/integrations/declarations.ts +5 -91
  78. package/src/integrations/documentation.test.ts +0 -2
  79. package/src/integrations/googledrive/README.md +25 -22
  80. package/src/integrations/googledrive/types.ts +1 -1
  81. package/src/integrations/graphql/README.md +2 -2
  82. package/src/integrations/index.ts +0 -45
  83. package/src/integrations/registry.ts +1 -34
  84. package/src/integrations/salesforce/README.md +11 -9
  85. package/src/integrations/slack/README.md +62 -19
  86. package/src/integrations/slack/client.test.ts +553 -0
  87. package/src/integrations/slack/client.ts +92 -12
  88. package/src/integrations/slack/index.ts +6 -1
  89. package/src/integrations/slack/types.ts +142 -29
  90. package/src/integrations/snowflake/client.ts +2 -2
  91. package/src/integrations/zoom/README.md +15 -15
  92. package/src/runtime/context.ts +1 -1
  93. package/src/runtime/executor.ts +2 -2
  94. package/src/types.ts +14 -5
  95. package/dist/integrations/couchbase/client.d.ts +0 -36
  96. package/dist/integrations/couchbase/client.d.ts.map +0 -1
  97. package/dist/integrations/couchbase/client.js +0 -148
  98. package/dist/integrations/couchbase/client.js.map +0 -1
  99. package/dist/integrations/couchbase/index.d.ts +0 -8
  100. package/dist/integrations/couchbase/index.d.ts.map +0 -1
  101. package/dist/integrations/couchbase/index.js +0 -7
  102. package/dist/integrations/couchbase/index.js.map +0 -1
  103. package/dist/integrations/couchbase/types.d.ts +0 -100
  104. package/dist/integrations/couchbase/types.d.ts.map +0 -1
  105. package/dist/integrations/couchbase/types.js +0 -5
  106. package/dist/integrations/couchbase/types.js.map +0 -1
  107. package/dist/integrations/kafka/client.d.ts +0 -25
  108. package/dist/integrations/kafka/client.d.ts.map +0 -1
  109. package/dist/integrations/kafka/client.js +0 -124
  110. package/dist/integrations/kafka/client.js.map +0 -1
  111. package/dist/integrations/kafka/index.d.ts +0 -8
  112. package/dist/integrations/kafka/index.d.ts.map +0 -1
  113. package/dist/integrations/kafka/index.js +0 -7
  114. package/dist/integrations/kafka/index.js.map +0 -1
  115. package/dist/integrations/kafka/types.d.ts +0 -113
  116. package/dist/integrations/kafka/types.d.ts.map +0 -1
  117. package/dist/integrations/kafka/types.js +0 -5
  118. package/dist/integrations/kafka/types.js.map +0 -1
  119. package/dist/integrations/kinesis/client.d.ts +0 -31
  120. package/dist/integrations/kinesis/client.d.ts.map +0 -1
  121. package/dist/integrations/kinesis/client.js +0 -101
  122. package/dist/integrations/kinesis/client.js.map +0 -1
  123. package/dist/integrations/kinesis/index.d.ts +0 -8
  124. package/dist/integrations/kinesis/index.d.ts.map +0 -1
  125. package/dist/integrations/kinesis/index.js +0 -7
  126. package/dist/integrations/kinesis/index.js.map +0 -1
  127. package/dist/integrations/kinesis/types.d.ts +0 -97
  128. package/dist/integrations/kinesis/types.d.ts.map +0 -1
  129. package/dist/integrations/kinesis/types.js +0 -7
  130. package/dist/integrations/kinesis/types.js.map +0 -1
  131. package/dist/integrations/python/client.d.ts +0 -42
  132. package/dist/integrations/python/client.d.ts.map +0 -1
  133. package/dist/integrations/python/client.js +0 -89
  134. package/dist/integrations/python/client.js.map +0 -1
  135. package/dist/integrations/python/client.test.d.ts +0 -5
  136. package/dist/integrations/python/client.test.d.ts.map +0 -1
  137. package/dist/integrations/python/client.test.js +0 -214
  138. package/dist/integrations/python/client.test.js.map +0 -1
  139. package/dist/integrations/python/index.d.ts +0 -6
  140. package/dist/integrations/python/index.d.ts.map +0 -1
  141. package/dist/integrations/python/index.js +0 -5
  142. package/dist/integrations/python/index.js.map +0 -1
  143. package/dist/integrations/python/types.d.ts +0 -85
  144. package/dist/integrations/python/types.d.ts.map +0 -1
  145. package/dist/integrations/python/types.js +0 -5
  146. package/dist/integrations/python/types.js.map +0 -1
  147. package/src/integrations/couchbase/README.md +0 -138
  148. package/src/integrations/couchbase/client.ts +0 -225
  149. package/src/integrations/couchbase/index.ts +0 -8
  150. package/src/integrations/couchbase/types.ts +0 -126
  151. package/src/integrations/kafka/README.md +0 -144
  152. package/src/integrations/kafka/client.ts +0 -216
  153. package/src/integrations/kafka/index.ts +0 -14
  154. package/src/integrations/kafka/types.ts +0 -128
  155. package/src/integrations/kinesis/README.md +0 -153
  156. package/src/integrations/kinesis/client.ts +0 -146
  157. package/src/integrations/kinesis/index.ts +0 -14
  158. package/src/integrations/kinesis/types.ts +0 -114
  159. package/src/integrations/python/README.md +0 -566
  160. package/src/integrations/python/client.test.ts +0 -341
  161. package/src/integrations/python/client.ts +0 -136
  162. package/src/integrations/python/index.ts +0 -6
  163. package/src/integrations/python/types.ts +0 -92
@@ -75,7 +75,7 @@ export default api({
75
75
  const result = await ctx.integrations.box.apiRequest(
76
76
  {
77
77
  method: "GET",
78
- path: `/2.0/folders/${folderId}/items`,
78
+ path: `/folders/${folderId}/items`,
79
79
  params: {
80
80
  limit: limit,
81
81
  offset: 0,
@@ -133,7 +133,7 @@ const FileInfoSchema = z.object({
133
133
  const file = await ctx.integrations.box.apiRequest(
134
134
  {
135
135
  method: "GET",
136
- path: `/2.0/files/${fileId}`,
136
+ path: `/files/${fileId}`,
137
137
  params: {
138
138
  fields:
139
139
  "id,name,size,created_at,modified_at,created_by,modified_by,parent,sha1,shared_link",
@@ -154,7 +154,7 @@ const DownloadUrlResponseSchema = z.string();
154
154
  const content = await ctx.integrations.box.apiRequest(
155
155
  {
156
156
  method: "GET",
157
- path: `/2.0/files/${fileId}/content`,
157
+ path: `/files/${fileId}/content`,
158
158
  },
159
159
  { response: DownloadUrlResponseSchema },
160
160
  );
@@ -172,7 +172,7 @@ const UploadResponseSchema = z.object({
172
172
  const result = await ctx.integrations.box.apiRequest(
173
173
  {
174
174
  method: "POST",
175
- path: "/2.0/files/content",
175
+ path: "/files/content",
176
176
  headers: {
177
177
  "Content-Type": "multipart/form-data",
178
178
  },
@@ -209,7 +209,7 @@ const FolderInfoSchema = z.object({
209
209
  const folder = await ctx.integrations.box.apiRequest(
210
210
  {
211
211
  method: "POST",
212
- path: "/2.0/folders",
212
+ path: "/folders",
213
213
  body: {
214
214
  name: "New Folder",
215
215
  parent: {
@@ -229,7 +229,7 @@ console.log(`Created folder: ${folder.name} (${folder.id})`);
229
229
  const copiedFile = await ctx.integrations.box.apiRequest(
230
230
  {
231
231
  method: "POST",
232
- path: `/2.0/files/${fileId}/copy`,
232
+ path: `/files/${fileId}/copy`,
233
233
  body: {
234
234
  parent: {
235
235
  id: destinationFolderId,
@@ -247,7 +247,7 @@ const copiedFile = await ctx.integrations.box.apiRequest(
247
247
  const movedFile = await ctx.integrations.box.apiRequest(
248
248
  {
249
249
  method: "PUT",
250
- path: `/2.0/files/${fileId}`,
250
+ path: `/files/${fileId}`,
251
251
  body: {
252
252
  parent: {
253
253
  id: newParentFolderId,
@@ -264,7 +264,7 @@ const movedFile = await ctx.integrations.box.apiRequest(
264
264
  const updatedFile = await ctx.integrations.box.apiRequest(
265
265
  {
266
266
  method: "PUT",
267
- path: `/2.0/files/${fileId}`,
267
+ path: `/files/${fileId}`,
268
268
  body: {
269
269
  name: "renamed-file.txt",
270
270
  description: "Updated file description",
@@ -281,7 +281,7 @@ const updatedFile = await ctx.integrations.box.apiRequest(
281
281
  await ctx.integrations.box.apiRequest(
282
282
  {
283
283
  method: "DELETE",
284
- path: `/2.0/files/${fileId}`,
284
+ path: `/files/${fileId}`,
285
285
  },
286
286
  { response: z.void() },
287
287
  );
@@ -304,7 +304,7 @@ const SharedLinkSchema = z.object({
304
304
  const file = await ctx.integrations.box.apiRequest(
305
305
  {
306
306
  method: "PUT",
307
- path: `/2.0/files/${fileId}`,
307
+ path: `/files/${fileId}`,
308
308
  params: {
309
309
  fields: "shared_link",
310
310
  },
@@ -337,7 +337,7 @@ const SearchResponseSchema = z.object({
337
337
  const result = await ctx.integrations.box.apiRequest(
338
338
  {
339
339
  method: "GET",
340
- path: "/2.0/search",
340
+ path: "/search",
341
341
  params: {
342
342
  query: "quarterly report",
343
343
  type: "file",
@@ -372,7 +372,7 @@ const CommentSchema = z.object({
372
372
  const comment = await ctx.integrations.box.apiRequest(
373
373
  {
374
374
  method: "POST",
375
- path: "/2.0/comments",
375
+ path: "/comments",
376
376
  body: {
377
377
  item: {
378
378
  type: "file",
@@ -400,22 +400,22 @@ await box.uploadFile({ ... });
400
400
 
401
401
  // CORRECT - Use apiRequest
402
402
  await ctx.integrations.box.apiRequest(
403
- { method: "GET", path: `/2.0/folders/${folderId}/items`, params: { ... } },
403
+ { method: "GET", path: `/folders/${folderId}/items`, params: { ... } },
404
404
  { response: ListItemsResponseSchema }
405
405
  );
406
406
  ```
407
407
 
408
408
  ### API Version in Path
409
409
 
410
- Box API paths include version:
410
+ The base URL already includes `/2.0`, so do not repeat it in paths:
411
411
 
412
412
  ```typescript
413
- // CORRECT - Include version
414
- const path = "/2.0/files/123";
415
- const path = "/2.0/folders/0/items";
416
-
417
- // WRONG - Missing version
413
+ // CORRECT - No version prefix (base URL already has /2.0)
418
414
  const path = "/files/123";
415
+ const path = "/folders/0/items";
416
+
417
+ // WRONG - Duplicates version from base URL
418
+ const path = "/2.0/files/123";
419
419
  ```
420
420
 
421
421
  ### Root Folder ID is "0"
@@ -437,7 +437,7 @@ Use `fields` to get specific data:
437
437
  ```typescript
438
438
  // Without fields, you get minimal data
439
439
  const result = await ctx.integrations.box.apiRequest(
440
- { method: "GET", path: `/2.0/files/${fileId}` },
440
+ { method: "GET", path: `/files/${fileId}` },
441
441
  { response: FileSchema },
442
442
  );
443
443
 
@@ -445,7 +445,7 @@ const result = await ctx.integrations.box.apiRequest(
445
445
  const result = await ctx.integrations.box.apiRequest(
446
446
  {
447
447
  method: "GET",
448
- path: `/2.0/files/${fileId}`,
448
+ path: `/files/${fileId}`,
449
449
  params: {
450
450
  fields: "id,name,size,created_at,modified_at,parent,shared_link",
451
451
  },
@@ -477,7 +477,7 @@ Use `If-Match` with etag for safe updates:
477
477
  const result = await ctx.integrations.box.apiRequest(
478
478
  {
479
479
  method: "PUT",
480
- path: `/2.0/files/${fileId}`,
480
+ path: `/files/${fileId}`,
481
481
  headers: {
482
482
  "If-Match": file.etag, // Prevents overwriting concurrent changes
483
483
  },
@@ -503,7 +503,7 @@ async function getAllItems(box: BoxClient, folderId: string) {
503
503
  const result = await ctx.integrations.box.apiRequest(
504
504
  {
505
505
  method: "GET",
506
- path: `/2.0/folders/${folderId}/items`,
506
+ path: `/folders/${folderId}/items`,
507
507
  params: { limit, offset, fields: "id,name,type" },
508
508
  },
509
509
  { response: ListItemsResponseSchema },
@@ -557,7 +557,7 @@ import { RestApiValidationError } from "@superblocksteam/sdk-api";
557
557
 
558
558
  try {
559
559
  const result = await ctx.integrations.box.apiRequest(
560
- { method: "GET", path: `/2.0/folders/${folderId}/items`, params: { ... } },
560
+ { method: "GET", path: `/folders/${folderId}/items`, params: { ... } },
561
561
  { response: ListItemsResponseSchema }
562
562
  );
563
563
  } catch (error) {
@@ -24,7 +24,7 @@ import type { SupportsApiRequest } from "../base/index.js";
24
24
  * const result = await box.apiRequest(
25
25
  * {
26
26
  * method: 'GET',
27
- * path: '/2.0/folders/0',
27
+ * path: '/folders/0',
28
28
  * },
29
29
  * { response: ResponseSchema }
30
30
  * );
@@ -51,7 +51,7 @@ export default api({
51
51
  const result = await ctx.integrations.circleci.apiRequest(
52
52
  {
53
53
  method: "POST",
54
- path: `/api/v2/project/${projectSlug}/pipeline`,
54
+ path: `/project/${projectSlug}/pipeline`,
55
55
  body: {
56
56
  branch: branch,
57
57
  parameters: {
@@ -73,7 +73,7 @@ export default api({
73
73
  const result = await ctx.integrations.circleci.apiRequest(
74
74
  {
75
75
  method: "GET",
76
- path: `/api/v2/pipeline/${pipelineId}`,
76
+ path: `/pipeline/${pipelineId}`,
77
77
  },
78
78
  { response: PipelineSchema },
79
79
  );
@@ -102,7 +102,7 @@ const ListWorkflowsResponseSchema = z.object({
102
102
  const result = await ctx.integrations.circleci.apiRequest(
103
103
  {
104
104
  method: "GET",
105
- path: `/api/v2/pipeline/${pipelineId}/workflow`,
105
+ path: `/pipeline/${pipelineId}/workflow`,
106
106
  },
107
107
  { response: ListWorkflowsResponseSchema },
108
108
  );
@@ -133,7 +133,7 @@ const ListJobsResponseSchema = z.object({
133
133
  const result = await ctx.integrations.circleci.apiRequest(
134
134
  {
135
135
  method: "GET",
136
- path: `/api/v2/workflow/${workflowId}/job`,
136
+ path: `/workflow/${workflowId}/job`,
137
137
  },
138
138
  { response: ListJobsResponseSchema },
139
139
  );
@@ -162,7 +162,7 @@ const JobDetailSchema = z.object({
162
162
  const result = await ctx.integrations.circleci.apiRequest(
163
163
  {
164
164
  method: "GET",
165
- path: `/api/v2/project/${projectSlug}/job/${jobNumber}`,
165
+ path: `/project/${projectSlug}/job/${jobNumber}`,
166
166
  },
167
167
  { response: JobDetailSchema },
168
168
  );
@@ -178,7 +178,7 @@ const RetryResponseSchema = z.object({
178
178
  const result = await ctx.integrations.circleci.apiRequest(
179
179
  {
180
180
  method: "POST",
181
- path: `/api/v2/workflow/${workflowId}/rerun`,
181
+ path: `/workflow/${workflowId}/rerun`,
182
182
  body: {
183
183
  from_failed: true, // Only rerun failed jobs
184
184
  },
@@ -199,7 +199,7 @@ const CancelResponseSchema = z.object({
199
199
  const result = await ctx.integrations.circleci.apiRequest(
200
200
  {
201
201
  method: "POST",
202
- path: `/api/v2/workflow/${workflowId}/cancel`,
202
+ path: `/workflow/${workflowId}/cancel`,
203
203
  },
204
204
  { response: CancelResponseSchema },
205
205
  );
@@ -216,7 +216,7 @@ const ListPipelinesResponseSchema = z.object({
216
216
  const result = await ctx.integrations.circleci.apiRequest(
217
217
  {
218
218
  method: "GET",
219
- path: `/api/v2/project/${projectSlug}/pipeline`,
219
+ path: `/project/${projectSlug}/pipeline`,
220
220
  params: {
221
221
  branch: "main",
222
222
  "page-token": undefined, // For pagination
@@ -247,7 +247,7 @@ const ProjectSchema = z.object({
247
247
  const result = await ctx.integrations.circleci.apiRequest(
248
248
  {
249
249
  method: "GET",
250
- path: `/api/v2/project/${projectSlug}`,
250
+ path: `/project/${projectSlug}`,
251
251
  },
252
252
  { response: ProjectSchema },
253
253
  );
@@ -270,7 +270,7 @@ const ListArtifactsResponseSchema = z.object({
270
270
  const result = await ctx.integrations.circleci.apiRequest(
271
271
  {
272
272
  method: "GET",
273
- path: `/api/v2/project/${projectSlug}/${jobNumber}/artifacts`,
273
+ path: `/project/${projectSlug}/${jobNumber}/artifacts`,
274
274
  },
275
275
  { response: ListArtifactsResponseSchema },
276
276
  );
@@ -295,7 +295,7 @@ await circleci.getWorkflow({ ... });
295
295
 
296
296
  // CORRECT - Use apiRequest
297
297
  await ctx.integrations.circleci.apiRequest(
298
- { method: "POST", path: `/api/v2/project/${slug}/pipeline`, body: { ... } },
298
+ { method: "POST", path: `/project/${slug}/pipeline`, body: { ... } },
299
299
  { response: PipelineSchema }
300
300
  );
301
301
  ```
@@ -317,13 +317,13 @@ const slug = "gl/my-group/my-repo";
317
317
 
318
318
  ### API Version in Path
319
319
 
320
- Always include `/api/v2/`:
320
+ The base URL already includes `/api/v2`, so do not repeat it in paths:
321
321
 
322
322
  ```typescript
323
- // WRONG
323
+ // CORRECT - No version prefix (base URL already has /api/v2)
324
324
  const path = `/project/${slug}/pipeline`;
325
325
 
326
- // CORRECT
326
+ // WRONG - Duplicates version from base URL
327
327
  const path = `/api/v2/project/${slug}/pipeline`;
328
328
  ```
329
329
 
@@ -406,7 +406,7 @@ async function getAllPipelines(circleci: CircleCIClient, projectSlug: string) {
406
406
  const result = await ctx.integrations.circleci.apiRequest(
407
407
  {
408
408
  method: "GET",
409
- path: `/api/v2/project/${projectSlug}/pipeline`,
409
+ path: `/project/${projectSlug}/pipeline`,
410
410
  params: pageToken ? { "page-token": pageToken } : {},
411
411
  },
412
412
  { response: ListPipelinesResponseSchema },
@@ -429,7 +429,7 @@ When rerunning workflows:
429
429
  await ctx.integrations.circleci.apiRequest(
430
430
  {
431
431
  method: "POST",
432
- path: `/api/v2/workflow/${workflowId}/rerun`,
432
+ path: `/workflow/${workflowId}/rerun`,
433
433
  body: {
434
434
  from_failed: false, // Rerun everything
435
435
  },
@@ -441,7 +441,7 @@ await ctx.integrations.circleci.apiRequest(
441
441
  await ctx.integrations.circleci.apiRequest(
442
442
  {
443
443
  method: "POST",
444
- path: `/api/v2/workflow/${workflowId}/rerun`,
444
+ path: `/workflow/${workflowId}/rerun`,
445
445
  body: {
446
446
  from_failed: true, // Only failed jobs
447
447
  },
@@ -457,7 +457,7 @@ import { RestApiValidationError } from "@superblocksteam/sdk-api";
457
457
 
458
458
  try {
459
459
  const result = await ctx.integrations.circleci.apiRequest(
460
- { method: "POST", path: `/api/v2/project/${slug}/pipeline`, body: { ... } },
460
+ { method: "POST", path: `/project/${slug}/pipeline`, body: { ... } },
461
461
  { response: PipelineSchema }
462
462
  );
463
463
  } catch (error) {
@@ -24,7 +24,7 @@
24
24
  * output: z.object({ name: z.string() }),
25
25
  * async run(ctx) {
26
26
  * const users = await ctx.integrations.pg.query(...);
27
- * await ctx.integrations.notifier.postMessage(...);
27
+ * await ctx.integrations.notifier.apiRequest(...);
28
28
  * return { name: users[0].name };
29
29
  * },
30
30
  * });
@@ -43,7 +43,6 @@ import type { CockroachDBClient } from "./cockroachdb/index.js";
43
43
  import type { CohereClient } from "./cohere/index.js";
44
44
  import type { ConfluenceClient } from "./confluence/index.js";
45
45
  import type { CosmosDBClient } from "./cosmosdb/index.js";
46
- import type { CouchbaseClient } from "./couchbase/index.js";
47
46
  import type { DatabricksClient } from "./databricks/index.js";
48
47
  import type { DatadogClient } from "./datadog/index.js";
49
48
  import type { DropboxClient } from "./dropbox/index.js";
@@ -62,8 +61,6 @@ import type { GoogleSheetsClient } from "./gsheets/index.js";
62
61
  import type { HubSpotClient } from "./hubspot/index.js";
63
62
  import type { IntercomClient } from "./intercom/index.js";
64
63
  import type { JiraClient } from "./jira/index.js";
65
- import type { KafkaClient } from "./kafka/index.js";
66
- import type { KinesisClient } from "./kinesis/index.js";
67
64
  import type { LakebaseClient } from "./lakebase/index.js";
68
65
  import type { LaunchDarklyClient } from "./launchdarkly/index.js";
69
66
  import type { MariaDBClient } from "./mariadb/index.js";
@@ -77,7 +74,6 @@ import type { OracleDBClient } from "./oracledb/index.js";
77
74
  import type { PagerDutyClient } from "./pagerduty/index.js";
78
75
  import type { PerplexityClient } from "./perplexity/index.js";
79
76
  import type { PostgresClient } from "./postgres/index.js";
80
- import type { PythonClient } from "./python/index.js";
81
77
  import type { RedisClient } from "./redis/index.js";
82
78
  import type { RedshiftClient } from "./redshift/index.js";
83
79
  import type { RestApiIntegrationPluginClient } from "./restapiintegration/index.js";
@@ -313,9 +309,6 @@ export type DynamoDBRef = IntegrationRef<"dynamodb", DynamoDBClient>;
313
309
  /** Reference to a CosmosDB integration */
314
310
  export type CosmosDBRef = IntegrationRef<"cosmosdb", CosmosDBClient>;
315
311
 
316
- /** Reference to a Couchbase integration */
317
- export type CouchbaseRef = IntegrationRef<"couchbase", CouchbaseClient>;
318
-
319
312
  /** Reference to an S3 integration */
320
313
  export type S3Ref = IntegrationRef<"s3", S3Client>;
321
314
 
@@ -325,12 +318,6 @@ export type GCSRef = IntegrationRef<"gcs", GCSClient>;
325
318
  /** Reference to a Google Sheets integration */
326
319
  export type GoogleSheetsRef = IntegrationRef<"gsheets", GoogleSheetsClient>;
327
320
 
328
- /** Reference to a Kafka integration */
329
- export type KafkaRef = IntegrationRef<"kafka", KafkaClient>;
330
-
331
- /** Reference to a Kinesis integration */
332
- export type KinesisRef = IntegrationRef<"kinesis", KinesisClient>;
333
-
334
321
  /** Reference to a Salesforce integration */
335
322
  export type SalesforceRef = IntegrationRef<"salesforce", SalesforceClient>;
336
323
 
@@ -343,15 +330,6 @@ export type SuperblocksOCRRef = IntegrationRef<
343
330
  SuperblocksOCRClient
344
331
  >;
345
332
 
346
- /** Reference to a Python integration */
347
- export type PythonRef = IntegrationRef<"python", PythonClient>;
348
-
349
- /** Reference to a Confluent integration (Kafka-compatible) */
350
- export type ConfluentRef = IntegrationRef<"confluent", KafkaClient>;
351
-
352
- /** Reference to a Redpanda integration (Kafka-compatible) */
353
- export type RedpandaRef = IntegrationRef<"redpanda", KafkaClient>;
354
-
355
333
  /** Reference to a Lakebase integration */
356
334
  export type LakebaseRef = IntegrationRef<"lakebase", LakebaseClient>;
357
335
 
@@ -426,10 +404,10 @@ export function postgres<T extends string>(id: LiteralString<T>): PostgresRef {
426
404
  * input: z.object({ message: z.string() }),
427
405
  * output: z.object({ sent: z.boolean() }),
428
406
  * async run(ctx, { message }) {
429
- * await ctx.integrations.notifier.postMessage({
430
- * channel: '#alerts',
431
- * text: message,
432
- * });
407
+ * await ctx.integrations.notifier.apiRequest(
408
+ * { method: 'POST', path: '/chat.postMessage', body: { channel: '#alerts', text: message } },
409
+ * { response: z.object({ ok: z.boolean() }) }
410
+ * );
433
411
  * return { sent: true };
434
412
  * },
435
413
  * });
@@ -971,18 +949,6 @@ export function cosmosdb<T extends string>(id: LiteralString<T>): CosmosDBRef {
971
949
  return createRef<"cosmosdb", CosmosDBClient, T>("cosmosdb", id);
972
950
  }
973
951
 
974
- /**
975
- * Declare a Couchbase integration.
976
- *
977
- * @param id - The integration ID (UUID)
978
- * @returns An integration reference for use in the API config
979
- */
980
- export function couchbase<T extends string>(
981
- id: LiteralString<T>,
982
- ): CouchbaseRef {
983
- return createRef<"couchbase", CouchbaseClient, T>("couchbase", id);
984
- }
985
-
986
952
  /**
987
953
  * Declare an S3 integration.
988
954
  *
@@ -1015,26 +981,6 @@ export function googleSheets<T extends string>(
1015
981
  return createRef<"gsheets", GoogleSheetsClient, T>("gsheets", id);
1016
982
  }
1017
983
 
1018
- /**
1019
- * Declare a Kafka integration.
1020
- *
1021
- * @param id - The integration ID (UUID)
1022
- * @returns An integration reference for use in the API config
1023
- */
1024
- export function kafka<T extends string>(id: LiteralString<T>): KafkaRef {
1025
- return createRef<"kafka", KafkaClient, T>("kafka", id);
1026
- }
1027
-
1028
- /**
1029
- * Declare a Kinesis integration.
1030
- *
1031
- * @param id - The integration ID (UUID)
1032
- * @returns An integration reference for use in the API config
1033
- */
1034
- export function kinesis<T extends string>(id: LiteralString<T>): KinesisRef {
1035
- return createRef<"kinesis", KinesisClient, T>("kinesis", id);
1036
- }
1037
-
1038
984
  /**
1039
985
  * Declare a Salesforce integration.
1040
986
  *
@@ -1072,38 +1018,6 @@ export function superblocksOcr<T extends string>(
1072
1018
  );
1073
1019
  }
1074
1020
 
1075
- /**
1076
- * Declare a Python integration.
1077
- *
1078
- * @param id - The integration ID (UUID)
1079
- * @returns An integration reference for use in the API config
1080
- */
1081
- export function python<T extends string>(id: LiteralString<T>): PythonRef {
1082
- return createRef<"python", PythonClient, T>("python", id);
1083
- }
1084
-
1085
- /**
1086
- * Declare a Confluent integration (Kafka-compatible).
1087
- *
1088
- * @param id - The integration ID (UUID)
1089
- * @returns An integration reference for use in the API config
1090
- */
1091
- export function confluent<T extends string>(
1092
- id: LiteralString<T>,
1093
- ): ConfluentRef {
1094
- return createRef<"confluent", KafkaClient, T>("confluent", id);
1095
- }
1096
-
1097
- /**
1098
- * Declare a Redpanda integration (Kafka-compatible).
1099
- *
1100
- * @param id - The integration ID (UUID)
1101
- * @returns An integration reference for use in the API config
1102
- */
1103
- export function redpanda<T extends string>(id: LiteralString<T>): RedpandaRef {
1104
- return createRef<"redpanda", KafkaClient, T>("redpanda", id);
1105
- }
1106
-
1107
1021
  /**
1108
1022
  * Declare a Lakebase integration.
1109
1023
  *
@@ -15,9 +15,7 @@ type PlaceholderDocsCase = {
15
15
  };
16
16
 
17
17
  const DOC_DIRECTORY_ALIASES = {
18
- confluent: "kafka",
19
18
  graphqlintegration: "graphql",
20
- redpanda: "kafka",
21
19
  } as const;
22
20
 
23
21
  const DOC_DIRECTORY_EXCLUSIONS = new Set(["base"]);
@@ -71,7 +71,7 @@ export default api({
71
71
  const result = await ctx.integrations.drive.apiRequest(
72
72
  {
73
73
  method: "GET",
74
- path: "/drive/v3/files",
74
+ path: "/files",
75
75
  params: {
76
76
  q: query,
77
77
  pageSize: pageSize,
@@ -99,7 +99,7 @@ export default api({
99
99
  const file = await ctx.integrations.drive.apiRequest(
100
100
  {
101
101
  method: "GET",
102
- path: `/drive/v3/files/${fileId}`,
102
+ path: `/files/${fileId}`,
103
103
  params: {
104
104
  fields:
105
105
  "id,name,mimeType,size,createdTime,modifiedTime,parents,webViewLink,webContentLink,owners",
@@ -120,7 +120,7 @@ const DownloadResponseSchema = z.string(); // Raw content
120
120
  const content = await ctx.integrations.drive.apiRequest(
121
121
  {
122
122
  method: "GET",
123
- path: `/drive/v3/files/${fileId}`,
123
+ path: `/files/${fileId}`,
124
124
  params: {
125
125
  alt: "media",
126
126
  },
@@ -134,7 +134,7 @@ const ExportResponseSchema = z.string();
134
134
  const docContent = await ctx.integrations.drive.apiRequest(
135
135
  {
136
136
  method: "GET",
137
- path: `/drive/v3/files/${fileId}/export`,
137
+ path: `/files/${fileId}/export`,
138
138
  params: {
139
139
  mimeType: "text/plain", // or application/pdf, text/html, etc.
140
140
  },
@@ -149,7 +149,7 @@ const docContent = await ctx.integrations.drive.apiRequest(
149
149
  const folder = await ctx.integrations.drive.apiRequest(
150
150
  {
151
151
  method: "POST",
152
- path: "/drive/v3/files",
152
+ path: "/files",
153
153
  body: {
154
154
  name: "New Folder",
155
155
  mimeType: "application/vnd.google-apps.folder",
@@ -194,7 +194,7 @@ const uploadedFile = await ctx.integrations.drive.apiRequest(
194
194
  const updatedFile = await ctx.integrations.drive.apiRequest(
195
195
  {
196
196
  method: "PATCH",
197
- path: `/drive/v3/files/${fileId}`,
197
+ path: `/files/${fileId}`,
198
198
  body: {
199
199
  name: "Renamed File.txt",
200
200
  description: "Updated description",
@@ -210,7 +210,7 @@ const updatedFile = await ctx.integrations.drive.apiRequest(
210
210
  const movedFile = await ctx.integrations.drive.apiRequest(
211
211
  {
212
212
  method: "PATCH",
213
- path: `/drive/v3/files/${fileId}`,
213
+ path: `/files/${fileId}`,
214
214
  params: {
215
215
  addParents: newFolderId,
216
216
  removeParents: oldFolderId,
@@ -226,7 +226,7 @@ const movedFile = await ctx.integrations.drive.apiRequest(
226
226
  const result = await ctx.integrations.drive.apiRequest(
227
227
  {
228
228
  method: "GET",
229
- path: "/drive/v3/files",
229
+ path: "/files",
230
230
  params: {
231
231
  q: "name contains 'report' and mimeType = 'application/pdf' and trashed = false",
232
232
  pageSize: 25,
@@ -250,7 +250,7 @@ const PermissionSchema = z.object({
250
250
  const permission = await ctx.integrations.drive.apiRequest(
251
251
  {
252
252
  method: "POST",
253
- path: `/drive/v3/files/${fileId}/permissions`,
253
+ path: `/files/${fileId}/permissions`,
254
254
  body: {
255
255
  type: "user", // user, group, domain, anyone
256
256
  role: "reader", // reader, writer, commenter, owner
@@ -271,7 +271,7 @@ const permission = await ctx.integrations.drive.apiRequest(
271
271
  await ctx.integrations.drive.apiRequest(
272
272
  {
273
273
  method: "PATCH",
274
- path: `/drive/v3/files/${fileId}`,
274
+ path: `/files/${fileId}`,
275
275
  body: {
276
276
  trashed: true,
277
277
  },
@@ -283,7 +283,7 @@ await ctx.integrations.drive.apiRequest(
283
283
  await ctx.integrations.drive.apiRequest(
284
284
  {
285
285
  method: "DELETE",
286
- path: `/drive/v3/files/${fileId}`,
286
+ path: `/files/${fileId}`,
287
287
  },
288
288
  { response: z.void() },
289
289
  );
@@ -304,7 +304,7 @@ await drive.uploadFile({ ... });
304
304
 
305
305
  // CORRECT - Use apiRequest
306
306
  await ctx.integrations.drive.apiRequest(
307
- { method: "GET", path: "/drive/v3/files", params: { ... } },
307
+ { method: "GET", path: "/files", params: { ... } },
308
308
  { response: ListFilesResponseSchema }
309
309
  );
310
310
  ```
@@ -316,7 +316,7 @@ By default, only basic fields are returned. Use the `fields` parameter:
316
316
  ```typescript
317
317
  // WRONG - Missing fields, gets minimal data
318
318
  const file = await ctx.integrations.drive.apiRequest(
319
- { method: "GET", path: `/drive/v3/files/${fileId}` },
319
+ { method: "GET", path: `/files/${fileId}` },
320
320
  { response: FileSchema },
321
321
  );
322
322
  // file.size, file.owners, etc. will be undefined
@@ -325,7 +325,7 @@ const file = await ctx.integrations.drive.apiRequest(
325
325
  const file = await ctx.integrations.drive.apiRequest(
326
326
  {
327
327
  method: "GET",
328
- path: `/drive/v3/files/${fileId}`,
328
+ path: `/files/${fileId}`,
329
329
  params: {
330
330
  fields: "id,name,mimeType,size,createdTime,modifiedTime,owners",
331
331
  },
@@ -367,10 +367,10 @@ Google Docs, Sheets, etc. must be exported, not downloaded directly:
367
367
 
368
368
  ```typescript
369
369
  // Regular files - use alt=media
370
- const path = `/drive/v3/files/${fileId}?alt=media`;
370
+ const path = `/files/${fileId}?alt=media`;
371
371
 
372
372
  // Google Docs - use export endpoint
373
- const path = `/drive/v3/files/${fileId}/export?mimeType=text/plain`;
373
+ const path = `/files/${fileId}/export?mimeType=text/plain`;
374
374
 
375
375
  // Export formats for Google Docs
376
376
  // Documents: text/plain, text/html, application/pdf, application/vnd.oasis.opendocument.text
@@ -396,14 +396,17 @@ const sizeMB = sizeBytes / (1024 * 1024);
396
396
 
397
397
  ### Upload Path vs Regular Path
398
398
 
399
- File uploads use a different base path:
399
+ The base URL already includes `/drive/v3`, so regular API paths omit this prefix. However, uploads use a different URL root (`/upload/drive/v3/...` instead of `/drive/v3/...`) and require the full path:
400
400
 
401
401
  ```typescript
402
- // Regular API calls
403
- const path = "/drive/v3/files";
402
+ // Regular API calls (base URL already has /drive/v3)
403
+ const path = "/files";
404
404
 
405
- // Upload calls
405
+ // Upload calls use a different URL root — include the full path
406
406
  const path = "/upload/drive/v3/files";
407
+
408
+ // WRONG - Duplicates base URL prefix for regular calls
409
+ const path = "/drive/v3/files";
407
410
  ```
408
411
 
409
412
  ### Folder MIME Type
@@ -436,7 +439,7 @@ async function getAllFiles(drive: GoogleDriveClient, folderId: string) {
436
439
  const result = await ctx.integrations.drive.apiRequest(
437
440
  {
438
441
  method: "GET",
439
- path: "/drive/v3/files",
442
+ path: "/files",
440
443
  params: {
441
444
  q: `'${folderId}' in parents and trashed = false`,
442
445
  pageSize: 100,
@@ -463,7 +466,7 @@ import { RestApiValidationError } from "@superblocksteam/sdk-api";
463
466
 
464
467
  try {
465
468
  const result = await ctx.integrations.drive.apiRequest(
466
- { method: "GET", path: "/drive/v3/files", params: { ... } },
469
+ { method: "GET", path: "/files", params: { ... } },
467
470
  { response: ListFilesResponseSchema }
468
471
  );
469
472
  } catch (error) {