@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.
Files changed (113) hide show
  1. package/.openapi-generator/FILES +22 -8
  2. package/README.md +13 -6
  3. package/dist/esm/models/CreateThreadMessageRequest.d.ts +3 -3
  4. package/dist/esm/models/CreateThreadMessageRequest.js +3 -3
  5. package/dist/esm/models/DocEditPart.d.ts +122 -0
  6. package/dist/esm/models/DocEditPart.js +92 -0
  7. package/dist/esm/models/Input.d.ts +41 -0
  8. package/dist/esm/models/Input.js +32 -0
  9. package/dist/esm/models/MessageUsage.d.ts +53 -0
  10. package/dist/esm/models/MessageUsage.js +57 -0
  11. package/dist/esm/models/ReasoningPart.d.ts +84 -0
  12. package/dist/esm/models/ReasoningPart.js +71 -0
  13. package/dist/esm/models/{StepInput.d.ts → Step.d.ts} +16 -22
  14. package/dist/esm/models/{StepInput.js → Step.js} +9 -11
  15. package/dist/esm/models/StepKind.d.ts +0 -1
  16. package/dist/esm/models/StepKind.js +1 -2
  17. package/dist/esm/models/TextPart.d.ts +91 -0
  18. package/dist/esm/models/TextPart.js +74 -0
  19. package/dist/esm/models/TextPartOrReasoningPartOrToolPartOrDocEditPart.d.ts +33 -0
  20. package/dist/esm/models/TextPartOrReasoningPartOrToolPartOrDocEditPart.js +57 -0
  21. package/dist/esm/models/ThreadMessageDetails.d.ts +75 -0
  22. package/dist/esm/models/ThreadMessageDetails.js +58 -0
  23. package/dist/esm/models/ThreadMessageResponse.d.ts +10 -3
  24. package/dist/esm/models/ThreadMessageResponse.js +6 -3
  25. package/dist/esm/models/ToolPart.d.ts +130 -0
  26. package/dist/esm/models/ToolPart.js +89 -0
  27. package/dist/esm/models/ToolStatus.d.ts +27 -0
  28. package/dist/esm/models/ToolStatus.js +45 -0
  29. package/dist/esm/models/WorkflowRunAsset.d.ts +87 -0
  30. package/dist/esm/models/WorkflowRunAsset.js +66 -0
  31. package/dist/esm/models/WorkflowRunResponse.d.ts +22 -3
  32. package/dist/esm/models/WorkflowRunResponse.js +12 -3
  33. package/dist/esm/models/index.d.ts +11 -4
  34. package/dist/esm/models/index.js +11 -4
  35. package/dist/models/CreateThreadMessageRequest.d.ts +3 -3
  36. package/dist/models/CreateThreadMessageRequest.js +3 -3
  37. package/dist/models/DocEditPart.d.ts +122 -0
  38. package/dist/models/DocEditPart.js +100 -0
  39. package/dist/models/Input.d.ts +41 -0
  40. package/dist/models/Input.js +40 -0
  41. package/dist/models/MessageUsage.d.ts +53 -0
  42. package/dist/models/MessageUsage.js +65 -0
  43. package/dist/models/ReasoningPart.d.ts +84 -0
  44. package/dist/models/ReasoningPart.js +79 -0
  45. package/dist/models/{StepInput.d.ts → Step.d.ts} +16 -22
  46. package/dist/models/{StepInput.js → Step.js} +15 -17
  47. package/dist/models/StepKind.d.ts +0 -1
  48. package/dist/models/StepKind.js +1 -2
  49. package/dist/models/TextPart.d.ts +91 -0
  50. package/dist/models/TextPart.js +82 -0
  51. package/dist/models/TextPartOrReasoningPartOrToolPartOrDocEditPart.d.ts +33 -0
  52. package/dist/models/TextPartOrReasoningPartOrToolPartOrDocEditPart.js +63 -0
  53. package/dist/models/ThreadMessageDetails.d.ts +75 -0
  54. package/dist/models/ThreadMessageDetails.js +66 -0
  55. package/dist/models/ThreadMessageResponse.d.ts +10 -3
  56. package/dist/models/ThreadMessageResponse.js +6 -3
  57. package/dist/models/ToolPart.d.ts +130 -0
  58. package/dist/models/ToolPart.js +97 -0
  59. package/dist/models/ToolStatus.d.ts +27 -0
  60. package/dist/models/ToolStatus.js +53 -0
  61. package/dist/models/WorkflowRunAsset.d.ts +87 -0
  62. package/dist/models/WorkflowRunAsset.js +74 -0
  63. package/dist/models/WorkflowRunResponse.d.ts +22 -3
  64. package/dist/models/WorkflowRunResponse.js +12 -3
  65. package/dist/models/index.d.ts +11 -4
  66. package/dist/models/index.js +11 -4
  67. package/docs/CreateThreadMessageRequest.md +1 -1
  68. package/docs/DocEditPart.md +54 -0
  69. package/docs/FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.md +8 -2
  70. package/docs/{ThreadMessageDetailsInput.md → Input.md} +4 -10
  71. package/docs/MessageUsage.md +37 -0
  72. package/docs/{StepOutput.md → ReasoningPart.md} +10 -14
  73. package/docs/{StepInput.md → Step.md} +4 -6
  74. package/docs/TextPart.md +46 -0
  75. package/docs/TextPartOrReasoningPartOrToolPartOrDocEditPart.md +72 -0
  76. package/docs/{ThreadMessageDetailsOutput.md → ThreadMessageDetails.md} +9 -5
  77. package/docs/ThreadMessageResponse.md +3 -1
  78. package/docs/ToolPart.md +58 -0
  79. package/docs/ToolStatus.md +32 -0
  80. package/docs/WorkflowRunAsset.md +45 -0
  81. package/docs/WorkflowRunResponse.md +8 -2
  82. package/package.json +1 -1
  83. package/src/models/CreateThreadMessageRequest.ts +11 -11
  84. package/src/models/DocEditPart.ts +191 -0
  85. package/src/models/Input.ts +63 -0
  86. package/src/models/MessageUsage.ts +100 -0
  87. package/src/models/ReasoningPart.ts +140 -0
  88. package/src/models/{StepInput.ts → Step.ts} +18 -26
  89. package/src/models/StepKind.ts +1 -2
  90. package/src/models/TextPart.ts +156 -0
  91. package/src/models/TextPartOrReasoningPartOrToolPartOrDocEditPart.ts +94 -0
  92. package/src/models/ThreadMessageDetails.ts +146 -0
  93. package/src/models/ThreadMessageResponse.ts +25 -10
  94. package/src/models/ToolPart.ts +212 -0
  95. package/src/models/ToolStatus.ts +55 -0
  96. package/src/models/WorkflowRunAsset.ts +153 -0
  97. package/src/models/WorkflowRunResponse.ts +38 -6
  98. package/src/models/index.ts +11 -4
  99. package/dist/esm/models/StepOutput.d.ts +0 -91
  100. package/dist/esm/models/StepOutput.js +0 -66
  101. package/dist/esm/models/ThreadMessageDetailsInput.d.ts +0 -61
  102. package/dist/esm/models/ThreadMessageDetailsInput.js +0 -52
  103. package/dist/esm/models/ThreadMessageDetailsOutput.d.ts +0 -61
  104. package/dist/esm/models/ThreadMessageDetailsOutput.js +0 -52
  105. package/dist/models/StepOutput.d.ts +0 -91
  106. package/dist/models/StepOutput.js +0 -74
  107. package/dist/models/ThreadMessageDetailsInput.d.ts +0 -61
  108. package/dist/models/ThreadMessageDetailsInput.js +0 -60
  109. package/dist/models/ThreadMessageDetailsOutput.d.ts +0 -61
  110. package/dist/models/ThreadMessageDetailsOutput.js +0 -60
  111. package/src/models/StepOutput.ts +0 -159
  112. package/src/models/ThreadMessageDetailsInput.ts +0 -116
  113. package/src/models/ThreadMessageDetailsOutput.ts +0 -116
