@knowledge-stack/ksapi 1.152.0 → 1.154.1

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 (83) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +12 -2
  3. package/dist/apis/DocumentsApi.d.ts +203 -7
  4. package/dist/apis/DocumentsApi.js +262 -6
  5. package/dist/esm/apis/DocumentsApi.d.ts +203 -7
  6. package/dist/esm/apis/DocumentsApi.js +263 -7
  7. package/dist/esm/models/ChunkMetadata.d.ts +12 -0
  8. package/dist/esm/models/ChunkMetadata.js +4 -0
  9. package/dist/esm/models/Citation.d.ts +12 -0
  10. package/dist/esm/models/Citation.js +4 -0
  11. package/dist/esm/models/CompleteUploadRequest.d.ts +47 -0
  12. package/dist/esm/models/CompleteUploadRequest.js +44 -0
  13. package/dist/esm/models/CreateUploadRequest.d.ts +65 -0
  14. package/dist/esm/models/CreateUploadRequest.js +56 -0
  15. package/dist/esm/models/CreateUploadResponse.d.ts +65 -0
  16. package/dist/esm/models/CreateUploadResponse.js +56 -0
  17. package/dist/esm/models/DocumentType.d.ts +2 -0
  18. package/dist/esm/models/DocumentType.js +2 -0
  19. package/dist/esm/models/EnrichedCitation.d.ts +12 -0
  20. package/dist/esm/models/EnrichedCitation.js +4 -0
  21. package/dist/esm/models/IngestionMode.d.ts +1 -0
  22. package/dist/esm/models/IngestionMode.js +2 -1
  23. package/dist/esm/models/SubscriptionPlanResponse.d.ts +6 -0
  24. package/dist/esm/models/SubscriptionPlanResponse.js +4 -0
  25. package/dist/esm/models/UploadPartResponse.d.ts +59 -0
  26. package/dist/esm/models/UploadPartResponse.js +52 -0
  27. package/dist/esm/models/UploadStatusResponse.d.ts +54 -0
  28. package/dist/esm/models/UploadStatusResponse.js +49 -0
  29. package/dist/esm/models/UsageMetric.d.ts +1 -0
  30. package/dist/esm/models/UsageMetric.js +2 -1
  31. package/dist/esm/models/index.d.ts +5 -0
  32. package/dist/esm/models/index.js +5 -0
  33. package/dist/models/ChunkMetadata.d.ts +12 -0
  34. package/dist/models/ChunkMetadata.js +4 -0
  35. package/dist/models/Citation.d.ts +12 -0
  36. package/dist/models/Citation.js +4 -0
  37. package/dist/models/CompleteUploadRequest.d.ts +47 -0
  38. package/dist/models/CompleteUploadRequest.js +52 -0
  39. package/dist/models/CreateUploadRequest.d.ts +65 -0
  40. package/dist/models/CreateUploadRequest.js +64 -0
  41. package/dist/models/CreateUploadResponse.d.ts +65 -0
  42. package/dist/models/CreateUploadResponse.js +64 -0
  43. package/dist/models/DocumentType.d.ts +2 -0
  44. package/dist/models/DocumentType.js +2 -0
  45. package/dist/models/EnrichedCitation.d.ts +12 -0
  46. package/dist/models/EnrichedCitation.js +4 -0
  47. package/dist/models/IngestionMode.d.ts +1 -0
  48. package/dist/models/IngestionMode.js +2 -1
  49. package/dist/models/SubscriptionPlanResponse.d.ts +6 -0
  50. package/dist/models/SubscriptionPlanResponse.js +4 -0
  51. package/dist/models/UploadPartResponse.d.ts +59 -0
  52. package/dist/models/UploadPartResponse.js +60 -0
  53. package/dist/models/UploadStatusResponse.d.ts +54 -0
  54. package/dist/models/UploadStatusResponse.js +57 -0
  55. package/dist/models/UsageMetric.d.ts +1 -0
  56. package/dist/models/UsageMetric.js +2 -1
  57. package/dist/models/index.d.ts +5 -0
  58. package/dist/models/index.js +5 -0
  59. package/docs/ChunkMetadata.md +4 -0
  60. package/docs/Citation.md +4 -0
  61. package/docs/CompleteUploadRequest.md +35 -0
  62. package/docs/CreateUploadRequest.md +41 -0
  63. package/docs/CreateUploadResponse.md +41 -0
  64. package/docs/DocumentsApi.md +397 -11
  65. package/docs/EnrichedCitation.md +4 -0
  66. package/docs/SubscriptionPlanResponse.md +2 -0
  67. package/docs/UploadPartResponse.md +39 -0
  68. package/docs/UploadStatusResponse.md +37 -0
  69. package/package.json +1 -1
  70. package/src/apis/DocumentsApi.ts +480 -14
  71. package/src/models/ChunkMetadata.ts +16 -0
  72. package/src/models/Citation.ts +16 -0
  73. package/src/models/CompleteUploadRequest.ts +83 -0
  74. package/src/models/CreateUploadRequest.ts +110 -0
  75. package/src/models/CreateUploadResponse.ts +110 -0
  76. package/src/models/DocumentType.ts +2 -0
  77. package/src/models/EnrichedCitation.ts +16 -0
  78. package/src/models/IngestionMode.ts +2 -1
  79. package/src/models/SubscriptionPlanResponse.ts +9 -0
  80. package/src/models/UploadPartResponse.ts +101 -0
  81. package/src/models/UploadStatusResponse.ts +100 -0
  82. package/src/models/UsageMetric.ts +2 -1
  83. package/src/models/index.ts +5 -0
