@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
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.Filter = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const StringFieldSchema_1 = require("./StringFieldSchema");
32
+ const NumberFieldSchema_1 = require("./NumberFieldSchema");
33
+ const BooleanFieldSchema_1 = require("./BooleanFieldSchema");
34
+ const DatetimeFieldSchema_1 = require("./DatetimeFieldSchema");
35
+ exports.Filter = core.serialization
36
+ .union("fieldType", {
37
+ string: StringFieldSchema_1.StringFieldSchema,
38
+ number: NumberFieldSchema_1.NumberFieldSchema,
39
+ boolean: BooleanFieldSchema_1.BooleanFieldSchema,
40
+ datetime: DatetimeFieldSchema_1.DatetimeFieldSchema,
41
+ })
42
+ .transform({
43
+ transform: (value) => value,
44
+ untransform: (value) => value,
45
+ });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Credal from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { ReferencedSource } from "./ReferencedSource";
8
+ export declare const FinalChunk: core.serialization.ObjectSchema<serializers.FinalChunk.Raw, Credal.FinalChunk>;
9
+ export declare namespace FinalChunk {
10
+ interface Raw {
11
+ referencedSources: ReferencedSource.Raw[];
12
+ }
13
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.FinalChunk = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const ReferencedSource_1 = require("./ReferencedSource");
32
+ exports.FinalChunk = core.serialization.object({
33
+ referencedSources: core.serialization.list(ReferencedSource_1.ReferencedSource),
34
+ });
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Credal from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { WebSearchResult } from "./WebSearchResult";
8
+ import { DataFilter } from "./DataFilter";
9
+ export declare const InitialChunk: core.serialization.ObjectSchema<serializers.InitialChunk.Raw, Credal.InitialChunk>;
10
+ export declare namespace InitialChunk {
11
+ interface Raw {
12
+ conversationId: string;
13
+ warnings: string[];
14
+ webSearchResults: WebSearchResult.Raw[];
15
+ dataFilters?: DataFilter.Raw | null;
16
+ }
17
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.InitialChunk = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const WebSearchResult_1 = require("./WebSearchResult");
32
+ const DataFilter_1 = require("./DataFilter");
33
+ exports.InitialChunk = core.serialization.object({
34
+ conversationId: core.serialization.string(),
35
+ warnings: core.serialization.list(core.serialization.string()),
36
+ webSearchResults: core.serialization.list(WebSearchResult_1.WebSearchResult),
37
+ dataFilters: DataFilter_1.DataFilter.optional(),
38
+ });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Credal from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const InputVariable: core.serialization.ObjectSchema<serializers.InputVariable.Raw, Credal.InputVariable>;
8
+ export declare namespace InputVariable {
9
+ interface Raw {
10
+ name: string;
11
+ urls: string[];
12
+ }
13
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.InputVariable = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.InputVariable = core.serialization.object({
32
+ name: core.serialization.string(),
33
+ urls: core.serialization.list(core.serialization.string()),
34
+ });
@@ -8,6 +8,7 @@ import { PolicyTrigger } from "./PolicyTrigger";
8
8
  import { ResponseChunk } from "./ResponseChunk";
9
9
  import { InsertedAuditLog } from "./InsertedAuditLog";
10
10
  import { ReferencedSource } from "./ReferencedSource";
11
+ import { WebSearchResult } from "./WebSearchResult";
11
12
  export declare const MessageReply: core.serialization.ObjectSchema<serializers.MessageReply.Raw, Credal.MessageReply>;
12
13
  export declare namespace MessageReply {
13
14
  interface Raw {
@@ -18,6 +19,7 @@ export declare namespace MessageReply {
18
19
  inserted_audit_log: InsertedAuditLog.Raw;
19
20
  referencedSources: ReferencedSource.Raw[];
20
21
  sourcesInDataContext: ReferencedSource.Raw[];
22
+ webSearchResults: WebSearchResult.Raw[];
21
23
  messageId: string;
22
24
  }
23
25
  }
@@ -32,6 +32,7 @@ const PolicyTrigger_1 = require("./PolicyTrigger");
32
32
  const ResponseChunk_1 = require("./ResponseChunk");
33
33
  const InsertedAuditLog_1 = require("./InsertedAuditLog");
34
34
  const ReferencedSource_1 = require("./ReferencedSource");
35
+ const WebSearchResult_1 = require("./WebSearchResult");
35
36
  exports.MessageReply = core.serialization.object({
36
37
  policyTriggers: core.serialization.property("policy_triggers", core.serialization.list(PolicyTrigger_1.PolicyTrigger)),
37
38
  conversationId: core.serialization.string(),
@@ -40,5 +41,6 @@ exports.MessageReply = core.serialization.object({
40
41
  insertedAuditLog: core.serialization.property("inserted_audit_log", InsertedAuditLog_1.InsertedAuditLog),
41
42
  referencedSources: core.serialization.list(ReferencedSource_1.ReferencedSource),
42
43
  sourcesInDataContext: core.serialization.list(ReferencedSource_1.ReferencedSource),
44
+ webSearchResults: core.serialization.list(WebSearchResult_1.WebSearchResult),
43
45
  messageId: core.serialization.string(),
44
46
  });
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Credal from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { Operator } from "../../common/types/Operator";
8
+ export declare const NumberFieldSchema: core.serialization.ObjectSchema<serializers.NumberFieldSchema.Raw, Credal.NumberFieldSchema>;
9
+ export declare namespace NumberFieldSchema {
10
+ interface Raw {
11
+ field: string;
12
+ operator: Operator.Raw;
13
+ value: number;
14
+ }
15
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.NumberFieldSchema = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const Operator_1 = require("../../common/types/Operator");
32
+ exports.NumberFieldSchema = core.serialization.object({
33
+ field: core.serialization.string(),
34
+ operator: Operator_1.Operator,
35
+ value: core.serialization.number(),
36
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Credal from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { InitialChunk } from "./InitialChunk";
8
+ import { DataChunk } from "./DataChunk";
9
+ import { FinalChunk } from "./FinalChunk";
10
+ import { BlockedChunk } from "./BlockedChunk";
11
+ export declare const StreamingChunk: core.serialization.Schema<serializers.StreamingChunk.Raw, Credal.StreamingChunk>;
12
+ export declare namespace StreamingChunk {
13
+ type Raw = InitialChunk.Raw | DataChunk.Raw | FinalChunk.Raw | BlockedChunk.Raw;
14
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.StreamingChunk = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const InitialChunk_1 = require("./InitialChunk");
32
+ const DataChunk_1 = require("./DataChunk");
33
+ const FinalChunk_1 = require("./FinalChunk");
34
+ const BlockedChunk_1 = require("./BlockedChunk");
35
+ exports.StreamingChunk = core.serialization.undiscriminatedUnion([InitialChunk_1.InitialChunk, DataChunk_1.DataChunk, FinalChunk_1.FinalChunk, BlockedChunk_1.BlockedChunk]);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Credal from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { Operator } from "../../common/types/Operator";
8
+ export declare const StringFieldSchema: core.serialization.ObjectSchema<serializers.StringFieldSchema.Raw, Credal.StringFieldSchema>;
9
+ export declare namespace StringFieldSchema {
10
+ interface Raw {
11
+ field: string;
12
+ operator: Operator.Raw;
13
+ value: string;
14
+ }
15
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.StringFieldSchema = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const Operator_1 = require("../../common/types/Operator");
32
+ exports.StringFieldSchema = core.serialization.object({
33
+ field: core.serialization.string(),
34
+ operator: Operator_1.Operator,
35
+ value: core.serialization.string(),
36
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Credal from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const WebSearchResult: core.serialization.ObjectSchema<serializers.WebSearchResult.Raw, Credal.WebSearchResult>;
8
+ export declare namespace WebSearchResult {
9
+ interface Raw {
10
+ title: string;
11
+ url: string;
12
+ content: string;
13
+ }
14
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebSearchResult = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.WebSearchResult = core.serialization.object({
32
+ title: core.serialization.string(),
33
+ url: core.serialization.string(),
34
+ content: core.serialization.string(),
35
+ });
@@ -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);
@@ -4,7 +4,7 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as Credal from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
- import { Operator } from "./Operator";
7
+ import { Operator } from "../../common/types/Operator";
8
8
  export declare const SingleFieldFilter: core.serialization.ObjectSchema<serializers.SingleFieldFilter.Raw, Credal.SingleFieldFilter>;
9
9
  export declare namespace SingleFieldFilter {
10
10
  interface Raw {
@@ -28,7 +28,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.SingleFieldFilter = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
- const Operator_1 = require("./Operator");
31
+ const Operator_1 = require("../../common/types/Operator");
32
32
  exports.SingleFieldFilter = core.serialization.object({
33
33
  field: core.serialization.string(),
34
34
  operator: Operator_1.Operator,
@@ -2,5 +2,4 @@ export * from "./DocumentCollectionSearchOptions";
2
2
  export * from "./SearchDocumentCollectionResponse";
3
3
  export * from "./DocumentCollectionSearchResult";
4
4
  export * from "./SearchResultChunk";
5
- export * from "./Operator";
6
5
  export * from "./SingleFieldFilter";
@@ -18,5 +18,4 @@ __exportStar(require("./DocumentCollectionSearchOptions"), exports);
18
18
  __exportStar(require("./SearchDocumentCollectionResponse"), exports);
19
19
  __exportStar(require("./DocumentCollectionSearchResult"), exports);
20
20
  __exportStar(require("./SearchResultChunk"), exports);
21
- __exportStar(require("./Operator"), exports);
22
21
  __exportStar(require("./SingleFieldFilter"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/sdk",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "private": false,
5
5
  "repository": "https://github.com/credal-ai/credal-typescript-sdk",
6
6
  "main": "./index.js",
package/reference.md CHANGED
@@ -270,6 +270,16 @@ await credal.copilots.sendMessage({
270
270
  agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
271
271
  message: "Is Credal SOC 2 compliant?",
272
272
  userEmail: "ravin@credal.ai",
273
+ inputVariables: [
274
+ {
275
+ name: "input1",
276
+ urls: ["https://drive.google.com/file/d/123456/view"],
277
+ },
278
+ {
279
+ name: "input2",
280
+ urls: ["https://drive.google.com/file/d/123457/view", "https://drive.google.com/file/d/123458/view"],
281
+ },
282
+ ],
273
283
  });
274
284
  ```
275
285
 
@@ -316,6 +326,67 @@ await credal.copilots.sendMessage({
316
326
  </dl>
317
327
  </details>
318
328
 
329
+ <details><summary> <code>credal.copilots.<a href="./src/api/resources/copilots/client/Client.ts">streamMessage</a>({ ...params }) -> core.Stream<Credal.StreamingChunk></code> </summary>
330
+
331
+ <dl>
332
+
333
+ <dd>
334
+
335
+ #### 📝 Description
336
+
337
+ <dl>
338
+
339
+ <dd>
340
+
341
+ <dl>
342
+
343
+ <dd>
344
+
345
+ 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.
346
+
347
+ </dd>
348
+
349
+ </dl>
350
+
351
+ </dd>
352
+
353
+ </dl>
354
+
355
+ #### ⚙️ Parameters
356
+
357
+ <dl>
358
+
359
+ <dd>
360
+
361
+ <dl>
362
+
363
+ <dd>
364
+
365
+ **request: `Credal.StreamMessageRequest`**
366
+
367
+ </dd>
368
+
369
+ </dl>
370
+
371
+ <dl>
372
+
373
+ <dd>
374
+
375
+ **requestOptions: `Copilots.RequestOptions`**
376
+
377
+ </dd>
378
+
379
+ </dl>
380
+
381
+ </dd>
382
+
383
+ </dl>
384
+
385
+ </dd>
386
+
387
+ </dl>
388
+ </details>
389
+
319
390
  <details><summary> <code>credal.copilots.<a href="./src/api/resources/copilots/client/Client.ts">addCollectionToCopilot</a>({ ...params }) -> void</code> </summary>
320
391
 
321
392
  <dl>
@@ -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);