@knowledge-stack/ksapi 1.39.4 → 1.39.6

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @knowledge-stack/ksapi@1.39.4
1
+ # @knowledge-stack/ksapi@1.39.6
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -275,7 +275,7 @@ and is automatically generated by the
275
275
  [OpenAPI Generator](https://openapi-generator.tech) project:
276
276
 
277
277
  - API version: `0.1.0`
278
- - Package version: `1.39.4`
278
+ - Package version: `1.39.6`
279
279
  - Generator version: `7.20.0`
280
280
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
281
281
 
@@ -21,6 +21,7 @@ export interface DeleteChunkRequest {
21
21
  }
22
22
  export interface GetChunkRequest {
23
23
  chunkId: string;
24
+ withDocument?: boolean;
24
25
  ksUat?: string | null;
25
26
  }
26
27
  export interface GetChunksBulkRequest {
@@ -101,6 +102,7 @@ export interface ChunksApiInterface {
101
102
  /**
102
103
  * Creates request options for getChunk without sending the request
103
104
  * @param {string} chunkId
105
+ * @param {boolean} [withDocument] Include ancestor document_id and document_version_id (default: false)
104
106
  * @param {string} [ksUat]
105
107
  * @throws {RequiredError}
106
108
  * @memberof ChunksApiInterface
@@ -110,6 +112,7 @@ export interface ChunksApiInterface {
110
112
  * Get a chunk by its ID, including content.
111
113
  * @summary Get Chunk Handler
112
114
  * @param {string} chunkId
115
+ * @param {boolean} [withDocument] Include ancestor document_id and document_version_id (default: false)
113
116
  * @param {string} [ksUat]
114
117
  * @param {*} [options] Override http request option.
115
118
  * @throws {RequiredError}
@@ -120,6 +120,9 @@ class ChunksApi extends runtime.BaseAPI {
120
120
  throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling getChunk().');
121
121
  }
122
122
  const queryParameters = {};
123
+ if (requestParameters['withDocument'] != null) {
124
+ queryParameters['with_document'] = requestParameters['withDocument'];
125
+ }
123
126
  const headerParameters = {};
124
127
  let urlPath = `/v1/chunks/{chunk_id}`;
125
128
  urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
@@ -21,6 +21,7 @@ export interface DeleteChunkRequest {
21
21
  }
22
22
  export interface GetChunkRequest {
23
23
  chunkId: string;
24
+ withDocument?: boolean;
24
25
  ksUat?: string | null;
25
26
  }
26
27
  export interface GetChunksBulkRequest {
@@ -101,6 +102,7 @@ export interface ChunksApiInterface {
101
102
  /**
102
103
  * Creates request options for getChunk without sending the request
103
104
  * @param {string} chunkId
105
+ * @param {boolean} [withDocument] Include ancestor document_id and document_version_id (default: false)
104
106
  * @param {string} [ksUat]
105
107
  * @throws {RequiredError}
106
108
  * @memberof ChunksApiInterface
@@ -110,6 +112,7 @@ export interface ChunksApiInterface {
110
112
  * Get a chunk by its ID, including content.
111
113
  * @summary Get Chunk Handler
112
114
  * @param {string} chunkId
115
+ * @param {boolean} [withDocument] Include ancestor document_id and document_version_id (default: false)
113
116
  * @param {string} [ksUat]
114
117
  * @param {*} [options] Override http request option.
115
118
  * @throws {RequiredError}
@@ -117,6 +117,9 @@ export class ChunksApi extends runtime.BaseAPI {
117
117
  throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling getChunk().');
118
118
  }
119
119
  const queryParameters = {};
120
+ if (requestParameters['withDocument'] != null) {
121
+ queryParameters['with_document'] = requestParameters['withDocument'];
122
+ }
120
123
  const headerParameters = {};
121
124
  let urlPath = `/v1/chunks/{chunk_id}`;
122
125
  urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
@@ -107,6 +107,18 @@ export interface ChunkBulkResponse {
107
107
  * @memberof ChunkBulkResponse
108
108
  */
109
109
  assetS3Urls?: Array<string>;
110
+ /**
111
+ * ID of the ancestor document (populated when with_document=true)
112
+ * @type {string}
113
+ * @memberof ChunkBulkResponse
114
+ */
115
+ documentId?: string | null;
116
+ /**
117
+ * ID of the ancestor document version (populated when with_document=true)
118
+ * @type {string}
119
+ * @memberof ChunkBulkResponse
120
+ */
121
+ documentVersionId?: string | null;
110
122
  /**
111
123
  * Ordered ancestor PathPart IDs from root to chunk
112
124
  * @type {Array<string>}
@@ -68,6 +68,8 @@ export function ChunkBulkResponseFromJSONTyped(json, ignoreDiscriminator) {
68
68
  'createdAt': (new Date(json['created_at'])),
69
69
  'updatedAt': (new Date(json['updated_at'])),
70
70
  'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
71
+ 'documentId': json['document_id'] == null ? undefined : json['document_id'],
72
+ 'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
71
73
  'pathPartIdSegments': json['path_part_id_segments'],
72
74
  };
73
75
  }
@@ -94,6 +96,8 @@ export function ChunkBulkResponseToJSONTyped(value, ignoreDiscriminator = false)
94
96
  'created_at': value['createdAt'].toISOString(),
95
97
  'updated_at': value['updatedAt'].toISOString(),
96
98
  'asset_s3_urls': value['assetS3Urls'],
99
+ 'document_id': value['documentId'],
100
+ 'document_version_id': value['documentVersionId'],
97
101
  'path_part_id_segments': value['pathPartIdSegments'],
98
102
  };
99
103
  }
@@ -107,6 +107,18 @@ export interface ChunkResponse {
107
107
  * @memberof ChunkResponse
108
108
  */
109
109
  assetS3Urls?: Array<string>;
110
+ /**
111
+ * ID of the ancestor document (populated when with_document=true)
112
+ * @type {string}
113
+ * @memberof ChunkResponse
114
+ */
115
+ documentId?: string | null;
116
+ /**
117
+ * ID of the ancestor document version (populated when with_document=true)
118
+ * @type {string}
119
+ * @memberof ChunkResponse
120
+ */
121
+ documentVersionId?: string | null;
110
122
  }
111
123
  /**
112
124
  * Check if a given object implements the ChunkResponse interface.
@@ -66,6 +66,8 @@ export function ChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
66
66
  'createdAt': (new Date(json['created_at'])),
67
67
  'updatedAt': (new Date(json['updated_at'])),
68
68
  'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
69
+ 'documentId': json['document_id'] == null ? undefined : json['document_id'],
70
+ 'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
69
71
  };
70
72
  }
71
73
  export function ChunkResponseToJSON(json) {
@@ -91,6 +93,8 @@ export function ChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
91
93
  'created_at': value['createdAt'].toISOString(),
92
94
  'updated_at': value['updatedAt'].toISOString(),
93
95
  'asset_s3_urls': value['assetS3Urls'],
96
+ 'document_id': value['documentId'],
97
+ 'document_version_id': value['documentVersionId'],
94
98
  };
95
99
  }
96
100
  export const ChunkResponsePropertyValidationAttributesMap = {};
@@ -71,6 +71,12 @@ export interface ChunkSearchRequest {
71
71
  * @memberof ChunkSearchRequest
72
72
  */
73
73
  scoreThreshold?: number;
74
+ /**
75
+ * Include ancestor document_id and document_version_id in each result
76
+ * @type {boolean}
77
+ * @memberof ChunkSearchRequest
78
+ */
79
+ withDocument?: boolean;
74
80
  }
75
81
  /**
76
82
  * Check if a given object implements the ChunkSearchRequest interface.
@@ -38,6 +38,7 @@ export function ChunkSearchRequestFromJSONTyped(json, ignoreDiscriminator) {
38
38
  'activeVersionOnly': json['active_version_only'] == null ? undefined : json['active_version_only'],
39
39
  'topK': json['top_k'] == null ? undefined : json['top_k'],
40
40
  'scoreThreshold': json['score_threshold'] == null ? undefined : json['score_threshold'],
41
+ 'withDocument': json['with_document'] == null ? undefined : json['with_document'],
41
42
  };
42
43
  }
43
44
  export function ChunkSearchRequestToJSON(json) {
@@ -57,6 +58,7 @@ export function ChunkSearchRequestToJSONTyped(value, ignoreDiscriminator = false
57
58
  'active_version_only': value['activeVersionOnly'],
58
59
  'top_k': value['topK'],
59
60
  'score_threshold': value['scoreThreshold'],
61
+ 'with_document': value['withDocument'],
60
62
  };
61
63
  }
62
64
  export const ChunkSearchRequestPropertyValidationAttributesMap = {
@@ -107,6 +107,18 @@ export interface ScoredChunkResponse {
107
107
  * @memberof ScoredChunkResponse
108
108
  */
109
109
  assetS3Urls?: Array<string>;
110
+ /**
111
+ * ID of the ancestor document (populated when with_document=true)
112
+ * @type {string}
113
+ * @memberof ScoredChunkResponse
114
+ */
115
+ documentId?: string | null;
116
+ /**
117
+ * ID of the ancestor document version (populated when with_document=true)
118
+ * @type {string}
119
+ * @memberof ScoredChunkResponse
120
+ */
121
+ documentVersionId?: string | null;
110
122
  /**
111
123
  * Cosine similarity score (1 - cosine_distance)
112
124
  * @type {number}
@@ -68,6 +68,8 @@ export function ScoredChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
68
68
  'createdAt': (new Date(json['created_at'])),
69
69
  'updatedAt': (new Date(json['updated_at'])),
70
70
  'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
71
+ 'documentId': json['document_id'] == null ? undefined : json['document_id'],
72
+ 'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
71
73
  'score': json['score'],
72
74
  };
73
75
  }
@@ -94,6 +96,8 @@ export function ScoredChunkResponseToJSONTyped(value, ignoreDiscriminator = fals
94
96
  'created_at': value['createdAt'].toISOString(),
95
97
  'updated_at': value['updatedAt'].toISOString(),
96
98
  'asset_s3_urls': value['assetS3Urls'],
99
+ 'document_id': value['documentId'],
100
+ 'document_version_id': value['documentVersionId'],
97
101
  'score': value['score'],
98
102
  };
99
103
  }
@@ -107,6 +107,18 @@ export interface ChunkBulkResponse {
107
107
  * @memberof ChunkBulkResponse
108
108
  */
109
109
  assetS3Urls?: Array<string>;
110
+ /**
111
+ * ID of the ancestor document (populated when with_document=true)
112
+ * @type {string}
113
+ * @memberof ChunkBulkResponse
114
+ */
115
+ documentId?: string | null;
116
+ /**
117
+ * ID of the ancestor document version (populated when with_document=true)
118
+ * @type {string}
119
+ * @memberof ChunkBulkResponse
120
+ */
121
+ documentVersionId?: string | null;
110
122
  /**
111
123
  * Ordered ancestor PathPart IDs from root to chunk
112
124
  * @type {Array<string>}
@@ -76,6 +76,8 @@ function ChunkBulkResponseFromJSONTyped(json, ignoreDiscriminator) {
76
76
  'createdAt': (new Date(json['created_at'])),
77
77
  'updatedAt': (new Date(json['updated_at'])),
78
78
  'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
79
+ 'documentId': json['document_id'] == null ? undefined : json['document_id'],
80
+ 'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
79
81
  'pathPartIdSegments': json['path_part_id_segments'],
80
82
  };
81
83
  }
@@ -102,6 +104,8 @@ function ChunkBulkResponseToJSONTyped(value, ignoreDiscriminator = false) {
102
104
  'created_at': value['createdAt'].toISOString(),
103
105
  'updated_at': value['updatedAt'].toISOString(),
104
106
  'asset_s3_urls': value['assetS3Urls'],
107
+ 'document_id': value['documentId'],
108
+ 'document_version_id': value['documentVersionId'],
105
109
  'path_part_id_segments': value['pathPartIdSegments'],
106
110
  };
107
111
  }
@@ -107,6 +107,18 @@ export interface ChunkResponse {
107
107
  * @memberof ChunkResponse
108
108
  */
109
109
  assetS3Urls?: Array<string>;
110
+ /**
111
+ * ID of the ancestor document (populated when with_document=true)
112
+ * @type {string}
113
+ * @memberof ChunkResponse
114
+ */
115
+ documentId?: string | null;
116
+ /**
117
+ * ID of the ancestor document version (populated when with_document=true)
118
+ * @type {string}
119
+ * @memberof ChunkResponse
120
+ */
121
+ documentVersionId?: string | null;
110
122
  }
