@knowledge-stack/ksapi 1.120.0 → 1.121.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 +22 -8
- package/README.md +13 -6
- package/dist/esm/models/CreateThreadMessageRequest.d.ts +3 -3
- package/dist/esm/models/CreateThreadMessageRequest.js +3 -3
- package/dist/esm/models/DocEditPart.d.ts +122 -0
- package/dist/esm/models/DocEditPart.js +92 -0
- package/dist/esm/models/Input.d.ts +41 -0
- package/dist/esm/models/Input.js +32 -0
- package/dist/esm/models/MessageUsage.d.ts +53 -0
- package/dist/esm/models/MessageUsage.js +57 -0
- package/dist/esm/models/ReasoningPart.d.ts +84 -0
- package/dist/esm/models/ReasoningPart.js +71 -0
- package/dist/esm/models/{StepInput.d.ts → Step.d.ts} +16 -22
- package/dist/esm/models/{StepInput.js → Step.js} +9 -11
- package/dist/esm/models/StepKind.d.ts +0 -1
- package/dist/esm/models/StepKind.js +1 -2
- package/dist/esm/models/TextPart.d.ts +91 -0
- package/dist/esm/models/TextPart.js +74 -0
- package/dist/esm/models/TextPartOrReasoningPartOrToolPartOrDocEditPart.d.ts +33 -0
- package/dist/esm/models/TextPartOrReasoningPartOrToolPartOrDocEditPart.js +57 -0
- package/dist/esm/models/ThreadMessageDetails.d.ts +75 -0
- package/dist/esm/models/ThreadMessageDetails.js +58 -0
- package/dist/esm/models/ThreadMessageResponse.d.ts +10 -3
- package/dist/esm/models/ThreadMessageResponse.js +6 -3
- package/dist/esm/models/ToolPart.d.ts +130 -0
- package/dist/esm/models/ToolPart.js +89 -0
- package/dist/esm/models/ToolStatus.d.ts +27 -0
- package/dist/esm/models/ToolStatus.js +45 -0
- package/dist/esm/models/WorkflowRunAsset.d.ts +87 -0
- package/dist/esm/models/WorkflowRunAsset.js +66 -0
- package/dist/esm/models/WorkflowRunResponse.d.ts +22 -3
- package/dist/esm/models/WorkflowRunResponse.js +12 -3
- package/dist/esm/models/index.d.ts +11 -4
- package/dist/esm/models/index.js +11 -4
- package/dist/models/CreateThreadMessageRequest.d.ts +3 -3
- package/dist/models/CreateThreadMessageRequest.js +3 -3
- package/dist/models/DocEditPart.d.ts +122 -0
- package/dist/models/DocEditPart.js +100 -0
- package/dist/models/Input.d.ts +41 -0
- package/dist/models/Input.js +40 -0
- package/dist/models/MessageUsage.d.ts +53 -0
- package/dist/models/MessageUsage.js +65 -0
- package/dist/models/ReasoningPart.d.ts +84 -0
- package/dist/models/ReasoningPart.js +79 -0
- package/dist/models/{StepInput.d.ts → Step.d.ts} +16 -22
- package/dist/models/{StepInput.js → Step.js} +15 -17
- package/dist/models/StepKind.d.ts +0 -1
- package/dist/models/StepKind.js +1 -2
- package/dist/models/TextPart.d.ts +91 -0
- package/dist/models/TextPart.js +82 -0
- package/dist/models/TextPartOrReasoningPartOrToolPartOrDocEditPart.d.ts +33 -0
- package/dist/models/TextPartOrReasoningPartOrToolPartOrDocEditPart.js +63 -0
- package/dist/models/ThreadMessageDetails.d.ts +75 -0
- package/dist/models/ThreadMessageDetails.js +66 -0
- package/dist/models/ThreadMessageResponse.d.ts +10 -3
- package/dist/models/ThreadMessageResponse.js +6 -3
- package/dist/models/ToolPart.d.ts +130 -0
- package/dist/models/ToolPart.js +97 -0
- package/dist/models/ToolStatus.d.ts +27 -0
- package/dist/models/ToolStatus.js +53 -0
- package/dist/models/WorkflowRunAsset.d.ts +87 -0
- package/dist/models/WorkflowRunAsset.js +74 -0
- package/dist/models/WorkflowRunResponse.d.ts +22 -3
- package/dist/models/WorkflowRunResponse.js +12 -3
- package/dist/models/index.d.ts +11 -4
- package/dist/models/index.js +11 -4
- package/docs/CreateThreadMessageRequest.md +1 -1
- package/docs/DocEditPart.md +54 -0
- package/docs/FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.md +8 -2
- package/docs/{ThreadMessageDetailsInput.md → Input.md} +4 -10
- package/docs/MessageUsage.md +37 -0
- package/docs/{StepOutput.md → ReasoningPart.md} +10 -14
- package/docs/{StepInput.md → Step.md} +4 -6
- package/docs/TextPart.md +46 -0
- package/docs/TextPartOrReasoningPartOrToolPartOrDocEditPart.md +72 -0
- package/docs/{ThreadMessageDetailsOutput.md → ThreadMessageDetails.md} +9 -5
- package/docs/ThreadMessageResponse.md +3 -1
- package/docs/ToolPart.md +58 -0
- package/docs/ToolStatus.md +32 -0
- package/docs/WorkflowRunAsset.md +45 -0
- package/docs/WorkflowRunResponse.md +8 -2
- package/package.json +1 -1
- package/src/models/CreateThreadMessageRequest.ts +11 -11
- package/src/models/DocEditPart.ts +191 -0
- package/src/models/Input.ts +63 -0
- package/src/models/MessageUsage.ts +100 -0
- package/src/models/ReasoningPart.ts +140 -0
- package/src/models/{StepInput.ts → Step.ts} +18 -26
- package/src/models/StepKind.ts +1 -2
- package/src/models/TextPart.ts +156 -0
- package/src/models/TextPartOrReasoningPartOrToolPartOrDocEditPart.ts +94 -0
- package/src/models/ThreadMessageDetails.ts +146 -0
- package/src/models/ThreadMessageResponse.ts +25 -10
- package/src/models/ToolPart.ts +212 -0
- package/src/models/ToolStatus.ts +55 -0
- package/src/models/WorkflowRunAsset.ts +153 -0
- package/src/models/WorkflowRunResponse.ts +38 -6
- package/src/models/index.ts +11 -4
- package/dist/esm/models/StepOutput.d.ts +0 -91
- package/dist/esm/models/StepOutput.js +0 -66
- package/dist/esm/models/ThreadMessageDetailsInput.d.ts +0 -61
- package/dist/esm/models/ThreadMessageDetailsInput.js +0 -52
- package/dist/esm/models/ThreadMessageDetailsOutput.d.ts +0 -61
- package/dist/esm/models/ThreadMessageDetailsOutput.js +0 -52
- package/dist/models/StepOutput.d.ts +0 -91
- package/dist/models/StepOutput.js +0 -74
- package/dist/models/ThreadMessageDetailsInput.d.ts +0 -61
- package/dist/models/ThreadMessageDetailsInput.js +0 -60
- package/dist/models/ThreadMessageDetailsOutput.d.ts +0 -61
- package/dist/models/ThreadMessageDetailsOutput.js +0 -60
- package/src/models/StepOutput.ts +0 -159
- package/src/models/ThreadMessageDetailsInput.ts +0 -116
- package/src/models/ThreadMessageDetailsOutput.ts +0 -116
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
import { TextPartOrReasoningPartOrToolPartOrDocEditPartFromJSON, TextPartOrReasoningPartOrToolPartOrDocEditPartToJSON, } from './TextPartOrReasoningPartOrToolPartOrDocEditPart';
|
|
15
|
+
import { CheckpointDetailsFromJSON, CheckpointDetailsToJSON, } from './CheckpointDetails';
|
|
16
|
+
import { StepFromJSON, StepToJSON, } from './Step';
|
|
17
|
+
import { MessageUsageFromJSON, MessageUsageToJSON, } from './MessageUsage';
|
|
18
|
+
export const ThreadMessageDetailsPropertyValidationAttributesMap = {
|
|
19
|
+
modelId: {
|
|
20
|
+
maxLength: 64,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the ThreadMessageDetails interface.
|
|
25
|
+
*/
|
|
26
|
+
export function instanceOfThreadMessageDetails(value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
export function ThreadMessageDetailsFromJSON(json) {
|
|
30
|
+
return ThreadMessageDetailsFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
export function ThreadMessageDetailsFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'parts': json['parts'] == null ? undefined : (json['parts'].map(TextPartOrReasoningPartOrToolPartOrDocEditPartFromJSON)),
|
|
38
|
+
'usage': json['usage'] == null ? undefined : MessageUsageFromJSON(json['usage']),
|
|
39
|
+
'steps': json['steps'] == null ? undefined : (json['steps'].map(StepFromJSON)),
|
|
40
|
+
'checkpoint': json['checkpoint'] == null ? undefined : CheckpointDetailsFromJSON(json['checkpoint']),
|
|
41
|
+
'modelId': json['model_id'] == null ? undefined : json['model_id'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export function ThreadMessageDetailsToJSON(json) {
|
|
45
|
+
return ThreadMessageDetailsToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
export function ThreadMessageDetailsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'parts': value['parts'] == null ? undefined : (value['parts'].map(TextPartOrReasoningPartOrToolPartOrDocEditPartToJSON)),
|
|
53
|
+
'usage': MessageUsageToJSON(value['usage']),
|
|
54
|
+
'steps': value['steps'] == null ? undefined : (value['steps'].map(StepToJSON)),
|
|
55
|
+
'checkpoint': CheckpointDetailsToJSON(value['checkpoint']),
|
|
56
|
+
'model_id': value['modelId'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { EnrichedThreadMessageContent } from './EnrichedThreadMessageContent';
|
|
13
13
|
import type { MessageRole } from './MessageRole';
|
|
14
|
-
import type {
|
|
14
|
+
import type { TextPartOrReasoningPartOrToolPartOrDocEditPart } from './TextPartOrReasoningPartOrToolPartOrDocEditPart';
|
|
15
|
+
import type { ThreadMessageDetails } from './ThreadMessageDetails';
|
|
15
16
|
/**
|
|
16
17
|
*
|
|
17
18
|
* @export
|
|
@@ -50,10 +51,16 @@ export interface ThreadMessageResponse {
|
|
|
50
51
|
content: EnrichedThreadMessageContent;
|
|
51
52
|
/**
|
|
52
53
|
* Message details (None when not requested via with_details)
|
|
53
|
-
* @type {
|
|
54
|
+
* @type {ThreadMessageDetails}
|
|
54
55
|
* @memberof ThreadMessageResponse
|
|
55
56
|
*/
|
|
56
|
-
details?:
|
|
57
|
+
details?: ThreadMessageDetails | null;
|
|
58
|
+
/**
|
|
59
|
+
* Ordered content parts (text/reasoning/tool/doc_edit). Native rows return details.parts; legacy rows return a best-effort read-time projection of details.steps. Empty when details are not requested.
|
|
60
|
+
* @type {Array<TextPartOrReasoningPartOrToolPartOrDocEditPart>}
|
|
61
|
+
* @memberof ThreadMessageResponse
|
|
62
|
+
*/
|
|
63
|
+
parts?: Array<TextPartOrReasoningPartOrToolPartOrDocEditPart>;
|
|
57
64
|
/**
|
|
58
65
|
* Thread's PathPart ID
|
|
59
66
|
* @type {string}
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { EnrichedThreadMessageContentFromJSON, EnrichedThreadMessageContentToJSON, } from './EnrichedThreadMessageContent';
|
|
15
15
|
import { MessageRoleFromJSON, MessageRoleToJSON, } from './MessageRole';
|
|
16
|
-
import {
|
|
16
|
+
import { TextPartOrReasoningPartOrToolPartOrDocEditPartFromJSON, TextPartOrReasoningPartOrToolPartOrDocEditPartToJSON, } from './TextPartOrReasoningPartOrToolPartOrDocEditPart';
|
|
17
|
+
import { ThreadMessageDetailsFromJSON, ThreadMessageDetailsToJSON, } from './ThreadMessageDetails';
|
|
17
18
|
export const ThreadMessageResponsePropertyValidationAttributesMap = {};
|
|
18
19
|
/**
|
|
19
20
|
* Check if a given object implements the ThreadMessageResponse interface.
|
|
@@ -54,7 +55,8 @@ export function ThreadMessageResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
54
55
|
'sequence': json['sequence'],
|
|
55
56
|
'role': MessageRoleFromJSON(json['role']),
|
|
56
57
|
'content': EnrichedThreadMessageContentFromJSON(json['content']),
|
|
57
|
-
'details': json['details'] == null ? undefined :
|
|
58
|
+
'details': json['details'] == null ? undefined : ThreadMessageDetailsFromJSON(json['details']),
|
|
59
|
+
'parts': json['parts'] == null ? undefined : (json['parts'].map(TextPartOrReasoningPartOrToolPartOrDocEditPartFromJSON)),
|
|
58
60
|
'parentPathId': json['parent_path_id'],
|
|
59
61
|
'materializedPath': json['materialized_path'],
|
|
60
62
|
'tenantId': json['tenant_id'],
|
|
@@ -76,7 +78,8 @@ export function ThreadMessageResponseToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
76
78
|
'sequence': value['sequence'],
|
|
77
79
|
'role': MessageRoleToJSON(value['role']),
|
|
78
80
|
'content': EnrichedThreadMessageContentToJSON(value['content']),
|
|
79
|
-
'details':
|
|
81
|
+
'details': ThreadMessageDetailsToJSON(value['details']),
|
|
82
|
+
'parts': value['parts'] == null ? undefined : (value['parts'].map(TextPartOrReasoningPartOrToolPartOrDocEditPartToJSON)),
|
|
80
83
|
'parent_path_id': value['parentPathId'],
|
|
81
84
|
'materialized_path': value['materializedPath'],
|
|
82
85
|
'tenant_id': value['tenantId'],
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ToolStatus } from './ToolStatus';
|
|
13
|
+
import type { Input } from './Input';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface ToolPart
|
|
18
|
+
*/
|
|
19
|
+
export interface ToolPart {
|
|
20
|
+
/**
|
|
21
|
+
* Stable per-message part id (uuid)
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof ToolPart
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* 0-based order within the message
|
|
28
|
+
* @type {number}
|
|
29
|
+
* @memberof ToolPart
|
|
30
|
+
*/
|
|
31
|
+
seq: number;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {Date}
|
|
35
|
+
* @memberof ToolPart
|
|
36
|
+
*/
|
|
37
|
+
startTime: Date;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {Date}
|
|
41
|
+
* @memberof ToolPart
|
|
42
|
+
*/
|
|
43
|
+
endTime?: Date | null;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {ToolPartKindEnum}
|
|
47
|
+
* @memberof ToolPart
|
|
48
|
+
*/
|
|
49
|
+
kind?: ToolPartKindEnum;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof ToolPart
|
|
54
|
+
*/
|
|
55
|
+
toolCallId: string;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {string}
|
|
59
|
+
* @memberof ToolPart
|
|
60
|
+
*/
|
|
61
|
+
toolName: string;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @type {Input}
|
|
65
|
+
* @memberof ToolPart
|
|
66
|
+
*/
|
|
67
|
+
input?: Input | null;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {ToolStatus}
|
|
71
|
+
* @memberof ToolPart
|
|
72
|
+
*/
|
|
73
|
+
status?: ToolStatus;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @type {any}
|
|
77
|
+
* @memberof ToolPart
|
|
78
|
+
*/
|
|
79
|
+
result?: any | null;
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @type {boolean}
|
|
83
|
+
* @memberof ToolPart
|
|
84
|
+
*/
|
|
85
|
+
isError?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @type {number}
|
|
89
|
+
* @memberof ToolPart
|
|
90
|
+
*/
|
|
91
|
+
durationMs?: number | null;
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @type {{ [key: string]: any; }}
|
|
95
|
+
* @memberof ToolPart
|
|
96
|
+
*/
|
|
97
|
+
extras?: {
|
|
98
|
+
[key: string]: any;
|
|
99
|
+
} | null;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* @export
|
|
103
|
+
*/
|
|
104
|
+
export declare const ToolPartKindEnum: {
|
|
105
|
+
readonly Tool: "tool";
|
|
106
|
+
};
|
|
107
|
+
export type ToolPartKindEnum = typeof ToolPartKindEnum[keyof typeof ToolPartKindEnum];
|
|
108
|
+
export declare const ToolPartPropertyValidationAttributesMap: {
|
|
109
|
+
[property: string]: {
|
|
110
|
+
maxLength?: number;
|
|
111
|
+
minLength?: number;
|
|
112
|
+
pattern?: string;
|
|
113
|
+
maximum?: number;
|
|
114
|
+
exclusiveMaximum?: boolean;
|
|
115
|
+
minimum?: number;
|
|
116
|
+
exclusiveMinimum?: boolean;
|
|
117
|
+
multipleOf?: number;
|
|
118
|
+
maxItems?: number;
|
|
119
|
+
minItems?: number;
|
|
120
|
+
uniqueItems?: boolean;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Check if a given object implements the ToolPart interface.
|
|
125
|
+
*/
|
|
126
|
+
export declare function instanceOfToolPart(value: object): value is ToolPart;
|
|
127
|
+
export declare function ToolPartFromJSON(json: any): ToolPart;
|
|
128
|
+
export declare function ToolPartFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolPart;
|
|
129
|
+
export declare function ToolPartToJSON(json: any): ToolPart;
|
|
130
|
+
export declare function ToolPartToJSONTyped(value?: ToolPart | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
import { ToolStatusFromJSON, ToolStatusToJSON, } from './ToolStatus';
|
|
15
|
+
import { InputFromJSON, InputToJSON, } from './Input';
|
|
16
|
+
/**
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export const ToolPartKindEnum = {
|
|
20
|
+
Tool: 'tool'
|
|
21
|
+
};
|
|
22
|
+
export const ToolPartPropertyValidationAttributesMap = {
|
|
23
|
+
seq: {
|
|
24
|
+
minimum: 0,
|
|
25
|
+
exclusiveMinimum: false,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Check if a given object implements the ToolPart interface.
|
|
30
|
+
*/
|
|
31
|
+
export function instanceOfToolPart(value) {
|
|
32
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('seq' in value) || value['seq'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('startTime' in value) || value['startTime'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('toolCallId' in value) || value['toolCallId'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('toolName' in value) || value['toolName'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
export function ToolPartFromJSON(json) {
|
|
45
|
+
return ToolPartFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
export function ToolPartFromJSONTyped(json, ignoreDiscriminator) {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'id': json['id'],
|
|
53
|
+
'seq': json['seq'],
|
|
54
|
+
'startTime': (new Date(json['start_time'])),
|
|
55
|
+
'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
|
|
56
|
+
'kind': json['kind'] == null ? undefined : json['kind'],
|
|
57
|
+
'toolCallId': json['tool_call_id'],
|
|
58
|
+
'toolName': json['tool_name'],
|
|
59
|
+
'input': json['input'] == null ? undefined : InputFromJSON(json['input']),
|
|
60
|
+
'status': json['status'] == null ? undefined : ToolStatusFromJSON(json['status']),
|
|
61
|
+
'result': json['result'] == null ? undefined : json['result'],
|
|
62
|
+
'isError': json['is_error'] == null ? undefined : json['is_error'],
|
|
63
|
+
'durationMs': json['duration_ms'] == null ? undefined : json['duration_ms'],
|
|
64
|
+
'extras': json['extras'] == null ? undefined : json['extras'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export function ToolPartToJSON(json) {
|
|
68
|
+
return ToolPartToJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
export function ToolPartToJSONTyped(value, ignoreDiscriminator = false) {
|
|
71
|
+
if (value == null) {
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
'id': value['id'],
|
|
76
|
+
'seq': value['seq'],
|
|
77
|
+
'start_time': value['startTime'].toISOString(),
|
|
78
|
+
'end_time': value['endTime'] == null ? value['endTime'] : value['endTime'].toISOString(),
|
|
79
|
+
'kind': value['kind'],
|
|
80
|
+
'tool_call_id': value['toolCallId'],
|
|
81
|
+
'tool_name': value['toolName'],
|
|
82
|
+
'input': InputToJSON(value['input']),
|
|
83
|
+
'status': ToolStatusToJSON(value['status']),
|
|
84
|
+
'result': value['result'],
|
|
85
|
+
'is_error': value['isError'],
|
|
86
|
+
'duration_ms': value['durationMs'],
|
|
87
|
+
'extras': value['extras'],
|
|
88
|
+
};
|
|
89
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const ToolStatus: {
|
|
17
|
+
readonly Running: "running";
|
|
18
|
+
readonly Success: "success";
|
|
19
|
+
readonly Error: "error";
|
|
20
|
+
readonly Canceled: "canceled";
|
|
21
|
+
};
|
|
22
|
+
export type ToolStatus = typeof ToolStatus[keyof typeof ToolStatus];
|
|
23
|
+
export declare function instanceOfToolStatus(value: any): boolean;
|
|
24
|
+
export declare function ToolStatusFromJSON(json: any): ToolStatus;
|
|
25
|
+
export declare function ToolStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolStatus;
|
|
26
|
+
export declare function ToolStatusToJSON(value?: ToolStatus | null): any;
|
|
27
|
+
export declare function ToolStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): ToolStatus;
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const ToolStatus = {
|
|
19
|
+
Running: 'running',
|
|
20
|
+
Success: 'success',
|
|
21
|
+
Error: 'error',
|
|
22
|
+
Canceled: 'canceled'
|
|
23
|
+
};
|
|
24
|
+
export function instanceOfToolStatus(value) {
|
|
25
|
+
for (const key in ToolStatus) {
|
|
26
|
+
if (Object.prototype.hasOwnProperty.call(ToolStatus, key)) {
|
|
27
|
+
if (ToolStatus[key] === value) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
export function ToolStatusFromJSON(json) {
|
|
35
|
+
return ToolStatusFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function ToolStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
export function ToolStatusToJSON(value) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
export function ToolStatusToJSONTyped(value, ignoreDiscriminator) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { PartType } from './PartType';
|
|
13
|
+
import type { PathPartApprovalState } from './PathPartApprovalState';
|
|
14
|
+
/**
|
|
15
|
+
* One input or output file/reference of a run, actionable in one call.
|
|
16
|
+
*
|
|
17
|
+
* ``id`` is the PDO id (``path_part.metadata_obj_id``); ``path_part_id`` is
|
|
18
|
+
* the underlying path part (kept for approval-state / path-part lookups).
|
|
19
|
+
* Route on ``part_type`` to pick the API that takes ``id``: ``DOCUMENT`` →
|
|
20
|
+
* download_document / bulk-download (active version); ``DOCUMENT_VERSION`` →
|
|
21
|
+
* download_document_version (a version-pinned input, e.g. a cloned run's
|
|
22
|
+
* inputs); ``FOLDER`` / ``DATA_SOURCE`` / ``API_CONNECTION`` → list/query via
|
|
23
|
+
* that type's endpoint. Output assets are always ``DOCUMENT``.
|
|
24
|
+
* @export
|
|
25
|
+
* @interface WorkflowRunAsset
|
|
26
|
+
*/
|
|
27
|
+
export interface WorkflowRunAsset {
|
|
28
|
+
/**
|
|
29
|
+
* PDO id accepted by the download / list-contents APIs
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof WorkflowRunAsset
|
|
32
|
+
*/
|
|
33
|
+
id: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof WorkflowRunAsset
|
|
38
|
+
*/
|
|
39
|
+
pathPartId: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof WorkflowRunAsset
|
|
44
|
+
*/
|
|
45
|
+
name: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {PartType}
|
|
49
|
+
* @memberof WorkflowRunAsset
|
|
50
|
+
*/
|
|
51
|
+
partType: PartType;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof WorkflowRunAsset
|
|
56
|
+
*/
|
|
57
|
+
materializedPath: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {PathPartApprovalState}
|
|
61
|
+
* @memberof WorkflowRunAsset
|
|
62
|
+
*/
|
|
63
|
+
approvalState: PathPartApprovalState;
|
|
64
|
+
}
|
|
65
|
+
export declare const WorkflowRunAssetPropertyValidationAttributesMap: {
|
|
66
|
+
[property: string]: {
|
|
67
|
+
maxLength?: number;
|
|
68
|
+
minLength?: number;
|
|
69
|
+
pattern?: string;
|
|
70
|
+
maximum?: number;
|
|
71
|
+
exclusiveMaximum?: boolean;
|
|
72
|
+
minimum?: number;
|
|
73
|
+
exclusiveMinimum?: boolean;
|
|
74
|
+
multipleOf?: number;
|
|
75
|
+
maxItems?: number;
|
|
76
|
+
minItems?: number;
|
|
77
|
+
uniqueItems?: boolean;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Check if a given object implements the WorkflowRunAsset interface.
|
|
82
|
+
*/
|
|
83
|
+
export declare function instanceOfWorkflowRunAsset(value: object): value is WorkflowRunAsset;
|
|
84
|
+
export declare function WorkflowRunAssetFromJSON(json: any): WorkflowRunAsset;
|
|
85
|
+
export declare function WorkflowRunAssetFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkflowRunAsset;
|
|
86
|
+
export declare function WorkflowRunAssetToJSON(json: any): WorkflowRunAsset;
|
|
87
|
+
export declare function WorkflowRunAssetToJSONTyped(value?: WorkflowRunAsset | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
import { PartTypeFromJSON, PartTypeToJSON, } from './PartType';
|
|
15
|
+
import { PathPartApprovalStateFromJSON, PathPartApprovalStateToJSON, } from './PathPartApprovalState';
|
|
16
|
+
export const WorkflowRunAssetPropertyValidationAttributesMap = {};
|
|
17
|
+
/**
|
|
18
|
+
* Check if a given object implements the WorkflowRunAsset interface.
|
|
19
|
+
*/
|
|
20
|
+
export function instanceOfWorkflowRunAsset(value) {
|
|
21
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('partType' in value) || value['partType'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('materializedPath' in value) || value['materializedPath'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('approvalState' in value) || value['approvalState'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
export function WorkflowRunAssetFromJSON(json) {
|
|
36
|
+
return WorkflowRunAssetFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
export function WorkflowRunAssetFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'id': json['id'],
|
|
44
|
+
'pathPartId': json['path_part_id'],
|
|
45
|
+
'name': json['name'],
|
|
46
|
+
'partType': PartTypeFromJSON(json['part_type']),
|
|
47
|
+
'materializedPath': json['materialized_path'],
|
|
48
|
+
'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export function WorkflowRunAssetToJSON(json) {
|
|
52
|
+
return WorkflowRunAssetToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
export function WorkflowRunAssetToJSONTyped(value, ignoreDiscriminator = false) {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'id': value['id'],
|
|
60
|
+
'path_part_id': value['pathPartId'],
|
|
61
|
+
'name': value['name'],
|
|
62
|
+
'part_type': PartTypeToJSON(value['partType']),
|
|
63
|
+
'materialized_path': value['materializedPath'],
|
|
64
|
+
'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ItemPermissions } from './ItemPermissions';
|
|
13
|
+
import type { WorkflowRunAsset } from './WorkflowRunAsset';
|
|
13
14
|
import type { WorkflowRunSnapshot } from './WorkflowRunSnapshot';
|
|
14
15
|
import type { WorkflowExecutionState } from './WorkflowExecutionState';
|
|
15
16
|
import type { ExcludedCommonFile } from './ExcludedCommonFile';
|
|
@@ -158,11 +159,29 @@ export interface WorkflowRunResponse {
|
|
|
158
159
|
*/
|
|
159
160
|
inputPathPartIds?: Array<string>;
|
|
160
161
|
/**
|
|
161
|
-
*
|
|
162
|
-
* @type {Array<
|
|
162
|
+
* Generated files under ``outputs/`` (recursing nested folders), each carrying the DOCUMENT PDO ``id`` to feed straight to download / bulk-download. Empty until the run produces output.
|
|
163
|
+
* @type {Array<WorkflowRunAsset>}
|
|
164
|
+
* @memberof WorkflowRunResponse
|
|
165
|
+
*/
|
|
166
|
+
outputAssets?: Array<WorkflowRunAsset>;
|
|
167
|
+
/**
|
|
168
|
+
* The run's input context: pinned KB references (``input_path_part_ids``) plus any files uploaded under ``inputs/``, each resolved to its PDO ``id`` + metadata.
|
|
169
|
+
* @type {Array<WorkflowRunAsset>}
|
|
170
|
+
* @memberof WorkflowRunResponse
|
|
171
|
+
*/
|
|
172
|
+
inputAssets?: Array<WorkflowRunAsset>;
|
|
173
|
+
/**
|
|
174
|
+
* Full materialized path of the run's ``inputs/`` folder
|
|
175
|
+
* @type {string}
|
|
176
|
+
* @memberof WorkflowRunResponse
|
|
177
|
+
*/
|
|
178
|
+
inputsPath: string;
|
|
179
|
+
/**
|
|
180
|
+
* Full materialized path of the run's ``outputs/`` folder
|
|
181
|
+
* @type {string}
|
|
163
182
|
* @memberof WorkflowRunResponse
|
|
164
183
|
*/
|
|
165
|
-
|
|
184
|
+
outputsPath: string;
|
|
166
185
|
/**
|
|
167
186
|
* Definition common files that were excluded from this run at Start (deleted or unreadable by the starter). Empty until Start builds the snapshot, and empty for the common happy path.
|
|
168
187
|
* @type {Array<ExcludedCommonFile>}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { ItemPermissionsFromJSON, ItemPermissionsToJSON, } from './ItemPermissions';
|
|
15
|
+
import { WorkflowRunAssetFromJSON, WorkflowRunAssetToJSON, } from './WorkflowRunAsset';
|
|
15
16
|
import { WorkflowRunSnapshotFromJSON, WorkflowRunSnapshotToJSON, } from './WorkflowRunSnapshot';
|
|
16
17
|
import { WorkflowExecutionStateFromJSON, WorkflowExecutionStateToJSON, } from './WorkflowExecutionState';
|
|
17
18
|
import { ExcludedCommonFileFromJSON, ExcludedCommonFileToJSON, } from './ExcludedCommonFile';
|
|
@@ -64,7 +65,9 @@ export function instanceOfWorkflowRunResponse(value) {
|
|
|
64
65
|
return false;
|
|
65
66
|
if (!('discussionsPathPartId' in value) || value['discussionsPathPartId'] === undefined)
|
|
66
67
|
return false;
|
|
67
|
-
if (!('
|
|
68
|
+
if (!('inputsPath' in value) || value['inputsPath'] === undefined)
|
|
69
|
+
return false;
|
|
70
|
+
if (!('outputsPath' in value) || value['outputsPath'] === undefined)
|
|
68
71
|
return false;
|
|
69
72
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
70
73
|
return false;
|
|
@@ -101,7 +104,10 @@ export function WorkflowRunResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
101
104
|
'outputsPathPartId': json['outputs_path_part_id'],
|
|
102
105
|
'discussionsPathPartId': json['discussions_path_part_id'],
|
|
103
106
|
'inputPathPartIds': json['input_path_part_ids'] == null ? undefined : json['input_path_part_ids'],
|
|
104
|
-
'
|
|
107
|
+
'outputAssets': json['output_assets'] == null ? undefined : (json['output_assets'].map(WorkflowRunAssetFromJSON)),
|
|
108
|
+
'inputAssets': json['input_assets'] == null ? undefined : (json['input_assets'].map(WorkflowRunAssetFromJSON)),
|
|
109
|
+
'inputsPath': json['inputs_path'],
|
|
110
|
+
'outputsPath': json['outputs_path'],
|
|
105
111
|
'excludedCommonFiles': json['excluded_common_files'] == null ? undefined : (json['excluded_common_files'].map(ExcludedCommonFileFromJSON)),
|
|
106
112
|
'runThreadId': json['run_thread_id'] == null ? undefined : json['run_thread_id'],
|
|
107
113
|
'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
|
|
@@ -139,7 +145,10 @@ export function WorkflowRunResponseToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
139
145
|
'outputs_path_part_id': value['outputsPathPartId'],
|
|
140
146
|
'discussions_path_part_id': value['discussionsPathPartId'],
|
|
141
147
|
'input_path_part_ids': value['inputPathPartIds'],
|
|
142
|
-
'
|
|
148
|
+
'output_assets': value['outputAssets'] == null ? undefined : (value['outputAssets'].map(WorkflowRunAssetToJSON)),
|
|
149
|
+
'input_assets': value['inputAssets'] == null ? undefined : (value['inputAssets'].map(WorkflowRunAssetToJSON)),
|
|
150
|
+
'inputs_path': value['inputsPath'],
|
|
151
|
+
'outputs_path': value['outputsPath'],
|
|
143
152
|
'excluded_common_files': value['excludedCommonFiles'] == null ? undefined : (value['excludedCommonFiles'].map(ExcludedCommonFileToJSON)),
|
|
144
153
|
'run_thread_id': value['runThreadId'],
|
|
145
154
|
'owner': UserInfoToJSON(value['owner']),
|