@credal/sdk 0.0.13 → 0.0.14

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 (202) hide show
  1. package/api/resources/common/types/index.d.ts +1 -0
  2. package/api/resources/common/types/index.js +1 -0
  3. package/api/resources/copilots/client/Client.d.ts +12 -1
  4. package/api/resources/copilots/client/Client.js +79 -9
  5. package/api/resources/copilots/client/requests/SendMessageRequest.d.ts +14 -1
  6. package/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +60 -0
  7. package/api/resources/copilots/client/requests/StreamMessageRequest.js +5 -0
  8. package/api/resources/copilots/client/requests/index.d.ts +1 -0
  9. package/api/resources/copilots/types/BlockedChunk.d.ts +10 -0
  10. package/api/resources/copilots/types/BlockedChunk.js +5 -0
  11. package/api/resources/copilots/types/BooleanFieldSchema.d.ts +8 -0
  12. package/api/resources/copilots/types/BooleanFieldSchema.js +5 -0
  13. package/api/resources/copilots/types/CollectionFilteredData.d.ts +9 -0
  14. package/api/resources/copilots/types/CollectionFilteredData.js +5 -0
  15. package/api/resources/copilots/types/DataChunk.d.ts +6 -0
  16. package/api/resources/copilots/types/DataChunk.js +5 -0
  17. package/api/resources/copilots/types/DataFilter.d.ts +9 -0
  18. package/api/resources/copilots/types/DataFilter.js +5 -0
  19. package/api/resources/copilots/types/DatetimeFieldSchema.d.ts +9 -0
  20. package/api/resources/copilots/types/DatetimeFieldSchema.js +5 -0
  21. package/api/resources/copilots/types/Filter.d.ts +19 -0
  22. package/api/resources/copilots/types/Filter.js +5 -0
  23. package/api/resources/copilots/types/FinalChunk.d.ts +7 -0
  24. package/api/resources/copilots/types/FinalChunk.js +5 -0
  25. package/api/resources/copilots/types/InitialChunk.d.ts +10 -0
  26. package/api/resources/copilots/types/InitialChunk.js +5 -0
  27. package/api/resources/copilots/types/InputVariable.d.ts +7 -0
  28. package/api/resources/copilots/types/InputVariable.js +5 -0
  29. package/api/resources/copilots/types/MessageReply.d.ts +1 -0
  30. package/api/resources/copilots/types/NumberFieldSchema.d.ts +9 -0
  31. package/api/resources/copilots/types/NumberFieldSchema.js +5 -0
  32. package/api/resources/copilots/types/StreamingChunk.d.ts +5 -0
  33. package/api/resources/copilots/types/StreamingChunk.js +5 -0
  34. package/api/resources/copilots/types/StringFieldSchema.d.ts +9 -0
  35. package/api/resources/copilots/types/StringFieldSchema.js +5 -0
  36. package/api/resources/copilots/types/WebSearchResult.d.ts +8 -0
  37. package/api/resources/copilots/types/WebSearchResult.js +5 -0
  38. package/api/resources/copilots/types/index.d.ts +14 -0
  39. package/api/resources/copilots/types/index.js +14 -0
  40. package/api/resources/documentCatalog/client/Client.js +2 -2
  41. package/api/resources/documentCollections/client/Client.js +6 -6
  42. package/api/resources/permissionsService/client/Client.js +3 -3
  43. package/api/resources/search/client/Client.js +1 -1
  44. package/api/resources/search/types/index.d.ts +0 -1
  45. package/api/resources/search/types/index.js +0 -1
  46. package/api/resources/users/client/Client.js +1 -1
  47. package/core/index.d.ts +1 -0
  48. package/core/index.js +1 -0
  49. package/core/streaming-fetcher/Stream.d.ts +48 -0
  50. package/core/streaming-fetcher/Stream.js +170 -0
  51. package/core/streaming-fetcher/index.d.ts +1 -0
  52. package/core/streaming-fetcher/index.js +5 -0
  53. package/dist/api/resources/common/types/index.d.ts +1 -0
  54. package/dist/api/resources/common/types/index.js +1 -0
  55. package/dist/api/resources/copilots/client/Client.d.ts +12 -1
  56. package/dist/api/resources/copilots/client/Client.js +79 -9
  57. package/dist/api/resources/copilots/client/requests/SendMessageRequest.d.ts +14 -1
  58. package/dist/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +60 -0
  59. package/dist/api/resources/copilots/client/requests/StreamMessageRequest.js +5 -0
  60. package/dist/api/resources/copilots/client/requests/index.d.ts +1 -0
  61. package/dist/api/resources/copilots/types/BlockedChunk.d.ts +10 -0
  62. package/dist/api/resources/copilots/types/BlockedChunk.js +5 -0
  63. package/dist/api/resources/copilots/types/BooleanFieldSchema.d.ts +8 -0
  64. package/dist/api/resources/copilots/types/BooleanFieldSchema.js +5 -0
  65. package/dist/api/resources/copilots/types/CollectionFilteredData.d.ts +9 -0
  66. package/dist/api/resources/copilots/types/CollectionFilteredData.js +5 -0
  67. package/dist/api/resources/copilots/types/DataChunk.d.ts +6 -0
  68. package/dist/api/resources/copilots/types/DataChunk.js +5 -0
  69. package/dist/api/resources/copilots/types/DataFilter.d.ts +9 -0
  70. package/dist/api/resources/copilots/types/DataFilter.js +5 -0
  71. package/dist/api/resources/copilots/types/DatetimeFieldSchema.d.ts +9 -0
  72. package/dist/api/resources/copilots/types/DatetimeFieldSchema.js +5 -0
  73. package/dist/api/resources/copilots/types/Filter.d.ts +19 -0
  74. package/dist/api/resources/copilots/types/Filter.js +5 -0
  75. package/dist/api/resources/copilots/types/FinalChunk.d.ts +7 -0
  76. package/dist/api/resources/copilots/types/FinalChunk.js +5 -0
  77. package/dist/api/resources/copilots/types/InitialChunk.d.ts +10 -0
  78. package/dist/api/resources/copilots/types/InitialChunk.js +5 -0
  79. package/dist/api/resources/copilots/types/InputVariable.d.ts +7 -0
  80. package/dist/api/resources/copilots/types/InputVariable.js +5 -0
  81. package/dist/api/resources/copilots/types/MessageReply.d.ts +1 -0
  82. package/dist/api/resources/copilots/types/NumberFieldSchema.d.ts +9 -0
  83. package/dist/api/resources/copilots/types/NumberFieldSchema.js +5 -0
  84. package/dist/api/resources/copilots/types/StreamingChunk.d.ts +5 -0
  85. package/dist/api/resources/copilots/types/StreamingChunk.js +5 -0
  86. package/dist/api/resources/copilots/types/StringFieldSchema.d.ts +9 -0
  87. package/dist/api/resources/copilots/types/StringFieldSchema.js +5 -0
  88. package/dist/api/resources/copilots/types/WebSearchResult.d.ts +8 -0
  89. package/dist/api/resources/copilots/types/WebSearchResult.js +5 -0
  90. package/dist/api/resources/copilots/types/index.d.ts +14 -0
  91. package/dist/api/resources/copilots/types/index.js +14 -0
  92. package/dist/api/resources/documentCatalog/client/Client.js +2 -2
  93. package/dist/api/resources/documentCollections/client/Client.js +6 -6
  94. package/dist/api/resources/permissionsService/client/Client.js +3 -3
  95. package/dist/api/resources/search/client/Client.js +1 -1
  96. package/dist/api/resources/search/types/index.d.ts +0 -1
  97. package/dist/api/resources/search/types/index.js +0 -1
  98. package/dist/api/resources/users/client/Client.js +1 -1
  99. package/dist/core/index.d.ts +1 -0
  100. package/dist/core/index.js +1 -0
  101. package/dist/core/streaming-fetcher/Stream.d.ts +48 -0
  102. package/dist/core/streaming-fetcher/Stream.js +170 -0
  103. package/dist/core/streaming-fetcher/index.d.ts +1 -0
  104. package/dist/core/streaming-fetcher/index.js +5 -0
  105. package/dist/serialization/resources/common/types/index.d.ts +1 -0
  106. package/dist/serialization/resources/common/types/index.js +1 -0
  107. package/dist/serialization/resources/copilots/client/requests/SendMessageRequest.d.ts +2 -0
  108. package/dist/serialization/resources/copilots/client/requests/SendMessageRequest.js +2 -0
  109. package/dist/serialization/resources/copilots/client/requests/StreamMessageRequest.d.ts +17 -0
  110. package/dist/serialization/resources/copilots/client/requests/StreamMessageRequest.js +38 -0
  111. package/dist/serialization/resources/copilots/client/requests/index.d.ts +1 -0
  112. package/dist/serialization/resources/copilots/client/requests/index.js +3 -1
  113. package/dist/serialization/resources/copilots/types/BlockedChunk.d.ts +16 -0
  114. package/dist/serialization/resources/copilots/types/BlockedChunk.js +37 -0
  115. package/dist/serialization/resources/copilots/types/BooleanFieldSchema.d.ts +14 -0
  116. package/dist/serialization/resources/copilots/types/BooleanFieldSchema.js +35 -0
  117. package/dist/serialization/resources/copilots/types/CollectionFilteredData.d.ts +15 -0
  118. package/dist/serialization/resources/copilots/types/CollectionFilteredData.js +36 -0
  119. package/dist/serialization/resources/copilots/types/DataChunk.d.ts +12 -0
  120. package/dist/serialization/resources/copilots/types/DataChunk.js +33 -0
  121. package/dist/serialization/resources/copilots/types/DataFilter.d.ts +15 -0
  122. package/dist/serialization/resources/copilots/types/DataFilter.js +36 -0
  123. package/dist/serialization/resources/copilots/types/DatetimeFieldSchema.d.ts +15 -0
  124. package/dist/serialization/resources/copilots/types/DatetimeFieldSchema.js +36 -0
  125. package/dist/serialization/resources/copilots/types/Filter.d.ts +26 -0
  126. package/dist/serialization/resources/copilots/types/Filter.js +45 -0
  127. package/dist/serialization/resources/copilots/types/FinalChunk.d.ts +13 -0
  128. package/dist/serialization/resources/copilots/types/FinalChunk.js +34 -0
  129. package/dist/serialization/resources/copilots/types/InitialChunk.d.ts +17 -0
  130. package/dist/serialization/resources/copilots/types/InitialChunk.js +38 -0
  131. package/dist/serialization/resources/copilots/types/InputVariable.d.ts +13 -0
  132. package/dist/serialization/resources/copilots/types/InputVariable.js +34 -0
  133. package/dist/serialization/resources/copilots/types/MessageReply.d.ts +2 -0
  134. package/dist/serialization/resources/copilots/types/MessageReply.js +2 -0
  135. package/dist/serialization/resources/copilots/types/NumberFieldSchema.d.ts +15 -0
  136. package/dist/serialization/resources/copilots/types/NumberFieldSchema.js +36 -0
  137. package/dist/serialization/resources/copilots/types/StreamingChunk.d.ts +14 -0
  138. package/dist/serialization/resources/copilots/types/StreamingChunk.js +35 -0
  139. package/dist/serialization/resources/copilots/types/StringFieldSchema.d.ts +15 -0
  140. package/dist/serialization/resources/copilots/types/StringFieldSchema.js +36 -0
  141. package/dist/serialization/resources/copilots/types/WebSearchResult.d.ts +14 -0
  142. package/dist/serialization/resources/copilots/types/WebSearchResult.js +35 -0
  143. package/dist/serialization/resources/copilots/types/index.d.ts +14 -0
  144. package/dist/serialization/resources/copilots/types/index.js +14 -0
  145. package/dist/serialization/resources/search/types/SingleFieldFilter.d.ts +1 -1
  146. package/dist/serialization/resources/search/types/SingleFieldFilter.js +1 -1
  147. package/dist/serialization/resources/search/types/index.d.ts +0 -1
  148. package/dist/serialization/resources/search/types/index.js +0 -1
  149. package/package.json +1 -1
  150. package/reference.md +71 -0
  151. package/serialization/resources/common/types/index.d.ts +1 -0
  152. package/serialization/resources/common/types/index.js +1 -0
  153. package/serialization/resources/copilots/client/requests/SendMessageRequest.d.ts +2 -0
  154. package/serialization/resources/copilots/client/requests/SendMessageRequest.js +2 -0
  155. package/serialization/resources/copilots/client/requests/StreamMessageRequest.d.ts +17 -0
  156. package/serialization/resources/copilots/client/requests/StreamMessageRequest.js +38 -0
  157. package/serialization/resources/copilots/client/requests/index.d.ts +1 -0
  158. package/serialization/resources/copilots/client/requests/index.js +3 -1
  159. package/serialization/resources/copilots/types/BlockedChunk.d.ts +16 -0
  160. package/serialization/resources/copilots/types/BlockedChunk.js +37 -0
  161. package/serialization/resources/copilots/types/BooleanFieldSchema.d.ts +14 -0
  162. package/serialization/resources/copilots/types/BooleanFieldSchema.js +35 -0
  163. package/serialization/resources/copilots/types/CollectionFilteredData.d.ts +15 -0
  164. package/serialization/resources/copilots/types/CollectionFilteredData.js +36 -0
  165. package/serialization/resources/copilots/types/DataChunk.d.ts +12 -0
  166. package/serialization/resources/copilots/types/DataChunk.js +33 -0
  167. package/serialization/resources/copilots/types/DataFilter.d.ts +15 -0
  168. package/serialization/resources/copilots/types/DataFilter.js +36 -0
  169. package/serialization/resources/copilots/types/DatetimeFieldSchema.d.ts +15 -0
  170. package/serialization/resources/copilots/types/DatetimeFieldSchema.js +36 -0
  171. package/serialization/resources/copilots/types/Filter.d.ts +26 -0
  172. package/serialization/resources/copilots/types/Filter.js +45 -0
  173. package/serialization/resources/copilots/types/FinalChunk.d.ts +13 -0
  174. package/serialization/resources/copilots/types/FinalChunk.js +34 -0
  175. package/serialization/resources/copilots/types/InitialChunk.d.ts +17 -0
  176. package/serialization/resources/copilots/types/InitialChunk.js +38 -0
  177. package/serialization/resources/copilots/types/InputVariable.d.ts +13 -0
  178. package/serialization/resources/copilots/types/InputVariable.js +34 -0
  179. package/serialization/resources/copilots/types/MessageReply.d.ts +2 -0
  180. package/serialization/resources/copilots/types/MessageReply.js +2 -0
  181. package/serialization/resources/copilots/types/NumberFieldSchema.d.ts +15 -0
  182. package/serialization/resources/copilots/types/NumberFieldSchema.js +36 -0
  183. package/serialization/resources/copilots/types/StreamingChunk.d.ts +14 -0
  184. package/serialization/resources/copilots/types/StreamingChunk.js +35 -0
  185. package/serialization/resources/copilots/types/StringFieldSchema.d.ts +15 -0
  186. package/serialization/resources/copilots/types/StringFieldSchema.js +36 -0
  187. package/serialization/resources/copilots/types/WebSearchResult.d.ts +14 -0
  188. package/serialization/resources/copilots/types/WebSearchResult.js +35 -0
  189. package/serialization/resources/copilots/types/index.d.ts +14 -0
  190. package/serialization/resources/copilots/types/index.js +14 -0
  191. package/serialization/resources/search/types/SingleFieldFilter.d.ts +1 -1
  192. package/serialization/resources/search/types/SingleFieldFilter.js +1 -1
  193. package/serialization/resources/search/types/index.d.ts +0 -1
  194. package/serialization/resources/search/types/index.js +0 -1
  195. /package/api/resources/{search → common}/types/Operator.d.ts +0 -0
  196. /package/api/resources/{search → common}/types/Operator.js +0 -0
  197. /package/dist/api/resources/{search → common}/types/Operator.d.ts +0 -0
  198. /package/dist/api/resources/{search → common}/types/Operator.js +0 -0
  199. /package/dist/serialization/resources/{search → common}/types/Operator.d.ts +0 -0
  200. /package/dist/serialization/resources/{search → common}/types/Operator.js +0 -0
  201. /package/serialization/resources/{search → common}/types/Operator.d.ts +0 -0
  202. /package/serialization/resources/{search → common}/types/Operator.js +0 -0