111
123
  /**
112
124
  * Check if a given object implements the ChunkResponse interface.
@@ -74,6 +74,8 @@ function ChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
74
74
  'createdAt': (new Date(json['created_at'])),
75
75
  'updatedAt': (new Date(json['updated_at'])),
76
76
  'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
77
+ 'documentId': json['document_id'] == null ? undefined : json['document_id'],
78
+ 'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
77
79
  };
78
80
  }
79
81
  function ChunkResponseToJSON(json) {
@@ -99,6 +101,8 @@ function ChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
99
101
  'created_at': value['createdAt'].toISOString(),
100
102
  'updated_at': value['updatedAt'].toISOString(),
101
103
  'asset_s3_urls': value['assetS3Urls'],
104
+ 'document_id': value['documentId'],
105
+ 'document_version_id': value['documentVersionId'],
102
106
  };
103
107
  }
104
108
  exports.ChunkResponsePropertyValidationAttributesMap = {};
@@ -71,6 +71,12 @@ export interface ChunkSearchRequest {
71
71
  * @memberof ChunkSearchRequest
72
72
  */
73
73
  scoreThreshold?: number;
74
+ /**
75
+ * Include ancestor document_id and document_version_id in each result
76
+ * @type {boolean}
77
+ * @memberof ChunkSearchRequest
78
+ */
79
+ withDocument?: boolean;
74
80
  }
