@knowledge-stack/ksapi 1.120.1 → 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
@@ -0,0 +1,32 @@
1
+
2
+ # ToolStatus
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import type { ToolStatus } from '@knowledge-stack/ksapi'
14
+
15
+ // TODO: Update the object below with actual values
16
+ const example = {
17
+ } satisfies ToolStatus
18
+
19
+ console.log(example)
20
+
21
+ // Convert the instance to a JSON string
22
+ const exampleJSON: string = JSON.stringify(example)
23
+ console.log(exampleJSON)
24
+
25
+ // Parse the JSON string back to an object
26
+ const exampleParsed = JSON.parse(exampleJSON) as ToolStatus
27
+ console.log(exampleParsed)
28
+ ```
29
+
30
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
31
+
32
+
@@ -0,0 +1,45 @@
1
+
2
+ # WorkflowRunAsset
3
+
4
+ One input or output file/reference of a run, actionable in one call. ``id`` is the PDO id (``path_part.metadata_obj_id``); ``path_part_id`` is the underlying path part (kept for approval-state / path-part lookups). Route on ``part_type`` to pick the API that takes ``id``: ``DOCUMENT`` → download_document / bulk-download (active version); ``DOCUMENT_VERSION`` → download_document_version (a version-pinned input, e.g. a cloned run\'s inputs); ``FOLDER`` / ``DATA_SOURCE`` / ``API_CONNECTION`` → list/query via that type\'s endpoint. Output assets are always ``DOCUMENT``.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `id` | string
11
+ `pathPartId` | string
12
+ `name` | string
13
+ `partType` | [PartType](PartType.md)
14
+ `materializedPath` | string
15
+ `approvalState` | [PathPartApprovalState](PathPartApprovalState.md)
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import type { WorkflowRunAsset } from '@knowledge-stack/ksapi'
21
+
22
+ // TODO: Update the object below with actual values
23
+ const example = {
24
+ "id": null,
25
+ "pathPartId": null,
26
+ "name": null,
27
+ "partType": null,
28
+ "materializedPath": null,
29
+ "approvalState": null,
30
+ } satisfies WorkflowRunAsset
31
+
32
+ console.log(example)
33
+
34
+ // Convert the instance to a JSON string
35
+ const exampleJSON: string = JSON.stringify(example)
36
+ console.log(exampleJSON)
37
+
38
+ // Parse the JSON string back to an object
39
+ const exampleParsed = JSON.parse(exampleJSON) as WorkflowRunAsset
40
+ console.log(exampleParsed)
41
+ ```
42
+
43
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
44
+
45
+
@@ -28,7 +28,10 @@ Name | Type
28
28
  `outputsPathPartId` | string
29
29
  `discussionsPathPartId` | string
30
30
  `inputPathPartIds` | Array<string>
31
- `outputsPathPartIds` | Array<string>
31
+ `outputAssets` | [Array<WorkflowRunAsset>](WorkflowRunAsset.md)
32
+ `inputAssets` | [Array<WorkflowRunAsset>](WorkflowRunAsset.md)
33
+ `inputsPath` | string
34
+ `outputsPath` | string
32
35
  `excludedCommonFiles` | [Array<ExcludedCommonFile>](ExcludedCommonFile.md)
33
36
  `runThreadId` | string
34
37
  `owner` | [UserInfo](UserInfo.md)
