@knowledge-stack/ksapi 1.149.1 → 1.151.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/.openapi-generator/FILES +4 -2
  2. package/README.md +5 -3
  3. package/dist/apis/DocumentsApi.d.ts +13 -4
  4. package/dist/apis/DocumentsApi.js +11 -2
  5. package/dist/apis/MemoryApi.d.ts +5 -5
  6. package/dist/apis/MemoryApi.js +1 -1
  7. package/dist/apis/SystemJobsApi.d.ts +39 -1
  8. package/dist/apis/SystemJobsApi.js +48 -0
  9. package/dist/esm/apis/DocumentsApi.d.ts +13 -4
  10. package/dist/esm/apis/DocumentsApi.js +11 -2
  11. package/dist/esm/apis/MemoryApi.d.ts +5 -5
  12. package/dist/esm/apis/MemoryApi.js +2 -2
  13. package/dist/esm/apis/SystemJobsApi.d.ts +39 -1
  14. package/dist/esm/apis/SystemJobsApi.js +49 -1
  15. package/dist/esm/models/DocumentVersionMetadata.d.ts +6 -0
  16. package/dist/esm/models/DocumentVersionMetadata.js +2 -0
  17. package/dist/esm/models/IngestZipResponse.d.ts +10 -23
  18. package/dist/esm/models/IngestZipResponse.js +5 -17
  19. package/dist/esm/models/ZipIngestionStatusResponse.d.ts +64 -0
  20. package/dist/esm/models/{ProposedMemoryChunkResponse.js → ZipIngestionStatusResponse.js} +19 -40
  21. package/dist/esm/models/{ProposedMemoryChunkResponse.d.ts → ZipMemberStatusResponse.d.ts} +23 -37
  22. package/dist/esm/models/ZipMemberStatusResponse.js +54 -0
  23. package/dist/esm/models/index.d.ts +2 -1
  24. package/dist/esm/models/index.js +2 -1
  25. package/dist/models/DocumentVersionMetadata.d.ts +6 -0
  26. package/dist/models/DocumentVersionMetadata.js +2 -0
  27. package/dist/models/IngestZipResponse.d.ts +10 -23
  28. package/dist/models/IngestZipResponse.js +5 -17
  29. package/dist/models/ZipIngestionStatusResponse.d.ts +64 -0
  30. package/dist/models/{ProposedMemoryChunkResponse.js → ZipIngestionStatusResponse.js} +25 -46
  31. package/dist/models/{ProposedMemoryChunkResponse.d.ts → ZipMemberStatusResponse.d.ts} +23 -37
  32. package/dist/models/ZipMemberStatusResponse.js +62 -0
  33. package/dist/models/index.d.ts +2 -1
  34. package/dist/models/index.js +2 -1
  35. package/docs/DocumentVersionMetadata.md +2 -0
  36. package/docs/DocumentsApi.md +12 -3
  37. package/docs/IngestZipResponse.md +4 -10
  38. package/docs/MemoryApi.md +2 -2
  39. package/docs/SystemJobsApi.md +76 -0
  40. package/docs/ZipIngestionStatusResponse.md +39 -0
  41. package/docs/ZipMemberStatusResponse.md +45 -0
  42. package/package.json +1 -1
  43. package/src/apis/DocumentsApi.ts +25 -4
  44. package/src/apis/MemoryApi.ts +8 -8
  45. package/src/apis/SystemJobsApi.ts +86 -0
  46. package/src/models/DocumentVersionMetadata.ts +8 -0
  47. package/src/models/IngestZipResponse.ts +15 -37
  48. package/src/models/ZipIngestionStatusResponse.ts +113 -0
  49. package/src/models/ZipMemberStatusResponse.ts +123 -0
  50. package/src/models/index.ts +2 -1
  51. package/docs/ProposedMemoryChunkResponse.md +0 -48
  52. package/src/models/ProposedMemoryChunkResponse.ts +0 -163
