@knowledge-stack/ksapi 1.142.1 → 1.142.2

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.142.1
1
+ # @knowledge-stack/ksapi@1.142.2
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -125,6 +125,7 @@ All URIs are relative to *http://localhost:8000*
125
125
  *DocumentCheckoutApi* | [**acquireDocumentCheckout**](docs/DocumentCheckoutApi.md#acquiredocumentcheckout) | **POST** /v1/documents/{document_id}/checkout | Acquire Document Checkout Handler
126
126
  *DocumentCheckoutApi* | [**getDocumentCheckout**](docs/DocumentCheckoutApi.md#getdocumentcheckout) | **GET** /v1/documents/{document_id}/checkout | Get Document Checkout Handler
127
127
  *DocumentCheckoutApi* | [**releaseDocumentCheckout**](docs/DocumentCheckoutApi.md#releasedocumentcheckout) | **DELETE** /v1/documents/{document_id}/checkout | Release Document Checkout Handler
128
+ *DocumentVersionsApi* | [**attachCitedAsset**](docs/DocumentVersionsApi.md#attachcitedasset) | **POST** /v1/document_versions/{version_id}/cited-asset | Attach Cited Asset Handler
128
129
  *DocumentVersionsApi* | [**clearDocumentVersionContents**](docs/DocumentVersionsApi.md#cleardocumentversioncontents) | **DELETE** /v1/document_versions/{version_id}/contents | Clear Document Version Contents Handler
129
130
  *DocumentVersionsApi* | [**createDocumentVersion**](docs/DocumentVersionsApi.md#createdocumentversion) | **POST** /v1/documents/{document_id}/versions | Create Document Version Handler
130
131
  *DocumentVersionsApi* | [**deleteDocumentVersion**](docs/DocumentVersionsApi.md#deletedocumentversion) | **DELETE** /v1/document_versions/{version_id} | Delete Document Version Handler
@@ -669,7 +670,7 @@ and is automatically generated by the
669
670
  [OpenAPI Generator](https://openapi-generator.tech) project:
670
671
 
671
672
  - API version: `0.1.0`
672
- - Package version: `1.142.1`
673
+ - Package version: `1.142.2`
673
674
  - Generator version: `7.21.0`
674
675
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
675
676
 
@@ -11,6 +11,10 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import type { ClearVersionContentsResponse, DocumentDownloadResponse, DocumentVersionAction, DocumentVersionActionResponse, DocumentVersionContentTypeFilter, DocumentVersionMetadataUpdate, DocumentVersionOrder, DocumentVersionResponse, DownloadArtifact, PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator, PaginatedResponseDocumentVersionResponse, SortDirection, VersionDiffResponse } from '../models/index';
14
+ export interface AttachCitedAssetRequest {
15
+ versionId: string;
16
+ file: Blob;
17
+ }
14
18
  export interface ClearDocumentVersionContentsRequest {
15
19
  versionId: string;
16
20
  }
@@ -66,6 +70,29 @@ export interface UpdateDocumentVersionMetadataRequest {
66
70
  * @interface DocumentVersionsApiInterface
67
71
  */
68
72
  export interface DocumentVersionsApiInterface {
73
+ /**
74
+ * Creates request options for attachCitedAsset without sending the request
75
+ * @param {string} versionId DocumentVersion ID
76
+ * @param {Blob} file
77
+ * @throws {RequiredError}
78
+ * @memberof DocumentVersionsApiInterface
79
+ */
80
+ attachCitedAssetRequestOpts(requestParameters: AttachCitedAssetRequest): Promise<runtime.RequestOpts>;
81
+ /**
82
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
83
+ * @summary Attach Cited Asset Handler
84
+ * @param {string} versionId DocumentVersion ID
85
+ * @param {Blob} file
86
+ * @param {*} [options] Override http request option.
87
+ * @throws {RequiredError}
88
+ * @memberof DocumentVersionsApiInterface
89
+ */
90
+ attachCitedAssetRaw(requestParameters: AttachCitedAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
91
+ /**
92
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
93
+ * Attach Cited Asset Handler
94
+ */
95
+ attachCitedAsset(requestParameters: AttachCitedAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
69
96
  /**
70
97
  * Creates request options for clearDocumentVersionContents without sending the request
71
98
  * @param {string} versionId DocumentVersion ID
@@ -316,6 +343,20 @@ export interface DocumentVersionsApiInterface {
316
343
  *
317
344
  */
318
345
  export declare class DocumentVersionsApi extends runtime.BaseAPI implements DocumentVersionsApiInterface {
346
+ /**
347
+ * Creates request options for attachCitedAsset without sending the request
348
+ */
349
+ attachCitedAssetRequestOpts(requestParameters: AttachCitedAssetRequest): Promise<runtime.RequestOpts>;
350
+ /**
351
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
352
+ * Attach Cited Asset Handler
353
+ */
354
+ attachCitedAssetRaw(requestParameters: AttachCitedAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
355
+ /**
356
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
357
+ * Attach Cited Asset Handler
358
+ */
359
+ attachCitedAsset(requestParameters: AttachCitedAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
319
360
  /**
320
361
  * Creates request options for clearDocumentVersionContents without sending the request
321
362
  */
@@ -62,6 +62,75 @@ const index_1 = require("../models/index");
62
62
  *
63
63
  */
64
64
  class DocumentVersionsApi extends runtime.BaseAPI {
65
+ /**
66
+ * Creates request options for attachCitedAsset without sending the request
67
+ */
68
+ attachCitedAssetRequestOpts(requestParameters) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ if (requestParameters['versionId'] == null) {
71
+ throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling attachCitedAsset().');
72
+ }
73
+ if (requestParameters['file'] == null) {
74
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling attachCitedAsset().');
75
+ }
76
+ const queryParameters = {};
77
+ const headerParameters = {};
78
+ if (this.configuration && this.configuration.accessToken) {
79
+ const token = this.configuration.accessToken;
80
+ const tokenString = yield token("bearerAuth", []);
81
+ if (tokenString) {
82
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
83
+ }
84
+ }
85
+ const consumes = [
86
+ { contentType: 'multipart/form-data' },
87
+ ];
88
+ // @ts-ignore: canConsumeForm may be unused
89
+ const canConsumeForm = runtime.canConsumeForm(consumes);
90
+ let formParams;
91
+ let useForm = false;
92
+ // use FormData to transmit files using content-type "multipart/form-data"
93
+ useForm = canConsumeForm;
94
+ if (useForm) {
95
+ formParams = new FormData();
96
+ }
97
+ else {
98
+ formParams = new URLSearchParams();
99
+ }
100
+ if (requestParameters['file'] != null) {
101
+ formParams.append('file', requestParameters['file']);
102
+ }
103
+ let urlPath = `/v1/document_versions/{version_id}/cited-asset`;
104
+ urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
105
+ return {
106
+ path: urlPath,
107
+ method: 'POST',
108
+ headers: headerParameters,
109
+ query: queryParameters,
110
+ body: formParams,
111
+ };
112
+ });
113
+ }
114
+ /**
115
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
116
+ * Attach Cited Asset Handler
117
+ */
118
+ attachCitedAssetRaw(requestParameters, initOverrides) {
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ const requestOptions = yield this.attachCitedAssetRequestOpts(requestParameters);
121
+ const response = yield this.request(requestOptions, initOverrides);
122
+ return new runtime.VoidApiResponse(response);
123
+ });
124
+ }
125
+ /**
126
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
127
+ * Attach Cited Asset Handler
128
+ */
129
+ attachCitedAsset(requestParameters, initOverrides) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ yield this.attachCitedAssetRaw(requestParameters, initOverrides);
132
+ });
133
+ }
65
134
  /**
66
135
  * Creates request options for clearDocumentVersionContents without sending the request
67
136
  */
@@ -11,6 +11,10 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import type { ClearVersionContentsResponse, DocumentDownloadResponse, DocumentVersionAction, DocumentVersionActionResponse, DocumentVersionContentTypeFilter, DocumentVersionMetadataUpdate, DocumentVersionOrder, DocumentVersionResponse, DownloadArtifact, PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator, PaginatedResponseDocumentVersionResponse, SortDirection, VersionDiffResponse } from '../models/index';
14
+ export interface AttachCitedAssetRequest {
15
+ versionId: string;
16
+ file: Blob;
17
+ }
14
18
  export interface ClearDocumentVersionContentsRequest {
15
19
  versionId: string;
16
20
  }
@@ -66,6 +70,29 @@ export interface UpdateDocumentVersionMetadataRequest {
66
70
  * @interface DocumentVersionsApiInterface
67
71
  */
68
72
  export interface DocumentVersionsApiInterface {
73
+ /**
74
+ * Creates request options for attachCitedAsset without sending the request
75
+ * @param {string} versionId DocumentVersion ID
76
+ * @param {Blob} file
77
+ * @throws {RequiredError}
78
+ * @memberof DocumentVersionsApiInterface
79
+ */
80
+ attachCitedAssetRequestOpts(requestParameters: AttachCitedAssetRequest): Promise<runtime.RequestOpts>;
81
+ /**
82
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
83
+ * @summary Attach Cited Asset Handler
84
+ * @param {string} versionId DocumentVersion ID
85
+ * @param {Blob} file
86
+ * @param {*} [options] Override http request option.
87
+ * @throws {RequiredError}
88
+ * @memberof DocumentVersionsApiInterface
89
+ */
90
+ attachCitedAssetRaw(requestParameters: AttachCitedAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
91
+ /**
92
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
93
+ * Attach Cited Asset Handler
94
+ */
95
+ attachCitedAsset(requestParameters: AttachCitedAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
69
96
  /**
70
97
  * Creates request options for clearDocumentVersionContents without sending the request
71
98
  * @param {string} versionId DocumentVersion ID
@@ -316,6 +343,20 @@ export interface DocumentVersionsApiInterface {
316
343
  *
317
344
  */
318
345
  export declare class DocumentVersionsApi extends runtime.BaseAPI implements DocumentVersionsApiInterface {
346
+ /**
347
+ * Creates request options for attachCitedAsset without sending the request
348
+ */
349
+ attachCitedAssetRequestOpts(requestParameters: AttachCitedAssetRequest): Promise<runtime.RequestOpts>;
350
+ /**
351
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
352
+ * Attach Cited Asset Handler
353
+ */
354
+ attachCitedAssetRaw(requestParameters: AttachCitedAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
355
+ /**
356
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
357
+ * Attach Cited Asset Handler
358
+ */
359
+ attachCitedAsset(requestParameters: AttachCitedAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
319
360
  /**
320
361
  * Creates request options for clearDocumentVersionContents without sending the request
321
362
  */
@@ -26,6 +26,75 @@ import { ClearVersionContentsResponseFromJSON, DocumentDownloadResponseFromJSON,
26
26
  *
27
27
  */
28
28
  export class DocumentVersionsApi extends runtime.BaseAPI {
29
+ /**
30
+ * Creates request options for attachCitedAsset without sending the request
31
+ */
32
+ attachCitedAssetRequestOpts(requestParameters) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['versionId'] == null) {
35
+ throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling attachCitedAsset().');
36
+ }
37
+ if (requestParameters['file'] == null) {
38
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling attachCitedAsset().');
39
+ }
40
+ const queryParameters = {};
41
+ const headerParameters = {};
42
+ if (this.configuration && this.configuration.accessToken) {
43
+ const token = this.configuration.accessToken;
44
+ const tokenString = yield token("bearerAuth", []);
45
+ if (tokenString) {
46
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
47
+ }
48
+ }
49
+ const consumes = [
50
+ { contentType: 'multipart/form-data' },
51
+ ];
52
+ // @ts-ignore: canConsumeForm may be unused
53
+ const canConsumeForm = runtime.canConsumeForm(consumes);
54
+ let formParams;
55
+ let useForm = false;
56
+ // use FormData to transmit files using content-type "multipart/form-data"
57
+ useForm = canConsumeForm;
58
+ if (useForm) {
59
+ formParams = new FormData();
60
+ }
61
+ else {
62
+ formParams = new URLSearchParams();
63
+ }
64
+ if (requestParameters['file'] != null) {
65
+ formParams.append('file', requestParameters['file']);
66
+ }
67
+ let urlPath = `/v1/document_versions/{version_id}/cited-asset`;
68
+ urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
69
+ return {
70
+ path: urlPath,
71
+ method: 'POST',
72
+ headers: headerParameters,
73
+ query: queryParameters,
74
+ body: formParams,
75
+ };
76
+ });
77
+ }
78
+ /**
79
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
80
+ * Attach Cited Asset Handler
81
+ */
82
+ attachCitedAssetRaw(requestParameters, initOverrides) {
83
+ return __awaiter(this, void 0, void 0, function* () {
84
+ const requestOptions = yield this.attachCitedAssetRequestOpts(requestParameters);
85
+ const response = yield this.request(requestOptions, initOverrides);
86
+ return new runtime.VoidApiResponse(response);
87
+ });
88
+ }
89
+ /**
90
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
91
+ * Attach Cited Asset Handler
92
+ */
93
+ attachCitedAsset(requestParameters, initOverrides) {
94
+ return __awaiter(this, void 0, void 0, function* () {
95
+ yield this.attachCitedAssetRaw(requestParameters, initOverrides);
96
+ });
97
+ }
29
98
  /**
30
99
  * Creates request options for clearDocumentVersionContents without sending the request
31
100
  */
@@ -45,6 +45,12 @@ export interface DocumentVersionMetadata {
45
45
  * @memberof DocumentVersionMetadata
46
46
  */
47
47
  preconversionSourceS3?: string | null;
48
+ /**
49
+ * S3 URL to the agent's cited copy of the source (KS Citation comments intact); null unless the agent uploaded a file carrying citations. Read only for the agent edit round-trip so a follow-up chat re-extracts citation anchors instead of losing them; source_s3 stays the clean artifact served to chunking, the FE viewer, and downloads.
50
+ * @type {string}
51
+ * @memberof DocumentVersionMetadata
52
+ */
53
+ citedSourceS3?: string | null;
48
54
  /**
49
55
  * S3 URL to the fast plaintext export of the document
50
56
  * @type {string}
@@ -32,6 +32,7 @@ export function DocumentVersionMetadataFromJSONTyped(json, ignoreDiscriminator)
32
32
  'sourceS3': json['source_s3'] == null ? undefined : json['source_s3'],
33
33
  'cleanedSourceS3': json['cleaned_source_s3'] == null ? undefined : json['cleaned_source_s3'],
34
34
  'preconversionSourceS3': json['preconversion_source_s3'] == null ? undefined : json['preconversion_source_s3'],
35
+ 'citedSourceS3': json['cited_source_s3'] == null ? undefined : json['cited_source_s3'],
35
36
  'fastPlaintextS3': json['fast_plaintext_s3'] == null ? undefined : json['fast_plaintext_s3'],
36
37
  'hash': json['hash'] == null ? undefined : json['hash'],
37
38
  'pipelineState': json['pipeline_state'] == null ? undefined : PipelineStateFromJSON(json['pipeline_state']),
@@ -61,6 +62,7 @@ export function DocumentVersionMetadataToJSONTyped(value, ignoreDiscriminator =
61
62
  'source_s3': value['sourceS3'],
62
63
  'cleaned_source_s3': value['cleanedSourceS3'],
63
64
  'preconversion_source_s3': value['preconversionSourceS3'],
65
+ 'cited_source_s3': value['citedSourceS3'],
64
66
  'fast_plaintext_s3': value['fastPlaintextS3'],
65
67
  'hash': value['hash'],
66
68
  'pipeline_state': PipelineStateToJSON(value['pipelineState']),
@@ -39,6 +39,12 @@ export interface DocumentVersionMetadataUpdate {
39
39
  * @memberof DocumentVersionMetadataUpdate
40
40
  */
41
41
  preconversionSourceS3?: string | null;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof DocumentVersionMetadataUpdate
46
+ */
47
+ citedSourceS3?: string | null;
42
48
  /**
43
49
  *
44
50
  * @type {string}
@@ -32,6 +32,7 @@ export function DocumentVersionMetadataUpdateFromJSONTyped(json, ignoreDiscrimin
32
32
  'sourceS3': json['source_s3'] == null ? undefined : json['source_s3'],
33
33
  'cleanedSourceS3': json['cleaned_source_s3'] == null ? undefined : json['cleaned_source_s3'],
34
34
  'preconversionSourceS3': json['preconversion_source_s3'] == null ? undefined : json['preconversion_source_s3'],
35
+ 'citedSourceS3': json['cited_source_s3'] == null ? undefined : json['cited_source_s3'],
35
36
  'standardPipelineJsonS3': json['standard_pipeline_json_s3'] == null ? undefined : json['standard_pipeline_json_s3'],
36
37
  'fastPlaintextS3': json['fast_plaintext_s3'] == null ? undefined : json['fast_plaintext_s3'],
37
38
  'highAccuracyContentListS3': json['high_accuracy_content_list_s3'] == null ? undefined : json['high_accuracy_content_list_s3'],
@@ -64,6 +65,7 @@ export function DocumentVersionMetadataUpdateToJSONTyped(value, ignoreDiscrimina
64
65
  'source_s3': value['sourceS3'],
65
66
  'cleaned_source_s3': value['cleanedSourceS3'],
66
67
  'preconversion_source_s3': value['preconversionSourceS3'],
68
+ 'cited_source_s3': value['citedSourceS3'],
67
69
  'standard_pipeline_json_s3': value['standardPipelineJsonS3'],
68
70
  'fast_plaintext_s3': value['fastPlaintextS3'],
69
71
  'high_accuracy_content_list_s3': value['highAccuracyContentListS3'],
@@ -92,6 +92,12 @@ export interface DocumentVersionResponse {
92
92
  * @memberof DocumentVersionResponse
93
93
  */
94
94
  assetS3Url?: string | null;
95
+ /**
96
+ * Presigned URL (6-hour validity) to the agent's cited copy of the source, with KS Citation comments intact; null unless one was stored. For the agent edit round-trip only — human downloads and the FE viewer use asset_s3_url (clean) and render citations from citation_anchors.
97
+ * @type {string}
98
+ * @memberof DocumentVersionResponse
99
+ */
100
+ citedAssetS3Url?: string | null;
95
101
  /**
96
102
  * Presigned URL to download the fast plaintext export (6-hour validity)
97
103
  * @type {string}
@@ -62,6 +62,7 @@ export function DocumentVersionResponseFromJSONTyped(json, ignoreDiscriminator)
62
62
  'createdAt': (new Date(json['created_at'])),
63
63
  'updatedAt': (new Date(json['updated_at'])),
64
64
  'assetS3Url': json['asset_s3_url'] == null ? undefined : json['asset_s3_url'],
65
+ 'citedAssetS3Url': json['cited_asset_s3_url'] == null ? undefined : json['cited_asset_s3_url'],
65
66
  'fastPlaintextUrl': json['fast_plaintext_url'] == null ? undefined : json['fast_plaintext_url'],
66
67
  'pageScreenshotUrls': json['page_screenshot_urls'] == null ? undefined : json['page_screenshot_urls'],
67
68
  'systemMetadata': json['system_metadata'] == null ? undefined : DocumentVersionMetadataFromJSON(json['system_metadata']),
@@ -87,6 +88,7 @@ export function DocumentVersionResponseToJSONTyped(value, ignoreDiscriminator =
87
88
  'created_at': value['createdAt'].toISOString(),
88
89
  'updated_at': value['updatedAt'].toISOString(),
89
90
  'asset_s3_url': value['assetS3Url'],
91
+ 'cited_asset_s3_url': value['citedAssetS3Url'],
90
92
  'fast_plaintext_url': value['fastPlaintextUrl'],
91
93
  'page_screenshot_urls': value['pageScreenshotUrls'],
92
94
  'system_metadata': DocumentVersionMetadataToJSON(value['systemMetadata']),
@@ -45,6 +45,12 @@ export interface DocumentVersionMetadata {
45
45
  * @memberof DocumentVersionMetadata
46
46
  */
47
47
  preconversionSourceS3?: string | null;
48
+ /**
49
+ * S3 URL to the agent's cited copy of the source (KS Citation comments intact); null unless the agent uploaded a file carrying citations. Read only for the agent edit round-trip so a follow-up chat re-extracts citation anchors instead of losing them; source_s3 stays the clean artifact served to chunking, the FE viewer, and downloads.
50
+ * @type {string}
51
+ * @memberof DocumentVersionMetadata
52
+ */
53
+ citedSourceS3?: string | null;
48
54
  /**
49
55
  * S3 URL to the fast plaintext export of the document
50
56
  * @type {string}
@@ -40,6 +40,7 @@ function DocumentVersionMetadataFromJSONTyped(json, ignoreDiscriminator) {
40
40
  'sourceS3': json['source_s3'] == null ? undefined : json['source_s3'],
41
41
  'cleanedSourceS3': json['cleaned_source_s3'] == null ? undefined : json['cleaned_source_s3'],
42
42
  'preconversionSourceS3': json['preconversion_source_s3'] == null ? undefined : json['preconversion_source_s3'],
43
+ 'citedSourceS3': json['cited_source_s3'] == null ? undefined : json['cited_source_s3'],
43
44
  'fastPlaintextS3': json['fast_plaintext_s3'] == null ? undefined : json['fast_plaintext_s3'],
44
45
  'hash': json['hash'] == null ? undefined : json['hash'],
45
46
  'pipelineState': json['pipeline_state'] == null ? undefined : (0, PipelineState_1.PipelineStateFromJSON)(json['pipeline_state']),
@@ -69,6 +70,7 @@ function DocumentVersionMetadataToJSONTyped(value, ignoreDiscriminator = false)
69
70
  'source_s3': value['sourceS3'],
70
71
  'cleaned_source_s3': value['cleanedSourceS3'],
71
72
  'preconversion_source_s3': value['preconversionSourceS3'],
73
+ 'cited_source_s3': value['citedSourceS3'],
72
74
  'fast_plaintext_s3': value['fastPlaintextS3'],
73
75
  'hash': value['hash'],
74
76
  'pipeline_state': (0, PipelineState_1.PipelineStateToJSON)(value['pipelineState']),
@@ -39,6 +39,12 @@ export interface DocumentVersionMetadataUpdate {
39
39
  * @memberof DocumentVersionMetadataUpdate
40
40
  */
41
41
  preconversionSourceS3?: string | null;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof DocumentVersionMetadataUpdate
46
+ */
47
+ citedSourceS3?: string | null;
42
48
  /**
43
49
  *
44
50
  * @type {string}
@@ -40,6 +40,7 @@ function DocumentVersionMetadataUpdateFromJSONTyped(json, ignoreDiscriminator) {
40
40
  'sourceS3': json['source_s3'] == null ? undefined : json['source_s3'],
41
41
  'cleanedSourceS3': json['cleaned_source_s3'] == null ? undefined : json['cleaned_source_s3'],
42
42
  'preconversionSourceS3': json['preconversion_source_s3'] == null ? undefined : json['preconversion_source_s3'],
43
+ 'citedSourceS3': json['cited_source_s3'] == null ? undefined : json['cited_source_s3'],
43
44
  'standardPipelineJsonS3': json['standard_pipeline_json_s3'] == null ? undefined : json['standard_pipeline_json_s3'],
44
45
  'fastPlaintextS3': json['fast_plaintext_s3'] == null ? undefined : json['fast_plaintext_s3'],
45
46
  'highAccuracyContentListS3': json['high_accuracy_content_list_s3'] == null ? undefined : json['high_accuracy_content_list_s3'],
@@ -72,6 +73,7 @@ function DocumentVersionMetadataUpdateToJSONTyped(value, ignoreDiscriminator = f
72
73
  'source_s3': value['sourceS3'],
73
74
  'cleaned_source_s3': value['cleanedSourceS3'],
74
75
  'preconversion_source_s3': value['preconversionSourceS3'],
76
+ 'cited_source_s3': value['citedSourceS3'],
75
77
  'standard_pipeline_json_s3': value['standardPipelineJsonS3'],
76
78
  'fast_plaintext_s3': value['fastPlaintextS3'],
77
79
  'high_accuracy_content_list_s3': value['highAccuracyContentListS3'],
@@ -92,6 +92,12 @@ export interface DocumentVersionResponse {
92
92
  * @memberof DocumentVersionResponse
93
93
  */
94
94
  assetS3Url?: string | null;
95
+ /**
96
+ * Presigned URL (6-hour validity) to the agent's cited copy of the source, with KS Citation comments intact; null unless one was stored. For the agent edit round-trip only — human downloads and the FE viewer use asset_s3_url (clean) and render citations from citation_anchors.
97
+ * @type {string}
98
+ * @memberof DocumentVersionResponse
99
+ */
100
+ citedAssetS3Url?: string | null;
95
101
  /**
96
102
  * Presigned URL to download the fast plaintext export (6-hour validity)
97
103
  * @type {string}
@@ -70,6 +70,7 @@ function DocumentVersionResponseFromJSONTyped(json, ignoreDiscriminator) {
70
70
  'createdAt': (new Date(json['created_at'])),
71
71
  'updatedAt': (new Date(json['updated_at'])),
72
72
  'assetS3Url': json['asset_s3_url'] == null ? undefined : json['asset_s3_url'],
73
+ 'citedAssetS3Url': json['cited_asset_s3_url'] == null ? undefined : json['cited_asset_s3_url'],
73
74
  'fastPlaintextUrl': json['fast_plaintext_url'] == null ? undefined : json['fast_plaintext_url'],
74
75
  'pageScreenshotUrls': json['page_screenshot_urls'] == null ? undefined : json['page_screenshot_urls'],
75
76
  'systemMetadata': json['system_metadata'] == null ? undefined : (0, DocumentVersionMetadata_1.DocumentVersionMetadataFromJSON)(json['system_metadata']),
@@ -95,6 +96,7 @@ function DocumentVersionResponseToJSONTyped(value, ignoreDiscriminator = false)
95
96
  'created_at': value['createdAt'].toISOString(),
96
97
  'updated_at': value['updatedAt'].toISOString(),
97
98
  'asset_s3_url': value['assetS3Url'],
99
+ 'cited_asset_s3_url': value['citedAssetS3Url'],
98
100
  'fast_plaintext_url': value['fastPlaintextUrl'],
99
101
  'page_screenshot_urls': value['pageScreenshotUrls'],
100
102
  'system_metadata': (0, DocumentVersionMetadata_1.DocumentVersionMetadataToJSON)(value['systemMetadata']),
@@ -10,6 +10,7 @@ Name | Type
10
10
  `sourceS3` | string
11
11
  `cleanedSourceS3` | string
12
12
  `preconversionSourceS3` | string
13
+ `citedSourceS3` | string
13
14
  `fastPlaintextS3` | string
14
15
  `hash` | string
15
16
  `pipelineState` | [PipelineState](PipelineState.md)
@@ -37,6 +38,7 @@ const example = {
37
38
  "sourceS3": null,
38
39
  "cleanedSourceS3": null,
39
40
  "preconversionSourceS3": null,
41
+ "citedSourceS3": null,
40
42
  "fastPlaintextS3": null,
41
43
  "hash": null,
42
44
  "pipelineState": null,
@@ -10,6 +10,7 @@ Name | Type
10
10
  `sourceS3` | string
11
11
  `cleanedSourceS3` | string
12
12
  `preconversionSourceS3` | string
13
+ `citedSourceS3` | string
13
14
  `standardPipelineJsonS3` | string
14
15
  `fastPlaintextS3` | string
15
16
  `highAccuracyContentListS3` | string
@@ -40,6 +41,7 @@ const example = {
40
41
  "sourceS3": null,
41
42
  "cleanedSourceS3": null,
42
43
  "preconversionSourceS3": null,
44
+ "citedSourceS3": null,
43
45
  "standardPipelineJsonS3": null,
44
46
  "fastPlaintextS3": null,
45
47
  "highAccuracyContentListS3": null,
@@ -19,6 +19,7 @@ Name | Type
19
19
  `createdAt` | Date
20
20
  `updatedAt` | Date
21
21
  `assetS3Url` | string
22
+ `citedAssetS3Url` | string
22
23
  `fastPlaintextUrl` | string
23
24
  `pageScreenshotUrls` | Array&lt;string&gt;
24
25
  `systemMetadata` | [DocumentVersionMetadata](DocumentVersionMetadata.md)
@@ -42,6 +43,7 @@ const example = {
42
43
  "createdAt": null,
43
44
  "updatedAt": null,
44
45
  "assetS3Url": null,
46
+ "citedAssetS3Url": null,
45
47
  "fastPlaintextUrl": null,
46
48
  "pageScreenshotUrls": null,
47
49
  "systemMetadata": null,
@@ -4,6 +4,7 @@ All URIs are relative to *http://localhost:8000*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
+ | [**attachCitedAsset**](DocumentVersionsApi.md#attachcitedasset) | **POST** /v1/document_versions/{version_id}/cited-asset | Attach Cited Asset Handler |
7
8
  | [**clearDocumentVersionContents**](DocumentVersionsApi.md#cleardocumentversioncontents) | **DELETE** /v1/document_versions/{version_id}/contents | Clear Document Version Contents Handler |
8
9
  | [**createDocumentVersion**](DocumentVersionsApi.md#createdocumentversion) | **POST** /v1/documents/{document_id}/versions | Create Document Version Handler |
9
10
  | [**deleteDocumentVersion**](DocumentVersionsApi.md#deletedocumentversion) | **DELETE** /v1/document_versions/{version_id} | Delete Document Version Handler |
@@ -17,6 +18,84 @@ All URIs are relative to *http://localhost:8000*
17
18
 
18
19
 
19
20
 
21
+ ## attachCitedAsset
22
+
23
+ > attachCitedAsset(versionId, file)
24
+
25
+ Attach Cited Asset Handler
26
+
27
+ Store the agent\&#39;s cited copy of a version\&#39;s source as its cited_source_s3 sibling. The clean &#x60;&#x60;source_s3&#x60;&#x60; is untouched — chunking, the FE viewer, and downloads keep using it and render citations from &#x60;&#x60;citation_anchors&#x60;&#x60;. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (&#x60;&#x60;ks_download_to_sandbox&#x60;&#x60;) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
28
+
29
+ ### Example
30
+
31
+ ```ts
32
+ import {
33
+ Configuration,
34
+ DocumentVersionsApi,
35
+ } from '@knowledge-stack/ksapi';
36
+ import type { AttachCitedAssetRequest } from '@knowledge-stack/ksapi';
37
+
38
+ async function example() {
39
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
40
+ const config = new Configuration({
41
+ // To configure API key authorization: cookieAuth
42
+ apiKey: "YOUR API KEY",
43
+ // Configure HTTP bearer authorization: bearerAuth
44
+ accessToken: "YOUR BEARER TOKEN",
45
+ });
46
+ const api = new DocumentVersionsApi(config);
47
+
48
+ const body = {
49
+ // string | DocumentVersion ID
50
+ versionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
51
+ // Blob
52
+ file: BINARY_DATA_HERE,
53
+ } satisfies AttachCitedAssetRequest;
54
+
55
+ try {
56
+ const data = await api.attachCitedAsset(body);
57
+ console.log(data);
58
+ } catch (error) {
59
+ console.error(error);
60
+ }
61
+ }
62
+
63
+ // Run the test
64
+ example().catch(console.error);
65
+ ```
66
+
67
+ ### Parameters
68
+
69
+
70
+ | Name | Type | Description | Notes |
71
+ |------------- | ------------- | ------------- | -------------|
72
+ | **versionId** | `string` | DocumentVersion ID | [Defaults to `undefined`] |
73
+ | **file** | `Blob` | | [Defaults to `undefined`] |
74
+
75
+ ### Return type
76
+
77
+ `void` (Empty response body)
78
+
79
+ ### Authorization
80
+
81
+ [cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
82
+
83
+ ### HTTP request headers
84
+
85
+ - **Content-Type**: `multipart/form-data`
86
+ - **Accept**: `application/json`
87
+
88
+
89
+ ### HTTP response details
90
+ | Status code | Description | Response headers |
91
+ |-------------|-------------|------------------|
92
+ | **204** | Successful Response | - |
93
+ | **422** | Validation Error | - |
94
+ | **0** | Error response. | - |
95
+
96
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
97
+
98
+
20
99
  ## clearDocumentVersionContents
21
100
 
22
101
  > ClearVersionContentsResponse clearDocumentVersionContents(versionId)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "1.142.1",
3
+ "version": "1.142.2",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -64,6 +64,11 @@ import {
64
64
  VersionDiffResponseToJSON,
65
65
  } from '../models/index';
66
66
 
67
+ export interface AttachCitedAssetRequest {
68
+ versionId: string;
69
+ file: Blob;
70
+ }
71
+
67
72
  export interface ClearDocumentVersionContentsRequest {
68
73
  versionId: string;
69
74
  }
@@ -129,6 +134,32 @@ export interface UpdateDocumentVersionMetadataRequest {
129
134
  * @interface DocumentVersionsApiInterface
130
135
  */
131
136
  export interface DocumentVersionsApiInterface {
137
+ /**
138
+ * Creates request options for attachCitedAsset without sending the request
139
+ * @param {string} versionId DocumentVersion ID
140
+ * @param {Blob} file
141
+ * @throws {RequiredError}
142
+ * @memberof DocumentVersionsApiInterface
143
+ */
144
+ attachCitedAssetRequestOpts(requestParameters: AttachCitedAssetRequest): Promise<runtime.RequestOpts>;
145
+
146
+ /**
147
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
148
+ * @summary Attach Cited Asset Handler
149
+ * @param {string} versionId DocumentVersion ID
150
+ * @param {Blob} file
151
+ * @param {*} [options] Override http request option.
152
+ * @throws {RequiredError}
153
+ * @memberof DocumentVersionsApiInterface
154
+ */
155
+ attachCitedAssetRaw(requestParameters: AttachCitedAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
156
+
157
+ /**
158
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
159
+ * Attach Cited Asset Handler
160
+ */
161
+ attachCitedAsset(requestParameters: AttachCitedAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
162
+
132
163
  /**
133
164
  * Creates request options for clearDocumentVersionContents without sending the request
134
165
  * @param {string} versionId DocumentVersion ID
@@ -411,6 +442,88 @@ export interface DocumentVersionsApiInterface {
411
442
  */
412
443
  export class DocumentVersionsApi extends runtime.BaseAPI implements DocumentVersionsApiInterface {
413
444
 
445
+ /**
446
+ * Creates request options for attachCitedAsset without sending the request
447
+ */
448
+ async attachCitedAssetRequestOpts(requestParameters: AttachCitedAssetRequest): Promise<runtime.RequestOpts> {
449
+ if (requestParameters['versionId'] == null) {
450
+ throw new runtime.RequiredError(
451
+ 'versionId',
452
+ 'Required parameter "versionId" was null or undefined when calling attachCitedAsset().'
453
+ );
454
+ }
455
+
456
+ if (requestParameters['file'] == null) {
457
+ throw new runtime.RequiredError(
458
+ 'file',
459
+ 'Required parameter "file" was null or undefined when calling attachCitedAsset().'
460
+ );
461
+ }
462
+
463
+ const queryParameters: any = {};
464
+
465
+ const headerParameters: runtime.HTTPHeaders = {};
466
+
467
+ if (this.configuration && this.configuration.accessToken) {
468
+ const token = this.configuration.accessToken;
469
+ const tokenString = await token("bearerAuth", []);
470
+
471
+ if (tokenString) {
472
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
473
+ }
474
+ }
475
+ const consumes: runtime.Consume[] = [
476
+ { contentType: 'multipart/form-data' },
477
+ ];
478
+ // @ts-ignore: canConsumeForm may be unused
479
+ const canConsumeForm = runtime.canConsumeForm(consumes);
480
+
481
+ let formParams: { append(param: string, value: any): any };
482
+ let useForm = false;
483
+ // use FormData to transmit files using content-type "multipart/form-data"
484
+ useForm = canConsumeForm;
485
+ if (useForm) {
486
+ formParams = new FormData();
487
+ } else {
488
+ formParams = new URLSearchParams();
489
+ }
490
+
491
+ if (requestParameters['file'] != null) {
492
+ formParams.append('file', requestParameters['file'] as any);
493
+ }
494
+
495
+
496
+ let urlPath = `/v1/document_versions/{version_id}/cited-asset`;
497
+ urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
498
+
499
+ return {
500
+ path: urlPath,
501
+ method: 'POST',
502
+ headers: headerParameters,
503
+ query: queryParameters,
504
+ body: formParams,
505
+ };
506
+ }
507
+
508
+ /**
509
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
510
+ * Attach Cited Asset Handler
511
+ */
512
+ async attachCitedAssetRaw(requestParameters: AttachCitedAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
513
+ const requestOptions = await this.attachCitedAssetRequestOpts(requestParameters);
514
+ const response = await this.request(requestOptions, initOverrides);
515
+
516
+ return new runtime.VoidApiResponse(response);
517
+ }
518
+
519
+ /**
520
+ * Store the agent\'s cited copy of a version\'s source as its cited_source_s3 sibling. The clean ``source_s3`` is untouched — chunking, the FE viewer, and downloads keep using it and render citations from ``citation_anchors``. The cited copy (KS Citation comments intact) is read only by the agent edit round-trip (``ks_download_to_sandbox``) so a follow-up chat re-extracts anchors instead of losing them. Requires write access to the version.
521
+ * Attach Cited Asset Handler
522
+ */
523
+ async attachCitedAsset(requestParameters: AttachCitedAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
524
+ await this.attachCitedAssetRaw(requestParameters, initOverrides);
525
+ }
526
+
414
527
  /**
415
528
  * Creates request options for clearDocumentVersionContents without sending the request
416
529
  */
@@ -68,6 +68,12 @@ export interface DocumentVersionMetadata {
68
68
  * @memberof DocumentVersionMetadata
69
69
  */
70
70
  preconversionSourceS3?: string | null;
71
+ /**
72
+ * S3 URL to the agent's cited copy of the source (KS Citation comments intact); null unless the agent uploaded a file carrying citations. Read only for the agent edit round-trip so a follow-up chat re-extracts citation anchors instead of losing them; source_s3 stays the clean artifact served to chunking, the FE viewer, and downloads.
73
+ * @type {string}
74
+ * @memberof DocumentVersionMetadata
75
+ */
76
+ citedSourceS3?: string | null;
71
77
  /**
72
78
  * S3 URL to the fast plaintext export of the document
73
79
  * @type {string}
@@ -203,6 +209,7 @@ export function DocumentVersionMetadataFromJSONTyped(json: any, ignoreDiscrimina
203
209
  'sourceS3': json['source_s3'] == null ? undefined : json['source_s3'],
204
210
  'cleanedSourceS3': json['cleaned_source_s3'] == null ? undefined : json['cleaned_source_s3'],
205
211
  'preconversionSourceS3': json['preconversion_source_s3'] == null ? undefined : json['preconversion_source_s3'],
212
+ 'citedSourceS3': json['cited_source_s3'] == null ? undefined : json['cited_source_s3'],
206
213
  'fastPlaintextS3': json['fast_plaintext_s3'] == null ? undefined : json['fast_plaintext_s3'],
207
214
  'hash': json['hash'] == null ? undefined : json['hash'],
208
215
  'pipelineState': json['pipeline_state'] == null ? undefined : PipelineStateFromJSON(json['pipeline_state']),
@@ -236,6 +243,7 @@ export function DocumentVersionMetadataToJSONTyped(value?: DocumentVersionMetada
236
243
  'source_s3': value['sourceS3'],
237
244
  'cleaned_source_s3': value['cleanedSourceS3'],
238
245
  'preconversion_source_s3': value['preconversionSourceS3'],
246
+ 'cited_source_s3': value['citedSourceS3'],
239
247
  'fast_plaintext_s3': value['fastPlaintextS3'],
240
248
  'hash': value['hash'],
241
249
  'pipeline_state': PipelineStateToJSON(value['pipelineState']),
@@ -62,6 +62,12 @@ export interface DocumentVersionMetadataUpdate {
62
62
  * @memberof DocumentVersionMetadataUpdate
63
63
  */
64
64
  preconversionSourceS3?: string | null;
65
+ /**
66
+ *
67
+ * @type {string}
68
+ * @memberof DocumentVersionMetadataUpdate
69
+ */
70
+ citedSourceS3?: string | null;
65
71
  /**
66
72
  *
67
73
  * @type {string}
@@ -215,6 +221,7 @@ export function DocumentVersionMetadataUpdateFromJSONTyped(json: any, ignoreDisc
215
221
  'sourceS3': json['source_s3'] == null ? undefined : json['source_s3'],
216
222
  'cleanedSourceS3': json['cleaned_source_s3'] == null ? undefined : json['cleaned_source_s3'],
217
223
  'preconversionSourceS3': json['preconversion_source_s3'] == null ? undefined : json['preconversion_source_s3'],
224
+ 'citedSourceS3': json['cited_source_s3'] == null ? undefined : json['cited_source_s3'],
218
225
  'standardPipelineJsonS3': json['standard_pipeline_json_s3'] == null ? undefined : json['standard_pipeline_json_s3'],
219
226
  'fastPlaintextS3': json['fast_plaintext_s3'] == null ? undefined : json['fast_plaintext_s3'],
220
227
  'highAccuracyContentListS3': json['high_accuracy_content_list_s3'] == null ? undefined : json['high_accuracy_content_list_s3'],
@@ -251,6 +258,7 @@ export function DocumentVersionMetadataUpdateToJSONTyped(value?: DocumentVersion
251
258
  'source_s3': value['sourceS3'],
252
259
  'cleaned_source_s3': value['cleanedSourceS3'],
253
260
  'preconversion_source_s3': value['preconversionSourceS3'],
261
+ 'cited_source_s3': value['citedSourceS3'],
254
262
  'standard_pipeline_json_s3': value['standardPipelineJsonS3'],
255
263
  'fast_plaintext_s3': value['fastPlaintextS3'],
256
264
  'high_accuracy_content_list_s3': value['highAccuracyContentListS3'],
@@ -109,6 +109,12 @@ export interface DocumentVersionResponse {
109
109
  * @memberof DocumentVersionResponse
110
110
  */
111
111
  assetS3Url?: string | null;
112
+ /**
113
+ * Presigned URL (6-hour validity) to the agent's cited copy of the source, with KS Citation comments intact; null unless one was stored. For the agent edit round-trip only — human downloads and the FE viewer use asset_s3_url (clean) and render citations from citation_anchors.
114
+ * @type {string}
115
+ * @memberof DocumentVersionResponse
116
+ */
117
+ citedAssetS3Url?: string | null;
112
118
  /**
113
119
  * Presigned URL to download the fast plaintext export (6-hour validity)
114
120
  * @type {string}
@@ -186,6 +192,7 @@ export function DocumentVersionResponseFromJSONTyped(json: any, ignoreDiscrimina
186
192
  'createdAt': (new Date(json['created_at'])),
187
193
  'updatedAt': (new Date(json['updated_at'])),
188
194
  'assetS3Url': json['asset_s3_url'] == null ? undefined : json['asset_s3_url'],
195
+ 'citedAssetS3Url': json['cited_asset_s3_url'] == null ? undefined : json['cited_asset_s3_url'],
189
196
  'fastPlaintextUrl': json['fast_plaintext_url'] == null ? undefined : json['fast_plaintext_url'],
190
197
  'pageScreenshotUrls': json['page_screenshot_urls'] == null ? undefined : json['page_screenshot_urls'],
191
198
  'systemMetadata': json['system_metadata'] == null ? undefined : DocumentVersionMetadataFromJSON(json['system_metadata']),
@@ -215,6 +222,7 @@ export function DocumentVersionResponseToJSONTyped(value?: DocumentVersionRespon
215
222
  'created_at': value['createdAt'].toISOString(),
216
223
  'updated_at': value['updatedAt'].toISOString(),
217
224
  'asset_s3_url': value['assetS3Url'],
225
+ 'cited_asset_s3_url': value['citedAssetS3Url'],
218
226
  'fast_plaintext_url': value['fastPlaintextUrl'],
219
227
  'page_screenshot_urls': value['pageScreenshotUrls'],
220
228
  'system_metadata': DocumentVersionMetadataToJSON(value['systemMetadata']),