@@ -64,7 +67,10 @@ const example = {
64
67
  "outputsPathPartId": null,
65
68
  "discussionsPathPartId": null,
66
69
  "inputPathPartIds": null,
67
- "outputsPathPartIds": null,
70
+ "outputAssets": null,
71
+ "inputAssets": null,
72
+ "inputsPath": null,
73
+ "outputsPath": null,
68
74
  "excludedCommonFiles": null,
69
75
  "runThreadId": null,
70
76
  "owner": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "1.120.1",
3
+ "version": "1.121.0",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -20,13 +20,6 @@ import {
20
20
  MessageRoleToJSON,
21
21
  MessageRoleToJSONTyped,
22
22
  } from './MessageRole';
23
- import type { ThreadMessageDetailsInput } from './ThreadMessageDetailsInput';
24
- import {
25
- ThreadMessageDetailsInputFromJSON,
26
- ThreadMessageDetailsInputFromJSONTyped,
27
- ThreadMessageDetailsInputToJSON,
28
- ThreadMessageDetailsInputToJSONTyped,
29
- } from './ThreadMessageDetailsInput';
30
23
  import type { ThreadMessageContent } from './ThreadMessageContent';
31
24
  import {
32
25
  ThreadMessageContentFromJSON,
@@ -34,6 +27,13 @@ import {
34
27
  ThreadMessageContentToJSON,
35
28
  ThreadMessageContentToJSONTyped,
36
29
  } from './ThreadMessageContent';
30
+ import type { ThreadMessageDetails } from './ThreadMessageDetails';
31
+ import {
32
+ ThreadMessageDetailsFromJSON,
33
+ ThreadMessageDetailsFromJSONTyped,
34
+ ThreadMessageDetailsToJSON,
35
+ ThreadMessageDetailsToJSONTyped,
36
+ } from './ThreadMessageDetails';
37
37
 
38
38
  /**
39
39
  *
@@ -61,10 +61,10 @@ export interface CreateThreadMessageRequest {
61
61
  content: ThreadMessageContent;
62
62
  /**
63
63
  * Message details (execution steps). Omit for user messages.
64
- * @type {ThreadMessageDetailsInput}
64
+ * @type {ThreadMessageDetails}
65
65
  * @memberof CreateThreadMessageRequest
66
66
  */
67
- details?: ThreadMessageDetailsInput | null;
67
+ details?: ThreadMessageDetails | null;
68
68
  }
69
69
 
70
70
 
@@ -108,7 +108,7 @@ export function CreateThreadMessageRequestFromJSONTyped(json: any, ignoreDiscrim
108
108
  'messageId': json['message_id'] == null ? undefined : json['message_id'],
109
109
  'role': MessageRoleFromJSON(json['role']),
110
110
  'content': ThreadMessageContentFromJSON(json['content']),
111
- 'details': json['details'] == null ? undefined : ThreadMessageDetailsInputFromJSON(json['details']),
111
+ 'details': json['details'] == null ? undefined : ThreadMessageDetailsFromJSON(json['details']),
112
112
  };
113
113
  }
114
114
 
@@ -126,7 +126,7 @@ export function CreateThreadMessageRequestToJSONTyped(value?: CreateThreadMessag
126
126
  'message_id': value['messageId'],
127
127
  'role': MessageRoleToJSON(value['role']),
128
128
  'content': ThreadMessageContentToJSON(value['content']),
129
- 'details': ThreadMessageDetailsInputToJSON(value['details']),
129
+ 'details': ThreadMessageDetailsToJSON(value['details']),
130
130
  };
131
131
  }
132
132
 