@@ -8,6 +8,7 @@ All URIs are relative to *http://localhost:8000*
8
8
  | [**dvWorkflowRerun**](SystemJobsApi.md#dvworkflowrerun) | **POST** /v1/system-jobs/document_versions/{workflow_id} | Dv Workflow Rerun Handler |
9
9
  | [**getDvWorkflow**](SystemJobsApi.md#getdvworkflow) | **GET** /v1/system-jobs/document_versions/{workflow_id} | Get Dv Workflow Handler |
10
10
  | [**getTemporalWorkflowStatus**](SystemJobsApi.md#gettemporalworkflowstatus) | **GET** /v1/system-jobs/{workflow_id} | Get Temporal Workflow Status Handler |
11
+ | [**getZipIngestionStatus**](SystemJobsApi.md#getzipingestionstatus) | **GET** /v1/system-jobs/zip-ingestions/{workflow_id} | Get Zip Ingestion Status Handler |
11
12
  | [**listDvWorkflows**](SystemJobsApi.md#listdvworkflows) | **GET** /v1/system-jobs/document_versions | List Dv Workflows Handler |
12
13
 
13
14
 
@@ -312,6 +313,81 @@ example().catch(console.error);
312
313
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
313
314
 
314
315
 
316
+ ## getZipIngestionStatus
317
+
318
+ > ZipIngestionStatusResponse getZipIngestionStatus(workflowId)
319
+
320
+ Get Zip Ingestion Status Handler
321
+
322
+ Get a ZIP fan-out\'s live status + per-member outcomes. Tenant-scoped via the TenantId search attribute (no per-path can_read check — intentionally consistent with the sibling generic Temporal endpoints below; the opaque workflow_id is only handed to the uploader, who had can_write on the target). The per-member results come from the workflow\'s ``results`` query (served from retained history), so once Temporal retention expires this 404s.
323
+
324
+ ### Example
325
+
326
+ ```ts
327
+ import {
328
+ Configuration,
329
+ SystemJobsApi,
330
+ } from '@knowledge-stack/ksapi';
331
+ import type { GetZipIngestionStatusRequest } from '@knowledge-stack/ksapi';
332
+
333
+ async function example() {
334
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
335
+ const config = new Configuration({
336
+ // To configure API key authorization: cookieAuth
337
+ apiKey: "YOUR API KEY",
338
+ // Configure HTTP bearer authorization: bearerAuth
339
+ accessToken: "YOUR BEARER TOKEN",
340
+ });
341
+ const api = new SystemJobsApi(config);
342
+
343
+ const body = {
344
+ // string
345
+ workflowId: workflowId_example,
346
+ } satisfies GetZipIngestionStatusRequest;
347
+
348
+ try {
349
+ const data = await api.getZipIngestionStatus(body);
350
+ console.log(data);
351
+ } catch (error) {
352
+ console.error(error);
353
+ }
354
+ }
355
+
356
+ // Run the test
357
+ example().catch(console.error);
358
+ ```
359
+
360
+ ### Parameters
361
+
362
+
363
+ | Name | Type | Description | Notes |
364
+ |------------- | ------------- | ------------- | -------------|
365
+ | **workflowId** | `string` | | [Defaults to `undefined`] |
366
+
367
+ ### Return type
368
+
369
+ [**ZipIngestionStatusResponse**](ZipIngestionStatusResponse.md)
370
+
371
+ ### Authorization
372
+
373
+ [cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
374
+
375
+ ### HTTP request headers
376
+
377
+ - **Content-Type**: Not defined
378
+ - **Accept**: `application/json`
379
+
380
+
381
+ ### HTTP response details
382
+ | Status code | Description | Response headers |
383
+ |-------------|-------------|------------------|
384
+ | **200** | Successful Response | - |
385
+ | **422** | Validation Error | - |
386
+ | **0** | Error response. | - |
387
+
388
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
389
+
390
+
315
391
  ## listDvWorkflows
316
392
 
317
393
  > PaginatedResponseWorkflowSummaryResponse listDvWorkflows(limit, offset)
@@ -0,0 +1,39 @@
1
+
2
+ # ZipIngestionStatusResponse
3
+
4
+ Status of a ZIP fan-out: live Temporal state + per-member outcomes. ``files`` reflects progress so far — members that have been dispatched (``workflow_id`` set), failed to dispatch (``error`` set), or were skipped as artifacts. Poll until ``temporal_status`` is terminal (e.g. ``COMPLETED``).
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `workflowId` | string
11
+ `temporalStatus` | string
12
+ `files` | [Array<ZipMemberStatusResponse>](ZipMemberStatusResponse.md)
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { ZipIngestionStatusResponse } from '@knowledge-stack/ksapi'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "workflowId": null,
22
+ "temporalStatus": null,
23
+ "files": null,
24
+ } satisfies ZipIngestionStatusResponse
25
+
26
+ console.log(example)
27
+
28
+ // Convert the instance to a JSON string
29
+ const exampleJSON: string = JSON.stringify(example)
30
+ console.log(exampleJSON)
31
+
32
+ // Parse the JSON string back to an object
33
+ const exampleParsed = JSON.parse(exampleJSON) as ZipIngestionStatusResponse
34
+ console.log(exampleParsed)
35
+ ```
36
+
37
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
38
+
39
+
@@ -0,0 +1,45 @@
1
+
2
+ # ZipMemberStatusResponse
3
+
4
+ One member\'s outcome within a ZIP fan-out (from the workflow query).
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `zipPath` | string
11
+ `documentId` | string
12
+ `documentVersionId` | string
13
+ `workflowId` | string
14
+ `error` | string
15
+ `skipped` | boolean
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import type { ZipMemberStatusResponse } from '@knowledge-stack/ksapi'
21
+
22
+ // TODO: Update the object below with actual values
23
+ const example = {
24
+ "zipPath": null,
25
+ "documentId": null,
26
+ "documentVersionId": null,
27
+ "workflowId": null,
28
+ "error": null,
29
+ "skipped": null,
30
+ } satisfies ZipMemberStatusResponse
31
+
32
+ console.log(example)
33
+
34
+ // Convert the instance to a JSON string
35
+ const exampleJSON: string = JSON.stringify(example)
36
+ console.log(exampleJSON)
37
+
38
+ // Parse the JSON string back to an object
39
+ const exampleParsed = JSON.parse(exampleJSON) as ZipMemberStatusResponse
40
+ console.log(exampleParsed)
41
+ ```
42
+
43
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
44
+
45
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "1.149.1",
3
+ "version": "1.151.0",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -94,6 +94,8 @@ export interface IngestDocumentRequest {
94
94
  secondaryTaxonomy?: ImageTaxonomy;
95
95
  pageDpi?: number;
96
96
  workflowRunId?: string | null;
97
+ tagIds?: Array<string>;
98
+ idempotencyKey?: string | null;
97
99
  workflowDefinitionId?: string | null;
98
100
  }
99
101
 
@@ -112,6 +114,7 @@ export interface IngestZipRequest {
112
114
  file: Blob;
113
115
  pathPartId: string;
114
116
  ingestionMode?: IngestionMode;
117
+ tagIds?: Array<string>;
115
118
  }
116
119
 
117
120
  export interface ListDocumentsRequest {
@@ -250,6 +253,8 @@ export interface DocumentsApiInterface {
250
253
  * @param {ImageTaxonomy} [secondaryTaxonomy]
251
254
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
252
255
  * @param {string} [workflowRunId] Workflow run context for assumed agent uploads.
256
+ * @param {Array<string>} [tagIds] Tag IDs applied to the created document.
257
+ * @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.
253
258
  * @param {string} [workflowDefinitionId] Workflow definition context for assumed agent uploads.
254
259
  * @throws {RequiredError}
255
260
  * @memberof DocumentsApiInterface
@@ -267,6 +272,8 @@ export interface DocumentsApiInterface {
267
272
  * @param {ImageTaxonomy} [secondaryTaxonomy]
268
273
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
269
274
  * @param {string} [workflowRunId] Workflow run context for assumed agent uploads.
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.
270
277
  * @param {string} [workflowDefinitionId] Workflow definition context for assumed agent uploads.
271
278
  * @param {*} [options] Override http request option.
272
279
  * @throws {RequiredError}
@@ -323,17 +330,19 @@ export interface DocumentsApiInterface {
323
330
  * @param {Blob} file
324
331
  * @param {string} pathPartId Parent path part ID (must be a FOLDER type)
325
332
  * @param {IngestionMode} [ingestionMode]
333
+ * @param {Array<string>} [tagIds] Tag IDs applied to every ingested member document.
326
334
  * @throws {RequiredError}
327
335
  * @memberof DocumentsApiInterface
328
336
  */
329
337
  ingestZipRequestOpts(requestParameters: IngestZipRequest): Promise<runtime.RequestOpts>;
330
338
 
331
339
  /**
332
- * Upload a ZIP archive and ingest each member file individually. Directory structure inside the ZIP is preserved as FOLDER PathParts under the target folder. Returns 202 with per-file outcomes each file that ingests successfully has its own Temporal workflow ID to poll for status. Whole-archive failures (not a ZIP, zip-bomb, >500 files) return 400 before any DB writes. Per-file failures (unsupported type, oversized) are included in the response with ``error`` set; other files continue processing.
340
+ * Upload a ZIP archive; ingest each member asynchronously via a fan-out. The whole archive nests under a single FOLDER named after the ZIP file (``report.zip`` -> ``report/``), with the ZIP\'s directory structure mirrored beneath it as FOLDER PathParts all created synchronously. Returns 202 with the fan-out ``workflow_id`` (poll ``GET /v1/system-jobs/zip-ingestions/{workflow_id}`` for per-member outcomes) plus the artifacts ``skipped`` during classification. Whole-archive failures (not a ZIP, zip-bomb, >500 files) return 400 before any DB writes; a re-upload whose ZIP-named folder already exists returns 409. Per-member failures (unsupported type, oversized) surface in the polled workflow results, not in this response. Each member reuses the single-file ingest path, so run-enrollment and completion events fire per member there.
333
341
  * @summary Ingest Zip Handler
334
342
  * @param {Blob} file
335
343
  * @param {string} pathPartId Parent path part ID (must be a FOLDER type)
336
344
  * @param {IngestionMode} [ingestionMode]
345
+ * @param {Array<string>} [tagIds] Tag IDs applied to every ingested member document.
337
346
  * @param {*} [options] Override http request option.
338
347
  * @throws {RequiredError}
339
348
  * @memberof DocumentsApiInterface
@@ -341,7 +350,7 @@ export interface DocumentsApiInterface {
341
350
  ingestZipRaw(requestParameters: IngestZipRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IngestZipResponse>>;
342
351
 
343
352
  /**
344
- * Upload a ZIP archive and ingest each member file individually. Directory structure inside the ZIP is preserved as FOLDER PathParts under the target folder. Returns 202 with per-file outcomes each file that ingests successfully has its own Temporal workflow ID to poll for status. Whole-archive failures (not a ZIP, zip-bomb, >500 files) return 400 before any DB writes. Per-file failures (unsupported type, oversized) are included in the response with ``error`` set; other files continue processing.
353
+ * Upload a ZIP archive; ingest each member asynchronously via a fan-out. The whole archive nests under a single FOLDER named after the ZIP file (``report.zip`` -> ``report/``), with the ZIP\'s directory structure mirrored beneath it as FOLDER PathParts all created synchronously. Returns 202 with the fan-out ``workflow_id`` (poll ``GET /v1/system-jobs/zip-ingestions/{workflow_id}`` for per-member outcomes) plus the artifacts ``skipped`` during classification. Whole-archive failures (not a ZIP, zip-bomb, >500 files) return 400 before any DB writes; a re-upload whose ZIP-named folder already exists returns 409. Per-member failures (unsupported type, oversized) surface in the polled workflow results, not in this response. Each member reuses the single-file ingest path, so run-enrollment and completion events fire per member there.
345
354
  * Ingest Zip Handler
346
355
  */
347
356
  ingestZip(requestParameters: IngestZipRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IngestZipResponse>;
@@ -730,6 +739,14 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
730
739
  formParams.append('workflow_run_id', requestParameters['workflowRunId'] as any);
731
740
  }
732
741
 
742
+ if (requestParameters['tagIds'] != null) {
743
+ formParams.append('tag_ids', requestParameters['tagIds']!.join(runtime.COLLECTION_FORMATS["csv"]));
744
+ }
745
+
746
+ if (requestParameters['idempotencyKey'] != null) {
747
+ formParams.append('idempotency_key', requestParameters['idempotencyKey'] as any);
748
+ }
749
+
733
750
  if (requestParameters['workflowDefinitionId'] != null) {
734
751
  formParams.append('workflow_definition_id', requestParameters['workflowDefinitionId'] as any);
735
752
  }
@@ -931,6 +948,10 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
931
948
  formParams.append('ingestion_mode', requestParameters['ingestionMode'] as any);
932
949
  }
933
950
 
951
+ if (requestParameters['tagIds'] != null) {
952
+ formParams.append('tag_ids', requestParameters['tagIds']!.join(runtime.COLLECTION_FORMATS["csv"]));
953
+ }
954
+
934
955
 
935
956
  let urlPath = `/v1/documents/ingest-zip`;
936
957
 
@@ -944,7 +965,7 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
944
965
  }
945
966
 
946
967
  /**
947
- * Upload a ZIP archive and ingest each member file individually. Directory structure inside the ZIP is preserved as FOLDER PathParts under the target folder. Returns 202 with per-file outcomes each file that ingests successfully has its own Temporal workflow ID to poll for status. Whole-archive failures (not a ZIP, zip-bomb, >500 files) return 400 before any DB writes. Per-file failures (unsupported type, oversized) are included in the response with ``error`` set; other files continue processing.
968
+ * Upload a ZIP archive; ingest each member asynchronously via a fan-out. The whole archive nests under a single FOLDER named after the ZIP file (``report.zip`` -> ``report/``), with the ZIP\'s directory structure mirrored beneath it as FOLDER PathParts all created synchronously. Returns 202 with the fan-out ``workflow_id`` (poll ``GET /v1/system-jobs/zip-ingestions/{workflow_id}`` for per-member outcomes) plus the artifacts ``skipped`` during classification. Whole-archive failures (not a ZIP, zip-bomb, >500 files) return 400 before any DB writes; a re-upload whose ZIP-named folder already exists returns 409. Per-member failures (unsupported type, oversized) surface in the polled workflow results, not in this response. Each member reuses the single-file ingest path, so run-enrollment and completion events fire per member there.
948
969
  * Ingest Zip Handler
949
970
  */
950
971
  async ingestZipRaw(requestParameters: IngestZipRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IngestZipResponse>> {
@@ -955,7 +976,7 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
955
976
  }
956
977
 
957
978
  /**
958
- * Upload a ZIP archive and ingest each member file individually. Directory structure inside the ZIP is preserved as FOLDER PathParts under the target folder. Returns 202 with per-file outcomes each file that ingests successfully has its own Temporal workflow ID to poll for status. Whole-archive failures (not a ZIP, zip-bomb, >500 files) return 400 before any DB writes. Per-file failures (unsupported type, oversized) are included in the response with ``error`` set; other files continue processing.
979
+ * Upload a ZIP archive; ingest each member asynchronously via a fan-out. The whole archive nests under a single FOLDER named after the ZIP file (``report.zip`` -> ``report/``), with the ZIP\'s directory structure mirrored beneath it as FOLDER PathParts all created synchronously. Returns 202 with the fan-out ``workflow_id`` (poll ``GET /v1/system-jobs/zip-ingestions/{workflow_id}`` for per-member outcomes) plus the artifacts ``skipped`` during classification. Whole-archive failures (not a ZIP, zip-bomb, >500 files) return 400 before any DB writes; a re-upload whose ZIP-named folder already exists returns 409. Per-member failures (unsupported type, oversized) surface in the polled workflow results, not in this response. Each member reuses the single-file ingest path, so run-enrollment and completion events fire per member there.
959
980
  * Ingest Zip Handler
960
981
  */
961
982
  async ingestZip(requestParameters: IngestZipRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IngestZipResponse> {
@@ -21,8 +21,8 @@ import type {
21
21
  MemoryChunkResponse,
22
22
  MemoryScope,
23
23
  PaginatedResponsePendingMemoryChunkResponse,
24
+ PendingMemoryChunkResponse,
24
25
  ProposeMemoryChunkRequest,
25
- ProposedMemoryChunkResponse,
26
26
  } from '../models/index';
27
27
  import {
28
28
  ErrorResponseFromJSON,
@@ -37,10 +37,10 @@ import {
37
37
  MemoryScopeToJSON,
38
38
  PaginatedResponsePendingMemoryChunkResponseFromJSON,
39
39
  PaginatedResponsePendingMemoryChunkResponseToJSON,
40
+ PendingMemoryChunkResponseFromJSON,
41
+ PendingMemoryChunkResponseToJSON,
40
42
  ProposeMemoryChunkRequestFromJSON,
41
43
  ProposeMemoryChunkRequestToJSON,
42
- ProposedMemoryChunkResponseFromJSON,
43
- ProposedMemoryChunkResponseToJSON,
44
44
  } from '../models/index';
45
45
 
46
46
  export interface ApproveMemoryProposalRequest {
@@ -161,12 +161,12 @@ export interface MemoryApiInterface {
161
161
  * @throws {RequiredError}
162
162
  * @memberof MemoryApiInterface
163
163
  */
164
- proposeMemoryChunkRaw(requestParameters: ProposeMemoryChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProposedMemoryChunkResponse>>;
164
+ proposeMemoryChunkRaw(requestParameters: ProposeMemoryChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PendingMemoryChunkResponse>>;
165
165
 
166
166
  /**
167
167
  * Propose Memory Chunk Handler
168
168
  */
169
- proposeMemoryChunk(requestParameters: ProposeMemoryChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProposedMemoryChunkResponse>;
169
+ proposeMemoryChunk(requestParameters: ProposeMemoryChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PendingMemoryChunkResponse>;
170
170
 
171
171
  /**
172
172
  * Creates request options for rejectMemoryProposal without sending the request
@@ -411,17 +411,17 @@ export class MemoryApi extends runtime.BaseAPI implements MemoryApiInterface {
411
411
  /**
412
412
  * Propose Memory Chunk Handler
413
413
  */
414
- async proposeMemoryChunkRaw(requestParameters: ProposeMemoryChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProposedMemoryChunkResponse>> {
414
+ async proposeMemoryChunkRaw(requestParameters: ProposeMemoryChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PendingMemoryChunkResponse>> {
415
415
  const requestOptions = await this.proposeMemoryChunkRequestOpts(requestParameters);
416
416
  const response = await this.request(requestOptions, initOverrides);
417
417
 
418
- return new runtime.JSONApiResponse(response, (jsonValue) => ProposedMemoryChunkResponseFromJSON(jsonValue));
418
+ return new runtime.JSONApiResponse(response, (jsonValue) => PendingMemoryChunkResponseFromJSON(jsonValue));
419
419
  }
420
420
 
421
421
  /**
422
422
  * Propose Memory Chunk Handler
423
423
  */
424
- async proposeMemoryChunk(requestParameters: ProposeMemoryChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProposedMemoryChunkResponse> {
424
+ async proposeMemoryChunk(requestParameters: ProposeMemoryChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PendingMemoryChunkResponse> {
425
425
  const response = await this.proposeMemoryChunkRaw(requestParameters, initOverrides);
426
426
  return await response.value();
427
427
  }
@@ -22,6 +22,7 @@ import type {
22
22
  WorkflowActionResponse,
23
23
  WorkflowCancelResponse,
24
24
  WorkflowDetailResponse,
25
+ ZipIngestionStatusResponse,
25
26
  } from '../models/index';
26
27
  import {
27
28
  ErrorResponseFromJSON,
@@ -38,6 +39,8 @@ import {
38
39
  WorkflowCancelResponseToJSON,
39
40
  WorkflowDetailResponseFromJSON,
40
41
  WorkflowDetailResponseToJSON,
42
+ ZipIngestionStatusResponseFromJSON,
43
+ ZipIngestionStatusResponseToJSON,
41
44
  } from '../models/index';
42
45
 
43
46
  export interface CancelTemporalWorkflowRequest {
@@ -56,6 +59,10 @@ export interface GetTemporalWorkflowStatusRequest {
56
59
  workflowId: string;
57
60
  }
58
61
 
62
+ export interface GetZipIngestionStatusRequest {
63
+ workflowId: string;
64
+ }
65
+
59
66
  export interface ListDvWorkflowsRequest {
60
67
  limit?: number;
61
68
  offset?: number;
@@ -164,6 +171,30 @@ export interface SystemJobsApiInterface {
164
171
  */
165
172
  getTemporalWorkflowStatus(requestParameters: GetTemporalWorkflowStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TemporalWorkflowStatusResponse>;
166
173
 
174
+ /**
175
+ * Creates request options for getZipIngestionStatus without sending the request
176
+ * @param {string} workflowId
177
+ * @throws {RequiredError}
178
+ * @memberof SystemJobsApiInterface
179
+ */
180
+ getZipIngestionStatusRequestOpts(requestParameters: GetZipIngestionStatusRequest): Promise<runtime.RequestOpts>;
181
+
182
+ /**
183
+ * Get a ZIP fan-out\'s live status + per-member outcomes. Tenant-scoped via the TenantId search attribute (no per-path can_read check — intentionally consistent with the sibling generic Temporal endpoints below; the opaque workflow_id is only handed to the uploader, who had can_write on the target). The per-member results come from the workflow\'s ``results`` query (served from retained history), so once Temporal retention expires this 404s.
184
+ * @summary Get Zip Ingestion Status Handler
185
+ * @param {string} workflowId
186
+ * @param {*} [options] Override http request option.
187
+ * @throws {RequiredError}
188
+ * @memberof SystemJobsApiInterface
189
+ */
190
+ getZipIngestionStatusRaw(requestParameters: GetZipIngestionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZipIngestionStatusResponse>>;
191
+
192
+ /**
193
+ * Get a ZIP fan-out\'s live status + per-member outcomes. Tenant-scoped via the TenantId search attribute (no per-path can_read check — intentionally consistent with the sibling generic Temporal endpoints below; the opaque workflow_id is only handed to the uploader, who had can_write on the target). The per-member results come from the workflow\'s ``results`` query (served from retained history), so once Temporal retention expires this 404s.
194
+ * Get Zip Ingestion Status Handler
195
+ */
196
+ getZipIngestionStatus(requestParameters: GetZipIngestionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZipIngestionStatusResponse>;
197
+
167
198
  /**
168
199
  * Creates request options for listDvWorkflows without sending the request
169
200
  * @param {number} [limit] Number of items per page
@@ -417,6 +448,61 @@ export class SystemJobsApi extends runtime.BaseAPI implements SystemJobsApiInter
417
448
  return await response.value();
418
449
  }
419
450
 
451
+ /**
452
+ * Creates request options for getZipIngestionStatus without sending the request
453
+ */
454
+ async getZipIngestionStatusRequestOpts(requestParameters: GetZipIngestionStatusRequest): Promise<runtime.RequestOpts> {
455
+ if (requestParameters['workflowId'] == null) {
456
+ throw new runtime.RequiredError(
457
+ 'workflowId',
458
+ 'Required parameter "workflowId" was null or undefined when calling getZipIngestionStatus().'
459
+ );
460
+ }
461
+
462
+ const queryParameters: any = {};
463
+
464
+ const headerParameters: runtime.HTTPHeaders = {};
465
+
466
+ if (this.configuration && this.configuration.accessToken) {
467
+ const token = this.configuration.accessToken;
468
+ const tokenString = await token("bearerAuth", []);
469
+
470
+ if (tokenString) {
471
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
472
+ }
473
+ }
474
+
475
+ let urlPath = `/v1/system-jobs/zip-ingestions/{workflow_id}`;
476
+ urlPath = urlPath.replace(`{${"workflow_id"}}`, encodeURIComponent(String(requestParameters['workflowId'])));
477
+
478
+ return {
479
+ path: urlPath,
480
+ method: 'GET',
481
+ headers: headerParameters,
482
+ query: queryParameters,
483
+ };
484
+ }
485
+
486
+ /**
487
+ * Get a ZIP fan-out\'s live status + per-member outcomes. Tenant-scoped via the TenantId search attribute (no per-path can_read check — intentionally consistent with the sibling generic Temporal endpoints below; the opaque workflow_id is only handed to the uploader, who had can_write on the target). The per-member results come from the workflow\'s ``results`` query (served from retained history), so once Temporal retention expires this 404s.
488
+ * Get Zip Ingestion Status Handler
489
+ */
490
+ async getZipIngestionStatusRaw(requestParameters: GetZipIngestionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZipIngestionStatusResponse>> {
491
+ const requestOptions = await this.getZipIngestionStatusRequestOpts(requestParameters);
492
+ const response = await this.request(requestOptions, initOverrides);
493
+
494
+ return new runtime.JSONApiResponse(response, (jsonValue) => ZipIngestionStatusResponseFromJSON(jsonValue));
495
+ }
496
+
497
+ /**
498
+ * Get a ZIP fan-out\'s live status + per-member outcomes. Tenant-scoped via the TenantId search attribute (no per-path can_read check — intentionally consistent with the sibling generic Temporal endpoints below; the opaque workflow_id is only handed to the uploader, who had can_write on the target). The per-member results come from the workflow\'s ``results`` query (served from retained history), so once Temporal retention expires this 404s.
499
+ * Get Zip Ingestion Status Handler
500
+ */
501
+ async getZipIngestionStatus(requestParameters: GetZipIngestionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZipIngestionStatusResponse> {
502
+ const response = await this.getZipIngestionStatusRaw(requestParameters, initOverrides);
503
+ return await response.value();
504
+ }
505
+
420
506
  /**
421
507
  * Creates request options for listDvWorkflows without sending the request
422
508
  */
@@ -170,6 +170,12 @@ export interface DocumentVersionMetadata {
170
170
  * @memberof DocumentVersionMetadata
171
171
  */
172
172
  fileMd5?: string;
173
+ /**
174
+ * Opt-in create key. A repeat ingest with the same key at the same (parent, name) replays this document instead of colliding — makes a ZIP fan-out member retry idempotent.
175
+ * @type {string}
176
+ * @memberof DocumentVersionMetadata
177
+ */
178
+ idempotencyKey?: string | null;
173
179
  }
174
180
  export const DocumentVersionMetadataPropertyValidationAttributesMap: {
175
181
  [property: string]: {
@@ -226,6 +232,7 @@ export function DocumentVersionMetadataFromJSONTyped(json: any, ignoreDiscrimina
226
232
  'quotaPageCount': json['quota_page_count'] == null ? undefined : json['quota_page_count'],
227
233
  'quotaIdempotencyKey': json['quota_idempotency_key'] == null ? undefined : json['quota_idempotency_key'],
228
234
  'fileMd5': json['file_md5'] == null ? undefined : json['file_md5'],
235
+ 'idempotencyKey': json['idempotency_key'] == null ? undefined : json['idempotency_key'],
229
236
  };
230
237
  }
231
238
 
@@ -260,6 +267,7 @@ export function DocumentVersionMetadataToJSONTyped(value?: DocumentVersionMetada
260
267
  'quota_page_count': value['quotaPageCount'],
261
268
  'quota_idempotency_key': value['quotaIdempotencyKey'],
262
269
  'file_md5': value['fileMd5'],
270
+ 'idempotency_key': value['idempotencyKey'],
263
271
  };
264
272
  }
265
273
 
@@ -22,41 +22,28 @@ import {
22
22
  } from './ZipFileResult';
23
23
 
24
24
  /**
25
- * Aggregate response from a ZIP ingestion batch.
25
+ * Response from dispatching a ZIP archive to async ingestion.
26
+ *
27
+ * ``workflow_id`` is the fan-out workflow to poll at
28
+ * ``GET /v1/system-jobs/zip-ingestions/{workflow_id}`` for per-member outcomes;
29
+ * it is None when the archive held no ingestible members. ``skipped`` are the
30
+ * artifact/error entries resolved synchronously during classification.
26
31
  * @export
27
32
  * @interface IngestZipResponse
28
33
  */
29
34
  export interface IngestZipResponse {
30
35
  /**
31
36
  *
32
- * @type {Array<ZipFileResult>}
33
- * @memberof IngestZipResponse
34
- */
35
- files: Array<ZipFileResult>;
36
- /**
37
- *
38
- * @type {number}
37
+ * @type {string}
39
38
  * @memberof IngestZipResponse
40
39
  */
41
- totalFound: number;
40
+ workflowId: string | null;
42
41
  /**
43
42
  *
44
- * @type {number}
45
- * @memberof IngestZipResponse
46
- */
47
- succeeded: number;
48
- /**
49
- *
50
- * @type {number}
51
- * @memberof IngestZipResponse
52
- */
53
- skipped: number;
54
- /**
55
- *
56
- * @type {number}
43
+ * @type {Array<ZipFileResult>}
57
44
  * @memberof IngestZipResponse
58
45
  */
59
- failed: number;
46
+ skipped: Array<ZipFileResult>;
60
47
  }
61
48
  export const IngestZipResponsePropertyValidationAttributesMap: {
62
49
  [property: string]: {
@@ -80,11 +67,8 @@ export const IngestZipResponsePropertyValidationAttributesMap: {
80
67
  * Check if a given object implements the IngestZipResponse interface.
81
68
  */
82
69
  export function instanceOfIngestZipResponse(value: object): value is IngestZipResponse {
83
- if (!('files' in value) || value['files'] === undefined) return false;
84
- if (!('totalFound' in value) || value['totalFound'] === undefined) return false;
85
- if (!('succeeded' in value) || value['succeeded'] === undefined) return false;
70
+ if (!('workflowId' in value) || value['workflowId'] === undefined) return false;
86
71
  if (!('skipped' in value) || value['skipped'] === undefined) return false;
87
- if (!('failed' in value) || value['failed'] === undefined) return false;
88
72
  return true;
89
73
  }
90
74
 
@@ -98,11 +82,8 @@ export function IngestZipResponseFromJSONTyped(json: any, ignoreDiscriminator: b
98
82
  }
99
83
  return {
100
84
 
101
- 'files': ((json['files'] as Array<any>).map(ZipFileResultFromJSON)),
102
- 'totalFound': json['total_found'],
103
- 'succeeded': json['succeeded'],
104
- 'skipped': json['skipped'],
105
- 'failed': json['failed'],
85
+ 'workflowId': json['workflow_id'],
86
+ 'skipped': ((json['skipped'] as Array<any>).map(ZipFileResultFromJSON)),
106
87
  };
107
88
  }
108
89
 
@@ -117,11 +98,8 @@ export function IngestZipResponseToJSONTyped(value?: IngestZipResponse | null, i
117
98
 
118
99
  return {
119
100
 
120
- 'files': ((value['files'] as Array<any>).map(ZipFileResultToJSON)),
121
- 'total_found': value['totalFound'],
122
- 'succeeded': value['succeeded'],
123
- 'skipped': value['skipped'],
124
- 'failed': value['failed'],
101
+ 'workflow_id': value['workflowId'],
102
+ 'skipped': ((value['skipped'] as Array<any>).map(ZipFileResultToJSON)),
125
103
  };
126
104
  }
127
105