@@ -4,3 +4,4 @@ export * from "./Url";
4
4
  export * from "./ResourceType";
5
5
  export * from "./Collaborator";
6
6
  export * from "./Role";
7
+ export * from "./Operator";
@@ -20,3 +20,4 @@ __exportStar(require("./Url"), exports);
20
20
  __exportStar(require("./ResourceType"), exports);
21
21
  __exportStar(require("./Collaborator"), exports);
22
22
  __exportStar(require("./Role"), exports);
23
+ __exportStar(require("./Operator"), exports);
@@ -73,10 +73,21 @@ export declare class Copilots {
73
73
  * await credal.copilots.sendMessage({
74
74
  * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
75
75
  * message: "Is Credal SOC 2 compliant?",
76
- * userEmail: "ravin@credal.ai"
76
+ * userEmail: "ravin@credal.ai",
77
+ * inputVariables: [{
78
+ * name: "input1",
79
+ * urls: ["https://drive.google.com/file/d/123456/view"]
80
+ * }, {
81
+ * name: "input2",
82
+ * urls: ["https://drive.google.com/file/d/123457/view", "https://drive.google.com/file/d/123458/view"]
83
+ * }]
77
84
  * })
78
85
  */
79
86
  sendMessage(request: Credal.SendMessageRequest, requestOptions?: Copilots.RequestOptions): Promise<Credal.SendAgentMessageResponse>;
87
+ /**
88
+ * This endpoint allows you to send a message to a specific copilot and get the response back as a streamed set of Server-Sent Events.
89
+ */
90
+ streamMessage(request: Credal.StreamMessageRequest, requestOptions?: Copilots.RequestOptions): Promise<core.Stream<Credal.StreamingChunk>>;
80
91
  /**
81
92
  * Link a collection with a copilot. The API Key used must be added to both the collection and the copilot beforehand.
82
93
  *
@@ -74,7 +74,7 @@ class Copilots {
74
74
  Authorization: yield this._getAuthorizationHeader(),
75
75
  "X-Fern-Language": "JavaScript",
76
76
  "X-Fern-SDK-Name": "@credal/sdk",
77
- "X-Fern-SDK-Version": "0.0.13",
77
+ "X-Fern-SDK-Version": "0.0.14",
78
78
  "X-Fern-Runtime": core.RUNTIME.type,
79
79
  "X-Fern-Runtime-Version": core.RUNTIME.version,
80
80
  },
@@ -135,7 +135,7 @@ class Copilots {
135
135
  Authorization: yield this._getAuthorizationHeader(),
136
136
  "X-Fern-Language": "JavaScript",
137
137
  "X-Fern-SDK-Name": "@credal/sdk",
138
- "X-Fern-SDK-Version": "0.0.13",
138
+ "X-Fern-SDK-Version": "0.0.14",
139
139
  "X-Fern-Runtime": core.RUNTIME.type,
140
140
  "X-Fern-Runtime-Version": core.RUNTIME.version,
141
141
  },
@@ -199,7 +199,7 @@ class Copilots {
199
199
  Authorization: yield this._getAuthorizationHeader(),
200
200
  "X-Fern-Language": "JavaScript",
201
201
  "X-Fern-SDK-Name": "@credal/sdk",
202
- "X-Fern-SDK-Version": "0.0.13",
202
+ "X-Fern-SDK-Version": "0.0.14",
203
203
  "X-Fern-Runtime": core.RUNTIME.type,
204
204
  "X-Fern-Runtime-Version": core.RUNTIME.version,
205
205
  },
@@ -243,7 +243,14 @@ class Copilots {
243
243
  * await credal.copilots.sendMessage({
244
244
  * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
245
245
  * message: "Is Credal SOC 2 compliant?",
246
- * userEmail: "ravin@credal.ai"
246
+ * userEmail: "ravin@credal.ai",
247
+ * inputVariables: [{
248
+ * name: "input1",
249
+ * urls: ["https://drive.google.com/file/d/123456/view"]
250
+ * }, {
251
+ * name: "input2",
252
+ * urls: ["https://drive.google.com/file/d/123457/view", "https://drive.google.com/file/d/123458/view"]
253
+ * }]
247
254
  * })
248
255
  */
249
256
  sendMessage(request, requestOptions) {
@@ -256,7 +263,7 @@ class Copilots {
256
263
  Authorization: yield this._getAuthorizationHeader(),
257
264
  "X-Fern-Language": "JavaScript",
258
265
  "X-Fern-SDK-Name": "@credal/sdk",
259
- "X-Fern-SDK-Version": "0.0.13",
266
+ "X-Fern-SDK-Version": "0.0.14",
260
267
  "X-Fern-Runtime": core.RUNTIME.type,
261
268
  "X-Fern-Runtime-Version": core.RUNTIME.version,
262
269
  },
@@ -295,6 +302,69 @@ class Copilots {
295
302
  }
296
303
  });
