@knowledge-stack/ksapi 1.56.0 → 1.57.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 (85) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +7 -2
  3. package/dist/apis/DocumentVersionsApi.d.ts +8 -5
  4. package/dist/apis/DocumentVersionsApi.js +5 -2
  5. package/dist/apis/ThreadMessagesApi.d.ts +6 -6
  6. package/dist/apis/ThreadMessagesApi.js +2 -2
  7. package/dist/esm/apis/DocumentVersionsApi.d.ts +8 -5
  8. package/dist/esm/apis/DocumentVersionsApi.js +5 -2
  9. package/dist/esm/apis/ThreadMessagesApi.d.ts +6 -6
  10. package/dist/esm/apis/ThreadMessagesApi.js +2 -2
  11. package/dist/esm/models/CreateThreadMessageRequest.d.ts +6 -0
  12. package/dist/esm/models/CreateThreadMessageRequest.js +2 -0
  13. package/dist/esm/models/DocumentVersionContentTypeFilter.d.ts +25 -0
  14. package/dist/esm/models/DocumentVersionContentTypeFilter.js +43 -0
  15. package/dist/esm/models/EnrichedThreadMessageContent.d.ts +13 -0
  16. package/dist/esm/models/EnrichedThreadMessageContent.js +5 -0
  17. package/dist/esm/models/NonFilesystemReferenceType.d.ts +27 -0
  18. package/dist/esm/models/NonFilesystemReferenceType.js +45 -0
  19. package/dist/esm/models/ReferenceType.d.ts +34 -0
  20. package/dist/esm/models/ReferenceType.js +52 -0
  21. package/dist/esm/models/ResolvedReferenceInput.d.ts +70 -0
  22. package/dist/esm/models/ResolvedReferenceInput.js +55 -0
  23. package/dist/esm/models/ResolvedReferenceOutput.d.ts +69 -0
  24. package/dist/esm/models/ResolvedReferenceOutput.js +54 -0
  25. package/dist/esm/models/StepInput.d.ts +6 -0
  26. package/dist/esm/models/StepInput.js +4 -0
  27. package/dist/esm/models/StepKind.d.ts +1 -0
  28. package/dist/esm/models/StepKind.js +1 -0
  29. package/dist/esm/models/StepOutput.d.ts +6 -0
  30. package/dist/esm/models/StepOutput.js +4 -0
  31. package/dist/esm/models/ThreadMessageContent.d.ts +13 -0
  32. package/dist/esm/models/ThreadMessageContent.js +5 -0
  33. package/dist/esm/models/index.d.ts +5 -0
  34. package/dist/esm/models/index.js +5 -0
  35. package/dist/models/CreateThreadMessageRequest.d.ts +6 -0
  36. package/dist/models/CreateThreadMessageRequest.js +2 -0
  37. package/dist/models/DocumentVersionContentTypeFilter.d.ts +25 -0
  38. package/dist/models/DocumentVersionContentTypeFilter.js +51 -0
  39. package/dist/models/EnrichedThreadMessageContent.d.ts +13 -0
  40. package/dist/models/EnrichedThreadMessageContent.js +5 -0
  41. package/dist/models/NonFilesystemReferenceType.d.ts +27 -0
  42. package/dist/models/NonFilesystemReferenceType.js +53 -0
  43. package/dist/models/ReferenceType.d.ts +34 -0
  44. package/dist/models/ReferenceType.js +60 -0
  45. package/dist/models/ResolvedReferenceInput.d.ts +70 -0
  46. package/dist/models/ResolvedReferenceInput.js +63 -0
  47. package/dist/models/ResolvedReferenceOutput.d.ts +69 -0
  48. package/dist/models/ResolvedReferenceOutput.js +62 -0
  49. package/dist/models/StepInput.d.ts +6 -0
  50. package/dist/models/StepInput.js +4 -0
  51. package/dist/models/StepKind.d.ts +1 -0
  52. package/dist/models/StepKind.js +1 -0
  53. package/dist/models/StepOutput.d.ts +6 -0
  54. package/dist/models/StepOutput.js +4 -0
  55. package/dist/models/ThreadMessageContent.d.ts +13 -0
  56. package/dist/models/ThreadMessageContent.js +5 -0
  57. package/dist/models/index.d.ts +5 -0
  58. package/dist/models/index.js +5 -0
  59. package/docs/CreateThreadMessageRequest.md +2 -0
  60. package/docs/DocumentVersionContentTypeFilter.md +33 -0
  61. package/docs/DocumentVersionsApi.md +5 -2
  62. package/docs/EnrichedThreadMessageContent.md +4 -0
  63. package/docs/NonFilesystemReferenceType.md +33 -0
  64. package/docs/ReferenceType.md +32 -0
  65. package/docs/ResolvedReferenceInput.md +41 -0
  66. package/docs/ResolvedReferenceOutput.md +41 -0
  67. package/docs/StepInput.md +2 -0
  68. package/docs/StepOutput.md +2 -0
  69. package/docs/ThreadMessageContent.md +4 -0
  70. package/docs/ThreadMessagesApi.md +3 -3
  71. package/package.json +1 -1
  72. package/src/apis/DocumentVersionsApi.ts +14 -4
  73. package/src/apis/ThreadMessagesApi.ts +6 -6
  74. package/src/models/CreateThreadMessageRequest.ts +8 -0
  75. package/src/models/DocumentVersionContentTypeFilter.ts +53 -0
  76. package/src/models/EnrichedThreadMessageContent.ts +23 -0
  77. package/src/models/NonFilesystemReferenceType.ts +55 -0
  78. package/src/models/ReferenceType.ts +62 -0
  79. package/src/models/ResolvedReferenceInput.ts +123 -0
  80. package/src/models/ResolvedReferenceOutput.ts +113 -0
  81. package/src/models/StepInput.ts +9 -0
  82. package/src/models/StepKind.ts +1 -0
  83. package/src/models/StepOutput.ts +9 -0
  84. package/src/models/ThreadMessageContent.ts +23 -0
  85. package/src/models/index.ts +5 -0
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { Citation } from './Citation';
13
+ import type { ResolvedReferenceInput } from './ResolvedReferenceInput';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -22,12 +23,24 @@ export interface ThreadMessageContent {
22
23
  * @memberof ThreadMessageContent
23
24
  */
24
25
  text: string;
26
+ /**
27
+ * Whether this message represents a terminal assistant error
28
+ * @type {boolean}
29
+ * @memberof ThreadMessageContent
30
+ */
31
+ isError?: boolean | null;
25
32
  /**
26
33
  * A list of citations from the message
27
34
  * @type {Array<Citation>}
28
35
  * @memberof ThreadMessageContent
29
36
  */
30
37
  citations?: Array<Citation> | null;
38
+ /**
39
+ * Resolved inline references attached to this message
40
+ * @type {Array<ResolvedReferenceInput>}
41
+ * @memberof ThreadMessageContent
42
+ */
43
+ references?: Array<ResolvedReferenceInput> | null;
31
44
  }
