@superblocksteam/sdk-api 2.0.104 → 2.0.105-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -55,12 +55,9 @@ import { OracleDBClientImpl } from "./oracledb/index.js";
55
55
  import { RedshiftClientImpl } from "./redshift/index.js";
56
56
  // REST API clients
57
57
  import { CosmosDBClientImpl } from "./cosmosdb/index.js";
58
- import { CouchbaseClientImpl } from "./couchbase/index.js";
59
58
  import { DynamoDBClientImpl } from "./dynamodb/index.js";
60
59
  import { GCSClientImpl } from "./gcs/index.js";
61
60
  import { GoogleSheetsClientImpl } from "./gsheets/index.js";
62
- import { KafkaClientImpl } from "./kafka/index.js";
63
- import { KinesisClientImpl } from "./kinesis/index.js";
64
61
  import { LakebaseClientImpl } from "./lakebase/index.js";
65
62
  import { MongoDBClientImpl } from "./mongodb/index.js";
66
63
  import { RedisClientImpl } from "./redis/index.js";
@@ -71,8 +68,6 @@ import { SnowflakePostgresClientImpl } from "./snowflakepostgres/index.js";
71
68
  import { SuperblocksOCRClientImpl } from "./superblocks-ocr/index.js";
72
69
  // REST API plugins
73
70
  import { RestApiIntegrationPluginClientImpl } from "./restapiintegration/index.js";
74
- // Code execution clients
75
- import { PythonClientImpl } from "./python/index.js";
76
71
  /**
77
72
  * Supported plugin IDs mapped to their client constructors.
78
73
  */