297
304
  }
305
+ /**
306
+ * This endpoint allows you to send a message to a specific copilot and get the response back as a streamed set of Server-Sent Events.
307
+ */
308
+ streamMessage(request, requestOptions) {
309
+ var _a, _b;
310
+ return __awaiter(this, void 0, void 0, function* () {
311
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
312
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CredalEnvironment.Production, "/v0/copilots/streamMessage"),
313
+ method: "POST",
314
+ headers: {
315
+ Authorization: yield this._getAuthorizationHeader(),
316
+ "X-Fern-Language": "JavaScript",
317
+ "X-Fern-SDK-Name": "@credal/sdk",
318
+ "X-Fern-SDK-Version": "0.0.14",
319
+ "X-Fern-Runtime": core.RUNTIME.type,
320
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
321
+ },
322
+ contentType: "application/json",
323
+ body: yield serializers.StreamMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
324
+ responseType: "streaming",
325
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
326
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
327
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
328
+ });
329
+ if (_response.ok) {
330
+ return new core.Stream({
331
+ stream: _response.body,
332
+ parse: (data) => __awaiter(this, void 0, void 0, function* () {
333
+ return yield serializers.StreamingChunk.parseOrThrow(data, {
334
+ unrecognizedObjectKeys: "passthrough",
335
+ allowUnrecognizedUnionMembers: true,
336
+ allowUnrecognizedEnumValues: true,
337
+ breadcrumbsPrefix: ["response"],
338
+ });
339
+ }),
340
+ signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
341
+ eventShape: {
342
+ type: "sse",
343
+ streamTerminator: "[DONE]",
344
+ },
345
+ });
346
+ }
347
+ if (_response.error.reason === "status-code") {
348
+ throw new errors.CredalError({
349
+ statusCode: _response.error.statusCode,
350
+ body: _response.error.body,
351
+ });
352
+ }
353
+ switch (_response.error.reason) {
354
+ case "non-json":
355
+ throw new errors.CredalError({
356
+ statusCode: _response.error.statusCode,
357
+ body: _response.error.rawBody,
358
+ });
359
+ case "timeout":
360
+ throw new errors.CredalTimeoutError();
361
+ case "unknown":
362
+ throw new errors.CredalError({
363
+ message: _response.error.errorMessage,
364
+ });
365
+ }
366
+ });
367
+ }
298
368
  /**
299
369
  * Link a collection with a copilot. The API Key used must be added to both the collection and the copilot beforehand.
300
370
  *
@@ -317,7 +387,7 @@ class Copilots {
317
387
  Authorization: yield this._getAuthorizationHeader(),
318
388
  "X-Fern-Language": "JavaScript",
319
389
  "X-Fern-SDK-Name": "@credal/sdk",
320
- "X-Fern-SDK-Version": "0.0.13",
390
+ "X-Fern-SDK-Version": "0.0.14",
321
391
  "X-Fern-Runtime": core.RUNTIME.type,
322
392
  "X-Fern-Runtime-Version": core.RUNTIME.version,
323
393
  },
@@ -375,7 +445,7 @@ class Copilots {
375
445
  Authorization: yield this._getAuthorizationHeader(),
376
446
  "X-Fern-Language": "JavaScript",
377
447
  "X-Fern-SDK-Name": "@credal/sdk",
378
- "X-Fern-SDK-Version": "0.0.13",
448
+ "X-Fern-SDK-Version": "0.0.14",
379
449
  "X-Fern-Runtime": core.RUNTIME.type,
380
450
  "X-Fern-Runtime-Version": core.RUNTIME.version,
381
451
  },
@@ -441,7 +511,7 @@ class Copilots {
441
511
  Authorization: yield this._getAuthorizationHeader(),
442
512
  "X-Fern-Language": "JavaScript",
443
513
  "X-Fern-SDK-Name": "@credal/sdk",
444
- "X-Fern-SDK-Version": "0.0.13",
514
+ "X-Fern-SDK-Version": "0.0.14",
445
515
  "X-Fern-Runtime": core.RUNTIME.type,
446
516
  "X-Fern-Runtime-Version": core.RUNTIME.version,
447
517
  },
@@ -496,7 +566,7 @@ class Copilots {
496
566
  Authorization: yield this._getAuthorizationHeader(),
497
567
  "X-Fern-Language": "JavaScript",
498
568
  "X-Fern-SDK-Name": "@credal/sdk",
499
- "X-Fern-SDK-Version": "0.0.13",
569
+ "X-Fern-SDK-Version": "0.0.14",
500
570
  "X-Fern-Runtime": core.RUNTIME.type,
501
571
  "X-Fern-Runtime-Version": core.RUNTIME.version,
502
572
  },
@@ -1,12 +1,20 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Credal from "../../../../index";
4
5
  /**
5
6
  * @example
6
7
  * {
7
8
  * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
8
9
  * message: "Is Credal SOC 2 compliant?",
9
- * userEmail: "ravin@credal.ai"
10
+ * userEmail: "ravin@credal.ai",
11
+ * inputVariables: [{
12
+ * name: "input1",
13
+ * urls: ["https://drive.google.com/file/d/123456/view"]
14
+ * }, {
15
+ * name: "input2",
16
+ * urls: ["https://drive.google.com/file/d/123457/view", "https://drive.google.com/file/d/123458/view"]
17
+ * }]
10
18
  * }
11
19
  */