@@ -61,6 +61,7 @@ docs/CloneWorkflowRunRequest.md
61
61
  docs/ColumnConfig.md
62
62
  docs/ColumnReference.md
63
63
  docs/CommonFileExclusionReason.md
64
+ docs/CompleteUploadRequest.md
64
65
  docs/ConnectionConfig.md
65
66
  docs/ContentsSortOrder.md
66
67
  docs/CreateApiConnectionRequest.md
@@ -81,6 +82,8 @@ docs/CreateSkillRequest.md
81
82
  docs/CreateTagRequest.md
82
83
  docs/CreateThreadMessageRequest.md
83
84
  docs/CreateThreadRequest.md
85
+ docs/CreateUploadRequest.md
86
+ docs/CreateUploadResponse.md
84
87
  docs/CreateWorkflowDefinitionRequest.md
85
88
  docs/DataSourceCatalogResponse.md
86
89
  docs/DataSourceDescribeResponse.md
@@ -365,6 +368,8 @@ docs/UpdateWorkflowDefinitionRequest.md
365
368
  docs/UpdateWorkflowRunRequest.md
366
369
  docs/UploadConstraints.md
367
370
  docs/UploadFormat.md
371
+ docs/UploadPartResponse.md
372
+ docs/UploadStatusResponse.md
368
373
  docs/UsageMetric.md
369
374
  docs/UserInfo.md
370
375
  docs/UserMessageRequest.md
@@ -494,6 +499,7 @@ src/models/CloneWorkflowRunRequest.ts
494
499
  src/models/ColumnConfig.ts
495
500
  src/models/ColumnReference.ts
496
501
  src/models/CommonFileExclusionReason.ts
502
+ src/models/CompleteUploadRequest.ts
497
503
  src/models/ConnectionConfig.ts
498
504
  src/models/ContentsSortOrder.ts
499
505
  src/models/CreateApiConnectionRequest.ts
@@ -514,6 +520,8 @@ src/models/CreateSkillRequest.ts
514
520
  src/models/CreateTagRequest.ts
515
521
  src/models/CreateThreadMessageRequest.ts
516
522
  src/models/CreateThreadRequest.ts
523
+ src/models/CreateUploadRequest.ts
524
+ src/models/CreateUploadResponse.ts
517
525
  src/models/CreateWorkflowDefinitionRequest.ts
518
526
  src/models/DataSourceCatalogResponse.ts
519
527
  src/models/DataSourceDescribeResponse.ts
@@ -775,6 +783,8 @@ src/models/UpdateWorkflowDefinitionRequest.ts
775
783
  src/models/UpdateWorkflowRunRequest.ts
