@knowledge-stack/ksapi 3.6.2 → 3.8.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/.openapi-generator/FILES +0 -4
- package/README.md +2 -4
- package/dist/apis/DocumentsApi.d.ts +4 -7
- package/dist/apis/DocumentsApi.js +2 -5
- package/dist/apis/SystemJobsApi.d.ts +4 -4
- package/dist/apis/SystemJobsApi.js +2 -2
- package/dist/esm/apis/DocumentsApi.d.ts +4 -7
- package/dist/esm/apis/DocumentsApi.js +2 -5
- package/dist/esm/apis/SystemJobsApi.d.ts +4 -4
- package/dist/esm/apis/SystemJobsApi.js +2 -2
- package/dist/esm/models/AskRequest.d.ts +7 -0
- package/dist/esm/models/AskRequest.js +3 -0
- package/dist/esm/models/DocumentVersionMetadata.d.ts +0 -7
- package/dist/esm/models/DocumentVersionMetadata.js +0 -3
- package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +0 -7
- package/dist/esm/models/DocumentVersionMetadataUpdate.js +0 -3
- package/dist/esm/models/IngestDocumentResponse.d.ts +0 -18
- package/dist/esm/models/IngestDocumentResponse.js +0 -6
- package/dist/esm/models/PipelineState.d.ts +8 -1
- package/dist/esm/models/PipelineState.js +3 -0
- package/dist/esm/models/UploadFormat.d.ts +6 -0
- package/dist/esm/models/UploadFormat.js +4 -0
- package/dist/esm/models/UserMessageRequest.d.ts +7 -0
- package/dist/esm/models/UserMessageRequest.js +3 -0
- package/dist/esm/models/index.d.ts +0 -2
- package/dist/esm/models/index.js +0 -2
- package/dist/models/AskRequest.d.ts +7 -0
- package/dist/models/AskRequest.js +3 -0
- package/dist/models/DocumentVersionMetadata.d.ts +0 -7
- package/dist/models/DocumentVersionMetadata.js +0 -3
- package/dist/models/DocumentVersionMetadataUpdate.d.ts +0 -7
- package/dist/models/DocumentVersionMetadataUpdate.js +0 -3
- package/dist/models/IngestDocumentResponse.d.ts +0 -18
- package/dist/models/IngestDocumentResponse.js +0 -6
- package/dist/models/PipelineState.d.ts +8 -1
- package/dist/models/PipelineState.js +3 -0
- package/dist/models/UploadFormat.d.ts +6 -0
- package/dist/models/UploadFormat.js +4 -0
- package/dist/models/UserMessageRequest.d.ts +7 -0
- package/dist/models/UserMessageRequest.js +3 -0
- package/dist/models/index.d.ts +0 -2
- package/dist/models/index.js +0 -2
- package/docs/AskRequest.md +2 -0
- package/docs/DocumentVersionMetadata.md +0 -2
- package/docs/DocumentVersionMetadataUpdate.md +0 -2
- package/docs/DocumentsApi.md +2 -5
- package/docs/IngestDocumentResponse.md +0 -6
- package/docs/PipelineState.md +2 -0
- package/docs/SystemJobsApi.md +1 -1
- package/docs/UploadFormat.md +2 -0
- package/docs/UserMessageRequest.md +2 -0
- package/package.json +1 -1
- package/src/apis/DocumentsApi.ts +4 -11
- package/src/apis/SystemJobsApi.ts +4 -4
- package/src/models/AskRequest.ts +18 -0
- package/src/models/DocumentVersionMetadata.ts +0 -15
- package/src/models/DocumentVersionMetadataUpdate.ts +0 -15
- package/src/models/IngestDocumentResponse.ts +0 -24
- package/src/models/PipelineState.ts +16 -1
- package/src/models/UploadFormat.ts +9 -0
- package/src/models/UserMessageRequest.ts +18 -0
- package/src/models/index.ts +0 -2
- package/dist/esm/models/EmailMetadata.d.ts +0 -119
- package/dist/esm/models/EmailMetadata.js +0 -65
- package/dist/esm/models/EmailParty.d.ts +0 -53
- package/dist/esm/models/EmailParty.js +0 -46
- package/dist/models/EmailMetadata.d.ts +0 -119
- package/dist/models/EmailMetadata.js +0 -73
- package/dist/models/EmailParty.d.ts +0 -53
- package/dist/models/EmailParty.js +0 -54
- package/docs/EmailMetadata.md +0 -57
- package/docs/EmailParty.md +0 -37
- package/src/models/EmailMetadata.ts +0 -183
- package/src/models/EmailParty.ts +0 -91
|
@@ -27,6 +27,12 @@ export interface UploadFormat {
|
|
|
27
27
|
* @memberof UploadFormat
|
|
28
28
|
*/
|
|
29
29
|
contentType: string;
|
|
30
|
+
/**
|
|
31
|
+
* Largest file of this format the buffered uploads accept (new document, new version, ZIP member, workflow-run file). A new audio/video document uses the resumable upload, capped at upload.max_media_bytes
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof UploadFormat
|
|
34
|
+
*/
|
|
35
|
+
maxBytes: number;
|
|
30
36
|
}
|
|
31
37
|
export declare const UploadFormatPropertyValidationAttributesMap: {
|
|
32
38
|
[property: string]: {
|
|
@@ -20,6 +20,8 @@ export function instanceOfUploadFormat(value) {
|
|
|
20
20
|
return false;
|
|
21
21
|
if (!('contentType' in value) || value['contentType'] === undefined)
|
|
22
22
|
return false;
|
|
23
|
+
if (!('maxBytes' in value) || value['maxBytes'] === undefined)
|
|
24
|
+
return false;
|
|
23
25
|
return true;
|
|
24
26
|
}
|
|
25
27
|
export function UploadFormatFromJSON(json) {
|
|
@@ -32,6 +34,7 @@ export function UploadFormatFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
32
34
|
return {
|
|
33
35
|
'extension': json['extension'],
|
|
34
36
|
'contentType': json['content_type'],
|
|
37
|
+
'maxBytes': json['max_bytes'],
|
|
35
38
|
};
|
|
36
39
|
}
|
|
37
40
|
export function UploadFormatToJSON(json) {
|
|
@@ -44,5 +47,6 @@ export function UploadFormatToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
44
47
|
return {
|
|
45
48
|
'extension': value['extension'],
|
|
46
49
|
'content_type': value['contentType'],
|
|
50
|
+
'max_bytes': value['maxBytes'],
|
|
47
51
|
};
|
|
48
52
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { SupportedLanguage } from './SupportedLanguage';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -27,6 +28,12 @@ export interface UserMessageRequest {
|
|
|
27
28
|
* @memberof UserMessageRequest
|
|
28
29
|
*/
|
|
29
30
|
fastMode?: boolean | null;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {SupportedLanguage}
|
|
34
|
+
* @memberof UserMessageRequest
|
|
35
|
+
*/
|
|
36
|
+
outputLanguage?: SupportedLanguage;
|
|
30
37
|
}
|
|
31
38
|
export declare const UserMessageRequestPropertyValidationAttributesMap: {
|
|
32
39
|
[property: string]: {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { SupportedLanguageFromJSON, SupportedLanguageToJSON, } from './SupportedLanguage';
|
|
14
15
|
export const UserMessageRequestPropertyValidationAttributesMap = {};
|
|
15
16
|
/**
|
|
16
17
|
* Check if a given object implements the UserMessageRequest interface.
|
|
@@ -28,6 +29,7 @@ export function UserMessageRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
28
29
|
return {
|
|
29
30
|
'inputText': json['input_text'] == null ? undefined : json['input_text'],
|
|
30
31
|
'fastMode': json['fast_mode'] == null ? undefined : json['fast_mode'],
|
|
32
|
+
'outputLanguage': json['output_language'] == null ? undefined : SupportedLanguageFromJSON(json['output_language']),
|
|
31
33
|
};
|
|
32
34
|
}
|
|
33
35
|
export function UserMessageRequestToJSON(json) {
|
|
@@ -40,5 +42,6 @@ export function UserMessageRequestToJSONTyped(value, ignoreDiscriminator = false
|
|
|
40
42
|
return {
|
|
41
43
|
'input_text': value['inputText'],
|
|
42
44
|
'fast_mode': value['fastMode'],
|
|
45
|
+
'output_language': SupportedLanguageToJSON(value['outputLanguage']),
|
|
43
46
|
};
|
|
44
47
|
}
|
|
@@ -132,8 +132,6 @@ export * from './DocxParagraphAnchorInput';
|
|
|
132
132
|
export * from './DocxParagraphAnchorOutput';
|
|
133
133
|
export * from './DownloadArtifact';
|
|
134
134
|
export * from './EditMemoryChunkRequest';
|
|
135
|
-
export * from './EmailMetadata';
|
|
136
|
-
export * from './EmailParty';
|
|
137
135
|
export * from './EmailSentResponse';
|
|
138
136
|
export * from './EmailVerificationRequest';
|
|
139
137
|
export * from './EnrichedCitation';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -134,8 +134,6 @@ export * from './DocxParagraphAnchorInput';
|
|
|
134
134
|
export * from './DocxParagraphAnchorOutput';
|
|
135
135
|
export * from './DownloadArtifact';
|
|
136
136
|
export * from './EditMemoryChunkRequest';
|
|
137
|
-
export * from './EmailMetadata';
|
|
138
|
-
export * from './EmailParty';
|
|
139
137
|
export * from './EmailSentResponse';
|
|
140
138
|
export * from './EmailVerificationRequest';
|
|
141
139
|
export * from './EnrichedCitation';
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { SupportedLanguage } from './SupportedLanguage';
|
|
12
13
|
/**
|
|
13
14
|
* Request body for POST /v1/agent/ask.
|
|
14
15
|
* @export
|
|
@@ -21,6 +22,12 @@ export interface AskRequest {
|
|
|
21
22
|
* @memberof AskRequest
|
|
22
23
|
*/
|
|
23
24
|
prompt: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {SupportedLanguage}
|
|
28
|
+
* @memberof AskRequest
|
|
29
|
+
*/
|
|
30
|
+
outputLanguage?: SupportedLanguage;
|
|
24
31
|
}
|
|
25
32
|
export declare const AskRequestPropertyValidationAttributesMap: {
|
|
26
33
|
[property: string]: {
|
|
@@ -19,6 +19,7 @@ exports.AskRequestFromJSON = AskRequestFromJSON;
|
|
|
19
19
|
exports.AskRequestFromJSONTyped = AskRequestFromJSONTyped;
|
|
20
20
|
exports.AskRequestToJSON = AskRequestToJSON;
|
|
21
21
|
exports.AskRequestToJSONTyped = AskRequestToJSONTyped;
|
|
22
|
+
const SupportedLanguage_1 = require("./SupportedLanguage");
|
|
22
23
|
exports.AskRequestPropertyValidationAttributesMap = {};
|
|
23
24
|
/**
|
|
24
25
|
* Check if a given object implements the AskRequest interface.
|
|
@@ -37,6 +38,7 @@ function AskRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
38
|
}
|
|
38
39
|
return {
|
|
39
40
|
'prompt': json['prompt'],
|
|
41
|
+
'outputLanguage': json['output_language'] == null ? undefined : (0, SupportedLanguage_1.SupportedLanguageFromJSON)(json['output_language']),
|
|
40
42
|
};
|
|
41
43
|
}
|
|
42
44
|
function AskRequestToJSON(json) {
|
|
@@ -48,5 +50,6 @@ function AskRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
48
50
|
}
|
|
49
51
|
return {
|
|
50
52
|
'prompt': value['prompt'],
|
|
53
|
+
'output_language': (0, SupportedLanguage_1.SupportedLanguageToJSON)(value['outputLanguage']),
|
|
51
54
|
};
|
|
52
55
|
}
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
import type { PipelineState } from './PipelineState';
|
|
13
13
|
import type { XlsxCellAnchorOutputOrDocxParagraphAnchorOutput } from './XlsxCellAnchorOutputOrDocxParagraphAnchorOutput';
|
|
14
14
|
import type { InformationStatistics } from './InformationStatistics';
|
|
15
|
-
import type { EmailMetadata } from './EmailMetadata';
|
|
16
15
|
/**
|
|
17
16
|
* Schema for document_version.system_metadata JSONB field.
|
|
18
17
|
*
|
|
@@ -112,12 +111,6 @@ export interface DocumentVersionMetadata {
|
|
|
112
111
|
* @memberof DocumentVersionMetadata
|
|
113
112
|
*/
|
|
114
113
|
segmentCount?: number | null;
|
|
115
|
-
/**
|
|
116
|
-
* Structured email headers; null for non-email documents
|
|
117
|
-
* @type {EmailMetadata}
|
|
118
|
-
* @memberof DocumentVersionMetadata
|
|
119
|
-
*/
|
|
120
|
-
email?: EmailMetadata | null;
|
|
121
114
|
/**
|
|
122
115
|
* Total formula cells in the workbook (XLSX only)
|
|
123
116
|
* @type {number}
|
|
@@ -22,7 +22,6 @@ exports.DocumentVersionMetadataToJSONTyped = DocumentVersionMetadataToJSONTyped;
|
|
|
22
22
|
const PipelineState_1 = require("./PipelineState");
|
|
23
23
|
const XlsxCellAnchorOutputOrDocxParagraphAnchorOutput_1 = require("./XlsxCellAnchorOutputOrDocxParagraphAnchorOutput");
|
|
24
24
|
const InformationStatistics_1 = require("./InformationStatistics");
|
|
25
|
-
const EmailMetadata_1 = require("./EmailMetadata");
|
|
26
25
|
exports.DocumentVersionMetadataPropertyValidationAttributesMap = {};
|
|
27
26
|
/**
|
|
28
27
|
* Check if a given object implements the DocumentVersionMetadata interface.
|
|
@@ -52,7 +51,6 @@ function DocumentVersionMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
52
51
|
'durationMs': json['duration_ms'] == null ? undefined : json['duration_ms'],
|
|
53
52
|
'language': json['language'] == null ? undefined : json['language'],
|
|
54
53
|
'segmentCount': json['segment_count'] == null ? undefined : json['segment_count'],
|
|
55
|
-
'email': json['email'] == null ? undefined : (0, EmailMetadata_1.EmailMetadataFromJSON)(json['email']),
|
|
56
54
|
'totalFormulas': json['total_formulas'] == null ? undefined : json['total_formulas'],
|
|
57
55
|
'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
|
|
58
56
|
'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
|
|
@@ -89,7 +87,6 @@ function DocumentVersionMetadataToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
89
87
|
'duration_ms': value['durationMs'],
|
|
90
88
|
'language': value['language'],
|
|
91
89
|
'segment_count': value['segmentCount'],
|
|
92
|
-
'email': (0, EmailMetadata_1.EmailMetadataToJSON)(value['email']),
|
|
93
90
|
'total_formulas': value['totalFormulas'],
|
|
94
91
|
'xlsx_parse_result_s3': value['xlsxParseResultS3'],
|
|
95
92
|
'xlsx_named_ranges': value['xlsxNamedRanges'],
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
import type { PipelineState } from './PipelineState';
|
|
13
13
|
import type { XlsxCellAnchorInputOrDocxParagraphAnchorInput } from './XlsxCellAnchorInputOrDocxParagraphAnchorInput';
|
|
14
14
|
import type { InformationStatistics } from './InformationStatistics';
|
|
15
|
-
import type { EmailMetadata } from './EmailMetadata';
|
|
16
15
|
/**
|
|
17
16
|
* Partial update schema for document version metadata.
|
|
18
17
|
*
|
|
@@ -124,12 +123,6 @@ export interface DocumentVersionMetadataUpdate {
|
|
|
124
123
|
* @memberof DocumentVersionMetadataUpdate
|
|
125
124
|
*/
|
|
126
125
|
segmentCount?: number | null;
|
|
127
|
-
/**
|
|
128
|
-
*
|
|
129
|
-
* @type {EmailMetadata}
|
|
130
|
-
* @memberof DocumentVersionMetadataUpdate
|
|
131
|
-
*/
|
|
132
|
-
email?: EmailMetadata | null;
|
|
133
126
|
/**
|
|
134
127
|
*
|
|
135
128
|
* @type {number}
|
|
@@ -22,7 +22,6 @@ exports.DocumentVersionMetadataUpdateToJSONTyped = DocumentVersionMetadataUpdate
|
|
|
22
22
|
const PipelineState_1 = require("./PipelineState");
|
|
23
23
|
const XlsxCellAnchorInputOrDocxParagraphAnchorInput_1 = require("./XlsxCellAnchorInputOrDocxParagraphAnchorInput");
|
|
24
24
|
const InformationStatistics_1 = require("./InformationStatistics");
|
|
25
|
-
const EmailMetadata_1 = require("./EmailMetadata");
|
|
26
25
|
exports.DocumentVersionMetadataUpdatePropertyValidationAttributesMap = {};
|
|
27
26
|
/**
|
|
28
27
|
* Check if a given object implements the DocumentVersionMetadataUpdate interface.
|
|
@@ -55,7 +54,6 @@ function DocumentVersionMetadataUpdateFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
55
54
|
'durationMs': json['duration_ms'] == null ? undefined : json['duration_ms'],
|
|
56
55
|
'language': json['language'] == null ? undefined : json['language'],
|
|
57
56
|
'segmentCount': json['segment_count'] == null ? undefined : json['segment_count'],
|
|
58
|
-
'email': json['email'] == null ? undefined : (0, EmailMetadata_1.EmailMetadataFromJSON)(json['email']),
|
|
59
57
|
'totalFormulas': json['total_formulas'] == null ? undefined : json['total_formulas'],
|
|
60
58
|
'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
|
|
61
59
|
'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
|
|
@@ -94,7 +92,6 @@ function DocumentVersionMetadataUpdateToJSONTyped(value, ignoreDiscriminator = f
|
|
|
94
92
|
'duration_ms': value['durationMs'],
|
|
95
93
|
'language': value['language'],
|
|
96
94
|
'segment_count': value['segmentCount'],
|
|
97
|
-
'email': (0, EmailMetadata_1.EmailMetadataToJSON)(value['email']),
|
|
98
95
|
'total_formulas': value['totalFormulas'],
|
|
99
96
|
'xlsx_parse_result_s3': value['xlsxParseResultS3'],
|
|
100
97
|
'xlsx_named_ranges': value['xlsxNamedRanges'],
|
|
@@ -33,24 +33,6 @@ export interface IngestDocumentResponse {
|
|
|
33
33
|
* @memberof IngestDocumentResponse
|
|
34
34
|
*/
|
|
35
35
|
documentVersionId: string;
|
|
36
|
-
/**
|
|
37
|
-
* Folder created to hold this upload and its members. Set for email uploads, which always nest inside their own folder; null for every other type, which ingest directly into path_part_id.
|
|
38
|
-
* @type {string}
|
|
39
|
-
* @memberof IngestDocumentResponse
|
|
40
|
-
*/
|
|
41
|
-
folderId?: string | null;
|
|
42
|
-
/**
|
|
43
|
-
* Members found on an email upload, each becoming its own document beside the email: the attachments of a single message, or the messages of an .mbox archive (whose own attachments are then expanded one level deeper). Always 0 for non-email uploads. Null for a .pst, whose members are enumerated only by the worker fan-out — poll attachment_workflow_id for per-member outcomes.
|
|
44
|
-
* @type {number}
|
|
45
|
-
* @memberof IngestDocumentResponse
|
|
46
|
-
*/
|
|
47
|
-
attachmentCount?: number | null;
|
|
48
|
-
/**
|
|
49
|
-
* Fan-out workflow ingesting the members. Poll GET /v1/system-jobs/zip-ingestions/{id} for per-member outcomes. Null when the upload had no ingestible members.
|
|
50
|
-
* @type {string}
|
|
51
|
-
* @memberof IngestDocumentResponse
|
|
52
|
-
*/
|
|
53
|
-
attachmentWorkflowId?: string | null;
|
|
54
36
|
}
|
|
55
37
|
export declare const IngestDocumentResponsePropertyValidationAttributesMap: {
|
|
56
38
|
[property: string]: {
|
|
@@ -43,9 +43,6 @@ function IngestDocumentResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
43
43
|
'workflowId': json['workflow_id'],
|
|
44
44
|
'documentId': json['document_id'],
|
|
45
45
|
'documentVersionId': json['document_version_id'],
|
|
46
|
-
'folderId': json['folder_id'] == null ? undefined : json['folder_id'],
|
|
47
|
-
'attachmentCount': json['attachment_count'] == null ? undefined : json['attachment_count'],
|
|
48
|
-
'attachmentWorkflowId': json['attachment_workflow_id'] == null ? undefined : json['attachment_workflow_id'],
|
|
49
46
|
};
|
|
50
47
|
}
|
|
51
48
|
function IngestDocumentResponseToJSON(json) {
|
|
@@ -59,8 +56,5 @@ function IngestDocumentResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
59
56
|
'workflow_id': value['workflowId'],
|
|
60
57
|
'document_id': value['documentId'],
|
|
61
58
|
'document_version_id': value['documentVersionId'],
|
|
62
|
-
'folder_id': value['folderId'],
|
|
63
|
-
'attachment_count': value['attachmentCount'],
|
|
64
|
-
'attachment_workflow_id': value['attachmentWorkflowId'],
|
|
65
59
|
};
|
|
66
60
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { PipelineStatus } from './PipelineStatus';
|
|
13
|
+
import type { ImageTaxonomy } from './ImageTaxonomy';
|
|
13
14
|
import type { IngestionMode } from './IngestionMode';
|
|
14
15
|
import type { ChunkType } from './ChunkType';
|
|
15
16
|
/**
|
|
@@ -37,7 +38,7 @@ export interface PipelineState {
|
|
|
37
38
|
*/
|
|
38
39
|
lastStateUpdateTimestamp?: Date | null;
|
|
39
40
|
/**
|
|
40
|
-
* Name of the last activity that executed (e.g., '
|
|
41
|
+
* Name of the last activity that executed (e.g., 'pdf_preparation_activity')
|
|
41
42
|
* @type {string}
|
|
42
43
|
* @memberof PipelineState
|
|
43
44
|
*/
|
|
@@ -78,6 +79,12 @@ export interface PipelineState {
|
|
|
78
79
|
* @memberof PipelineState
|
|
79
80
|
*/
|
|
80
81
|
chunkType?: ChunkType;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {ImageTaxonomy}
|
|
85
|
+
* @memberof PipelineState
|
|
86
|
+
*/
|
|
87
|
+
secondaryTaxonomy?: ImageTaxonomy;
|
|
81
88
|
}
|
|
82
89
|
export declare const PipelineStatePropertyValidationAttributesMap: {
|
|
83
90
|
[property: string]: {
|
|
@@ -20,6 +20,7 @@ exports.PipelineStateFromJSONTyped = PipelineStateFromJSONTyped;
|
|
|
20
20
|
exports.PipelineStateToJSON = PipelineStateToJSON;
|
|
21
21
|
exports.PipelineStateToJSONTyped = PipelineStateToJSONTyped;
|
|
22
22
|
const PipelineStatus_1 = require("./PipelineStatus");
|
|
23
|
+
const ImageTaxonomy_1 = require("./ImageTaxonomy");
|
|
23
24
|
const IngestionMode_1 = require("./IngestionMode");
|
|
24
25
|
const ChunkType_1 = require("./ChunkType");
|
|
25
26
|
exports.PipelineStatePropertyValidationAttributesMap = {};
|
|
@@ -49,6 +50,7 @@ function PipelineStateFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
49
50
|
'pageDpi': json['page_dpi'] == null ? undefined : json['page_dpi'],
|
|
50
51
|
'ingestionMode': json['ingestion_mode'] == null ? undefined : (0, IngestionMode_1.IngestionModeFromJSON)(json['ingestion_mode']),
|
|
51
52
|
'chunkType': json['chunk_type'] == null ? undefined : (0, ChunkType_1.ChunkTypeFromJSON)(json['chunk_type']),
|
|
53
|
+
'secondaryTaxonomy': json['secondary_taxonomy'] == null ? undefined : (0, ImageTaxonomy_1.ImageTaxonomyFromJSON)(json['secondary_taxonomy']),
|
|
52
54
|
};
|
|
53
55
|
}
|
|
54
56
|
function PipelineStateToJSON(json) {
|
|
@@ -69,5 +71,6 @@ function PipelineStateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
69
71
|
'page_dpi': value['pageDpi'],
|
|
70
72
|
'ingestion_mode': (0, IngestionMode_1.IngestionModeToJSON)(value['ingestionMode']),
|
|
71
73
|
'chunk_type': (0, ChunkType_1.ChunkTypeToJSON)(value['chunkType']),
|
|
74
|
+
'secondary_taxonomy': (0, ImageTaxonomy_1.ImageTaxonomyToJSON)(value['secondaryTaxonomy']),
|
|
72
75
|
};
|
|
73
76
|
}
|
|
@@ -27,6 +27,12 @@ export interface UploadFormat {
|
|
|
27
27
|
* @memberof UploadFormat
|
|
28
28
|
*/
|
|
29
29
|
contentType: string;
|
|
30
|
+
/**
|
|
31
|
+
* Largest file of this format the buffered uploads accept (new document, new version, ZIP member, workflow-run file). A new audio/video document uses the resumable upload, capped at upload.max_media_bytes
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof UploadFormat
|
|
34
|
+
*/
|
|
35
|
+
maxBytes: number;
|
|
30
36
|
}
|
|
31
37
|
export declare const UploadFormatPropertyValidationAttributesMap: {
|
|
32
38
|
[property: string]: {
|
|
@@ -28,6 +28,8 @@ function instanceOfUploadFormat(value) {
|
|
|
28
28
|
return false;
|
|
29
29
|
if (!('contentType' in value) || value['contentType'] === undefined)
|
|
30
30
|
return false;
|
|
31
|
+
if (!('maxBytes' in value) || value['maxBytes'] === undefined)
|
|
32
|
+
return false;
|
|
31
33
|
return true;
|
|
32
34
|
}
|
|
33
35
|
function UploadFormatFromJSON(json) {
|
|
@@ -40,6 +42,7 @@ function UploadFormatFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
40
42
|
return {
|
|
41
43
|
'extension': json['extension'],
|
|
42
44
|
'contentType': json['content_type'],
|
|
45
|
+
'maxBytes': json['max_bytes'],
|
|
43
46
|
};
|
|
44
47
|
}
|
|
45
48
|
function UploadFormatToJSON(json) {
|
|
@@ -52,5 +55,6 @@ function UploadFormatToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
52
55
|
return {
|
|
53
56
|
'extension': value['extension'],
|
|
54
57
|
'content_type': value['contentType'],
|
|
58
|
+
'max_bytes': value['maxBytes'],
|
|
55
59
|
};
|
|
56
60
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { SupportedLanguage } from './SupportedLanguage';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -27,6 +28,12 @@ export interface UserMessageRequest {
|
|
|
27
28
|
* @memberof UserMessageRequest
|
|
28
29
|
*/
|
|
29
30
|
fastMode?: boolean | null;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {SupportedLanguage}
|
|
34
|
+
* @memberof UserMessageRequest
|
|
35
|
+
*/
|
|
36
|
+
outputLanguage?: SupportedLanguage;
|
|
30
37
|
}
|
|
31
38
|
export declare const UserMessageRequestPropertyValidationAttributesMap: {
|
|
32
39
|
[property: string]: {
|
|
@@ -19,6 +19,7 @@ exports.UserMessageRequestFromJSON = UserMessageRequestFromJSON;
|
|
|
19
19
|
exports.UserMessageRequestFromJSONTyped = UserMessageRequestFromJSONTyped;
|
|
20
20
|
exports.UserMessageRequestToJSON = UserMessageRequestToJSON;
|
|
21
21
|
exports.UserMessageRequestToJSONTyped = UserMessageRequestToJSONTyped;
|
|
22
|
+
const SupportedLanguage_1 = require("./SupportedLanguage");
|
|
22
23
|
exports.UserMessageRequestPropertyValidationAttributesMap = {};
|
|
23
24
|
/**
|
|
24
25
|
* Check if a given object implements the UserMessageRequest interface.
|
|
@@ -36,6 +37,7 @@ function UserMessageRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
37
|
return {
|
|
37
38
|
'inputText': json['input_text'] == null ? undefined : json['input_text'],
|
|
38
39
|
'fastMode': json['fast_mode'] == null ? undefined : json['fast_mode'],
|
|
40
|
+
'outputLanguage': json['output_language'] == null ? undefined : (0, SupportedLanguage_1.SupportedLanguageFromJSON)(json['output_language']),
|
|
39
41
|
};
|
|
40
42
|
}
|
|
41
43
|
function UserMessageRequestToJSON(json) {
|
|
@@ -48,5 +50,6 @@ function UserMessageRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
48
50
|
return {
|
|
49
51
|
'input_text': value['inputText'],
|
|
50
52
|
'fast_mode': value['fastMode'],
|
|
53
|
+
'output_language': (0, SupportedLanguage_1.SupportedLanguageToJSON)(value['outputLanguage']),
|
|
51
54
|
};
|
|
52
55
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -132,8 +132,6 @@ export * from './DocxParagraphAnchorInput';
|
|
|
132
132
|
export * from './DocxParagraphAnchorOutput';
|
|
133
133
|
export * from './DownloadArtifact';
|
|
134
134
|
export * from './EditMemoryChunkRequest';
|
|
135
|
-
export * from './EmailMetadata';
|
|
136
|
-
export * from './EmailParty';
|
|
137
135
|
export * from './EmailSentResponse';
|
|
138
136
|
export * from './EmailVerificationRequest';
|
|
139
137
|
export * from './EnrichedCitation';
|
package/dist/models/index.js
CHANGED
|
@@ -150,8 +150,6 @@ __exportStar(require("./DocxParagraphAnchorInput"), exports);
|
|
|
150
150
|
__exportStar(require("./DocxParagraphAnchorOutput"), exports);
|
|
151
151
|
__exportStar(require("./DownloadArtifact"), exports);
|
|
152
152
|
__exportStar(require("./EditMemoryChunkRequest"), exports);
|
|
153
|
-
__exportStar(require("./EmailMetadata"), exports);
|
|
154
|
-
__exportStar(require("./EmailParty"), exports);
|
|
155
153
|
__exportStar(require("./EmailSentResponse"), exports);
|
|
156
154
|
__exportStar(require("./EmailVerificationRequest"), exports);
|
|
157
155
|
__exportStar(require("./EnrichedCitation"), exports);
|
package/docs/AskRequest.md
CHANGED
|
@@ -8,6 +8,7 @@ Request body for POST /v1/agent/ask.
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`prompt` | string
|
|
11
|
+
`outputLanguage` | [SupportedLanguage](SupportedLanguage.md)
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
|
@@ -17,6 +18,7 @@ import type { AskRequest } from '@knowledge-stack/ksapi'
|
|
|
17
18
|
// TODO: Update the object below with actual values
|
|
18
19
|
const example = {
|
|
19
20
|
"prompt": Summarize the latest version of the Q3 vendor contract.,
|
|
21
|
+
"outputLanguage": null,
|
|
20
22
|
} satisfies AskRequest
|
|
21
23
|
|
|
22
24
|
console.log(example)
|
|
@@ -21,7 +21,6 @@ Name | Type
|
|
|
21
21
|
`durationMs` | number
|
|
22
22
|
`language` | string
|
|
23
23
|
`segmentCount` | number
|
|
24
|
-
`email` | [EmailMetadata](EmailMetadata.md)
|
|
25
24
|
`totalFormulas` | number
|
|
26
25
|
`xlsxParseResultS3` | string
|
|
27
26
|
`xlsxNamedRanges` | Array<{ [key: string]: any; }>
|
|
@@ -56,7 +55,6 @@ const example = {
|
|
|
56
55
|
"durationMs": null,
|
|
57
56
|
"language": null,
|
|
58
57
|
"segmentCount": null,
|
|
59
|
-
"email": null,
|
|
60
58
|
"totalFormulas": null,
|
|
61
59
|
"xlsxParseResultS3": null,
|
|
62
60
|
"xlsxNamedRanges": null,
|
|
@@ -24,7 +24,6 @@ Name | Type
|
|
|
24
24
|
`durationMs` | number
|
|
25
25
|
`language` | string
|
|
26
26
|
`segmentCount` | number
|
|
27
|
-
`email` | [EmailMetadata](EmailMetadata.md)
|
|
28
27
|
`totalFormulas` | number
|
|
29
28
|
`xlsxParseResultS3` | string
|
|
30
29
|
`xlsxNamedRanges` | Array<{ [key: string]: any; }>
|
|
@@ -61,7 +60,6 @@ const example = {
|
|
|
61
60
|
"durationMs": null,
|
|
62
61
|
"language": null,
|
|
63
62
|
"segmentCount": null,
|
|
64
|
-
"email": null,
|
|
65
63
|
"totalFormulas": null,
|
|
66
64
|
"xlsxParseResultS3": null,
|
|
67
65
|
"xlsxNamedRanges": null,
|
package/docs/DocumentsApi.md
CHANGED
|
@@ -627,7 +627,7 @@ example().catch(console.error);
|
|
|
627
627
|
|
|
628
628
|
## ingestDocument
|
|
629
629
|
|
|
630
|
-
> IngestDocumentResponse ingestDocument(file, pathPartId, name, tagIds, idempotencyKey,
|
|
630
|
+
> IngestDocumentResponse ingestDocument(file, pathPartId, name, tagIds, idempotencyKey, ingestionMode, chunkType, secondaryTaxonomy, pageDpi, workflowRunId, workflowDefinitionId)
|
|
631
631
|
|
|
632
632
|
Ingest Document Handler
|
|
633
633
|
|
|
@@ -663,8 +663,6 @@ async function example() {
|
|
|
663
663
|
tagIds: ...,
|
|
664
664
|
// string | Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409. (optional)
|
|
665
665
|
idempotencyKey: idempotencyKey_example,
|
|
666
|
-
// number | Internal: set by the email member fan-out when a nested email re-enters this endpoint. Leave at 0 for direct uploads. (optional)
|
|
667
|
-
emailNestingDepth: 56,
|
|
668
666
|
// IngestionMode (optional)
|
|
669
667
|
ingestionMode: ...,
|
|
670
668
|
// ChunkType (optional)
|
|
@@ -701,7 +699,6 @@ example().catch(console.error);
|
|
|
701
699
|
| **name** | `string` | Document name (defaults to filename) | [Optional] [Defaults to `undefined`] |
|
|
702
700
|
| **tagIds** | `Array<string>` | Tag IDs applied to the created document. | [Optional] |
|
|
703
701
|
| **idempotencyKey** | `string` | Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409. | [Optional] [Defaults to `undefined`] |
|
|
704
|
-
| **emailNestingDepth** | `number` | Internal: set by the email member fan-out when a nested email re-enters this endpoint. Leave at 0 for direct uploads. | [Optional] [Defaults to `0`] |
|
|
705
702
|
| **ingestionMode** | `IngestionMode` | | [Optional] [Defaults to `undefined`] [Enum: high_accuracy, standard, single_chunk, media] |
|
|
706
703
|
| **chunkType** | `ChunkType` | | [Optional] [Defaults to `undefined`] [Enum: TEXT, TABLE, IMAGE, HTML, UNKNOWN] |
|
|
707
704
|
| **secondaryTaxonomy** | `ImageTaxonomy` | | [Optional] [Defaults to `undefined`] [Enum: picture, slide, flowchart] |
|
|
@@ -739,7 +736,7 @@ example().catch(console.error);
|
|
|
739
736
|
|
|
740
737
|
Ingest Document Version Handler
|
|
741
738
|
|
|
742
|
-
Upload a new file for an existing document, creating a new version and triggering ingestion. Requires an active document checkout held by the caller. Acquire one via ``POST /v1/documents/{id}/checkout`` first and release it after; otherwise this returns 409 Conflict (\"A document checkout is required to edit this document.\"). Creates a new document version (incrementing the highest version number), uploads the file to S3, and starts the ingestion workflow. Upon successful ingestion, the new version is automatically activated (set as the document\'s active_version) and the old version\'s Qdrant points are deactivated. Returns 201 immediately with the Temporal ``workflow_id``. Ingestion runs in the background — poll ``GET /v1/system-jobs/document_versions/{workflow_id}`` (also given in the ``Location`` header) until ``status`` is terminal.
|
|
739
|
+
Upload a new file for an existing document, creating a new version and triggering ingestion. Requires an active document checkout held by the caller. Acquire one via ``POST /v1/documents/{id}/checkout`` first and release it after; otherwise this returns 409 Conflict (\"A document checkout is required to edit this document.\"). The file must be the document\'s type (a PDF document takes only PDF versions; ``.md`` and ``.txt`` are both PLAINTEXT); any other type is a 400. Creates a new document version (incrementing the highest version number), uploads the file to S3, and starts the ingestion workflow. Upon successful ingestion, the new version is automatically activated (set as the document\'s active_version) and the old version\'s Qdrant points are deactivated. Returns 201 immediately with the Temporal ``workflow_id``. Ingestion runs in the background — poll ``GET /v1/system-jobs/document_versions/{workflow_id}`` (also given in the ``Location`` header) until ``status`` is terminal.
|
|
743
740
|
|
|
744
741
|
### Example
|
|
745
742
|
|
|
@@ -10,9 +10,6 @@ Name | Type
|
|
|
10
10
|
`workflowId` | string
|
|
11
11
|
`documentId` | string
|
|
12
12
|
`documentVersionId` | string
|
|
13
|
-
`folderId` | string
|
|
14
|
-
`attachmentCount` | number
|
|
15
|
-
`attachmentWorkflowId` | string
|
|
16
13
|
|
|
17
14
|
## Example
|
|
18
15
|
|
|
@@ -24,9 +21,6 @@ const example = {
|
|
|
24
21
|
"workflowId": null,
|
|
25
22
|
"documentId": null,
|
|
26
23
|
"documentVersionId": null,
|
|
27
|
-
"folderId": null,
|
|
28
|
-
"attachmentCount": null,
|
|
29
|
-
"attachmentWorkflowId": null,
|
|
30
24
|
} satisfies IngestDocumentResponse
|
|
31
25
|
|
|
32
26
|
console.log(example)
|
package/docs/PipelineState.md
CHANGED
|
@@ -17,6 +17,7 @@ Name | Type
|
|
|
17
17
|
`pageDpi` | number
|
|
18
18
|
`ingestionMode` | [IngestionMode](IngestionMode.md)
|
|
19
19
|
`chunkType` | [ChunkType](ChunkType.md)
|
|
20
|
+
`secondaryTaxonomy` | [ImageTaxonomy](ImageTaxonomy.md)
|
|
20
21
|
|
|
21
22
|
## Example
|
|
22
23
|
|
|
@@ -35,6 +36,7 @@ const example = {
|
|
|
35
36
|
"pageDpi": null,
|
|
36
37
|
"ingestionMode": null,
|
|
37
38
|
"chunkType": null,
|
|
39
|
+
"secondaryTaxonomy": null,
|
|
38
40
|
} satisfies PipelineState
|
|
39
41
|
|
|
40
42
|
console.log(example)
|
package/docs/SystemJobsApi.md
CHANGED
|
@@ -319,7 +319,7 @@ example().catch(console.error);
|
|
|
319
319
|
|
|
320
320
|
Get Zip Ingestion Status Handler
|
|
321
321
|
|
|
322
|
-
Get a fan-out\'s live status + per-member outcomes.
|
|
322
|
+
Get a ZIP fan-out\'s live status + per-member outcomes. Tenant-scoped via the TenantId search attribute (no per-path can_read check — intentionally consistent with the sibling generic Temporal endpoints below; the opaque workflow_id is only handed to the uploader, who had can_write on the target). The per-member results come from the workflow\'s ``results`` query (served from retained history), so once Temporal retention expires this 404s.
|
|
323
323
|
|
|
324
324
|
### Example
|
|
325
325
|
|
package/docs/UploadFormat.md
CHANGED
|
@@ -8,6 +8,7 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`extension` | string
|
|
10
10
|
`contentType` | string
|
|
11
|
+
`maxBytes` | number
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
|
@@ -18,6 +19,7 @@ import type { UploadFormat } from '@knowledge-stack/ksapi'
|
|
|
18
19
|
const example = {
|
|
19
20
|
"extension": null,
|
|
20
21
|
"contentType": null,
|
|
22
|
+
"maxBytes": null,
|
|
21
23
|
} satisfies UploadFormat
|
|
22
24
|
|
|
23
25
|
console.log(example)
|
|
@@ -8,6 +8,7 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`inputText` | string
|
|
10
10
|
`fastMode` | boolean
|
|
11
|
+
`outputLanguage` | [SupportedLanguage](SupportedLanguage.md)
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
|
@@ -18,6 +19,7 @@ import type { UserMessageRequest } from '@knowledge-stack/ksapi'
|
|
|
18
19
|
const example = {
|
|
19
20
|
"inputText": null,
|
|
20
21
|
"fastMode": null,
|
|
22
|
+
"outputLanguage": null,
|
|
21
23
|
} satisfies UserMessageRequest
|
|
22
24
|
|
|
23
25
|
console.log(example)
|