75
81
  /**
76
82
  * Check if a given object implements the ChunkSearchRequest interface.
@@ -46,6 +46,7 @@ function ChunkSearchRequestFromJSONTyped(json, ignoreDiscriminator) {
46
46
  'activeVersionOnly': json['active_version_only'] == null ? undefined : json['active_version_only'],
47
47
  'topK': json['top_k'] == null ? undefined : json['top_k'],
48
48
  'scoreThreshold': json['score_threshold'] == null ? undefined : json['score_threshold'],
49
+ 'withDocument': json['with_document'] == null ? undefined : json['with_document'],
49
50
  };
50
51
  }
51
52
  function ChunkSearchRequestToJSON(json) {
@@ -65,6 +66,7 @@ function ChunkSearchRequestToJSONTyped(value, ignoreDiscriminator = false) {
65
66
  'active_version_only': value['activeVersionOnly'],
66
67
  'top_k': value['topK'],
67
68
  'score_threshold': value['scoreThreshold'],
69
+ 'with_document': value['withDocument'],
68
70
  };
69
71
  }
70
72
  exports.ChunkSearchRequestPropertyValidationAttributesMap = {
@@ -107,6 +107,18 @@ export interface ScoredChunkResponse {
107
107
  * @memberof ScoredChunkResponse
108
108
  */