32
45
  /**
33
46
  * Check if a given object implements the ThreadMessageContent interface.
@@ -20,6 +20,7 @@ exports.ThreadMessageContentFromJSONTyped = ThreadMessageContentFromJSONTyped;
20
20
  exports.ThreadMessageContentToJSON = ThreadMessageContentToJSON;
21
21
  exports.ThreadMessageContentToJSONTyped = ThreadMessageContentToJSONTyped;
22
22
  const Citation_1 = require("./Citation");
23
+ const ResolvedReferenceInput_1 = require("./ResolvedReferenceInput");
23
24
  /**
24
25
  * Check if a given object implements the ThreadMessageContent interface.
25
26
  */
@@ -37,7 +38,9 @@ function ThreadMessageContentFromJSONTyped(json, ignoreDiscriminator) {
37
38
  }
38
39
  return {
39
40
  'text': json['text'],
41
+ 'isError': json['is_error'] == null ? undefined : json['is_error'],
40
42
  'citations': json['citations'] == null ? undefined : (json['citations'].map(Citation_1.CitationFromJSON)),
43
+ 'references': json['references'] == null ? undefined : (json['references'].map(ResolvedReferenceInput_1.ResolvedReferenceInputFromJSON)),
41
44
  };
42
45
  }
43
46
  function ThreadMessageContentToJSON(json) {
@@ -49,7 +52,9 @@ function ThreadMessageContentToJSONTyped(value, ignoreDiscriminator = false) {
49
52
  }
50
53
  return {
51
54
  'text': value['text'],
55
+ 'is_error': value['isError'],
52
56
  'citations': value['citations'] == null ? undefined : (value['citations'].map(Citation_1.CitationToJSON)),
57
+ 'references': value['references'] == null ? undefined : (value['references'].map(ResolvedReferenceInput_1.ResolvedReferenceInputToJSON)),
53
58
  };
54
59
  }