@@ -31,61 +31,55 @@ import {
31
31
  /**
32
32
  *
33
33
  * @export
34
- * @interface StepInput
34
+ * @interface Step
35
35
  */
36
- export interface StepInput {
36
+ export interface Step {
37
37
  /**
38
38
  * Stable step identifier within the message
39
39
  * @type {string}
40
- * @memberof StepInput
40
+ * @memberof Step
41
41
  */
42
42
  id: string;
43
43
  /**
44
44
  * The name of the step
45
45
  * @type {string}
46
- * @memberof StepInput
46
+ * @memberof Step
47
47
  */
48
48
  name: string;
49
49
  /**
50
50
  *
51
51
  * @type {StepKind}
52
- * @memberof StepInput
52
+ * @memberof Step
53
53
  */
54
54
  kind: StepKind;
55
55
  /**
56
56
  *
57
57
  * @type {Args}
58
- * @memberof StepInput
58
+ * @memberof Step
59
59
  */
60
60
  args?: Args | null;
61
61
  /**
62
62
  *
63
63
  * @type {string}
64
- * @memberof StepInput
64
+ * @memberof Step
65
65
  */
66
66
  detail?: string | null;
67
67
  /**
68
68
  * The start time of the step
69
69
  * @type {Date}
70
- * @memberof StepInput
70
+ * @memberof Step
71
71
  */
72
72
  startTime: Date;
73
73
  /**
74
74
  *
75
75
  * @type {Date}
76
- * @memberof StepInput
76
+ * @memberof Step
77
77
  */
78
78
  endTime?: Date | null;
79
- /**
80
- *
81
- * @type {Array<StepInput>}
82
- * @memberof StepInput
83
- */
84
- steps?: Array<StepInput> | null;
85
79
  }
86
80
 
87
81
 
88
- export const StepInputPropertyValidationAttributesMap: {
82
+ export const StepPropertyValidationAttributesMap: {
89
83
  [property: string]: {
90
84
  maxLength?: number,
91
85
  minLength?: number,
@@ -104,9 +98,9 @@ export const StepInputPropertyValidationAttributesMap: {
104
98
 
105
99
 
106
100
  /**
107
- * Check if a given object implements the StepInput interface.
101
+ * Check if a given object implements the Step interface.
108
102
  */
109
- export function instanceOfStepInput(value: object): value is StepInput {
103
+ export function instanceOfStep(value: object): value is Step {
110
104
  if (!('id' in value) || value['id'] === undefined) return false;
111
105
  if (!('name' in value) || value['name'] === undefined) return false;
112
106
  if (!('kind' in value) || value['kind'] === undefined) return false;
@@ -114,11 +108,11 @@ export function instanceOfStepInput(value: object): value is StepInput {
114
108
  return true;
115
109
  }
116
110
 
117
- export function StepInputFromJSON(json: any): StepInput {
118
- return StepInputFromJSONTyped(json, false);
111
+ export function StepFromJSON(json: any): Step {
112
+ return StepFromJSONTyped(json, false);
119
113
  }
120
114
 
121
- export function StepInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): StepInput {
115
+ export function StepFromJSONTyped(json: any, ignoreDiscriminator: boolean): Step {
122
116
  if (json == null) {
123
117
  return json;
124
118
  }
@@ -131,15 +125,14 @@ export function StepInputFromJSONTyped(json: any, ignoreDiscriminator: boolean):
131
125
  'detail': json['detail'] == null ? undefined : json['detail'],
132
126
  'startTime': (new Date(json['start_time'])),
133
127
  'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
134
- 'steps': json['steps'] == null ? undefined : ((json['steps'] as Array<any>).map(StepInputFromJSON)),
135
128
  };
136
129
  }
137
130
 
138
- export function StepInputToJSON(json: any): StepInput {
139
- return StepInputToJSONTyped(json, false);
131
+ export function StepToJSON(json: any): Step {
132
+ return StepToJSONTyped(json, false);
140
133
  }
141
134
 
142
- export function StepInputToJSONTyped(value?: StepInput | null, ignoreDiscriminator: boolean = false): any {
135
+ export function StepToJSONTyped(value?: Step | null, ignoreDiscriminator: boolean = false): any {
143
136
  if (value == null) {
144
137
  return value;
145
138
  }
@@ -153,7 +146,6 @@ export function StepInputToJSONTyped(value?: StepInput | null, ignoreDiscriminat
153
146
  'detail': value['detail'],
154
147
  'start_time': value['startTime'].toISOString(),
155
148
  'end_time': value['endTime'] == null ? value['endTime'] : value['endTime'].toISOString(),
156
- 'steps': value['steps'] == null ? undefined : ((value['steps'] as Array<any>).map(StepInputToJSON)),
157
149
  };
158
150
  }
159
151
 
@@ -19,8 +19,7 @@
19
19
  */
20
20
  export const StepKind = {
21
21
  Reasoning: 'reasoning',
22
- ToolCall: 'tool_call',
23
- Subagent: 'subagent'
22
+ ToolCall: 'tool_call'
24
23
  } as const;
25
24
  export type StepKind = typeof StepKind[keyof typeof StepKind];
26
25
 
@@ -0,0 +1,156 @@
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 { Citation } from './Citation';
17
+ import {
18
+ CitationFromJSON,
19
+ CitationFromJSONTyped,
20
+ CitationToJSON,
21
+ CitationToJSONTyped,
22
+ } from './Citation';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface TextPart
28
+ */
29
+ export interface TextPart {
30
+ /**
31
+ * Stable per-message part id (uuid)
32
+ * @type {string}
33
+ * @memberof TextPart
34
+ */
35
+ id: string;
36
+ /**
37
+ * 0-based order within the message
38
+ * @type {number}
39
+ * @memberof TextPart
40
+ */
41
+ seq: number;
42
+ /**
43
+ *
44
+ * @type {Date}
45
+ * @memberof TextPart
46
+ */
47
+ startTime: Date;
48
+ /**
49
+ *
50
+ * @type {Date}
51
+ * @memberof TextPart
52
+ */
53
+ endTime?: Date | null;
54
+ /**
55
+ *
56
+ * @type {TextPartKindEnum}
57
+ * @memberof TextPart
58
+ */
59
+ kind?: TextPartKindEnum;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof TextPart
64
+ */
65
+ text: string;
66
+ /**
67
+ *
68
+ * @type {Array<Citation>}
69
+ * @memberof TextPart
70
+ */
71
+ citations?: Array<Citation> | null;
72
+ }
73
+
74
+
75
+ /**
76
+ * @export
77
+ */
78
+ export const TextPartKindEnum = {
79
+ Text: 'text'
80
+ } as const;
81
+ export type TextPartKindEnum = typeof TextPartKindEnum[keyof typeof TextPartKindEnum];
82
+
83
+ export const TextPartPropertyValidationAttributesMap: {
84
+ [property: string]: {
85
+ maxLength?: number,
86
+ minLength?: number,
87
+ pattern?: string,
88
+ maximum?: number,
89
+ exclusiveMaximum?: boolean,
90
+ minimum?: number,
91
+ exclusiveMinimum?: boolean,
92
+ multipleOf?: number,
93
+ maxItems?: number,
94
+ minItems?: number,
95
+ uniqueItems?: boolean
96
+ }
97
+ } = {
98
+ seq: {
99
+ minimum: 0,
100
+ exclusiveMinimum: false,
101
+ },
102
+ }
103
+
104
+
105
+ /**
106
+ * Check if a given object implements the TextPart interface.
107
+ */
108
+ export function instanceOfTextPart(value: object): value is TextPart {
109
+ if (!('id' in value) || value['id'] === undefined) return false;
110
+ if (!('seq' in value) || value['seq'] === undefined) return false;
111
+ if (!('startTime' in value) || value['startTime'] === undefined) return false;
112
+ if (!('text' in value) || value['text'] === undefined) return false;
113
+ return true;
114
+ }
115
+
116
+ export function TextPartFromJSON(json: any): TextPart {
117
+ return TextPartFromJSONTyped(json, false);
118
+ }
119
+
120
+ export function TextPartFromJSONTyped(json: any, ignoreDiscriminator: boolean): TextPart {
121
+ if (json == null) {
122
+ return json;
123
+ }
124
+ return {
125
+
126
+ 'id': json['id'],
127
+ 'seq': json['seq'],
128
+ 'startTime': (new Date(json['start_time'])),
129
+ 'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
130
+ 'kind': json['kind'] == null ? undefined : json['kind'],
131
+ 'text': json['text'],
132
+ 'citations': json['citations'] == null ? undefined : ((json['citations'] as Array<any>).map(CitationFromJSON)),
133
+ };
134
+ }
135
+
136
+ export function TextPartToJSON(json: any): TextPart {
137
+ return TextPartToJSONTyped(json, false);
138
+ }
139
+
140
+ export function TextPartToJSONTyped(value?: TextPart | null, ignoreDiscriminator: boolean = false): any {
141
+ if (value == null) {
142
+ return value;
143
+ }
144
+
145
+ return {
146
+
147
+ 'id': value['id'],
148
+ 'seq': value['seq'],
149
+ 'start_time': value['startTime'].toISOString(),
150
+ 'end_time': value['endTime'] == null ? value['endTime'] : value['endTime'].toISOString(),
151
+ 'kind': value['kind'],
152
+ 'text': value['text'],
153
+ 'citations': value['citations'] == null ? undefined : ((value['citations'] as Array<any>).map(CitationToJSON)),
154
+ };
155
+ }
156
+
@@ -0,0 +1,94 @@
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 type { DocEditPart } from './DocEditPart';
16
+ import {
17
+ instanceOfDocEditPart,
18
+ DocEditPartFromJSON,
19
+ DocEditPartFromJSONTyped,
20
+ DocEditPartToJSON,
21
+ } from './DocEditPart';
22
+ import type { ReasoningPart } from './ReasoningPart';
23
+ import {
24
+ instanceOfReasoningPart,
25
+ ReasoningPartFromJSON,
26
+ ReasoningPartFromJSONTyped,
27
+ ReasoningPartToJSON,
28
+ } from './ReasoningPart';
29
+ import type { TextPart } from './TextPart';
30
+ import {
31
+ instanceOfTextPart,
32
+ TextPartFromJSON,
33
+ TextPartFromJSONTyped,
34
+ TextPartToJSON,
35
+ } from './TextPart';
36
+ import type { ToolPart } from './ToolPart';
37
+ import {
38
+ instanceOfToolPart,
39
+ ToolPartFromJSON,
40
+ ToolPartFromJSONTyped,
41
+ ToolPartToJSON,
42
+ } from './ToolPart';
43
+
44
+ /**
45
+ * @type TextPartOrReasoningPartOrToolPartOrDocEditPart
46
+ *
47
+ * @export
48
+ */
49
+ export type TextPartOrReasoningPartOrToolPartOrDocEditPart = { kind: 'doc_edit' } & DocEditPart | { kind: 'reasoning' } & ReasoningPart | { kind: 'text' } & TextPart | { kind: 'tool' } & ToolPart;
50
+
51
+ export function TextPartOrReasoningPartOrToolPartOrDocEditPartFromJSON(json: any): TextPartOrReasoningPartOrToolPartOrDocEditPart {
52
+ return TextPartOrReasoningPartOrToolPartOrDocEditPartFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function TextPartOrReasoningPartOrToolPartOrDocEditPartFromJSONTyped(json: any, ignoreDiscriminator: boolean): TextPartOrReasoningPartOrToolPartOrDocEditPart {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ switch (json['kind']) {
60
+ case 'doc_edit':
61
+ return Object.assign({}, DocEditPartFromJSONTyped(json, true), { kind: 'doc_edit' } as const);
62
+ case 'reasoning':
63
+ return Object.assign({}, ReasoningPartFromJSONTyped(json, true), { kind: 'reasoning' } as const);
64
+ case 'text':
65
+ return Object.assign({}, TextPartFromJSONTyped(json, true), { kind: 'text' } as const);
66
+ case 'tool':
67
+ return Object.assign({}, ToolPartFromJSONTyped(json, true), { kind: 'tool' } as const);
68
+ default:
69
+ return json;
70
+ }
71
+ }
72
+
73
+ export function TextPartOrReasoningPartOrToolPartOrDocEditPartToJSON(json: any): any {
74
+ return TextPartOrReasoningPartOrToolPartOrDocEditPartToJSONTyped(json, false);
75
+ }
76
+
77
+ export function TextPartOrReasoningPartOrToolPartOrDocEditPartToJSONTyped(value?: TextPartOrReasoningPartOrToolPartOrDocEditPart | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+ switch (value['kind']) {
82
+ case 'doc_edit':
83
+ return Object.assign({}, DocEditPartToJSON(value), { kind: 'doc_edit' } as const);
84
+ case 'reasoning':
85
+ return Object.assign({}, ReasoningPartToJSON(value), { kind: 'reasoning' } as const);
86
+ case 'text':
87
+ return Object.assign({}, TextPartToJSON(value), { kind: 'text' } as const);
88
+ case 'tool':
89
+ return Object.assign({}, ToolPartToJSON(value), { kind: 'tool' } as const);
90
+ default:
91
+ return value;
92
+ }
93
+ }
94
+
@@ -0,0 +1,146 @@
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 { TextPartOrReasoningPartOrToolPartOrDocEditPart } from './TextPartOrReasoningPartOrToolPartOrDocEditPart';
17
+ import {
18
+ TextPartOrReasoningPartOrToolPartOrDocEditPartFromJSON,
19
+ TextPartOrReasoningPartOrToolPartOrDocEditPartFromJSONTyped,
20
+ TextPartOrReasoningPartOrToolPartOrDocEditPartToJSON,
21
+ TextPartOrReasoningPartOrToolPartOrDocEditPartToJSONTyped,
22
+ } from './TextPartOrReasoningPartOrToolPartOrDocEditPart';
23
+ import type { CheckpointDetails } from './CheckpointDetails';
24
+ import {
25
+ CheckpointDetailsFromJSON,
26
+ CheckpointDetailsFromJSONTyped,
27
+ CheckpointDetailsToJSON,
28
+ CheckpointDetailsToJSONTyped,
29
+ } from './CheckpointDetails';
30
+ import type { Step } from './Step';
31
+ import {
32
+ StepFromJSON,
33
+ StepFromJSONTyped,
34
+ StepToJSON,
35
+ StepToJSONTyped,
36
+ } from './Step';
37
+ import type { MessageUsage } from './MessageUsage';
38
+ import {
39
+ MessageUsageFromJSON,
40
+ MessageUsageFromJSONTyped,
41
+ MessageUsageToJSON,
42
+ MessageUsageToJSONTyped,
43
+ } from './MessageUsage';
44
+
45
+ /**
46
+ *
47
+ * @export
48
+ * @interface ThreadMessageDetails
49
+ */
50
+ export interface ThreadMessageDetails {
51
+ /**
52
+ *
53
+ * @type {Array<TextPartOrReasoningPartOrToolPartOrDocEditPart>}
54
+ * @memberof ThreadMessageDetails
55
+ */
56
+ parts?: Array<TextPartOrReasoningPartOrToolPartOrDocEditPart>;
57
+ /**
58
+ *
59
+ * @type {MessageUsage}
60
+ * @memberof ThreadMessageDetails
61
+ */
62
+ usage?: MessageUsage | null;
63
+ /**
64
+ *
65
+ * @type {Array<Step>}
66
+ * @memberof ThreadMessageDetails
67
+ */
68
+ steps?: Array<Step>;
69
+ /**
70
+ * Agent history checkpoint. Present only on role=SYSTEM messages written by the agent's archival path.
71
+ * @type {CheckpointDetails}
72
+ * @memberof ThreadMessageDetails
73
+ */
74
+ checkpoint?: CheckpointDetails | null;
75
+ /**
76
+ * Model registry id (FE-stable, e.g. ``qwen-flash``) that produced this assistant message. ``None`` for legacy rows that pre-date model selection.
77
+ * @type {string}
78
+ * @memberof ThreadMessageDetails
79
+ */
80
+ modelId?: string | null;
81
+ }
82
+ export const ThreadMessageDetailsPropertyValidationAttributesMap: {
83
+ [property: string]: {
84
+ maxLength?: number,
85
+ minLength?: number,
86
+ pattern?: string,
87
+ maximum?: number,
88
+ exclusiveMaximum?: boolean,
89
+ minimum?: number,
90
+ exclusiveMinimum?: boolean,
91
+ multipleOf?: number,
92
+ maxItems?: number,
93
+ minItems?: number,
94
+ uniqueItems?: boolean
95
+ }
96
+ } = {
97
+ modelId: {
98
+ maxLength: 64,
99
+ },
100
+ }
101
+
102
+
103
+ /**
104
+ * Check if a given object implements the ThreadMessageDetails interface.
105
+ */
106
+ export function instanceOfThreadMessageDetails(value: object): value is ThreadMessageDetails {
107
+ return true;
108
+ }
109
+
110
+ export function ThreadMessageDetailsFromJSON(json: any): ThreadMessageDetails {
111
+ return ThreadMessageDetailsFromJSONTyped(json, false);
112
+ }
113
+
114
+ export function ThreadMessageDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ThreadMessageDetails {
115
+ if (json == null) {
116
+ return json;
117
+ }
118
+ return {
119
+
120
+ 'parts': json['parts'] == null ? undefined : ((json['parts'] as Array<any>).map(TextPartOrReasoningPartOrToolPartOrDocEditPartFromJSON)),
121
+ 'usage': json['usage'] == null ? undefined : MessageUsageFromJSON(json['usage']),
122
+ 'steps': json['steps'] == null ? undefined : ((json['steps'] as Array<any>).map(StepFromJSON)),
123
+ 'checkpoint': json['checkpoint'] == null ? undefined : CheckpointDetailsFromJSON(json['checkpoint']),
124
+ 'modelId': json['model_id'] == null ? undefined : json['model_id'],
125
+ };
126
+ }
127
+
128
+ export function ThreadMessageDetailsToJSON(json: any): ThreadMessageDetails {
129
+ return ThreadMessageDetailsToJSONTyped(json, false);
130
+ }
131
+
132
+ export function ThreadMessageDetailsToJSONTyped(value?: ThreadMessageDetails | null, ignoreDiscriminator: boolean = false): any {
133
+ if (value == null) {
134
+ return value;
135
+ }
136
+
137
+ return {
138
+
139
+ 'parts': value['parts'] == null ? undefined : ((value['parts'] as Array<any>).map(TextPartOrReasoningPartOrToolPartOrDocEditPartToJSON)),
140
+ 'usage': MessageUsageToJSON(value['usage']),
141
+ 'steps': value['steps'] == null ? undefined : ((value['steps'] as Array<any>).map(StepToJSON)),
142
+ 'checkpoint': CheckpointDetailsToJSON(value['checkpoint']),
143
+ 'model_id': value['modelId'],
144
+ };
145
+ }
146
+
@@ -27,13 +27,20 @@ import {
27
27
  MessageRoleToJSON,
28
28
  MessageRoleToJSONTyped,
29
29
  } from './MessageRole';
30
- import type { ThreadMessageDetailsOutput } from './ThreadMessageDetailsOutput';
30
+ import type { TextPartOrReasoningPartOrToolPartOrDocEditPart } from './TextPartOrReasoningPartOrToolPartOrDocEditPart';
31
31
  import {
32
- ThreadMessageDetailsOutputFromJSON,
33
- ThreadMessageDetailsOutputFromJSONTyped,
34
- ThreadMessageDetailsOutputToJSON,
35
- ThreadMessageDetailsOutputToJSONTyped,
36
- } from './ThreadMessageDetailsOutput';
32
+ TextPartOrReasoningPartOrToolPartOrDocEditPartFromJSON,
33
+ TextPartOrReasoningPartOrToolPartOrDocEditPartFromJSONTyped,
34
+ TextPartOrReasoningPartOrToolPartOrDocEditPartToJSON,
35
+ TextPartOrReasoningPartOrToolPartOrDocEditPartToJSONTyped,
36
+ } from './TextPartOrReasoningPartOrToolPartOrDocEditPart';
37
+ import type { ThreadMessageDetails } from './ThreadMessageDetails';
38
+ import {
39
+ ThreadMessageDetailsFromJSON,
40
+ ThreadMessageDetailsFromJSONTyped,
41
+ ThreadMessageDetailsToJSON,
42
+ ThreadMessageDetailsToJSONTyped,
43
+ } from './ThreadMessageDetails';
37
44
 
38
45
  /**
39
46
  *
@@ -73,10 +80,16 @@ export interface ThreadMessageResponse {
73
80
  content: EnrichedThreadMessageContent;
74
81
  /**
75
82
  * Message details (None when not requested via with_details)
76
- * @type {ThreadMessageDetailsOutput}
83
+ * @type {ThreadMessageDetails}
84
+ * @memberof ThreadMessageResponse
85
+ */
86
+ details?: ThreadMessageDetails | null;
87
+ /**
88
+ * 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.
89
+ * @type {Array<TextPartOrReasoningPartOrToolPartOrDocEditPart>}
77
90
  * @memberof ThreadMessageResponse
78
91
  */
79
- details?: ThreadMessageDetailsOutput | null;
92
+ parts?: Array<TextPartOrReasoningPartOrToolPartOrDocEditPart>;
80
93
  /**
81
94
  * Thread's PathPart ID
82
95
  * @type {string}
@@ -166,7 +179,8 @@ export function ThreadMessageResponseFromJSONTyped(json: any, ignoreDiscriminato
166
179
  'sequence': json['sequence'],
167
180
  'role': MessageRoleFromJSON(json['role']),
168
181
  'content': EnrichedThreadMessageContentFromJSON(json['content']),
169
- 'details': json['details'] == null ? undefined : ThreadMessageDetailsOutputFromJSON(json['details']),
182
+ 'details': json['details'] == null ? undefined : ThreadMessageDetailsFromJSON(json['details']),
183
+ 'parts': json['parts'] == null ? undefined : ((json['parts'] as Array<any>).map(TextPartOrReasoningPartOrToolPartOrDocEditPartFromJSON)),
170
184
  'parentPathId': json['parent_path_id'],
171
185
  'materializedPath': json['materialized_path'],
172
186
  'tenantId': json['tenant_id'],
@@ -192,7 +206,8 @@ export function ThreadMessageResponseToJSONTyped(value?: ThreadMessageResponse |
192
206
  'sequence': value['sequence'],
193
207
  'role': MessageRoleToJSON(value['role']),
194
208
  'content': EnrichedThreadMessageContentToJSON(value['content']),
195
- 'details': ThreadMessageDetailsOutputToJSON(value['details']),
209
+ 'details': ThreadMessageDetailsToJSON(value['details']),
210
+ 'parts': value['parts'] == null ? undefined : ((value['parts'] as Array<any>).map(TextPartOrReasoningPartOrToolPartOrDocEditPartToJSON)),
196
211
  'parent_path_id': value['parentPathId'],
197
212
  'materialized_path': value['materializedPath'],
198
213
  'tenant_id': value['tenantId'],