weave-typescript 0.28.0 → 0.30.0
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/dist/weaveapi/chat/v1/chat.pb.d.ts +11 -0
- package/dist/weaveapi/chat/v1/chat.pb.js +181 -9
- package/dist/weaveapi/ingestion/v1/ingestion.pb.d.ts +204 -0
- package/dist/weaveapi/ingestion/v1/ingestion.pb.js +3830 -970
- package/dist/weaveapi/ingestion/v1/service.pb.d.ts +113 -1
- package/dist/weaveapi/ingestion/v1/service.pb.js +679 -40
- package/dist/weaveapi/retrieval/v1/retrieval.pb.d.ts +45 -1
- package/dist/weaveapi/retrieval/v1/retrieval.pb.js +729 -1
- package/dist/weaveapi/retrieval/v1/service.pb.d.ts +15 -1
- package/dist/weaveapi/retrieval/v1/service.pb.js +79 -0
- package/dist/weavesql/weavedb/chat_sql.d.ts +25 -3
- package/dist/weavesql/weavedb/chat_sql.js +36 -7
- package/dist/weavesql/weavedb/ingestion_sql.d.ts +151 -0
- package/dist/weavesql/weavedb/ingestion_sql.js +423 -2
- package/dist/weavesql/weavedb/retrieval_sql.d.ts +31 -0
- package/dist/weavesql/weavedb/retrieval_sql.js +112 -1
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { SourceLocation } from "../../ingestion/v1/ingestion.pb";
|
|
2
3
|
export declare const protobufPackage = "weaveapi.chat.v1";
|
|
3
4
|
export declare enum ChatMessageRole {
|
|
4
5
|
CHAT_MESSAGE_ROLE_UNSPECIFIED = 0,
|
|
@@ -37,6 +38,7 @@ export declare enum ChatArtifactKind {
|
|
|
37
38
|
CHAT_ARTIFACT_KIND_HTML = 2,
|
|
38
39
|
CHAT_ARTIFACT_KIND_PLAINTEXT = 3,
|
|
39
40
|
CHAT_ARTIFACT_KIND_CODE = 4,
|
|
41
|
+
CHAT_ARTIFACT_KIND_DOCUMENT_REFERENCE = 5,
|
|
40
42
|
UNRECOGNIZED = -1
|
|
41
43
|
}
|
|
42
44
|
export declare function chatArtifactKindFromJSON(object: any): ChatArtifactKind;
|
|
@@ -88,6 +90,14 @@ export interface ChatArtifactVersion {
|
|
|
88
90
|
content: string;
|
|
89
91
|
createdByMessageId: string;
|
|
90
92
|
createdAt: Date | undefined;
|
|
93
|
+
documentReferences: ChatDocumentReference[];
|
|
94
|
+
}
|
|
95
|
+
export interface ChatDocumentReference {
|
|
96
|
+
documentId: string;
|
|
97
|
+
documentName: string;
|
|
98
|
+
mimeType: string;
|
|
99
|
+
threadIds: string[];
|
|
100
|
+
sourceLocations: SourceLocation[];
|
|
91
101
|
}
|
|
92
102
|
export interface ChatEphemeralAttachment {
|
|
93
103
|
mimeType: string;
|
|
@@ -168,6 +178,7 @@ export declare const ChatSession: MessageFns<ChatSession>;
|
|
|
168
178
|
export declare const ChatMessage: MessageFns<ChatMessage>;
|
|
169
179
|
export declare const ChatArtifact: MessageFns<ChatArtifact>;
|
|
170
180
|
export declare const ChatArtifactVersion: MessageFns<ChatArtifactVersion>;
|
|
181
|
+
export declare const ChatDocumentReference: MessageFns<ChatDocumentReference>;
|
|
171
182
|
export declare const ChatEphemeralAttachment: MessageFns<ChatEphemeralAttachment>;
|
|
172
183
|
export declare const ChatStreamFrame: MessageFns<ChatStreamFrame>;
|
|
173
184
|
export declare const ChatStreamFrame_MessageStarted: MessageFns<ChatStreamFrame_MessageStarted>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc unknown
|
|
6
6
|
// source: weaveapi/chat/v1/chat.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ChatStreamFrame_MessageError = exports.ChatStreamFrame_MessageComplete = exports.ChatStreamFrame_ArtifactUpdated = exports.ChatStreamFrame_ArtifactCreated = exports.ChatStreamFrame_ToolCallRejected = exports.ChatStreamFrame_ToolCallResult = exports.ChatStreamFrame_ToolCallExecuting = exports.ChatStreamFrame_ToolCallProposed = exports.ChatStreamFrame_MessageDelta = exports.ChatStreamFrame_MessageStarted = exports.ChatStreamFrame = exports.ChatEphemeralAttachment = exports.ChatArtifactVersion = exports.ChatArtifact = exports.ChatMessage = exports.ChatSession = exports.ChatArtifactKind = exports.ChatStreamState = exports.ChatToolCallState = exports.ChatMessageRole = exports.protobufPackage = void 0;
|
|
8
|
+
exports.ChatStreamFrame_MessageError = exports.ChatStreamFrame_MessageComplete = exports.ChatStreamFrame_ArtifactUpdated = exports.ChatStreamFrame_ArtifactCreated = exports.ChatStreamFrame_ToolCallRejected = exports.ChatStreamFrame_ToolCallResult = exports.ChatStreamFrame_ToolCallExecuting = exports.ChatStreamFrame_ToolCallProposed = exports.ChatStreamFrame_MessageDelta = exports.ChatStreamFrame_MessageStarted = exports.ChatStreamFrame = exports.ChatEphemeralAttachment = exports.ChatDocumentReference = exports.ChatArtifactVersion = exports.ChatArtifact = exports.ChatMessage = exports.ChatSession = exports.ChatArtifactKind = exports.ChatStreamState = exports.ChatToolCallState = exports.ChatMessageRole = exports.protobufPackage = void 0;
|
|
9
9
|
exports.chatMessageRoleFromJSON = chatMessageRoleFromJSON;
|
|
10
10
|
exports.chatMessageRoleToJSON = chatMessageRoleToJSON;
|
|
11
11
|
exports.chatToolCallStateFromJSON = chatToolCallStateFromJSON;
|
|
@@ -18,6 +18,7 @@ exports.chatArtifactKindToJSON = chatArtifactKindToJSON;
|
|
|
18
18
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
19
19
|
const struct_pb_1 = require("../../../google/protobuf/struct.pb");
|
|
20
20
|
const timestamp_pb_1 = require("../../../google/protobuf/timestamp.pb");
|
|
21
|
+
const ingestion_pb_1 = require("../../ingestion/v1/ingestion.pb");
|
|
21
22
|
exports.protobufPackage = "weaveapi.chat.v1";
|
|
22
23
|
var ChatMessageRole;
|
|
23
24
|
(function (ChatMessageRole) {
|
|
@@ -179,6 +180,7 @@ var ChatArtifactKind;
|
|
|
179
180
|
ChatArtifactKind[ChatArtifactKind["CHAT_ARTIFACT_KIND_HTML"] = 2] = "CHAT_ARTIFACT_KIND_HTML";
|
|
180
181
|
ChatArtifactKind[ChatArtifactKind["CHAT_ARTIFACT_KIND_PLAINTEXT"] = 3] = "CHAT_ARTIFACT_KIND_PLAINTEXT";
|
|
181
182
|
ChatArtifactKind[ChatArtifactKind["CHAT_ARTIFACT_KIND_CODE"] = 4] = "CHAT_ARTIFACT_KIND_CODE";
|
|
183
|
+
ChatArtifactKind[ChatArtifactKind["CHAT_ARTIFACT_KIND_DOCUMENT_REFERENCE"] = 5] = "CHAT_ARTIFACT_KIND_DOCUMENT_REFERENCE";
|
|
182
184
|
ChatArtifactKind[ChatArtifactKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
183
185
|
})(ChatArtifactKind || (exports.ChatArtifactKind = ChatArtifactKind = {}));
|
|
184
186
|
function chatArtifactKindFromJSON(object) {
|
|
@@ -198,6 +200,9 @@ function chatArtifactKindFromJSON(object) {
|
|
|
198
200
|
case 4:
|
|
199
201
|
case "CHAT_ARTIFACT_KIND_CODE":
|
|
200
202
|
return ChatArtifactKind.CHAT_ARTIFACT_KIND_CODE;
|
|
203
|
+
case 5:
|
|
204
|
+
case "CHAT_ARTIFACT_KIND_DOCUMENT_REFERENCE":
|
|
205
|
+
return ChatArtifactKind.CHAT_ARTIFACT_KIND_DOCUMENT_REFERENCE;
|
|
201
206
|
case -1:
|
|
202
207
|
case "UNRECOGNIZED":
|
|
203
208
|
default:
|
|
@@ -216,6 +221,8 @@ function chatArtifactKindToJSON(object) {
|
|
|
216
221
|
return "CHAT_ARTIFACT_KIND_PLAINTEXT";
|
|
217
222
|
case ChatArtifactKind.CHAT_ARTIFACT_KIND_CODE:
|
|
218
223
|
return "CHAT_ARTIFACT_KIND_CODE";
|
|
224
|
+
case ChatArtifactKind.CHAT_ARTIFACT_KIND_DOCUMENT_REFERENCE:
|
|
225
|
+
return "CHAT_ARTIFACT_KIND_DOCUMENT_REFERENCE";
|
|
219
226
|
case ChatArtifactKind.UNRECOGNIZED:
|
|
220
227
|
default:
|
|
221
228
|
return "UNRECOGNIZED";
|
|
@@ -950,7 +957,15 @@ exports.ChatArtifact = {
|
|
|
950
957
|
},
|
|
951
958
|
};
|
|
952
959
|
function createBaseChatArtifactVersion() {
|
|
953
|
-
return {
|
|
960
|
+
return {
|
|
961
|
+
id: "",
|
|
962
|
+
artifactId: "",
|
|
963
|
+
version: 0,
|
|
964
|
+
content: "",
|
|
965
|
+
createdByMessageId: "",
|
|
966
|
+
createdAt: undefined,
|
|
967
|
+
documentReferences: [],
|
|
968
|
+
};
|
|
954
969
|
}
|
|
955
970
|
exports.ChatArtifactVersion = {
|
|
956
971
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -972,6 +987,9 @@ exports.ChatArtifactVersion = {
|
|
|
972
987
|
if (message.createdAt !== undefined) {
|
|
973
988
|
timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(50).fork()).join();
|
|
974
989
|
}
|
|
990
|
+
for (const v of message.documentReferences) {
|
|
991
|
+
exports.ChatDocumentReference.encode(v, writer.uint32(58).fork()).join();
|
|
992
|
+
}
|
|
975
993
|
return writer;
|
|
976
994
|
},
|
|
977
995
|
decode(input, length) {
|
|
@@ -1023,6 +1041,13 @@ exports.ChatArtifactVersion = {
|
|
|
1023
1041
|
message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
|
|
1024
1042
|
continue;
|
|
1025
1043
|
}
|
|
1044
|
+
case 7: {
|
|
1045
|
+
if (tag !== 58) {
|
|
1046
|
+
break;
|
|
1047
|
+
}
|
|
1048
|
+
message.documentReferences.push(exports.ChatDocumentReference.decode(reader, reader.uint32()));
|
|
1049
|
+
continue;
|
|
1050
|
+
}
|
|
1026
1051
|
}
|
|
1027
1052
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1028
1053
|
break;
|
|
@@ -1051,9 +1076,15 @@ exports.ChatArtifactVersion = {
|
|
|
1051
1076
|
: isSet(object.created_at)
|
|
1052
1077
|
? fromJsonTimestamp(object.created_at)
|
|
1053
1078
|
: undefined,
|
|
1079
|
+
documentReferences: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.documentReferences)
|
|
1080
|
+
? object.documentReferences.map((e) => exports.ChatDocumentReference.fromJSON(e))
|
|
1081
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.document_references)
|
|
1082
|
+
? object.document_references.map((e) => exports.ChatDocumentReference.fromJSON(e))
|
|
1083
|
+
: [],
|
|
1054
1084
|
};
|
|
1055
1085
|
},
|
|
1056
1086
|
toJSON(message) {
|
|
1087
|
+
var _a;
|
|
1057
1088
|
const obj = {};
|
|
1058
1089
|
if (message.id !== "") {
|
|
1059
1090
|
obj.id = message.id;
|
|
@@ -1073,20 +1104,161 @@ exports.ChatArtifactVersion = {
|
|
|
1073
1104
|
if (message.createdAt !== undefined) {
|
|
1074
1105
|
obj.createdAt = message.createdAt.toISOString();
|
|
1075
1106
|
}
|
|
1107
|
+
if ((_a = message.documentReferences) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1108
|
+
obj.documentReferences = message.documentReferences.map((e) => exports.ChatDocumentReference.toJSON(e));
|
|
1109
|
+
}
|
|
1076
1110
|
return obj;
|
|
1077
1111
|
},
|
|
1078
1112
|
create(base) {
|
|
1079
1113
|
return exports.ChatArtifactVersion.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1080
1114
|
},
|
|
1081
1115
|
fromPartial(object) {
|
|
1082
|
-
var _a
|
|
1116
|
+
var _a;
|
|
1117
|
+
var _b, _c, _d, _e, _f, _g;
|
|
1083
1118
|
const message = createBaseChatArtifactVersion();
|
|
1084
|
-
message.id = (
|
|
1085
|
-
message.artifactId = (
|
|
1086
|
-
message.version = (
|
|
1087
|
-
message.content = (
|
|
1088
|
-
message.createdByMessageId = (
|
|
1089
|
-
message.createdAt = (
|
|
1119
|
+
message.id = (_b = object.id) !== null && _b !== void 0 ? _b : "";
|
|
1120
|
+
message.artifactId = (_c = object.artifactId) !== null && _c !== void 0 ? _c : "";
|
|
1121
|
+
message.version = (_d = object.version) !== null && _d !== void 0 ? _d : 0;
|
|
1122
|
+
message.content = (_e = object.content) !== null && _e !== void 0 ? _e : "";
|
|
1123
|
+
message.createdByMessageId = (_f = object.createdByMessageId) !== null && _f !== void 0 ? _f : "";
|
|
1124
|
+
message.createdAt = (_g = object.createdAt) !== null && _g !== void 0 ? _g : undefined;
|
|
1125
|
+
message.documentReferences = ((_a = object.documentReferences) === null || _a === void 0 ? void 0 : _a.map((e) => exports.ChatDocumentReference.fromPartial(e))) || [];
|
|
1126
|
+
return message;
|
|
1127
|
+
},
|
|
1128
|
+
};
|
|
1129
|
+
function createBaseChatDocumentReference() {
|
|
1130
|
+
return { documentId: "", documentName: "", mimeType: "", threadIds: [], sourceLocations: [] };
|
|
1131
|
+
}
|
|
1132
|
+
exports.ChatDocumentReference = {
|
|
1133
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1134
|
+
if (message.documentId !== "") {
|
|
1135
|
+
writer.uint32(10).string(message.documentId);
|
|
1136
|
+
}
|
|
1137
|
+
if (message.documentName !== "") {
|
|
1138
|
+
writer.uint32(18).string(message.documentName);
|
|
1139
|
+
}
|
|
1140
|
+
if (message.mimeType !== "") {
|
|
1141
|
+
writer.uint32(26).string(message.mimeType);
|
|
1142
|
+
}
|
|
1143
|
+
for (const v of message.threadIds) {
|
|
1144
|
+
writer.uint32(34).string(v);
|
|
1145
|
+
}
|
|
1146
|
+
for (const v of message.sourceLocations) {
|
|
1147
|
+
ingestion_pb_1.SourceLocation.encode(v, writer.uint32(42).fork()).join();
|
|
1148
|
+
}
|
|
1149
|
+
return writer;
|
|
1150
|
+
},
|
|
1151
|
+
decode(input, length) {
|
|
1152
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1153
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1154
|
+
const message = createBaseChatDocumentReference();
|
|
1155
|
+
while (reader.pos < end) {
|
|
1156
|
+
const tag = reader.uint32();
|
|
1157
|
+
switch (tag >>> 3) {
|
|
1158
|
+
case 1: {
|
|
1159
|
+
if (tag !== 10) {
|
|
1160
|
+
break;
|
|
1161
|
+
}
|
|
1162
|
+
message.documentId = reader.string();
|
|
1163
|
+
continue;
|
|
1164
|
+
}
|
|
1165
|
+
case 2: {
|
|
1166
|
+
if (tag !== 18) {
|
|
1167
|
+
break;
|
|
1168
|
+
}
|
|
1169
|
+
message.documentName = reader.string();
|
|
1170
|
+
continue;
|
|
1171
|
+
}
|
|
1172
|
+
case 3: {
|
|
1173
|
+
if (tag !== 26) {
|
|
1174
|
+
break;
|
|
1175
|
+
}
|
|
1176
|
+
message.mimeType = reader.string();
|
|
1177
|
+
continue;
|
|
1178
|
+
}
|
|
1179
|
+
case 4: {
|
|
1180
|
+
if (tag !== 34) {
|
|
1181
|
+
break;
|
|
1182
|
+
}
|
|
1183
|
+
message.threadIds.push(reader.string());
|
|
1184
|
+
continue;
|
|
1185
|
+
}
|
|
1186
|
+
case 5: {
|
|
1187
|
+
if (tag !== 42) {
|
|
1188
|
+
break;
|
|
1189
|
+
}
|
|
1190
|
+
message.sourceLocations.push(ingestion_pb_1.SourceLocation.decode(reader, reader.uint32()));
|
|
1191
|
+
continue;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1195
|
+
break;
|
|
1196
|
+
}
|
|
1197
|
+
reader.skip(tag & 7);
|
|
1198
|
+
}
|
|
1199
|
+
return message;
|
|
1200
|
+
},
|
|
1201
|
+
fromJSON(object) {
|
|
1202
|
+
return {
|
|
1203
|
+
documentId: isSet(object.documentId)
|
|
1204
|
+
? globalThis.String(object.documentId)
|
|
1205
|
+
: isSet(object.document_id)
|
|
1206
|
+
? globalThis.String(object.document_id)
|
|
1207
|
+
: "",
|
|
1208
|
+
documentName: isSet(object.documentName)
|
|
1209
|
+
? globalThis.String(object.documentName)
|
|
1210
|
+
: isSet(object.document_name)
|
|
1211
|
+
? globalThis.String(object.document_name)
|
|
1212
|
+
: "",
|
|
1213
|
+
mimeType: isSet(object.mimeType)
|
|
1214
|
+
? globalThis.String(object.mimeType)
|
|
1215
|
+
: isSet(object.mime_type)
|
|
1216
|
+
? globalThis.String(object.mime_type)
|
|
1217
|
+
: "",
|
|
1218
|
+
threadIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.threadIds)
|
|
1219
|
+
? object.threadIds.map((e) => globalThis.String(e))
|
|
1220
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.thread_ids)
|
|
1221
|
+
? object.thread_ids.map((e) => globalThis.String(e))
|
|
1222
|
+
: [],
|
|
1223
|
+
sourceLocations: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.sourceLocations)
|
|
1224
|
+
? object.sourceLocations.map((e) => ingestion_pb_1.SourceLocation.fromJSON(e))
|
|
1225
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.source_locations)
|
|
1226
|
+
? object.source_locations.map((e) => ingestion_pb_1.SourceLocation.fromJSON(e))
|
|
1227
|
+
: [],
|
|
1228
|
+
};
|
|
1229
|
+
},
|
|
1230
|
+
toJSON(message) {
|
|
1231
|
+
var _a, _b;
|
|
1232
|
+
const obj = {};
|
|
1233
|
+
if (message.documentId !== "") {
|
|
1234
|
+
obj.documentId = message.documentId;
|
|
1235
|
+
}
|
|
1236
|
+
if (message.documentName !== "") {
|
|
1237
|
+
obj.documentName = message.documentName;
|
|
1238
|
+
}
|
|
1239
|
+
if (message.mimeType !== "") {
|
|
1240
|
+
obj.mimeType = message.mimeType;
|
|
1241
|
+
}
|
|
1242
|
+
if ((_a = message.threadIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1243
|
+
obj.threadIds = message.threadIds;
|
|
1244
|
+
}
|
|
1245
|
+
if ((_b = message.sourceLocations) === null || _b === void 0 ? void 0 : _b.length) {
|
|
1246
|
+
obj.sourceLocations = message.sourceLocations.map((e) => ingestion_pb_1.SourceLocation.toJSON(e));
|
|
1247
|
+
}
|
|
1248
|
+
return obj;
|
|
1249
|
+
},
|
|
1250
|
+
create(base) {
|
|
1251
|
+
return exports.ChatDocumentReference.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1252
|
+
},
|
|
1253
|
+
fromPartial(object) {
|
|
1254
|
+
var _a, _b;
|
|
1255
|
+
var _c, _d, _e;
|
|
1256
|
+
const message = createBaseChatDocumentReference();
|
|
1257
|
+
message.documentId = (_c = object.documentId) !== null && _c !== void 0 ? _c : "";
|
|
1258
|
+
message.documentName = (_d = object.documentName) !== null && _d !== void 0 ? _d : "";
|
|
1259
|
+
message.mimeType = (_e = object.mimeType) !== null && _e !== void 0 ? _e : "";
|
|
1260
|
+
message.threadIds = ((_a = object.threadIds) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
1261
|
+
message.sourceLocations = ((_b = object.sourceLocations) === null || _b === void 0 ? void 0 : _b.map((e) => ingestion_pb_1.SourceLocation.fromPartial(e))) || [];
|
|
1090
1262
|
return message;
|
|
1091
1263
|
},
|
|
1092
1264
|
};
|
|
@@ -82,6 +82,33 @@ export declare enum TemporalValidityKind {
|
|
|
82
82
|
}
|
|
83
83
|
export declare function temporalValidityKindFromJSON(object: any): TemporalValidityKind;
|
|
84
84
|
export declare function temporalValidityKindToJSON(object: TemporalValidityKind): string;
|
|
85
|
+
export declare enum DocumentSortField {
|
|
86
|
+
DOCUMENT_SORT_FIELD_UNSPECIFIED = 0,
|
|
87
|
+
DOCUMENT_SORT_FIELD_UPLOADED_AT = 1,
|
|
88
|
+
DOCUMENT_SORT_FIELD_FILENAME = 2,
|
|
89
|
+
DOCUMENT_SORT_FIELD_THREAD_COUNT = 3,
|
|
90
|
+
UNRECOGNIZED = -1
|
|
91
|
+
}
|
|
92
|
+
export declare function documentSortFieldFromJSON(object: any): DocumentSortField;
|
|
93
|
+
export declare function documentSortFieldToJSON(object: DocumentSortField): string;
|
|
94
|
+
export declare enum SortDirection {
|
|
95
|
+
SORT_DIRECTION_UNSPECIFIED = 0,
|
|
96
|
+
SORT_DIRECTION_ASC = 1,
|
|
97
|
+
SORT_DIRECTION_DESC = 2,
|
|
98
|
+
UNRECOGNIZED = -1
|
|
99
|
+
}
|
|
100
|
+
export declare function sortDirectionFromJSON(object: any): SortDirection;
|
|
101
|
+
export declare function sortDirectionToJSON(object: SortDirection): string;
|
|
102
|
+
export declare enum DocumentSourceBlockKind {
|
|
103
|
+
DOCUMENT_SOURCE_BLOCK_KIND_UNSPECIFIED = 0,
|
|
104
|
+
DOCUMENT_SOURCE_BLOCK_KIND_TEXT = 1,
|
|
105
|
+
DOCUMENT_SOURCE_BLOCK_KIND_TABLE = 2,
|
|
106
|
+
DOCUMENT_SOURCE_BLOCK_KIND_IMAGE = 3,
|
|
107
|
+
DOCUMENT_SOURCE_BLOCK_KIND_PAGE = 4,
|
|
108
|
+
UNRECOGNIZED = -1
|
|
109
|
+
}
|
|
110
|
+
export declare function documentSourceBlockKindFromJSON(object: any): DocumentSourceBlockKind;
|
|
111
|
+
export declare function documentSourceBlockKindToJSON(object: DocumentSourceBlockKind): string;
|
|
85
112
|
export interface DocumentTag {
|
|
86
113
|
tag: string;
|
|
87
114
|
confidence: number;
|
|
@@ -151,6 +178,62 @@ export interface Document {
|
|
|
151
178
|
} | undefined;
|
|
152
179
|
sensitivityTags: string[];
|
|
153
180
|
}
|
|
181
|
+
export interface DocumentThreadCounts {
|
|
182
|
+
total: number;
|
|
183
|
+
pending: number;
|
|
184
|
+
approved: number;
|
|
185
|
+
rejected: number;
|
|
186
|
+
}
|
|
187
|
+
export interface DocumentSummary {
|
|
188
|
+
id: string;
|
|
189
|
+
organizationId: string;
|
|
190
|
+
filename: string;
|
|
191
|
+
mimeType: string;
|
|
192
|
+
fileType: string;
|
|
193
|
+
status: DocumentStatus;
|
|
194
|
+
scope: DocumentScope;
|
|
195
|
+
tags: DocumentTag[];
|
|
196
|
+
sensitivityTags: string[];
|
|
197
|
+
uploadedByUserId: string;
|
|
198
|
+
ownerDisplayName: string;
|
|
199
|
+
uploadedAt: Date | undefined;
|
|
200
|
+
updatedAt: Date | undefined;
|
|
201
|
+
pageCount: number;
|
|
202
|
+
charCount: number;
|
|
203
|
+
latestIngestionRunId: string;
|
|
204
|
+
latestIngestionStatus: IngestionRunStatus;
|
|
205
|
+
threadCounts: DocumentThreadCounts | undefined;
|
|
206
|
+
metadata: {
|
|
207
|
+
[key: string]: any;
|
|
208
|
+
} | undefined;
|
|
209
|
+
}
|
|
210
|
+
export interface DocumentActionPermissions {
|
|
211
|
+
canReviewThreads: boolean;
|
|
212
|
+
canMutateThreads: boolean;
|
|
213
|
+
canMutateTags: boolean;
|
|
214
|
+
canDeleteDocument: boolean;
|
|
215
|
+
canRetryIngestion: boolean;
|
|
216
|
+
}
|
|
217
|
+
export interface DocumentDetail {
|
|
218
|
+
document: DocumentSummary | undefined;
|
|
219
|
+
ingestionRuns: IngestionRun[];
|
|
220
|
+
threads: Thread[];
|
|
221
|
+
permissions: DocumentActionPermissions | undefined;
|
|
222
|
+
}
|
|
223
|
+
export interface DocumentSourceBlock {
|
|
224
|
+
id: string;
|
|
225
|
+
kind: DocumentSourceBlockKind;
|
|
226
|
+
sourceLocation: SourceLocation | undefined;
|
|
227
|
+
text: string;
|
|
228
|
+
table: {
|
|
229
|
+
[key: string]: any;
|
|
230
|
+
} | undefined;
|
|
231
|
+
mimeType: string;
|
|
232
|
+
pageNumber: number;
|
|
233
|
+
metadata: {
|
|
234
|
+
[key: string]: any;
|
|
235
|
+
} | undefined;
|
|
236
|
+
}
|
|
154
237
|
export interface Thread {
|
|
155
238
|
id: string;
|
|
156
239
|
organizationId: string;
|
|
@@ -247,6 +330,65 @@ export interface ListIngestionHistoryResponse {
|
|
|
247
330
|
entries: IngestionHistoryEntry[];
|
|
248
331
|
nextPageToken: string;
|
|
249
332
|
}
|
|
333
|
+
export interface ListDocumentsRequest {
|
|
334
|
+
organizationId: string;
|
|
335
|
+
actingUserId: string;
|
|
336
|
+
tags: string[];
|
|
337
|
+
restrictedTags: string[];
|
|
338
|
+
scopes: DocumentScope[];
|
|
339
|
+
statuses: DocumentStatus[];
|
|
340
|
+
ingestionStatuses: IngestionRunStatus[];
|
|
341
|
+
uploadedAfter: Date | undefined;
|
|
342
|
+
uploadedBefore: Date | undefined;
|
|
343
|
+
pageSize: number;
|
|
344
|
+
pageToken: string;
|
|
345
|
+
sortField: DocumentSortField;
|
|
346
|
+
sortDirection: SortDirection;
|
|
347
|
+
}
|
|
348
|
+
export interface ListDocumentsResponse {
|
|
349
|
+
documents: DocumentSummary[];
|
|
350
|
+
nextPageToken: string;
|
|
351
|
+
}
|
|
352
|
+
export interface GetDocumentDetailRequest {
|
|
353
|
+
organizationId: string;
|
|
354
|
+
documentId: string;
|
|
355
|
+
actingUserId: string;
|
|
356
|
+
}
|
|
357
|
+
export interface GetDocumentDetailResponse {
|
|
358
|
+
detail: DocumentDetail | undefined;
|
|
359
|
+
}
|
|
360
|
+
export interface GetDocumentSourceRequest {
|
|
361
|
+
organizationId: string;
|
|
362
|
+
documentId: string;
|
|
363
|
+
actingUserId: string;
|
|
364
|
+
}
|
|
365
|
+
export interface GetDocumentSourceResponse {
|
|
366
|
+
documentId: string;
|
|
367
|
+
filename: string;
|
|
368
|
+
mimeType: string;
|
|
369
|
+
blocks: DocumentSourceBlock[];
|
|
370
|
+
faithful: boolean;
|
|
371
|
+
fallbackMessage: string;
|
|
372
|
+
}
|
|
373
|
+
export interface UpdateDocumentTagsRequest {
|
|
374
|
+
organizationId: string;
|
|
375
|
+
documentId: string;
|
|
376
|
+
actingUserId: string;
|
|
377
|
+
addTags: string[];
|
|
378
|
+
removeTags: string[];
|
|
379
|
+
}
|
|
380
|
+
export interface UpdateDocumentTagsResponse {
|
|
381
|
+
tags: DocumentTag[];
|
|
382
|
+
}
|
|
383
|
+
export interface DeleteDocumentRequest {
|
|
384
|
+
organizationId: string;
|
|
385
|
+
documentId: string;
|
|
386
|
+
actingUserId: string;
|
|
387
|
+
reason: string;
|
|
388
|
+
}
|
|
389
|
+
export interface DeleteDocumentResponse {
|
|
390
|
+
deleted: boolean;
|
|
391
|
+
}
|
|
250
392
|
export interface RetryIngestionRequest {
|
|
251
393
|
organizationId: string;
|
|
252
394
|
ingestionRunId: string;
|
|
@@ -263,6 +405,47 @@ export interface EditThreadRequest {
|
|
|
263
405
|
threadId: string;
|
|
264
406
|
text: string;
|
|
265
407
|
}
|
|
408
|
+
export interface CreateDocumentThreadRequest {
|
|
409
|
+
organizationId: string;
|
|
410
|
+
documentId: string;
|
|
411
|
+
actingUserId: string;
|
|
412
|
+
text: string;
|
|
413
|
+
knowledgeType: string;
|
|
414
|
+
facetFields: {
|
|
415
|
+
[key: string]: any;
|
|
416
|
+
} | undefined;
|
|
417
|
+
sourceLocation: SourceLocation | undefined;
|
|
418
|
+
metadata: {
|
|
419
|
+
[key: string]: any;
|
|
420
|
+
} | undefined;
|
|
421
|
+
}
|
|
422
|
+
export interface CreateDocumentThreadResponse {
|
|
423
|
+
thread: Thread | undefined;
|
|
424
|
+
}
|
|
425
|
+
export interface UpdateDocumentThreadRequest {
|
|
426
|
+
organizationId: string;
|
|
427
|
+
documentId: string;
|
|
428
|
+
threadId: string;
|
|
429
|
+
actingUserId: string;
|
|
430
|
+
text: string;
|
|
431
|
+
sourceLocation: SourceLocation | undefined;
|
|
432
|
+
metadata: {
|
|
433
|
+
[key: string]: any;
|
|
434
|
+
} | undefined;
|
|
435
|
+
}
|
|
436
|
+
export interface UpdateDocumentThreadResponse {
|
|
437
|
+
thread: Thread | undefined;
|
|
438
|
+
}
|
|
439
|
+
export interface DeleteDocumentThreadRequest {
|
|
440
|
+
organizationId: string;
|
|
441
|
+
documentId: string;
|
|
442
|
+
threadId: string;
|
|
443
|
+
actingUserId: string;
|
|
444
|
+
reason: string;
|
|
445
|
+
}
|
|
446
|
+
export interface DeleteDocumentThreadResponse {
|
|
447
|
+
deleted: boolean;
|
|
448
|
+
}
|
|
266
449
|
export interface ApproveThreadRequest {
|
|
267
450
|
organizationId: string;
|
|
268
451
|
threadId: string;
|
|
@@ -376,6 +559,11 @@ export declare const FacetFieldDefinition: MessageFns<FacetFieldDefinition>;
|
|
|
376
559
|
export declare const FacetConfig: MessageFns<FacetConfig>;
|
|
377
560
|
export declare const Entity: MessageFns<Entity>;
|
|
378
561
|
export declare const Document: MessageFns<Document>;
|
|
562
|
+
export declare const DocumentThreadCounts: MessageFns<DocumentThreadCounts>;
|
|
563
|
+
export declare const DocumentSummary: MessageFns<DocumentSummary>;
|
|
564
|
+
export declare const DocumentActionPermissions: MessageFns<DocumentActionPermissions>;
|
|
565
|
+
export declare const DocumentDetail: MessageFns<DocumentDetail>;
|
|
566
|
+
export declare const DocumentSourceBlock: MessageFns<DocumentSourceBlock>;
|
|
379
567
|
export declare const Thread: MessageFns<Thread>;
|
|
380
568
|
export declare const IngestionRun: MessageFns<IngestionRun>;
|
|
381
569
|
export declare const IngestionHistoryEntry: MessageFns<IngestionHistoryEntry>;
|
|
@@ -385,10 +573,26 @@ export declare const StreamPipelineRequest: MessageFns<StreamPipelineRequest>;
|
|
|
385
573
|
export declare const GetIngestionRunRequest: MessageFns<GetIngestionRunRequest>;
|
|
386
574
|
export declare const ListIngestionHistoryRequest: MessageFns<ListIngestionHistoryRequest>;
|
|
387
575
|
export declare const ListIngestionHistoryResponse: MessageFns<ListIngestionHistoryResponse>;
|
|
576
|
+
export declare const ListDocumentsRequest: MessageFns<ListDocumentsRequest>;
|
|
577
|
+
export declare const ListDocumentsResponse: MessageFns<ListDocumentsResponse>;
|
|
578
|
+
export declare const GetDocumentDetailRequest: MessageFns<GetDocumentDetailRequest>;
|
|
579
|
+
export declare const GetDocumentDetailResponse: MessageFns<GetDocumentDetailResponse>;
|
|
580
|
+
export declare const GetDocumentSourceRequest: MessageFns<GetDocumentSourceRequest>;
|
|
581
|
+
export declare const GetDocumentSourceResponse: MessageFns<GetDocumentSourceResponse>;
|
|
582
|
+
export declare const UpdateDocumentTagsRequest: MessageFns<UpdateDocumentTagsRequest>;
|
|
583
|
+
export declare const UpdateDocumentTagsResponse: MessageFns<UpdateDocumentTagsResponse>;
|
|
584
|
+
export declare const DeleteDocumentRequest: MessageFns<DeleteDocumentRequest>;
|
|
585
|
+
export declare const DeleteDocumentResponse: MessageFns<DeleteDocumentResponse>;
|
|
388
586
|
export declare const RetryIngestionRequest: MessageFns<RetryIngestionRequest>;
|
|
389
587
|
export declare const RetryIngestionResponse: MessageFns<RetryIngestionResponse>;
|
|
390
588
|
export declare const GetThreadRequest: MessageFns<GetThreadRequest>;
|
|
391
589
|
export declare const EditThreadRequest: MessageFns<EditThreadRequest>;
|
|
590
|
+
export declare const CreateDocumentThreadRequest: MessageFns<CreateDocumentThreadRequest>;
|
|
591
|
+
export declare const CreateDocumentThreadResponse: MessageFns<CreateDocumentThreadResponse>;
|
|
592
|
+
export declare const UpdateDocumentThreadRequest: MessageFns<UpdateDocumentThreadRequest>;
|
|
593
|
+
export declare const UpdateDocumentThreadResponse: MessageFns<UpdateDocumentThreadResponse>;
|
|
594
|
+
export declare const DeleteDocumentThreadRequest: MessageFns<DeleteDocumentThreadRequest>;
|
|
595
|
+
export declare const DeleteDocumentThreadResponse: MessageFns<DeleteDocumentThreadResponse>;
|
|
392
596
|
export declare const ApproveThreadRequest: MessageFns<ApproveThreadRequest>;
|
|
393
597
|
export declare const RejectThreadRequest: MessageFns<RejectThreadRequest>;
|
|
394
598
|
export declare const BulkApproveThreadsRequest: MessageFns<BulkApproveThreadsRequest>;
|