@knowledge-stack/ksapi 1.15.0 → 1.16.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 +7 -0
- package/README.md +2 -2
- package/dist/apis/AuthApi.d.ts +30 -1
- package/dist/apis/AuthApi.js +39 -0
- package/dist/apis/DocumentVersionsApi.d.ts +32 -1
- package/dist/apis/DocumentVersionsApi.js +37 -0
- package/dist/apis/DocumentsApi.d.ts +34 -1
- package/dist/apis/DocumentsApi.js +59 -0
- package/dist/apis/TenantsApi.d.ts +4 -4
- package/dist/apis/TenantsApi.js +2 -2
- package/dist/esm/apis/AuthApi.d.ts +30 -1
- package/dist/esm/apis/AuthApi.js +40 -1
- package/dist/esm/apis/DocumentVersionsApi.d.ts +32 -1
- package/dist/esm/apis/DocumentVersionsApi.js +38 -1
- package/dist/esm/apis/DocumentsApi.d.ts +34 -1
- package/dist/esm/apis/DocumentsApi.js +60 -1
- package/dist/esm/apis/TenantsApi.d.ts +4 -4
- package/dist/esm/apis/TenantsApi.js +2 -2
- package/dist/esm/models/AssumeUserRequest.d.ts +53 -0
- package/dist/esm/models/AssumeUserRequest.js +48 -0
- package/dist/esm/models/AssumeUserResponse.d.ts +47 -0
- package/dist/esm/models/AssumeUserResponse.js +44 -0
- package/dist/esm/models/DocumentVersionMetadata.d.ts +89 -0
- package/dist/esm/models/DocumentVersionMetadata.js +55 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +87 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.js +55 -0
- package/dist/esm/models/DocumentVersionResponse.d.ts +13 -0
- package/dist/esm/models/DocumentVersionResponse.js +5 -0
- package/dist/esm/models/IngestDocumentResponse.d.ts +59 -0
- package/dist/esm/models/IngestDocumentResponse.js +52 -0
- package/dist/esm/models/PipelineState.d.ts +78 -0
- package/dist/esm/models/PipelineState.js +57 -0
- package/dist/esm/models/PipelineStatus.d.ts +27 -0
- package/dist/esm/models/PipelineStatus.js +45 -0
- package/dist/esm/models/index.d.ts +7 -0
- package/dist/esm/models/index.js +7 -0
- package/dist/models/AssumeUserRequest.d.ts +53 -0
- package/dist/models/AssumeUserRequest.js +56 -0
- package/dist/models/AssumeUserResponse.d.ts +47 -0
- package/dist/models/AssumeUserResponse.js +52 -0
- package/dist/models/DocumentVersionMetadata.d.ts +89 -0
- package/dist/models/DocumentVersionMetadata.js +63 -0
- package/dist/models/DocumentVersionMetadataUpdate.d.ts +87 -0
- package/dist/models/DocumentVersionMetadataUpdate.js +63 -0
- package/dist/models/DocumentVersionResponse.d.ts +13 -0
- package/dist/models/DocumentVersionResponse.js +5 -0
- package/dist/models/IngestDocumentResponse.d.ts +59 -0
- package/dist/models/IngestDocumentResponse.js +60 -0
- package/dist/models/PipelineState.d.ts +78 -0
- package/dist/models/PipelineState.js +65 -0
- package/dist/models/PipelineStatus.d.ts +27 -0
- package/dist/models/PipelineStatus.js +53 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/package.json +1 -1
- package/src/apis/AuthApi.ts +80 -0
- package/src/apis/DocumentVersionsApi.ts +76 -0
- package/src/apis/DocumentsApi.ts +103 -0
- package/src/apis/TenantsApi.ts +4 -4
- package/src/models/AssumeUserRequest.ts +92 -0
- package/src/models/AssumeUserResponse.ts +83 -0
- package/src/models/DocumentVersionMetadata.ts +143 -0
- package/src/models/DocumentVersionMetadataUpdate.ts +141 -0
- package/src/models/DocumentVersionResponse.ts +24 -0
- package/src/models/IngestDocumentResponse.ts +101 -0
- package/src/models/PipelineState.ts +134 -0
- package/src/models/PipelineStatus.ts +55 -0
- package/src/models/index.ts +7 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AssumeUserResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface AssumeUserResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AssumeUserResponse
|
|
26
|
+
*/
|
|
27
|
+
token: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the AssumeUserResponse interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfAssumeUserResponse(value: object): value is AssumeUserResponse {
|
|
34
|
+
if (!('token' in value) || value['token'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function AssumeUserResponseFromJSON(json: any): AssumeUserResponse {
|
|
39
|
+
return AssumeUserResponseFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function AssumeUserResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssumeUserResponse {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'token': json['token'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function AssumeUserResponseToJSON(json: any): AssumeUserResponse {
|
|
53
|
+
return AssumeUserResponseToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function AssumeUserResponseToJSONTyped(value?: AssumeUserResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'token': value['token'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const AssumeUserResponsePropertyValidationAttributesMap: {
|
|
68
|
+
[property: string]: {
|
|
69
|
+
maxLength?: number,
|
|
70
|
+
minLength?: number,
|
|
71
|
+
pattern?: string,
|
|
72
|
+
maximum?: number,
|
|
73
|
+
exclusiveMaximum?: boolean,
|
|
74
|
+
minimum?: number,
|
|
75
|
+
exclusiveMinimum?: boolean,
|
|
76
|
+
multipleOf?: number,
|
|
77
|
+
maxItems?: number,
|
|
78
|
+
minItems?: number,
|
|
79
|
+
uniqueItems?: boolean
|
|
80
|
+
}
|
|
81
|
+
} = {
|
|
82
|
+
}
|
|
83
|
+
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PipelineState } from './PipelineState';
|
|
17
|
+
import {
|
|
18
|
+
PipelineStateFromJSON,
|
|
19
|
+
PipelineStateFromJSONTyped,
|
|
20
|
+
PipelineStateToJSON,
|
|
21
|
+
PipelineStateToJSONTyped,
|
|
22
|
+
} from './PipelineState';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Schema for document_version.metadata JSONB field.
|
|
26
|
+
*
|
|
27
|
+
* Tracks S3 URLs for generated artifacts, pipeline execution state,
|
|
28
|
+
* and document statistics. Convention-based paths (images, page screenshots)
|
|
29
|
+
* are derived from document_id/document_version_id via s3_paths helpers,
|
|
30
|
+
* using a flat S3 layout: documents/{document_id}/{document_version_id}/...
|
|
31
|
+
* @export
|
|
32
|
+
* @interface DocumentVersionMetadata
|
|
33
|
+
*/
|
|
34
|
+
export interface DocumentVersionMetadata {
|
|
35
|
+
/**
|
|
36
|
+
* S3 URL to the source document (set by API on upload)
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof DocumentVersionMetadata
|
|
39
|
+
*/
|
|
40
|
+
sourceS3?: string;
|
|
41
|
+
/**
|
|
42
|
+
* S3 URL to watermark-removed source document
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof DocumentVersionMetadata
|
|
45
|
+
*/
|
|
46
|
+
cleanedSourceS3?: string;
|
|
47
|
+
/**
|
|
48
|
+
* S3 URL to the Docling JSON conversion output
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof DocumentVersionMetadata
|
|
51
|
+
*/
|
|
52
|
+
doclingJsonS3?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Current state of the ingestion pipeline workflow
|
|
55
|
+
* @type {PipelineState}
|
|
56
|
+
* @memberof DocumentVersionMetadata
|
|
57
|
+
*/
|
|
58
|
+
pipelineState?: PipelineState;
|
|
59
|
+
/**
|
|
60
|
+
* Total number of pages in the document
|
|
61
|
+
* @type {number}
|
|
62
|
+
* @memberof DocumentVersionMetadata
|
|
63
|
+
*/
|
|
64
|
+
totalPages?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Total number of sections created
|
|
67
|
+
* @type {number}
|
|
68
|
+
* @memberof DocumentVersionMetadata
|
|
69
|
+
*/
|
|
70
|
+
totalSections?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Total number of chunks created
|
|
73
|
+
* @type {number}
|
|
74
|
+
* @memberof DocumentVersionMetadata
|
|
75
|
+
*/
|
|
76
|
+
totalChunks?: number;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Check if a given object implements the DocumentVersionMetadata interface.
|
|
81
|
+
*/
|
|
82
|
+
export function instanceOfDocumentVersionMetadata(value: object): value is DocumentVersionMetadata {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function DocumentVersionMetadataFromJSON(json: any): DocumentVersionMetadata {
|
|
87
|
+
return DocumentVersionMetadataFromJSONTyped(json, false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function DocumentVersionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentVersionMetadata {
|
|
91
|
+
if (json == null) {
|
|
92
|
+
return json;
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
|
|
96
|
+
'sourceS3': json['source_s3'] == null ? undefined : json['source_s3'],
|
|
97
|
+
'cleanedSourceS3': json['cleaned_source_s3'] == null ? undefined : json['cleaned_source_s3'],
|
|
98
|
+
'doclingJsonS3': json['docling_json_s3'] == null ? undefined : json['docling_json_s3'],
|
|
99
|
+
'pipelineState': json['pipeline_state'] == null ? undefined : PipelineStateFromJSON(json['pipeline_state']),
|
|
100
|
+
'totalPages': json['total_pages'] == null ? undefined : json['total_pages'],
|
|
101
|
+
'totalSections': json['total_sections'] == null ? undefined : json['total_sections'],
|
|
102
|
+
'totalChunks': json['total_chunks'] == null ? undefined : json['total_chunks'],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function DocumentVersionMetadataToJSON(json: any): DocumentVersionMetadata {
|
|
107
|
+
return DocumentVersionMetadataToJSONTyped(json, false);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function DocumentVersionMetadataToJSONTyped(value?: DocumentVersionMetadata | null, ignoreDiscriminator: boolean = false): any {
|
|
111
|
+
if (value == null) {
|
|
112
|
+
return value;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
|
|
117
|
+
'source_s3': value['sourceS3'],
|
|
118
|
+
'cleaned_source_s3': value['cleanedSourceS3'],
|
|
119
|
+
'docling_json_s3': value['doclingJsonS3'],
|
|
120
|
+
'pipeline_state': PipelineStateToJSON(value['pipelineState']),
|
|
121
|
+
'total_pages': value['totalPages'],
|
|
122
|
+
'total_sections': value['totalSections'],
|
|
123
|
+
'total_chunks': value['totalChunks'],
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export const DocumentVersionMetadataPropertyValidationAttributesMap: {
|
|
128
|
+
[property: string]: {
|
|
129
|
+
maxLength?: number,
|
|
130
|
+
minLength?: number,
|
|
131
|
+
pattern?: string,
|
|
132
|
+
maximum?: number,
|
|
133
|
+
exclusiveMaximum?: boolean,
|
|
134
|
+
minimum?: number,
|
|
135
|
+
exclusiveMinimum?: boolean,
|
|
136
|
+
multipleOf?: number,
|
|
137
|
+
maxItems?: number,
|
|
138
|
+
minItems?: number,
|
|
139
|
+
uniqueItems?: boolean
|
|
140
|
+
}
|
|
141
|
+
} = {
|
|
142
|
+
}
|
|
143
|
+
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PipelineState } from './PipelineState';
|
|
17
|
+
import {
|
|
18
|
+
PipelineStateFromJSON,
|
|
19
|
+
PipelineStateFromJSONTyped,
|
|
20
|
+
PipelineStateToJSON,
|
|
21
|
+
PipelineStateToJSONTyped,
|
|
22
|
+
} from './PipelineState';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Partial update schema for document version metadata.
|
|
26
|
+
*
|
|
27
|
+
* All fields are optional. Only non-``None`` fields are merged into
|
|
28
|
+
* the existing metadata dict.
|
|
29
|
+
* @export
|
|
30
|
+
* @interface DocumentVersionMetadataUpdate
|
|
31
|
+
*/
|
|
32
|
+
export interface DocumentVersionMetadataUpdate {
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof DocumentVersionMetadataUpdate
|
|
37
|
+
*/
|
|
38
|
+
sourceS3?: string;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof DocumentVersionMetadataUpdate
|
|
43
|
+
*/
|
|
44
|
+
cleanedSourceS3?: string;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @memberof DocumentVersionMetadataUpdate
|
|
49
|
+
*/
|
|
50
|
+
doclingJsonS3?: string;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {PipelineState}
|
|
54
|
+
* @memberof DocumentVersionMetadataUpdate
|
|
55
|
+
*/
|
|
56
|
+
pipelineState?: PipelineState;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {number}
|
|
60
|
+
* @memberof DocumentVersionMetadataUpdate
|
|
61
|
+
*/
|
|
62
|
+
totalPages?: number;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {number}
|
|
66
|
+
* @memberof DocumentVersionMetadataUpdate
|
|
67
|
+
*/
|
|
68
|
+
totalSections?: number;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @type {number}
|
|
72
|
+
* @memberof DocumentVersionMetadataUpdate
|
|
73
|
+
*/
|
|
74
|
+
totalChunks?: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Check if a given object implements the DocumentVersionMetadataUpdate interface.
|
|
79
|
+
*/
|
|
80
|
+
export function instanceOfDocumentVersionMetadataUpdate(value: object): value is DocumentVersionMetadataUpdate {
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function DocumentVersionMetadataUpdateFromJSON(json: any): DocumentVersionMetadataUpdate {
|
|
85
|
+
return DocumentVersionMetadataUpdateFromJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function DocumentVersionMetadataUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentVersionMetadataUpdate {
|
|
89
|
+
if (json == null) {
|
|
90
|
+
return json;
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
|
|
94
|
+
'sourceS3': json['source_s3'] == null ? undefined : json['source_s3'],
|
|
95
|
+
'cleanedSourceS3': json['cleaned_source_s3'] == null ? undefined : json['cleaned_source_s3'],
|
|
96
|
+
'doclingJsonS3': json['docling_json_s3'] == null ? undefined : json['docling_json_s3'],
|
|
97
|
+
'pipelineState': json['pipeline_state'] == null ? undefined : PipelineStateFromJSON(json['pipeline_state']),
|
|
98
|
+
'totalPages': json['total_pages'] == null ? undefined : json['total_pages'],
|
|
99
|
+
'totalSections': json['total_sections'] == null ? undefined : json['total_sections'],
|
|
100
|
+
'totalChunks': json['total_chunks'] == null ? undefined : json['total_chunks'],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function DocumentVersionMetadataUpdateToJSON(json: any): DocumentVersionMetadataUpdate {
|
|
105
|
+
return DocumentVersionMetadataUpdateToJSONTyped(json, false);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function DocumentVersionMetadataUpdateToJSONTyped(value?: DocumentVersionMetadataUpdate | null, ignoreDiscriminator: boolean = false): any {
|
|
109
|
+
if (value == null) {
|
|
110
|
+
return value;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
|
|
115
|
+
'source_s3': value['sourceS3'],
|
|
116
|
+
'cleaned_source_s3': value['cleanedSourceS3'],
|
|
117
|
+
'docling_json_s3': value['doclingJsonS3'],
|
|
118
|
+
'pipeline_state': PipelineStateToJSON(value['pipelineState']),
|
|
119
|
+
'total_pages': value['totalPages'],
|
|
120
|
+
'total_sections': value['totalSections'],
|
|
121
|
+
'total_chunks': value['totalChunks'],
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export const DocumentVersionMetadataUpdatePropertyValidationAttributesMap: {
|
|
126
|
+
[property: string]: {
|
|
127
|
+
maxLength?: number,
|
|
128
|
+
minLength?: number,
|
|
129
|
+
pattern?: string,
|
|
130
|
+
maximum?: number,
|
|
131
|
+
exclusiveMaximum?: boolean,
|
|
132
|
+
minimum?: number,
|
|
133
|
+
exclusiveMinimum?: boolean,
|
|
134
|
+
multipleOf?: number,
|
|
135
|
+
maxItems?: number,
|
|
136
|
+
minItems?: number,
|
|
137
|
+
uniqueItems?: boolean
|
|
138
|
+
}
|
|
139
|
+
} = {
|
|
140
|
+
}
|
|
141
|
+
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { DocumentVersionMetadata } from './DocumentVersionMetadata';
|
|
17
|
+
import {
|
|
18
|
+
DocumentVersionMetadataFromJSON,
|
|
19
|
+
DocumentVersionMetadataFromJSONTyped,
|
|
20
|
+
DocumentVersionMetadataToJSON,
|
|
21
|
+
DocumentVersionMetadataToJSONTyped,
|
|
22
|
+
} from './DocumentVersionMetadata';
|
|
23
|
+
|
|
16
24
|
/**
|
|
17
25
|
* DocumentVersion response model.
|
|
18
26
|
*
|
|
@@ -76,6 +84,18 @@ export interface DocumentVersionResponse {
|
|
|
76
84
|
* @memberof DocumentVersionResponse
|
|
77
85
|
*/
|
|
78
86
|
updatedAt: Date;
|
|
87
|
+
/**
|
|
88
|
+
* Presigned URL to download the source document (6-hour validity)
|
|
89
|
+
* @type {string}
|
|
90
|
+
* @memberof DocumentVersionResponse
|
|
91
|
+
*/
|
|
92
|
+
assetS3Url?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Version metadata (S3 artifacts, pipeline state, statistics)
|
|
95
|
+
* @type {DocumentVersionMetadata}
|
|
96
|
+
* @memberof DocumentVersionResponse
|
|
97
|
+
*/
|
|
98
|
+
metadata?: DocumentVersionMetadata;
|
|
79
99
|
}
|
|
80
100
|
|
|
81
101
|
/**
|
|
@@ -113,6 +133,8 @@ export function DocumentVersionResponseFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
113
133
|
'tenantId': json['tenant_id'],
|
|
114
134
|
'createdAt': (new Date(json['created_at'])),
|
|
115
135
|
'updatedAt': (new Date(json['updated_at'])),
|
|
136
|
+
'assetS3Url': json['asset_s3_url'] == null ? undefined : json['asset_s3_url'],
|
|
137
|
+
'metadata': json['metadata'] == null ? undefined : DocumentVersionMetadataFromJSON(json['metadata']),
|
|
116
138
|
};
|
|
117
139
|
}
|
|
118
140
|
|
|
@@ -136,6 +158,8 @@ export function DocumentVersionResponseToJSONTyped(value?: DocumentVersionRespon
|
|
|
136
158
|
'tenant_id': value['tenantId'],
|
|
137
159
|
'created_at': value['createdAt'].toISOString(),
|
|
138
160
|
'updated_at': value['updatedAt'].toISOString(),
|
|
161
|
+
'asset_s3_url': value['assetS3Url'],
|
|
162
|
+
'metadata': DocumentVersionMetadataToJSON(value['metadata']),
|
|
139
163
|
};
|
|
140
164
|
}
|
|
141
165
|
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Response with workflow execution details.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface IngestDocumentResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface IngestDocumentResponse {
|
|
22
|
+
/**
|
|
23
|
+
* Temporal workflow ID
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof IngestDocumentResponse
|
|
26
|
+
*/
|
|
27
|
+
workflowId: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof IngestDocumentResponse
|
|
32
|
+
*/
|
|
33
|
+
documentId: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof IngestDocumentResponse
|
|
38
|
+
*/
|
|
39
|
+
documentVersionId: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the IngestDocumentResponse interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfIngestDocumentResponse(value: object): value is IngestDocumentResponse {
|
|
46
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined) return false;
|
|
47
|
+
if (!('documentId' in value) || value['documentId'] === undefined) return false;
|
|
48
|
+
if (!('documentVersionId' in value) || value['documentVersionId'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function IngestDocumentResponseFromJSON(json: any): IngestDocumentResponse {
|
|
53
|
+
return IngestDocumentResponseFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function IngestDocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IngestDocumentResponse {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'workflowId': json['workflow_id'],
|
|
63
|
+
'documentId': json['document_id'],
|
|
64
|
+
'documentVersionId': json['document_version_id'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function IngestDocumentResponseToJSON(json: any): IngestDocumentResponse {
|
|
69
|
+
return IngestDocumentResponseToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function IngestDocumentResponseToJSONTyped(value?: IngestDocumentResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'workflow_id': value['workflowId'],
|
|
80
|
+
'document_id': value['documentId'],
|
|
81
|
+
'document_version_id': value['documentVersionId'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export const IngestDocumentResponsePropertyValidationAttributesMap: {
|
|
86
|
+
[property: string]: {
|
|
87
|
+
maxLength?: number,
|
|
88
|
+
minLength?: number,
|
|
89
|
+
pattern?: string,
|
|
90
|
+
maximum?: number,
|
|
91
|
+
exclusiveMaximum?: boolean,
|
|
92
|
+
minimum?: number,
|
|
93
|
+
exclusiveMinimum?: boolean,
|
|
94
|
+
multipleOf?: number,
|
|
95
|
+
maxItems?: number,
|
|
96
|
+
minItems?: number,
|
|
97
|
+
uniqueItems?: boolean
|
|
98
|
+
}
|
|
99
|
+
} = {
|
|
100
|
+
}
|
|
101
|
+
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PipelineStatus } from './PipelineStatus';
|
|
17
|
+
import {
|
|
18
|
+
PipelineStatusFromJSON,
|
|
19
|
+
PipelineStatusFromJSONTyped,
|
|
20
|
+
PipelineStatusToJSON,
|
|
21
|
+
PipelineStatusToJSONTyped,
|
|
22
|
+
} from './PipelineStatus';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Pipeline execution state tracking.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PipelineState
|
|
28
|
+
*/
|
|
29
|
+
export interface PipelineState {
|
|
30
|
+
/**
|
|
31
|
+
* Current status of the ingestion pipeline
|
|
32
|
+
* @type {PipelineStatus}
|
|
33
|
+
* @memberof PipelineState
|
|
34
|
+
*/
|
|
35
|
+
status: PipelineStatus;
|
|
36
|
+
/**
|
|
37
|
+
* Timestamp of the last pipeline execution attempt
|
|
38
|
+
* @type {Date}
|
|
39
|
+
* @memberof PipelineState
|
|
40
|
+
*/
|
|
41
|
+
lastRunTimestamp: Date;
|
|
42
|
+
/**
|
|
43
|
+
* Name of the last activity that executed (e.g., 'docling_conversion')
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof PipelineState
|
|
46
|
+
*/
|
|
47
|
+
lastActivity?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Error message if pipeline failed
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof PipelineState
|
|
52
|
+
*/
|
|
53
|
+
error?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Temporal workflow ID for tracking the ingestion run
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof PipelineState
|
|
58
|
+
*/
|
|
59
|
+
temporalWorkflowId?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Number of chunks processed (for progress tracking)
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof PipelineState
|
|
64
|
+
*/
|
|
65
|
+
chunksProcessed?: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Check if a given object implements the PipelineState interface.
|
|
72
|
+
*/
|
|
73
|
+
export function instanceOfPipelineState(value: object): value is PipelineState {
|
|
74
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
75
|
+
if (!('lastRunTimestamp' in value) || value['lastRunTimestamp'] === undefined) return false;
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function PipelineStateFromJSON(json: any): PipelineState {
|
|
80
|
+
return PipelineStateFromJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function PipelineStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): PipelineState {
|
|
84
|
+
if (json == null) {
|
|
85
|
+
return json;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'status': PipelineStatusFromJSON(json['status']),
|
|
90
|
+
'lastRunTimestamp': (new Date(json['last_run_timestamp'])),
|
|
91
|
+
'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
|
|
92
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
93
|
+
'temporalWorkflowId': json['temporal_workflow_id'] == null ? undefined : json['temporal_workflow_id'],
|
|
94
|
+
'chunksProcessed': json['chunks_processed'] == null ? undefined : json['chunks_processed'],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function PipelineStateToJSON(json: any): PipelineState {
|
|
99
|
+
return PipelineStateToJSONTyped(json, false);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function PipelineStateToJSONTyped(value?: PipelineState | null, ignoreDiscriminator: boolean = false): any {
|
|
103
|
+
if (value == null) {
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return {
|
|
108
|
+
|
|
109
|
+
'status': PipelineStatusToJSON(value['status']),
|
|
110
|
+
'last_run_timestamp': value['lastRunTimestamp'].toISOString(),
|
|
111
|
+
'last_activity': value['lastActivity'],
|
|
112
|
+
'error': value['error'],
|
|
113
|
+
'temporal_workflow_id': value['temporalWorkflowId'],
|
|
114
|
+
'chunks_processed': value['chunksProcessed'],
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export const PipelineStatePropertyValidationAttributesMap: {
|
|
119
|
+
[property: string]: {
|
|
120
|
+
maxLength?: number,
|
|
121
|
+
minLength?: number,
|
|
122
|
+
pattern?: string,
|
|
123
|
+
maximum?: number,
|
|
124
|
+
exclusiveMaximum?: boolean,
|
|
125
|
+
minimum?: number,
|
|
126
|
+
exclusiveMinimum?: boolean,
|
|
127
|
+
multipleOf?: number,
|
|
128
|
+
maxItems?: number,
|
|
129
|
+
minItems?: number,
|
|
130
|
+
uniqueItems?: boolean
|
|
131
|
+
}
|
|
132
|
+
} = {
|
|
133
|
+
}
|
|
134
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Status of the ingestion pipeline workflow.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const PipelineStatus = {
|
|
21
|
+
Pending: 'pending',
|
|
22
|
+
Processing: 'processing',
|
|
23
|
+
Completed: 'completed',
|
|
24
|
+
Failed: 'failed'
|
|
25
|
+
} as const;
|
|
26
|
+
export type PipelineStatus = typeof PipelineStatus[keyof typeof PipelineStatus];
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export function instanceOfPipelineStatus(value: any): boolean {
|
|
30
|
+
for (const key in PipelineStatus) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(PipelineStatus, key)) {
|
|
32
|
+
if (PipelineStatus[key as keyof typeof PipelineStatus] === value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function PipelineStatusFromJSON(json: any): PipelineStatus {
|
|
41
|
+
return PipelineStatusFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function PipelineStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): PipelineStatus {
|
|
45
|
+
return json as PipelineStatus;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function PipelineStatusToJSON(value?: PipelineStatus | null): any {
|
|
49
|
+
return value as any;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function PipelineStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): PipelineStatus {
|
|
53
|
+
return value as PipelineStatus;
|
|
54
|
+
}
|
|
55
|
+
|