12
20
  export interface SendMessageRequest {
@@ -30,4 +38,9 @@ export interface SendMessageRequest {
30
38
  *
31
39
  */
32
40
  conversationId?: string;
41
+ /**
42
+ * Optional input variables to be used in the message. Map the name of the variable to a list of urls.
43
+ *
44
+ */
45
+ inputVariables?: Credal.InputVariable[];
33
46
  }
@@ -0,0 +1,60 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
9
+ * message: "Is Credal SOC 2 compliant?",
10
+ * email: "ravin@credal.ai",
11
+ * inputVariables: [{
12
+ * name: "input1",
13
+ * urls: ["https://drive.google.com/file/d/123456/view"]
14
+ * }, {
15
+ * name: "input2",
16
+ * urls: ["https://drive.google.com/file/d/123457/view", "https://drive.google.com/file/d/123458/view"]
17
+ * }]
18
+ * }
19
+ *
20
+ * @example
21
+ * {
22
+ * copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
23
+ * message: "Is this user eligible for benefits based on their date of birth?",
24
+ * email: "ravin@credal.ai",
25
+ * inputVariables: [{
26
+ * name: "input1",
27
+ * urls: ["https://drive.google.com/file/d/123456/view"]
28
+ * }, {
29
+ * name: "input2",
30
+ * urls: ["https://drive.google.com/file/d/123457/view", "https://drive.google.com/file/d/123458/view"]
31
+ * }]
32
+ * }
33
+ */
34
+ export interface StreamMessageRequest {
35
+ /**
36
+ * Credal-generated Copilot ID to specify which agent to route the request to.
37
+ *
38
+ */
39
+ copilotId: string;
40
+ /**
41
+ * The message you want to send to your copilot.
42
+ *
43
+ */
44
+ message: string;
45
+ /**
46
+ * The user profile you want to use when sending the message.
47
+ *
48
+ */
49
+ email: string;
50
+ /**
51
+ * Credal-generated conversation ID for sending follow up messages. Conversation ID is returned after initial message. Optional, to be left off for first messages on new conversations.
52
+ *
53
+ */
54
+ conversationId?: string;
55
+ /**
56
+ * Optional input variables to be used in the message. Map the name of the variable to a list of urls.
57
+ *
58
+ */
59
+ inputVariables?: Credal.InputVariable[];
60
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,6 +2,7 @@ export { type CreateCopilotRequest } from "./CreateCopilotRequest";
2
2
  export { type CreateConversationRequest } from "./CreateConversationRequest";
3
3
  export { type ProvideMessageFeedbackRequest } from "./ProvideMessageFeedbackRequest";
4
4
  export { type SendMessageRequest } from "./SendMessageRequest";
5
+ export { type StreamMessageRequest } from "./StreamMessageRequest";
5
6
  export { type AddCollectionToCopilotRequest } from "./AddCollectionToCopilotRequest";
6
7
  export { type RemoveCollectionFromCopilotRequest } from "./RemoveCollectionFromCopilotRequest";
7
8
  export { type UpdateConfigurationRequest } from "./UpdateConfigurationRequest";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export interface BlockedChunk {
6
+ conversationId: string;
7
+ warnings: string[];
8
+ blocks: string[];
9
+ policyTriggers: Credal.PolicyTrigger[];
10
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface BooleanFieldSchema {
5
+ field: string;
6
+ operator: "==";
7
+ value: boolean;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export interface CollectionFilteredData {
6
+ collectionId: string;
7
+ filteredDataIds: string[];
8
+ filters: Credal.Filter[];
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface DataChunk {
5
+ chunk: string;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export interface DataFilter {
6
+ semanticSearchTerms: string[];
7
+ webSearchResults: string[];
8
+ filteredDataSourcesPerCollection: Credal.CollectionFilteredData[];
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export interface DatetimeFieldSchema {
6
+ field: string;
7
+ operator: Credal.Operator;
8
+ value: string;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export declare type Filter = Credal.Filter.String | Credal.Filter.Number | Credal.Filter.Boolean | Credal.Filter.Datetime;
6
+ export declare namespace Filter {
7
+ interface String extends Credal.StringFieldSchema {
8
+ fieldType: "string";
9
+ }
10
+ interface Number extends Credal.NumberFieldSchema {
11
+ fieldType: "number";
12
+ }
13
+ interface Boolean extends Credal.BooleanFieldSchema {
14
+ fieldType: "boolean";
15
+ }
16
+ interface Datetime extends Credal.DatetimeFieldSchema {
17
+ fieldType: "datetime";
18
+ }
19
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export interface FinalChunk {
6
+ referencedSources: Credal.ReferencedSource[];
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export interface InitialChunk {
6
+ conversationId: string;
7
+ warnings: string[];
8
+ webSearchResults: Credal.WebSearchResult[];
9
+ dataFilters?: Credal.DataFilter;
10
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface InputVariable {
5
+ name: string;
6
+ urls: string[];
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,5 +10,6 @@ export interface MessageReply {
10
10
  insertedAuditLog: Credal.InsertedAuditLog;
11
11
  referencedSources: Credal.ReferencedSource[];
12
12
  sourcesInDataContext: Credal.ReferencedSource[];
13
+ webSearchResults: Credal.WebSearchResult[];
13
14
  messageId: string;
14
15
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export interface NumberFieldSchema {
6
+ field: string;
7
+ operator: Credal.Operator;
8
+ value: number;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export declare type StreamingChunk = Credal.InitialChunk | Credal.DataChunk | Credal.FinalChunk | Credal.BlockedChunk;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export interface StringFieldSchema {
6
+ field: string;
7
+ operator: Credal.Operator;
8
+ value: string;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface WebSearchResult {
5
+ title: string;
6
+ url: string;
7
+ content: string;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +1,10 @@
1
1
  export * from "./CreateConversationResponse";
2
2
  export * from "./SendAgentMessageResponse";
3
3
  export * from "./SendMessageResponse";
4
+ export * from "./InputVariable";
4
5
  export * from "./MessageReply";
5
6
  export * from "./ReferencedSource";
7
+ export * from "./WebSearchResult";
6
8
  export * from "./ResponseChunk";
7
9
  export * from "./InsertedAuditLog";
8
10
  export * from "./MessageBlocked";
@@ -13,3 +15,15 @@ export * from "./Configuration";
13
15
  export * from "./AiEndpointConfiguration";
14
16
  export * from "./CreateCopilotResponse";
15
17
  export * from "./DeleteCopilotResponse";
18
+ export * from "./StringFieldSchema";
19
+ export * from "./NumberFieldSchema";
20
+ export * from "./BooleanFieldSchema";
21
+ export * from "./DatetimeFieldSchema";
22
+ export * from "./Filter";
23
+ export * from "./CollectionFilteredData";
24
+ export * from "./DataFilter";
25
+ export * from "./InitialChunk";
26
+ export * from "./DataChunk";
27
+ export * from "./FinalChunk";
28
+ export * from "./BlockedChunk";
29
+ export * from "./StreamingChunk";
@@ -17,8 +17,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./CreateConversationResponse"), exports);
18
18
  __exportStar(require("./SendAgentMessageResponse"), exports);
19
19
  __exportStar(require("./SendMessageResponse"), exports);
20
+ __exportStar(require("./InputVariable"), exports);
20
21
  __exportStar(require("./MessageReply"), exports);
21
22
  __exportStar(require("./ReferencedSource"), exports);
23
+ __exportStar(require("./WebSearchResult"), exports);
22
24
  __exportStar(require("./ResponseChunk"), exports);
23
25
  __exportStar(require("./InsertedAuditLog"), exports);
24
26
  __exportStar(require("./MessageBlocked"), exports);
@@ -29,3 +31,15 @@ __exportStar(require("./Configuration"), exports);
29
31
  __exportStar(require("./AiEndpointConfiguration"), exports);
30
32
  __exportStar(require("./CreateCopilotResponse"), exports);
31
33
  __exportStar(require("./DeleteCopilotResponse"), exports);
34
+ __exportStar(require("./StringFieldSchema"), exports);
35
+ __exportStar(require("./NumberFieldSchema"), exports);
36
+ __exportStar(require("./BooleanFieldSchema"), exports);
37
+ __exportStar(require("./DatetimeFieldSchema"), exports);
38
+ __exportStar(require("./Filter"), exports);
39
+ __exportStar(require("./CollectionFilteredData"), exports);
40
+ __exportStar(require("./DataFilter"), exports);
41
+ __exportStar(require("./InitialChunk"), exports);
42
+ __exportStar(require("./DataChunk"), exports);
43
+ __exportStar(require("./FinalChunk"), exports);
44
+ __exportStar(require("./BlockedChunk"), exports);
45
+ __exportStar(require("./StreamingChunk"), exports);
@@ -71,7 +71,7 @@ class DocumentCatalog {
71
71
  Authorization: yield this._getAuthorizationHeader(),
72
72
  "X-Fern-Language": "JavaScript",
73
73
  "X-Fern-SDK-Name": "@credal/sdk",
74
- "X-Fern-SDK-Version": "0.0.13",
74
+ "X-Fern-SDK-Version": "0.0.14",
75
75
  "X-Fern-Runtime": core.RUNTIME.type,
76
76
  "X-Fern-Runtime-Version": core.RUNTIME.version,
77
77
  },
@@ -154,7 +154,7 @@ class DocumentCatalog {
154
154
  Authorization: yield this._getAuthorizationHeader(),
155
155
  "X-Fern-Language": "JavaScript",
156
156
  "X-Fern-SDK-Name": "@credal/sdk",
157
- "X-Fern-SDK-Version": "0.0.13",
157
+ "X-Fern-SDK-Version": "0.0.14",
158
158
  "X-Fern-Runtime": core.RUNTIME.type,
159
159
  "X-Fern-Runtime-Version": core.RUNTIME.version,
160
160
  },