109
109
  assetS3Urls?: Array<string>;
110
+ /**
111
+ * ID of the ancestor document (populated when with_document=true)
112
+ * @type {string}
113
+ * @memberof ScoredChunkResponse
114
+ */
115
+ documentId?: string | null;
116
+ /**
117
+ * ID of the ancestor document version (populated when with_document=true)
118
+ * @type {string}
119
+ * @memberof ScoredChunkResponse
120
+ */
121
+ documentVersionId?: string | null;
110
122
  /**
111
123
  * Cosine similarity score (1 - cosine_distance)
112
124
  * @type {number}
@@ -76,6 +76,8 @@ function ScoredChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
76
76
  'createdAt': (new Date(json['created_at'])),
77
77
  'updatedAt': (new Date(json['updated_at'])),
78
78
  'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
79
+ 'documentId': json['document_id'] == null ? undefined : json['document_id'],
80
+ 'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
79
81
  'score': json['score'],
80
82
  };
81
83
  }
@@ -102,6 +104,8 @@ function ScoredChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
102
104
  'created_at': value['createdAt'].toISOString(),
103
105
  'updated_at': value['updatedAt'].toISOString(),
104
106
  'asset_s3_urls': value['assetS3Urls'],
107
+ 'document_id': value['documentId'],
108
+ 'document_version_id': value['documentVersionId'],
105
109
  'score': value['score'],
106
110
  };
107
111
  }
@@ -22,6 +22,8 @@ Name | Type
22
22
  `createdAt` | Date
23
23
  `updatedAt` | Date
24
24
  `assetS3Urls` | Array&lt;string&gt;
25
+ `documentId` | string
26
+ `documentVersionId` | string
25
27
  `pathPartIdSegments` | Array&lt;string&gt;
26
28
 
27
29
  ## Example
@@ -46,6 +48,8 @@ const example = {
46
48
  "createdAt": null,
47
49
  "updatedAt": null,
48
50
  "assetS3Urls": null,
51
+ "documentId": null,
52
+ "documentVersionId": null,
49
53
  "pathPartIdSegments": null,
50
54
  } satisfies ChunkBulkResponse
51
55
 
@@ -22,6 +22,8 @@ Name | Type
22
22
  `createdAt` | Date
23
23
  `updatedAt` | Date
24
24
  `assetS3Urls` | Array&lt;string&gt;
25
+ `documentId` | string
26
+ `documentVersionId` | string
25
27
 
26
28
  ## Example
27
29
 
@@ -45,6 +47,8 @@ const example = {
45
47
  "createdAt": null,
46
48
  "updatedAt": null,
47
49
  "assetS3Urls": null,
50
+ "documentId": null,
51
+ "documentVersionId": null,
48
52
  } satisfies ChunkResponse
49
53
 
50
54
  console.log(example)
@@ -16,6 +16,7 @@ Name | Type
16
16
  `activeVersionOnly` | boolean
17
17
  `topK` | number
18
18
  `scoreThreshold` | number
19
+ `withDocument` | boolean
19
20
 
20
21
  ## Example
21
22
 
@@ -33,6 +34,7 @@ const example = {
33
34
  "activeVersionOnly": null,
34
35
  "topK": null,
35
36
  "scoreThreshold": null,
37
+ "withDocument": null,
36
38
  } satisfies ChunkSearchRequest
37
39
 
38
40
  console.log(example)
package/docs/ChunksApi.md CHANGED
@@ -159,7 +159,7 @@ No authorization required
159
159
 
160
160
  ## getChunk
161
161
 
162
- > ChunkResponse getChunk(chunkId, ksUat)
162
+ > ChunkResponse getChunk(chunkId, withDocument, ksUat)
163
163
 
164
164
  Get Chunk Handler
165
165
 
@@ -181,6 +181,8 @@ async function example() {
181
181
  const body = {
182
182
  // string
183
183
  chunkId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
184
+ // boolean | Include ancestor document_id and document_version_id (default: false) (optional)
185
+ withDocument: true,
184
186
  // string (optional)
185
187
  ksUat: ksUat_example,
186
188
  } satisfies GetChunkRequest;
@@ -203,6 +205,7 @@ example().catch(console.error);
203
205
  | Name | Type | Description | Notes |
204
206
  |------------- | ------------- | ------------- | -------------|
205
207
  | **chunkId** | `string` | | [Defaults to `undefined`] |
208
+ | **withDocument** | `boolean` | Include ancestor document_id and document_version_id (default: false) | [Optional] [Defaults to `false`] |
206
209
  | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
207
210
 
208
211
  ### Return type
@@ -22,6 +22,8 @@ Name | Type
22
22
  `createdAt` | Date
23
23
  `updatedAt` | Date
24
24
  `assetS3Urls` | Array&lt;string&gt;
25
+ `documentId` | string
26
+ `documentVersionId` | string
25
27
  `score` | number
26
28
 
27
29
  ## Example
@@ -46,6 +48,8 @@ const example = {
46
48
  "createdAt": null,
47
49
  "updatedAt": null,
48
50
  "assetS3Urls": null,
51
+ "documentId": null,
52
+ "documentVersionId": null,
49
53
  "score": null,
50
54
  } satisfies ScoredChunkResponse
51
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "1.39.4",
3
+ "version": "1.39.6",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -58,6 +58,7 @@ export interface DeleteChunkRequest {
58
58
 
59
59
  export interface GetChunkRequest {
60
60
  chunkId: string;
61
+ withDocument?: boolean;
61
62
  ksUat?: string | null;
62
63
  }
63
64
 
@@ -150,6 +151,7 @@ export interface ChunksApiInterface {
150
151
  /**
151
152
  * Creates request options for getChunk without sending the request
152
153
  * @param {string} chunkId
154
+ * @param {boolean} [withDocument] Include ancestor document_id and document_version_id (default: false)
153
155
  * @param {string} [ksUat]
154
156
  * @throws {RequiredError}
155
157
  * @memberof ChunksApiInterface
@@ -160,6 +162,7 @@ export interface ChunksApiInterface {
160
162
  * Get a chunk by its ID, including content.
161
163
  * @summary Get Chunk Handler
162
164
  * @param {string} chunkId
165
+ * @param {boolean} [withDocument] Include ancestor document_id and document_version_id (default: false)
163
166
  * @param {string} [ksUat]
164
167
  * @param {*} [options] Override http request option.
165
168
  * @throws {RequiredError}
@@ -422,6 +425,10 @@ export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
422
425
 
423
426
  const queryParameters: any = {};
424
427
 
428
+ if (requestParameters['withDocument'] != null) {
429
+ queryParameters['with_document'] = requestParameters['withDocument'];
430
+ }
431
+
425
432
  const headerParameters: runtime.HTTPHeaders = {};
426
433
 
427
434
 
@@ -124,6 +124,18 @@ export interface ChunkBulkResponse {
124
124
  * @memberof ChunkBulkResponse
125
125
  */