55
60
  exports.ThreadMessageContentPropertyValidationAttributesMap = {};
@@ -33,6 +33,7 @@ export * from './DocumentResponse';
33
33
  export * from './DocumentType';
34
34
  export * from './DocumentVersionAction';
35
35
  export * from './DocumentVersionActionResponse';
36
+ export * from './DocumentVersionContentTypeFilter';
36
37
  export * from './DocumentVersionMetadata';
37
38
  export * from './DocumentVersionMetadataUpdate';
38
39
  export * from './DocumentVersionResponse';
@@ -60,6 +61,7 @@ export * from './LineageGraphResponse';
60
61
  export * from './LineageNodeResponse';
61
62
  export * from './LocationInner';
62
63
  export * from './MessageRole';
64
+ export * from './NonFilesystemReferenceType';
63
65
  export * from './OAuth2Config';
64
66
  export * from './PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator';
65
67
  export * from './PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator';
@@ -87,6 +89,9 @@ export * from './PipelineState';
87
89
  export * from './PipelineStatus';
88
90
  export * from './Polygon';
89
91
  export * from './PolygonReference';
92
+ export * from './ReferenceType';
93
+ export * from './ResolvedReferenceInput';
94
+ export * from './ResolvedReferenceOutput';
90
95
  export * from './RootResponse';
91
96
  export * from './SSOInitiateResponse';
92
97
  export * from './ScoredChunkResponse';
@@ -51,6 +51,7 @@ __exportStar(require("./DocumentResponse"), exports);
51
51
  __exportStar(require("./DocumentType"), exports);
52
52
  __exportStar(require("./DocumentVersionAction"), exports);
53
53
  __exportStar(require("./DocumentVersionActionResponse"), exports);
54
+ __exportStar(require("./DocumentVersionContentTypeFilter"), exports);
54
55
  __exportStar(require("./DocumentVersionMetadata"), exports);
55
56
  __exportStar(require("./DocumentVersionMetadataUpdate"), exports);
56
57
  __exportStar(require("./DocumentVersionResponse"), exports);
@@ -78,6 +79,7 @@ __exportStar(require("./LineageGraphResponse"), exports);
78
79
  __exportStar(require("./LineageNodeResponse"), exports);
79
80
  __exportStar(require("./LocationInner"), exports);
80
81
  __exportStar(require("./MessageRole"), exports);
82
+ __exportStar(require("./NonFilesystemReferenceType"), exports);
81
83
  __exportStar(require("./OAuth2Config"), exports);
82
84
  __exportStar(require("./PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator"), exports);
83
85
  __exportStar(require("./PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator"), exports);
@@ -105,6 +107,9 @@ __exportStar(require("./PipelineState"), exports);
105
107
  __exportStar(require("./PipelineStatus"), exports);
106
108
  __exportStar(require("./Polygon"), exports);
107
109
  __exportStar(require("./PolygonReference"), exports);
110
+ __exportStar(require("./ReferenceType"), exports);
111
+ __exportStar(require("./ResolvedReferenceInput"), exports);
112
+ __exportStar(require("./ResolvedReferenceOutput"), exports);
108
113
  __exportStar(require("./RootResponse"), exports);
109
114
  __exportStar(require("./SSOInitiateResponse"), exports);
110
115
  __exportStar(require("./ScoredChunkResponse"), exports);
@@ -7,6 +7,7 @@ Request to create a new thread message.
7
7
 
8
8
  Name | Type
9
9
  ------------ | -------------
10
+ `messageId` | string
10
11
  `role` | [MessageRole](MessageRole.md)
