@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.
- package/api/resources/common/types/index.d.ts +1 -0
- package/api/resources/common/types/index.js +1 -0
- package/api/resources/copilots/client/Client.d.ts +12 -1
- package/api/resources/copilots/client/Client.js +79 -9
- package/api/resources/copilots/client/requests/SendMessageRequest.d.ts +14 -1
- package/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +60 -0
- package/api/resources/copilots/client/requests/StreamMessageRequest.js +5 -0
- package/api/resources/copilots/client/requests/index.d.ts +1 -0
- package/api/resources/copilots/types/BlockedChunk.d.ts +10 -0
- package/api/resources/copilots/types/BlockedChunk.js +5 -0
- package/api/resources/copilots/types/BooleanFieldSchema.d.ts +8 -0
- package/api/resources/copilots/types/BooleanFieldSchema.js +5 -0
- package/api/resources/copilots/types/CollectionFilteredData.d.ts +9 -0
- package/api/resources/copilots/types/CollectionFilteredData.js +5 -0
- package/api/resources/copilots/types/DataChunk.d.ts +6 -0
- package/api/resources/copilots/types/DataChunk.js +5 -0
- package/api/resources/copilots/types/DataFilter.d.ts +9 -0
- package/api/resources/copilots/types/DataFilter.js +5 -0
- package/api/resources/copilots/types/DatetimeFieldSchema.d.ts +9 -0
- package/api/resources/copilots/types/DatetimeFieldSchema.js +5 -0
- package/api/resources/copilots/types/Filter.d.ts +19 -0
- package/api/resources/copilots/types/Filter.js +5 -0
- package/api/resources/copilots/types/FinalChunk.d.ts +7 -0
- package/api/resources/copilots/types/FinalChunk.js +5 -0
- package/api/resources/copilots/types/InitialChunk.d.ts +10 -0
- package/api/resources/copilots/types/InitialChunk.js +5 -0
- package/api/resources/copilots/types/InputVariable.d.ts +7 -0
- package/api/resources/copilots/types/InputVariable.js +5 -0
- package/api/resources/copilots/types/MessageReply.d.ts +1 -0
- package/api/resources/copilots/types/NumberFieldSchema.d.ts +9 -0
- package/api/resources/copilots/types/NumberFieldSchema.js +5 -0
- package/api/resources/copilots/types/StreamingChunk.d.ts +5 -0
- package/api/resources/copilots/types/StreamingChunk.js +5 -0
- package/api/resources/copilots/types/StringFieldSchema.d.ts +9 -0
- package/api/resources/copilots/types/StringFieldSchema.js +5 -0
- package/api/resources/copilots/types/WebSearchResult.d.ts +8 -0
- package/api/resources/copilots/types/WebSearchResult.js +5 -0
- package/api/resources/copilots/types/index.d.ts +14 -0
- package/api/resources/copilots/types/index.js +14 -0
- package/api/resources/documentCatalog/client/Client.js +2 -2
- package/api/resources/documentCollections/client/Client.js +6 -6
- package/api/resources/permissionsService/client/Client.js +3 -3
- package/api/resources/search/client/Client.js +1 -1
- package/api/resources/search/types/index.d.ts +0 -1
- package/api/resources/search/types/index.js +0 -1
- package/api/resources/users/client/Client.js +1 -1
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/streaming-fetcher/Stream.d.ts +48 -0
- package/core/streaming-fetcher/Stream.js +170 -0
- package/core/streaming-fetcher/index.d.ts +1 -0
- package/core/streaming-fetcher/index.js +5 -0
- package/dist/api/resources/common/types/index.d.ts +1 -0
- package/dist/api/resources/common/types/index.js +1 -0
- package/dist/api/resources/copilots/client/Client.d.ts +12 -1
- package/dist/api/resources/copilots/client/Client.js +79 -9
- package/dist/api/resources/copilots/client/requests/SendMessageRequest.d.ts +14 -1
- package/dist/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +60 -0
- package/dist/api/resources/copilots/client/requests/StreamMessageRequest.js +5 -0
- package/dist/api/resources/copilots/client/requests/index.d.ts +1 -0
- package/dist/api/resources/copilots/types/BlockedChunk.d.ts +10 -0
- package/dist/api/resources/copilots/types/BlockedChunk.js +5 -0
- package/dist/api/resources/copilots/types/BooleanFieldSchema.d.ts +8 -0
- package/dist/api/resources/copilots/types/BooleanFieldSchema.js +5 -0
- package/dist/api/resources/copilots/types/CollectionFilteredData.d.ts +9 -0
- package/dist/api/resources/copilots/types/CollectionFilteredData.js +5 -0
- package/dist/api/resources/copilots/types/DataChunk.d.ts +6 -0
- package/dist/api/resources/copilots/types/DataChunk.js +5 -0
- package/dist/api/resources/copilots/types/DataFilter.d.ts +9 -0
- package/dist/api/resources/copilots/types/DataFilter.js +5 -0
- package/dist/api/resources/copilots/types/DatetimeFieldSchema.d.ts +9 -0
- package/dist/api/resources/copilots/types/DatetimeFieldSchema.js +5 -0
- package/dist/api/resources/copilots/types/Filter.d.ts +19 -0
- package/dist/api/resources/copilots/types/Filter.js +5 -0
- package/dist/api/resources/copilots/types/FinalChunk.d.ts +7 -0
- package/dist/api/resources/copilots/types/FinalChunk.js +5 -0
- package/dist/api/resources/copilots/types/InitialChunk.d.ts +10 -0
- package/dist/api/resources/copilots/types/InitialChunk.js +5 -0
- package/dist/api/resources/copilots/types/InputVariable.d.ts +7 -0
- package/dist/api/resources/copilots/types/InputVariable.js +5 -0
- package/dist/api/resources/copilots/types/MessageReply.d.ts +1 -0
- package/dist/api/resources/copilots/types/NumberFieldSchema.d.ts +9 -0
- package/dist/api/resources/copilots/types/NumberFieldSchema.js +5 -0
- package/dist/api/resources/copilots/types/StreamingChunk.d.ts +5 -0
- package/dist/api/resources/copilots/types/StreamingChunk.js +5 -0
- package/dist/api/resources/copilots/types/StringFieldSchema.d.ts +9 -0
- package/dist/api/resources/copilots/types/StringFieldSchema.js +5 -0
- package/dist/api/resources/copilots/types/WebSearchResult.d.ts +8 -0
- package/dist/api/resources/copilots/types/WebSearchResult.js +5 -0
- package/dist/api/resources/copilots/types/index.d.ts +14 -0
- package/dist/api/resources/copilots/types/index.js +14 -0
- package/dist/api/resources/documentCatalog/client/Client.js +2 -2
- package/dist/api/resources/documentCollections/client/Client.js +6 -6
- package/dist/api/resources/permissionsService/client/Client.js +3 -3
- package/dist/api/resources/search/client/Client.js +1 -1
- package/dist/api/resources/search/types/index.d.ts +0 -1
- package/dist/api/resources/search/types/index.js +0 -1
- package/dist/api/resources/users/client/Client.js +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/streaming-fetcher/Stream.d.ts +48 -0
- package/dist/core/streaming-fetcher/Stream.js +170 -0
- package/dist/core/streaming-fetcher/index.d.ts +1 -0
- package/dist/core/streaming-fetcher/index.js +5 -0
- package/dist/serialization/resources/common/types/index.d.ts +1 -0
- package/dist/serialization/resources/common/types/index.js +1 -0
- package/dist/serialization/resources/copilots/client/requests/SendMessageRequest.d.ts +2 -0
- package/dist/serialization/resources/copilots/client/requests/SendMessageRequest.js +2 -0
- package/dist/serialization/resources/copilots/client/requests/StreamMessageRequest.d.ts +17 -0
- package/dist/serialization/resources/copilots/client/requests/StreamMessageRequest.js +38 -0
- package/dist/serialization/resources/copilots/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/copilots/client/requests/index.js +3 -1
- package/dist/serialization/resources/copilots/types/BlockedChunk.d.ts +16 -0
- package/dist/serialization/resources/copilots/types/BlockedChunk.js +37 -0
- package/dist/serialization/resources/copilots/types/BooleanFieldSchema.d.ts +14 -0
- package/dist/serialization/resources/copilots/types/BooleanFieldSchema.js +35 -0
- package/dist/serialization/resources/copilots/types/CollectionFilteredData.d.ts +15 -0
- package/dist/serialization/resources/copilots/types/CollectionFilteredData.js +36 -0
- package/dist/serialization/resources/copilots/types/DataChunk.d.ts +12 -0
- package/dist/serialization/resources/copilots/types/DataChunk.js +33 -0
- package/dist/serialization/resources/copilots/types/DataFilter.d.ts +15 -0
- package/dist/serialization/resources/copilots/types/DataFilter.js +36 -0
- package/dist/serialization/resources/copilots/types/DatetimeFieldSchema.d.ts +15 -0
- package/dist/serialization/resources/copilots/types/DatetimeFieldSchema.js +36 -0
- package/dist/serialization/resources/copilots/types/Filter.d.ts +26 -0
- package/dist/serialization/resources/copilots/types/Filter.js +45 -0
- package/dist/serialization/resources/copilots/types/FinalChunk.d.ts +13 -0
- package/dist/serialization/resources/copilots/types/FinalChunk.js +34 -0
- package/dist/serialization/resources/copilots/types/InitialChunk.d.ts +17 -0
- package/dist/serialization/resources/copilots/types/InitialChunk.js +38 -0
- package/dist/serialization/resources/copilots/types/InputVariable.d.ts +13 -0
- package/dist/serialization/resources/copilots/types/InputVariable.js +34 -0
- package/dist/serialization/resources/copilots/types/MessageReply.d.ts +2 -0
- package/dist/serialization/resources/copilots/types/MessageReply.js +2 -0
- package/dist/serialization/resources/copilots/types/NumberFieldSchema.d.ts +15 -0
- package/dist/serialization/resources/copilots/types/NumberFieldSchema.js +36 -0
- package/dist/serialization/resources/copilots/types/StreamingChunk.d.ts +14 -0
- package/dist/serialization/resources/copilots/types/StreamingChunk.js +35 -0
- package/dist/serialization/resources/copilots/types/StringFieldSchema.d.ts +15 -0
- package/dist/serialization/resources/copilots/types/StringFieldSchema.js +36 -0
- package/dist/serialization/resources/copilots/types/WebSearchResult.d.ts +14 -0
- package/dist/serialization/resources/copilots/types/WebSearchResult.js +35 -0
- package/dist/serialization/resources/copilots/types/index.d.ts +14 -0
- package/dist/serialization/resources/copilots/types/index.js +14 -0
- package/dist/serialization/resources/search/types/SingleFieldFilter.d.ts +1 -1
- package/dist/serialization/resources/search/types/SingleFieldFilter.js +1 -1
- package/dist/serialization/resources/search/types/index.d.ts +0 -1
- package/dist/serialization/resources/search/types/index.js +0 -1
- package/package.json +1 -1
- package/reference.md +71 -0
- package/serialization/resources/common/types/index.d.ts +1 -0
- package/serialization/resources/common/types/index.js +1 -0
- package/serialization/resources/copilots/client/requests/SendMessageRequest.d.ts +2 -0
- package/serialization/resources/copilots/client/requests/SendMessageRequest.js +2 -0
- package/serialization/resources/copilots/client/requests/StreamMessageRequest.d.ts +17 -0
- package/serialization/resources/copilots/client/requests/StreamMessageRequest.js +38 -0
- package/serialization/resources/copilots/client/requests/index.d.ts +1 -0
- package/serialization/resources/copilots/client/requests/index.js +3 -1
- package/serialization/resources/copilots/types/BlockedChunk.d.ts +16 -0
- package/serialization/resources/copilots/types/BlockedChunk.js +37 -0
- package/serialization/resources/copilots/types/BooleanFieldSchema.d.ts +14 -0
- package/serialization/resources/copilots/types/BooleanFieldSchema.js +35 -0
- package/serialization/resources/copilots/types/CollectionFilteredData.d.ts +15 -0
- package/serialization/resources/copilots/types/CollectionFilteredData.js +36 -0
- package/serialization/resources/copilots/types/DataChunk.d.ts +12 -0
- package/serialization/resources/copilots/types/DataChunk.js +33 -0
- package/serialization/resources/copilots/types/DataFilter.d.ts +15 -0
- package/serialization/resources/copilots/types/DataFilter.js +36 -0
- package/serialization/resources/copilots/types/DatetimeFieldSchema.d.ts +15 -0
- package/serialization/resources/copilots/types/DatetimeFieldSchema.js +36 -0
- package/serialization/resources/copilots/types/Filter.d.ts +26 -0
- package/serialization/resources/copilots/types/Filter.js +45 -0
- package/serialization/resources/copilots/types/FinalChunk.d.ts +13 -0
- package/serialization/resources/copilots/types/FinalChunk.js +34 -0
- package/serialization/resources/copilots/types/InitialChunk.d.ts +17 -0
- package/serialization/resources/copilots/types/InitialChunk.js +38 -0
- package/serialization/resources/copilots/types/InputVariable.d.ts +13 -0
- package/serialization/resources/copilots/types/InputVariable.js +34 -0
- package/serialization/resources/copilots/types/MessageReply.d.ts +2 -0
- package/serialization/resources/copilots/types/MessageReply.js +2 -0
- package/serialization/resources/copilots/types/NumberFieldSchema.d.ts +15 -0
- package/serialization/resources/copilots/types/NumberFieldSchema.js +36 -0
- package/serialization/resources/copilots/types/StreamingChunk.d.ts +14 -0
- package/serialization/resources/copilots/types/StreamingChunk.js +35 -0
- package/serialization/resources/copilots/types/StringFieldSchema.d.ts +15 -0
- package/serialization/resources/copilots/types/StringFieldSchema.js +36 -0
- package/serialization/resources/copilots/types/WebSearchResult.d.ts +14 -0
- package/serialization/resources/copilots/types/WebSearchResult.js +35 -0
- package/serialization/resources/copilots/types/index.d.ts +14 -0
- package/serialization/resources/copilots/types/index.js +14 -0
- package/serialization/resources/search/types/SingleFieldFilter.d.ts +1 -1
- package/serialization/resources/search/types/SingleFieldFilter.js +1 -1
- package/serialization/resources/search/types/index.d.ts +0 -1
- package/serialization/resources/search/types/index.js +0 -1
- /package/api/resources/{search → common}/types/Operator.d.ts +0 -0
- /package/api/resources/{search → common}/types/Operator.js +0 -0
- /package/dist/api/resources/{search → common}/types/Operator.d.ts +0 -0
- /package/dist/api/resources/{search → common}/types/Operator.js +0 -0
- /package/dist/serialization/resources/{search → common}/types/Operator.d.ts +0 -0
- /package/dist/serialization/resources/{search → common}/types/Operator.js +0 -0
- /package/serialization/resources/{search → common}/types/Operator.d.ts +0 -0
- /package/serialization/resources/{search → common}/types/Operator.js +0 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
12
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
13
|
+
var m = o[Symbol.asyncIterator], i;
|
|
14
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
15
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
16
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
17
|
+
};
|
|
18
|
+
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
19
|
+
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
20
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
21
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
22
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
23
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
24
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
25
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
26
|
+
function fulfill(value) { resume("next", value); }
|
|
27
|
+
function reject(value) { resume("throw", value); }
|
|
28
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.readableStreamAsyncIterable = exports.Stream = void 0;
|
|
32
|
+
const runtime_1 = require("../runtime");
|
|
33
|
+
const DATA_PREFIX = "data:";
|
|
34
|
+
class Stream {
|
|
35
|
+
constructor({ stream, parse, eventShape, signal }) {
|
|
36
|
+
this.controller = new AbortController();
|
|
37
|
+
this.stream = stream;
|
|
38
|
+
this.parse = parse;
|
|
39
|
+
if (eventShape.type === "sse") {
|
|
40
|
+
this.prefix = DATA_PREFIX;
|
|
41
|
+
this.messageTerminator = "\n";
|
|
42
|
+
this.streamTerminator = eventShape.streamTerminator;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
this.messageTerminator = eventShape.messageTerminator;
|
|
46
|
+
}
|
|
47
|
+
signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", () => this.controller.abort());
|
|
48
|
+
}
|
|
49
|
+
iterMessages() {
|
|
50
|
+
return __asyncGenerator(this, arguments, function* iterMessages_1() {
|
|
51
|
+
var e_1, _a;
|
|
52
|
+
this.controller.signal;
|
|
53
|
+
const stream = readableStreamAsyncIterable(this.stream);
|
|
54
|
+
let buf = "";
|
|
55
|
+
let prefixSeen = false;
|
|
56
|
+
try {
|
|
57
|
+
for (var stream_1 = __asyncValues(stream), stream_1_1; stream_1_1 = yield __await(stream_1.next()), !stream_1_1.done;) {
|
|
58
|
+
const chunk = stream_1_1.value;
|
|
59
|
+
buf += this.decodeChunk(chunk);
|
|
60
|
+
let terminatorIndex;
|
|
61
|
+
// Parse the chunk into as many messages as possible
|
|
62
|
+
while ((terminatorIndex = buf.indexOf(this.messageTerminator)) >= 0) {
|
|
63
|
+
// Extract the line from the buffer
|
|
64
|
+
let line = buf.slice(0, terminatorIndex + 1);
|
|
65
|
+
buf = buf.slice(terminatorIndex + 1);
|
|
66
|
+
// Skip empty lines
|
|
67
|
+
if (line.length === 0) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
// Skip the chunk until the prefix is found
|
|
71
|
+
if (!prefixSeen && this.prefix != null) {
|
|
72
|
+
const prefixIndex = line.indexOf(this.prefix);
|
|
73
|
+
if (prefixIndex === -1) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
prefixSeen = true;
|
|
77
|
+
line = line.slice(prefixIndex + this.prefix.length);
|
|
78
|
+
}
|
|
79
|
+
// If the stream terminator is present, return
|
|
80
|
+
if (this.streamTerminator != null && line.includes(this.streamTerminator)) {
|
|
81
|
+
return yield __await(void 0);
|
|
82
|
+
}
|
|
83
|
+
// Otherwise, yield message from the prefix to the terminator
|
|
84
|
+
const message = yield __await(this.parse(JSON.parse(line)));
|
|
85
|
+
yield yield __await(message);
|
|
86
|
+
prefixSeen = false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
91
|
+
finally {
|
|
92
|
+
try {
|
|
93
|
+
if (stream_1_1 && !stream_1_1.done && (_a = stream_1.return)) yield __await(_a.call(stream_1));
|
|
94
|
+
}
|
|
95
|
+
finally { if (e_1) throw e_1.error; }
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
[Symbol.asyncIterator]() {
|
|
100
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
101
|
+
var e_2, _b;
|
|
102
|
+
try {
|
|
103
|
+
for (var _c = __asyncValues(this.iterMessages()), _d; _d = yield __await(_c.next()), !_d.done;) {
|
|
104
|
+
const message = _d.value;
|
|
105
|
+
yield yield __await(message);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
109
|
+
finally {
|
|
110
|
+
try {
|
|
111
|
+
if (_d && !_d.done && (_b = _c.return)) yield __await(_b.call(_c));
|
|
112
|
+
}
|
|
113
|
+
finally { if (e_2) throw e_2.error; }
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
decodeChunk(chunk) {
|
|
118
|
+
let decoded = "";
|
|
119
|
+
// Buffer is present in Node.js environment
|
|
120
|
+
if (runtime_1.RUNTIME.type === "node" && typeof chunk != "undefined") {
|
|
121
|
+
decoded += Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
122
|
+
}
|
|
123
|
+
// TextDecoder is present in Browser environment
|
|
124
|
+
else if (runtime_1.RUNTIME.type === "browser" && typeof TextDecoder !== "undefined") {
|
|
125
|
+
const decoder = new TextDecoder("utf8");
|
|
126
|
+
decoded += decoder.decode(chunk);
|
|
127
|
+
}
|
|
128
|
+
return decoded;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.Stream = Stream;
|
|
132
|
+
/**
|
|
133
|
+
* Browser polyfill for ReadableStream
|
|
134
|
+
*/
|
|
135
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
136
|
+
function readableStreamAsyncIterable(stream) {
|
|
137
|
+
if (stream[Symbol.asyncIterator]) {
|
|
138
|
+
return stream;
|
|
139
|
+
}
|
|
140
|
+
const reader = stream.getReader();
|
|
141
|
+
return {
|
|
142
|
+
next() {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
try {
|
|
145
|
+
const result = yield reader.read();
|
|
146
|
+
if (result === null || result === void 0 ? void 0 : result.done) {
|
|
147
|
+
reader.releaseLock();
|
|
148
|
+
} // release lock when stream becomes closed
|
|
149
|
+
return result;
|
|
150
|
+
}
|
|
151
|
+
catch (e) {
|
|
152
|
+
reader.releaseLock(); // release lock when stream becomes errored
|
|
153
|
+
throw e;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
},
|
|
157
|
+
return() {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
const cancelPromise = reader.cancel();
|
|
160
|
+
reader.releaseLock();
|
|
161
|
+
yield cancelPromise;
|
|
162
|
+
return { done: true, value: undefined };
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
[Symbol.asyncIterator]() {
|
|
166
|
+
return this;
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
exports.readableStreamAsyncIterable = readableStreamAsyncIterable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stream } from "./Stream";
|
|
@@ -4,6 +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 { InputVariable } from "../../types/InputVariable";
|
|
7
8
|
export declare const SendMessageRequest: core.serialization.Schema<serializers.SendMessageRequest.Raw, Credal.SendMessageRequest>;
|
|
8
9
|
export declare namespace SendMessageRequest {
|
|
9
10
|
interface Raw {
|
|
@@ -11,5 +12,6 @@ export declare namespace SendMessageRequest {
|
|
|
11
12
|
message: string;
|
|
12
13
|
userEmail: string;
|
|
13
14
|
conversationId?: string | null;
|
|
15
|
+
inputVariables?: InputVariable.Raw[] | null;
|
|
14
16
|
}
|
|
15
17
|
}
|
|
@@ -28,9 +28,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.SendMessageRequest = void 0;
|
|
30
30
|
const core = __importStar(require("../../../../../core"));
|
|
31
|
+
const InputVariable_1 = require("../../types/InputVariable");
|
|
31
32
|
exports.SendMessageRequest = core.serialization.object({
|
|
32
33
|
agentId: core.serialization.string(),
|
|
33
34
|
message: core.serialization.string(),
|
|
34
35
|
userEmail: core.serialization.string(),
|
|
35
36
|
conversationId: core.serialization.string().optional(),
|
|
37
|
+
inputVariables: core.serialization.list(InputVariable_1.InputVariable).optional(),
|
|
36
38
|
});
|
|
@@ -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 { InputVariable } from "../../types/InputVariable";
|
|
8
|
+
export declare const StreamMessageRequest: core.serialization.Schema<serializers.StreamMessageRequest.Raw, Credal.StreamMessageRequest>;
|
|
9
|
+
export declare namespace StreamMessageRequest {
|
|
10
|
+
interface Raw {
|
|
11
|
+
copilotId: string;
|
|
12
|
+
message: string;
|
|
13
|
+
email: string;
|
|
14
|
+
conversationId?: string | null;
|
|
15
|
+
inputVariables?: InputVariable.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.StreamMessageRequest = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../../core"));
|
|
31
|
+
const InputVariable_1 = require("../../types/InputVariable");
|
|
32
|
+
exports.StreamMessageRequest = core.serialization.object({
|
|
33
|
+
copilotId: core.serialization.string(),
|
|
34
|
+
message: core.serialization.string(),
|
|
35
|
+
email: core.serialization.string(),
|
|
36
|
+
conversationId: core.serialization.string().optional(),
|
|
37
|
+
inputVariables: core.serialization.list(InputVariable_1.InputVariable).optional(),
|
|
38
|
+
});
|
|
@@ -2,6 +2,7 @@ export { CreateCopilotRequest } from "./CreateCopilotRequest";
|
|
|
2
2
|
export { CreateConversationRequest } from "./CreateConversationRequest";
|
|
3
3
|
export { ProvideMessageFeedbackRequest } from "./ProvideMessageFeedbackRequest";
|
|
4
4
|
export { SendMessageRequest } from "./SendMessageRequest";
|
|
5
|
+
export { StreamMessageRequest } from "./StreamMessageRequest";
|
|
5
6
|
export { AddCollectionToCopilotRequest } from "./AddCollectionToCopilotRequest";
|
|
6
7
|
export { RemoveCollectionFromCopilotRequest } from "./RemoveCollectionFromCopilotRequest";
|
|
7
8
|
export { UpdateConfigurationRequest } from "./UpdateConfigurationRequest";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeleteCopilotRequest = exports.UpdateConfigurationRequest = exports.RemoveCollectionFromCopilotRequest = exports.AddCollectionToCopilotRequest = exports.SendMessageRequest = exports.ProvideMessageFeedbackRequest = exports.CreateConversationRequest = exports.CreateCopilotRequest = void 0;
|
|
3
|
+
exports.DeleteCopilotRequest = exports.UpdateConfigurationRequest = exports.RemoveCollectionFromCopilotRequest = exports.AddCollectionToCopilotRequest = exports.StreamMessageRequest = exports.SendMessageRequest = exports.ProvideMessageFeedbackRequest = exports.CreateConversationRequest = exports.CreateCopilotRequest = void 0;
|
|
4
4
|
var CreateCopilotRequest_1 = require("./CreateCopilotRequest");
|
|
5
5
|
Object.defineProperty(exports, "CreateCopilotRequest", { enumerable: true, get: function () { return CreateCopilotRequest_1.CreateCopilotRequest; } });
|
|
6
6
|
var CreateConversationRequest_1 = require("./CreateConversationRequest");
|
|
@@ -9,6 +9,8 @@ var ProvideMessageFeedbackRequest_1 = require("./ProvideMessageFeedbackRequest")
|
|
|
9
9
|
Object.defineProperty(exports, "ProvideMessageFeedbackRequest", { enumerable: true, get: function () { return ProvideMessageFeedbackRequest_1.ProvideMessageFeedbackRequest; } });
|
|
10
10
|
var SendMessageRequest_1 = require("./SendMessageRequest");
|
|
11
11
|
Object.defineProperty(exports, "SendMessageRequest", { enumerable: true, get: function () { return SendMessageRequest_1.SendMessageRequest; } });
|
|
12
|
+
var StreamMessageRequest_1 = require("./StreamMessageRequest");
|
|
13
|
+
Object.defineProperty(exports, "StreamMessageRequest", { enumerable: true, get: function () { return StreamMessageRequest_1.StreamMessageRequest; } });
|
|
12
14
|
var AddCollectionToCopilotRequest_1 = require("./AddCollectionToCopilotRequest");
|
|
13
15
|
Object.defineProperty(exports, "AddCollectionToCopilotRequest", { enumerable: true, get: function () { return AddCollectionToCopilotRequest_1.AddCollectionToCopilotRequest; } });
|
|
14
16
|
var RemoveCollectionFromCopilotRequest_1 = require("./RemoveCollectionFromCopilotRequest");
|
|
@@ -0,0 +1,16 @@
|
|
|
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 { PolicyTrigger } from "./PolicyTrigger";
|
|
8
|
+
export declare const BlockedChunk: core.serialization.ObjectSchema<serializers.BlockedChunk.Raw, Credal.BlockedChunk>;
|
|
9
|
+
export declare namespace BlockedChunk {
|
|
10
|
+
interface Raw {
|
|
11
|
+
conversationId: string;
|
|
12
|
+
warnings: string[];
|
|
13
|
+
blocks: string[];
|
|
14
|
+
policyTriggers: PolicyTrigger.Raw[];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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.BlockedChunk = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../core"));
|
|
31
|
+
const PolicyTrigger_1 = require("./PolicyTrigger");
|
|
32
|
+
exports.BlockedChunk = core.serialization.object({
|
|
33
|
+
conversationId: core.serialization.string(),
|
|
34
|
+
warnings: core.serialization.list(core.serialization.string()),
|
|
35
|
+
blocks: core.serialization.list(core.serialization.string()),
|
|
36
|
+
policyTriggers: core.serialization.list(PolicyTrigger_1.PolicyTrigger),
|
|
37
|
+
});
|
|
@@ -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 BooleanFieldSchema: core.serialization.ObjectSchema<serializers.BooleanFieldSchema.Raw, Credal.BooleanFieldSchema>;
|
|
8
|
+
export declare namespace BooleanFieldSchema {
|
|
9
|
+
interface Raw {
|
|
10
|
+
field: string;
|
|
11
|
+
operator: "==";
|
|
12
|
+
value: boolean;
|
|
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.BooleanFieldSchema = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../core"));
|
|
31
|
+
exports.BooleanFieldSchema = core.serialization.object({
|
|
32
|
+
field: core.serialization.string(),
|
|
33
|
+
operator: core.serialization.stringLiteral("=="),
|
|
34
|
+
value: core.serialization.boolean(),
|
|
35
|
+
});
|
|
@@ -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 { Filter } from "./Filter";
|
|
8
|
+
export declare const CollectionFilteredData: core.serialization.ObjectSchema<serializers.CollectionFilteredData.Raw, Credal.CollectionFilteredData>;
|
|
9
|
+
export declare namespace CollectionFilteredData {
|
|
10
|
+
interface Raw {
|
|
11
|
+
collectionId: string;
|
|
12
|
+
filteredDataIds: string[];
|
|
13
|
+
filters: Filter.Raw[];
|
|
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.CollectionFilteredData = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../core"));
|
|
31
|
+
const Filter_1 = require("./Filter");
|
|
32
|
+
exports.CollectionFilteredData = core.serialization.object({
|
|
33
|
+
collectionId: core.serialization.string(),
|
|
34
|
+
filteredDataIds: core.serialization.list(core.serialization.string()),
|
|
35
|
+
filters: core.serialization.list(Filter_1.Filter),
|
|
36
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
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 DataChunk: core.serialization.ObjectSchema<serializers.DataChunk.Raw, Credal.DataChunk>;
|
|
8
|
+
export declare namespace DataChunk {
|
|
9
|
+
interface Raw {
|
|
10
|
+
chunk: string;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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.DataChunk = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../core"));
|
|
31
|
+
exports.DataChunk = core.serialization.object({
|
|
32
|
+
chunk: core.serialization.string(),
|
|
33
|
+
});
|
|
@@ -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 { CollectionFilteredData } from "./CollectionFilteredData";
|
|
8
|
+
export declare const DataFilter: core.serialization.ObjectSchema<serializers.DataFilter.Raw, Credal.DataFilter>;
|
|
9
|
+
export declare namespace DataFilter {
|
|
10
|
+
interface Raw {
|
|
11
|
+
semanticSearchTerms: string[];
|
|
12
|
+
webSearchResults: string[];
|
|
13
|
+
filteredDataSourcesPerCollection: CollectionFilteredData.Raw[];
|
|
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.DataFilter = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../core"));
|
|
31
|
+
const CollectionFilteredData_1 = require("./CollectionFilteredData");
|
|
32
|
+
exports.DataFilter = core.serialization.object({
|
|
33
|
+
semanticSearchTerms: core.serialization.list(core.serialization.string()),
|
|
34
|
+
webSearchResults: core.serialization.list(core.serialization.string()),
|
|
35
|
+
filteredDataSourcesPerCollection: core.serialization.list(CollectionFilteredData_1.CollectionFilteredData),
|
|
36
|
+
});
|
|
@@ -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 DatetimeFieldSchema: core.serialization.ObjectSchema<serializers.DatetimeFieldSchema.Raw, Credal.DatetimeFieldSchema>;
|
|
9
|
+
export declare namespace DatetimeFieldSchema {
|
|
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.DatetimeFieldSchema = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../core"));
|
|
31
|
+
const Operator_1 = require("../../common/types/Operator");
|
|
32
|
+
exports.DatetimeFieldSchema = core.serialization.object({
|
|
33
|
+
field: core.serialization.string(),
|
|
34
|
+
operator: Operator_1.Operator,
|
|
35
|
+
value: core.serialization.string(),
|
|
36
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { StringFieldSchema } from "./StringFieldSchema";
|
|
8
|
+
import { NumberFieldSchema } from "./NumberFieldSchema";
|
|
9
|
+
import { BooleanFieldSchema } from "./BooleanFieldSchema";
|
|
10
|
+
import { DatetimeFieldSchema } from "./DatetimeFieldSchema";
|
|
11
|
+
export declare const Filter: core.serialization.Schema<serializers.Filter.Raw, Credal.Filter>;
|
|
12
|
+
export declare namespace Filter {
|
|
13
|
+
type Raw = Filter.String | Filter.Number | Filter.Boolean | Filter.Datetime;
|
|
14
|
+
interface String extends StringFieldSchema.Raw {
|
|
15
|
+
fieldType: "string";
|
|
16
|
+
}
|
|
17
|
+
interface Number extends NumberFieldSchema.Raw {
|
|
18
|
+
fieldType: "number";
|
|
19
|
+
}
|
|
20
|
+
interface Boolean extends BooleanFieldSchema.Raw {
|
|
21
|
+
fieldType: "boolean";
|
|
22
|
+
}
|
|
23
|
+
interface Datetime extends DatetimeFieldSchema.Raw {
|
|
24
|
+
fieldType: "datetime";
|
|
25
|
+
}
|
|
26
|
+
}
|