126
126
  assetS3Urls?: Array<string>;
127
+ /**
128
+ * ID of the ancestor document (populated when with_document=true)
129
+ * @type {string}
130
+ * @memberof ChunkBulkResponse
131
+ */
132
+ documentId?: string | null;
133
+ /**
134
+ * ID of the ancestor document version (populated when with_document=true)
135
+ * @type {string}
136
+ * @memberof ChunkBulkResponse
137
+ */
138
+ documentVersionId?: string | null;
127
139
  /**
128
140
  * Ordered ancestor PathPart IDs from root to chunk
129
141
  * @type {Array<string>}
@@ -179,6 +191,8 @@ export function ChunkBulkResponseFromJSONTyped(json: any, ignoreDiscriminator: b
179
191
  'createdAt': (new Date(json['created_at'])),
180
192
  'updatedAt': (new Date(json['updated_at'])),
181
193
  'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
194
+ 'documentId': json['document_id'] == null ? undefined : json['document_id'],
195
+ 'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
182
196
  'pathPartIdSegments': json['path_part_id_segments'],
183
197
  };
184
198
  }
@@ -209,6 +223,8 @@ export function ChunkBulkResponseToJSONTyped(value?: ChunkBulkResponse | null, i
209
223
  'created_at': value['createdAt'].toISOString(),
210
224
  'updated_at': value['updatedAt'].toISOString(),
211
225
  'asset_s3_urls': value['assetS3Urls'],
226
+ 'document_id': value['documentId'],
227
+ 'document_version_id': value['documentVersionId'],
212
228
  'path_part_id_segments': value['pathPartIdSegments'],
213
229
  };
214
230
  }
@@ -124,6 +124,18 @@ export interface ChunkResponse {
124
124
  * @memberof ChunkResponse
125
125
  */