11
12
  `content` | [ThreadMessageContent](ThreadMessageContent.md)
12
13
  `details` | [ThreadMessageDetailsInput](ThreadMessageDetailsInput.md)
@@ -18,6 +19,7 @@ import type { CreateThreadMessageRequest } from '@knowledge-stack/ksapi'
18
19
 
19
20
  // TODO: Update the object below with actual values
20
21
  const example = {
22
+ "messageId": null,
21
23
  "role": null,
22
24
  "content": null,
23
25
  "details": null,
@@ -0,0 +1,33 @@
1
+
2
+ # DocumentVersionContentTypeFilter
3
+
4
+ Filter for the type of content rows to return.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { DocumentVersionContentTypeFilter } from '@knowledge-stack/ksapi'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ } satisfies DocumentVersionContentTypeFilter
19
+
20
+ console.log(example)
21
+
22
+ // Convert the instance to a JSON string
23
+ const exampleJSON: string = JSON.stringify(example)
24
+ console.log(exampleJSON)
25
+
26
+ // Parse the JSON string back to an object
27
+ const exampleParsed = JSON.parse(exampleJSON) as DocumentVersionContentTypeFilter
28
+ console.log(exampleParsed)
29
+ ```
30
+
31
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
32
+
33
+
@@ -390,11 +390,11 @@ No authorization required
390
390
 
391
391
  ## getDocumentVersionContents
392
392
 
393
- > PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator getDocumentVersionContents(versionId, sectionId, limit, offset, authorization, ksUat)
393
+ > PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator getDocumentVersionContents(versionId, sectionId, contentType, limit, offset, authorization, ksUat)
394
394
 
395
395
  Get Document Version Contents Handler
396
396
 
397
- List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the &#x60;part_type&#x60; field (\&quot;SECTION\&quot; or \&quot;CHUNK\&quot;).
397
+ List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the &#x60;part_type&#x60; field (\&quot;SECTION\&quot; or \&quot;CHUNK\&quot;). Use &#x60;content_type&#x60; to return only one type (e.g. &#x60;content_type&#x3D;CHUNK&#x60; for chunk-only pagination where offset/limit apply only to chunks).
398
398
 
399
399
  ### Example
400
400
 
@@ -414,6 +414,8 @@ async function example() {
414
414
  versionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
415
415
  // string | Optional section ID to scope traversal to a subtree (optional)
416
416
  sectionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
417
+ // DocumentVersionContentTypeFilter | Filter by content type: SECTION or CHUNK. Omit to return both types. (optional)
418
+ contentType: ...,
417
419
  // number | Number of items per page (optional)
418
420
  limit: 56,
419
421
  // number | Number of items to skip (optional)
@@ -443,6 +445,7 @@ example().catch(console.error);
443
445
  |------------- | ------------- | ------------- | -------------|
444
446
  | **versionId** | `string` | DocumentVersion ID | [Defaults to `undefined`] |
445
447
  | **sectionId** | `string` | Optional section ID to scope traversal to a subtree | [Optional] [Defaults to `undefined`] |
448
+ | **contentType** | `DocumentVersionContentTypeFilter` | Filter by content type: SECTION or CHUNK. Omit to return both types. | [Optional] [Defaults to `undefined`] [Enum: SECTION, CHUNK] |
446
449
  | **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
447
450
  | **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
448
451
  | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
@@ -8,7 +8,9 @@ ThreadMessageContent with enriched citations for API responses.
8
8
  Name | Type
9
9
  ------------ | -------------
10
10
  `text` | string
11
+ `isError` | boolean
11
12
  `citations` | [Array&lt;EnrichedCitation&gt;](EnrichedCitation.md)
13
+ `references` | [Array&lt;ResolvedReferenceOutput&gt;](ResolvedReferenceOutput.md)
12
14
 
13
15
  ## Example
14
16
 
@@ -18,7 +20,9 @@ import type { EnrichedThreadMessageContent } from '@knowledge-stack/ksapi'
18
20
  // TODO: Update the object below with actual values
19
21
  const example = {
20
22
  "text": null,
23
+ "isError": null,
21
24
  "citations": null,
25
+ "references": null,
22
26
  } satisfies EnrichedThreadMessageContent
23
27
 
24
28
  console.log(example)
@@ -0,0 +1,33 @@
1
+
2
+ # NonFilesystemReferenceType
3
+
4
+ Supported reference types that do not map to filesystem PartType.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { NonFilesystemReferenceType } from '@knowledge-stack/ksapi'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ } satisfies NonFilesystemReferenceType
19
+
20
+ console.log(example)
21
+
22
+ // Convert the instance to a JSON string
23
+ const exampleJSON: string = JSON.stringify(example)
24
+ console.log(exampleJSON)
25
+
26
+ // Parse the JSON string back to an object
27
+ const exampleParsed = JSON.parse(exampleJSON) as NonFilesystemReferenceType
28
+ console.log(exampleParsed)
29
+ ```
30
+
31
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
32
+
33
+
@@ -0,0 +1,32 @@
1
+
2
+ # ReferenceType
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import type { ReferenceType } from '@knowledge-stack/ksapi'
14
+
15
+ // TODO: Update the object below with actual values
16
+ const example = {
17
+ } satisfies ReferenceType
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 ReferenceType
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,41 @@
1
+
2
+ # ResolvedReferenceInput
3
+
4
+ A parsed reference enriched with display name and path from the database. Uses ``extra=\"ignore\"`` (not ``\"forbid\"``) because SDK dicts may contain fields not yet modelled here. Adding ``\"forbid\"`` would cause runtime deserialization failures whenever the SDK adds a new field.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `refType` | [ReferenceType](ReferenceType.md)
11
+ `entityId` | string
12
+ `displayName` | string
13
+ `materializedPath` | string
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import type { ResolvedReferenceInput } from '@knowledge-stack/ksapi'
19
+
20
+ // TODO: Update the object below with actual values
21
+ const example = {
22
+ "refType": null,
23
+ "entityId": null,
24
+ "displayName": null,
25
+ "materializedPath": null,
26
+ } satisfies ResolvedReferenceInput
27
+
28
+ console.log(example)
29
+
30
+ // Convert the instance to a JSON string
31
+ const exampleJSON: string = JSON.stringify(example)
32
+ console.log(exampleJSON)
33
+
34
+ // Parse the JSON string back to an object
35
+ const exampleParsed = JSON.parse(exampleJSON) as ResolvedReferenceInput
36
+ console.log(exampleParsed)
37
+ ```
38
+
39
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
40
+
41
+
@@ -0,0 +1,41 @@
1
+
2
+ # ResolvedReferenceOutput
3
+
4
+ A parsed reference enriched with display name and path from the database. Uses ``extra=\"ignore\"`` (not ``\"forbid\"``) because SDK dicts may contain fields not yet modelled here. Adding ``\"forbid\"`` would cause runtime deserialization failures whenever the SDK adds a new field.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `refType` | string
11
+ `entityId` | string
12
+ `displayName` | string
13
+ `materializedPath` | string
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import type { ResolvedReferenceOutput } from '@knowledge-stack/ksapi'
19
+
20
+ // TODO: Update the object below with actual values
21
+ const example = {
22
+ "refType": null,
23
+ "entityId": null,
24
+ "displayName": null,
25
+ "materializedPath": null,
26
+ } satisfies ResolvedReferenceOutput
27
+
28
+ console.log(example)
29
+
30
+ // Convert the instance to a JSON string
31
+ const exampleJSON: string = JSON.stringify(example)
32
+ console.log(exampleJSON)
33
+
34
+ // Parse the JSON string back to an object
35
+ const exampleParsed = JSON.parse(exampleJSON) as ResolvedReferenceOutput
36
+ console.log(exampleParsed)
37
+ ```
38
+
39
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
40
+
41
+
package/docs/StepInput.md CHANGED
@@ -6,6 +6,7 @@
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
+ `id` | string
9
10
  `name` | string