@@ -130,18 +125,12 @@ export const SUPPORTED_PLUGINS = {
130
125
  mongodb: "mongodb",
131
126
  dynamodb: "dynamodb",
132
127
  cosmosdb: "cosmosdb",
133
- couchbase: "couchbase",
134
128
  s3: "s3",
135
129
  gcs: "gcs",
136
130
  gsheets: "gsheets",
137
- kafka: "kafka",
138
- kinesis: "kinesis",
139
131
  salesforce: "salesforce",
140
132
  redis: "redis",
141
133
  "superblocks-ocr": "superblocks-ocr",
142
- // Kafka-compatible streaming
143
- confluent: "confluent",
144
- redpanda: "redpanda",
145
134
  // SQL databases (continued)
146
135
  lakebase: "lakebase",
147
136
  snowflakepostgres: "snowflakepostgres",
@@ -149,8 +138,6 @@ export const SUPPORTED_PLUGINS = {
149
138
  smtp: "smtp",
150
139
  // REST API plugins
151
140
  restapiintegration: "restapiintegration",
152
- // Code execution
153
- python: "python",
154
141
  };
155
142
  /**
156
143
  * Creates an integration client based on the plugin ID.
@@ -282,28 +269,18 @@ export function createClient(options) {
282
269
  return new DynamoDBClientImpl(config, executeQuery);
283
270
  case SUPPORTED_PLUGINS.cosmosdb:
284
271
  return new CosmosDBClientImpl(config, executeQuery);
285
- case SUPPORTED_PLUGINS.couchbase:
286
- return new CouchbaseClientImpl(config, executeQuery);
287
272
  case SUPPORTED_PLUGINS.s3:
288
273
  return new S3ClientImpl(config, executeQuery);
289
274
  case SUPPORTED_PLUGINS.gcs:
290
275
  return new GCSClientImpl(config, executeQuery);
291
276
  case SUPPORTED_PLUGINS.gsheets:
292
277
  return new GoogleSheetsClientImpl(config, executeQuery);
293
- case SUPPORTED_PLUGINS.kafka:
294
- return new KafkaClientImpl(config, executeQuery);
295
- case SUPPORTED_PLUGINS.kinesis:
296
- return new KinesisClientImpl(config, executeQuery);
297
278
  case SUPPORTED_PLUGINS.salesforce:
298
279
  return new SalesforceClientImpl(config, executeQuery);
299
280
  case SUPPORTED_PLUGINS.redis:
300
281
  return new RedisClientImpl(config, executeQuery);
301
282
  case SUPPORTED_PLUGINS["superblocks-ocr"]:
302
283
  return new SuperblocksOCRClientImpl(config, executeQuery);
303
- // Confluent and Redpanda use the same Kafka plugin proto
304
- case SUPPORTED_PLUGINS.confluent:
305
- case SUPPORTED_PLUGINS.redpanda:
306
- return new KafkaClientImpl(config, executeQuery);
307
284
  case SUPPORTED_PLUGINS.lakebase:
308
285
  return new LakebaseClientImpl(config, executeQuery);
309
286
  case SUPPORTED_PLUGINS.snowflakepostgres:
@@ -312,8 +289,6 @@ export function createClient(options) {
312
289
  return new SmtpClientImpl(config, executeQuery);
313
290
  case SUPPORTED_PLUGINS.restapiintegration:
314
291
  return new RestApiIntegrationPluginClientImpl(config, executeQuery);
315
- case SUPPORTED_PLUGINS.python:
316
- return new PythonClientImpl(config, executeQuery);
317
292
  default:
318
293
  throw new Error(`Unsupported plugin: ${config.pluginId}. ` +
319
294
  `Supported plugins: ${Object.values(SUPPORTED_PLUGINS).join(", ")}`);
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/integrations/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA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CAAC;QAE5D,KAAK,iBAAiB,CAAC,QAAQ;YAC7B,OAAO,IAAI,kBAAkB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QAEtD,KAAK,iBAAiB,CAAC,iBAAiB;YACtC,OAAO,IAAI,2BAA2B,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QAE/D,KAAK,iBAAiB,CAAC,IAAI;YACzB,OAAO,IAAI,cAAc,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QAElD,KAAK,iBAAiB,CAAC,kBAAkB;YACvC,OAAO,IAAI,kCAAkC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QAEtE;YACE,MAAM,IAAI,KAAK,CACb,uBAAuB,MAAM,CAAC,QAAQ,IAAI;gBACxC,sBAAsB,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACtE,CAAC;IACN,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAC/B,QAAgB;IAEhB,OAAO,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAC9C,QAA6B,CAC9B,CAAC;AACJ,CAAC"}
@@ -1,19 +1,23 @@
1
1
  /**
2
2
  * Slack client implementation.
3
3
  *
4
- * Uses the proto-generated REST API Integration Plugin type from @superblocksteam/types.
5
- * Slack integrations use the REST API Integration plugin under the hood.
4
+ * Extends RestApiClientBase to inherit shared request infrastructure,
5
+ * then provides a Slack-specific apiRequest() that returns a
6
+ * SlackResponse<T> discriminated union instead of throwing on ok:false.
6
7
  */
7
- import { RestApiIntegrationClient } from "../base/index.js";
8
- import type { SlackClient } from "./types.js";
8
+ import type { z } from "zod";
9
+ import { RestApiClientBase } from "../base/rest-api-client-base.js";
10
+ import type { ApiRequestOptions } from "../base/types.js";
11
+ import type { TraceMetadata } from "../registry.js";
12
+ import { type SlackApiRequestSchema, type SlackClient, type SlackResponse } from "./types.js";
9
13
  /**
10
14
  * Internal implementation of SlackClient.
11
15
  *
12
- * Extends RestApiIntegrationClient to inherit the generic apiRequest() method.
13
- * This implementation communicates with the orchestrator to execute
14
- * Slack API calls. At runtime, the orchestrator handles OAuth authentication
15
- * and API request execution.
16
+ * Extends RestApiClientBase for request building and execution.
17
+ * Uses {@link SlackErrorSchema} to parse Slack error responses via Zod,
18
+ * then falls back to the caller's schema for success responses.
16
19
  */
17
- export declare class SlackClientImpl extends RestApiIntegrationClient implements SlackClient {
20
+ export declare class SlackClientImpl extends RestApiClientBase implements SlackClient {
21
+ apiRequest<TBody, TResponseSchema extends z.AnyZodObject>(options: ApiRequestOptions<TBody>, schema: SlackApiRequestSchema<TBody, TResponseSchema>, metadata?: TraceMetadata): Promise<SlackResponse<z.output<TResponseSchema>>>;
18
22
  }
19
23
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/slack/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;;GAOG;AACH,qBAAa,eACX,SAAQ,wBACR,YAAW,WAAW;CAEvB"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/integrations/slack/client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAG7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,YAAY,CAAC;AAEpB;;;;;;GAMG;AACH,qBAAa,eAAgB,SAAQ,iBAAkB,YAAW,WAAW;IACrE,UAAU,CAAC,KAAK,EAAE,eAAe,SAAS,CAAC,CAAC,YAAY,EAC5D,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,EACjC,MAAM,EAAE,qBAAqB,CAAC,KAAK,EAAE,eAAe,CAAC,EACrD,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;CAoErD"}
@@ -1,18 +1,70 @@
1
1
  /**
2
2
  * Slack client implementation.
3
3
  *
4
- * Uses the proto-generated REST API Integration Plugin type from @superblocksteam/types.
5
- * Slack integrations use the REST API Integration plugin under the hood.
4
+ * Extends RestApiClientBase to inherit shared request infrastructure,
5
+ * then provides a Slack-specific apiRequest() that returns a
6
+ * SlackResponse<T> discriminated union instead of throwing on ok:false.
6
7
  */
7
- import { RestApiIntegrationClient } from "../base/index.js";
8
+ import { RestApiValidationError } from "../../errors.js";
9
+ import { RestApiClientBase } from "../base/rest-api-client-base.js";
10
+ import { SlackErrorSchema, SlackSuccessEnvelopeSchema, } from "./types.js";
8
11
  /**
9
12
  * Internal implementation of SlackClient.
10
13
  *
11
- * Extends RestApiIntegrationClient to inherit the generic apiRequest() method.
12
- * This implementation communicates with the orchestrator to execute
13
- * Slack API calls. At runtime, the orchestrator handles OAuth authentication
14
- * and API request execution.
14
+ * Extends RestApiClientBase for request building and execution.
15
+ * Uses {@link SlackErrorSchema} to parse Slack error responses via Zod,
16
+ * then falls back to the caller's schema for success responses.
15
17
  */
16
- export class SlackClientImpl extends RestApiIntegrationClient {
18
+ export class SlackClientImpl extends RestApiClientBase {
19
+ async apiRequest(options, schema, metadata) {
20
+ const result = await this.executeApiRequest(options, schema.body, metadata);
21
+ // Slack returns errors as HTTP 200 with { ok: false, error: "..." }.
22
+ // Let Zod parse the error shape — if it matches, return the error branch.
23
+ const errorResult = SlackErrorSchema.safeParse(result);
24
+ if (errorResult.success) {
25
+ return errorResult.data;
26
+ }
27
+ // Guard: if the raw response has ok: false but didn't match SlackErrorSchema
28
+ // (e.g. missing error string), don't let it fall through to the success
29
+ // schema which might accept it and get stamped with ok: true.
30
+ if (typeof result === "object" &&
31
+ result !== null &&
32
+ "ok" in result &&
33
+ result.ok === false) {
34
+ throw new RestApiValidationError(`Slack returned ok: false but the response did not match the expected error shape: ${errorResult.error.message}`, {
35
+ zodError: errorResult.error,
36
+ data: result,
37
+ });
38
+ }
39
+ // Success responses must carry the Slack envelope discriminant.
40
+ const successEnvelopeResult = SlackSuccessEnvelopeSchema.safeParse(result);
41
+ if (!successEnvelopeResult.success) {
42
+ throw new RestApiValidationError(`Slack success response is missing the expected ok: true envelope: ${successEnvelopeResult.error.message}`, {
43
+ zodError: successEnvelopeResult.error,
44
+ data: result,
45
+ });
46
+ }
47
+ // Validate caller-provided payload shape (without the `ok` field).
48
+ // This keeps strict payload schemas compatible with Slack's envelope.
49
+ const payloadCandidate = {
50
+ ...result,
51
+ };
52
+ delete payloadCandidate.ok;
53
+ const payloadResult = schema.response.safeParse(payloadCandidate);
54
+ if (!payloadResult.success) {
55
+ throw new RestApiValidationError(`Response validation failed: ${payloadResult.error.message}`, {
56
+ zodError: payloadResult.error,
57
+ data: result,
58
+ });
59
+ }
60
+ // Defense against `.passthrough()` schemas: strip any leaked `ok` from
61
+ // the parsed payload before re-injecting the literal discriminant.
62
+ const payloadWithoutOk = { ...payloadResult.data };
63
+ delete payloadWithoutOk.ok;
64
+ return {
65
+ ...payloadWithoutOk,
66
+ ok: true,
67
+ };
68
+ }
17
69
  }
18
70
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/slack/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAG5D;;;;;;;GAOG;AACH,MAAM,OAA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,CAC9B,qEAAqE,qBAAqB,CAAC,KAAK,CAAC,OAAO,EAAE,EAC1G;gBACE,QAAQ,EAAE,qBAAqB,CAAC,KAAK;gBACrC,IAAI,EAAE,MAAM;aACb,CACF,CAAC;QACJ,CAAC;QAED,mEAAmE;QACnE,sEAAsE;QACtE,MAAM,gBAAgB,GAA4B;YAChD,GAAI,MAAkC;SACvC,CAAC;QACF,OAAO,gBAAgB,CAAC,EAAE,CAAC;QAE3B,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QAClE,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;YAC3B,MAAM,IAAI,sBAAsB,CAC9B,+BAA+B,aAAa,CAAC,KAAK,CAAC,OAAO,EAAE,EAC5D;gBACE,QAAQ,EAAE,aAAa,CAAC,KAAK;gBAC7B,IAAI,EAAE,MAAM;aACb,CACF,CAAC;QACJ,CAAC;QAED,uEAAuE;QACvE,mEAAmE;QACnE,MAAM,gBAAgB,GAA4B,EAAE,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC;QAC5E,OAAO,gBAAgB,CAAC,EAAE,CAAC;QAE3B,OAAO;YACL,GAAG,gBAAgB;YACnB,EAAE,EAAE,IAAa;SACmC,CAAC;IACzD,CAAC;CACF"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Tests for SlackClientImpl.
3
+ *
4
+ * Validates the SlackResponse<T> discriminated union contract:
5
+ * - ok:false from Slack → SlackErrorResponse (no throw)
6
+ * - ok:true from Slack → Zod-validated success data
7
+ * - ok:true but schema mismatch → RestApiValidationError (thrown)
8
+ * - Body validation failures still throw RestApiValidationError
9
+ */
10
+ export {};
11
+ //# sourceMappingURL=client.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.test.d.ts","sourceRoot":"","sources":["../../../src/integrations/slack/client.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
@@ -0,0 +1,368 @@
1
+ /**
2
+ * Tests for SlackClientImpl.
3
+ *
4
+ * Validates the SlackResponse<T> discriminated union contract:
5
+ * - ok:false from Slack → SlackErrorResponse (no throw)
6
+ * - ok:true from Slack → Zod-validated success data
7
+ * - ok:true but schema mismatch → RestApiValidationError (thrown)
8
+ * - Body validation failures still throw RestApiValidationError
9
+ */
10
+ import { describe, it, expect, vi } from "vitest";
11
+ import { z } from "zod";
12
+ import { RestApiValidationError } from "../../errors.js";
13
+ import { SlackClientImpl } from "./client.js";
14
+ const TEST_CONFIG = {
15
+ id: "slack-test-id",
16
+ name: "Test Slack",
17
+ pluginId: "slack",
18
+ configuration: {},
19
+ };
20
+ function createClient(mockResult) {
21
+ const executeQuery = vi.fn().mockResolvedValue(mockResult);
22
+ const client = new SlackClientImpl(TEST_CONFIG, executeQuery);
23
+ return { client, executeQuery };
24
+ }
25
+ const ChannelsSchema = z.object({
26
+ channels: z.array(z.object({ id: z.string(), name: z.string() })),
27
+ });
28
+ const PostMessageSchema = z.object({
29
+ channel: z.string(),
30
+ ts: z.string(),
31
+ });
32
+ describe("SlackClientImpl", () => {
33
+ // ── Success responses ──────────────────────────────────────────
34
+ describe("success responses (ok: true)", () => {
35
+ it("returns validated data with ok: true", async () => {
36
+ const { client } = createClient({
37
+ ok: true,
38
+ channels: [{ id: "C123", name: "general" }],
39
+ });
40
+ const result = await client.apiRequest({ method: "GET", path: "/conversations.list" }, { response: ChannelsSchema });
41
+ expect(result.ok).toBe(true);
42
+ if (result.ok) {
43
+ expect(result.channels).toHaveLength(1);
44
+ expect(result.channels[0]).toEqual({ id: "C123", name: "general" });
45
+ }
46
+ });
47
+ it("strips unknown keys via Zod strip mode", async () => {
48
+ const { client } = createClient({
49
+ ok: true,
50
+ channels: [{ id: "C1", name: "test", extra: true }],
51
+ response_metadata: { next_cursor: "" },
52
+ });
53
+ const result = await client.apiRequest({ method: "GET", path: "/conversations.list" }, { response: ChannelsSchema });
54
+ expect(result.ok).toBe(true);
55
+ if (result.ok) {
56
+ expect(result).not.toHaveProperty("response_metadata");
57
+ expect(result.channels[0]).not.toHaveProperty("extra");
58
+ }
59
+ });
60
+ it("validates a post message success response", async () => {
61
+ const { client } = createClient({
62
+ ok: true,
63
+ channel: "C123",
64
+ ts: "1234567890.123456",
65
+ });
66
+ const result = await client.apiRequest({
67
+ method: "POST",
68
+ path: "/chat.postMessage",
69
+ body: { channel: "C123", text: "hello" },
70
+ }, { response: PostMessageSchema });
71
+ expect(result.ok).toBe(true);
72
+ if (result.ok) {
73
+ expect(result.ts).toBe("1234567890.123456");
74
+ expect(result.channel).toBe("C123");
75
+ }
76
+ });
77
+ });
78
+ // ── Error responses (ok: false) ────────────────────────────────
79
+ describe("error responses (ok: false)", () => {
80
+ it("returns SlackErrorResponse instead of throwing", async () => {
81
+ const { client } = createClient({
82
+ ok: false,
83
+ error: "channel_not_found",
84
+ });
85
+ const result = await client.apiRequest({
86
+ method: "POST",
87
+ path: "/chat.postMessage",
88
+ body: { channel: "C000", text: "hi" },
89
+ }, { response: PostMessageSchema });
90
+ expect(result.ok).toBe(false);
91
+ if (!result.ok) {
92
+ expect(result.error).toBe("channel_not_found");
93
+ }
94
+ });
95
+ it("includes needed scopes on missing_scope errors", async () => {
96
+ const { client } = createClient({
97
+ ok: false,
98
+ error: "missing_scope",
99
+ needed: "channels:read",
100
+ provided: "identify,bot",
101
+ });
102
+ const result = await client.apiRequest({ method: "GET", path: "/conversations.list" }, { response: ChannelsSchema });
103
+ expect(result.ok).toBe(false);
104
+ if (!result.ok) {
105
+ expect(result.error).toBe("missing_scope");
106
+ expect(result.needed).toBe("channels:read");
107
+ expect(result.provided).toBe("identify,bot");
108
+ }
109
+ });
110
+ it("throws when ok: false but no error string (invalid Slack error)", async () => {
111
+ const { client } = createClient({ ok: false });
112
+ // { ok: false } without an error string doesn't match SlackErrorSchema,
113
+ // and also doesn't match the success schema → RestApiValidationError.
114
+ await expect(client.apiRequest({ method: "GET", path: "/conversations.list" }, { response: ChannelsSchema })).rejects.toThrow(RestApiValidationError);
115
+ });
116
+ it.each(["not_authed", "invalid_auth", "ratelimited"])("handles %s error", async (errorCode) => {
117
+ const { client } = createClient({ ok: false, error: errorCode });
118
+ const result = await client.apiRequest({ method: "GET", path: "/auth.test" }, { response: z.object({}) });
119
+ expect(result.ok).toBe(false);
120
+ if (!result.ok) {
121
+ expect(result.error).toBe(errorCode);
122
+ }
123
+ });
124
+ it("omits needed/provided when not present in Slack response", async () => {
125
+ const { client } = createClient({
126
+ ok: false,
127
+ error: "channel_not_found",
128
+ });
129
+ const result = await client.apiRequest({ method: "POST", path: "/chat.postMessage" }, { response: PostMessageSchema });
130
+ expect(result.ok).toBe(false);
131
+ if (!result.ok) {
132
+ expect(result).not.toHaveProperty("needed");
133
+ expect(result).not.toHaveProperty("provided");
134
+ }
135
+ });
136
+ it("throws when needed/provided are non-string (invalid Slack error)", async () => {
137
+ const { client } = createClient({
138
+ ok: false,
139
+ error: "missing_scope",
140
+ needed: 123,
141
+ provided: true,
142
+ });
143
+ // Zod rejects non-string needed/provided. Since raw response has ok:false,
144
+ // SlackClient rejects it before success payload validation.
145
+ await expect(client.apiRequest({ method: "GET", path: "/conversations.list" }, { response: ChannelsSchema })).rejects.toThrow(RestApiValidationError);
146
+ });
147
+ });
148
+ // ── Validation errors (still thrown) ───────────────────────────
149
+ describe("validation errors", () => {
150
+ it("throws RestApiValidationError when ok:true but schema does not match", async () => {
151
+ // Slack says ok:true but response is missing required fields
152
+ const { client } = createClient({
153
+ ok: true,
154
+ // Missing 'channels' field
155
+ });
156
+ await expect(client.apiRequest({ method: "GET", path: "/conversations.list" }, { response: ChannelsSchema })).rejects.toThrow(RestApiValidationError);
157
+ });
158
+ it("includes raw data and Zod error in validation error details", async () => {
159
+ const badResponse = { ok: true };
160
+ const { client } = createClient(badResponse);
161
+ try {
162
+ await client.apiRequest({ method: "GET", path: "/conversations.list" }, { response: ChannelsSchema });
163
+ expect.fail("Expected RestApiValidationError");
164
+ }
165
+ catch (e) {
166
+ expect(e).toBeInstanceOf(RestApiValidationError);
167
+ const err = e;
168
+ expect(err.details.data).toEqual(badResponse);
169
+ expect(err.details.zodError).toBeDefined();
170
+ }
171
+ });
172
+ it("throws RestApiValidationError when request body fails validation", async () => {
173
+ const { client } = createClient({ ok: true });
174
+ const BodySchema = z.object({
175
+ channel: z.string(),
176
+ text: z.string(),
177
+ });
178
+ await expect(client.apiRequest({
179
+ method: "POST",
180
+ path: "/chat.postMessage",
181
+ body: { channel: 123, text: "hello" },
182
+ }, { body: BodySchema, response: PostMessageSchema })).rejects.toThrow(RestApiValidationError);
183
+ });
184
+ });
185
+ // ── Request building ───────────────────────────────────────────
186
+ describe("request building", () => {
187
+ it("sends correct proto structure to executeQuery", async () => {
188
+ const { client, executeQuery } = createClient({
189
+ ok: true,
190
+ channel: "C123",
191
+ ts: "1234567890.123456",
192
+ });
193
+ await client.apiRequest({
194
+ method: "POST",
195
+ path: "/chat.postMessage",
196
+ body: { channel: "#general", text: "hello" },
197
+ headers: { "X-Custom": "value" },
198
+ params: { unfurl_links: false },
199
+ }, { response: PostMessageSchema });
200
+ expect(executeQuery).toHaveBeenCalledOnce();
201
+ const request = executeQuery.mock.calls[0][0];
202
+ expect(request.openApiAction).toBe("genericHttpRequest");
203
+ expect(request.httpMethod).toBe("POST");
204
+ expect(request.urlPath).toBe("/chat.postMessage");
205
+ expect(request.responseType).toBe("json");
206
+ expect(request.body).toBe(JSON.stringify({ channel: "#general", text: "hello" }));
207
+ expect(request.bodyType).toBe("jsonBody");
208
+ expect(request.headers).toEqual([{ key: "X-Custom", value: "value" }]);
209
+ expect(request.params).toEqual([{ key: "unfurl_links", value: "false" }]);
210
+ });
211
+ it("passes trace metadata to executeQuery", async () => {
212
+ const { client, executeQuery } = createClient({
213
+ ok: true,
214
+ channel: "C1",
215
+ ts: "1.1",
216
+ });
217
+ await client.apiRequest({ method: "POST", path: "/chat.postMessage" }, { response: PostMessageSchema }, { label: "slack.postMessage", description: "Post a message" });
218
+ expect(executeQuery).toHaveBeenCalledWith(expect.any(Object), undefined, {
219
+ label: "slack.postMessage",
220
+ description: "Post a message",
221
+ });
222
+ });
223
+ it("propagates executeQuery rejections as transport errors", async () => {
224
+ const executeQuery = vi
225
+ .fn()
226
+ .mockRejectedValue(new Error("network timeout"));
227
+ const client = new SlackClientImpl(TEST_CONFIG, executeQuery);
228
+ await expect(client.apiRequest({ method: "GET", path: "/auth.test" }, { response: z.object({}) })).rejects.toThrow("network timeout");
229
+ });
230
+ });
231
+ // ── Edge cases ─────────────────────────────────────────────────
232
+ describe("edge cases", () => {
233
+ it("falls through to schema validation when response has no ok field", async () => {
234
+ const { client } = createClient({ data: [1, 2, 3] });
235
+ // No ok field → not Slack error, and missing success envelope.
236
+ await expect(client.apiRequest({ method: "GET", path: "/some.endpoint" }, { response: ChannelsSchema })).rejects.toThrow(RestApiValidationError);
237
+ });
238
+ it("falls through to schema validation when ok is not a boolean", async () => {
239
+ const { client } = createClient({ ok: "false", error: "nope" });
240
+ // ok is a string, so it is neither a valid Slack error envelope
241
+ // nor a valid success envelope.
242
+ await expect(client.apiRequest({ method: "GET", path: "/some.endpoint" }, { response: ChannelsSchema })).rejects.toThrow(RestApiValidationError);
243
+ });
244
+ it("handles response surviving JSON round-trip (protobuf simulation)", async () => {
245
+ const original = {
246
+ ok: true,
247
+ channels: [{ id: "C123", name: "general" }],
248
+ nested: { count: 42 },
249
+ };
250
+ const roundTripped = JSON.parse(JSON.stringify(original));
251
+ const { client } = createClient(roundTripped);
252
+ const result = await client.apiRequest({ method: "GET", path: "/conversations.list" }, { response: ChannelsSchema });
253
+ expect(result.ok).toBe(true);
254
+ if (result.ok) {
255
+ expect(result.channels[0].id).toBe("C123");
256
+ }
257
+ });
258
+ it("injects ok: true when schema omits the ok field", async () => {
259
+ const NoOkSchema = z.object({
260
+ channels: z.array(z.object({ id: z.string(), name: z.string() })),
261
+ });
262
+ const { client } = createClient({
263
+ ok: true,
264
+ channels: [{ id: "C1", name: "test" }],
265
+ });
266
+ const result = await client.apiRequest({ method: "GET", path: "/conversations.list" }, { response: NoOkSchema });
267
+ expect(result.ok).toBe(true);
268
+ if (result.ok) {
269
+ expect(result.channels).toHaveLength(1);
270
+ }
271
+ });
272
+ it("validates payload schema after removing envelope field for strict schemas", async () => {
273
+ const StrictSchema = z
274
+ .object({
275
+ channels: z.array(z.object({ id: z.string(), name: z.string() })),
276
+ })
277
+ .strict();
278
+ const { client } = createClient({
279
+ ok: true,
280
+ channels: [{ id: "C1", name: "test" }],
281
+ });
282
+ const result = await client.apiRequest({ method: "GET", path: "/conversations.list" }, { response: StrictSchema });
283
+ expect(result.ok).toBe(true);
284
+ if (result.ok) {
285
+ expect(result.channels).toHaveLength(1);
286
+ }
287
+ });
288
+ it("supports passthrough schemas and still enforces literal ok discriminant", async () => {
289
+ const PassthroughSchema = z
290
+ .object({
291
+ channels: z.array(z.object({ id: z.string(), name: z.string() })),
292
+ })
293
+ .passthrough();
294
+ const { client } = createClient({
295
+ ok: true,
296
+ channels: [{ id: "C1", name: "test" }],
297
+ response_metadata: { next_cursor: "abc" },
298
+ });
299
+ const result = await client.apiRequest({ method: "GET", path: "/conversations.list" }, { response: PassthroughSchema });
300
+ expect(result.ok).toBe(true);
301
+ if (result.ok) {
302
+ expect(result.channels).toHaveLength(1);
303
+ expect(result).toHaveProperty("response_metadata");
304
+ }
305
+ });
306
+ it("throws when ok:false and loose payload schema would otherwise accept", async () => {
307
+ const LooseSchema = z.object({});
308
+ const { client } = createClient({ ok: false });
309
+ await expect(client.apiRequest({ method: "GET", path: "/auth.test" }, { response: LooseSchema })).rejects.toThrow(RestApiValidationError);
310
+ });
311
+ it("routes to error branch when response matches both schemas", async () => {
312
+ // Response matches SlackErrorSchema AND a loose success schema.
313
+ // Error branch must win because it's checked first.
314
+ const FlexibleSchema = z.object({
315
+ error: z.string().optional(),
316
+ });
317
+ const { client } = createClient({
318
+ ok: false,
319
+ error: "channel_not_found",
320
+ });
321
+ const result = await client.apiRequest({ method: "POST", path: "/chat.postMessage" }, { response: FlexibleSchema });
322
+ expect(result.ok).toBe(false);
323
+ if (!result.ok) {
324
+ expect(result.error).toBe("channel_not_found");
325
+ }
326
+ });
327
+ it("does not treat ok: 0 as a Slack error (only strict false)", async () => {
328
+ // ok: 0 is not === false, so it is NOT detected as a Slack error.
329
+ // It fails success envelope validation because ok must be literal true.
330
+ const { client } = createClient({
331
+ ok: 0,
332
+ channels: [{ id: "C1", name: "test" }],
333
+ });
334
+ await expect(client.apiRequest({ method: "GET", path: "/conversations.list" }, { response: ChannelsSchema })).rejects.toThrow(RestApiValidationError);
335
+ });
336
+ });
337
+ // ── Type narrowing (compile-time verification) ─────────────────
338
+ describe("type narrowing", () => {
339
+ it("narrows to error response fields when ok is false", async () => {
340
+ const { client } = createClient({
341
+ ok: false,
342
+ error: "missing_scope",
343
+ needed: "channels:read",
344
+ });
345
+ const result = await client.apiRequest({ method: "GET", path: "/conversations.list" }, { response: ChannelsSchema });
346
+ // This block exercises the SlackErrorResponse branch
347
+ if (!result.ok) {
348
+ const errorResult = result;
349
+ expect(errorResult.error).toBe("missing_scope");
350
+ expect(errorResult.needed).toBe("channels:read");
351
+ }
352
+ });
353
+ it("narrows to success response fields when ok is true", async () => {
354
+ const { client } = createClient({
355
+ ok: true,
356
+ channels: [{ id: "C1", name: "general" }],
357
+ });
358
+ const result = await client.apiRequest({ method: "GET", path: "/conversations.list" }, { response: ChannelsSchema });
359
+ // This block exercises the T & { ok: true } branch
360
+ if (result.ok) {
361
+ // TypeScript narrows: result.channels is accessible
362
+ expect(result.channels).toHaveLength(1);
363
+ expect(result.channels[0].name).toBe("general");
364
+ }
365
+ });
366
+ });
367
+ });
368
+ //# sourceMappingURL=client.test.js.map