126
126
  assetS3Urls?: Array<string>;
127
+ /**
128
+ * ID of the ancestor document (populated when with_document=true)
129
+ * @type {string}
130
+ * @memberof ChunkResponse
131
+ */
132
+ documentId?: string | null;
133
+ /**
134
+ * ID of the ancestor document version (populated when with_document=true)
135
+ * @type {string}
136
+ * @memberof ChunkResponse
137
+ */
138
+ documentVersionId?: string | null;
127
139
  }
128
140
 
129
141
 
@@ -172,6 +184,8 @@ export function ChunkResponseFromJSONTyped(json: any, ignoreDiscriminator: boole
172
184
  'createdAt': (new Date(json['created_at'])),
173
185
  'updatedAt': (new Date(json['updated_at'])),
174
186
  'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
187
+ 'documentId': json['document_id'] == null ? undefined : json['document_id'],
188
+ 'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
175
189
  };
176
190
  }
177
191
 
@@ -201,6 +215,8 @@ export function ChunkResponseToJSONTyped(value?: ChunkResponse | null, ignoreDis
201
215
  'created_at': value['createdAt'].toISOString(),
202
216
  'updated_at': value['updatedAt'].toISOString(),
203
217
  'asset_s3_urls': value['assetS3Urls'],
218
+ 'document_id': value['documentId'],
219
+ 'document_version_id': value['documentVersionId'],
204
220
  };