10
11
  `kind` | [StepKind](StepKind.md)
11
12
  `args` | [Args](Args.md)
@@ -21,6 +22,7 @@ import type { StepInput } from '@knowledge-stack/ksapi'
21
22
 
22
23
  // TODO: Update the object below with actual values
23
24
  const example = {
25
+ "id": null,
24
26
  "name": null,
25
27
  "kind": null,
26
28
  "args": null,
@@ -6,6 +6,7 @@
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
+ `id` | string
9
10
  `name` | string
10
11
  `kind` | [StepKind](StepKind.md)
11
12
  `args` | [Args](Args.md)
@@ -21,6 +22,7 @@ import type { StepOutput } from '@knowledge-stack/ksapi'
21
22
 
22
23
  // TODO: Update the object below with actual values
23
24
  const example = {
25
+ "id": null,
24
26
  "name": null,
25
27
  "kind": null,
26
28
  "args": null,
@@ -7,7 +7,9 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `text` | string
10
+ `isError` | boolean
10
11
  `citations` | [Array&lt;Citation&gt;](Citation.md)
12
+ `references` | [Array&lt;ResolvedReferenceInput&gt;](ResolvedReferenceInput.md)
11
13
 
12
14
  ## Example
13
15
 
@@ -17,7 +19,9 @@ import type { ThreadMessageContent } from '@knowledge-stack/ksapi'
17
19
  // TODO: Update the object below with actual values
18
20
  const example = {
19
21
  "text": null,
22
+ "isError": null,
20
23
  "citations": null,
24
+ "references": null,
21
25
  } satisfies ThreadMessageContent
22
26
 
23
27
  console.log(example)
@@ -173,7 +173,7 @@ No authorization required
173
173
 
174
174
  List Thread Messages Handler
175
175
 
176
- List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via &#x60;before&#x60; parameter and standard offset-based pagination via &#x60;limit&#x60;/&#x60;offset&#x60;. Use &#x60;with_details&#x3D;true&#x60; to include execution step data. Details are excluded by default to avoid loading large TOAST data.
176
+ List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via &#x60;before&#x60; parameter and standard offset-based pagination via &#x60;limit&#x60;/&#x60;offset&#x60;. Use &#x60;with_details&#x3D;false&#x60; to exclude execution step data and reduce payload size.
177
177
 
178
178
  ### Example
179
179
 
@@ -193,7 +193,7 @@ async function example() {
193
193
  threadId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
194
194
  // Date | Cursor for keyset pagination: only return messages with created_at < this value (optional)
195
195
  before: 2013-10-20T19:20:30+01:00,
196
- // boolean | Include execution steps in response (default false to reduce payload size) (optional)
196
+ // boolean | Include execution steps in response (default true) (optional)
197
197
  withDetails: true,
198
198
  // number | Number of items per page (optional)
199
199
  limit: 56,
@@ -224,7 +224,7 @@ example().catch(console.error);
224
224
  |------------- | ------------- | ------------- | -------------|
225
225
  | **threadId** | `string` | | [Defaults to `undefined`] |
226
226
  | **before** | `Date` | Cursor for keyset pagination: only return messages with created_at &lt; this value | [Optional] [Defaults to `undefined`] |
227
- | **withDetails** | `boolean` | Include execution steps in response (default false to reduce payload size) | [Optional] [Defaults to `false`] |
227
+ | **withDetails** | `boolean` | Include execution steps in response (default true) | [Optional] [Defaults to `true`] |
228
228
  | **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
229
229
  | **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
230
230
  | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "1.56.0",
3
+ "version": "1.57.0",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -18,6 +18,7 @@ import type {
18
18
  ClearVersionContentsResponse,
19
19
  DocumentVersionAction,
20
20
  DocumentVersionActionResponse,
21
+ DocumentVersionContentTypeFilter,
21
22
  DocumentVersionMetadataUpdate,
22
23
  DocumentVersionResponse,
23
24
  HTTPValidationError,
@@ -31,6 +32,8 @@ import {
31
32
  DocumentVersionActionToJSON,
32
33
  DocumentVersionActionResponseFromJSON,
33
34
  DocumentVersionActionResponseToJSON,
35
+ DocumentVersionContentTypeFilterFromJSON,
36
+ DocumentVersionContentTypeFilterToJSON,
34
37
  DocumentVersionMetadataUpdateFromJSON,
35
38
  DocumentVersionMetadataUpdateToJSON,
36
39
  DocumentVersionResponseFromJSON,
@@ -77,6 +80,7 @@ export interface GetDocumentVersionRequest {
77
80
  export interface GetDocumentVersionContentsRequest {
78
81
  versionId: string;
79
82
  sectionId?: string | null;
83
+ contentType?: DocumentVersionContentTypeFilter;
80
84
  limit?: number;
81
85
  offset?: number;
82
86
  authorization?: string | null;
@@ -251,6 +255,7 @@ export interface DocumentVersionsApiInterface {
251
255
  * Creates request options for getDocumentVersionContents without sending the request
252
256
  * @param {string} versionId DocumentVersion ID
253
257
  * @param {string} [sectionId] Optional section ID to scope traversal to a subtree
258
+ * @param {DocumentVersionContentTypeFilter} [contentType] Filter by content type: SECTION or CHUNK. Omit to return both types.
254
259
  * @param {number} [limit] Number of items per page
255
260
  * @param {number} [offset] Number of items to skip
256
261
  * @param {string} [authorization]
@@ -261,10 +266,11 @@ export interface DocumentVersionsApiInterface {
261
266
  getDocumentVersionContentsRequestOpts(requestParameters: GetDocumentVersionContentsRequest): Promise<runtime.RequestOpts>;
262
267
 
263
268
  /**
264
- * List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
269
+ * List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\"). Use `content_type` to return only one type (e.g. `content_type=CHUNK` for chunk-only pagination where offset/limit apply only to chunks).
265
270
  * @summary Get Document Version Contents Handler
266
271
  * @param {string} versionId DocumentVersion ID
267
272
  * @param {string} [sectionId] Optional section ID to scope traversal to a subtree
273
+ * @param {DocumentVersionContentTypeFilter} [contentType] Filter by content type: SECTION or CHUNK. Omit to return both types.
268
274
  * @param {number} [limit] Number of items per page
269
275
  * @param {number} [offset] Number of items to skip
270
276
  * @param {string} [authorization]
@@ -276,7 +282,7 @@ export interface DocumentVersionsApiInterface {
276
282
  getDocumentVersionContentsRaw(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>>;
277
283
 
278
284
  /**
279
- * List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
285
+ * List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\"). Use `content_type` to return only one type (e.g. `content_type=CHUNK` for chunk-only pagination where offset/limit apply only to chunks).
280
286
  * Get Document Version Contents Handler
281
287
  */
282
288
  getDocumentVersionContents(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>;
@@ -632,6 +638,10 @@ export class DocumentVersionsApi extends runtime.BaseAPI implements DocumentVers
632
638
  queryParameters['section_id'] = requestParameters['sectionId'];
633
639
  }
634
640
 
641
+ if (requestParameters['contentType'] != null) {
642
+ queryParameters['content_type'] = requestParameters['contentType'];
643
+ }
644
+
635
645
  if (requestParameters['limit'] != null) {
636
646
  queryParameters['limit'] = requestParameters['limit'];
637
647
  }
@@ -659,7 +669,7 @@ export class DocumentVersionsApi extends runtime.BaseAPI implements DocumentVers
659
669
  }
660
670
 
661
671
  /**
662
- * List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
672
+ * List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\"). Use `content_type` to return only one type (e.g. `content_type=CHUNK` for chunk-only pagination where offset/limit apply only to chunks).
663
673
  * Get Document Version Contents Handler
664
674
  */
665
675
  async getDocumentVersionContentsRaw(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>> {
@@ -670,7 +680,7 @@ export class DocumentVersionsApi extends runtime.BaseAPI implements DocumentVers
670
680
  }
671
681
 
672
682
  /**
673
- * List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
683
+ * List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\"). Use `content_type` to return only one type (e.g. `content_type=CHUNK` for chunk-only pagination where offset/limit apply only to chunks).
674
684
  * Get Document Version Contents Handler
675
685
  */
676
686
  async getDocumentVersionContents(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator> {
@@ -129,7 +129,7 @@ export interface ThreadMessagesApiInterface {
129
129
  * Creates request options for listThreadMessages without sending the request
130
130
  * @param {string} threadId
131
131
  * @param {Date} [before] Cursor for keyset pagination: only return messages with created_at &lt; this value
132
- * @param {boolean} [withDetails] Include execution steps in response (default false to reduce payload size)
132
+ * @param {boolean} [withDetails] Include execution steps in response (default true)
133
133
  * @param {number} [limit] Number of items per page
134
134
  * @param {number} [offset] Number of items to skip
135
135
  * @param {string} [authorization]
@@ -140,11 +140,11 @@ export interface ThreadMessagesApiInterface {
140
140
  listThreadMessagesRequestOpts(requestParameters: ListThreadMessagesRequest): Promise<runtime.RequestOpts>;
141
141
 
142
142
  /**
143
- * List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=true` to include execution step data. Details are excluded by default to avoid loading large TOAST data.
143
+ * List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=false` to exclude execution step data and reduce payload size.
144
144
  * @summary List Thread Messages Handler
145
145
  * @param {string} threadId
146
146
  * @param {Date} [before] Cursor for keyset pagination: only return messages with created_at &lt; this value
147
- * @param {boolean} [withDetails] Include execution steps in response (default false to reduce payload size)
147
+ * @param {boolean} [withDetails] Include execution steps in response (default true)
148
148
  * @param {number} [limit] Number of items per page
149
149
  * @param {number} [offset] Number of items to skip
150
150
  * @param {string} [authorization]
@@ -156,7 +156,7 @@ export interface ThreadMessagesApiInterface {
156
156
  listThreadMessagesRaw(requestParameters: ListThreadMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseThreadMessageResponse>>;
157
157
 
158
158
  /**
159
- * List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=true` to include execution step data. Details are excluded by default to avoid loading large TOAST data.
159
+ * List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=false` to exclude execution step data and reduce payload size.
160
160
  * List Thread Messages Handler
161
161
  */
162
162
  listThreadMessages(requestParameters: ListThreadMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseThreadMessageResponse>;
@@ -340,7 +340,7 @@ export class ThreadMessagesApi extends runtime.BaseAPI implements ThreadMessages
340
340
  }
341
341
 
342
342
  /**
343
- * List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=true` to include execution step data. Details are excluded by default to avoid loading large TOAST data.
343
+ * List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=false` to exclude execution step data and reduce payload size.
344
344
  * List Thread Messages Handler
345
345
  */
346
346
  async listThreadMessagesRaw(requestParameters: ListThreadMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseThreadMessageResponse>> {
@@ -351,7 +351,7 @@ export class ThreadMessagesApi extends runtime.BaseAPI implements ThreadMessages
351
351
  }
352
352
 
353
353
  /**
354
- * List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=true` to include execution step data. Details are excluded by default to avoid loading large TOAST data.
354
+ * List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=false` to exclude execution step data and reduce payload size.
355
355
  * List Thread Messages Handler
356
356
  */
357
357
  async listThreadMessages(requestParameters: ListThreadMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseThreadMessageResponse> {
@@ -41,6 +41,12 @@ import {
41
41
  * @interface CreateThreadMessageRequest
42
42
  */
43
43
  export interface CreateThreadMessageRequest {
44
+ /**
45
+ * Optional caller-supplied ThreadMessage ID for idempotent creates.
46
+ * @type {string}
47
+ * @memberof CreateThreadMessageRequest
48
+ */
49
+ messageId?: string | null;
44
50
  /**
45
51
  *
46
52
  * @type {MessageRole}
@@ -82,6 +88,7 @@ export function CreateThreadMessageRequestFromJSONTyped(json: any, ignoreDiscrim
82
88
  }
83
89
  return {
84
90
 
91
+ 'messageId': json['message_id'] == null ? undefined : json['message_id'],
85
92
  'role': MessageRoleFromJSON(json['role']),
86
93
  'content': ThreadMessageContentFromJSON(json['content']),
87
94
  'details': json['details'] == null ? undefined : ThreadMessageDetailsInputFromJSON(json['details']),
@@ -99,6 +106,7 @@ export function CreateThreadMessageRequestToJSONTyped(value?: CreateThreadMessag
99
106
 
100
107
  return {
101
108
 
109
+ 'message_id': value['messageId'],
102
110
  'role': MessageRoleToJSON(value['role']),
103
111
  'content': ThreadMessageContentToJSON(value['content']),
104
112
  'details': ThreadMessageDetailsInputToJSON(value['details']),