weave-typescript 0.27.0 → 0.28.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.
@@ -0,0 +1,433 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "weaveapi.ingestion.v1";
3
+ export declare enum DocumentStatus {
4
+ DOCUMENT_STATUS_UNSPECIFIED = 0,
5
+ DOCUMENT_STATUS_UPLOADING = 1,
6
+ DOCUMENT_STATUS_PARSING = 2,
7
+ DOCUMENT_STATUS_PARSED = 3,
8
+ DOCUMENT_STATUS_CLASSIFIED = 4,
9
+ DOCUMENT_STATUS_EXTRACTING = 5,
10
+ DOCUMENT_STATUS_RECONCILING = 6,
11
+ DOCUMENT_STATUS_REVIEW_PENDING = 7,
12
+ DOCUMENT_STATUS_COMMITTED = 8,
13
+ DOCUMENT_STATUS_FAILED = 9,
14
+ DOCUMENT_STATUS_STALE = 10,
15
+ UNRECOGNIZED = -1
16
+ }
17
+ export declare function documentStatusFromJSON(object: any): DocumentStatus;
18
+ export declare function documentStatusToJSON(object: DocumentStatus): string;
19
+ export declare enum DocumentScope {
20
+ DOCUMENT_SCOPE_UNSPECIFIED = 0,
21
+ DOCUMENT_SCOPE_ORG = 1,
22
+ DOCUMENT_SCOPE_RESTRICTED = 2,
23
+ DOCUMENT_SCOPE_PRIVATE = 3,
24
+ UNRECOGNIZED = -1
25
+ }
26
+ export declare function documentScopeFromJSON(object: any): DocumentScope;
27
+ export declare function documentScopeToJSON(object: DocumentScope): string;
28
+ export declare enum IngestionRunStatus {
29
+ INGESTION_RUN_STATUS_UNSPECIFIED = 0,
30
+ INGESTION_RUN_STATUS_STARTED = 1,
31
+ INGESTION_RUN_STATUS_PARSING = 2,
32
+ INGESTION_RUN_STATUS_CLASSIFYING = 3,
33
+ INGESTION_RUN_STATUS_EXTRACTING = 4,
34
+ INGESTION_RUN_STATUS_EMBEDDING = 5,
35
+ INGESTION_RUN_STATUS_RECONCILING = 6,
36
+ INGESTION_RUN_STATUS_DIFFING = 7,
37
+ INGESTION_RUN_STATUS_REVIEW_PENDING = 8,
38
+ INGESTION_RUN_STATUS_COMMITTED = 9,
39
+ INGESTION_RUN_STATUS_FAILED = 10,
40
+ UNRECOGNIZED = -1
41
+ }
42
+ export declare function ingestionRunStatusFromJSON(object: any): IngestionRunStatus;
43
+ export declare function ingestionRunStatusToJSON(object: IngestionRunStatus): string;
44
+ export declare enum ThreadClassification {
45
+ THREAD_CLASSIFICATION_UNSPECIFIED = 0,
46
+ THREAD_CLASSIFICATION_NEW = 1,
47
+ THREAD_CLASSIFICATION_REINFORCES = 2,
48
+ THREAD_CLASSIFICATION_SUPERSEDES = 3,
49
+ UNRECOGNIZED = -1
50
+ }
51
+ export declare function threadClassificationFromJSON(object: any): ThreadClassification;
52
+ export declare function threadClassificationToJSON(object: ThreadClassification): string;
53
+ export declare enum ThreadRetrievalStatus {
54
+ THREAD_RETRIEVAL_STATUS_UNSPECIFIED = 0,
55
+ THREAD_RETRIEVAL_STATUS_PENDING = 1,
56
+ THREAD_RETRIEVAL_STATUS_APPROVED = 2,
57
+ THREAD_RETRIEVAL_STATUS_REJECTED = 3,
58
+ THREAD_RETRIEVAL_STATUS_SUPERSEDED = 4,
59
+ UNRECOGNIZED = -1
60
+ }
61
+ export declare function threadRetrievalStatusFromJSON(object: any): ThreadRetrievalStatus;
62
+ export declare function threadRetrievalStatusToJSON(object: ThreadRetrievalStatus): string;
63
+ export declare enum ThreadActivityAction {
64
+ THREAD_ACTIVITY_ACTION_UNSPECIFIED = 0,
65
+ THREAD_ACTIVITY_ACTION_CREATED = 1,
66
+ THREAD_ACTIVITY_ACTION_EDITED = 2,
67
+ THREAD_ACTIVITY_ACTION_APPROVED = 3,
68
+ THREAD_ACTIVITY_ACTION_REJECTED = 4,
69
+ THREAD_ACTIVITY_ACTION_SUPERSEDED = 5,
70
+ THREAD_ACTIVITY_ACTION_BULK_APPROVED = 6,
71
+ THREAD_ACTIVITY_ACTION_BULK_REJECTED = 7,
72
+ UNRECOGNIZED = -1
73
+ }
74
+ export declare function threadActivityActionFromJSON(object: any): ThreadActivityAction;
75
+ export declare function threadActivityActionToJSON(object: ThreadActivityAction): string;
76
+ export declare enum TemporalValidityKind {
77
+ TEMPORAL_VALIDITY_KIND_UNSPECIFIED = 0,
78
+ TEMPORAL_VALIDITY_KIND_UNKNOWN = 1,
79
+ TEMPORAL_VALIDITY_KIND_PERMANENT = 2,
80
+ TEMPORAL_VALIDITY_KIND_TIME_BOUND = 3,
81
+ UNRECOGNIZED = -1
82
+ }
83
+ export declare function temporalValidityKindFromJSON(object: any): TemporalValidityKind;
84
+ export declare function temporalValidityKindToJSON(object: TemporalValidityKind): string;
85
+ export interface DocumentTag {
86
+ tag: string;
87
+ confidence: number;
88
+ }
89
+ export interface SensitivityTagDefinition {
90
+ organizationId: string;
91
+ slug: string;
92
+ label: string;
93
+ description: string;
94
+ extractionHint: string;
95
+ active: boolean;
96
+ createdAt: Date | undefined;
97
+ updatedAt: Date | undefined;
98
+ }
99
+ export interface UserSensitivityClearance {
100
+ organizationId: string;
101
+ userId: string;
102
+ sensitivityTagSlug: string;
103
+ createdAt: Date | undefined;
104
+ }
105
+ export interface SourceLocation {
106
+ type: string;
107
+ value: any | undefined;
108
+ }
109
+ export interface TemporalValidity {
110
+ kind: TemporalValidityKind;
111
+ validFrom: Date | undefined;
112
+ validUntil: Date | undefined;
113
+ }
114
+ export interface FacetFieldDefinition {
115
+ name: string;
116
+ type: string;
117
+ }
118
+ export interface FacetConfig {
119
+ organizationId: string;
120
+ knowledgeType: string;
121
+ label: string;
122
+ extractionHint: string;
123
+ requiredFields: FacetFieldDefinition[];
124
+ active: boolean;
125
+ }
126
+ export interface Entity {
127
+ id: string;
128
+ name: string;
129
+ type: string;
130
+ canonical: string;
131
+ metadata: {
132
+ [key: string]: any;
133
+ } | undefined;
134
+ }
135
+ export interface Document {
136
+ id: string;
137
+ organizationId: string;
138
+ filename: string;
139
+ mimeType: string;
140
+ parserName: string;
141
+ status: DocumentStatus;
142
+ uploadedByUserId: string;
143
+ uploadedAt: Date | undefined;
144
+ updatedAt: Date | undefined;
145
+ scope: DocumentScope;
146
+ pageCount: number;
147
+ charCount: number;
148
+ tags: DocumentTag[];
149
+ metadata: {
150
+ [key: string]: any;
151
+ } | undefined;
152
+ sensitivityTags: string[];
153
+ }
154
+ export interface Thread {
155
+ id: string;
156
+ organizationId: string;
157
+ documentId: string;
158
+ documentName: string;
159
+ ingestionRunId: string;
160
+ text: string;
161
+ textOriginal: string;
162
+ knowledgeType: string;
163
+ facetFields: {
164
+ [key: string]: any;
165
+ } | undefined;
166
+ confidence: number;
167
+ temporalValidity: TemporalValidity | undefined;
168
+ classification: ThreadClassification;
169
+ retrievalStatus: ThreadRetrievalStatus;
170
+ sourceLocation: SourceLocation | undefined;
171
+ supersedesThreadIds: string[];
172
+ supersededByThreadId: string;
173
+ clusterId: string;
174
+ extractedAt: Date | undefined;
175
+ approvedAt: Date | undefined;
176
+ approvedByUserId: string;
177
+ edited: boolean;
178
+ metadata: {
179
+ [key: string]: any;
180
+ } | undefined;
181
+ entities: Entity[];
182
+ }
183
+ export interface IngestionRun {
184
+ id: string;
185
+ organizationId: string;
186
+ documentId: string;
187
+ documentName: string;
188
+ status: IngestionRunStatus;
189
+ threadCount: number;
190
+ pendingCount: number;
191
+ approvedCount: number;
192
+ rejectedCount: number;
193
+ error: string;
194
+ tokenUsage: {
195
+ [key: string]: any;
196
+ } | undefined;
197
+ startedAt: Date | undefined;
198
+ completedAt: Date | undefined;
199
+ committedAt: Date | undefined;
200
+ threads: Thread[];
201
+ }
202
+ export interface IngestionHistoryEntry {
203
+ ingestionRunId: string;
204
+ documentId: string;
205
+ documentName: string;
206
+ documentStatus: DocumentStatus;
207
+ ingestionStatus: IngestionRunStatus;
208
+ threadCount: number;
209
+ pendingCount: number;
210
+ approvedCount: number;
211
+ rejectedCount: number;
212
+ tags: DocumentTag[];
213
+ uploadedAt: Date | undefined;
214
+ startedAt: Date | undefined;
215
+ completedAt: Date | undefined;
216
+ committedAt: Date | undefined;
217
+ }
218
+ export interface UploadFileRequest {
219
+ organizationId: string;
220
+ filename: string;
221
+ mimeType: string;
222
+ content: Uint8Array;
223
+ metadata: {
224
+ [key: string]: any;
225
+ } | undefined;
226
+ }
227
+ export interface UploadFileResponse {
228
+ document: Document | undefined;
229
+ ingestionRun: IngestionRun | undefined;
230
+ }
231
+ export interface StreamPipelineRequest {
232
+ organizationId: string;
233
+ ingestionRunId: string;
234
+ }
235
+ export interface GetIngestionRunRequest {
236
+ organizationId: string;
237
+ ingestionRunId: string;
238
+ }
239
+ export interface ListIngestionHistoryRequest {
240
+ organizationId: string;
241
+ documentStatusFilter: DocumentStatus;
242
+ ingestionStatusFilter: IngestionRunStatus;
243
+ pageSize: number;
244
+ pageToken: string;
245
+ }
246
+ export interface ListIngestionHistoryResponse {
247
+ entries: IngestionHistoryEntry[];
248
+ nextPageToken: string;
249
+ }
250
+ export interface RetryIngestionRequest {
251
+ organizationId: string;
252
+ ingestionRunId: string;
253
+ }
254
+ export interface RetryIngestionResponse {
255
+ ingestionRun: IngestionRun | undefined;
256
+ }
257
+ export interface GetThreadRequest {
258
+ organizationId: string;
259
+ threadId: string;
260
+ }
261
+ export interface EditThreadRequest {
262
+ organizationId: string;
263
+ threadId: string;
264
+ text: string;
265
+ }
266
+ export interface ApproveThreadRequest {
267
+ organizationId: string;
268
+ threadId: string;
269
+ }
270
+ export interface RejectThreadRequest {
271
+ organizationId: string;
272
+ threadId: string;
273
+ reason: string;
274
+ }
275
+ export interface BulkApproveThreadsRequest {
276
+ organizationId: string;
277
+ ingestionRunId: string;
278
+ threadIds: string[];
279
+ approveAllPending: boolean;
280
+ }
281
+ export interface BulkApproveThreadsResponse {
282
+ threads: Thread[];
283
+ }
284
+ export interface BulkRejectThreadsRequest {
285
+ organizationId: string;
286
+ ingestionRunId: string;
287
+ threadIds: string[];
288
+ rejectAllPending: boolean;
289
+ reason: string;
290
+ }
291
+ export interface BulkRejectThreadsResponse {
292
+ threads: Thread[];
293
+ }
294
+ export interface StreamPipelineResponse {
295
+ event: PipelineEvent | undefined;
296
+ }
297
+ export interface GetIngestionRunResponse {
298
+ ingestionRun: IngestionRun | undefined;
299
+ }
300
+ export interface GetThreadResponse {
301
+ thread: Thread | undefined;
302
+ }
303
+ export interface EditThreadResponse {
304
+ thread: Thread | undefined;
305
+ }
306
+ export interface ApproveThreadResponse {
307
+ thread: Thread | undefined;
308
+ }
309
+ export interface RejectThreadResponse {
310
+ thread: Thread | undefined;
311
+ }
312
+ export interface PipelineEvent {
313
+ eventId: string;
314
+ ingestionRunId: string;
315
+ parseStarted?: PipelineEvent_ParseStarted | undefined;
316
+ parseComplete?: PipelineEvent_ParseComplete | undefined;
317
+ classifyTag?: PipelineEvent_ClassifyTag | undefined;
318
+ extractThread?: PipelineEvent_ExtractThread | undefined;
319
+ embedStarted?: PipelineEvent_EmbedStarted | undefined;
320
+ embedComplete?: PipelineEvent_EmbedComplete | undefined;
321
+ reconcileMatch?: PipelineEvent_ReconcileMatch | undefined;
322
+ diffDecision?: PipelineEvent_DiffDecision | undefined;
323
+ pipelineComplete?: PipelineEvent_PipelineComplete | undefined;
324
+ pipelineFailed?: PipelineEvent_PipelineFailed | undefined;
325
+ }
326
+ export interface PipelineEvent_ParseStarted {
327
+ filename: string;
328
+ mime: string;
329
+ }
330
+ export interface PipelineEvent_ParseComplete {
331
+ pageCount: number;
332
+ charCount: number;
333
+ }
334
+ export interface PipelineEvent_ClassifyTag {
335
+ tag: string;
336
+ confidence: number;
337
+ }
338
+ export interface PipelineEvent_ExtractThread {
339
+ threadId: string;
340
+ text: string;
341
+ entities: string[];
342
+ sourceLocation: SourceLocation | undefined;
343
+ }
344
+ export interface PipelineEvent_EmbedStarted {
345
+ threadCount: number;
346
+ }
347
+ export interface PipelineEvent_EmbedComplete {
348
+ threadCount: number;
349
+ model: string;
350
+ dimensions: number;
351
+ }
352
+ export interface PipelineEvent_ReconcileMatch {
353
+ threadId: string;
354
+ existingThreadId: string;
355
+ similarity: number;
356
+ }
357
+ export interface PipelineEvent_DiffDecision {
358
+ threadId: string;
359
+ decision: ThreadClassification;
360
+ supersededThreadIds: string[];
361
+ }
362
+ export interface PipelineEvent_PipelineComplete {
363
+ threadCount: number;
364
+ pendingReviewCount: number;
365
+ }
366
+ export interface PipelineEvent_PipelineFailed {
367
+ error: string;
368
+ code: string;
369
+ }
370
+ export declare const DocumentTag: MessageFns<DocumentTag>;
371
+ export declare const SensitivityTagDefinition: MessageFns<SensitivityTagDefinition>;
372
+ export declare const UserSensitivityClearance: MessageFns<UserSensitivityClearance>;
373
+ export declare const SourceLocation: MessageFns<SourceLocation>;
374
+ export declare const TemporalValidity: MessageFns<TemporalValidity>;
375
+ export declare const FacetFieldDefinition: MessageFns<FacetFieldDefinition>;
376
+ export declare const FacetConfig: MessageFns<FacetConfig>;
377
+ export declare const Entity: MessageFns<Entity>;
378
+ export declare const Document: MessageFns<Document>;
379
+ export declare const Thread: MessageFns<Thread>;
380
+ export declare const IngestionRun: MessageFns<IngestionRun>;
381
+ export declare const IngestionHistoryEntry: MessageFns<IngestionHistoryEntry>;
382
+ export declare const UploadFileRequest: MessageFns<UploadFileRequest>;
383
+ export declare const UploadFileResponse: MessageFns<UploadFileResponse>;
384
+ export declare const StreamPipelineRequest: MessageFns<StreamPipelineRequest>;
385
+ export declare const GetIngestionRunRequest: MessageFns<GetIngestionRunRequest>;
386
+ export declare const ListIngestionHistoryRequest: MessageFns<ListIngestionHistoryRequest>;
387
+ export declare const ListIngestionHistoryResponse: MessageFns<ListIngestionHistoryResponse>;
388
+ export declare const RetryIngestionRequest: MessageFns<RetryIngestionRequest>;
389
+ export declare const RetryIngestionResponse: MessageFns<RetryIngestionResponse>;
390
+ export declare const GetThreadRequest: MessageFns<GetThreadRequest>;
391
+ export declare const EditThreadRequest: MessageFns<EditThreadRequest>;
392
+ export declare const ApproveThreadRequest: MessageFns<ApproveThreadRequest>;
393
+ export declare const RejectThreadRequest: MessageFns<RejectThreadRequest>;
394
+ export declare const BulkApproveThreadsRequest: MessageFns<BulkApproveThreadsRequest>;
395
+ export declare const BulkApproveThreadsResponse: MessageFns<BulkApproveThreadsResponse>;
396
+ export declare const BulkRejectThreadsRequest: MessageFns<BulkRejectThreadsRequest>;
397
+ export declare const BulkRejectThreadsResponse: MessageFns<BulkRejectThreadsResponse>;
398
+ export declare const StreamPipelineResponse: MessageFns<StreamPipelineResponse>;
399
+ export declare const GetIngestionRunResponse: MessageFns<GetIngestionRunResponse>;
400
+ export declare const GetThreadResponse: MessageFns<GetThreadResponse>;
401
+ export declare const EditThreadResponse: MessageFns<EditThreadResponse>;
402
+ export declare const ApproveThreadResponse: MessageFns<ApproveThreadResponse>;
403
+ export declare const RejectThreadResponse: MessageFns<RejectThreadResponse>;
404
+ export declare const PipelineEvent: MessageFns<PipelineEvent>;
405
+ export declare const PipelineEvent_ParseStarted: MessageFns<PipelineEvent_ParseStarted>;
406
+ export declare const PipelineEvent_ParseComplete: MessageFns<PipelineEvent_ParseComplete>;
407
+ export declare const PipelineEvent_ClassifyTag: MessageFns<PipelineEvent_ClassifyTag>;
408
+ export declare const PipelineEvent_ExtractThread: MessageFns<PipelineEvent_ExtractThread>;
409
+ export declare const PipelineEvent_EmbedStarted: MessageFns<PipelineEvent_EmbedStarted>;
410
+ export declare const PipelineEvent_EmbedComplete: MessageFns<PipelineEvent_EmbedComplete>;
411
+ export declare const PipelineEvent_ReconcileMatch: MessageFns<PipelineEvent_ReconcileMatch>;
412
+ export declare const PipelineEvent_DiffDecision: MessageFns<PipelineEvent_DiffDecision>;
413
+ export declare const PipelineEvent_PipelineComplete: MessageFns<PipelineEvent_PipelineComplete>;
414
+ export declare const PipelineEvent_PipelineFailed: MessageFns<PipelineEvent_PipelineFailed>;
415
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
416
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
417
+ [K in keyof T]?: DeepPartial<T[K]>;
418
+ } : Partial<T>;
419
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
420
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
421
+ [K in keyof P]: Exact<P[K], I[K]>;
422
+ } & {
423
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
424
+ };
425
+ export interface MessageFns<T> {
426
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
427
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
428
+ fromJSON(object: any): T;
429
+ toJSON(message: T): unknown;
430
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
431
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
432
+ }
433
+ export {};