205
221
  }
206
222
 
@@ -88,6 +88,12 @@ export interface ChunkSearchRequest {
88
88
  * @memberof ChunkSearchRequest
89
89
  */
90
90
  scoreThreshold?: number;
91
+ /**
92
+ * Include ancestor document_id and document_version_id in each result
93
+ * @type {boolean}
94
+ * @memberof ChunkSearchRequest
95
+ */
96
+ withDocument?: boolean;
91
97
  }
92
98
 
93
99
 
@@ -119,6 +125,7 @@ export function ChunkSearchRequestFromJSONTyped(json: any, ignoreDiscriminator:
119
125
  'activeVersionOnly': json['active_version_only'] == null ? undefined : json['active_version_only'],
120
126
  'topK': json['top_k'] == null ? undefined : json['top_k'],
121
127
  'scoreThreshold': json['score_threshold'] == null ? undefined : json['score_threshold'],
128
+ 'withDocument': json['with_document'] == null ? undefined : json['with_document'],
122
129
  };
123
130
  }
124
131
 
@@ -142,6 +149,7 @@ export function ChunkSearchRequestToJSONTyped(value?: ChunkSearchRequest | null,
142
149
  'active_version_only': value['activeVersionOnly'],
143
150
  'top_k': value['topK'],
144
151
  'score_threshold': value['scoreThreshold'],
152
+ 'with_document': value['withDocument'],
145
153
  };
146
154
  }
147
155
 
@@ -124,6 +124,18 @@ export interface ScoredChunkResponse {
124
124
  * @memberof ScoredChunkResponse
125
125
  */
126
126
  assetS3Urls?: Array<string>;
127
+ /**
128
+ * ID of the ancestor document (populated when with_document=true)
129
+ * @type {string}
130
+ * @memberof ScoredChunkResponse
131
+ */
132
+ documentId?: string | null;
133
+ /**
134
+ * ID of the ancestor document version (populated when with_document=true)
135
+ * @type {string}
136
+ * @memberof ScoredChunkResponse
137
+ */
138
+ documentVersionId?: string | null;
127
139
  /**
128
140
  * Cosine similarity score (1 - cosine_distance)
129
141
  * @type {number}
@@ -179,6 +191,8 @@ export function ScoredChunkResponseFromJSONTyped(json: any, ignoreDiscriminator:
179
191
  'createdAt': (new Date(json['created_at'])),
180
192
  'updatedAt': (new Date(json['updated_at'])),
181
193
  'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
194
+ 'documentId': json['document_id'] == null ? undefined : json['document_id'],
195
+ 'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
182
196
  'score': json['score'],
183
197
  };
184
198
  }
@@ -209,6 +223,8 @@ export function ScoredChunkResponseToJSONTyped(value?: ScoredChunkResponse | nul
209
223
  'created_at': value['createdAt'].toISOString(),
210
224
  'updated_at': value['updatedAt'].toISOString(),
211
225
  'asset_s3_urls': value['assetS3Urls'],
226
+ 'document_id': value['documentId'],
227
+ 'document_version_id': value['documentVersionId'],
212
228
  'score': value['score'],
213
229
  };
214
230
  }