@@ -0,0 +1,191 @@
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 DocEditPart
20
+ */
21
+ export interface DocEditPart {
22
+ /**
23
+ * Stable per-message part id (uuid)
24
+ * @type {string}
25
+ * @memberof DocEditPart
26
+ */
27
+ id: string;
28
+ /**
29
+ * 0-based order within the message
30
+ * @type {number}
31
+ * @memberof DocEditPart
32
+ */
33
+ seq: number;
34
+ /**
35
+ *
36
+ * @type {Date}
37
+ * @memberof DocEditPart
38
+ */
39
+ startTime: Date;
40
+ /**
41
+ *
42
+ * @type {Date}
43
+ * @memberof DocEditPart
44
+ */
45
+ endTime?: Date | null;
46
+ /**
47
+ *
48
+ * @type {DocEditPartKindEnum}
49
+ * @memberof DocEditPart
50
+ */
51
+ kind?: DocEditPartKindEnum;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof DocEditPart
56
+ */
57
+ toolCallId?: string | null;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof DocEditPart
62
+ */
63
+ documentId: string;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof DocEditPart
68
+ */
69
+ baseVersionId?: string | null;
70
+ /**
71
+ *
72
+ * @type {string}
73
+ * @memberof DocEditPart
74
+ */
75
+ newVersionId: string;
76
+ /**
77
+ *
78
+ * @type {DocEditPartDocFormatEnum}
79
+ * @memberof DocEditPart
80
+ */
81
+ docFormat: DocEditPartDocFormatEnum;
82
+ /**
83
+ *
84
+ * @type {string}
85
+ * @memberof DocEditPart
86
+ */
87
+ approvalId?: string | null;
88
+ }
89
+
90
+
91
+ /**
92
+ * @export
93
+ */
94
+ export const DocEditPartKindEnum = {
95
+ DocEdit: 'doc_edit'
96
+ } as const;
97
+ export type DocEditPartKindEnum = typeof DocEditPartKindEnum[keyof typeof DocEditPartKindEnum];
98
+
99
+ /**
100
+ * @export
101
+ */
102
+ export const DocEditPartDocFormatEnum = {
103
+ Docx: 'docx',
104
+ Xlsx: 'xlsx'
105
+ } as const;
106
+ export type DocEditPartDocFormatEnum = typeof DocEditPartDocFormatEnum[keyof typeof DocEditPartDocFormatEnum];
107
+
108
+ export const DocEditPartPropertyValidationAttributesMap: {
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
+ seq: {
124
+ minimum: 0,
125
+ exclusiveMinimum: false,
126
+ },
127
+ }
128
+
129
+
130
+ /**
131
+ * Check if a given object implements the DocEditPart interface.
132
+ */
133
+ export function instanceOfDocEditPart(value: object): value is DocEditPart {
134
+ if (!('id' in value) || value['id'] === undefined) return false;
135
+ if (!('seq' in value) || value['seq'] === undefined) return false;
136
+ if (!('startTime' in value) || value['startTime'] === undefined) return false;
137
+ if (!('documentId' in value) || value['documentId'] === undefined) return false;
138
+ if (!('newVersionId' in value) || value['newVersionId'] === undefined) return false;
139
+ if (!('docFormat' in value) || value['docFormat'] === undefined) return false;
140
+ return true;
141
+ }
142
+
143
+ export function DocEditPartFromJSON(json: any): DocEditPart {
144
+ return DocEditPartFromJSONTyped(json, false);
145
+ }
146
+
147
+ export function DocEditPartFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocEditPart {
148
+ if (json == null) {
149
+ return json;
150
+ }
151
+ return {
152
+
153
+ 'id': json['id'],
154
+ 'seq': json['seq'],
155
+ 'startTime': (new Date(json['start_time'])),
156
+ 'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
157
+ 'kind': json['kind'] == null ? undefined : json['kind'],
158
+ 'toolCallId': json['tool_call_id'] == null ? undefined : json['tool_call_id'],
159
+ 'documentId': json['document_id'],
160
+ 'baseVersionId': json['base_version_id'] == null ? undefined : json['base_version_id'],
161
+ 'newVersionId': json['new_version_id'],
162
+ 'docFormat': json['doc_format'],
163
+ 'approvalId': json['approval_id'] == null ? undefined : json['approval_id'],
164
+ };
165
+ }
166
+
167
+ export function DocEditPartToJSON(json: any): DocEditPart {
168
+ return DocEditPartToJSONTyped(json, false);
169
+ }
170
+
171
+ export function DocEditPartToJSONTyped(value?: DocEditPart | null, ignoreDiscriminator: boolean = false): any {
172
+ if (value == null) {
173
+ return value;
174
+ }
175
+
176
+ return {
177
+
178
+ 'id': value['id'],
179
+ 'seq': value['seq'],
180
+ 'start_time': value['startTime'].toISOString(),
181
+ 'end_time': value['endTime'] == null ? value['endTime'] : value['endTime'].toISOString(),
182
+ 'kind': value['kind'],
183
+ 'tool_call_id': value['toolCallId'],
184
+ 'document_id': value['documentId'],
185
+ 'base_version_id': value['baseVersionId'],
186
+ 'new_version_id': value['newVersionId'],
187
+ 'doc_format': value['docFormat'],
188
+ 'approval_id': value['approvalId'],
189
+ };
190
+ }
191
+
@@ -0,0 +1,63 @@
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 Input
20
+ */
21
+ export interface Input {
22
+ }
23
+ export const InputPropertyValidationAttributesMap: {
24
+ [property: string]: {
25
+ maxLength?: number,
26
+ minLength?: number,
27
+ pattern?: string,
28
+ maximum?: number,
29
+ exclusiveMaximum?: boolean,
30
+ minimum?: number,
31
+ exclusiveMinimum?: boolean,
32
+ multipleOf?: number,
33
+ maxItems?: number,
34
+ minItems?: number,
35
+ uniqueItems?: boolean
36
+ }
37
+ } = {
38
+ }
39
+
40
+
41
+ /**
42
+ * Check if a given object implements the Input interface.
43
+ */
44
+ export function instanceOfInput(value: object): value is Input {
45
+ return true;
46
+ }
47
+
48
+ export function InputFromJSON(json: any): Input {
49
+ return InputFromJSONTyped(json, false);
50
+ }
51
+
52
+ export function InputFromJSONTyped(json: any, ignoreDiscriminator: boolean): Input {
53
+ return json;
54
+ }
55
+
56
+ export function InputToJSON(json: any): Input {
57
+ return InputToJSONTyped(json, false);
58
+ }
59
+
60
+ export function InputToJSONTyped(value?: Input | null, ignoreDiscriminator: boolean = false): any {
61
+ return value;
62
+ }
63
+
@@ -0,0 +1,100 @@
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
+ * Token counts only — the run's model lives on ``details.model_id``.
18
+ * @export
19
+ * @interface MessageUsage
20
+ */
21
+ export interface MessageUsage {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof MessageUsage
26
+ */
27
+ inputTokens: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof MessageUsage
32
+ */
33
+ outputTokens: number;
34
+ }
35
+ export const MessageUsagePropertyValidationAttributesMap: {
36
+ [property: string]: {
37
+ maxLength?: number,
38
+ minLength?: number,
39
+ pattern?: string,
40
+ maximum?: number,
41
+ exclusiveMaximum?: boolean,
42
+ minimum?: number,
43
+ exclusiveMinimum?: boolean,
44
+ multipleOf?: number,
45
+ maxItems?: number,
46
+ minItems?: number,
47
+ uniqueItems?: boolean
48
+ }
49
+ } = {
50
+ inputTokens: {
51
+ minimum: 0,
52
+ exclusiveMinimum: false,
53
+ },
54
+ outputTokens: {
55
+ minimum: 0,
56
+ exclusiveMinimum: false,
57
+ },
58
+ }
59
+
60
+
61
+ /**
62
+ * Check if a given object implements the MessageUsage interface.
63
+ */
64
+ export function instanceOfMessageUsage(value: object): value is MessageUsage {
65
+ if (!('inputTokens' in value) || value['inputTokens'] === undefined) return false;
66
+ if (!('outputTokens' in value) || value['outputTokens'] === undefined) return false;
67
+ return true;
68
+ }
69
+
70
+ export function MessageUsageFromJSON(json: any): MessageUsage {
71
+ return MessageUsageFromJSONTyped(json, false);
72
+ }
73
+
74
+ export function MessageUsageFromJSONTyped(json: any, ignoreDiscriminator: boolean): MessageUsage {
75
+ if (json == null) {
76
+ return json;
77
+ }
78
+ return {
79
+
80
+ 'inputTokens': json['input_tokens'],
81
+ 'outputTokens': json['output_tokens'],
82
+ };
83
+ }
84
+
85
+ export function MessageUsageToJSON(json: any): MessageUsage {
86
+ return MessageUsageToJSONTyped(json, false);
87
+ }
88
+
89
+ export function MessageUsageToJSONTyped(value?: MessageUsage | null, ignoreDiscriminator: boolean = false): any {
90
+ if (value == null) {
91
+ return value;
92
+ }
93
+
94
+ return {
95
+
96
+ 'input_tokens': value['inputTokens'],
97
+ 'output_tokens': value['outputTokens'],
98
+ };
99
+ }
100
+
@@ -0,0 +1,140 @@
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 ReasoningPart
20
+ */
21
+ export interface ReasoningPart {
22
+ /**
23
+ * Stable per-message part id (uuid)
24
+ * @type {string}
25
+ * @memberof ReasoningPart
26
+ */
27
+ id: string;
28
+ /**
29
+ * 0-based order within the message
30
+ * @type {number}
31
+ * @memberof ReasoningPart
32
+ */
33
+ seq: number;
34
+ /**
35
+ *
36
+ * @type {Date}
37
+ * @memberof ReasoningPart
38
+ */
39
+ startTime: Date;
40
+ /**
41
+ *
42
+ * @type {Date}
43
+ * @memberof ReasoningPart
44
+ */
45
+ endTime?: Date | null;
46
+ /**
47
+ *
48
+ * @type {ReasoningPartKindEnum}
49
+ * @memberof ReasoningPart
50
+ */
51
+ kind?: ReasoningPartKindEnum;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof ReasoningPart
56
+ */
57
+ text: string;
58
+ }
59
+
60
+
61
+ /**
62
+ * @export
63
+ */
64
+ export const ReasoningPartKindEnum = {
65
+ Reasoning: 'reasoning'
66
+ } as const;
67
+ export type ReasoningPartKindEnum = typeof ReasoningPartKindEnum[keyof typeof ReasoningPartKindEnum];
68
+
69
+ export const ReasoningPartPropertyValidationAttributesMap: {
70
+ [property: string]: {
71
+ maxLength?: number,
72
+ minLength?: number,
73
+ pattern?: string,
74
+ maximum?: number,
75
+ exclusiveMaximum?: boolean,
76
+ minimum?: number,
77
+ exclusiveMinimum?: boolean,
78
+ multipleOf?: number,
79
+ maxItems?: number,
80
+ minItems?: number,
81
+ uniqueItems?: boolean
82
+ }
83
+ } = {
84
+ seq: {
85
+ minimum: 0,
86
+ exclusiveMinimum: false,
87
+ },
88
+ }
89
+
90
+
91
+ /**
92
+ * Check if a given object implements the ReasoningPart interface.
93
+ */
94
+ export function instanceOfReasoningPart(value: object): value is ReasoningPart {
95
+ if (!('id' in value) || value['id'] === undefined) return false;
96
+ if (!('seq' in value) || value['seq'] === undefined) return false;
97
+ if (!('startTime' in value) || value['startTime'] === undefined) return false;
98
+ if (!('text' in value) || value['text'] === undefined) return false;
99
+ return true;
100
+ }
101
+
102
+ export function ReasoningPartFromJSON(json: any): ReasoningPart {
103
+ return ReasoningPartFromJSONTyped(json, false);
104
+ }
105
+
106
+ export function ReasoningPartFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReasoningPart {
107
+ if (json == null) {
108
+ return json;
109
+ }
110
+ return {
111
+
112
+ 'id': json['id'],
113
+ 'seq': json['seq'],
114
+ 'startTime': (new Date(json['start_time'])),
115
+ 'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
116
+ 'kind': json['kind'] == null ? undefined : json['kind'],
117
+ 'text': json['text'],
118
+ };
119
+ }
120
+
121
+ export function ReasoningPartToJSON(json: any): ReasoningPart {
122
+ return ReasoningPartToJSONTyped(json, false);
123
+ }
124
+
125
+ export function ReasoningPartToJSONTyped(value?: ReasoningPart | null, ignoreDiscriminator: boolean = false): any {
126
+ if (value == null) {
127
+ return value;
128
+ }
129
+
130
+ return {
131
+
132
+ 'id': value['id'],
133
+ 'seq': value['seq'],
134
+ 'start_time': value['startTime'].toISOString(),
135
+ 'end_time': value['endTime'] == null ? value['endTime'] : value['endTime'].toISOString(),
136
+ 'kind': value['kind'],
137
+ 'text': value['text'],
138
+ };
139
+ }
140
+