776
784
  src/models/UploadConstraints.ts
777
785
  src/models/UploadFormat.ts
786
+ src/models/UploadPartResponse.ts
787
+ src/models/UploadStatusResponse.ts
778
788
  src/models/UsageMetric.ts
779
789
  src/models/UserInfo.ts
780
790
  src/models/UserMessageRequest.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @knowledge-stack/ksapi@1.152.0
1
+ # @knowledge-stack/ksapi@1.154.1
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -136,15 +136,20 @@ All URIs are relative to *http://localhost:8000*
136
136
  *DocumentVersionsApi* | [**getDocumentVersionDiff**](docs/DocumentVersionsApi.md#getdocumentversiondiff) | **GET** /v1/document_versions/{version_id}/diff | Get Document Version Diff Handler
137
137
  *DocumentVersionsApi* | [**listDocumentVersions**](docs/DocumentVersionsApi.md#listdocumentversions) | **GET** /v1/document_versions | List Document Versions Handler
138
138
  *DocumentVersionsApi* | [**updateDocumentVersionMetadata**](docs/DocumentVersionsApi.md#updatedocumentversionmetadata) | **PATCH** /v1/document_versions/{version_id}/metadata | Update Document Version Metadata Handler
139
+ *DocumentsApi* | [**abortDocumentUpload**](docs/DocumentsApi.md#abortdocumentupload) | **DELETE** /v1/documents/uploads | Abort Document Upload Handler
140
+ *DocumentsApi* | [**completeDocumentUpload**](docs/DocumentsApi.md#completedocumentupload) | **POST** /v1/documents/uploads/complete | Complete Document Upload Handler
139
141
  *DocumentsApi* | [**createDocument**](docs/DocumentsApi.md#createdocumentoperation) | **POST** /v1/documents | Create Document Handler
142
+ *DocumentsApi* | [**createDocumentUpload**](docs/DocumentsApi.md#createdocumentupload) | **POST** /v1/documents/uploads | Create Document Upload Handler
140
143
  *DocumentsApi* | [**deleteDocument**](docs/DocumentsApi.md#deletedocument) | **DELETE** /v1/documents/{document_id} | Delete Document Handler
141
144
  *DocumentsApi* | [**downloadDocument**](docs/DocumentsApi.md#downloaddocument) | **POST** /v1/documents/{document_id}/download | Download Document Handler
142
145
  *DocumentsApi* | [**getDocument**](docs/DocumentsApi.md#getdocument) | **GET** /v1/documents/{document_id} | Get Document Handler
146
+ *DocumentsApi* | [**getDocumentUploadStatus**](docs/DocumentsApi.md#getdocumentuploadstatus) | **GET** /v1/documents/uploads/parts | Get Document Upload Status Handler
143
147
  *DocumentsApi* | [**ingestDocument**](docs/DocumentsApi.md#ingestdocument) | **POST** /v1/documents/ingest | Ingest Document Handler
144
148
  *DocumentsApi* | [**ingestDocumentVersion**](docs/DocumentsApi.md#ingestdocumentversion) | **POST** /v1/documents/{document_id}/ingest | Ingest Document Version Handler
145
149
  *DocumentsApi* | [**ingestZip**](docs/DocumentsApi.md#ingestzip) | **POST** /v1/documents/ingest-zip | Ingest Zip Handler
146
150
  *DocumentsApi* | [**listDocuments**](docs/DocumentsApi.md#listdocuments) | **GET** /v1/documents | List Documents Handler
147
151
  *DocumentsApi* | [**updateDocument**](docs/DocumentsApi.md#updatedocumentoperation) | **PATCH** /v1/documents/{document_id} | Update Document Handler
152
+ *DocumentsApi* | [**uploadDocumentPart**](docs/DocumentsApi.md#uploaddocumentpart) | **PUT** /v1/documents/uploads/parts/{part_number} | Upload Document Part Handler
148
153
  *FeaturesApi* | [**getFeatures**](docs/FeaturesApi.md#getfeatures) | **GET** /v1/features | Get Features Handler
149
154
  *FeedbackApi* | [**deleteFeedback**](docs/FeedbackApi.md#deletefeedback) | **DELETE** /v1/feedback/{feedback_id} | Delete Feedback Handler
150
155
  *FeedbackApi* | [**listFeedback**](docs/FeedbackApi.md#listfeedback) | **GET** /v1/feedback | List Feedback Handler
@@ -340,6 +345,7 @@ All URIs are relative to *http://localhost:8000*
340
345
  - [ColumnConfig](docs/ColumnConfig.md)
341
346
  - [ColumnReference](docs/ColumnReference.md)
342
347
  - [CommonFileExclusionReason](docs/CommonFileExclusionReason.md)
348
+ - [CompleteUploadRequest](docs/CompleteUploadRequest.md)
343
349
  - [ConnectionConfig](docs/ConnectionConfig.md)
344
350
  - [ContentsSortOrder](docs/ContentsSortOrder.md)
345
351
  - [CreateApiConnectionRequest](docs/CreateApiConnectionRequest.md)
@@ -360,6 +366,8 @@ All URIs are relative to *http://localhost:8000*
360
366
  - [CreateTagRequest](docs/CreateTagRequest.md)
361
367
  - [CreateThreadMessageRequest](docs/CreateThreadMessageRequest.md)
362
368
  - [CreateThreadRequest](docs/CreateThreadRequest.md)
369
+ - [CreateUploadRequest](docs/CreateUploadRequest.md)
370
+ - [CreateUploadResponse](docs/CreateUploadResponse.md)
363
371
  - [CreateWorkflowDefinitionRequest](docs/CreateWorkflowDefinitionRequest.md)
364
372
  - [DataSourceCatalogResponse](docs/DataSourceCatalogResponse.md)
365
373
  - [DataSourceDescribeResponse](docs/DataSourceDescribeResponse.md)
@@ -621,6 +629,8 @@ All URIs are relative to *http://localhost:8000*
621
629
  - [UpdateWorkflowRunRequest](docs/UpdateWorkflowRunRequest.md)
622
630
  - [UploadConstraints](docs/UploadConstraints.md)
623
631
  - [UploadFormat](docs/UploadFormat.md)
632
+ - [UploadPartResponse](docs/UploadPartResponse.md)
633
+ - [UploadStatusResponse](docs/UploadStatusResponse.md)
624
634
  - [UsageMetric](docs/UsageMetric.md)
625
635
  - [UserInfo](docs/UserInfo.md)
626
636
  - [UserMessageRequest](docs/UserMessageRequest.md)
@@ -680,7 +690,7 @@ and is automatically generated by the
680
690
  [OpenAPI Generator](https://openapi-generator.tech) project:
681
691
 
682
692
  - API version: `0.1.0`
683
- - Package version: `1.152.0`
693
+ - Package version: `1.154.1`
684
694
  - Generator version: `7.21.0`
685
695
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
686
696
 
@@ -10,10 +10,19 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ChunkType, CreateDocumentRequest, DocumentDownloadResponse, DocumentResponse, DocumentType, DownloadArtifact, ImageTaxonomy, IngestDocumentResponse, IngestZipResponse, IngestionMode, PaginatedResponseDocumentResponse, PathOrder, SortDirection, UpdateDocumentRequest } from '../models/index';
13
+ import type { ChunkType, CompleteUploadRequest, CreateDocumentRequest, CreateUploadRequest, CreateUploadResponse, DocumentDownloadResponse, DocumentResponse, DocumentType, DownloadArtifact, ImageTaxonomy, IngestDocumentResponse, IngestZipResponse, IngestionMode, PaginatedResponseDocumentResponse, PathOrder, SortDirection, UpdateDocumentRequest, UploadPartResponse, UploadStatusResponse } from '../models/index';
14
+ export interface AbortDocumentUploadRequest {
15
+ xUploadToken: string;
16
+ }
17
+ export interface CompleteDocumentUploadRequest {
18
+ completeUploadRequest: CompleteUploadRequest;
19
+ }
14
20
  export interface CreateDocumentOperationRequest {
15
21
  createDocumentRequest: CreateDocumentRequest;
16
22
  }
23
+ export interface CreateDocumentUploadRequest {
24
+ createUploadRequest: CreateUploadRequest;
25
+ }
17
26
  export interface DeleteDocumentRequest {
18
27
  documentId: string;
19
28
  }
@@ -25,17 +34,20 @@ export interface GetDocumentRequest {
25
34
  documentId: string;
26
35
  withTags?: boolean;
27
36
  }
37
+ export interface GetDocumentUploadStatusRequest {
38
+ xUploadToken: string;
39
+ }
28
40
  export interface IngestDocumentRequest {
29
41
  file: Blob;
30
42
  pathPartId: string;
31
43
  name?: string | null;
44
+ tagIds?: Array<string>;
45
+ idempotencyKey?: string | null;
32
46
  ingestionMode?: IngestionMode;
33
47
  chunkType?: ChunkType;
34
48
  secondaryTaxonomy?: ImageTaxonomy;
35
49
  pageDpi?: number;
36
50
  workflowRunId?: string | null;
37
- tagIds?: Array<string>;
38
- idempotencyKey?: string | null;
39
51
  workflowDefinitionId?: string | null;
40
52
  }
41
53
  export interface IngestDocumentVersionRequest {
@@ -72,6 +84,11 @@ export interface UpdateDocumentOperationRequest {
72
84
  documentId: string;
73
85
  updateDocumentRequest: UpdateDocumentRequest;
74
86
  }
87
+ export interface UploadDocumentPartRequest {
88
+ partNumber: number;
89
+ xUploadToken: string;
90
+ body: Blob;
91
+ }
75
92
  /**
76
93
  * DocumentsApi - interface
77
94
  *
@@ -79,6 +96,48 @@ export interface UpdateDocumentOperationRequest {
79
96
  * @interface DocumentsApiInterface
80
97
  */
81
98
  export interface DocumentsApiInterface {
99
+ /**
100
+ * Creates request options for abortDocumentUpload without sending the request
101
+ * @param {string} xUploadToken
102
+ * @throws {RequiredError}
103
+ * @memberof DocumentsApiInterface
104
+ */
105
+ abortDocumentUploadRequestOpts(requestParameters: AbortDocumentUploadRequest): Promise<runtime.RequestOpts>;
106
+ /**
107
+ * Discard an in-progress resumable upload and its parts.
108
+ * @summary Abort Document Upload Handler
109
+ * @param {string} xUploadToken
110
+ * @param {*} [options] Override http request option.
111
+ * @throws {RequiredError}
112
+ * @memberof DocumentsApiInterface
113
+ */
114
+ abortDocumentUploadRaw(requestParameters: AbortDocumentUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
115
+ /**
116
+ * Discard an in-progress resumable upload and its parts.
117
+ * Abort Document Upload Handler
118
+ */
119
+ abortDocumentUpload(requestParameters: AbortDocumentUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
120
+ /**
121
+ * Creates request options for completeDocumentUpload without sending the request
122
+ * @param {CompleteUploadRequest} completeUploadRequest
123
+ * @throws {RequiredError}
124
+ * @memberof DocumentsApiInterface
125
+ */
126
+ completeDocumentUploadRequestOpts(requestParameters: CompleteDocumentUploadRequest): Promise<runtime.RequestOpts>;
127
+ /**
128
+ * Assemble the uploaded parts, create the document, and start ingestion.
129
+ * @summary Complete Document Upload Handler
130
+ * @param {CompleteUploadRequest} completeUploadRequest
131
+ * @param {*} [options] Override http request option.
132
+ * @throws {RequiredError}
133
+ * @memberof DocumentsApiInterface
134
+ */
135
+ completeDocumentUploadRaw(requestParameters: CompleteDocumentUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IngestDocumentResponse>>;
136
+ /**
137
+ * Assemble the uploaded parts, create the document, and start ingestion.
138
+ * Complete Document Upload Handler
139
+ */
140
+ completeDocumentUpload(requestParameters: CompleteDocumentUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IngestDocumentResponse>;
82
141
  /**
83
142
  * Creates request options for createDocument without sending the request
84
143
  * @param {CreateDocumentRequest} createDocumentRequest
@@ -100,6 +159,27 @@ export interface DocumentsApiInterface {
100
159
  * Create Document Handler
101
160
  */
102
161
  createDocument(requestParameters: CreateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
162
+ /**
163
+ * Creates request options for createDocumentUpload without sending the request
164
+ * @param {CreateUploadRequest} createUploadRequest
165
+ * @throws {RequiredError}
166
+ * @memberof DocumentsApiInterface
167
+ */
168
+ createDocumentUploadRequestOpts(requestParameters: CreateDocumentUploadRequest): Promise<runtime.RequestOpts>;
169
+ /**
170
+ * Begin a resumable multipart upload for a large file (audio/video/…). Returns an opaque ``upload_token``. Stream the file as parts to ``PUT /v1/documents/uploads/parts/{part_number}`` (every part except the last at least 5 MiB), then ``POST /v1/documents/uploads/complete``. A dropped part is re-sent alone — ``GET /v1/documents/uploads/parts`` reports what landed.
171
+ * @summary Create Document Upload Handler
172
+ * @param {CreateUploadRequest} createUploadRequest
173
+ * @param {*} [options] Override http request option.
174
+ * @throws {RequiredError}
175
+ * @memberof DocumentsApiInterface
176
+ */
177
+ createDocumentUploadRaw(requestParameters: CreateDocumentUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateUploadResponse>>;
178
+ /**
179
+ * Begin a resumable multipart upload for a large file (audio/video/…). Returns an opaque ``upload_token``. Stream the file as parts to ``PUT /v1/documents/uploads/parts/{part_number}`` (every part except the last at least 5 MiB), then ``POST /v1/documents/uploads/complete``. A dropped part is re-sent alone — ``GET /v1/documents/uploads/parts`` reports what landed.
180
+ * Create Document Upload Handler
181
+ */
182
+ createDocumentUpload(requestParameters: CreateDocumentUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateUploadResponse>;
103
183
  /**
104
184
  * Creates request options for deleteDocument without sending the request
105
185
  * @param {string} documentId
@@ -166,18 +246,39 @@ export interface DocumentsApiInterface {
166
246
  * Get Document Handler
167
247
  */
168
248
  getDocument(requestParameters: GetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
249
+ /**
250
+ * Creates request options for getDocumentUploadStatus without sending the request
251
+ * @param {string} xUploadToken
252
+ * @throws {RequiredError}
253
+ * @memberof DocumentsApiInterface
254
+ */
255
+ getDocumentUploadStatusRequestOpts(requestParameters: GetDocumentUploadStatusRequest): Promise<runtime.RequestOpts>;
256
+ /**
257
+ * Report which parts S3 already holds so the client resumes the rest.
258
+ * @summary Get Document Upload Status Handler
259
+ * @param {string} xUploadToken
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ * @memberof DocumentsApiInterface
263
+ */
264
+ getDocumentUploadStatusRaw(requestParameters: GetDocumentUploadStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UploadStatusResponse>>;
265
+ /**
266
+ * Report which parts S3 already holds so the client resumes the rest.
267
+ * Get Document Upload Status Handler
268
+ */
269
+ getDocumentUploadStatus(requestParameters: GetDocumentUploadStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UploadStatusResponse>;
169
270
  /**
170
271
  * Creates request options for ingestDocument without sending the request
171
272
  * @param {Blob} file
172
273
  * @param {string} pathPartId Parent path part ID (must be a FOLDER type)
173
274
  * @param {string} [name] Document name (defaults to filename)
275
+ * @param {Array<string>} [tagIds] Tag IDs applied to the created document.
276
+ * @param {string} [idempotencyKey] Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409.
174
277
  * @param {IngestionMode} [ingestionMode]
175
278
  * @param {ChunkType} [chunkType]
176
279
  * @param {ImageTaxonomy} [secondaryTaxonomy]
177
280
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
178
281
  * @param {string} [workflowRunId] Workflow run context for assumed agent uploads.
179
- * @param {Array<string>} [tagIds] Tag IDs applied to the created document.
180
- * @param {string} [idempotencyKey] Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409.
181
282
  * @param {string} [workflowDefinitionId] Workflow definition context for assumed agent uploads.
182
283
  * @throws {RequiredError}
183
284
  * @memberof DocumentsApiInterface
@@ -189,13 +290,13 @@ export interface DocumentsApiInterface {
189
290
  * @param {Blob} file
190
291
  * @param {string} pathPartId Parent path part ID (must be a FOLDER type)
191
292
  * @param {string} [name] Document name (defaults to filename)
293
+ * @param {Array<string>} [tagIds] Tag IDs applied to the created document.
294
+ * @param {string} [idempotencyKey] Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409.
192
295
  * @param {IngestionMode} [ingestionMode]
193
296
  * @param {ChunkType} [chunkType]
194
297
  * @param {ImageTaxonomy} [secondaryTaxonomy]
195
298
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
196
299
  * @param {string} [workflowRunId] Workflow run context for assumed agent uploads.
197
- * @param {Array<string>} [tagIds] Tag IDs applied to the created document.
198
- * @param {string} [idempotencyKey] Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409.
199
300
  * @param {string} [workflowDefinitionId] Workflow definition context for assumed agent uploads.
200
301
  * @param {*} [options] Override http request option.
201
302
  * @throws {RequiredError}
@@ -335,11 +436,64 @@ export interface DocumentsApiInterface {
335
436
  * Update Document Handler
336
437
  */
337
438
  updateDocument(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
439
+ /**
440
+ * Creates request options for uploadDocumentPart without sending the request
441
+ * @param {number} partNumber
442
+ * @param {string} xUploadToken
443
+ * @param {Blob} body
444
+ * @throws {RequiredError}
445
+ * @memberof DocumentsApiInterface
446
+ */
447
+ uploadDocumentPartRequestOpts(requestParameters: UploadDocumentPartRequest): Promise<runtime.RequestOpts>;
448
+ /**
449
+ * Upload one part (raw octet-stream body) of a resumable upload.
450
+ * @summary Upload Document Part Handler
451
+ * @param {number} partNumber
452
+ * @param {string} xUploadToken
453
+ * @param {Blob} body
454
+ * @param {*} [options] Override http request option.
455
+ * @throws {RequiredError}
456
+ * @memberof DocumentsApiInterface
457
+ */
458
+ uploadDocumentPartRaw(requestParameters: UploadDocumentPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UploadPartResponse>>;
459
+ /**
460
+ * Upload one part (raw octet-stream body) of a resumable upload.
461
+ * Upload Document Part Handler
462
+ */
463
+ uploadDocumentPart(requestParameters: UploadDocumentPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UploadPartResponse>;
338
464
  }
339
465
  /**
340
466
  *
341
467
  */
342
468
  export declare class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterface {
469
+ /**
470
+ * Creates request options for abortDocumentUpload without sending the request
471
+ */
472
+ abortDocumentUploadRequestOpts(requestParameters: AbortDocumentUploadRequest): Promise<runtime.RequestOpts>;
473
+ /**
474
+ * Discard an in-progress resumable upload and its parts.
475
+ * Abort Document Upload Handler
476
+ */
477
+ abortDocumentUploadRaw(requestParameters: AbortDocumentUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
478
+ /**
479
+ * Discard an in-progress resumable upload and its parts.
480
+ * Abort Document Upload Handler
481
+ */
482
+ abortDocumentUpload(requestParameters: AbortDocumentUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
483
+ /**
484
+ * Creates request options for completeDocumentUpload without sending the request
485
+ */
486
+ completeDocumentUploadRequestOpts(requestParameters: CompleteDocumentUploadRequest): Promise<runtime.RequestOpts>;
487
+ /**
488
+ * Assemble the uploaded parts, create the document, and start ingestion.
489
+ * Complete Document Upload Handler
490
+ */
491
+ completeDocumentUploadRaw(requestParameters: CompleteDocumentUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IngestDocumentResponse>>;
492
+ /**
493
+ * Assemble the uploaded parts, create the document, and start ingestion.
494
+ * Complete Document Upload Handler
495
+ */
496
+ completeDocumentUpload(requestParameters: CompleteDocumentUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IngestDocumentResponse>;
343
497
  /**
344
498
  * Creates request options for createDocument without sending the request
345
499
  */
@@ -354,6 +508,20 @@ export declare class DocumentsApi extends runtime.BaseAPI implements DocumentsAp
354
508
  * Create Document Handler
355
509
  */
356
510
  createDocument(requestParameters: CreateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
511
+ /**
512
+ * Creates request options for createDocumentUpload without sending the request
513
+ */
514
+ createDocumentUploadRequestOpts(requestParameters: CreateDocumentUploadRequest): Promise<runtime.RequestOpts>;
515
+ /**
516
+ * Begin a resumable multipart upload for a large file (audio/video/…). Returns an opaque ``upload_token``. Stream the file as parts to ``PUT /v1/documents/uploads/parts/{part_number}`` (every part except the last at least 5 MiB), then ``POST /v1/documents/uploads/complete``. A dropped part is re-sent alone — ``GET /v1/documents/uploads/parts`` reports what landed.
517
+ * Create Document Upload Handler
518
+ */
519
+ createDocumentUploadRaw(requestParameters: CreateDocumentUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateUploadResponse>>;
520
+ /**
521
+ * Begin a resumable multipart upload for a large file (audio/video/…). Returns an opaque ``upload_token``. Stream the file as parts to ``PUT /v1/documents/uploads/parts/{part_number}`` (every part except the last at least 5 MiB), then ``POST /v1/documents/uploads/complete``. A dropped part is re-sent alone — ``GET /v1/documents/uploads/parts`` reports what landed.
522
+ * Create Document Upload Handler
523
+ */
524
+ createDocumentUpload(requestParameters: CreateDocumentUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateUploadResponse>;
357
525
  /**
358
526
  * Creates request options for deleteDocument without sending the request
359
527
  */
@@ -394,6 +562,20 @@ export declare class DocumentsApi extends runtime.BaseAPI implements DocumentsAp
394
562
  * Get Document Handler
395
563
  */
396
564
  getDocument(requestParameters: GetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
565
+ /**
566
+ * Creates request options for getDocumentUploadStatus without sending the request
567
+ */
568
+ getDocumentUploadStatusRequestOpts(requestParameters: GetDocumentUploadStatusRequest): Promise<runtime.RequestOpts>;
569
+ /**
570
+ * Report which parts S3 already holds so the client resumes the rest.
571
+ * Get Document Upload Status Handler
572
+ */
573
+ getDocumentUploadStatusRaw(requestParameters: GetDocumentUploadStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UploadStatusResponse>>;
574
+ /**
575
+ * Report which parts S3 already holds so the client resumes the rest.
576
+ * Get Document Upload Status Handler
577
+ */
578
+ getDocumentUploadStatus(requestParameters: GetDocumentUploadStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UploadStatusResponse>;
397
579
  /**
398
580
  * Creates request options for ingestDocument without sending the request
399
581
  */
@@ -464,4 +646,18 @@ export declare class DocumentsApi extends runtime.BaseAPI implements DocumentsAp
464
646
  * Update Document Handler
465
647
  */
466
648
  updateDocument(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
649
+ /**
650
+ * Creates request options for uploadDocumentPart without sending the request
651
+ */
652
+ uploadDocumentPartRequestOpts(requestParameters: UploadDocumentPartRequest): Promise<runtime.RequestOpts>;
653
+ /**
654
+ * Upload one part (raw octet-stream body) of a resumable upload.
655
+ * Upload Document Part Handler
656
+ */
657
+ uploadDocumentPartRaw(requestParameters: UploadDocumentPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UploadPartResponse>>;
658
+ /**
659
+ * Upload one part (raw octet-stream body) of a resumable upload.
660
+ * Upload Document Part Handler
661
+ */
662
+ uploadDocumentPart(requestParameters: UploadDocumentPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UploadPartResponse>;
467
663
  }